Automatic checking method, device and equipment for wiring diagram of power grid plant station and storage medium

By combining edge detection and multiple verification technologies, the power grid plant wiring diagram is accurately segmented and verified, which solves the problem of insufficient recognition accuracy in existing technologies, realizes automated full-process verification, and improves the recognition accuracy and work efficiency of the power grid plant wiring diagram.

CN120823615APending Publication Date: 2025-10-21BEIJING YISOFT TECH CO LTD

Patent Information

Application Number
CN202510979670.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-16
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

In the existing technology, during the automatic recognition process of power grid wiring diagrams, the accuracy of target recognition, text recognition, and topology recognition is insufficient, and manual comparison is required to detect abnormal parts, resulting in a large workload and easy omissions.

Method used

An edge detection algorithm is used to segment the power grid station wiring diagram. Combined with text recognition verification technology, primitive feature matching verification technology, and topological connection relationship verification technology, the recognition results of multiple segmented parts are verified separately. The accuracy of text recognition is improved through language model and dictionary matching. The primitive feature matching algorithm and graph theory are used to analyze the topological connection relationship to achieve all-round verification.

Benefits of technology

It significantly improves the overall recognition accuracy of power grid plant wiring diagrams, reduces recognition errors, realizes the automation of the entire process from image segmentation to abnormal part correction, shortens the verification time, and improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120823615A_ABST
    Figure CN120823615A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition, and discloses an automatic checking method, device and equipment for a power grid plant station wiring diagram and a storage medium, and the method comprises the steps: carrying out the image segmentation of a pre-obtained power grid plant station wiring diagram based on an edge detection algorithm, and obtaining a plurality of segmentation parts corresponding to the power grid plant station wiring diagram; a character recognition checking technology, a primitive feature matching checking technology and a topological connection relation checking technology are adopted to carry out recognition result checking on the multiple segmented parts, and abnormal recognition parts are obtained; and correcting the abnormal identification part to obtain an automatic identification result corresponding to the power grid plant station wiring diagram. Compared with a single checking technology, the overall recognition accuracy of the power grid plant station wiring diagram can be remarkably improved, recognition errors caused by manual or simple technologies are reduced, and full-process automation from picture segmentation, recognition result checking to abnormal part correction is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a method, device, equipment and storage medium for automatically checking a power grid plant wiring diagram. Background Art

[0002] Currently, the automatic recognition of power grid wiring diagrams still has some shortcomings. The accuracy of object recognition, text recognition, and topology recognition still needs to be further improved. Manual comparison is required to identify abnormal parts, which is labor-intensive and prone to omissions. Therefore, an automatic verification method for artificial intelligence recognition of power grid wiring diagrams is urgently needed to automatically verify abnormal parts. Summary of the Invention

[0003] In view of this, the present invention provides a method, device, equipment and storage medium for automatically checking the wiring diagram of a power grid plant station to solve the problem in the prior art that abnormal parts in the identification results of the wiring diagram of a power grid plant station cannot be automatically checked.

[0004] In a first aspect, the present invention provides a method for automatically checking a power grid plant wiring diagram, the method comprising:

[0005] Perform image segmentation on the pre-acquired power grid plant wiring diagram based on the edge detection algorithm to obtain multiple segmented parts corresponding to the power grid plant wiring diagram;

[0006] The recognition results of multiple segmented parts are verified by using text recognition verification technology, primitive feature matching verification technology and topological connection relationship verification technology respectively, and the abnormal parts are identified;

[0007] Correct the abnormal parts of the recognition and obtain the automatic recognition results corresponding to the power grid plant wiring diagram.

[0008] The present invention provides an automatic verification method for power grid plant wiring diagrams. The image segmentation technology based on edge detection can divide the power grid plant wiring diagram into multiple parts according to its characteristics, thereby achieving precise segmentation. Multiple technologies work together to comprehensively verify the recognition results from different levels. Compared with a single verification technology, the method can significantly improve the overall recognition accuracy of power grid plant wiring diagrams, reduce recognition errors caused by manual or simple technologies, and realize full process automation from image segmentation, recognition result verification to abnormal part correction. Through the automatic execution of algorithms and technologies, a large number of wiring diagrams can be processed quickly, which greatly shortens the verification time, improves work efficiency, and solves the problem that the existing technology cannot automatically verify the abnormal parts in the recognition results of power grid plant wiring diagrams.

[0009] In an optional embodiment, the pre-acquired power grid plant wiring diagram is segmented based on an edge detection algorithm to obtain multiple segmented parts corresponding to the power grid plant wiring diagram, including:

[0010] Perform image preprocessing such as denoising, smoothing and enhancement on the pre-acquired power plant wiring diagram;

[0011] The edge detection algorithm is used to detect the edge of the power grid wiring diagram after image preprocessing to obtain edge points;

[0012] Connect edge points into continuous edge curves or edge contours;

[0013] The power grid plant connection diagram is segmented into different regions based on edge contours, and the power grid plant connection diagram corresponds to multiple segmented parts.

[0014] The present invention provides an automatic verification method for a power grid plant wiring diagram, which performs denoising, smoothing and enhancement processing on the power grid plant wiring diagram, effectively improving the quality of the original image, and adopts an edge detection algorithm to process the pre-processed image, which can accurately locate the boundaries of different areas in the image, connect the edge points into continuous edge curves or edge contours, and effectively solve the problem of edge breakage that may occur during the edge detection process. The wiring diagram is divided into different areas based on the edge contour, making full use of the structural characteristics of the wiring diagram. Different components, lines, and text annotations in the power grid plant wiring diagram have their own unique contour shapes. By segmenting through the edge contour, parts with similar characteristics can be divided into the same area, realizing accurate segmentation of the power grid plant wiring diagram.

[0015] In an optional embodiment, the multiple segmented parts include a text part, a graphic element part, and a topological connection relationship part;

[0016] The power grid plant wiring diagram is segmented into different areas based on edge contours. The power grid plant wiring diagram corresponds to multiple segmented parts, including:

[0017] Based on the edge contour, morphological operations are used to determine the text block containing the text area. Based on the edge contour features in the text block, the area that meets the text characteristics is screened out, and the text area is segmented from the overall power grid station wiring diagram to obtain the text part.

[0018] A contour matching algorithm is used to match the edge contour with the pre-established primitive template. Based on the preset matching threshold, the contours belonging to each primitive are screened out and the contours of each primitive are segmented from the overall power grid station wiring diagram to obtain the primitive part.

[0019] Determine the line edges in the edge contour, use Hough transform to convert the line edges in the image space to the parameter space, detect straight lines and curves, and use straight lines and curves as connecting lines between primitives. Based on graph theory, regard primitives as nodes and connecting lines as edges, construct an undirected graph model, and analyze the connection properties of nodes and edges based on the undirected graph model to obtain the topological connection relationship part.

[0020] The present invention provides an automatic verification method for power grid station wiring diagrams. The method determines text blocks based on morphological operations, utilizes the characteristics of dense and compact strokes of text, and aggregates scattered text pixels into complete text areas through morphological operations such as expansion and corrosion, effectively enhancing the connectivity of text areas and avoiding missed detection of text due to adhesion or breakage. Combined with edge contour feature screening, the method accurately identifies areas that meet text characteristics (such as specific aspect ratios and stroke distribution patterns) from text blocks, clearly distinguishes text from background and other graphic elements, overcomes the problem of poor adaptability of traditional text segmentation to complex backgrounds, and can accurately extract text information of various fonts, sizes, and layouts in power grid station wiring diagrams. The method uses a contour matching algorithm to compare with a pre-established graphic element template library, utilizes the characteristics of fixed shapes and clear structures of power grid station graphic elements, and can quickly and accurately identify various graphic elements. The graphic element contours are screened by a preset matching threshold, which not only ensures the accuracy of graphic element recognition, but also effectively eliminates background interference and misjudged contours of similar shapes, ensuring that each graphic element contour is complete and independently segmented. Using the Hough transform to convert line edges from image space to parameter space, the method effectively detects all types of straight lines and curves in wiring diagrams, reliably extracting line information even in the presence of noise, blurred lines, or broken lines. Integrating graph theory to construct an undirected graph model, abstracting graph elements as nodes and connecting lines as edges, the method systematically analyzes the connection properties of nodes and edges to accurately restore the topological connectivity of power plant wiring diagrams.

