CN116310765A - Electrical wiring graphic primitive identification method - Google Patents

Electrical wiring graphic primitive identification method Download PDF

Info

Publication number
CN116310765A
CN116310765A CN202310580775.XA CN202310580775A CN116310765A CN 116310765 A CN116310765 A CN 116310765A CN 202310580775 A CN202310580775 A CN 202310580775A CN 116310765 A CN116310765 A CN 116310765A
Authority
CN
China
Prior art keywords
straight line
primitive
target
characteristic
electrical wiring
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.)
Granted
Application number
CN202310580775.XA
Other languages
Chinese (zh)
Other versions
CN116310765B (en
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.)
Huayan Intelligent Technology Group Co ltd
Original Assignee
Huayan Intelligent Technology Group 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 Huayan Intelligent Technology Group Co ltd filed Critical Huayan Intelligent Technology Group Co ltd
Priority to CN202310580775.XA priority Critical patent/CN116310765B/en
Publication of CN116310765A publication Critical patent/CN116310765A/en
Application granted granted Critical
Publication of CN116310765B publication Critical patent/CN116310765B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • 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
    • 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/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

The application provides an electrical wiring diagram primitive identification method, which comprises the steps of identifying device primitives and primitive intervals from a target electrical wiring diagram; and identifying the linear graphic element from the target electrical wiring diagram according to the identification results of the device graphic element and the graphic element interval. In the method, firstly, the device graphic elements and graphic element intervals with obvious characteristics are identified, then, the linear graphic elements which are more difficult to identify are identified according to the identification results of the device graphic elements and graphic element intervals, the device graphic elements and the linear graphic elements can be accurately identified, the identification precision is improved, and the identification accuracy and the identification effect are ensured.

Description

