Detailed Description
For the purposes of promoting an understanding of the principles and advantages of the disclosure, reference will now be made to the embodiments illustrated in the drawings and specific language will be used to describe the same.
It should be noted that unless otherwise defined, technical or scientific terms used in the embodiments of the present disclosure should be given the ordinary meaning as understood by one of ordinary skill in the art to which the present disclosure pertains. The terms "first," "second," and the like, as used in embodiments of the present disclosure, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
It will be appreciated that the above-described notification and user authorization process is merely illustrative and not limiting of the implementations of the present disclosure, and that other ways of satisfying relevant legal regulations may be applied to the implementations of the present disclosure.
Fig. 1 shows a schematic diagram of a topology identification architecture of an embodiment of the present disclosure. Referring to fig. 1, the topology identification architecture 100 can include a server 110, a terminal 120, and a network 130 that provides communication links. The server 110 and the terminal 120 may be connected through a wired or wireless network 130. The server 110 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, security services, CDNs, and the like.
The terminal 120 may be a hardware or software implementation. For example, when the terminal 120 is a hardware implementation, it may be a variety of electronic devices having a display screen and supporting page display, including but not limited to smartphones, tablets, e-book readers, laptop and desktop computers, and the like. When the terminal 120 is implemented in software, it may be installed in the above-listed electronic device; it may be implemented as a plurality of software or software modules (e.g., software or software modules for providing distributed services) or as a single software or software module, without limitation.
It should be noted that, the topology identification method provided in the embodiment of the present application may be executed by the terminal 120 or may be executed by the server 110. It should be understood that the number of terminals, networks, and servers in fig. 1 are illustrative only and are not intended to be limiting. There may be any number of terminals, networks, and servers, as desired for implementation.
Fig. 2 shows a schematic hardware structure of an exemplary electronic device 200 provided by an embodiment of the disclosure. As shown in fig. 2, the electronic device 200 may include: processor 202, memory 204, network module 206, peripheral interface 208, and bus 210. Wherein the processor 202, the memory 204, the network module 206, and the peripheral interface 208 are communicatively coupled to each other within the electronic device 200 via a bus 210.
The processor 202 may be a central processing unit (Central Processing Unit, CPU), topology identifier, neural Network Processor (NPU), microcontroller (MCU), programmable logic device, digital Signal Processor (DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits. The processor 202 may be used to perform functions related to the techniques described in this disclosure. In some embodiments, processor 202 may also include multiple processors integrated as a single logic component. For example, as shown in fig. 2, the processor 202 may include a plurality of processors 202a, 202b, and 202c.
The memory 204 may be configured to store data (e.g., instructions, computer code, etc.). As shown in fig. 2, the data stored by the memory 204 may include program instructions (e.g., program instructions for implementing the topology identification method of embodiments of the present disclosure) as well as data to be processed (e.g., the memory may store configuration files of other modules, etc.). The processor 202 may also access program instructions and data stored in the memory 204 and execute the program instructions to perform operations on the data to be processed. The memory 204 may include volatile storage or nonvolatile storage. In some embodiments, memory 204 may include Random Access Memory (RAM), read Only Memory (ROM), optical disks, magnetic disks, hard disks, solid State Disks (SSD), flash memory, memory sticks, and the like.
The network module 206 may be configured to provide communications with other external devices to the electronic device 200 via a network. The network may be any wired or wireless network capable of transmitting and receiving data. For example, the network may be a wired network, a local wireless network (e.g., bluetooth, wiFi, near Field Communication (NFC), etc.), a cellular network, the internet, or a combination of the foregoing. It will be appreciated that the type of network is not limited to the specific examples described above. In some embodiments, network module 306 may include any combination of any number of Network Interface Controllers (NICs), radio frequency modules, receivers, modems, routers, gateways, adapters, cellular network chips, etc.
Peripheral interface 208 may be configured to connect electronic device 200 with one or more peripheral devices to enable information input and output. For example, the peripheral devices may include input devices such as keyboards, mice, touchpads, touch screens, microphones, various types of sensors, and output devices such as displays, speakers, vibrators, and indicators.
Bus 210 may be configured to transfer information between the various components of electronic device 200 (e.g., processor 202, memory 204, network module 206, and peripheral interface 208), such as an internal bus (e.g., processor-memory bus), an external bus (USB port, PCI-E bus), etc.
It should be noted that, although the architecture of the electronic device 200 described above only shows the processor 202, the memory 204, the network module 206, the peripheral interface 208, and the bus 210, in a specific implementation, the architecture of the electronic device 200 may also include other components necessary to achieve normal execution. Furthermore, those skilled in the art will appreciate that the architecture of the electronic device 200 may also include only the components necessary to implement the embodiments of the present disclosure, and not all of the components shown in the figures.
With the continuous development of the power system, the scale of the power grid plant is continuously enlarged, and the complexity of the electric wiring diagram is also continuously increased. The method for accurately and rapidly identifying the topological relation of the electric wiring diagram of the power grid plant has important significance for the stability, safety, reliability and intelligent realization of the power system. However, the existing electrical wiring diagram topology relation identification method mainly depends on manual operation, is low in efficiency and easy to make mistakes, cannot realize automatic and efficient identification, and greatly restricts the development of the power industry.
The existing pattern matching points corresponding to the electrical graphic symbols in the electrical wiring diagram are searched based on the image processing and pattern recognition technology, the category of the electrical graphic symbols can be determined by comparing the similarity between the image blocks represented by the matching points and the standard image of the graphic symbols, and the connection relation of the graphic symbols is further determined based on the endpoint distance of the graphic symbols, so that the construction of the electrical wiring diagram corresponding to the original topology is realized. The power equipment graphic elements to be identified on the image are various in types, small in number of occupied pixels, different in size, dense in distribution and high in similarity among the power equipment graphic elements of different types, and the common visual detection model is difficult to apply to the detection task of the power equipment graphic elements of the power station. In addition, in a practical application scene, an image of an electric wiring diagram is stored into an image format in a scanning or screenshot mode, the problems of offset, distortion, blurring and the like possibly exist in the image, the image is uneven in resolution, the format of a lossy compressed image such as JPEG (joint photographic experts group) exists, a part of original information is lost, a large number of noise points exist at the edge of a connecting line in the image, and therefore the problems of connecting line missed detection, connecting line virtual connection, connecting line association errors of different colors and the like are very easy to occur. The power grid station wiring diagram is a complex network diagram, the power equipment primitives and the electrical connection lines are distributed very densely, the line-line intersections have different shapes such as arc shapes or connection points, the electrical connection lines comprise bus bars and common electrical connection lines, and different lines have specific shapes. In addition, there may be a wire frame formed by straight lines and marked with a specific group of graphics primitives in the electrical wiring diagram, which is difficult to distinguish from a common electrical connection wire. Therefore, accurate identification of the connection in the electrical wiring diagram of the plant has a high difficulty. Therefore, how to improve the efficiency of electrical connection topology identification and reduce the cost of computing resources is a technical problem to be solved.
In view of this, the embodiments of the present disclosure provide a method and related apparatus for identifying an electrical connection topology, by detecting primitives of an electrical connection diagram, separating connection lines of different colors based on a color space, and determining a target connection point, a target connection line, and a target connection relationship in combination with corner detection, thereby obtaining a target connection diagram. The automatic identification of the electric connection topology is realized, and the identification efficiency and accuracy are greatly improved. Meanwhile, the method has good universality and expansibility, can be suitable for wiring diagram drawings of power grid stations of different types, and provides powerful technical support for automation and intellectualization of a power system.
Referring to fig. 3, fig. 3 shows a schematic flow chart of a topology identification method according to an embodiment of the present disclosure. The topology identification method according to the embodiment of the disclosure can be deployed on a server side or a client side. In fig. 3, the topology identification method 300 may further include the following steps.
In step S310, an electrical wiring diagram to be identified is acquired.
The electrical wiring diagrams to be identified may refer to electrical wiring diagrams, for example, power grid station wiring diagrams, whose electrical topology needs to be identified.
In step S320, a graphic element in the electrical wiring diagram to be identified is detected.
In some embodiments, detecting the graphical element in the electrical wiring diagram to be identified comprises: and detecting the graphic element in the electrical wiring diagram to be identified based on a graphic element detection network.
Wherein the primitive detection network may be used to detect primitives. Specifically, the primitive detection network may train the initial neural network based on primitive training data to obtain a trained primitive detection network. Compared with the traditional image target detection task, the resolution ratio of the station wiring diagram is higher, the number of pixels occupied by the power equipment primitives to be identified is less, the distribution is more dense, and the similarity among the power equipment primitives of different types is higher. The graphic primitive detection network can identify graphic primitives by using a YOLTv4 model, the YOLTv4 model is mainly used for detecting objects in aviation or satellite images, and the power grid station wiring diagram power equipment graphic primitive identification task is a high-resolution image multi-target multi-category target detection task similar to satellite image target detection, so that the accurate identification of the power equipment graphic primitives on the wiring diagram can be realized by using a YOLTv4 algorithm, and the identification requirement is met. And each electrical wiring diagram image can be provided with a plurality of different types of electrical equipment graphic elements, each electrical equipment graphic element can be provided with a plurality of electrical equipment graphic elements on the same image, and image marking software such as ImgLab is used for marking the graphic elements on the image to obtain the positions of the graphic elements on the image and the types of the graphic elements, so that the electrical wiring diagram is used for training, verifying and testing a YOLTv4 model. Because the resolution of the image is higher and the sizes are different, the YOLTv4 model can set a sliding window to cut the power grid station wiring diagram, a certain overlapping area is needed when the sliding window is cut, because if one image element is just at the edge of the sliding window and is cut into 2 blocks, the image element is more difficult to identify due to fewer pixels occupied by the image element, each cut sub-image is subjected to target detection, and the detection results of all the sub-images are combined. The YOLTv4 model may employ NMS (non-maximal suppression algorithm) filtering to handle duplicate detected targets, but when there are multiple target overlap phenomena, the NMS algorithm may prune out the predicted box that is otherwise less confidence, but represents another target (due to the excessive overlap area with the highest confidence box). Therefore, the YOLTv4 model can also replace the NMS algorithm to merge the detection results by a weighted frame fusion algorithm (WBF, weighted Boxes Fusion), the WBF uses all prediction frames to perform weighted fusion, updates one fusion frame at each step, uses it to check the overlap with the next prediction frame, and finally obtains the accurate position and category of the electrical wiring diagram power equipment graphic element. Further, the identified power equipment primitives may be removed from the electrical wiring diagram image for further operation.
In step S330, the connection lines with different colors in the electrical wiring diagram to be identified are segmented to obtain line segments with different colors.
Wherein, because the crossing points of the connecting lines with different colors are not communicated, the connecting lines with different colors can be separated first. The connection line separation of different colors can be performed based on the LAB color space and the adaptive color segmentation algorithm of DBSCAN. In the LAB color space, L represents brightness, A represents components from green to red, B represents components from blue to yellow, and L represents brightness, A represents components from green to red, A represents components from blue to yellow, and B represents components from blue to yellow, wherein the LAB color space is a color model based on physiological characteristics, is more in line with the human visual principle, and is more suitable for the color segmentation task of the wiring diagram of the power grid plant.
In some embodiments, the dividing the connecting lines with different colors in the electrical wiring diagram to be identified to obtain line segments with different colors includes:
converting the electrical wiring diagram to be identified into a first wiring diagram with a white background;
judging whether the first wiring diagram can be regarded as a gray image or not;
converting the intermediate wiring diagram into a second wiring diagram in LAB color space in response to the first wiring diagram failing to be considered a grayscale image;
Performing spatial clustering based on non-background color pixel points in the second wiring diagram to obtain a clustering result;
and dividing connecting lines with different colors in the electrical wiring diagram to be identified based on the clustering result to obtain line segments with different colors.
In some embodiments, determining whether the first wiring diagram can be considered a grayscale image includes:
acquiring RGB values of three color channels of each pixel point of the first wiring diagram;
calculating the difference variance of each color channel based on the difference value between every two color channels in the RGB values;
obtaining an average value of the difference variances based on the difference variances of each color channel;
judging whether the average value is smaller than a preset value or not;
and determining that the first wiring diagram cannot be regarded as a gray image in response to the average value being greater than or equal to the preset value.
Specifically, the dividing of the connection lines of different colors in the electrical wiring diagram to be identified may include:
step one: and converting the electrical wiring diagram to be identified into a first wiring diagram with a white background. For example, the image of the electrical wiring diagram to be identified can be converted from an RGB color image to a gray level image, the color histogram is utilized to calculate the main color of the gray level diagram, and if the main color is near black, i.e. the background is near black, the original RGB color image is subjected to color inversion to be changed into an RGB color image with a near white background; if the background is near white, the original RGB color image is kept unchanged, so that all RGB color images are converted into the RGB color image with the background near white.
And step two, judging whether the first wiring diagram of the white background can be regarded as a gray level image. For example, R, G, B values of each pixel in the RGB color image are extracted to form (R, G, B) value pairs, the difference between the three values of each pixel on the first wiring diagram, that is, (R-G), (G-B), and (B-R) difference is calculated, for each difference, the variance of the difference is calculated for all pixels on the first wiring diagram, so as to obtain three variances, and an average value of the three variances is calculated, if the value is lower than 15, the first wiring diagram image of the color is considered to be a gray image, color segmentation is not performed, and the process is directly ended, otherwise, the process goes to the next step.
In order to reduce the algorithm time complexity and reduce the color search space, the first wiring diagram of the RGB color is compressed to 512×256, then the first wiring diagram of the RGB color is converted into the second wiring diagram under the LAB color space, then the positions, with the pixel value lower than 200, in the gray image corresponding to the first wiring diagram of the RGB color are extracted, are considered to belong to non-background pixel points, L, A, B values of the positions in the LAB color image are extracted, if the L value is greater than 15 and less than 95, and the a value or the B value is greater than 12, the pixel point is considered to be color, that is, the pixel point is not white, black or gray, the a value and the B value on the pixel point considered to be color are combined into a value pair (a, B), the whole image (a, B) value pair set is obtained, the a is considered as the abscissa, and the B is considered as the ordinate, so that the pixel value of the non-background color pixel point in the LAB color image is converted into a circle with the (0, 0) as the dot and the radius of 128. This converts the color segmentation problem into a clustering problem of points on a circle.
And step four, a density-based spatial clustering algorithm (DBSCAN) algorithm defines clusters as the maximum set of points with density connection, and discovers clusters with any shape in a digital space with noise, wherein the algorithm is an unsupervised machine learning clustering algorithm, so that data can be adaptively classified on the premise of not knowing the number of categories, the (A, B) numerical value pair set obtained in the step three is sent into the DBSCAN algorithm, and therefore the circle nodes obtained in the step three are classified, so that the approximate color category and the (A, B) numerical value pair range corresponding to each color on an image are obtained.
And step five, extracting images with corresponding colors from the color images obtained in the step one according to the color category and the LAB space range of each color extracted in the step four, so as to realize the self-adaptive color segmentation of the power grid station wiring diagram. In particular, a color image is considered to be black if the L value of a certain pixel is less than 15, white if the L value of a certain pixel is greater than 95, and gray if the a value and B value of a certain pixel are less than 12.
In step S340, a corner point in the electrical wiring diagram to be identified is detected, and a target connection point, a target connection line, and a target connection relationship are determined based on the corner point and the line segments of different colors.
In some embodiments, detecting a corner point in the electrical wiring diagram to be identified, and determining a target connection point, a target connection line, and a target connection relationship based on the corner point and the different color line segments, includes:
converting the electrical wiring diagram to be identified into a binary diagram;
detecting pixel level corner points obtained by the binary image based on a corner detection network, and extracting sub-pixel level corner points from the pixel level corner points to obtain connection points;
pixel-by-pixel scanning is performed along the up-down, left-right and up-down directions based on the connection points so as to determine connection lines between the connection points and obtain a connection line set;
combining the connection points belonging to the same cluster based on the colors corresponding to the connection lines and the distances between the connection points related to the connection lines to obtain a first connection point; the colors corresponding to the connecting lines are determined based on the line segments with different colors;
and based on the fact that the first connecting points are only connected with the adjacent second connecting points, and the connecting lines between the first connecting points and the second connecting points are on the same straight line, combining the connecting lines between the first connecting points and the second connecting points, removing the first connecting points, and obtaining the target connecting points, the target connecting lines and the target connecting relation.
In some embodiments, merging the connection points belonging to the same cluster based on the color corresponding to the connection line and the distance between the connection points related to the connection line to obtain a first connection point, including:
judging whether the distance between two connection points is smaller than a preset threshold value or not, and judging whether pixel points on a line segment between the two connection points are white or not;
determining that the two connection points belong to the same cluster in response to the fact that the distance between the two connection points is smaller than the preset threshold value and the pixel points on the line segment between the two connection points are all white;
merging the two connection points belonging to the same cluster;
and determining the combined connection point as the first connection point.
In some embodiments, the method 300 further comprises:
identifying a busbar in the target connection line, comprising:
virtually merging target connecting lines connected in the same direction to obtain merged connecting lines, and determining the center point coordinates of the merged connecting lines;
for a transverse merging connecting line, scanning along an upper direction and a lower direction based on the coordinates of the central point until a black pixel point is encountered, and adding scanning distances to obtain the width of the merging connecting line;
for a longitudinal merging connecting line, scanning along the left direction and the right direction based on the coordinates of the central point until encountering a black pixel point, and adding scanning distances to obtain the width of the merging connecting line;
Classifying the combined connecting lines according to the widths of the combined connecting lines, and determining the combined connecting lines with the widths larger than or equal to a preset width as candidate buses;
judging whether the two ends of the connecting wire of the candidate bus are provided with the graphic elements or not, and whether the candidate bus is provided with an external connecting wire or not;
determining the candidate bus as a bus in response to the fact that no primitive exists at two ends of a connecting line of the candidate bus and an external connecting line exists;
replacing the bus with a bus pattern element;
calculating the distance between each target connection point in the target connection line and all the primitives;
and determining that the primitive is connected with the target connection point in response to the fact that the primitive is nearest to the target connection point and the distance between the primitive and the target connection point is smaller than a preset distance, so as to obtain the target connection relation.
Specifically, detecting the corner point in the electrical wiring diagram to be identified, and determining the target connection point, the target connection line and the target connection relationship based on the corner point and the line segments with different colors may include:
and step A, converting the electric wiring diagram to be identified into a binary diagram of black matrix and white character, and converting the broken line in the connecting line into a solid line by utilizing a closing operation. The pixel level corner can be detected by using a Shi-Tomasi corner detection algorithm, and sub-pixel level corners can be extracted on the basis of the detection algorithm. In order to facilitate the next operation, an expansion operation is required for the image at this time, deepening the connecting line width.
And B, taking the sub-pixel level corner points as connection points, starting from each connection point, scanning the sub-pixel level corner points in the directions of up, down, left and right, and judging whether another connection point exists in the neighborhood of the pixel point every time the sub-pixel level corner points reach one pixel point, wherein if the sub-pixel level corner points exist and the pixel points of the straight line between the connection point and the initial connection point are white, the connection line exists between the connection points. The connecting lines obtained by scanning in the up-down direction are longitudinal connecting lines, the connecting lines obtained by scanning in the left-right direction are transverse connecting lines, if no other connecting point exists, whether the pixel point is white or not is judged, if the pixel point is white, the scanning in the original direction is continued, when the black pixel point is encountered or the image boundary is exceeded, the connecting lines are not recognized, the scanning is stopped, and the operation is performed on all the obtained connecting points, so that a preliminary connecting line set is obtained. Because of reasons of uneven image quality, thicker connecting lines and the like, the positions of corner detection are inaccurate, a large number of redundant corner points can be obtained, the connecting lines obtained at the moment can be overlapped, one connecting line is divided into a plurality of connecting lines and the like, and further optimization is needed.
And C, further optimizing by reducing connection points and combining connection lines. For example: 1) Judging whether the distance between two connection points is smaller than a certain threshold value and whether pixel points on a straight line between the two connection points are white, if so, proving that the two connection points belong to the same cluster, finding out clusters to which all the connection points belong by using a union searching algorithm, wherein the connection points belonging to the same cluster can be regarded as the same connection point, the coordinates of the connection points are set as the coordinates of a cluster central point, and all connection points connected with the cluster connection points in the obtained connection lines are redirected to be connected with the central point; 2) Judging whether each connecting point is between two connecting points or not, wherein the connecting points are only connected with the two connecting points, the formed connecting lines are transverse or longitudinal, if the connecting points are all satisfied, two connecting lines which are proved to be connected with the connecting points can be combined into one connecting line, the connecting points can be deleted, and the condition that one connecting line is divided into a plurality of connecting lines can be removed by executing the operation on each connecting point, so that an optimized connecting line set is obtained.
Step D, bus identification: after the optimized connecting line set is obtained, the connecting lines which belong to buses are required to be identified and extracted, connecting lines connected in the same direction are temporarily combined, the central point coordinates of the combined connecting lines are found, for transverse connecting lines, scanning is carried out in the upper and lower directions from the central point coordinates until a black pixel point is encountered, the scanning distance is added to the width of the connecting line, for longitudinal connecting lines, scanning is carried out in the left and right directions from the central point coordinates until the black pixel point is encountered, the scanning distance is added to the width of the connecting line, all the connecting line widths are obtained, the connecting lines are classified according to the width, whether the two ends of the connecting line of the suspected bus are provided with the graphics primitive or not is judged, whether the connecting line is externally provided with the graphics primitive or not is judged, and the bus is determined if the graphics primitive is not externally provided with the connecting line.
In step S350, a target wiring diagram is obtained based on the primitive, the target connection point, the target connection line and the target connection relationship.
Specifically, step E may further include following step D: and C, deleting the part belonging to the bus from the connecting line obtained in the step, regarding the bus as a special graphic element, calculating the distance between each connecting point and all graphic elements in the connecting line, if a graphic element is closest to the connecting point and the distance is smaller than a certain threshold value, considering that the graphic element is connected with the connecting point, and obtaining the connection relation between the graphic element and the connecting point and between the connecting point and the connecting point on each image after color segmentation.
In summary, the method of the embodiment of the disclosure may detect the power equipment graphic element of the plant-to-plant wiring diagram based on the YOLTv4 and WBF models, then adaptively segment the power grid plant-to-plant wiring diagram based on the LAB color space and the DBSCAN, separate the connecting lines with different colors, detect the connecting lines in the wiring diagram based on the corner detection and the graphic algorithm, distinguish the bus in the connecting lines according to the expert experience and the thickness of the connecting lines, regard the bus as a special graphic element, finally confirm the connection relationship of the plant-to-plant wiring diagram according to the distance between the graphic element and the connecting lines, obtain the XML file representing the topological relationship of the electrical wiring diagram, and finally display the identification result in a visual manner. And displaying the identification result in a visual mode according to the XML file to form a power grid station wiring diagram. The method specifically comprises drawing of the power equipment primitives and connecting lines, display of connection relations among the power equipment primitives and the like. The automatic identification of the electric connection topology is realized, and the identification efficiency and accuracy are greatly improved. Meanwhile, the method has good universality and expansibility, can be suitable for wiring diagram drawings of power grid stations of different types, and provides powerful technical support for automation and intellectualization of a power system.
It should be noted that the method of the embodiments of the present disclosure may be performed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scene, and is completed by mutually matching a plurality of devices. In the case of such a distributed scenario, one of the devices may perform only one or more steps of the methods of embodiments of the present disclosure, the devices interacting with each other to accomplish the methods.
It should be noted that the foregoing describes some embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Based on the same technical concept, corresponding to the method of any embodiment described above, the present disclosure further provides an identification device of an electrical wiring topology, referring to fig. 4, including:
The acquisition module is used for acquiring an electrical wiring diagram to be identified;
the primitive module is used for detecting primitives in the electrical wiring diagram to be identified;
the segmentation module is used for segmenting the connecting lines with different colors in the electrical wiring diagram to be identified to obtain line segments with different colors;
the identification module is used for detecting angular points in the electrical wiring diagram to be identified and determining target connection points, target connection lines and target connection relations based on the angular points and the line segments with different colors;
and the target wiring module is used for obtaining a target wiring diagram based on the graphic element, the target connection point, the target connection line and the target connection relation.
For convenience of description, the above devices are described as being functionally divided into various modules, respectively. Of course, the functions of the various modules may be implemented in the same one or more pieces of software and/or hardware when implementing the present disclosure.
The device of the foregoing embodiment is configured to implement the corresponding topology identification method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Based on the same technical concept, corresponding to any of the above embodiment methods, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the topology identification method according to any of the above embodiments.
The computer readable media of the present embodiments, including both permanent and non-permanent, removable and non-removable media, may be used to implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device.
The storage medium of the foregoing embodiments stores computer instructions for causing the computer to perform the topology identification method described in any of the foregoing embodiments, and has the advantages of the corresponding method embodiments, which are not described herein.
Those of ordinary skill in the art will appreciate that: the discussion of any of the embodiments above is merely exemplary and is not intended to suggest that the scope of the disclosure, including the claims, is limited to these examples; the technical features of the above embodiments or in the different embodiments may also be combined under the idea of the present disclosure, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in details for the sake of brevity.
Additionally, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures, in order to simplify the illustration and discussion, and so as not to obscure the embodiments of the present disclosure. Furthermore, the devices may be shown in block diagram form in order to avoid obscuring the embodiments of the present disclosure, and this also accounts for the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform on which the embodiments of the present disclosure are to be implemented (i.e., such specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the disclosure, it should be apparent to one skilled in the art that embodiments of the disclosure can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative in nature and not as restrictive.
While the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of those embodiments will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
The disclosed embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Accordingly, any omissions, modifications, equivalents, improvements, and the like, which are within the spirit and principles of the embodiments of the disclosure, are intended to be included within the scope of the disclosure.