[0021] In an optional embodiment, the recognition results of the multiple segmented parts are verified by using a text recognition verification technology, a primitive feature matching verification technology, and a topological connection relationship verification technology, respectively, to obtain the recognition abnormal parts, including:

[0022] Use text recognition and verification technology to verify the text recognition results of the text part to obtain the abnormal text part;

[0023] Use the primitive feature matching verification technology to verify the primitive recognition results and obtain the abnormal part of the primitive;

[0024] The topological connection relationship verification technology is used to verify the topological connection relationship recognition results of the topological connection relationship part to obtain the topological connection relationship abnormal part.

[0025] This invention provides an automatic verification method for power grid wiring diagrams. Three verification techniques are used to perform specialized checks on text, graphic elements, and topological connections, forming a complete and comprehensive verification system. Text verification ensures the accuracy of annotation information, graphic element verification ensures the correct correspondence between equipment graphics, and topological connection verification ensures the correctness of line connection logic. These three methods complement and work together to achieve a comprehensive inspection of power grid wiring diagrams, from text to graphics, and from local to global perspectives.

[0026] In an optional embodiment, the text recognition verification technology includes a recognition verification technology using a language model and dictionary matching, and the text recognition verification technology is used to verify the text recognition results of the text portion to obtain the abnormal text portion, including:

[0027] Extracting a text sequence from the text recognition result to be verified;

[0028] The text sequence is input into the language model to obtain the text semantics and context information, and the conditional probability of each word in the text sequence in the context information is calculated. The probability of the text sequence is calculated based on the conditional probability of each word in the context information; when the probability of the text sequence is lower than the preset probability threshold, the text recognition result is judged to be erroneous and the abnormal part of the text is obtained; when the probability of the text sequence is equal to or higher than the preset probability threshold, the text recognition result is judged to be accurate;

[0029] At the same time, the dictionary matching recognition and verification technology is used to match the text sequence with the noun dictionary in the preset dictionary, the entered plant and station names, and the landmark names. The marginal distances between the text sequence and the noun dictionary in the preset dictionary, the entered plant and station names, and the landmark names are calculated, and the differences between the text sequence and the preset dictionary are identified to find out the erroneous text.

[0030] This invention provides a method for automatically verifying power grid wiring diagrams. The text recognition verification technology combines a language model with dictionary matching to achieve dual verification of text recognition results. The language model, trained on a large amount of text data, can evaluate the rationality of text sequences based on the statistical characteristics and semantic logic of the language, identifying erroneous content that does not conform to linguistic conventions or is expressed in specialized terminology. The dual verification mechanism covers multiple aspects, including semantics, grammar, and specialized vocabulary, significantly improving text recognition accuracy and ensuring that text annotations in wiring diagrams are consistent with actual power grid information, providing a reliable text information foundation for power grid operation and maintenance.

[0031] In an optional embodiment, the primitive feature matching verification technology is used to verify the primitive recognition result of the primitive part to obtain the abnormal primitive part, including:

[0032] Extracting primitive features from the primitive part, matching the primitive features with those in the power plant wiring diagram, obtaining the number and quality of matched feature points, and determining the similarity of the primitive verification results based on the number and quality of matched feature points;

[0033] When the similarity of the primitive verification result is lower than the preset similarity threshold, the primitive recognition result is judged to be wrong and the abnormal part of the primitive is obtained; when the similarity of the primitive verification result is equal to or higher than the preset similarity threshold, the primitive recognition result is judged to be accurate.

[0034] This invention provides a method for automatically verifying power grid wiring diagrams. The primitive feature matching verification technology utilizes advanced feature extraction algorithms to extract and match features between the original primitive and the recognized primitive image. These algorithms are capable of capturing primitive features such as shape, texture, scale, and rotation. Even when primitives are rotated, resized, or partially occluded in the wiring diagram, they can extract stable and discriminative feature vectors. By comparing the feature vectors of the original and recognized primitives and assessing image similarity based on the number and quality of matched feature points, the correctness of primitive recognition can be accurately determined.

[0035] In an optional embodiment, a topology connection relationship verification technology is used to verify the topology connection relationship recognition result of the topology connection relationship part to obtain the topology connection relationship abnormal part, including:

[0036] Extracting a topological connection relationship undirected graph model from the topological connection relationship identification results, and using a recursive algorithm to search for node matching between the undirected graph model and the undirected graph in the power grid plant connection diagram to obtain a node matching result;

[0037] Based on the node matching results, check whether the connection relationship of the edges in the undirected graph model and the undirected graph in the power grid plant wiring diagram is the same. If there is a node matching failure or the edge connection relationship is inconsistent, it is considered that the topological connection relationship identification result is wrong, and the abnormal part of the topological connection relationship is obtained; if all nodes and edges can be successfully matched and the connection relationship is consistent, the topological connection relationship identification result is considered accurate.

[0038] This invention provides a method for automatically verifying power grid wiring diagrams. The topology connection relationship verification technology constructs the original and identified wiring diagrams into an undirected graph model. Through a recursive node matching search, it deeply analyzes the connection relationships between graph elements. This technology can automatically identify complex topological structures in power grid wiring diagrams. Even in the presence of blurred lines, overlapping lines, and other conditions, it can accurately analyze the connection properties of nodes and edges using graph theory algorithms.

[0039] In a second aspect, the present invention provides an automatic verification device for a power grid plant wiring diagram, the device comprising:

[0040] An image segmentation module is used to segment the pre-acquired power grid plant wiring diagram based on edge detection to obtain multiple segmented parts corresponding to the power grid plant wiring diagram;

[0041] The segmentation part verification module is used to verify the recognition results of multiple segmentation parts using text recognition verification technology, primitive feature matching verification technology and topological connection relationship verification technology to obtain the abnormal parts;

[0042] The abnormal part correction module is used to correct the identified abnormal part and obtain the automatic recognition result corresponding to the power grid plant wiring diagram.

[0043] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to execute the method for automatically checking the wiring diagram of a power grid plant according to the first aspect or any corresponding embodiment thereof.

[0044] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for automatically checking the power grid plant wiring diagram according to the first aspect or any corresponding embodiment thereof.

[0045] In a fifth aspect, the present invention provides a computer program product comprising computer instructions for causing a computer to execute the method for automatically checking a power grid plant wiring diagram according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 1 is a flow chart of a method for automatically checking a power grid plant wiring diagram according to an embodiment of the present invention;

[0048] Figure 2 is a schematic flow chart of another method for automatically checking a power grid plant wiring diagram according to an embodiment of the present invention;

[0049] Figure 3 is a flow chart of another method for automatically checking a power grid plant wiring diagram according to an embodiment of the present invention;

[0050] Figure 4 is a structural block diagram of an automatic verification device for a power grid plant wiring diagram according to an embodiment of the present invention;

[0051] Figure 5 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0052] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0053] According to an embodiment of the present invention, an embodiment of a method for automatically checking a power grid plant wiring diagram is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0054] In this embodiment, a method for automatically checking a power grid plant wiring diagram is provided, which can be used for the above-mentioned computer equipment. Figure 1 FIG. 1 is a flow chart of a method for automatically checking a power grid plant wiring diagram according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0055] Step S101 : performing image segmentation on a pre-acquired power grid plant wiring diagram based on an edge detection algorithm to obtain a plurality of segmented parts corresponding to the power grid plant wiring diagram.