Electrical wiring graphic primitive identification method
Technical Field
The application relates to the technical field of image recognition, in particular to an electric wiring graphic primitive recognition method.
Background
In the work of the power grid dispatching personnel, the electric wiring diagram needs to be read, wherein the electric wiring diagram comprises graphic element information, text information, connecting wires, topological relations among graphic elements and corresponding relations among graphic elements and texts, and the information mainly read by the power grid dispatching personnel is the graphic element information. The graphic primitive information comprises graphic primitive information of devices such as a circuit breaker, a switch, an isolating switch, a disconnecting link, a handcart switch, a two-winding transformer, a three-winding transformer, a capacitor, a voltage transformer, a current transformer, a lightning arrester, a grounding disconnecting link, a generator and the like; the primitive information also comprises linear primitives such as buses, loads, AC lines and the like.
The manual mode is adopted to read the primitive information, so that the workload is high and the mistakes are easy to occur. For the above reasons, a deep learning method is generally used in the prior art to identify all primitives. However, since the linear primitives such as the bus, the load and the ac line end are similar to the connecting lines and are all straight line segments, the linear primitives are not easy to distinguish, so that when the deep learning algorithm is adopted for primitive identification, the connecting lines are easy to identify as the linear primitives with wrong connecting lines. Therefore, when the deep learning method is adopted to identify the primitives, the linear primitives such as the bus, the load and the alternating current line end cannot be accurately identified, and the identification accuracy is low.
Disclosure of Invention
An object of the embodiment of the application is to provide an electrical wiring graphic primitive identification method, which improves the identification precision of graphic primitives and ensures the identification accuracy and the identification effect.
In one aspect, the application provides an electrical wiring primitive identification method, which includes:
identifying device primitives and primitive intervals from a target electrical wiring diagram;
and identifying the linear graphic element from the target electrical wiring diagram according to the identification results of the device graphic element and the graphic element interval.
In one embodiment, the linear primitives include bus primitives and feature primitives;
Identifying a linear primitive from a target electrical wiring diagram, comprising:
identifying a plurality of linear features from a target electrical wiring diagram to form a first linear set, and screening busbar primitives connected with a plurality of primitive intervals from the first linear set;
and identifying a plurality of linear features from the target electrical wiring diagram to form a second linear set, and screening feature primitives from the second linear set.
In one embodiment, before identifying the plurality of linear features from the target electrical wiring diagram to form the first set of lines, the method further comprises:
covering the device primitive with the target color patch; wherein the color of the target color patch is consistent with the background color of the target electrical wiring diagram.
In one embodiment, selecting a parent line element from a first set of lines connecting a plurality of primitive intervals includes:
screening a first target straight line connected with each graphic element at intervals from a first straight line set;
and searching out the busbar pattern elements which are perpendicularly intersected with the plurality of first target lines from the screened first line set.
In one embodiment, the primitive intervals comprise feature primitive intervals;
before identifying the plurality of linear features from the target electrical wiring diagram to form the second set of lines, the method further comprises:
Cutting out the region where the characteristic graphic element interval is located from the target electrical wiring diagram to form a first region;
covering the device graphic elements in the first area with the target color patches; the color of the target color lump is consistent with the background color of the target electrical wiring diagram, and the second straight line set is identified from the first area.
In one embodiment, the device primitives include switch primitives; the primitive intervals comprise feature primitive intervals;
screening the characteristic graphic elements from the second straight line set, including:
screening out characteristic straight lines from the second straight line set; one end of the characteristic straight line is connected with the switch graphic element of the target type, and the other end of the characteristic straight line is not connected with the graphic element and the straight line;
screening out combined straight line characteristics from the characteristic straight lines; wherein, the combined straight line characteristic is the straight line where the characteristic graphic element is located;
and separating the combined linear features to obtain feature primitives.
In one embodiment, selecting the combined straight line feature from the feature straight lines includes:
and screening out combined straight line features from the feature straight lines according to the number of the busbar primitives connected with the feature primitive intervals.
In one embodiment, selecting the combined straight line feature from the feature straight lines according to the number of connected busbar primitives at the feature primitive interval includes:
If the number of the bus line primitives connected with the characteristic primitive intervals is one, screening out a comparison primitive which is farthest from the bus line primitives connected with the characteristic primitive intervals from the switch primitive of the target type, and screening out the combined straight line characteristics connected with the comparison primitive from the characteristic straight line;
if the number of the busbar primitives connected with the feature primitive intervals is multiple, the combined straight line features are screened out from the feature straight lines according to the angle information of the feature primitive intervals.
In one embodiment, separating the combined straight line features to obtain feature primitives includes:
screening a second target straight line perpendicularly intersecting the combined straight line feature from the second straight line set, determining an intersection point of the second target straight line and the combined straight line feature, and separating the combined straight line feature based on the intersection point to form a third target straight line;
and screening the characteristic graphic elements from the third target straight line according to the number of the bus graphic elements connected with the characteristic graphic element intervals.
In one embodiment, selecting the feature primitive from the third target line according to the number of connected parent primitives at the feature primitive interval includes:
if the number of the bus line primitives connected with the feature primitive intervals is one, calculating the distance between a third target straight line and the bus line primitives connected with the feature primitive intervals, and taking the third target straight line with the farthest distance as the feature primitive;
And if the number of the bus line primitives connected with the characteristic primitive intervals is multiple, screening the characteristic primitives from the third target straight line according to the angle information of the characteristic primitive intervals.
Compared with the prior art, the beneficial effects of this application are: the application provides an electrical wiring graphic primitive identification method, which comprises the steps of firstly identifying device graphic primitives and graphic primitive intervals from a target electrical wiring graph; and after the identification is successful, identifying the linear graphic element from the target electrical wiring diagram according to the identification results of the device graphic element and the graphic element interval. Therefore, the device graphic element and the graphic element interval with obvious characteristics are firstly identified, and then the linear graphic element which is more difficult to identify is identified according to the identification result of the device graphic element and the graphic element interval, so that the device graphic element and the linear graphic element can be accurately identified, the identification precision is improved, and the identification accuracy and the identification effect are ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly explain the drawings that are required to be used in the embodiments of the present application.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 2 is a flow chart of an electrical connection primitive recognition method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a target electrical wiring diagram provided in an embodiment of the present application;
fig. 4 is a schematic diagram of a recognition result obtained after recognizing the position a in fig. 3 by using a deep learning object detection model according to an embodiment of the present application;
FIG. 5 is a schematic diagram of the target electrical wiring diagram of FIG. 3 after denoising according to one embodiment of the present application;
FIG. 6 is a schematic flow chart of identifying busbar primitives according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a target electrical wiring diagram after covering the device primitive of FIG. 5 with a target color tile according to one embodiment of the present disclosure;
fig. 8 is a schematic diagram of the target electrical wiring diagram shown in fig. 7 after straight line recognition according to an embodiment of the present application;
FIG. 9 is a schematic diagram corresponding to FIG. 3 according to an embodiment of the present disclosure;
FIG. 10 is a schematic diagram illustrating connection between a first target line and a rectangular frame according to an embodiment of the present disclosure;
FIG. 11 is a schematic view of a measurement line perpendicularly intersecting a first target line according to an example of the present application;
FIG. 12 is a schematic diagram of a bus bar pattern recognition of the target electrical wiring pattern shown in FIG. 3 according to one embodiment of the present application;
FIG. 13 is a flowchart of identifying feature primitives according to an embodiment of the present application;
FIG. 14 is a schematic view of a first region provided in a first embodiment of the present application;
FIG. 15 is a schematic view of a first area of the device primitive of FIG. 14 covered with target color patches according to one embodiment of the present application;
FIG. 16 is a schematic diagram of the first region of FIG. 15 after straight line recognition according to an embodiment of the present application;
FIG. 17 is a schematic view of a first region provided in a second embodiment of the present application;
FIG. 18 is a schematic view of a first region provided in a third embodiment of the present application;
FIG. 19 is a schematic diagram of the feature primitive identified in FIG. 14 according to one embodiment of the present application;
FIG. 20 is a schematic diagram of the feature primitive identified in FIG. 17 according to one embodiment of the present application;
FIG. 21 is a schematic view of a first region provided in a fourth embodiment of the present application;
FIG. 22 is a schematic diagram of the feature primitive identified in FIG. 21 according to one embodiment of the present application;
fig. 23 is a schematic view of a first area provided in a fifth embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
Fig. 1 is a schematic structural diagram of an electronic device 1 according to an embodiment of the disclosure. As shown in fig. 1, an electronic apparatus 1 in the present application includes: at least one processor 11 and a memory 12, one processor 11 being exemplified in fig. 1. The processor 11 and the memory 12 are connected by a bus 13, and the memory 12 stores instructions executable by the processor 11, which instructions are executed by the processor 11, so that the electronic device 1 may perform all or part of the flow of the method in the embodiments described below.
The Memory 12 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as static random access Memory (Static Random Access Memory, SRAM), electrically erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), erasable Programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), programmable Read-Only Memory (PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk.
The present application also provides a computer readable storage medium storing a computer program executable by the processor 11 to perform the electrical wiring primitive identification method provided in the following embodiments of the present application.
Fig. 2 is a flowchart of an electrical wiring pattern recognition method according to an embodiment of the present application. As shown in fig. 2, the electrical wiring pattern element recognition method includes the following steps S210 to S220.
Step S210: the device primitive and primitive spacing are identified from the target electrical wiring diagram.
The target electrical wiring diagram refers to an electrical wiring diagram in which the electronic device 1 performs primitive recognition. By way of example, the target electrical wiring diagram may be a wiring schematic in a substation, and the target electrical wiring diagram may be in the format of bmp, png, jpg, and the like. The target electrical wiring diagram comprises device primitive information and linear primitive information; the device graphic element is an electrical device in a target electrical wiring diagram, and specifically, the device graphic element can comprise a circuit breaker, a switch, a disconnecting link, a handcart switch, a two-winding transformer, a three-winding transformer, a capacitor, a voltage transformer, a current transformer, a lightning arrester, a grounding disconnecting link, a generator, an ultra-high voltage switching device, a power transformer, a protection device, a control device, a measurement device and the like. The linear graphic elements comprise bus graphic elements, load graphic elements, alternating current line terminal graphic elements and the like. The graphic element interval is an electric loop formed by connecting device graphic elements and linear graphic elements through connecting wires. Specifically, the ac line terminal interval, the load interval, the bus connection interval, the bus division interval, the main transformer interval, the auxiliary interval, and the like can be classified according to the different connected device primitives.
In this step, in the work of the power grid dispatcher, the target electrical wiring diagram needs to be identified. The information which is most mainly identified is primitive information. When the identification is performed, the power grid dispatcher inputs the target electrical wiring diagram into the electronic equipment 1, and then the electronic equipment 1 can identify the device graphic elements and the graphic element intervals from the target electrical wiring diagram after receiving the target electrical wiring diagram.
Step S220: and identifying the linear graphic element from the target electrical wiring diagram according to the identification results of the device graphic element and the graphic element interval.
In this step, after the electronic device 1 recognizes the device primitive and the primitive interval from the target electrical wiring diagram, the electronic device can recognize the linear primitive from the target electrical wiring diagram based on the recognition result of the device primitive and the primitive interval.
From the above, it can be seen that the present application provides a method for identifying electrical wiring primitives, where device primitives and primitive intervals are identified from a target electrical wiring diagram; and after the identification is successful, identifying the linear graphic element from the target electrical wiring diagram according to the identification results of the device graphic element and the graphic element interval. Therefore, the device graphic element and the graphic element interval with obvious characteristics are firstly identified, and then the linear graphic element which is more difficult to identify is identified according to the identification result of the device graphic element and the graphic element interval, so that the device graphic element and the linear graphic element can be accurately identified, the identification precision is improved, and the identification accuracy and the identification effect are ensured.
In one embodiment, the electronic device 1 may use a deep learning object detection algorithm to identify the device primitive and primitive interval from the object electrical wiring diagram when executing the step S210.
In this embodiment, the electronic device 1 may identify the device primitive and the primitive interval from the target electrical wiring diagram by deep learning the target detection algorithm. The specific identification mode is that a large number of electrical wiring diagram samples are collected firstly, after the collection is successful, power grid dispatching personnel marks positions of device graphic elements and positions of graphic element intervals which need to be identified on the electrical wiring diagram samples through the electronic equipment 1, and after the marking is successful, the electronic equipment 1 trains a deep learning target detection model based on the marked electrical wiring diagram samples. After training is successful, the power grid dispatching personnel inputs the target electrical wiring diagram to be identified into the trained deep learning target detection model, and then the deep learning target detection model can identify the device primitives and primitive intervals.
As shown in fig. 3, which is a schematic diagram of the target electrical wiring diagram according to an embodiment of the present application, after the target electrical wiring diagram in fig. 3 is input into the deep learning target detection model, the deep learning target detection model can identify the device primitives and primitive intervals contained in fig. 3. As shown in fig. 4, which is a schematic diagram of the recognition result obtained after the recognition at the a in fig. 3 is performed by using the deep learning object detection model, it can be seen from fig. 4 that the deep learning object detection model recognizes the device primitive and the primitive interval included at the a in fig. 3. And drawing the identification result on the graph after identification, wherein the rectangular box is used for representing the position information of the device graphic element and the graphic element interval, and the text is used for representing the characteristic information of the device graphic element and the graphic element interval. The characteristic information comprises name information, category information and angle information. Specifically, as shown in fig. 4, the deep learning object detection model identifies feature information "handcart switch_0_0" of a handcart switch, wherein "handcart switch" is name information, "0" is category information, and "0" is angle information; the deep learning target detection model identifies characteristic information of the primitive interval, namely a 10 kilovolt reactor interval_180, wherein the 10 kilovolt reactor interval is name information of the primitive interval, and the 180 is angle information. The recognition results of the deep learning object detection model at a in fig. 3 are only schematically shown in fig. 4, and the recognition results of the other places in fig. 3 are similar to the recognition results at a, and are not listed in this application. After obtaining the location information and the feature information of the device primitive and the primitive interval, the electronic device 1 may store the related information.
By the aid of the measures, because the primitive intervals of the same type have a large number of similar image features, the image features of the primitive intervals of different types are large in difference, so that the primitive intervals can be accurately identified when the primitive intervals are identified by using a deep learning target detection algorithm, and the identification accuracy of the primitive intervals is fully ensured. Meanwhile, the image characteristics of the device graphic elements are obvious, so that the device graphic elements can be accurately identified when the device graphic elements are identified by using a deep learning target detection algorithm. Therefore, it can be seen that in the above embodiment of the present application, the accuracy of identifying the device primitives and the primitive intervals is fully ensured.
In one embodiment, since the element interval in the target electrical wiring diagram is a large recognition target and the element of the device is a small recognition target, in order to improve the recognition accuracy, the element interval can be directly recognized in the target electrical wiring diagram, and then the element of the device is recognized by adopting a sliding window recognition method.
In an embodiment, after the electronic device 1 performs the step S210, the denoising process may be further performed on the target electrical wiring diagram. Specifically, the target electrical wiring diagram may be subjected to denoising processing by a binarization method. Exemplary, as shown in fig. 5, is a schematic diagram of the target electrical wiring diagram of fig. 3 after denoising.
Through the measures, the target electrical wiring diagram is subjected to denoising treatment, noise interference is eliminated, and the identification accuracy of the linear graphic element is ensured.
In an embodiment, the linear primitives include a busbar primitive and a feature primitive, as shown in fig. 6, the electronic device 1 may identify the busbar primitive from the target electrical wiring diagram by performing the following steps S310-S320.
Step S310: covering the device primitive with the target color patch; wherein the color of the target color patch is consistent with the background color of the target electrical wiring diagram.
In this step, in the case of recognizing the device primitive, the electronic apparatus 1 may overlay the device primitive on the target electrical wiring diagram with the target patch in accordance with the background color of the target electrical wiring diagram. Exemplary, as shown in fig. 7, is a schematic diagram of a target electrical wiring diagram after the device primitive of fig. 5 is overlaid with a target color tile.
Through the measures, the device graphic elements on the target electrical wiring diagram are covered by using the target color blocks, so that the device graphic elements are prevented from interfering with the identification of the linear graphic elements, and the identification accuracy of the linear graphic elements is further ensured.
Step S320: a plurality of straight line features are identified from a target electrical wiring diagram to form a first straight line set, and busbar elements which are connected with a plurality of graphic element intervals are screened from the first straight line set.
In this step, the electronic device 1 may identify the straight line on the target electrical wiring diagram after covering the device primitive with the target color patch, and may obtain the first straight line set after the identification is successful. The first straight line set comprises all straight lines on the target electric wiring diagram, and specifically comprises connecting lines, characteristic graphic elements, busbar graphic elements and the like. Specifically, the electronic device 1 may identify straight line features in the target electrical wiring diagram using a morphological detection algorithm. Because the electrical wiring diagrams are all straight lines and are generally horizontal or vertical straight lines, the straight lines on the electrical wiring diagrams can be effectively identified by using a morphological detection algorithm. Exemplary, as shown in fig. 8, a schematic diagram is obtained after the target electrical wiring diagram shown in fig. 7 is subjected to straight line recognition using a morphological detection algorithm.
After the first line set is formed, the electronic device 1 may screen the busbar pattern element from the first line set, and thus complete the identifying process of the busbar pattern element. Wherein, because the bus-bar diagram element is used for connecting a plurality of graphic element intervals, the bus-bar diagram element can be identified by utilizing the characteristics. Specifically, as shown in fig. 9, a schematic diagram corresponding to fig. 3 is provided in an embodiment of the present application. As shown in fig. 9, the busbar pattern 10 connects a plurality of pattern intervals 20. Wherein each primitive interval 20 is vertically connected to a busbar primitive 10 by a first target line 30. Based on the above connection principle, the electronic device 1 may first screen the first target straight line 30 connected to each primitive at intervals from the first straight line set, and find out the busbar pattern element 10 perpendicularly intersecting with the plurality of first target straight lines 30 from the first straight line set after the screening is successful.
Specifically, the electronic device 1 may screen the first target straight line connected to each primitive interval from the first straight line set through the following procedure:
as shown in fig. 4, the electronic device 1 obtains, according to the recognition result of the target electrical wiring diagram stored previously, the position information of a rectangular frame surrounding the primitive interval, then the electronic device 1 may select one straight line from the first straight line set, and then determine whether the selected straight line is connected to the primitive interval by determining whether the selected straight line is connected to the rectangular frame, thereby determining whether the selected straight line is the first target straight line 30; if the selected line is connected to the rectangular frame, it is indicated that the found line is connected to the primitive at intervals, and the found line is the first target line 30. Specifically, as shown in fig. 10, whether the straight line is connected to the rectangular frame may be determined by determining whether only one end point of the straight line is located in the rectangular frame, by first acquiring, by the electrical device, vertex coordinates of the rectangular frame surrounding the primitive interval according to the previously stored recognition result of the target electrical wiring diagram, and specifically acquiring the result as point P (X 1 ,Y 2 ) Point T (X) 2 ,Y 2 ) Point Q (X) 1 ,Y 1 ) Point V (X) 2 ,Y 1 ) Then, the coordinates of the two end points of the selected straight line are obtained, and the specific obtained result is a point F (M 1 ,N 2 ) Point G (M) 1 ,N 1 ) After the success of the acquisition, it is determined whether one of the points F and G is within the rectangular frame 40, and if one of the points is within the rectangular frame and the other is not within the rectangular frame, the straight line is determined to be the first target straight line. As shown in fig. 10, in the present embodiment, when the electronic device 1 derives X 2 ≥M 1 ≥X 1 Y is as follows 2 ≥N 1 ≥Y 1 When the coordinates of (a) are compared, it is determined that the point G is located in the rectangular frame 40. The above process is repeated continuously, and the first target straight line connected with each graphic element at intervals can be found out.
Specifically, the electronic device 1 may find, from the first line set after screening, the busbar pattern element 10 perpendicularly intersecting the plurality of first target lines 30 through the following procedure:
the first line set after screening does not contain a plurality of first target lines which are screened.
As shown in fig. 3, the straight lines in the target electrical wiring diagram mainly include two kinds of horizontal straight lines and vertical straight lines. Then the electronic device 1 may first calculate the angle of each line in the first set of lines from the coordinates of the point on the line when screening the busbar elements 10 from the first set of lines. If the coordinates of two points on the same straight line are points (N 1 ,D 1 ) (N) 2 ,D 2 ) And N 1 =N 2 The type of straight line is described as a vertical straight line, in which case the angle of the straight line is 90 °, and if the coordinates of two points on the same straight line are points (N 1 ,D 1 ) (N) 2 ,D 2 ) And D is 1 =D 2 The type of straight line is illustrated as a horizontal straight line, where the angle of the straight line is 0 °. Meanwhile, the electronic device 1 needs to calculate the angles of a plurality of first target straight lines after calculating the angles of the straight lines in the first straight line set. After all calculation is successful, one measuring straight line is selected from the first straight line set, and the sum of the angles of the measuring straight line and any one first target straight line is calculatedIf the angle is 90 degrees, the two straight lines are vertical. After determining that the two straight lines are perpendicular, determining whether the measuring straight line intersects any one of the first target straight lines, wherein the determining principle is as follows: as shown in fig. 11, coordinates of an end point a and an end point b of the measurement straight line are obtained, and the obtained result is a point a (x 1 ,y 1 ) Point b (x) 2 ,y 2 ) The method comprises the steps of carrying out a first treatment on the surface of the Simultaneously acquiring coordinates of an endpoint c and an endpoint d of the selected first target straight line, and acquiring a point c (x 3 ,y 3 ) Point d (x) 4 ,y 4 ) If the electronic device 1 obtains x at this time 2 ≥x 3 ≥x 1 Y 3 ≥y 1 ≥y 4 And (3) indicating that the measurement straight line perpendicularly intersects the selected first target straight line. Judging whether the measuring straight line is perpendicularly intersected with other first target straight lines according to the same principle, and if the judging result shows that the measuring straight line is perpendicularly intersected with a plurality of first target straight lines at the same time, indicating that the measuring straight line is a busbar pattern element; if the judging result shows that the measuring straight line is not intersected with the plurality of first target straight lines at the same time, the measuring straight line is not a busbar pattern element, at the moment, a straight line is selected from the first straight line set again to be used as the measuring straight line, the process is repeated, whether the newly selected straight line is the busbar pattern element is judged, and the process is repeated until the busbar pattern element is found. Exemplary, as shown in fig. 12, is a schematic diagram of the target electrical wiring diagram shown in fig. 3 after bus bar pattern recognition. The method can accurately identify the busbar pattern element in the electric wiring diagram.
In an embodiment, before searching the first target line, each line feature in the first line set may extend to two sides by a preset length. Specifically, the preset length may be 1 to 5 pixels long. Exemplary, when the end point coordinates of the straight line are the points F (M 1 ,N 2 ) Point G (M) 1 ,N 1 ) When the end point coordinates of the straight line after extension are the points F (M 1 ,N 2 +2) and point G (M 1 ,N 1 -2)。
Because some first target straight lines are possibly connected with the rectangular frame on the boundary of the rectangular frame, the electronic equipment 1 is not easy to identify the first target straight lines in the mode of judging through the coordinates, and the condition of missed detection is easy to occur, so that each straight line in the first straight line set extends to two sides in the method, the end point of the first target straight line is necessarily located in the rectangular frame, the detection precision is improved, the occurrence of the missed detection condition is effectively avoided, and the identification accuracy of busbar pattern elements is also improved.
In the prior art, the recognition method adopted when recognizing the busbar pattern element is that firstly, the busbar area is taken as a core to divide the electrical wiring diagram, then, transverse lines and vertical lines which accord with busbar characteristics in the division diagram are extracted, the structural characteristics and the position characteristics of the busbar are analyzed, and the busbar is classified according to the direction and the shape to judge whether secondary recognition is needed. However, the main features of the busbar pattern are not grasped in the method, and only the structural features and the position features of the busbar pattern are used, so that the method is easy to make mistakes. In the method, the bus line pattern element is identified by grasping the connection relation characteristic that the bus line pattern element can be connected with a plurality of graphic element intervals, so that the identification accuracy of the bus line pattern element is fully ensured.
In an embodiment, as shown in fig. 13, the electronic device 1 may identify the characteristic primitive from the target electrical wiring diagram by performing the following steps S410-S430.
Step S410: and cutting out the region where the characteristic graphic element interval is located from the target electrical wiring diagram to form a first region.
Wherein, the characteristic graphic element comprises a load graphic element and/or an alternating current line terminal graphic element; the load cells and ac line-end cells are essentially power lines, except that ac line-end cells can simultaneously input and output power, whereas load cells can only output power. Feature primitive intervals refer to primitive intervals of a particular type, each feature primitive being located in a corresponding feature primitive interval. Specifically, the load primitive is located in the load primitive interval, and the ac line end primitive is located in the ac line end primitive interval.
Because the characteristic graphic elements in the target electrical wiring diagram are smaller, in order to ensure the identification effect of the characteristic graphic elements in the step, the characteristic graphic element interval corresponding to each characteristic graphic element is cut from the target electrical wiring diagram. Specifically, when clipping is performed, clipping may be performed according to the recognition result of the feature primitive interval, and since the deep learning object detection algorithm recognizes the class information of the primitive interval correspondingly after recognizing the primitive interval, the electronic device 1 may perform clipping according to the class information of the recognized primitive interval when clipping. Specifically, when the recognition result indicates that only the load graphic element exists on the target electrical wiring diagram, the electronic device 1 may clip the area where the load graphic element interval is located from the target electrical wiring diagram; when the identification result indicates that only the ac line terminal graphic element exists on the target electrical wiring diagram, the electronic device 1 may clip the area where the ac line terminal graphic element interval is located from the target electrical wiring diagram; when the recognition result indicates that the ac line terminal graphic element and the load graphic element exist on the target electrical wiring diagram at the same time, the electronic device 1 may cut out the area where the ac line terminal graphic element interval and the load graphic element interval are located from the target electrical wiring diagram at the same time. When the characteristic graphic element intervals are multiple, each characteristic graphic element interval is cut individually, so that at least one first area is formed after cutting is finished, and each first area only comprises one characteristic graphic element interval.
By the aid of the measures, the characteristic graphic element intervals where the characteristic graphic elements are located are cut off from the target electrical wiring diagram, and accuracy of subsequent identification of the characteristic graphic elements is further guaranteed.
Step S420: covering the device graphic elements in the first area with the target color patches; wherein the color of the target color patch is consistent with the background color of the target electrical wiring diagram.
In this step, after clipping the feature element interval from the target electrical wiring diagram, the electronic device 1 can identify the feature element from the first region. Specifically, when the first area includes the load primitive interval, the electronic device 1 may identify the load primitive from the first area; when the ac line end primitive interval is contained in the first region, the electronic device 1 may identify the ac line end primitive from the first region. Before the identification, the electronic device 1 may cover the device primitive on the first area by using the target color block with the same background color as the target electrical wiring diagram, so as to avoid the device primitive from interfering with the identification of the feature primitive, and fully ensure the identification accuracy of the feature primitive.
Step S430: and identifying a plurality of linear features from the first region to form a second linear set, and screening feature primitives from the second linear set.
In this step, the electronic device 1 may identify the straight line on the first area after covering the device primitive with the target color patch, and may obtain the second straight line set after the identification is successful. Specifically, the electronic device 1 may identify the straight line feature in the first region using a morphological detection algorithm. Because the electrical wiring diagrams are all straight lines and are generally horizontal or vertical straight lines, the straight lines on the electrical wiring diagrams can be effectively identified by using a morphological detection algorithm.
After the identification is successful, the electronic device 1 can screen out the feature primitives from the second straight line set, and then the identification process of the feature primitives is completed in this way. Specifically, the load graphic element and the alternating current line terminal graphic element can be identified according to the connection mode of the load graphic element and the alternating current line terminal graphic element in the electric wiring diagram; specifically, the connection mode of the load graphic element and the alternating current line terminal graphic element in the electric wiring diagram is as follows: one end of the load graphic element and one end of the alternating current line end graphic element are connected to a specific type of switch graphic element through connecting wires, and the other ends of the load graphic element and the alternating current line end graphic element are not connected with any graphic element and any straight line. As shown in fig. 14, one end of the ac line terminal graphic element X9 is connected to the isolating switch 1413 through the connection line X8 and the connection line X10, and the other end of the ac line terminal graphic element X9 is not connected to any graphic element or line. As shown in fig. 21, one end of the load primitive X12 is connected to the cart switch 935 via the connection line X11, and the other end of the load primitive X12 is not connected to any primitive or straight line.
Based on the above content, the electronic device 1 may screen out the feature primitives from the second straight line set as follows: firstly, the electronic equipment 1 screens out characteristic straight lines from a second straight line set; one end of the characteristic straight line is connected with the switch graphic element of the target type, and the other end of the characteristic straight line is not connected with the graphic element and the straight line; then screening out combined straight line characteristics from the characteristic straight lines; the combined straight line feature is a straight line where the feature graphic element is located, and consists of a connecting line and the feature graphic element; and separating the combined linear features to obtain feature primitives.
The following explains the identification process of ac line end primitives in detail by taking fig. 14 as an example:
(1) An image of the first region as shown in fig. 14 is cut out from the target electrical wiring diagram. Wherein the first region includes an ac line end primitive interval.
(2) And covering the device graphic elements in the first area by using the target color block.
In this step, the electronic apparatus 1 overlays the device primitive in the first region with the target patch of the same color as the background color of the target electrical wiring diagram. As shown in fig. 15, a schematic diagram of a first area after the device primitive in fig. 14 is covered with the target color patch.
(3) A plurality of linear features are identified from the first region to form a second set of lines.
In this step, the electronic device 1 identifies the straight line features in the first area using the morphological detection algorithm, and the plurality of identified straight line features form the second straight line set. As shown in fig. 16, a schematic diagram is obtained by performing straight line recognition on the first region shown in fig. 15 using a morphological detection algorithm.
(4) And screening alternating current line end primitives from the second straight line set.
In this step, first, the electronic device 1 screens out a characteristic straight line from the second straight line set; one end of the characteristic straight line is connected with the isolating switch, and the other end of the characteristic straight line is not connected with any graphic element and straight line. Specifically, the electronic device 1 obtains the position information of the rectangular frame surrounding the isolating switch according to the previously stored recognition result of the target electrical wiring diagram, and then determines whether the second straight line set has the straight line feature connected with the rectangular frame. If the judgment shows that the straight line feature connected with the rectangular frame exists in the second straight line set and the other end of the straight line feature is not connected with any graphic element and straight line, the straight line feature is the feature straight line at the moment. The implementation manner of determining whether the straight line is connected to the rectangular frame is referred to the above embodiment, and will not be described herein. Specifically, as shown in fig. 16, after the second straight line set is screened, the electronic device 1 screens out the characteristic straight lines L1 and L2. As shown in fig. 16 and 14, one end of the characteristic line L1 is connected to the disconnecting switch 1413, and the other end of the characteristic line L1 is not connected to any primitive and line; one end of the characteristic line L2 is connected to the disconnecting switch 1411, and the other end of the characteristic line L2 is not connected to any primitive or line.
Next, after screening out the feature straight lines, the electronic device 1 may screen out the combined straight line features from the feature straight lines. The combined straight line characteristic is a straight line where the alternating current line terminal graphic element is located, and the combined straight line characteristic consists of a connecting line and the alternating current line terminal graphic element. When screening is performed, the electronic device 1 may screen out the combined straight line features from the feature straight lines according to the angle information of the ac line end primitive intervals. The angle information of the alternating-current line terminal graphic element interval can represent the arrangement position of the combined straight line characteristic of the alternating-current line terminal graphic element on the first area, so that the combined straight line characteristic can be screened out from the characteristic straight line according to the angle information of the alternating-current line terminal graphic element interval. Specifically, if the angle information of the alternating-current line end primitive interval is 0 degrees, the combined straight line characteristic is arranged at the upper position in the first area; if the angle information of the alternating-current line end primitive interval is 90 degrees, the combined straight line characteristic is arranged at the right position in the first area; if the angle information of the alternating-current line end primitive interval is 180 degrees, the combined straight line characteristic is arranged at the lower position in the first area; and if the angle information of the alternating-current line end primitive interval is 270 degrees, the combined straight line characteristic is arranged at the left position in the first area. As shown in fig. 16, if the angle information of the ac line end primitive interval is 0 °, the combined straight line feature is located above the first region, and the feature straight line L1 may be determined to be the combined straight line feature.
For another example, as shown in fig. 17, the electronic device 1 screens out the characteristic lines L5, L6, and L7 from the second line set; if the angle information of the ac line end primitive interval is 90 °, the combined straight line feature should be located at the right position of the first region, and then the feature straight line L7 may be determined to be the combined straight line feature.
For another example, as shown in fig. 18, the electronic device 1 screens out the characteristic lines L8 and L9 from the second line set; the angle information of the ac line end primitive interval is 270 °, and if the combined straight line feature is to be located at the left position of the first region, then the feature straight line L8 may be determined to be the combined straight line feature.
And finally, separating the combined linear characteristics to obtain alternating current line terminal graphic primitives. Specifically, the electronic device 1 may screen out a second target line perpendicularly intersecting the combined straight line feature from the second line set, determine an intersection point of the second target line and the combined straight line feature, and separate the combined straight line feature according to the intersection point to form a third target line. The electronic device 1 may select one measurement line from the second line set, and then determine whether the measurement line perpendicularly intersects the combined line feature; and if the measuring straight line is perpendicularly intersected with the combined straight line characteristic, the measuring straight line is the second target straight line. Otherwise, the measuring straight line is selected again until the second target straight line is determined. Specifically, the determination manner of whether the measurement line perpendicularly intersects with the combined line feature is detailed in the description of the above embodiment, which is not repeated here.
Furthermore, the angle information of the ac line terminal graphic element interval can reflect the arrangement position of the ac line terminal graphic element on the first area, so that the ac line terminal graphic element can be screened out from the third target straight line according to the angle information of the ac line terminal graphic element interval. Specifically, if the angle information of the alternating-current line end graphic element interval is 0 degrees, the alternating-current line end graphic element is arranged at the upper position in the first area; if the angle information of the alternating-current line end graphic element interval is 90 degrees, the alternating-current line end graphic element is arranged at the right position in the first area; if the angle information of the alternating-current line terminal graphic element interval is 180 degrees, the alternating-current line terminal graphic element is arranged at the lower position in the first area; and if the angle information of the alternating-current line end graphic element interval is 270 degrees, the alternating-current line end graphic element is arranged at the left position in the first area.
As shown in fig. 16, the electronic device 1 screens out second target straight lines X4 and X5 intersecting the combined straight line feature L1 perpendicularly from the second straight line set, and the second target straight lines X4 and X5 and the combined straight line feature L1 form two intersecting points that divide the combined straight line feature L1 into a straight line X8, a straight line X9, and a straight line X10; the straight lines X8, X9, and X10 are the third target straight lines. Then, since the angle information of the ac line end primitive interval is 0 °, the ac line end primitive should be located at the upper position of the first region, and in this case, the straight line X9 is determined to be the ac line end primitive. As shown in fig. 19, which is a schematic diagram obtained after the electronic device 1 performs feature primitive recognition on fig. 14, it can be seen from the figure that the electronic device 1 accurately recognizes the ac line end primitive.
As shown in fig. 17, the electronic device 1 screens out a second target straight line X7 perpendicularly intersecting the combined straight line feature L7 from the second straight line set, and the second target straight line X7 and the combined straight line feature L7 form an intersection point, which divides the combined straight line feature L7 into a straight line X1 and a straight line X2; the straight lines X1 and X2 are the third target straight lines. Then, since the angle information of the ac line end primitive interval is 90 °, the ac line end primitive should be located at the right position of the first region, and in this case, the straight line X2 is determined to be the ac line end primitive. As shown in fig. 20, which is a schematic diagram obtained after the electronic device 1 performs feature primitive recognition on fig. 17, it can be seen from the figure that the electronic device 1 accurately recognizes the ac line end primitive.
The following explains the load primitive recognition flow by taking fig. 21 as an example:
(1) An image of the first region as shown in fig. 21 is cut out from the target electrical wiring diagram. Wherein the first region includes a load primitive interval.
(2) And covering the device graphic elements in the first area by using the target color block.
In this step, the electronic apparatus 1 overlays the device primitive in the first region with the target patch of the same color as the background color of the target electrical wiring diagram. The specific coverage results are similar to those obtained when identifying ac line end primitives as described above, and are not further illustrated herein for the sake of brevity.
(3) A plurality of linear features are identified from the first region to form a second set of lines.
In this step, the electronic device 1 identifies the straight line features in the first area using the morphological detection algorithm, and the plurality of identified straight line features form the second straight line set. The specific results are similar to those obtained when identifying ac line end primitives as described above, and are not further illustrated herein for the sake of brevity.
(4) And screening the load graphic elements from the second straight line set.
In this step, first, the electronic device 1 screens out a characteristic straight line from the second straight line set; one end of the characteristic straight line is connected with the handcart switch, and the other end of the characteristic straight line is not connected with any graphic element and straight line. The specific principle is the same as the principle of screening the characteristic straight line when identifying the alternating current line terminal graphic element, except that the isolating switch is replaced by a handcart switch, and the details are not repeated here. As shown in fig. 21, after the screening, the electronic apparatus 1 screens out the characteristic straight lines L3 and L4 from the second straight line set. As shown in fig. 21, one end of the characteristic line L3 is connected to the cart switch 935, and the other end of the characteristic line L3 is not connected to any primitive and line; one end of the characteristic straight line L4 is connected to the cart switch 935, and the other end of the characteristic straight line L4 is not connected to any primitive or straight line.
Next, after screening out the feature straight lines, the electronic device 1 may screen out the combined straight line features from the feature straight lines. The combined straight line characteristic is a straight line where the load graphic element is located, and the combined straight line characteristic consists of a connecting line and the load graphic element. The screening principle is the same as the principle of screening combined straight line features when identifying ac line end primitives, but only according to the angle information of the load primitive interval in this embodiment, the combined straight line features are screened, and based on this, the relevant principle is not explained here for the sake of space limitation. As shown in fig. 21, if the angle information of the load primitive interval is 180 °, the combined straight line feature is located at the lowest position of the first region, and the feature straight line L3 can be determined as the combined straight line feature.
And finally, separating the combined linear characteristics to obtain the load graphic element. Specifically, the electronic device 1 may screen out a second target line perpendicularly intersecting the combined straight line feature from the second line set, determine an intersection point of the second target line and the combined straight line feature, and separate the combined straight line feature according to the intersection point to form a third target line. And then the electronic equipment screens out the load graphic elements from the third target straight line according to the angle information of the load graphic element intervals. The specific screening principle is the same as that of the above embodiment, and will not be described here again.
As shown in fig. 21, the electronic device 1 screens out a second target straight line X15 perpendicularly intersecting the combined straight line feature L3 from the second straight line set, and the second target straight line X15 and the combined straight line feature L3 form an intersection point, and the intersection point divides the combined straight line feature L3 into a straight line X11 and a straight line X12; the straight lines X11 and X12 are the third target straight lines. Then, since the angle information of the load primitive interval is 180 °, the load primitive should be located at a position below the first region, and in this case, the straight line X12 is determined as the load primitive. As shown in fig. 22, which is a schematic diagram obtained after the electronic device 1 performs feature primitive recognition on fig. 21, it can be seen from the figure that the electronic device 1 accurately recognizes the load primitive.
It should be noted that in practice, there may be a plurality of second target lines, where the plurality of second target lines and the combined straight line feature form a plurality of intersecting points, and the plurality of intersecting points divide the combined straight line feature into a plurality of third target lines, and at this time, the feature primitives may still be screened out from the plurality of third target lines according to the above manner.
In an embodiment, each feature primitive interval may connect one busbar, or each feature primitive interval may connect multiple busbars simultaneously. At this time, the electronic device 1 can recognize the feature primitives in the above-described manner, regardless of whether the feature primitives are connected to one bus or to a plurality of buses at intervals.
According to the method, the characteristic graphic elements in the electric wiring diagram can be accurately identified, and the identification effect is good.
In another embodiment, the electronic device 1 may further identify the feature primitives according to the number of the connected bus primitives at the feature primitive interval, and the specific identification manner is explained in detail below:
(1) An image of the first region is cropped from the target electrical wiring diagram. Wherein the first region includes a feature primitive interval.
The electronic device 1 before clipping judges the number of the bus-bar diagram elements connected with the feature-element intervals, if the number of the bus-bar diagram elements connected with the feature-element intervals is one, clipping the area where the feature-element intervals are located from the target electrical wiring diagram, clipping the bus-bar diagram elements connected with the feature-element intervals from the target electrical wiring diagram, and clipping the bus-bar diagram elements connected with the feature-element intervals to form a first area. If the number of the busbar elements connected with the characteristic element intervals is a plurality of, cutting out the area where the characteristic element intervals are located from the target electrical wiring diagram, and forming a first area after cutting.
(2) And covering the device graphic elements in the first area by using the target color block.
The specific principle is the same as that of the above embodiment, and will not be described here again.
(3) A plurality of linear features are identified from the first region to form a second set of lines.
The specific principle is the same as that of the above embodiment, and will not be described here again.
(4) And screening out the characteristic primitives from the second straight line set.
In this step, first, the electronic device 1 screens out a characteristic straight line from the second straight line set; one end of the characteristic straight line is connected with the switch graphic element of the target type, and the other end of the characteristic straight line is not connected with the graphic element and the straight line. Specifically, the manner of screening the feature lines is the same as that of the above embodiment, regardless of whether the number of the busbar elements connected to the feature element interval is one or more, and will not be described here again.
Next, the electronic apparatus 1 screens out the combined straight line features from the feature straight lines. The combined straight line characteristic is the straight line where the characteristic graphic element is located. Specifically, the electronic device 1 may screen out the combined straight line features from the feature straight lines according to the number of the connected busbar primitives at the feature primitive intervals.
If the number of the bus primitives connected to the feature primitive interval is multiple, the combined straight line features are selected from the feature straight lines according to the angle information of the feature primitive interval, and detailed implementation is described in the above embodiments, which are not repeated here. If the number of the bus line primitives connected with the characteristic primitive interval is one, screening out the comparison primitive which is farthest from the bus line primitive connected with the characteristic primitive interval from the switch primitive of the target type, and screening out the combined straight line characteristic connected with the comparison primitive from the characteristic straight line.
Further, the electronic device 1 separates the combined straight line feature to obtain a feature primitive. Specifically, the electronic device 1 may first screen out a second target line perpendicularly intersecting the combined straight line feature from the second line set, then determine an intersection point of the second target line and the combined straight line feature, and separate the combined straight line feature based on the intersection point to form a third target line.
Finally, the electronic device 1 may screen out the feature primitives from the third target line according to the number of connected busbar primitives at the feature primitive interval. If the number of the bus primitives connected to the feature primitive interval is multiple, the feature primitive is selected from the third target line according to the angle information of the feature primitive interval, and the specific implementation manner is the same as that of the above embodiment, and will not be repeated here. If the number of the bus line primitives connected with the feature primitive interval is one, calculating the distance between the third target straight line and the bus line primitives connected with the feature primitive interval, and taking the third target straight line with the farthest distance as the feature primitive.
As can be seen from the above, in the present embodiment, when the number of bus primitives connected to the feature primitive interval is plural, the method adopted to identify the feature primitive is the same as that of the above embodiment; when the number of bus primitives connected to the feature primitive interval is one, the method adopted to identify the feature primitive is different from the above-described embodiment.
The following illustrates the principle of the electronic device 1 identifying ac line end primitives when the number of busbar primitives connected by the feature primitive interval is one:
(1) An image of the first region is cropped from the target electrical wiring diagram. Wherein the first region includes an ac line end primitive interval.
As shown in fig. 23, in this step, the electronic device 1 determines the number of bus-line elements connected to the ac line-end element space before clipping, determines that the number of bus-line elements connected to the ac line-end element space is one after the determination, and clips the region 60 where the ac line-end element space is located and the bus-line elements 50 connected to the ac line-end element space from the target electrical wiring diagram at this time, and forms the first region after clipping.
(2) And covering the device graphic elements in the first area by using the target color block.
The specific principle is the same as that of the above embodiment, and will not be described here again.
(3) A plurality of linear features are identified from the first region to form a second set of lines.
The specific principle is the same as that of the above embodiment, and will not be described here again.
(4) And screening alternating current line end primitives from the second straight line set.
In this step, first, the electronic device 1 screens out a characteristic straight line from the second straight line set; one end of the characteristic straight line is connected with the isolating switch, and the other end of the characteristic straight line is not connected with the graphic element and the straight line. Specifically, the manner of screening the characteristic lines is the same as that of the above embodiment, and will not be described here again. As shown in fig. 23, the electronic device 1 screens out the characteristic straight lines L1 and L2 from the second straight line set.
Next, the electronic apparatus 1 screens out the combined straight line features from the feature straight lines. The combined straight line is characterized by a straight line where the alternating current line end graphic element is located. Specifically, the electronic device 1 screens out the isolating switch farthest from the busbar pattern element 50, the isolating switch is the comparison pattern element, and after the screening is successful, the line connected with the comparison pattern element is screened out from the characteristic lines, and the line is the characteristic of the combined line. The electronic device 1 obtains a rectangular frame surrounding the comparison primitive according to the previously stored recognition result of the target electrical wiring diagram, and then judges whether a straight line connected with the rectangular frame exists in the characteristic straight line. If the straight line connected with the rectangular frame exists in the characteristic straight line after judgment, the straight line is the combined straight line characteristic. The implementation manner of determining whether the straight line is connected to the rectangular frame is referred to the above embodiment, and will not be described herein.
As shown in fig. 23, the electronic device 1 screens out the disconnecting switch 1413 that is farthest from the busbar pattern element from the disconnecting switches, and then finds out the characteristic line L1 connected to the disconnecting switch 1413 from the characteristic lines, and at this time, it can be determined that the characteristic line L1 is the combined line characteristic.
Further, after determining the combined straight line feature, the electronic device 1 separates the combined straight line feature to obtain an ac line terminal primitive. Specifically, the electronic device 1 first screens out a second target line perpendicularly intersecting the combined line feature from the second line set, and then determines an intersection point of the second target line and the combined line feature to form a third target line. As shown in fig. 23, the electronic device 1 screens out second target straight lines X4 and X5 from the second straight line set, and the second target straight lines X4 and X5 form two intersecting points with the combined straight line feature L1, and the two intersecting points divide the combined straight line feature L1 into a straight line X8, a straight line X9, and a straight line X10; the straight lines X8, X9, and X10 are the third target straight lines.
Finally, the electronic device 1 screens out ac line end primitives from the third target line. Specifically, the electronic device 1 calculates the distance between the third target line and the busbar element connected with the characteristic element interval, and uses the farthest distance as the ac line end element. As shown in fig. 23, the electronic device 1 calculates the distance between the third target straight line X8 and the busbar unit 50, calculates the distance between the third target straight line X9 and the busbar unit 50, and calculates the distance between the third target straight line X10 and the busbar unit 50, and then determines that the third target straight line X9 is the ac line end unit when the calculated distance between the third target straight line X9 and the busbar unit is the farthest.
It should be noted that, in the present embodiment, the principle of identifying the load primitive by the electronic device 1 is the same as that of identifying the ac line terminal primitive, but the above-mentioned isolating switch is replaced by a handcart switch, which is not repeated herein for the sake of brevity and limitation.
Through the above, the characteristic primitives can be identified by adopting various methods, the identification modes are various, and the identification accuracy and the identification effect of the characteristic primitives can be ensured.
Note that: in order to distinguish different electric devices, relevant label information is added for each electric device, and the electric devices are represented by the label information so as to be convenient for remote control according to the label information in the electric wiring diagram in practice. The specific meaning of the relevant power equipment label information in the drawings is described in detail below:
reference numerals 986, 987, 988 and 935 in fig. 3, 4, 5, 7, 9, 12, 21 and 22 represent handcart switches, 93560, 98660, 98670, 98760, 98860 and 9310 represent grounding switches, 9038 and 9867 represent disconnectors, and 10kV iii bus PT represents 10kV bus PT intervals.
Reference numerals 1413 and 1411 in fig. 14, 15, 19 and 23 denote disconnecting switches, reference numeral 141 denotes a circuit breaker, and reference numerals 14160, 14140 and 14130 denote grounding switches.
Reference numerals 1611, 1612, and 1616 in fig. 17 and 20 denote disconnecting switches, reference numerals 16130, 16140, and 16160 denote ground switches, and reference numeral 161 denotes circuit breakers.
Reference numerals 3223 and 3221 in fig. 18 represent disconnecting switches, and reference numeral 322 represents a circuit breaker.
In the several embodiments provided in the present application, the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored on a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (10)

