Relay protection setting value single identification and automatic checking method and system based on graph neural network
Patent Information
- Application Number
- CN202611185455.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-11-03
AI Technical Summary
Existing technologies struggle to fully utilize the spatial relationships, adjacency relationships, and layout structure relationships between text blocks during the automatic identification and verification of complex relay protection setting sheets. This results in misclassification, omission, and mismatch of parameter items and setting items, leading to low accuracy and stability.
A graph neural network-based approach is adopted to construct a fixed-value single-page topology graph, which transforms the spatial location and adjacency relationship between text blocks into structured graph data. The graph neural network is used for node classification, and parameter fixed-value matching is performed by combining spatial neighborhood information. The influence of differences in name expression and numerical format is eliminated through format normalization.
It improves the recognition accuracy and generalization stability of value sheets from different sources and in different formats, reduces the mismatch rate under complex formats, realizes end-to-end automated processing from value sheet images to structured verification results, reduces the workload of manual verification and avoids the risk of missed verification and incorrect verification.
Smart Images

Figure CN123033254A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system relay protection technology, and in particular to a method and system for relay protection setting sheet identification and automatic verification based on graph neural networks. Background Technology
[0002] Relay protection setting sheets are crucial technical documents for the commissioning, maintenance, periodic inspection, and setting changes of substation protection devices. They typically record information such as protection parameter names, setting values, units, control words, and commissioning / disabling status. Relay protection setting verification requires comparing the settings recorded in the setting sheet with the standard setting library or the operating settings of the protection device to identify errors, omissions, or incorrect settings. Currently, setting verification mainly relies on maintenance personnel manually checking each parameter and setting item in different setting sheets. This process is time-consuming and easily affected by personnel experience and work status.
[0003] To reduce the workload of manual verification, existing technologies typically employ image processing and optical character recognition (OCR) techniques for automatic identification of relay protection setting sheets. These methods generally first perform grayscale conversion, binarization, noise reduction, tilt correction, table line detection, or text region segmentation on the setting sheet image. Then, they perform character recognition on text lines, table cells, or local text regions, comparing the recognition results with standard setting values or device operating setting values to obtain the corresponding verification results. This type of method can achieve a certain degree of auxiliary verification when the setting sheet layout is regular, the image is clear, and the parameter and setting items are arranged in a fixed manner.
[0004] However, relay protection setting sheets generated by different types of protection devices and different setting management systems vary significantly in layout and content expression. These sheets may contain issues such as cross-column layouts, merged cells, parameter names and setting values arranged vertically, table lines crossing text, characters overlapping, and diverse setting formats. Existing methods typically treat text lines or cells as independent recognition objects, primarily relying on text recognition content, keywords, or string similarity to determine the category of text regions. They fail to adequately utilize the spatial relationships, horizontal adjacency, vertical adjacency, and local layout structure relationships between different text blocks.
[0005] In situations with table line interference, blurred text, character overlap, or strong local noise, the image features and text recognition results of a single text block may be incomplete or inaccurate. Existing technologies, if relying solely on the recognized text of a single text block for classifying parameter items, fixed values, and other text content, struggle to utilize the contextual information provided by adjacent text blocks to assist in determining node categories. This can easily lead to misidentification of parameter names as fixed values, fixed values as explanatory text, or headers, footers, and table numbers as valid parameter items, resulting in misclassification or omission of parameter items and fixed values.
[0006] Existing technologies, after completing text recognition, typically establish a correspondence between parameter items and fixed-value items based on fixed row and column positions, keyword order, or string distance. When the fixed-value sheet contains cross-column layouts, merged cells, or parameter items and fixed-value items are not strictly arranged in the same row, the fixed-position matching rule cannot simultaneously consider the spatial distance between parameter items and fixed-value items, row and column alignment, and recognition reliability. This can easily lead to a parameter item being matched with an adjacent incorrect fixed-value item, resulting in missed or incorrect matching of parameter items and fixed-value items.
[0007] Furthermore, the same protection parameter may be expressed with different names, abbreviations, or synonyms in different value sets. The identified text may also suffer from missing or replaced characters due to optical character recognition errors. Directly querying the standard value based on the identified parameter name, or directly comparing the identified value with the standard value as strings, may result in the inability to locate the corresponding standard value or misjudgments due to differences in spaces, full-width and half-width characters, unit expressions, decimal formats, and status expressions. Existing binary verification methods typically output a consistent or inconsistent conclusion directly, lacking a corresponding low-confidence handling mechanism for cases where a parameter item does not match a reliable value item or has a low degree of matching confidence.
[0008] For technical solutions that use machine learning models for text block classification, training labels for parameter nodes, fixed-value nodes, and background nodes are also required. Relying entirely on manual node-by-node annotation not only requires a significant amount of annotation work, but different annotators may also have differing judgments on the categories of complex text blocks. If the standard fixed values to be verified are used directly during the training label generation stage, the standard fixed-value information may prematurely participate in node category determination, affecting the independence of the subsequent consistency verification process.
[0009] Therefore, existing automatic verification technology for relay protection setting sheets is unable to fully utilize the spatial adjacency relationship between text blocks and the context information of the layout to complete the text block category identification; it is difficult to accurately establish the correspondence between parameter items and setting items under complex layouts; it is difficult to eliminate the impact of differences in parameter names and setting value expression forms on standard setting value query and consistency comparison; and it is difficult to properly handle parameter items that have not formed a reliable matching relationship. Summary of the Invention
[0010] Therefore, the technical problem to be solved by the present invention is to overcome the problem that in the process of automatic identification and verification of complex relay protection setting sheets in the prior art, the spatial position relationship, adjacency relationship and layout structure relationship between text blocks are not fully utilized, which easily leads to misclassification, omission and mismatch of parameter items and setting items, resulting in low accuracy and stability of setting sheet identification and consistency verification.
[0011] To address the aforementioned technical problems, this invention provides a method for relay protection setting sheet identification and automatic verification based on graph neural networks, comprising: A graph structure training data is constructed from the training relay protection setting sheet image to obtain training graph structure data and training text recognition results; node pseudo-labels are generated based on the training text recognition results; a graph neural network is trained based on the training graph structure data and the node pseudo-labels to obtain a node classification model; The image of the relay protection setting sheet to be checked is used to construct graph structure verification data and perform text recognition to obtain graph structure data to be checked and text recognition results to be checked; the graph structure data to be checked is input into the node classification model to classify nodes and obtain node classification results; the parameter node set and setting node set are determined based on the node classification results. Based on the parameter node set, the fixed value node set, the graph structure data to be verified, and the text recognition result to be verified, parameter fixed value matching is performed to obtain parameter fixed value matching result, recognition parameter name, and recognition fixed value corresponding to the recognition parameter name; Obtain the standard value corresponding to the identification parameter name, perform consistency verification on the identification value and the standard value according to the parameter value matching result, and perform structured processing on the consistency verification result to obtain the structured value verification result.
[0012] In one embodiment of the present invention, the method for constructing graph structure training data from training relay protection setting sheet images to obtain training graph structure data and training text recognition results is as follows: The training relay protection setting image is preprocessed and text block is extracted to obtain a training text block node set; Visual features are extracted from the training text block nodes in the training text block node set to obtain the training node image features; A training fixed-value single-page topology graph is constructed based on the spatial adjacency relationships between the training text block nodes, and the training graph structure data is constructed based on the image features of the training nodes and the training fixed-value single-page topology graph. The training text block nodes are subjected to text recognition to obtain the training recognition text and training recognition confidence score corresponding to each training text block node. The training text recognition result is obtained based on the training recognition text and the training recognition confidence score.
[0013] In one embodiment of the present invention, the method for constructing a training fixed-value single-page topology graph based on the spatial adjacency relationship between the training text block nodes is as follows: Each training text block node is used as a graph node, and the bounding rectangle, center coordinates, and spatial positional relationship of each training text block node are recorded. According to the The training text block node and the first Calculate the spatial distance between the center coordinates of each training text block node: , in, Indicates the first The training text block node and the first Spatial distance between training text block nodes Indicates the first The center coordinates of each training text block node Indicates the first The center coordinates of each training text block node Indicates the horizontal distance weight. Indicates the vertical distance weight; In the The training text block node and the first When a training text block node satisfies the preset adjacency condition, the first... The training text block node and the first The graph edges between the training text block nodes are determined according to the following formula: , in, Indicates the first The training text block node and the first The adjacency weights between each training text block node This represents the distance attenuation parameter; The training fixed-value single-page topology graph is constructed based on the set of training text block nodes, the set of edges between training text block nodes, and the weighted adjacency matrix, and is represented as follows: ,in, This represents the training fixed-value single-page topology graph. This represents the set of training text block nodes. This represents the set of edges between the training text block nodes. Let represent the weighted adjacency matrix.
[0014] In one embodiment of the present invention, the method for training a graph neural network based on the training graph structure data and the node pseudo-labels to obtain a node classification model is as follows: The training node image features are arranged according to the node order in the training fixed-value single-page topology map to obtain the training node feature matrix; Based on the weighted adjacency matrix and the corresponding degree matrix of the trained fixed-value single-page topology graph, determine the normalized graph Laplacian matrix; A Bernstein spectral graph convolutional network is used to propagate node features from the training node feature matrix based on the normalized graph Laplacian matrix, resulting in node representations after graph convolution aggregation. The node representations after convolutional aggregation of the graph are classified to obtain the training node classification probability matrix; Based on the classification error between the training node classification probability matrix and the node pseudo-label, the model parameters of the Bernstein spectrogram convolutional network are updated to obtain the node classification model.
[0015] In one embodiment of the present invention, the normalized graph Laplacian matrix is determined according to the weighted adjacency matrix and the corresponding degree matrix of the trained fixed-value single-page topology graph, using the following formula: , in, This represents the normalized graph Laplacian matrix. Represents the identity matrix. Represents the degree matrix, Represents the weighted adjacency matrix; Using the Bernstein spectrogram convolutional network, node features are propagated through the training node feature matrix according to the following formula: , in, This represents the node representation after the graph convolutional aggregation. Denotes the order of the Bernstein polynomial. Indicates the order of the polynomial expansion. Indicates the first Bernstein expansion coefficients of order 1, This represents the feature matrix of the training nodes; The node representations after convolutional aggregation of the graph are classified according to the following formula to obtain the classification probability matrix of the training nodes: , in, This represents the classification probability matrix of the training nodes. Represents the classification layer weight matrix. This represents the category layer bias term.
[0016] In one embodiment of the present invention, the method for obtaining the parameter value matching result, the identified parameter name, and the identified parameter value corresponding to the identified parameter name is as follows: Obtain the single-page topology diagram of the set value to be verified from the diagram structure data to be verified; For any parameter node in the parameter node set, search for fixed value nodes located in the right row region, the lower adjacent region, or the topological neighborhood of the single-page topology diagram to be verified from the fixed value node set to obtain the candidate fixed value node set corresponding to the parameter node. Based on the spatial distance, row and column alignment, and node classification confidence between the parameter node and each candidate value node in the candidate value node set, the matching score between the parameter node and each candidate value node is determined. The candidate fixed value node with the highest matching score and that meets the preset matching threshold is selected from the candidate fixed value node set and used as the fixed value node that matches the parameter node to obtain the parameter fixed value matching result. When there is no candidate value node in the candidate value node set whose matching score meets the preset matching threshold, the corresponding parameter node is marked as an item to be reviewed; The name of the recognition parameter is determined based on the recognition text to be verified corresponding to the parameter node in the recognition result to be verified, and the recognition value is determined based on the recognition text to be verified corresponding to the value node that matches the parameter node.
[0017] In one embodiment of the present invention, for parameter nodes The corresponding set of candidate fixed-value nodes is determined from the set of fixed-value nodes according to the following formula: , in, Indicates parameter node The corresponding set of candidate fixed value nodes, Represents the set of fixed-value nodes. Represents candidate fixed-value nodes; the spatial candidate constraint includes the candidate fixed-value nodes being located at parameter nodes. The right-side row area, the adjacent area below, or the topological neighborhood of the single-page topology diagram of the value to be verified; Determine the parameter nodes according to the following formula. With candidate setpoint nodes Match score between: , in, Indicates parameter node With candidate setpoint nodes Match scores between them Indicates candidate fixed value nodes The confidence score of node classification. Indicates parameter node With candidate setpoint nodes The row and column alignment score between them Indicates parameter node With candidate setpoint nodes Normalized spatial distance between them , and Indicates the weighting coefficient; The normalized spatial distance is determined according to the following formula: , in, Indicates candidate fixed value nodes The center coordinates, Indicates parameter node The center coordinates, This indicates the width of the image in the relay protection setting sheet to be checked. This indicates the height of the image of the relay protection setting sheet to be verified; The parameter node is determined from the set of candidate value nodes according to the following formula. The corresponding optimal fixed value node: , in, Indicates the relationship between the parameter node The corresponding optimal fixed value node; When the matching score corresponding to the optimal value node meets the preset matching threshold, the optimal value node is determined as the parameter node. Matching fixed-value nodes; when the matching score corresponding to the optimal fixed-value node does not meet the preset matching threshold, the parameter node... Marked as item pending review.
[0018] In one embodiment of the present invention, the method for generating node pseudo-labels based on the trained text recognition results is as follows: From the training text recognition results, obtain the training recognition text and training recognition confidence corresponding to each training text block node; Based on the parameter name dictionary and general fixed value format rules, the node category of the training recognition text is determined, and the node category determination result corresponding to each training text block node is obtained. Based on the node category determination result and the training recognition confidence, pseudo-labels are marked on each training text block node to obtain parameter node pseudo-labels, fixed value node pseudo-labels and background node pseudo-labels. The node pseudo-label is obtained based on the parameter node pseudo-label, the fixed value node pseudo-label, and the background node pseudo-label.
[0019] In one embodiment of the present invention, the method for obtaining a standard value corresponding to the identification parameter name, performing a consistency check on the identification value and the standard value based on the parameter value matching result, and performing structured processing on the consistency check result is as follows: The identification parameter name is matched with the parameter name and its synonyms in the parameter name dictionary to obtain the normalized parameter name corresponding to the identification parameter name; The standard value corresponding to the standardized parameter name is obtained by querying the standard value library or device operation value according to the standardized parameter name; The identification setpoint and the standard setpoint are processed by format normalization to obtain normalized identification setpoint and normalized standard setpoint; The consistency judgment result of the set value is determined based on the normalized identification set value and the normalized standard set value, and the set value verification result is determined based on the parameter set value matching result and the set value consistency judgment result; The identification parameter name, the identification value, the standard value, the matching confidence corresponding to the parameter value matching result, and the value verification result are associated according to the parameter items to obtain the structured value verification result.
[0020] In one embodiment of the present invention, let the first... The identification setpoint corresponding to each parameter node is... The corresponding standard setting is The normalized identification value and the normalized standard value are determined according to the following formula: , , in, This represents a function for normalizing fixed-value text. This represents the normalized identification setpoint. This represents the standardized standard value; Based on the normalized identification setpoint and the normalized standard setpoint, the consistency judgment result of the setpoint is determined according to the following formula: , in, Indicates the first Consistency judgment results for the fixed values corresponding to each parameter node. This indicates that the normalized identification value is consistent with the normalized standard value. This indicates that the normalized identification value is inconsistent with the normalized standard value; Based on the parameter setting matching result and the setting consistency judgment result, the setting verification result is determined according to the following formula: , in, Indicates parameter node The corresponding fixed value verification results, Indicates the relationship between the parameter node Matching fixed value nodes, This represents the set of valid matches between parameter nodes and fixed value nodes.
[0021] In one embodiment of the present invention, the method for constructing graph structure verification data and performing text recognition on the image of the relay protection setting sheet to be verified, to obtain the graph structure data to be verified and the text recognition result to be verified, is as follows: The image of the relay protection setting sheet to be checked is preprocessed and the text block is extracted to obtain the set of text block nodes to be checked; Visual features are extracted from the text block nodes to be checked in the set of text block nodes to be checked to obtain the image features of the nodes to be checked. Construct a topology diagram of the single-page layout to be checked based on the spatial adjacency relationships between the text block nodes to be checked; The structure data of the graph to be checked is constructed based on the image features of the node to be checked and the single-page topology graph of the fixed value to be checked. The text block nodes to be verified are subjected to text recognition to obtain the text to be verified and the confidence level of the verification corresponding to each text block node. The text recognition result to be verified is obtained based on the text to be verified and the confidence level of the verification.
[0022] Based on the same inventive concept, this invention also provides a relay protection setting sheet identification and automatic verification system based on graph neural networks, comprising: The model training module is used to construct graph structure training data from the training relay protection setting sheet image to obtain training graph structure data and training text recognition results; generate node pseudo-labels based on the training text recognition results; and train the graph neural network based on the training graph structure data and the node pseudo-labels to obtain a node classification model. The verification processing module is used to construct graph structure verification data and perform text recognition on the image of the relay protection setting sheet to be verified, so as to obtain the graph structure data to be verified and the text recognition result to be verified; input the graph structure data to be verified into the node classification model to classify nodes, so as to obtain the node classification result; and determine the parameter node set and the setting node set according to the node classification result. The parameter value matching module is used to perform parameter value matching based on the parameter node set, the value node set, the graph structure data to be checked, and the text recognition result to be checked, to obtain the parameter value matching result, the recognition parameter name, and the recognition value corresponding to the recognition parameter name; The verification output module is used to obtain the standard value corresponding to the identification parameter name, perform consistency verification on the identification value and the standard value according to the parameter value matching result, and perform structured processing on the result of consistency verification to obtain the structured value verification result.
[0023] The technical solution of the present invention has the following advantages over the prior art: This invention constructs a topology map of a fixed-value sheet layout, transforming the spatial positions and adjacency relationships between text blocks into structured graph data. This effectively utilizes layout structure information to guide the recognition and classification of text regions, reducing misclassification, omissions, and mismatches of parameter and fixed-value items in complex layouts. Based on this, a graph neural network is used for node classification, enabling each text block to aggregate contextual information from other text blocks in its spatial neighborhood for comprehensive judgment. This effectively suppresses the impact of image noise, character adhesion, and table line interference on the recognition of individual text blocks, improving the recognition accuracy and generalization stability of fixed-value sheets from different sources and layouts. During the parameter and fixed-value matching process, multiple factors such as spatial distance, row and column alignment, and recognition confidence are comprehensively considered for matching decisions. Format standardization eliminates the influence of differences in name expression and numerical format on the verification results, outputting multi-level classification results. Unreliable matching parameter items are clearly identified, allowing maintenance personnel to quickly focus on problematic items, reducing the workload of item-by-item verification and avoiding the risk of omissions and errors. During the training phase, pseudo-labels are automatically generated based on existing dictionaries and formatting rules, eliminating the need for manual annotation and avoiding the introduction of standard fixed-value information, thus ensuring the independence of model training and subsequent verification stages. The entire solution achieves end-to-end automated processing from fixed-value single images to structured verification results, demonstrating promising engineering application prospects. Attached Figure Description
[0024] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0025] Figure 1This is a flowchart illustrating the relay protection setting sheet identification and automatic verification method based on graph neural networks provided in this embodiment of the invention. Figure 2 This is a diagram illustrating the overall processing framework of the relay protection setting sheet identification and automatic verification method based on graph neural networks in this embodiment of the invention. Detailed Implementation
[0026] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0027] Example 1: like Figure 1 As shown, this invention provides a method for relay protection setting sheet identification and automatic verification based on graph neural networks, including: A graph structure training data is constructed from the training relay protection setting sheet image to obtain training graph structure data and training text recognition results; node pseudo-labels are generated based on the training text recognition results; a graph neural network is trained based on the training graph structure data and the node pseudo-labels to obtain a node classification model; The image of the relay protection setting sheet to be checked is used to construct graph structure verification data and perform text recognition to obtain graph structure data to be checked and text recognition results to be checked; the graph structure data to be checked is input into the node classification model to classify nodes and obtain node classification results; the parameter node set and setting node set are determined based on the node classification results. Based on the parameter node set, the fixed value node set, the graph structure data to be verified, and the text recognition result to be verified, parameter fixed value matching is performed to obtain parameter fixed value matching result, recognition parameter name, and recognition fixed value corresponding to the recognition parameter name; Obtain the standard value corresponding to the identification parameter name, perform consistency verification on the identification value and the standard value according to the parameter value matching result, and perform structured processing on the consistency verification result to obtain the structured value verification result.
[0028] This invention constructs graph structure training data from the training image of the fixed-value sheet and generates node pseudo-labels. A graph neural network is then trained to obtain a node classification model. Graph structure verification data is constructed and text recognition is performed on the image of the fixed-value sheet to be verified. The node classification model is input to determine the parameter node set and the fixed-value node set. Based on this, parameter value matching is performed to obtain the recognition parameter name and its corresponding recognition value. Then, the corresponding standard value is obtained for consistency verification. The verification result is structured and output. This invention incorporates the spatial position and adjacency relationship of text blocks in the fixed-value sheet layout into the graph neural network for node classification, overcoming the shortcomings of existing technologies that rely solely on the characteristics of a single text block for category determination. By combining spatial adjacency relationships for parameter value matching, the mismatch rate under complex layouts is reduced. End-to-end automated processing from the fixed-value sheet image to the structured verification result is achieved, significantly improving recognition accuracy and verification efficiency.
[0029] like Figure 2 As shown in the embodiment of the invention, the relay protection setting sheet identification and automatic verification method includes a model training stage and a setting sheet verification stage. The model training stage is used to construct training graph structure data and training text recognition results based on the training relay protection setting sheet image. Based on the training text recognition results, node pseudo-labels are generated, and a node classification model is trained using the training graph structure data and the node pseudo-labels. The setting sheet verification stage is used to construct corresponding data and perform text recognition on the relay protection setting sheet image to be verified. The node classification model is used to complete the classification of text block nodes. Based on the node classification results, the matching between parameter items and setting items is completed, and the consistency verification between the identified setting value and the standard setting value is performed.
[0030] Specifically, during the model training phase, multiple images of training relay protection setting sheets are acquired. These images can be scanned images of paper relay protection setting sheets or images exported from the setting management system. The images may contain one or more of the following information: protection parameter name, setting value, unit, control word, on / off status, and remarks. When the training relay protection setting sheets are provided in portable document format or spreadsheet format, the corresponding files are converted to image format, allowing the converted images to undergo preprocessing, text block extraction, visual feature extraction, and text recognition according to a unified image processing workflow.
[0031] Further, image preprocessing and text block extraction are performed on each training relay protection setting image. Preferably, image preprocessing may include grayscale conversion, adaptive binarization, denoising, and morphological closing operations. Adaptive binarization is used to enhance the contrast between text regions and background regions, morphological closing operations are used to connect broken strokes in characters and enhance the connectivity of text regions, and denoising is used to reduce the impact of isolated noise points on subsequent connected component analysis. Connected component analysis is performed on the preprocessed images to extract mutually independent candidate text regions, and each candidate text region is normalized. For table lines, noise points, and regions that do not belong to valid text content, they are filtered out based on the area, aspect ratio, and pixel density of the candidate text regions, resulting in a set of training text block nodes composed of valid training text block nodes.
[0032] Let the set of training text block nodes extracted from a training relay protection setting sheet image be: , in, This represents the set of training text block nodes. Indicates the first Training text block nodes This represents the total number of training text block nodes in the set of training text block nodes. .
[0033] For the training text block nodes Record its bounding rectangle: , in, Indicates the first The bounding rectangle of each training text block node. and Let x and y represent the x and y coordinates of the upper left corner of the circumscribed rectangle, respectively. This represents the width of the circumscribed rectangle. This indicates the height of the circumscribed rectangle.
[0034] The first is determined based on the circumscribed rectangle. The center coordinates of each training text block node , is represented as: .
[0035] By recording the bounding rectangle, center coordinates, and spatial position of each training text block node in the training relay protection setting sheet image, the horizontal adjacency, vertical adjacency, and local layout neighborhood relationships between different training text block nodes can be further described.
[0036] Furthermore, visual features are extracted from each training text block node in the training text block node set.
[0037] Specifically, the trained text block image regions, after region normalization processing, are input into a visual encoder. This visual encoder can employ a Convolutional Neural Network (CNN) to extract visual information such as character contours, stroke structures, and local image textures from the trained text block nodes themselves. Let the first... The normalized text block image region corresponding to each training text block node is: Then the image feature representation of the training node corresponding to the training text block node is: , in, Indicates the first The visual feature vectors corresponding to each training text block node. Represents a visual encoder. Indicates the parameters of the visual encoder. Indicates the first The normalized text block image regions corresponding to each training text block node. The visual feature vectors corresponding to each training text block node are arranged according to the node order in the training text block node set, resulting in the training node feature matrix: , in, Represents the feature matrix of the training nodes. These represent the image features of the training nodes corresponding to each training text block node. This indicates the number of training text block nodes.
[0038] Construct a training-defined single-page topology graph based on the spatial adjacency relationships between training text block nodes. For the first... The training text block node and the first There are 2 training text block nodes, and their center coordinates are respectively represented as . and Then the first The training text block node and the first Spatial distance between training text block nodes Calculate according to the following formula: , in, Indicates the first The training text block node and the first Spatial distance between training text block nodes Indicates the horizontal distance weight. This represents the vertical distance weight. The horizontal distance weight is set accordingly. and vertical distance weight It can adjust the degree of attention paid to horizontal and vertical adjacency relationships during the mapping process.
[0039] The preset adjacency condition is used to determine whether there is a spatial adjacency relationship between two training text block nodes that needs to be represented in the training fixed-value single-page topology graph. The preset adjacency condition can be set according to the horizontal adjacency relationship, vertical adjacency relationship, and local page neighborhood relationship between the training text block nodes. When the... The training text block node and the first When two training text block nodes satisfy the preset adjacency condition, a graph edge is established between them, and the adjacency weight of the graph edge is determined according to the following formula: , in, Indicates the first The training text block node and the first The adjacency weights between each training text block node This represents the distance decay parameter. When the spatial distance between two training text block nodes is small, the corresponding adjacency weight is large; when the spatial distance between two training text block nodes increases, the corresponding adjacency weight decreases accordingly. Thus, the adjacency weight can reflect the difference in the degree of spatial correlation between adjacent text blocks.
[0040] Based on the set of training text block nodes, the set of edges between training text block nodes, and the adjacency weights of each edge, a training fixed-value single-page topology graph is constructed, represented as follows: , in, This represents the training constant single-page topology graph. This represents the set of training text block nodes. This represents the set of edges between training text block nodes. This represents the weighted adjacency matrix. The training setpoint single-page topology graph converts the spatial positional relationships, adjacency relationships, and local page structure relationships between text blocks in the training relay protection setpoint single image into a graph structure. The image features of the training nodes are associated with the training setpoint single-page topology graph to form training graph structure data, so that the training graph structure data simultaneously includes the visual features of each training text block node and the page spatial relationships between each training text block node.
[0041] While constructing the training graph structure data, Optical Character Recognition (OCR) is performed on each training text block node in the training text block node set to obtain the training recognized text and training recognition confidence score corresponding to each training text block node. Optical Character Recognition is used to convert the image region corresponding to the training text block node into text content. Let the th... The training recognition text corresponding to each training text block node is: The corresponding training recognition confidence level is Then, the training recognition text and training recognition confidence scores corresponding to each training text block node are associated according to the training text block node to obtain the training text recognition result.
[0042] Further, node pseudo-labels are generated based on the trained text recognition results. Specifically, the trained recognition text corresponding to each trained text block node is obtained from the trained text recognition results. and training recognition confidence The method utilizes a parameter name dictionary and general setting format rules to determine the node category of the training recognition text. The parameter name dictionary includes commonly used parameter names from relay protection setting sheets, along with corresponding abbreviations, synonyms, or other standardized expressions, used to determine whether the training recognition text corresponds to a protection parameter name. The general setting format rules include one or more expression rules for numerical setting values, unit-based setting values, fractional setting values, control word status, on / off status, and composite setting formats, used to determine whether the training recognition text corresponds to setting content. For the training recognition text, a dictionary matching method based on Levenshtein distance and substring inclusion relationships is used to calculate the parameter name matching similarity between the training recognition text and each entry in the parameter name dictionary.
[0043] For training and recognizing text Calculate the parameter name matching similarity between it and the entries in the parameter name dictionary, and represent it as: , in, Represents a dictionary of parameter names. This represents any entry in the parameter name dictionary. Indicates training to recognize text Related to the entry Edit distance between Indicates training to recognize text The length of the characters, Indicates a term The length of the characters, This represents the inclusion relation discriminant function. This represents the tradeoff coefficient. Edit distance measures the character differences between the training text and the parameter name entries. The inclusion relationship discriminant function determines whether there is an inclusion relationship, abbreviation relationship, or synonymous expression relationship between the training text and the parameter name entries. This allows the parameter name attributes to be determined even when the training text has missing characters, character substitutions, or other minor recognition errors.
[0044] For training and recognizing text The fixed value format matching score is calculated according to the general fixed value format rules and is expressed as follows: , in, Indicates a numerical structure matching item. Indicates unit matching items, This indicates a control word or a status match. Indicates a compound format match item. , , and This indicates the weight corresponding to each rule item.
[0045] Numerical structure matching item is used to determine whether the training recognition text contains integers, decimals, fractions or combined numerical values; unit matching item is used to determine whether the training recognition text contains units corresponding to current, voltage, time or impedance; control word or engagement / disengagement status matching item is used to determine whether the training recognition text is a status expression such as "engaged", "disengaged", "engaged", "disengaged", "1" or "0"; composite format matching item is used to determine whether the training recognition text belongs to a composite fixed value format composed of numerical values, separators and units, such as "250 / 0.5A".
[0046] When training to recognize text, the parameter names match similarity. The node is judged if it is greater than the parameter threshold, and the corresponding training recognition confidence score is... When the score exceeds the confidence threshold, the corresponding training text block node is marked as a pseudo-label for the parameter node; when the training recognition text's fixed-value format matching score is greater than the threshold, the corresponding training text block node is marked as a pseudo-label for the parameter node. The value is greater than the threshold value for judging nodes, and the corresponding training recognition confidence score is... When the confidence level exceeds the threshold, the corresponding training text block node is marked as a fixed-value node pseudo-label. For headers, footers, table numbers, invalid explanatory text, and training text block nodes that do not meet the criteria for parameter nodes or fixed-value nodes, they are marked as background node pseudo-labels. Training text block nodes with excessively low recognition confidence that are unsuitable for model training can also be treated as ignored nodes. Based on the parameter node pseudo-labels, fixed-value node pseudo-labels, and background node pseudo-labels, node pseudo-labels corresponding to the set of training text block nodes are obtained.
[0047] During the generation of pseudo-labels for nodes, the standard value library or device operating values do not participate in the classification of parameter nodes, value nodes, and background nodes. The standard value library is only used for subsequent value consistency verification. This avoids introducing the standard values to be verified into the node pseudo-label generation process in advance, reducing the workload of manual node-by-node annotation, and keeping the training process of the node classification model relatively independent from the subsequent standard value verification process. Pseudo-labels are generated using a parameter name dictionary and general value format rules, and the standard value information is limited to the subsequent verification stage.
[0048] Furthermore, the graph neural network is trained based on the training graph structure data and the node pseudo-labels. Specifically, the training node image features are arranged according to the node order in the training fixed-value single-page topology graph to form the aforementioned training node feature matrix. Based on the weighted adjacency matrix of the training fixed-value single-page topology graph. Determine the corresponding degree matrix The normalized graph Laplace matrix is determined according to the following formula: , in, Represents the normalized graph Laplacian matrix. Represents the identity matrix. The degree matrix represents the training constant single-page topology graph. This represents the weighted adjacency matrix of the training fixed-value single-page layout topology graph. The normalized graph Laplacian matrix is used to describe the connection relationships between each training text block node in the training fixed-value single-page layout topology graph, providing a graph structure basis for feature propagation between adjacent training text block nodes in the graph neural network.
[0049] Preferably, the graph neural network employs a Bernstein spectral graph convolutional network, and the feature matrix of the training nodes is processed according to the following formula. Perform node feature propagation: , in, This represents the node representation after graph convolution aggregation. Denotes the order of the Bernstein polynomial. Indicates the order of the polynomial expansion. Indicates the first Bernstein expansion coefficients of order 1, Represents the identity matrix. Represents the normalized graph Laplacian matrix. This represents the feature matrix of the training nodes.
[0050] During the aforementioned feature propagation process, the visual features of each training text block node can propagate and aggregate along the graph edges in the training fixed-value single-page topology graph. This ensures that the node representation after graph convolution aggregation not only contains the visual information of the corresponding training text block node itself but also the page context information provided by other training text block nodes in its spatial neighborhood. Therefore, for training text block nodes exhibiting character blurring, character overlap, table lines overlapping characters, or local image noise, the spatial location and category context of adjacent training text block nodes can be used to assist in determining their node category.
[0051] The node representations after convolutional aggregation of the graph are classified to obtain the training node classification probability matrix: , in, This represents the classification probability matrix of the training nodes. Represents the classification layer weight matrix. Indicates the classification layer bias term. This represents the normalized exponential function. Each row in the training node classification probability matrix corresponds to a training text block node, and each column corresponds to the classification probability of the parameter node category, the fixed value node category, or the background node category, respectively.
[0052] Based on the training node classification probability matrix The classification error between the node pseudo-labels and the actual node classification is used to update the model parameters of the Bernstein spectrogram convolutional network, gradually matching the predicted node categories corresponding to the trained text block nodes with the node categories represented by the pseudo-labels. After updating the model parameters, a node classification model for identifying parameter nodes, fixed-value nodes, and background nodes is obtained.
[0053] Through this training process, the node classification model can combine the visual features of the text block itself and the spatial adjacency relationship between text blocks to complete the node category determination, rather than classifying based solely on the local image or text recognition results of a single text block.
[0054] Furthermore, during the setting sheet verification stage, an image of the relay protection setting sheet to be verified is acquired. This image can be a scanned image of a paper setting sheet or an image exported from the setting management system. When the file to be verified is a portable document format file or a spreadsheet file, it is converted to an image format. The image of the relay protection setting sheet to be verified may contain one or more of the following information: protection parameter name, setting value, unit, control word, on / off status, and remarks.
[0055] The image of the relay protection setting sheet to be verified is preprocessed and text blocks are extracted to obtain a set of text block nodes to be verified. The image preprocessing and text block extraction process is consistent with the processing process corresponding to the training relay protection setting sheet image, including adaptive binarization, denoising and morphological closing operation processing of the image of the relay protection setting sheet to be verified, extraction of candidate text blocks through connected component analysis, region normalization processing of candidate text blocks, and filtering out table lines, noise points and invalid description areas according to the text block area, aspect ratio and pixel density.
[0056] Visual features are extracted from each text block node in the set of text block nodes to be checked, resulting in image features of the nodes to be checked. The spatial relationships between the text block nodes to be checked are determined based on their bounding rectangles and center coordinates. A topology map of the setpoint single-page layout to be checked is constructed using the same spatial distance calculation method, preset adjacency conditions, and adjacency weight calculation method as the training setpoint single-page layout topology map. Based on the image features of the nodes to be checked and the topology map of the setpoint single-page layout to be checked, structural data of the graph to be checked is constructed, thus enabling the structural data of the graph to be checked to simultaneously represent the visual features of each text block node to be checked and its spatial adjacency relationship within the setpoint single-page layout of the relay protection to be checked.
[0057] The text block nodes to be verified are subjected to text recognition to obtain the text to be verified and the confidence score corresponding to each text block node. A text recognition result is then formed based on the text to be verified and the confidence score. The text recognition result is organized according to the text block nodes to be verified, so that each text block node is correlated with its text to be verified, confidence score, bounding rectangle, center coordinates, and image features.
[0058] The graph structure data to be verified is input into the trained node classification model. The node classification model determines the normalized graph Laplacian matrix based on the weighted adjacency matrix corresponding to the fixed-value single-page topology graph to be verified. It then performs Bernstein spectrogram convolution propagation and classification on the image features of the nodes to be verified, outputting the node classification probabilities of each text block node belonging to parameter nodes, fixed-value nodes, and background nodes, respectively. The node category of each text block node is determined based on its corresponding node category probabilities, yielding the node classification result.
[0059] Based on the node classification results, retain the text block nodes to be verified that are classified as parameter nodes and fixed-value nodes, and remove the text block nodes to be verified that are classified as background nodes, thus obtaining the parameter node set and the fixed-value node set. Let the parameter node set be represented as... The set of fixed-value nodes is represented as ,in, Represents the first in the parameter node set One parameter node, Represents the first value in the set of fixed value nodes. A fixed value node.
[0060] The topology map of the single-page layout to be verified is obtained from the structure data of the image to be verified, and parameter value matching is performed based on the parameter node set, the value node set, the single-page layout topology map of the image to be verified, and the text recognition result of the image to be verified. For any parameter node in the parameter node set... From the set of fixed value nodes The search is located in the parameter node. The parameter nodes are obtained from the topological neighborhood of the right-side row area, the lower adjacent area, or the topological neighborhood of the topological diagram of the single-page layout to be verified. The corresponding set of candidate fixed value nodes: , in, Indicates parameter node The corresponding set of candidate fixed value nodes, Represents a set of fixed-value nodes. This represents a candidate value node. The spatial candidate constraint is used to restrict the layout position of the candidate value node relative to the parameter node, ensuring that the candidate value node participating in the matching satisfies at least one of the following spatial relationships: located in the same row to the right of the parameter node, in the adjacent area below it, or within the topological neighborhood of the single-page topology diagram of the value to be verified. This allows for the adaptation of parameter names and values arranged in the same row, vertically, and in local topological adjacency due to cross-column or merged cells.
[0061] For each candidate fixed-value node in the candidate fixed-value node set, the matching score is determined based on the spatial distance between the parameter node and the candidate fixed-value node, the row and column alignment degree, and the node classification confidence of the candidate fixed-value node. Parameter node With candidate setpoint nodes The matching score between them is calculated according to the following formula: , in, Indicates candidate fixed value nodes The confidence score of node classification. Indicates parameter node With candidate setpoint nodes The row and column alignment score between them Indicates parameter node With candidate setpoint nodes Normalized spatial distance between them , and This represents the weighting coefficient.
[0062] The normalized spatial distance is calculated according to the following formula: , in, Indicates candidate fixed value nodes The center coordinates, Indicates parameter node The center coordinates, This indicates the width of the image in the relay protection setting sheet to be checked. This represents the height of the relay protection setting sheet image to be verified. By using the diagonal length of the relay protection setting sheet image to be verified to normalize the spatial distance between parameter nodes and candidate setting nodes, the influence of different image sizes on the spatial distance calculation results can be reduced.
[0063] The row and column alignment score According to parameter nodes With candidate setpoint nodes The horizontal or vertical positional deviation between the candidate value node and the parameter node is determined. When the candidate value node and the parameter node are in the same row, adjacent columns, or have a strong vertical alignment relationship, their row and column alignment score is relatively high; when the horizontal or vertical positional deviation between them is large and the row and column alignment relationship is weak, their row and column alignment score is relatively low. The matching score simultaneously considers the category credibility of the candidate value node, the page alignment relationship between the parameter node and the candidate value node, and the spatial distance between them, which can reduce the possibility of mismatch when matching parameter values based solely on fixed row and column positions.
[0064] From the parameter nodes according to the following formula The optimal value node is determined from the corresponding set of candidate value nodes: , in, Indicates the relationship between the parameter node The corresponding optimal setpoint node. When the optimal setpoint node When the corresponding matching score meets the preset matching threshold, the optimal fixed value node is determined as the parameter node. Matching the fixed value nodes and the parameter nodes With the optimal fixed value node The correspondence between them is written into the parameter value matching result. When the candidate value node set is empty, or the candidate value node with the highest matching score in the candidate value node set still does not meet the preset matching threshold, the corresponding parameter node is marked as an item to be reviewed.
[0065] Furthermore, based on the parameter nodes in the character recognition result to be verified The corresponding text to be verified determines the name of the recognition parameter, based on the parameter node. Matching constant nodes The corresponding recognition value for the text to be verified is determined according to the recognition parameter name. For parameter nodes and value nodes that form a valid matching relationship, their matching scores and matching confidence are recorded; for parameter nodes that do not form a valid matching relationship, the text block position, the text to be verified, and the node classification confidence are retained as the basis for subsequent output of the verification results.
[0066] After obtaining the identification parameter name and its corresponding identification setting, the standard setting corresponding to the identification parameter name is acquired. Specifically, the identification parameter name is matched with the standardized parameter names and their synonyms and abbreviations in the parameter name dictionary to obtain the standardized parameter name corresponding to the identification parameter name. This process can map the corresponding identification parameter name to a unified standardized parameter name when different relay protection setting sheets use different names for the same protection parameter, or when the identification parameter name has slight character omissions or substitutions.
[0067] The standardized parameter name is queried in the standard setting library or device operation setting to obtain the standard setting corresponding to the standardized parameter name. The standard setting can be derived from the standard setting library, setting notification form, protection device operation setting call result, or setting file exported from the setting management system. The specific source of the standard setting can be determined based on the setting verification task. When the relay protection setting to be verified is a notification setting form, the protection device operation setting can be used as the corresponding standard setting; when the relay protection setting to be verified is a device operation setting form, the setting in the standard setting library or setting notification form can be used as the corresponding standard setting.
[0068] Before performing consistency judgment, the identification setpoint and the standard setpoint are formatted and normalized. Let the first... The identification setpoint corresponding to each parameter node is... The corresponding standard setting is Then the normalized identification setpoint and the normalized standard setpoint are determined according to the following formulas: , , in, This represents a function for normalizing fixed-value text. This represents a normalized identification value. This represents the standardized value.
[0069] The text normalization function for fixed values is used to eliminate non-substantial differences in textual expression between identified fixed values and standard fixed values. Its processing includes removing redundant spaces, unifying full-width and half-width characters, standardizing unit representations, standardizing decimal place formats, and mapping different control words or status expressions to a unified form. For example, fixed values with the same meaning but using different character widths, space formats, decimal place representations, or status names can be standardized into a unified expression after text normalization, thus avoiding inconsistent output results solely due to differences in text format.
[0070] Based on standardized identification values and standardized standard values The first one is determined according to the following formula. Consistency judgment results for the constant values corresponding to each parameter node: , in, Indicates the first Consistency judgment results for the fixed values corresponding to each parameter node. This indicates that the normalized identification value is consistent with the normalized standard value. This indicates that the normalized identification value is inconsistent with the normalized standard value.
[0071] Based on the parameter value matching result and the parameter value consistency judgment result, the parameter node is determined according to the following formula. Corresponding fixed value verification results: , in, Indicates parameter node The corresponding fixed value verification results, Indicates the relationship between the parameter node Matching fixed value nodes, This represents the set of valid matches between parameter nodes and setpoint nodes. When a valid match is formed between a parameter node and a setpoint node, and the normalized identification setpoint is the same as the normalized standard setpoint, a consistent result is output. When a valid match is formed between a parameter node and a setpoint node, but the normalized identification setpoint is different from the normalized standard setpoint, an inconsistent result is output. When a parameter node does not match a reliable setpoint node, or the corresponding match confidence is lower than a preset confidence threshold, a result pending verification is output. This process avoids directly outputting inconsistent conclusions when the correspondence between parameter and setpoint nodes is unreliable.
[0072] The identification parameter name, the normalized parameter name, the identification setpoint, the standard setpoint, the matching confidence level corresponding to the parameter setpoint matching result, and the setpoint verification result are associated according to the parameter items to obtain a structured setpoint verification result. The structured setpoint verification result can form a corresponding data record for each protection parameter, including the parameter name, notification setpoint value, device setpoint value, matching confidence level, and verification result. When the identification setpoint originates from the notification setpoint and the standard setpoint originates from the device operation setpoint, they are recorded as the notification setpoint value and the device setpoint value, respectively; when other standard setpoint sources are used, the identification setpoint and the standard setpoint can be recorded according to the corresponding source.
[0073] For parameter items with inconsistent verification results, the text block positions of the corresponding parameter nodes and setting nodes, the text to be verified, the node classification confidence score, and the parameter setting matching score are retained, enabling manual reviewers to locate the corresponding text regions in the relay protection setting sheet image to be verified. For parameter items requiring further review, the text block positions of the parameter nodes, the identified parameter names, candidate setting node information, and the matching scores corresponding to each candidate setting node are retained, allowing manual determination of the reasons for the lack of a reliable matching relationship. Structured verification results and manual review information can be output together, allowing maintenance personnel to prioritize viewing inconsistent and low-confidence items without having to manually check all protection parameters item by item.
[0074] Through model training, construction of the diagram structure data to be verified, node classification, parameter setting matching, standard setting query, setting format standardization, and consistency judgment, the method provided in this embodiment of the invention can utilize the spatial positional relationship, adjacency relationship, and local layout structure relationship between Chinese text blocks in the relay protection setting sheet to assist in the identification of parameter nodes and setting value nodes. Furthermore, even when parameter names and setting values are not strictly arranged in the same row, or when there is cross-column arrangement or merged cells, candidate setting value nodes can be determined jointly by the right-side row area, the lower adjacent area, and the layout topological neighborhood. By comprehensively considering node classification confidence, row and column alignment, and normalized spatial distance to determine the parameter setting value matching relationship, mismatches caused by fixed row and column matching methods can be reduced. By standardizing parameter names and setting value text, the impact of differences in synonyms, character formats, unit formats, decimal place formats, and status expressions on standard setting value queries and consistency judgments can be reduced. By setting a result to be verified, parameter items that have not formed a reliable matching relationship or have low matching confidence can be distinguished from items that are inconsistent with the actual setting value.
[0075] Example 2: Based on the same inventive concept as Embodiment 1, the present invention also provides a relay protection setting sheet identification and automatic verification system based on graph neural networks, comprising: The model training module is used to construct graph structure training data from the training relay protection setting sheet image to obtain training graph structure data and training text recognition results; generate node pseudo-labels based on the training text recognition results; and train the graph neural network based on the training graph structure data and the node pseudo-labels to obtain a node classification model. The verification processing module is used to construct graph structure verification data and perform text recognition on the image of the relay protection setting sheet to be verified, so as to obtain the graph structure data to be verified and the text recognition result to be verified; input the graph structure data to be verified into the node classification model to classify nodes, so as to obtain the node classification result; and determine the parameter node set and the setting node set according to the node classification result. The parameter value matching module is used to perform parameter value matching based on the parameter node set, the value node set, the graph structure data to be checked, and the text recognition result to be checked, to obtain the parameter value matching result, the recognition parameter name, and the recognition value corresponding to the recognition parameter name; The verification output module is used to obtain the standard value corresponding to the identification parameter name, perform consistency verification on the identification value and the standard value according to the parameter value matching result, and perform structured processing on the result of consistency verification to obtain the structured value verification result.
[0076] Each module of the relay protection setting sheet identification and automatic verification system based on graph neural network proposed in this embodiment is used to implement the steps of the relay protection setting sheet identification and automatic verification method based on graph neural network in Embodiment 1. To avoid redundancy, these steps will not be repeated here.
[0077] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0078] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0079] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0080] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0081] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A method for relay protection setting sheet identification and automatic verification based on graph neural networks, characterized in that, include: Graph structure training data is constructed from the training relay protection setting sheet image to obtain training graph structure data and training text recognition results; Generate node pseudo-labels based on the trained text recognition results; The graph neural network is trained based on the training graph structure data and the node pseudo-labels to obtain a node classification model; The graph structure verification data and text recognition are constructed and the text recognition results of the relay protection setting sheet image to be verified are obtained by performing graph structure verification data and text recognition results to be verified. The graph structure data to be verified is input into the node classification model to classify nodes and obtain the node classification results. Determine the parameter node set and the fixed value node set based on the node classification results; Based on the parameter node set, the fixed value node set, the graph structure data to be verified, and the text recognition result to be verified, parameter fixed value matching is performed to obtain parameter fixed value matching result, recognition parameter name, and recognition fixed value corresponding to the recognition parameter name; Obtain the standard value corresponding to the identification parameter name, perform consistency verification on the identification value and the standard value according to the parameter value matching result, and perform structured processing on the consistency verification result to obtain the structured value verification result.
2. The relay protection setting sheet identification and automatic verification method based on graph neural network according to claim 1, characterized in that: The method for constructing graph structure training data and training text recognition results from the training relay protection setting sheet image is as follows: The training relay protection setting image is preprocessed and text block is extracted to obtain a training text block node set; Visual features are extracted from the training text block nodes in the training text block node set to obtain the training node image features; A training fixed-value single-page topology graph is constructed based on the spatial adjacency relationships between the training text block nodes, and the training graph structure data is constructed based on the image features of the training nodes and the training fixed-value single-page topology graph. The training text block nodes are subjected to text recognition to obtain the training recognition text and training recognition confidence score corresponding to each training text block node. The training text recognition result is obtained based on the training recognition text and the training recognition confidence score.
3. The relay protection setting sheet identification and automatic verification method based on graph neural network according to claim 2, characterized in that: The method for constructing a training fixed-value single-page topology graph based on the spatial adjacency relationships between the training text block nodes is as follows: Each training text block node is used as a graph node, and the bounding rectangle, center coordinates, and spatial positional relationship of each training text block node are recorded. According to the The training text block node and the first Calculate the spatial distance between the center coordinates of each training text block node: , in, Indicates the first The training text block node and the first Spatial distance between training text block nodes Indicates the first The center coordinates of each training text block node Indicates the first The center coordinates of each training text block node Indicates the horizontal distance weight. Indicates the vertical distance weight; In the The training text block node and the first When a training text block node satisfies the preset adjacency condition, the first... The training text block node and the first The graph edges between the training text block nodes are determined according to the following formula: , in, Indicates the first The training text block node and the first The adjacency weights between each training text block node This represents the distance attenuation parameter; The training fixed-value single-page topology graph is constructed based on the set of training text block nodes, the set of edges between training text block nodes, and the weighted adjacency matrix, and is represented as follows: ,in, This represents the training fixed-value single-page topology graph. This represents the set of training text block nodes. This represents the set of edges between the training text block nodes. Let represent the weighted adjacency matrix.
4. The relay protection setting sheet identification and automatic verification method based on graph neural network according to claim 1, characterized in that: The method for training a graph neural network based on the training graph structure data and the node pseudo-labels to obtain a node classification model is as follows: The training node image features are arranged according to the node order in the training fixed-value single-page topology map to obtain the training node feature matrix; Based on the weighted adjacency matrix and the corresponding degree matrix of the trained fixed-value single-page topology graph, determine the normalized graph Laplacian matrix; A Bernstein spectral graph convolutional network is used to propagate node features from the training node feature matrix based on the normalized graph Laplacian matrix, resulting in node representations after graph convolution aggregation. The node representations after convolutional aggregation of the graph are classified to obtain the training node classification probability matrix; Based on the classification error between the training node classification probability matrix and the node pseudo-label, the model parameters of the Bernstein spectrogram convolutional network are updated to obtain the node classification model.
5. The relay protection setting sheet identification and automatic verification method based on graph neural network according to claim 4, characterized in that: Based on the weighted adjacency matrix and corresponding degree matrix of the trained fixed-value single-page topology graph, the normalized graph Laplacian matrix is determined according to the following formula: , in, This represents the normalized graph Laplacian matrix. Represents the identity matrix. Represents the degree matrix, Represents the weighted adjacency matrix; Using the Bernstein spectrogram convolutional network, node features are propagated through the training node feature matrix according to the following formula: , in, This represents the node representation after the graph convolutional aggregation. Denotes the order of the Bernstein polynomial. Indicates the order of the polynomial expansion. Indicates the first Bernstein expansion coefficients of order 1, This represents the feature matrix of the training nodes; The node representations after convolutional aggregation of the graph are classified according to the following formula to obtain the training node classification probability matrix: , in, This represents the classification probability matrix of the training nodes. Represents the classification layer weight matrix. This indicates the category layer bias term.
6. The relay protection setting sheet identification and automatic verification method based on graph neural network according to claim 1, characterized in that: The method for obtaining the parameter value matching result, the identified parameter name, and the identified parameter value corresponding to the identified parameter name is as follows: Obtain the single-page topology diagram of the set value to be verified from the diagram structure data to be verified; For any parameter node in the parameter node set, search for fixed value nodes located in the right row region, the lower adjacent region, or the topological neighborhood of the single-page topology diagram to be verified from the fixed value node set to obtain the candidate fixed value node set corresponding to the parameter node. Based on the spatial distance, row and column alignment, and node classification confidence between the parameter node and each candidate value node in the candidate value node set, the matching score between the parameter node and each candidate value node is determined. The candidate fixed value node with the highest matching score and that meets the preset matching threshold is selected from the candidate fixed value node set and used as the fixed value node that matches the parameter node to obtain the parameter fixed value matching result. When there is no candidate value node in the candidate value node set whose matching score meets the preset matching threshold, the corresponding parameter node is marked as an item to be reviewed; The name of the recognition parameter is determined based on the recognition text to be verified corresponding to the parameter node in the recognition result to be verified, and the recognition value is determined based on the recognition text to be verified corresponding to the value node that matches the parameter node.
7. The relay protection setting sheet identification and automatic verification method based on graph neural network according to claim 6, characterized in that: For parameter nodes The corresponding set of candidate fixed-value nodes is determined from the set of fixed-value nodes according to the following formula: , in, Indicates parameter node The corresponding set of candidate fixed value nodes, Represents the set of fixed-value nodes. Represents candidate fixed-value nodes; the spatial candidate constraint includes the candidate fixed-value nodes being located at parameter nodes. The right-side row area, the adjacent area below, or the topological neighborhood of the single-page topology diagram of the value to be verified; Determine the parameter nodes according to the following formula. With candidate setpoint nodes Match score between: , in, Indicates parameter node With candidate setpoint nodes Match scores between them Indicates candidate fixed value nodes The confidence score of node classification. Indicates parameter node With candidate setpoint nodes The row and column alignment score between them Indicates parameter node With candidate setpoint nodes Normalized spatial distance between them , and Indicates the weighting coefficient; The normalized spatial distance is determined according to the following formula: , in, Indicates candidate fixed value nodes The center coordinates, Indicates parameter node The center coordinates, This indicates the width of the image in the relay protection setting sheet to be checked. This indicates the height of the image of the relay protection setting sheet to be checked; The parameter node is determined from the set of candidate value nodes according to the following formula. The corresponding optimal fixed value node: , in, Indicates the relationship between the parameter node The corresponding optimal fixed value node; When the matching score corresponding to the optimal value node meets the preset matching threshold, the optimal value node is determined as the parameter node. Matching fixed-value nodes; when the matching score corresponding to the optimal fixed-value node does not meet the preset matching threshold, the parameter node... Marked as item pending review.
8. The relay protection setting sheet identification and automatic verification method based on graph neural network according to claim 1, characterized in that: The method for generating node pseudo-labels based on the trained text recognition results is as follows: From the training text recognition results, obtain the training recognition text and training recognition confidence corresponding to each training text block node; Based on the parameter name dictionary and general fixed value format rules, the node category of the training recognition text is determined, and the node category determination result corresponding to each training text block node is obtained. Based on the node category determination result and the training recognition confidence, pseudo-labels are marked on each training text block node to obtain parameter node pseudo-labels, fixed value node pseudo-labels and background node pseudo-labels. The node pseudo-label is obtained based on the parameter node pseudo-label, the fixed value node pseudo-label, and the background node pseudo-label.
9. The relay protection setting sheet identification and automatic verification method based on graph neural network according to claim 1, characterized in that: The method for obtaining the standard value corresponding to the identification parameter name, performing consistency verification on the identification value and the standard value based on the parameter value matching result, and performing structured processing on the consistency verification result is as follows: The identification parameter name is matched with the parameter name and its synonyms in the parameter name dictionary to obtain the normalized parameter name corresponding to the identification parameter name; The standard value corresponding to the standardized parameter name is obtained by querying the standard value library or device operation value according to the standardized parameter name; The identification setpoint and the standard setpoint are processed by format normalization to obtain normalized identification setpoint and normalized standard setpoint; The consistency judgment result of the set value is determined based on the normalized identification set value and the normalized standard set value, and the set value verification result is determined based on the parameter set value matching result and the set value consistency judgment result; The identification parameter name, the identification value, the standard value, the matching confidence corresponding to the parameter value matching result, and the value verification result are associated according to the parameter items to obtain the structured value verification result.
10. The relay protection setting sheet identification and automatic verification method based on graph neural network according to claim 9, characterized in that: Let the first The identification setpoint corresponding to each parameter node is... The corresponding standard setting is The normalized identification value and the normalized standard value are determined according to the following formula: , , in, This represents a function for normalizing fixed-value text. This represents the normalized identification setpoint. This represents the standardized standard value; Based on the normalized identification setpoint and the normalized standard setpoint, the consistency judgment result of the setpoint is determined according to the following formula: , in, Indicates the first Consistency judgment results for the fixed values corresponding to each parameter node. This indicates that the normalized identification value is consistent with the normalized standard value. This indicates that the normalized identification value is inconsistent with the normalized standard value; Based on the parameter setting matching result and the setting consistency judgment result, the setting verification result is determined according to the following formula: , in, Indicates parameter node The corresponding fixed value verification results, Indicates the relationship between the parameter node Matching fixed value nodes, This represents the set of valid matches between parameter nodes and fixed value nodes.
11. The relay protection setting sheet identification and automatic verification method based on graph neural network according to claim 1, characterized in that: The method for constructing graph structure verification data and performing text recognition on the image of the relay protection setting sheet to be verified, to obtain the graph structure data to be verified and the text recognition results to be verified, is as follows: The image of the relay protection setting sheet to be checked is preprocessed and the text block is extracted to obtain the set of text block nodes to be checked; Visual features are extracted from the text block nodes to be checked in the set of text block nodes to be checked to obtain the image features of the nodes to be checked. Construct a topology diagram of the single-page layout to be checked based on the spatial adjacency relationships between the text block nodes to be checked; The structure data of the graph to be checked is constructed based on the image features of the node to be checked and the single-page topology graph of the fixed value to be checked. The text block nodes to be verified are subjected to text recognition to obtain the text to be verified and the confidence level of the verification corresponding to each text block node. The text recognition result to be verified is obtained based on the text to be verified and the confidence level of the verification.
12. A relay protection setting sheet identification and automatic verification system based on graph neural networks, characterized in that, include: The model training module is used to construct graph structure training data from the training relay protection setting sheet image, and obtain training graph structure data and training text recognition results. Generate node pseudo-labels based on the trained text recognition results; The graph neural network is trained based on the training graph structure data and the node pseudo-labels to obtain a node classification model; The verification processing module is used to construct graph structure verification data and perform text recognition on the image of the relay protection setting sheet to be verified, so as to obtain the graph structure data to be verified and the text recognition results to be verified. The graph structure data to be verified is input into the node classification model to classify nodes and obtain the node classification results. Determine the parameter node set and the fixed value node set based on the node classification results; The parameter value matching module is used to perform parameter value matching based on the parameter node set, the value node set, the graph structure data to be checked, and the text recognition result to be checked, to obtain the parameter value matching result, the recognition parameter name, and the recognition value corresponding to the recognition parameter name; The verification output module is used to obtain the standard value corresponding to the identification parameter name, perform consistency verification on the identification value and the standard value according to the parameter value matching result, and perform structured processing on the result of consistency verification to obtain the structured value verification result.