[0056] Specifically, the power grid plant wiring diagram is obtained by scanning or user uploading, and the power grid plant wiring diagram can be in PDF, PNG, JPG and other formats.

[0057] Edge detection algorithms are used to detect points within an image where brightness changes significantly. They are typically used to identify boundaries between objects or between an object and its background. These algorithms help extract structural information by identifying locations within an image where grayscale changes significantly. Edge detection algorithms, such as the Canny edge detection algorithm, can be used to segment a power grid wiring diagram to reveal multiple components, including text, primitives, and topological connections.

[0058] In step S102, the recognition results of the plurality of segmented parts are verified by using a text recognition verification technology, a primitive feature matching verification technology and a topological connection relationship verification technology respectively, and an abnormal part is obtained.

[0059] Specifically, for the text part, the text recognition verification technology is used to verify the text recognition results to obtain the abnormal text recognition part.

[0060] For the primitive part, the primitive feature matching verification technology is used to verify the primitive recognition results and obtain the abnormal part of primitive recognition.

[0061] For the topological connection relationship part, the topological connection relationship verification technology is used to verify the topological connection relationship identification results to obtain the abnormal part of the topological connection relationship identification.

[0062] Step S103 , correcting the abnormal part of the identification to obtain the automatic identification result corresponding to the power grid plant wiring diagram.

[0063] Specifically, the recognition anomalies are marked. If the matching rate exceeds a preset threshold, the recognition result is considered accurate; if the matching rate is lower than the threshold, the recognition result is considered to be erroneous. The accurate recognition parts are hidden, and the anomalies are displayed, prompting manual correction.

[0064] The matching rate refers to the accuracy probability of a text sequence and image similarity. An appropriate threshold is selected by analyzing the Levenshtein distance distribution of correctly matched string pairs in the training or test data. The average edit distance of all correctly matched string pairs is calculated and used as the threshold. The Levenshtein distance, also known as the edit distance, refers to the minimum number of single-character edit operations (including insertions, deletions, and substitutions) required to convert one string into another. It is used to measure the similarity between two strings, with smaller values ​​indicating higher similarity.

[0065] The automatic verification method of the power grid plant wiring diagram provided in this embodiment is based on the image segmentation technology of edge detection. It can divide the power grid plant wiring diagram into multiple parts according to its characteristics, realize accurate segmentation, and multiple technologies work together to verify the recognition results from different levels. Compared with a single verification technology, it can significantly improve the overall recognition accuracy of the power grid plant wiring diagram, reduce the recognition errors caused by manual or simple technology, and realize the full process automation from image segmentation, recognition result verification to abnormal part correction. Through the automatic execution of algorithms and technologies, a large number of wiring diagrams can be processed quickly, which greatly shortens the verification time, improves work efficiency, and solves the problem that the existing technology cannot automatically verify the abnormal parts in the recognition results of the power grid plant wiring diagram.

[0066] In this embodiment, a method for automatically checking a power grid plant wiring diagram is provided, which can be used for the above-mentioned computer equipment. Figure 2 FIG. 1 is a flow chart of a method for automatically checking a power grid plant wiring diagram according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0067] Step S201 : performing image segmentation on the pre-acquired power grid plant wiring diagram based on an edge detection algorithm to obtain a plurality of segmented parts corresponding to the power grid plant wiring diagram.

[0068] Specifically, the above step S201 includes:

[0069] Step S2011 , performing image preprocessing of denoising, smoothing and enhancing on the pre-acquired power grid plant wiring diagram.

[0070] Specifically, the specific steps for image preprocessing of denoising, smoothing and enhancement are as follows:

[0071] Denoising: A median filter algorithm is used to denoise power grid wiring diagrams. Median filtering effectively suppresses impulsive noise, such as salt and pepper noise, by replacing the value of each pixel in the image with the median of its neighboring pixels. When processing wiring diagrams, a 3×3 or 5×5 filter window is typically selected, depending on the image resolution and noise density. For example, for wiring diagrams with a resolution of 1024×768 and low noise, a 3×3 window allows for fast image processing while preserving image detail and avoiding the blurring of image edges caused by overly large filter windows.

[0072] Smoothing: Gaussian filtering is used to smooth images. Based on the Gaussian function, Gaussian filtering performs a weighted average on the image, bringing the values ​​of adjacent pixels closer together, thus achieving a smoothing effect. For wiring diagram processing, the size and standard deviation of the Gaussian kernel are adjusted based on the thickness and complexity of the primitive edges. For wiring diagrams with thicker lines and relatively simple structures, a 5×5 Gaussian kernel with a standard deviation of 1.0 can be used. For diagrams with finer lines and more complex structures, a 7×7 Gaussian kernel with a standard deviation of 1.5 may be required to smooth the image while preserving the key primitive features to the greatest extent possible.

[0073] Enhancement: Histogram equalization is used to enhance image contrast. This method redistributes the grayscale values ​​of image pixels to make the image's grayscale histogram as evenly distributed as possible, thereby improving the image's overall contrast. For wiring diagrams with dark areas that result in unclear element outlines, histogram equalization can effectively highlight element edges, making lines and text more legible. Furthermore, to avoid image distortion caused by over-enhancement, contrast-limited adaptive histogram equalization (CLAHE) can be combined to enhance local contrast while preventing noise amplification and loss of detail.

[0074] Step S2012: edge detection is performed on the power grid wiring diagram after image preprocessing using an edge detection algorithm to obtain edge points.

[0075] Specifically, before edge detection, the image is smoothed again using Gaussian filtering to further reduce the impact of noise on edge detection. The Gaussian kernel size and standard deviation can be fine-tuned according to the specific conditions of the image, and are generally similar to the smoothing parameters in the preprocessing stage.

[0076] Calculate the gradient magnitude and direction: Use the Canny operator to calculate the horizontal and vertical gradients of the image, and use the formula to calculate the gradient magnitude and direction. The gradient magnitude reflects the severity of the grayscale change of the pixel in the image, while the gradient direction indicates the direction of the edge.

[0077] Non-maximum suppression: Perform non-maximum suppression on the gradient amplitude image, retain the points with the local maximum gradient amplitude, refine the edge lines, remove false edges caused by noise or other factors, and make the edges more accurate.

[0078] The dual-threshold algorithm determines edges: two thresholds, high and low, are set. Pixels above the high threshold are directly determined as edge points; pixels below the low threshold are excluded; pixels between the high and low thresholds are retained as edge points if they are connected to the determined edge points, otherwise they are excluded, thereby effectively connecting broken edges and obtaining a complete and accurate set of edge points.

[0079] Step S2013: Connect the edge points into a continuous edge curve or edge contour.

[0080] Specifically, an edge connection algorithm based on distance and angle is used to connect discrete edge points into continuous edge curves or edge contours. The specific process is as follows:

[0081] Calculate the distance and angle between edge points: For every two adjacent edge points, calculate the Euclidean distance between them and the angle between the line connecting the two points and the horizontal direction.

[0082] Set connection thresholds: Based on the actual size and shape of the elements in the wiring diagram, set appropriate distance and angle thresholds. For example, if the smallest element in the wiring diagram is approximately 10 pixels long, set the distance threshold to 15 pixels. To account for variations in the direction of element lines, set the angle threshold to 30 degrees.

[0083] Connecting edge points: Traverse all edge points and connect adjacent edge points that meet the distance threshold and angle threshold conditions, gradually constructing a continuous edge curve or contour. For some complex primitives, there may be multiple edge branches. Backtracking and merging strategies are used to ensure that all related edge points are correctly connected to form a complete edge structure.

[0084] Step S2014 , segmenting the power grid plant connection diagram into different regions based on edge contours, corresponding to the plurality of segmented parts of the power grid plant connection diagram.