1. A method for identifying electrical wiring primitives, the method comprising:
Identifying device primitives and primitive intervals from a target electrical wiring diagram;
and identifying the linear graphic element from the target electrical wiring diagram according to the identification results of the device graphic element and the graphic element interval.
2. The electrical wiring pattern recognition method of claim 1, wherein the linear pattern comprises a busbar pattern and a feature pattern;
the identifying a linear primitive from the target electrical wiring diagram includes:
identifying a plurality of linear features from the target electrical wiring diagram to form a first linear set, and screening the busbar pattern elements connected with a plurality of pattern element intervals from the first linear set;
and identifying a plurality of linear features from the target electrical wiring diagram to form a second linear set, and screening the feature primitives from the second linear set.
3. The electrical wiring diagram primitive identification method of claim 2 further comprising, prior to the identifying a plurality of straight line features from the target electrical wiring diagram to form a first straight line set:
covering the device primitive with a target color patch; and the color of the target color block is consistent with the background color of the target electrical wiring diagram.
4. The electrical wiring pattern recognition method of claim 2, wherein the screening the busbar pattern connecting a plurality of pattern intervals from the first set of lines comprises:
screening a first target straight line connected with the graphic element at intervals from the first straight line set;
and searching the busbar elements which are perpendicularly intersected with the plurality of first target straight lines from the screened first straight line set.
5. The electrical wiring primitive identification method of claim 2 wherein the primitive intervals comprise feature primitive intervals;
before the identifying a plurality of straight line features from the target electrical wiring diagram forms a second set of straight lines, the method further comprises:
cutting out the region where the characteristic graphic element interval is located from the target electrical wiring diagram to form a first region;
covering the device primitives in the first region with target color patches; the color of the target color block is consistent with the background color of the target electrical wiring diagram, and the second straight line set is identified from the first area.
6. The electrical wiring pattern recognition method of claim 2, wherein the device pattern comprises a switch pattern; the primitive intervals comprise characteristic primitive intervals;
The step of screening the characteristic primitives from the second straight line set includes:
screening out characteristic straight lines from the second straight line set; one end of the characteristic straight line is connected with the switch graphic element of the target type, and the other end of the characteristic straight line is not connected with the graphic element and the straight line;
screening out combined straight line characteristics from the characteristic straight lines; the combined straight line feature is a straight line where the feature primitive is located;
and separating the combined linear features to obtain the feature primitives.
7. The electrical wiring pattern recognition method of claim 6, wherein the screening out combined straight line features from the feature straight lines comprises:
and screening out the combined straight line characteristics from the characteristic straight lines according to the number of the busbar elements connected with the characteristic primitive intervals.
8. The electrical wiring pattern recognition method of claim 7, wherein the screening the combined straight line features from the feature straight lines according to the number of connected busbar patterns at the feature pattern intervals comprises:
if the number of the bus line primitives connected with the characteristic primitive intervals is one, screening a comparison primitive which is farthest from the bus line primitives connected with the characteristic primitive intervals from the switch primitive of the target type, and screening the combined straight line characteristics connected with the comparison primitive from the characteristic straight line;
And if the number of the busbar primitives connected with the characteristic primitive intervals is multiple, screening out the combined straight line characteristics from the characteristic straight lines according to the angle information of the characteristic primitive intervals.
9. The electrical wiring pattern recognition method of claim 6, wherein the separating the combined straight line features to obtain feature patterns comprises:
screening a second target straight line perpendicularly intersecting the combined straight line feature from the second straight line set, determining an intersection point of the second target straight line and the combined straight line feature, and separating the combined straight line feature based on the intersection point to form a third target straight line;
and screening the characteristic graphic elements from the third target straight line according to the number of the bus graphic elements connected with the characteristic graphic element intervals.
10. The electrical wiring pattern recognition method of claim 9, wherein the screening the feature pattern from the third target line according to the number of connected busbar patterns at the feature pattern interval comprises:
if the number of the bus line primitives connected with the characteristic primitive intervals is one, calculating the distance between the third target straight line and the bus line primitives connected with the characteristic primitive intervals, and taking the third target straight line with the farthest distance as the characteristic primitive;
And if the number of the bus primitives connected with the characteristic primitive intervals is multiple, selecting the characteristic primitives from the third target straight line according to the angle information of the characteristic primitive intervals.
CN202310580775.XA 2023-05-23 2023-05-23 Electrical wiring graphic primitive identification method Active CN116310765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310580775.XA CN116310765B (en) 2023-05-23 2023-05-23 Electrical wiring graphic primitive identification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310580775.XA CN116310765B (en) 2023-05-23 2023-05-23 Electrical wiring graphic primitive identification method