[0085] Specifically, contour analysis and classification involves analyzing connected edge contours and calculating geometric features such as perimeter, area, and shape complexity for each contour. These features are then used to classify contours. For example, circular or near-circular contours may correspond to circular primitives like transformers, rectangular contours may correspond to devices like circuit breakers, and thin, linear contours may represent power lines.

[0086] Region Segmentation: Based on the contour classification results, the wiring diagram is segmented into distinct regions. Nested contours, such as the winding contours within a transformer and the overall transformer contour, are segmented according to their hierarchical relationships to ensure that each region has independent and complete meaning. Furthermore, for text regions, morphological operations and text feature analysis are combined to segment the text separately, clearly distinguishing it from the primitive regions.

[0087] Region optimization: The segmented regions are optimized to remove areas that are too small or obviously noisy. Regions with blurred or inaccurate boundaries are corrected through morphological dilation, erosion, and other operations to make the boundaries of each segmented region clearer and more accurate. Ultimately, multiple segmented parts corresponding to the power grid station wiring diagram are obtained, including the text part, graphic element part, and topological connection relationship part.

[0088] In some optional implementations, the multiple segmented parts include a text part, a graphic element part, and a topological connection relationship part; the above step S2014 includes:

[0089] Step a1: determine the text block containing the text area using morphological operations based on edge contours, filter out the area that meets the text characteristics based on the edge contour features in the text block, and segment the text area from the overall power grid station wiring diagram to obtain the text part.

[0090] In some optional implementations, the above step a1 includes:

[0091] Step a11, morphological operation to determine the text block: perform a dilation operation on the edge contour image containing the text area. Select a rectangular structural element of size 3×3, and slide the structural element on the image to expand the edge of the text area outward, connect the originally separated text strokes, and enhance the connectivity of the text area. For example, for text with some strokes broken due to scanning, the dilation operation can effectively bridge the gap. Then perform the corrosion operation, also using a 3×3 rectangular structural element to remove excess noise and burrs outside the text area, making the boundary of the text block more regular. After multiple dilation-erosion alternating processes (generally 2-3 cycles), a complete and independent text block area is formed.

[0092] Step a12, filter the text area based on edge contour features: calculate the aspect ratio, compactness and other geometric features of each edge contour in the text block. The text contour usually has a high aspect ratio (generally between 2:1-5:1) and a low compactness (the contour shape is irregular and there are many bumps). At the same time, analyze the directional distribution of the contour. The stroke direction of the text area often has a certain regularity, such as being mainly horizontal or vertical. Set the aspect ratio threshold to 1.5-6, the compactness threshold to 0.3-0.7, and the direction consistency threshold to 80% (that is, 80% of the contour directions are concentrated in a specific interval), and filter out the contours that meet these text features to determine the accurate text area.

[0093] Step a13, Segmenting the Text: Using masking techniques, the outlines of the filtered text areas are converted into a binary mask image, with white areas representing the text and black areas representing the background. This mask is then logically ANDed with the original wiring diagram to isolate the text from the overall power plant wiring diagram, resulting in a clean text image for subsequent processing.

[0094] In step a2, a contour matching algorithm is used to match the edge contour with the pre-established primitive template. According to a preset matching threshold, the contours belonging to each primitive are screened out, and the contours of each primitive are segmented from the overall power grid plant wiring diagram to obtain the primitive part.

[0095] In some optional implementations, the above step a2 includes:

[0096] Step a21, building a primitive template library: Standard images of various primitives commonly found in power plant wiring diagrams (such as transformers, circuit breakers, and busbars) are collected. Edge detection is performed on each primitive image to extract its edge contour. Contour features (such as key point coordinates and curve parameters) are quantified and stored to form a primitive template library. Each template contains information such as the primitive's name, type, and feature description to facilitate subsequent matching.

[0097] Step a22, contour matching algorithm: A contour matching algorithm based on shape context is used. For the edge contour to be segmented, a shape context descriptor containing the distribution information of the surrounding points is constructed with each point on the contour as the center. The shape context descriptor of the contour to be segmented is compared with the descriptor of each primitive template in the template library, and the similarity metric between them is calculated (such as Euclidean distance, Bhattacharyya distance, etc.). The matching threshold is set to 0.7 (which can be adjusted according to actual needs). When the similarity metric is greater than this threshold, it is considered that the contour to be segmented successfully matches the corresponding template, that is, the contour belongs to the primitive.

[0098] Step a23, Segmenting Element Outlines: For successfully matched element outlines, polygonal approximation algorithms (such as the Douglas-Peucker algorithm) are used to simplify the outline curves, reducing the amount of data while preserving the key features of the outline. Then, using the outline's circumscribed rectangle or minimum enclosing polygon, the outline images of each element are segmented from the overall wiring diagram to obtain independent element parts, providing clear objects for subsequent element recognition verification.

[0099] Step a3: Determine the line edges in the edge contour, use Hough transform to convert the line edges in the image space to the parameter space, detect straight lines and curves, and use straight lines and curves as connecting lines between primitives. Based on graph theory, regard primitives as nodes and connecting lines as edges, construct an undirected graph model, and analyze the connection properties of nodes and edges based on the undirected graph model to obtain the topological connection relationship part.

[0100] In some optional implementations, the above step a3 includes:

[0101] Step a31, Identify Line Edges: Select long, thin linear edges from the edge contours. Initial screening can be performed by setting a contour length threshold (e.g., greater than 50 pixels) and a width threshold (e.g., less than 5 pixels). For line edges connected to primitive contours, further evaluation is performed based on their connection angle and positional relationship with the primitive. If the angle between the line and the primitive contour is close to 90 degrees and the connection point is located at the primitive boundary, the line is considered a connecting line edge.

[0102] Step a32, Hough transform detection of straight lines and curves: The filtered line edge image is converted into a binary image, with white representing the line edge and black representing the background. For straight line detection, a standard Hough transform algorithm is used to convert the straight lines in the image space into points in the Hough space. By counting the number of votes for each point in the Hough space, the parameters of the straight lines whose number of votes exceeds a threshold (such as 10) are determined, thereby detecting the straight lines in the image. For curve detection, an extended method of the Hough transform is used, such as the Hough circle transform to detect circular curves, or the spline-based Hough transform to detect complex curves. The detected straight lines and curves are used as connecting lines between primitives.

[0103] Step a33, constructing an undirected graph model and analyzing connection properties: the segmented graph elements are regarded as nodes of the undirected graph, the detected connecting lines are regarded as edges, each node is assigned a graph element type attribute (such as transformer node, circuit breaker node, etc.), and each edge is assigned attributes such as length and direction. Using the depth-first search (DFS) or breadth-first search (BFS) algorithm in graph theory, the entire undirected graph is traversed to analyze the node connectivity (the number of edges connected to the node), the edge weight (which can be set according to the line length or importance), and other connection properties. Through these analyses, a complete topological connection relationship is obtained, clearly presenting the connection logic between the various graph elements in the power grid station wiring diagram.

[0104] Step S202: Verify the recognition results of the multiple segmented parts using text recognition verification technology, primitive feature matching verification technology, and topological connection relationship verification technology to obtain the abnormal parts. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0105] Step S203: Correct the abnormal part of the identification to obtain the automatic identification result corresponding to the power grid plant wiring diagram. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0106] The automatic verification method for the power grid plant wiring diagram provided in this embodiment performs denoising, smoothing and enhancement processing on the power grid plant wiring diagram, effectively improving the quality of the original image, and adopts an edge detection algorithm to process the pre-processed image, which can accurately locate the boundaries of different areas in the image and connect the edge points into continuous edge curves or edge contours, effectively solving the problem of edge breakage that may occur during the edge detection process. The wiring diagram is divided into different areas based on the edge contour, making full use of the structural characteristics of the wiring diagram. Different components, lines, and text annotations in the power grid plant wiring diagram have their own unique contour shapes. By segmenting through the edge contour, parts with similar features can be divided into the same area, realizing accurate segmentation of the power grid plant wiring diagram.

[0107] In this embodiment, a method for automatically checking a power grid plant wiring diagram is provided, which can be used for the above-mentioned computer equipment. Figure 3 FIG. 1 is a flow chart of a method for automatically checking a power grid plant wiring diagram according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0108] Step S301: Segment the pre-acquired power grid plant wiring diagram based on an edge detection algorithm to obtain multiple segmented parts corresponding to the power grid plant wiring diagram. Figure 2 Step S201 of the illustrated embodiment will not be described in detail here.

[0109] In step S302, the recognition results of the plurality of segmented parts are verified by using a text recognition verification technology, a primitive feature matching verification technology and a topological connection relationship verification technology respectively, and an abnormal part is obtained.

[0110] Specifically, the above step S302 includes:

[0111] Step S3021: Use text recognition verification technology to verify the text part's text recognition results to obtain the abnormal text part.

[0112] In some optional implementations, the text recognition and verification technology includes a recognition and verification technology using a language model and dictionary matching, and the above step S3021 includes:

[0113] Step b1: extracting a text sequence from the text recognition result to be verified.

[0114] Specifically, from the text recognition results to be verified, continuous character sequences are extracted by line or region to form text segments. For power plant wiring diagrams, these segments may contain different types of text segments, such as equipment names, parameter values, and plant names. These segments need to be grouped and extracted based on semantic relevance.

[0115] Step b2: Input the text sequence into the language model to obtain the text semantics and context information, and calculate the conditional probability of each word in the text sequence in the context information. The probability of the text sequence is calculated based on the conditional probability of each word in the context information. When the probability of the text sequence is lower than the preset probability threshold, it is determined that there is an error in the text recognition result, and the abnormal part of the text is obtained; when the probability of the text sequence is equal to or higher than the preset probability threshold, the text recognition result is determined to be accurate.

[0116] In some optional implementations, the above step b2 includes:

[0117] Step b21, Model Selection and Input: Use a pre-trained BERT (Bidirectional Encoder Representations from Transformers) language model to segment the pre-processed text sequence and input it into the model. For the power grid sector, a domain-adapted model trained on a specialized power corpus can be used to enhance understanding of specialized terminology.

[0118] Step b22, acquiring semantic and contextual information: Using the multi-layer Transformer architecture of the BERT model, we obtain a contextual embedding representation for each word, capturing the deep semantics and contextual dependencies of the text. For example, the correlation between "voltage" and "transformer" in "busbar voltage transformer" is reflected in the embedding vector.

[0119] Step b23, conditional probability calculation: Based on BERT's Masked Language Model (MLM) mechanism, the conditional probability of each word in the text sequence in its context is calculated. For each word in the text sequence, it is masked, and the model predicts the word at that position, and obtains the predicted probability distribution. For example, for the text "Hehai Substation", after masking "dielectric", the model predicts that the probability of "dielectric" at that position is its conditional probability. Multiply the conditional probabilities of each word in the text sequence to obtain the probability of the entire text sequence. Since the conditional probability of a single word is usually small, multiplication may lead to numerical underflow. In actual calculations, the logarithmic probability summation method can be used instead of direct multiplication.

[0120] Step b24, Probability Threshold Setting and Comparison: According to the characteristics of texts in the power grid field and a large amount of test data, set an appropriate probability threshold (such as 0.01). If the probability of the text sequence is lower than this threshold, it is determined that there is an error in the text recognition result, and this text sequence is marked as the part with text anomalies. For example, if the probability of the recognition result "bus voltage transformer" is 0.005 (lower than the threshold), it is determined that there is an error. For the text sequences determined to be abnormal, further analyze the error types. By comparing the predicted probability distributions of each word, find the words with extremely low probabilities as possible error points. For example, if the probability of "voltage" in the model prediction is much lower than other words, locate "voltage" as the possible error character.

[0121] Step b3, At the same time, adopt the recognition verification technology of dictionary matching to match the text sequence with the noun dictionary, the entered substation names, and landmark names in the preset dictionary, calculate the marginal distances between the text sequence and the noun dictionary, the entered substation names, and landmark names in the preset dictionary respectively, identify the differences between the text sequence and the preset dictionary, and find the incorrect text.

[0122] In some optional implementation manners, the above step b3 includes:

[0123] Step b31, Construct the preset dictionary: Establish a noun dictionary containing power grid professional terms (such as "transformer", "circuit breaker"), enter known substation names (such as "River Sea Substation", "Jiangdong Converter Station") and landmark names (such as "Yangtze River Bridge", "Pearl River Road"). Each entry is marked with its type and standard spelling form.

[0124] Step b32, Marginal distance calculation: For each word in the text sequence, calculate its Levenshtein distance (edit distance) from each entry in the preset dictionary. The Levenshtein distance refers to the minimum number of edit operations (insertion, deletion, replacement) required to convert one string into another between two strings. For example, the Levenshtein distance between "River Sea Substation" and "River Sea Substation" is 1 (replace "Shen" with "Electric").

[0125] Step b33, Difference identification and error location: Set a distance threshold (such as 2). When the distance between the word in the text sequence and the dictionary entry is less than this threshold, it is considered that there may be a match. For the matching entries, analyze their difference points and determine the error types (such as character replacement, insertion, deletion). For example, if "bus voltage transformer" in the text sequence matches "bus voltage transformer" in the dictionary, by analyzing the differences, it can be identified that "voltage transformer" is an abbreviation or short form of "voltage transformer", and there may be a problem of incomplete recognition.

[0126] This embodiment provides a method for automatically verifying power grid plant wiring diagrams. The text recognition verification technology uses a combination of language models and dictionary matching to achieve dual verification of text recognition results. The language model, trained on a large amount of text data, can evaluate the rationality of text sequences based on the statistical characteristics and semantic logic of the language, identifying erroneous content that does not conform to linguistic conventions or is expressed in specialized terminology. The dual verification mechanism covers multiple aspects, including semantics, grammar, and specialized vocabulary, significantly improving text recognition accuracy and ensuring that text annotations on wiring diagrams are consistent with actual power grid information, providing a reliable text information foundation for power grid operation and maintenance.

[0127] Step S3022: Use the primitive feature matching verification technology to verify the primitive recognition result of the primitive part to obtain the abnormal part of the primitive.

[0128] In some optional implementations, the above step S3022 includes:

[0129] In step c1, primitive features are extracted from the primitive part, and the primitive features are matched with the primitive features in the power grid plant wiring diagram to obtain the number and quality of matched feature points, and the similarity of the primitive verification results is determined based on the number and quality of matched feature points.

[0130] In some optional embodiments, step c1 includes:

[0131] Step c11, primitive feature extraction: Primitive features can be extracted using algorithms such as SIFT (Scale-Invariant Feature Transform), SURF (Speeded Up Robust Features), and ORB (Oriented FAST and Rotated BRIEF). Taking the SIFT algorithm as an example, a Gaussian difference pyramid is constructed for the segmented primitive image. Feature point locations are determined by detecting extreme points in different scale spaces. The main direction is calculated for each feature point, generating a 128-dimensional feature descriptor. This descriptor incorporates gradient information of the image surrounding the feature point and accurately describes the local features of the primitive. For example, for a transformer primitive, its feature descriptor will reflect the gradient distribution characteristics of structures such as the coil and core.

[0132] Step c12, collect the feature points and descriptors of various standard graphics elements in the power grid plant wiring diagram, and establish a reference graphics element feature library. Each graphics element in the library corresponds to a set of feature data, including feature point coordinates, descriptor vectors, graphics element type and other information, which serves as the basis for subsequent matching. Using Brute-Force Matching, the Euclidean distance between the extracted graphics element feature descriptors and the descriptors in the reference graphics element feature library is calculated one by one. The closer the distance, the higher the similarity between the two features. Set a distance threshold (such as 0.6 times the maximum distance), and the feature pairs that are less than the threshold are considered to be matched successfully. For example, for a feature point descriptor of a circuit breaker graphics element, find the descriptor with the closest distance and less than the threshold in the reference library, and determine it as a set of matching feature points.