Publications (2)

Publication Number Publication Date
CN116310765A true CN116310765A (en) 2023-06-23
CN116310765B CN116310765B (en) 2023-09-01

Family

ID=86785421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310580775.XA Active CN116310765B (en) 2023-05-23 2023-05-23 Electrical wiring graphic primitive identification method

Country Status (1)

Country Link
CN (1) CN116310765B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118097706A (en) * 2024-04-23 2024-05-28 华雁智能科技(集团)股份有限公司 Method, system, equipment and medium for detecting graphic element of power grid station wiring diagram

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108280430A (en) * 2018-01-24 2018-07-13 陕西科技大学 A kind of flow image-recognizing method
CN111241646A (en) * 2020-01-10 2020-06-05 厦门亿力吉奥信息科技有限公司 Layout method of power grid equipment and computer readable storage medium
CN112287773A (en) * 2020-10-10 2021-01-29 国家电网有限公司 Primary wiring diagram primitive identification method based on convolutional neural network
CN114565930A (en) * 2022-02-23 2022-05-31 东南大学 Electrical plant station wiring drawing bus identification method based on morphological processing
CN114821599A (en) * 2022-04-21 2022-07-29 国网河南省电力公司电力科学研究院 Method for identifying characteristic graphic element in electrical drawing
CN114842494A (en) * 2021-12-23 2022-08-02 华南理工大学 Method for automatically identifying connection relation of station wiring diagrams of power system
CN115082950A (en) * 2022-06-07 2022-09-20 国网山东省电力公司莱芜供电公司 Automatic identification, conversion and storage method for power grid station wiring diagram
CN115294595A (en) * 2022-06-24 2022-11-04 武汉大学 Intelligent analysis method for primary wiring diagram of transformer substation
CN115376155A (en) * 2022-08-25 2022-11-22 合肥工业大学智能制造技术研究院 Station wiring diagram detection method based on YOLOv6 and traditional image processing technology
CN115457591A (en) * 2022-09-30 2022-12-09 国网天津市电力公司 Identification method for topological relation of main wiring diagram of power grid station
CN115995086A (en) * 2022-09-27 2023-04-21 东南大学 Identification method, equipment and storage medium for terminal strip drawing short-link primitive

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108280430A (en) * 2018-01-24 2018-07-13 陕西科技大学 A kind of flow image-recognizing method
CN111241646A (en) * 2020-01-10 2020-06-05 厦门亿力吉奥信息科技有限公司 Layout method of power grid equipment and computer readable storage medium
CN112287773A (en) * 2020-10-10 2021-01-29 国家电网有限公司 Primary wiring diagram primitive identification method based on convolutional neural network
CN114842494A (en) * 2021-12-23 2022-08-02 华南理工大学 Method for automatically identifying connection relation of station wiring diagrams of power system
CN114565930A (en) * 2022-02-23 2022-05-31 东南大学 Electrical plant station wiring drawing bus identification method based on morphological processing
CN114821599A (en) * 2022-04-21 2022-07-29 国网河南省电力公司电力科学研究院 Method for identifying characteristic graphic element in electrical drawing
CN115082950A (en) * 2022-06-07 2022-09-20 国网山东省电力公司莱芜供电公司 Automatic identification, conversion and storage method for power grid station wiring diagram
CN115294595A (en) * 2022-06-24 2022-11-04 武汉大学 Intelligent analysis method for primary wiring diagram of transformer substation
CN115376155A (en) * 2022-08-25 2022-11-22 合肥工业大学智能制造技术研究院 Station wiring diagram detection method based on YOLOv6 and traditional image processing technology
CN115995086A (en) * 2022-09-27 2023-04-21 东南大学 Identification method, equipment and storage medium for terminal strip drawing short-link primitive
CN115457591A (en) * 2022-09-30 2022-12-09 国网天津市电力公司 Identification method for topological relation of main wiring diagram of power grid station

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
王曼: "电力网络拓扑分析算法的研究与设计", 中国优秀硕士学位论文全文数据库 工程科技II辑, no. 2, pages 042 - 257 *
章坚民等: "变电站单线图模数图一致性设计与自动成图", 电力***自动化, vol. 37, no. 9, pages 84 - 91 *
苏运光等: "基于存量图形拓扑分析的厂站接线图自动生成", 电力***自动化, vol. 44, no. 3, pages 162 - 166 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118097706A (en) * 2024-04-23 2024-05-28 华雁智能科技(集团)股份有限公司 Method, system, equipment and medium for detecting graphic element of power grid station wiring diagram
CN118097706B (en) * 2024-04-23 2024-06-25 华雁智能科技(集团)股份有限公司 Method, system, equipment and medium for detecting graphic element of power grid station wiring diagram