[0133] Step c13, the number and quality evaluation of matching feature points: directly count the number of matching feature point pairs after screening. This number reflects the degree of feature similarity between primitives. Generally speaking, the more matching feature points there are, the higher the similarity of the primitives. For example, if a primitive has 50 matching feature points with a reference primitive, its similarity is higher than that of a primitive with only 20 matching points. Calculate the average distance between the matching feature point pairs. The smaller the distance, the higher the matching quality. At the same time, analyze the uniformity of the distribution of matching feature points in the primitives, and evaluate the distribution by calculating the spatial discreteness of the feature points (such as variance and standard deviation). Matching feature point pairs that are evenly distributed and have a small average distance indicate that the primitives have a high degree of similarity in both overall structure and local details, and have better quality.

[0134] Step c2: When the similarity of the primitive verification result is lower than the preset similarity threshold, the primitive recognition result is determined to be erroneous and the abnormal part of the primitive is obtained; when the similarity of the primitive verification result is equal to or higher than the preset similarity threshold, the primitive recognition result is determined to be accurate.

[0135] Specifically, according to the actual application requirements of the power plant wiring diagram and a large amount of test data, a reasonable preset similarity threshold (such as 0.8) is set. This threshold needs to balance the accuracy and fault tolerance of recognition, avoiding excessive strictness leading to misjudgment or too loose to let go of erroneous graphics. The calculated similarity of the graphics verification result is compared with the preset threshold. If the similarity is lower than the threshold, it is determined that there is an error in the graphics recognition result, the graphics element is marked as an abnormal part of the graphics element, and relevant information (such as graphics element type, matching status, etc.) is recorded; if the similarity is equal to or higher than the threshold, the graphics element recognition result is determined to be accurate, and it is confirmed that the graphics element can be used for subsequent analysis. The automatic verification method of the power plant wiring diagram provided in this embodiment uses advanced feature extraction algorithms for graphics element feature matching and verification technology to extract and match features of the original graphics element and the recognized graphics element image. These algorithms can capture features such as the shape, texture, scale and rotation of the graphics element, and can extract stable and discriminative feature vectors even if the graphics element is angularly rotated, resized or partially occluded in the wiring diagram. By comparing the feature vectors of the original and recognized primitives and evaluating the image similarity based on the number and quality of matching feature points, it is possible to accurately determine whether the primitive recognition is correct.

[0136] Step S3023: Using a topology connection relationship verification technology, the topology connection relationship part is verified by the topology connection relationship recognition result to obtain the topology connection relationship abnormal part.

[0137] In some optional implementations, step S3023 includes:

[0138] Step d1, extracting a topological connection relationship undirected graph model from the topological connection relationship identification result, using a recursive algorithm to search and perform node matching between the undirected graph model and the undirected graph in the power grid plant connection diagram to obtain a node matching result.

[0139] In some optional implementations, the above step d1 includes:

[0140] In step d11, based on the topological connection relationship identification results, the primitives (such as transformers and circuit breakers) are abstracted into nodes in an undirected graph. Each node contains attributes such as type, ID, and location coordinates. Connecting lines (such as power lines) are abstracted into edges, each of which contains attributes such as start point, end point, and line type. For example, "110kV line L1 connecting transformer T1 and circuit breaker B1" is converted into nodes T1 and B1 and the edge L1 connecting them. The undirected graph model is stored using an adjacency list data structure. Each node corresponds to a list that records all edges connected to the node and its adjacent nodes. For example, the adjacency list of node T1 records edge L1 and its adjacent node B1, and the adjacency list of node B1 similarly records edge L1 and its adjacent node T1, ensuring the bidirectional connectivity of the undirected graph.

[0141] In step d12, a starting node (such as the main transformer node) is selected from the undirected graph model, and the entire graph is recursively traversed using a depth-first search strategy. In each recursive call, it is checked whether the current node can match a node in the undirected graph of the power plant wiring diagram. The matching conditions include node type consistency (such as both are transformers), position similarity (calculated by Euclidean distance, with the threshold set to 5 pixels), and adjacent node structural similarity. For the node to be matched, its similarity score with each node in the wiring diagram is calculated. The recursion is terminated when all nodes are visited and successfully matched, or when unmatched nodes are found. For nodes that cannot be matched, their ID, type, and adjacency are recorded as preliminary evidence of abnormal topological connection relationships.

[0142] Step d2, based on the node matching results, checks whether the connection relationship of the edges in the undirected graph model and the undirected graph in the power grid plant wiring diagram is the same. If there is a node matching failure or the edge connection relationship is inconsistent, it is considered that there is an error in the topological connection relationship identification result, and the abnormal part of the topological connection relationship is obtained; if all nodes and edges can be successfully matched and the connection relationship is consistent, it is considered that the topological connection relationship identification result is accurate.

[0143] In some optional implementations, the above step d2 includes:

[0144] Step d21, for each successfully matched node pair, compare their adjacency structures. Check whether the adjacent node sets of the matching nodes in the two undirected graphs are consistent, that is, if node A is connected to nodes B and C in the model graph, then the corresponding node A' in the wiring diagram should also be connected to nodes B' and C' (B' and C' are the matching nodes of B and C respectively). If there is an inconsistency, record it as an edge connection error. For the matched edges, verify whether their attributes (such as line type and voltage level) are consistent. For example, if edge L1 in the model graph is "110kV line" and the corresponding edge L1' in the wiring diagram is "220kV line", it is determined to be an edge attribute error. Pay special attention to the connection relationship between the ring network and the branch lines. For the ring network structure, check whether the connection order of the nodes and edges in the ring is consistent; for the branch lines, verify whether the connection relationship of the branch points and the number of branch lines match.

[0145] Step d22, node matching failure judgment: If there is a node in the recursive search process that cannot find a matching node, or the similarity score of the matching node found is lower than the threshold (such as 0.7), it is judged that the node matching has failed, and the corresponding graph may have an identification error or a topological connection error. Edge connection relationship inconsistency judgment: If the adjacency structure comparison finds a mismatch, or there is a difference in the edge attribute verification, or the ring network / branch structure is inconsistent, it is judged to be an edge connection relationship error, which may indicate problems such as line connection errors and line type labeling errors. Abnormal type classification: According to the nature of the error, the topological connection relationship anomalies are divided into types such as node missing, node error, edge missing, edge error, and connection structure error. For example, if node B exists in the model diagram but no matching node is found in the wiring diagram, it is classified as node missing; if node A has different adjacent nodes in the two diagrams, it is classified as a connection structure error.

[0146] In step d23, all node matching failures and edge connection inconsistencies are collated and a detailed exception report is generated. The report includes the exception type, location (node / edge ID), error description (e.g., "No matching node found for node B," "Edge L1 voltage level mismatch"), and auxiliary information such as the similarity score. Abnormal nodes and edges are visually annotated on the original power grid plant wiring diagram. For example, unmatched nodes are marked in red, edges with inconsistent connections are highlighted in yellow, and the exception type and brief description are displayed simultaneously, helping users quickly locate and understand problems in topological connections.

[0147] This embodiment provides a method for automatically verifying power grid wiring diagrams. The topology connection relationship verification technology constructs the original and identified wiring diagrams into an undirected graph model. Through a recursive node matching search, it deeply analyzes the connection relationships between graph elements. This technology can automatically identify complex topological structures in power grid wiring diagrams. Even with blurred lines, overlapping lines, and other conditions, it can accurately analyze the connection properties of nodes and edges using graph theory algorithms.

[0148] Step S303: Correct the abnormal part of the identification to obtain the automatic identification result corresponding to the power grid plant wiring diagram. Figure 2 Step S203 of the illustrated embodiment will not be described in detail here.

[0149] This embodiment provides an automated verification method for power grid wiring diagrams. Three verification techniques are used to perform specialized verification on text, graphic elements, and topological connections, forming a complete and comprehensive verification system. Text verification ensures the accuracy of annotations, graphic element verification ensures the correct correspondence between equipment graphics, and topological connection verification ensures the correct logic of line connections. These three methods complement and work together to achieve a comprehensive verification of power grid wiring diagrams, from text to graphics, and from local to global perspectives.

[0150] As one or more specific application embodiments of the present invention, the automatic verification method of the power grid plant wiring diagram provided by the present invention is further described in detail. The specific process is as follows:

[0151] Step 1: Image segmentation based on edge detection.

[0152] Specifically, we construct a topological relationship model and design a graph neural network (GNN). This represents different parts of the image as nodes and uses edges to represent the connections between them. The output of the graph model guides the final segmentation results, ensuring the correct logical relationships between the various parts. Ultimately, the image is divided into multiple components, including text, primitives, and topological connections.

[0153] Step 2: Text recognition and verification.

[0154] For text, recognition results are verified using language models and dictionaries. Language model verification involves using language models (such as the Transformer model, n-gram model, and neural network language model) to verify text. Language models can assess the probability of text sequences based on the statistical properties of language, thereby identifying text sequences that are unlikely to be correct.

[0155] Dictionary matching involves constructing a dictionary of proper nouns, entering station names, landmark names, and matching the recognition results with the dictionary content. Suspected errors are compared with dictionary entries to identify possible errors. This is achieved using edit distance (such as the Levenshtein distance), which calculates the difference between the recognized text and the closest dictionary entry.

[0156] Step 3: Element recognition and verification.

[0157] Through multimodal feature fusion, color features (such as HSV and LAB space) are combined with geometric features for matching, enhancing sensitivity to color changes. Texture features are extracted using Gabor filters and fused with geometric features. Features (such as SIFT, SURF, and ORB) are extracted from the original and recognized primitive images and matched. Image similarity is assessed based on the number and quality of matched feature points.

[0158] Step 4: Topological connection relationship verification. The original wiring diagram and the recognized wiring diagram are constructed as two undirected graphs. Each component and connection line is represented as a node and edge in the graph. The two graphs are recursively searched for node matching.

[0159] Step 5: Annotate anomalous recognition results. If the matching rate exceeds a preset value, the recognition result is considered accurate; if the matching rate falls below the threshold, the recognition result is considered erroneous. Accurate recognition results are hidden, while anomalous results are displayed, prompting manual correction. An active learning framework is built into the recognition process to intelligently select the most valuable samples for professional review and adjust model parameters based on feedback. An interactive correction tool is built to allow operators to directly annotate and modify erroneous or uncertain parts within the interface, while also recording information about these manual interventions for subsequent training and optimization.

[0160] The automatic verification method for power grid wiring diagrams provided in this embodiment automatically verifies the results of AI-powered recognition of power grid wiring diagrams, significantly reducing manual workload and improving the detection rate of anomalies. Manual corrections are performed on identified anomalies, providing key samples for subsequent training.

[0161] This embodiment also provides an automatic verification device for power grid plant wiring diagrams. This device is used to implement the above-mentioned embodiments and preferred embodiments, and the details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0162] This embodiment provides an automatic verification device for a power grid plant wiring diagram, such as Figure 4 Shown, including:

[0163] The image segmentation module 401 is used to perform image segmentation on the pre-acquired power grid plant wiring diagram based on edge detection to obtain multiple segmented parts corresponding to the power grid plant wiring diagram.

[0164] The segmentation part verification module 402 is used to verify the recognition results of multiple segmentation parts using text recognition verification technology, primitive feature matching verification technology and topological connection relationship verification technology respectively, and obtain the recognition abnormal parts.

[0165] The abnormal part correction module 403 is used to correct the identified abnormal part to obtain the automatic recognition result corresponding to the power grid plant wiring diagram.

[0166] In some optional implementations, the image segmentation module 401 includes:

[0167] The image preprocessing unit is used to perform image preprocessing such as denoising, smoothing and enhancement on the pre-acquired power grid plant wiring diagram.

[0168] The edge point determination unit is used to perform edge detection on the power grid plant wiring diagram after image preprocessing using an edge detection algorithm to obtain edge points.

[0169] The edge contour generating unit is used to connect edge points into a continuous edge curve or edge contour.

[0170] The image segmentation unit is used to segment the power grid plant wiring diagram into different areas based on edge contours, and the power grid plant wiring diagram corresponds to multiple segmented parts.

[0171] In some optional implementations, the multiple segmented parts include a text part, a primitive part, and a topological connection relationship part; and the image segmentation unit includes:

[0172] The text part segmentation subunit is used to determine the text block containing the text area based on the edge contour using morphological operations, filter out the area that meets the text characteristics based on the edge contour features in the text block, and segment the text area from the overall power grid station wiring diagram to obtain the text part.

[0173] The graphic element segmentation sub-unit is used to match the edge contour with the pre-established graphic element template using the contour matching algorithm, filter out the contours belonging to each graphic element according to the preset matching threshold, and segment the contours of each graphic element from the overall power grid plant wiring diagram to obtain the graphic element part.

[0174] The topological connection relationship part is segmented into sub-units, which are used to determine the line edges in the edge contour, and use Hough transform to convert the line edges in the image space into the parameter space, detect straight lines and curves, and use straight lines and curves as connecting lines between primitives. Based on graph theory, the primitives are regarded as nodes and the connecting lines as edges, and an undirected graph model is constructed. The connection properties of nodes and edges are analyzed based on the undirected graph model to obtain the topological connection relationship part.

[0175] In some optional implementations, the segmentation verification module 402 includes:

[0176] The text part checking unit is used to check the text recognition result of the text part using the text recognition checking technology to obtain the abnormal text part.

[0177] The primitive part checking unit is used to check the primitive part identification result by using primitive feature matching checking technology to obtain the abnormal part of the primitive.

[0178] The topology connection relationship verification unit is used to use the topology connection relationship verification technology to verify the topology connection relationship recognition result of the topology connection relationship part to obtain the topology connection relationship abnormal part.

[0179] In some optional implementations, the text recognition and verification technology includes a recognition and verification technology using a language model and dictionary matching, and the text part verification unit includes:

[0180] The text sequence extraction subunit is used to extract the text sequence from the text recognition result to be verified.

[0181] The text sequence matching subunit is used to input the text sequence into the language model to obtain the text semantics and context information, and calculate the conditional probability of each word in the text sequence in the context information, and calculate the probability of the text sequence based on the conditional probability of each word in the context information; when the probability of the text sequence is lower than the preset probability threshold, it is determined that there is an error in the text recognition result and the abnormal part of the text is obtained; when the probability of the text sequence is equal to or higher than the preset probability threshold, the text recognition result is determined to be accurate.

[0182] The dictionary matching subunit is used to simultaneously use the dictionary matching recognition and verification technology to match the text sequence with the noun dictionary in the preset dictionary, the input plant and station names, and the landmark names, calculate the marginal distance between the text sequence and the noun dictionary in the preset dictionary, the input plant and station names, and the landmark names, identify the differences between the text sequence and the preset dictionary, and find out the erroneous text.

[0183] In some optional implementations, the primitive part checking unit includes:

[0184] The primitive feature extraction and matching subunit is used to extract primitive features from the primitive part, match the primitive features with the primitive features in the power grid station wiring diagram, obtain the number and quality of matched feature points, and determine the similarity of the primitive verification results based on the number and quality of matched feature points.

[0185] The abnormal part determination subunit of the primitive is used to determine that there is an error in the primitive recognition result and obtain the abnormal part of the primitive when the similarity of the primitive verification result is lower than the preset similarity threshold; when the similarity of the primitive verification result is equal to or higher than the preset similarity threshold, the primitive recognition result is determined to be accurate.