Also Published As

Publication number Publication date
CN116310765B (en) 2023-09-01

Similar Documents

Publication Publication Date Title
CN110441629B (en) Fault diagnosis method and device based on turnout switch machine operating current curve
CN116310765B (en) Electrical wiring graphic primitive identification method
JP5049675B2 (en) Distribution line accident cause estimation system, method, and program
CN111859805B (en) Method for detecting topological relation of electric power drawing based on artificial intelligence
CN110889237B (en) Ring network graph management method, device, computer equipment and storage medium
CN108648169A (en) The method and device of high voltage power transmission tower defects of insulator automatic identification
CN110991448A (en) Text detection method and device for nameplate image of power equipment
CN108520109B (en) Graphical automatic drawing method for power supply path of high-risk customer of power grid
CN110728260A (en) Method and device for identifying electrical construction drawing
CN116957309B (en) Textile scene dynamic monitoring method, system and medium
CN115239646A (en) Defect detection method and device for power transmission line, electronic equipment and storage medium
CN114821599A (en) Method for identifying characteristic graphic element in electrical drawing
CN116577698B (en) Substation ground fault monitoring method based on electromagnetic field distribution
CN113036906B (en) Automatic inspection robot of power dispatching system
CN116304798A (en) Partial discharge type identification method, device, equipment and medium
CN113610854B (en) Cable defect detection method, terminal device and computer storage medium
CN114142605B (en) Pilot protection method, device and storage medium
CN115204319A (en) Low-voltage distribution network topology parameter identification method and system
CN115359505A (en) Electric power drawing detection and extraction method and system
CN107392449B (en) Relay protection setting value list generation method and device
JP2008199855A (en) Distribution system excessive facility check system
CN114757496A (en) Method and device for evaluating power supply reliability of power distribution network
CN114155544A (en) Wireless form identification method and device, computer equipment and storage medium
CN112102346A (en) Method for improving prediction accuracy of layout edge grid points
CN112202162A (en) Method for planning an electric energy transmission network, planning device and computer program product

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
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method for identifying electrical wiring diagram elements

Granted publication date: 20230901

Pledgee: Industrial Bank Limited by Share Ltd. Chengdu branch

Pledgor: Huayan Intelligent Technology (Group) Co.,Ltd.

Registration number: Y2024980013935

PE01 Entry into force of the registration of the contract for pledge of patent right