[0186] In some optional implementations, the topology connection relationship checking unit includes:

[0187] The node matching subunit is used to extract the topological connection relationship undirected graph model from the topological connection relationship identification result, and use a recursive algorithm to search and perform node matching between the undirected graph model and the undirected graph in the power grid plant connection diagram to obtain the node matching result.

[0188] The topological connection relationship abnormal part judgment subunit is used to check whether the connection relationship of the edges in the undirected graph model and the undirected graph in the power grid plant wiring diagram is the same based on the node matching results. If there is a node matching failure or the edge connection relationship is inconsistent, it is considered that the topological connection relationship recognition result is wrong and the topological connection relationship abnormal part is obtained; if all nodes and edges can be successfully matched and the connection relationship is consistent, it is considered that the topological connection relationship recognition result is accurate.

[0189] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0190] The automatic verification device of the power grid plant wiring diagram in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0191] The embodiment of the present invention also provides a computer device having the above Figure 4 An automatic calibration device for the power grid plant wiring diagram shown.

[0192] See also Figure 5 , Figure 5 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0193] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0194] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0195] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0196] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0197] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 5 The bus connection is taken as an example.

[0198] The input device 30 can receive input digital or character information and generate key signal input related to user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0199] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0200] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0201] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for automatically checking a power grid plant wiring diagram, characterized in that: The method comprises: Perform image segmentation on the pre-acquired power grid plant wiring diagram based on the edge detection algorithm to obtain multiple segmented parts corresponding to the power grid plant wiring diagram; The recognition results of multiple segmented parts are verified by using text recognition verification technology, primitive feature matching verification technology and topological connection relationship verification technology respectively, and the abnormal parts are identified; Correct the abnormal part of the identification to obtain the automatic identification result corresponding to the power grid plant wiring diagram.

2. The method according to claim 1, characterized in that The image segmentation of the pre-acquired power grid plant wiring diagram is performed based on an edge detection algorithm to obtain multiple segmented parts corresponding to the power grid plant wiring diagram, including: Perform image preprocessing such as denoising, smoothing and enhancement on the pre-acquired power plant wiring diagram; The edge detection algorithm is used to detect the edge of the power grid wiring diagram after image preprocessing to obtain edge points; connecting the edge points into a continuous edge curve or edge contour; The power grid plant connection diagram is segmented into different areas based on edge contours, corresponding to multiple segmented parts of the power grid plant connection diagram.

3. The method according to claim 2, characterized in that The multiple segmented parts include a text part, a graphic element part and a topological connection relationship part; The power grid plant connection diagram is segmented into different areas based on edge contours, and the multiple segmented parts corresponding to the power grid plant connection diagram include: Based on the edge contour, morphological operations are used to determine the text block containing the text area. Based on the edge contour features in the text block, the area that meets the text characteristics is screened out, and the text area is segmented from the overall power grid station wiring diagram to obtain the text part. A contour matching algorithm is used to match the edge contour with the pre-established primitive template. Based on the preset matching threshold, the contours belonging to each primitive are screened out and the contours of each primitive are segmented from the overall power grid station wiring diagram to obtain the primitive part. Determine the line edges in the edge contour, use Hough transform to convert the line edges in the image space to the parameter space, detect straight lines and curves, and use the straight lines and curves as connecting lines between graphics elements. Based on graph theory, regard the graphics elements as nodes and the connecting lines as edges, construct an undirected graph model, and analyze the connection properties of nodes and edges based on the undirected graph model to obtain the topological connection relationship part.

4. The method according to claim 3, characterized in that The text recognition verification technology, the primitive feature matching verification technology and the topological connection relationship verification technology are respectively used to verify the recognition results of multiple segmented parts to obtain the abnormal parts, including: Using a text recognition and verification technology to verify the text recognition results of the text portion to obtain an abnormal text portion; Using the primitive feature matching verification technology to verify the primitive recognition result of the primitive part, and obtain the abnormal part of the primitive; A topology connection relationship verification technology is used to verify the topology connection relationship recognition result of the topology connection relationship part to obtain the topology connection relationship abnormal part.

5. The method according to claim 4, characterized in that The text recognition and verification technology includes a recognition and verification technology using a language model and a dictionary matching method. The text recognition and verification technology is used to verify the text part and obtain the abnormal text part, including: Extracting a text sequence from the text recognition result to be verified; Inputting the text sequence into a language model to obtain text semantics and context information, and calculating the conditional probability of each word in the text sequence in the context information, and calculating the probability of the text sequence based on the conditional probability of each word in the context information; when the probability of the text sequence is lower than a preset probability threshold, it is determined that the text recognition result is erroneous and the abnormal part of the text is obtained; when the probability of the text sequence is equal to or higher than the preset probability threshold, it is determined that the text recognition result is accurate; At the same time, the dictionary matching recognition and verification technology is used to match the text sequence with the noun dictionary in the preset dictionary, the entered plant and station names, and the landmark names, and the marginal distances between the text sequence and the noun dictionary in the preset dictionary, the entered plant and station names, and the landmark names are calculated to identify the differences between the text sequence and the preset dictionary and find out the erroneous text.

6. The method according to claim 4, characterized in that The method of using the primitive feature matching verification technology to verify the primitive recognition result of the primitive part to obtain the abnormal primitive part includes: Extracting primitive features from the primitive portion, matching the primitive features with primitive features in a power grid station wiring diagram to obtain the number and quality of matched feature points, and determining the similarity of primitive verification results based on the number and quality of matched feature points; When the similarity of the primitive verification result is lower than the preset similarity threshold, the primitive recognition result is judged to be wrong and the abnormal part of the primitive is obtained; when the similarity of the primitive verification result is equal to or higher than the preset similarity threshold, the primitive recognition result is judged to be accurate.

7. The method according to claim 4, characterized in that The topology connection relationship verification technology is used to verify the topology connection relationship identification result of the topology connection relationship part to obtain the topology connection relationship abnormal part, including: Extracting a topological connection relationship undirected graph model from the topological connection relationship identification result, and performing node matching between the undirected graph model and the undirected graph in the power grid plant connection diagram using a recursive algorithm search to obtain a node matching result; Based on the node matching results, check whether the connection relationship of the edges in the undirected graph model and the undirected graph in the power grid plant wiring diagram is the same. If there is a node matching failure or the edge connection relationship is inconsistent, it is considered that there is an error in the topological connection relationship identification result, and the abnormal part of the topological connection relationship is obtained; if all nodes and edges can be successfully matched and the connection relationship is consistent, it is considered that the topological connection relationship identification result is accurate.

8. An automatic verification device for a power grid plant wiring diagram, characterized in that: The device comprises: An image segmentation module is used to segment the pre-acquired power grid plant wiring diagram based on an edge detection algorithm to obtain multiple segmented parts corresponding to the power grid plant wiring diagram; The segmentation part verification module is used to verify the recognition results of multiple segmentation parts using text recognition verification technology, primitive feature matching verification technology and topological connection relationship verification technology to obtain the abnormal parts; The abnormal part correction module is used to correct the identified abnormal part and obtain the automatic recognition result corresponding to the power grid plant wiring diagram.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the automatic calibration method of the power grid plant wiring diagram according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the automatic verification method of the power grid plant connection diagram according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Power grid plant station wiring diagram automatic identification and conversion storage method

    CN115082950A

  • Checking method and device for primary wiring diagram of intelligent power grid plant station

    CN116401800A

  • Checking method and device for transformer substation monitoring system

    CN119051275A

  • Wiring diagram primitive identification method and device, electronic equipment and storage medium

    CN119478592A

  • Annotation method and system for medical ultrasonic image

    CN119888749A

Cited By

  • Image-based data matching method, electronic device, storage medium and program

    CN121582616A