A method and system for identifying graph elements in a wiring diagram under super-resolution scenarios

By constructing a primitive reasoning model and an iterative super-resolution reconstruction mechanism, combined with conditional generative adversarial networks and consistency verification, the problems of low recognition accuracy and difficulty in correcting errors in traditional wiring diagram recognition methods are solved, achieving accurate recognition and reliable output of low-quality wiring diagrams.

CN121600546BActive Publication Date: 2026-04-28STATE GRID SICHUAN ELECTRIC POWER CORP ELECTRIC POWER RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID SICHUAN ELECTRIC POWER CORP ELECTRIC POWER RES INST
Filing Date
2026-01-28
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Traditional wiring diagram recognition methods are insufficient in their ability to extract features from low-resolution, blurry, or small-scale elements, resulting in low recognition accuracy. Furthermore, the recognition results are difficult to interpret regarding the electrical connection logic and physical constraints between elements, making them prone to errors that are difficult to correct.

Method used

A primitive inference model is constructed, and the model is pre-trained using a pre-built training dataset. Iterative super-resolution reconstruction mechanism and conditional generative adversarial network are used for feature extraction and enhancement. The primitive consistency verification mechanism is combined for recognition verification and iterative optimization to generate accurate primitive recognition results.

Benefits of technology

It improves the accuracy of identifying low-quality wiring diagrams, enables the tracing and correction of erroneous outputs, meets the hard constraints of the electrical field, and enhances the interpretability and credibility of the identification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121600546B_ABST
    Figure CN121600546B_ABST
Patent Text Reader

Abstract

The application discloses a kind of under super-resolution scene's wiring diagram graphic element identification method and system, it is related to data processing technical field, the method includes: constructing and training graphic element inference model, based on iterative super-resolution reconstruction mechanism to the wiring diagram to be identified carries out iterative feature extraction, and it is combined condition and generates feature enhancement using adversarial network, generates graphic element feature set, the graphic element feature set is input to graphic element inference model and carries out graphic element identification, generates initial graphic element identification result, and it is combined graphic element consistency check mechanism and carries out identification check, obtains identification check result, according to the initial graphic element identification result is iteratively optimized according to the identification check result, generates accurate graphic element identification result, obtains the feedback dataset of accurate graphic element identification result, based on the feedback dataset graphic element inference model is optimized using feedback, to realize accurate identification of low-quality wiring diagram and accurate tracing and correction to error graphic element identification output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and more specifically, to a method and system for identifying wiring diagram elements in super-resolution scenarios. Background Technology

[0002] In today's rapidly developing technological era, electronic wiring diagrams are an important carrier supporting the dispatching, operation, and monitoring of power systems. The accuracy of electronic wiring diagrams often has a significant impact on the accurate judgment of the power grid's operating status. However, with the continuous growth of the scale of new energy grid connection, the workload of maintaining electronic wiring diagrams is also increasing, and this trend is growing day by day. Traditional wiring diagram identification methods often have certain limitations when facing the demands brought about by the rapid development of the power grid.

[0003] On the one hand, traditional methods are extremely sensitive to the quality of input images, especially lacking the ability to extract features from low-resolution, blurry, or small-scale primitives, which often leads to recognition bottlenecks and low accuracy in primitive recognition. On the other hand, the recognition results of traditional methods are often only pixel-level classifications, unable to understand the electrical connection logic and physical constraints between primitives, which can easily produce erroneous outputs that violate the basic principles of power grids, and these errors are often difficult to trace and correct.

[0004] Therefore, this application is hereby submitted. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for identifying wiring diagram elements in super-resolution scenarios, so as to solve the problems of low accuracy in identifying low-quality wiring diagrams and the easy generation of erroneous outputs that are difficult to trace and correct.

[0006] The above-mentioned technical objective of the present invention is achieved through the following technical solution:

[0007] Firstly, this application provides a method for identifying wiring diagram elements in super-resolution scenarios, comprising the following specific steps:

[0008] S1. Construct a primitive reasoning model and pre-train the model using a pre-built training dataset. The primitive reasoning model includes a primitive perception submodule and a perception reasoning submodule.

[0009] S2, based on the iterative super-resolution reconstruction mechanism, iteratively extracts features from the wiring diagram to be identified, and combines it with a conditional generative adversarial network to enhance features and generate a set of primitive features;

[0010] S3, input the primitive feature set into the primitive inference model for primitive recognition, generate the initial primitive recognition result, and perform recognition verification in combination with the primitive consistency verification mechanism;

[0011] S4. Obtain the recognition verification result, and iteratively optimize the initial primitive recognition result based on the recognition verification result to generate an accurate primitive recognition result;

[0012] S5 obtains a feedback dataset of accurate primitive recognition results, and optimizes the primitive inference model based on the feedback dataset.

[0013] Based on the above technical solution, the present invention can be further improved as follows.

[0014] Furthermore, the above-mentioned iterative super-resolution reconstruction mechanism iteratively extracts features from the wiring diagram to be identified, and combines it with a conditional generative adversarial network for feature enhancement, generating a primitive feature set, including:

[0015] Feature extraction is performed on the wiring diagram to be identified based on convolutional neural networks and feature pyramid networks, generating a multi-level feature set. The multi-level feature set includes shallow feature maps and deep feature maps, where:

[0016] The shallow feature map is represented as the feature map spectrum corresponding to the wiring diagram to be identified in a high-resolution state. Each shallow feature vector in the feature map spectrum is used to characterize the primitive details of the wiring diagram to be identified.

[0017] The deep feature map is represented as the feature map spectrum corresponding to the wiring diagram to be identified in the low-resolution state. Each deep feature vector in the feature map spectrum is used to characterize the primitive semantic information of the wiring diagram to be identified.

[0018] The region uncertainty assessment is performed on the deep feature map to obtain the region uncertainty assessment result. The region uncertainty assessment result is used to quantify the degree to which the recognition is difficult in a local region within the current feature map due to the ambiguity of primitive semantic information.

[0019] Based on the set of uncertain regions, the corresponding uncertain regions are cropped from the wiring diagram to be identified and the shallow feature map to obtain the corresponding set of original image blocks and set of shallow feature image blocks;

[0020] The original image patch set and the shallow feature image patch set are input into a conditional generative adversarial network to perform super-resolution reconstruction of the original image patch set, generate the corresponding reconstructed image patch set, and generate a primitive feature set based on the reconstructed image patch set.

[0021] Furthermore, the above-mentioned primitive feature set generated based on the reconstructed image patch set includes:

[0022] Feature extraction is performed on the reconstructed image patch set based on convolutional neural network and feature pyramid network to generate the corresponding local deep feature map set. The local deep feature map set is then superimposed and fused into the region corresponding to the deep feature map to generate the reconstructed deep feature map.

[0023] Regional uncertainty assessment is performed on the reconstructed deep feature map to obtain the corresponding regional uncertainty assessment results. Initial recognition confidence is generated based on the semantic ambiguity contained in the regional uncertainty assessment results.

[0024] If the initial identification confidence level does not reach the predetermined threshold, the operation process of iterative feature extraction, regional uncertainty assessment, and super-resolution reconstruction is carried out.

[0025] If the initial recognition confidence reaches a predetermined threshold, a primitive feature set is generated based on the multi-level feature set corresponding to the super-resolution reconstruction.

[0026] Furthermore, the aforementioned regional uncertainty assessment is achieved through the following steps:

[0027] Sliding window segmentation is performed on the deep feature map to generate a corresponding set of local regions. The semantic ambiguity of each local region in the set of local regions is obtained. Each local region includes multiple deep feature vectors. The semantic ambiguity is represented by the average information entropy value corresponding to the category prediction probability distribution of all deep feature vectors in the region.

[0028] If the semantic ambiguity meets the first ambiguity condition, it means that the current region can distinguish the primitive categories, and the region is judged as a low uncertainty region and no processing is performed.

[0029] If the semantic ambiguity meets the second ambiguity condition, it means that the current region cannot distinguish the primitive category. The region is judged as a high uncertainty region. The spatial coordinates of the uncertain region and the corresponding semantic ambiguity are encapsulated into an uncertain region set, and the uncertain region set is output as the region uncertainty assessment result.

[0030] Furthermore, the above-mentioned construction of the primitive reasoning model, and the pre-training of the model using a pre-built training dataset, includes:

[0031] A first original dataset is constructed using a physical information neural network. The first original dataset is a virtual wiring diagram that conforms to preset circuit rules.

[0032] Obtain the identified wiring diagrams and perform causal mining on them to obtain the corresponding causal feature maps. Use a chaotic algorithm and the causal feature maps to apply perturbation to the identified wiring diagrams to generate a second original dataset.

[0033] Based on the iterative super-resolution reconstruction mechanism, features are extracted from the first and second original datasets to generate the corresponding model training datasets.

[0034] A graph primitive awareness submodule is constructed by jointly using an object detection network and a differentiable causal discovery layer. Graph primitive awareness is then performed based on a graph neural network to generate a graph primitive awareness knowledge graph, wherein:

[0035] The object detection network is used to process the input primitive feature set in parallel and output the bounding box coordinates and preliminary class probabilities of all primitives in the wiring diagram to be identified.

[0036] The differentiable causal discovery layer is used to perform differentiable optimization on the input set of primitive features and outputs a weighted adjacency matrix representing the strength of causal dependencies between primitives.

[0037] Furthermore, the above methods also include:

[0038] A perceptual reasoning submodule is constructed based on a pre-built primitive structure causal library and a counterfactual reasoning engine. The perceptual knowledge graph matches the corresponding structural causal model from the primitive structure causal library and performs reasoning in conjunction with the counterfactual reasoning engine to generate a reasoning confidence report. The primitive structure causal library contains multiple structural causal models. Each structural causal model contains a set of variables and their corresponding causal functions. The causal functions are represented using a fully connected neural network.

[0039] The primitive perception submodule and the perception reasoning submodule are trained independently using the model training dataset, where:

[0040] The primitive perception submodule uses a joint loss combining classification cross-entropy loss and bounding box regression loss for module training;

[0041] The perceptual reasoning submodule uses negative log-likelihood loss to train each structural causal model in the primitive structure causal library, uses multi-task cross-entropy loss to train the counterfactual reasoning engine, and uses an adversarial reinforcement training strategy for reinforcement training.

[0042] Furthermore, the aforementioned input of the primitive feature set into the primitive inference model for primitive recognition generates an initial primitive recognition result, and a primitive consistency verification mechanism is used for recognition verification, including:

[0043] After inputting the primitive feature set into the primitive reasoning model, the primitive perception submodule performs primitive recognition and causal reasoning based on the primitive feature set, generates a primitive perception knowledge graph, and outputs the primitive perception knowledge graph as the initial primitive recognition result.

[0044] The perception and reasoning submodule performs primitive consistency verification based on a primitive perception knowledge graph, generating recognition verification results. Primitive consistency verification includes at least visual-symbolic consistency verification, topological-geometric consistency verification, and causal-logical consistency verification; where:

[0045] Visual-symbol consistency verification is represented by back-projecting the edge connection relationship in the primitive perception knowledge graph to the corresponding position in the wiring diagram image to be identified, and checking whether there is corresponding pixel-level visual evidence.

[0046] Topology-geometric consistency verification means verifying the compatibility between the topological structure corresponding to the primitive-aware knowledge graph and the actual geometric position corresponding to the wiring diagram to be identified;

[0047] Causal-logical consistency verification is used to verify whether the graph structure identified in the graph perception knowledge graph is real and reasonable.

[0048] Furthermore, the initial primitive recognition result is iteratively optimized based on the recognition and verification results to generate accurate primitive recognition results, including:

[0049] Based on the recognition verification results, the iterative super-resolution reconstruction mechanism of step S2 is restarted. The regions that did not pass the recognition verification in the initial primitive recognition results are subjected to iterative loops of feature extraction, region uncertainty assessment and super-resolution reconstruction to obtain the second primitive feature set.

[0050] The second set of primitive features is input into the primitive inference model for primitive recognition and recognition verification, and the corresponding secondary recognition and verification results are obtained.

[0051] If the secondary recognition verification result shows that there are still areas that have not passed the recognition verification, then iteratively execute steps S2 to S3 until the preset iteration termination condition is reached.

[0052] If the secondary recognition verification result shows that there are no areas that fail the recognition verification, then the graphic element recognition result corresponding to the secondary recognition verification result will be output as the accurate graphic element recognition result.

[0053] Furthermore, the feedback dataset used to obtain accurate primitive recognition results is used to optimize the primitive inference model, including:

[0054] If there is a correction operation for the accurate primitive recognition result, then perform causal analysis on the sample cases corresponding to the correction operation to obtain the corresponding set of correction root causes;

[0055] An augmented training dataset is generated based on the modified root cause set. A federated learning mechanism is used to aggregate the augmented training datasets corresponding to each edge node of the deployed primitive inference model to generate a global incremental training dataset.

[0056] The graph primitive inference model is jointly controlled based on the global incremental training dataset to generate a global graph primitive inference model, which is then redeployed to each edge node.

[0057] Secondly, this application provides a wiring diagram element recognition system for super-resolution scenes, applicable to any one of the wiring diagram element recognition methods for super-resolution scenes in the first aspect, including:

[0058] The model building module is used to build a primitive reasoning model and pre-train the model using a pre-built training dataset.

[0059] The feature extraction module is used to iteratively extract features from the wiring diagram to be identified, and to enhance the features by combining them with a conditional generative adversarial network to generate a set of primitive features.

[0060] The recognition and verification module is used to input the primitive feature set into the primitive inference model to perform primitive recognition and recognition verification, and generate the initial primitive recognition result and recognition verification result.

[0061] The iterative optimization module is used to obtain the recognition verification results and iteratively optimize the initial primitive recognition results based on the recognition verification results to generate accurate primitive recognition results.

[0062] The feedback adjustment module is used to adjust the primitive inference model based on the feedback dataset of the accurate primitive recognition results.

[0063] Thirdly, this application provides an electronic device, including: at least one processor, at least one memory, and a data bus;

[0064] In this system, the processor and memory communicate with each other via a data bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute a wiring diagram element recognition method in a super-resolution scene, as described in any of the first aspects.

[0065] Fourthly, this application provides a non-transitory computer-readable storage medium that stores computer instructions, which cause the computer to execute any one of the methods for identifying wiring diagram elements in a super-resolution scene according to the first aspect.

[0066] Compared with the prior art, the present invention has at least the following beneficial effects:

[0067] 1. Construct a graph primitive reasoning model and pre-train the model using a pre-built training dataset. By embedding domain knowledge into the graph primitive reasoning model in a structured form, the final output satisfies the hard constraints of the electrical domain, thereby solving the problem that the output results violate the basic principles of the power grid.

[0068] 2. Based on the iterative super-resolution reconstruction mechanism, iterative feature extraction is performed on the wiring diagram to be identified, and feature enhancement is performed in combination with conditional generative adversarial network to generate a set of primitive features. By adopting a multi-round iterative optimization mechanism, directional super-resolution reconstruction is performed on the uncertain areas in the wiring diagram to be identified, thereby improving the feature representation quality of small primitives and ambiguous areas, and providing a high-quality data foundation for subsequent primitive recognition tasks.

[0069] 3. Input the primitive feature set into the primitive inference model for primitive recognition, generate initial primitive recognition results, and perform recognition verification in combination with primitive consistency verification mechanism. By performing cross-verification in three dimensions of visual-symbolic, topological-geometric and causal-logical, the credibility assessment of the recognition results is realized, thereby improving the interpretability of the output results.

[0070] 4. Obtain the recognition and verification results, iteratively optimize the initial primitive recognition results based on the recognition and verification results, generate accurate primitive recognition results, and optimize the primitive inference model based on the feedback dataset of the accurate primitive recognition results, thereby realizing accurate recognition of low-quality wiring diagrams and accurate tracing and reinforcement correction of erroneous primitive recognition outputs. Attached Figure Description

[0071] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:

[0072] Figure 1 This is a flowchart of the wiring diagram element recognition method in an embodiment of the present invention;

[0073] Figure 2 This is a schematic diagram of the element reasoning model in the wiring diagram element recognition method of this invention embodiment;

[0074] Figure 3 This is a connection diagram of the wiring diagram element recognition system in an embodiment of the present invention. Detailed Implementation

[0075] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0076] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0077] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0078] In the description of the embodiments of the present invention, "multiple" means at least two.

[0079] Example 1: This example provides a method for identifying wiring diagram elements in a super-resolution scenario, such as... Figure 1 and Figure 2 As shown, it includes the following steps:

[0080] Step S1: Construct a primitive reasoning model and pre-train the model using a pre-built training dataset; wherein, the primitive reasoning model includes a primitive perception submodule and a perception reasoning submodule.

[0081] Understandably, a physical information neural network is used to construct the first original dataset, which is represented as a virtual wiring diagram that conforms to the preset circuit rules. The identified wiring diagram is obtained, and causal mining is performed on the identified wiring diagram to obtain the corresponding causal feature map. A chaotic algorithm is used in combination with the causal feature map to apply perturbation to the identified wiring diagram to generate the second original dataset. Based on the iterative super-resolution reconstruction mechanism, features are extracted from the first original dataset and the second original dataset to generate the corresponding model training dataset.

[0082] In this embodiment, step S1 includes:

[0083] Step S1-1: Construct and train the primitive-aware submodule.

[0084] Specifically, a primitive perception submodule is constructed by jointly using an object detection network and a differentiable causal discovery layer. The module is trained using a model training dataset and a joint loss combining classification cross-entropy loss and bounding box regression loss.

[0085] Understandably, the object detection network is used to process the input primitive feature set in parallel and output the bounding box coordinates and preliminary class probabilities of all primitives in the wiring diagram to be identified. The differentiable causal discovery layer is used to perform differentiable optimization on the input primitive feature set and output a weighted adjacency matrix representing the strength of causal dependencies between primitives.

[0086] In one possible implementation, a pre-trained backbone network, such as ResNet-101, is redefined. This backbone network receives the set of primitive features within the input primitive inference model and performs further scaling, channel adaptation, and semantic refinement on them. Specifically, the backbone network processes the feature pyramid contained within the primitive feature set through its inherent convolutional layer structure, outputting a more structured and semantically richer enhanced feature pyramid. For example, if the original feature map size corresponding to the feature pyramid within the primitive feature set is 32x32x256, and assuming the predefined standard feature map size is 16x16x1024, the ResNet backbone network will convert the original feature map size to the predefined standard feature map size through its convolutional layers. At the same time, it integrates global context information to make the features more discriminative, thereby achieving secondary optimization of the input features and ensuring that the object detection network can obtain the highest quality data input.

[0087] The object detection network consists of a region proposal network and a detection head. First, the region proposal network generates candidate regions on the enhanced feature pyramid. Then, it extracts region features from the corresponding level through the RoIAlign operation. The detection head then outputs the class probability and bounding box coordinates for each primitive. For example, at the feature map (10,10), the region proposal network generates a candidate box centered at pixel (40,40) with a size of 56x56 pixels. After calculation by the region proposal network, it is found that this candidate box has an 85% probability of containing a primitive. The candidate box needs to be moved 2 pixels to the right, 1 pixel down, and its width increased by 5 pixels to more accurately select the primitive target. Subsequently, the detection head performs classification prediction on this corrected candidate box region, determining that the primitive category has a 90% probability of being a circuit breaker, an 8% probability of being a disconnector, and only a 2% probability of being a busbar.

[0088] A differentiable causal discovery layer is constructed, employing an improved differentiable variant of the NOTEARS algorithm. By building an optimization framework based on gradient descent, the causal dependencies between primitives identified by the object detection network are modeled as a learnable weighted adjacency matrix. Based on this weighted adjacency matrix, a primitive-aware knowledge graph is generated, which is a causal relationship network. To ensure the logical rationality of this causal relationship network, the matrix exponent trace is introduced as an acyclic constraint. By dynamically adjusting the matrix parameters during pre-training, the final output is guaranteed to be a directed acyclic graph that conforms to the circuit's operating rules. For example, after the object detection network identifies the feature vectors of circuit breaker QF1 and bus BUS1, the causal discovery layer, based on the multi-dimensional information contained in the vectors such as voltage amplitude, current phase, and switching state, performs feature fusion and causal inference through a multi-layer neural network. It infers that the voltage state of BUS1 is a key factor affecting the switching state of QF1, thus assigning higher weights to the connections from node BUS1 to node QF1 in the weighted adjacency matrix.

[0089] The model training dataset is input into the primitive awareness submodule to train the ResNet backbone network and the object detection network. The loss function includes the cross-entropy loss for class classification and the smooth L1 loss for bounding box regression, where the loss function can be expressed as L=L class +L box L class It is the cross-entropy loss for class determination, L box The loss is the smooth L1 distance between the predicted and ground truth boxes. By employing a stochastic gradient descent optimization strategy, the parameters of the ResNet backbone network and the object detection network are updated through backpropagation. This trains the primitive awareness submodule to accurately identify primitives from enhanced features. For example, a ground truth circuit breaker bounding box is [x=38, y=39, w=60, h=58], and the model's predicted bounding box is [x=40, y=41, w=56, h=56], where x represents the x-coordinate of the center point of the rectangle, y represents the y-coordinate of the center point of the rectangle, w represents the width of the rectangle, and h represents the height of the rectangle. Based on the corresponding loss function and combined with the gradient descent algorithm, the deviation loss between the bounding box and the predicted box is continuously reduced, thereby achieving the training of the ResNet backbone network and the object detection network.

[0090] After training the ResNet backbone and object detection network, the differentiable causal discovery layer and the corresponding graph neural network are jointly trained. For example, the model training dataset contains a very simple wiring diagram with only three primitive nodes: bus BUS1, circuit breaker QF1, and load LOAD1. The actual connection relationship between the three is that BUS1 connects to QF1, QF1 connects to LOAD1, and there is no direct connection between BUS1 and LOAD1. First, after the wiring diagram passes through the primitive perception submodule, a corresponding feature vector is generated for each primitive. The differentiable causal discovery layer receives the feature vectors of all nodes, transforms the feature vectors, calculates similarity, and outputs a causal adjacency matrix. Each element A[i,j] in matrix A is a normalized value representing the causal influence strength of node j on node i. Assuming that the causal adjacency matrix obtained in the first inference determines that BUS1 is mainly affected by LOAD1, QF1 is mainly affected by LOAD1, and LOAD1 is mainly affected by QF1.

[0091] Graph neural networks (GNNs) take primitive node features and a causal adjacency matrix as input. They aggregate features based on the strength of causal relationships corresponding to the causal adjacency matrix. For example, for a QF1 node, it aggregates more information from the LOAD1 node and less from the BUS1 node. Similarly, the other two primitive nodes are aggregated based on their corresponding causal relationship strengths. After several rounds of graph message passing, the GNN outputs a connection prediction vector for each node. This vector represents the probability that the node is connected to other nodes. For instance, if the predicted connection probabilities are: BUS1 connects to LOAD1 with an 85% probability, BUS1 connects to QF1 with a 20% probability, and QF1 connects to LOAD1 with a 20% probability... The probability is 70%. Based on the true connection relationships of the three primitive nodes, the corresponding true connection probabilities are generated as follows: the probability of BUS1 connecting to LOAD1 is 0, the probability of BUS1 connecting to QF1 is 1, and the probability of QF1 connecting to LOAD1 is 1. The binary cross-entropy loss between the predicted and true connection probabilities is obtained, and the binary cross-entropy loss of the suoshu tree is used as the edge prediction loss. The total loss is calculated according to the form of total loss = edge prediction loss + λ * L1 sparse regularization loss, where L1 sparse regularization loss is expressed as the sum of the absolute values ​​of all elements in the causal adjacency matrix, forcing the graph neural network to learn only a few strong causal relationships and avoiding learning fully connected, meaningless dense matrices. λ is the preset sparse regularization loss coefficient.

[0092] Backpropagation is performed based on the total loss. Since the true connection is that circuit breaker QF1 is connected to bus BUS1, and the initial value of A[BUS1,QF1] in the causal adjacency matrix is ​​too low, A[BUS1, QF1] represents the causal relationship strength of BUS1 connecting QF1. This causes the graph neural network to fail to effectively identify the connection, resulting in a huge edge prediction loss. During backpropagation, the gradient of the loss function with respect to A[BUS1,QF1] will be a significant positive value. This positive value means that the causal relationship strength currently assigned to BUS1 connecting QF1 is seriously insufficient, and this value must be increased to reduce the overall loss. Since A[BUS1,LOAD1] in the causal adjacency matrix is ​​assigned a high causal relationship strength, but there is no direct connection between BUS1 and LOAD1 in the true connection, the corresponding gradient will be negative, indicating that A[BUS1,LOAD1] must be reduced to eliminate the loss caused by false connections. By iteratively adjusting the parameters of the differentiable causal discovery layer, the joint training of the differentiable causal discovery layer and the graph neural network is completed.

[0093] Step S1-2: Construct and train the perceptual reasoning submodule.

[0094] Specifically, a perceptual reasoning submodule is constructed based on a pre-built primitive structure causal library and a counterfactual reasoning engine. The primitive structure causal library contains multiple structural causal models, each containing a set of variables and their corresponding causal functions. The causal functions are represented using fully connected neural networks. Each structural causal model in the primitive structure causal library is trained using a negative log-likelihood loss dataset. At the same time, the counterfactual reasoning engine is trained using multi-task cross-entropy loss and reinforced using an adversarial reinforcement training strategy.

[0095] In one possible embodiment, a primitive structure causal library is constructed. Each structural causal model contained in the library is represented as a parameterized model defined for power equipment such as circuit breakers and transformers. It includes a set of variables, such as control signals, mechanical states, and contact states, as well as a structural causal function based on a neural network representation. These causal functions are used to encode the causal mechanism between variables. For example, when constructing a structural causal model for a circuit breaker, the variables include control signals, mechanical states, and contact states as a variable group. The structural causal function can be represented as mechanical state = f_θ (control signal) and contact state = g_φ (mechanical state), where f_θ and g_φ represent fully connected neural networks. By defining a series of structural causal models for power equipment, each structural causal model can be used to simulate the power equipment existing in the wiring diagram.

[0096] A large amount of equipment operation data, such as circuit breaker operation sequences, is generated in the simulation environment. The parameters of the structural causal model contained in the primitive structural causal library are trained using maximum likelihood estimation. The loss function is negative log-likelihood loss. The training objective is to minimize the difference between the structural causal model prediction and the simulation data. Taking the training of the structural causal model of a circuit breaker as an example, assuming that its structural causal model contains three variables: X: control signal (0=open, 1=close), Y: mechanical state (0=fault, 1=normal), Z: circuit on / off (0=power off, 1=power on), the structural causal function is: Y=f_θ(X). The function represents predicting the mechanical state based on the control signal; Z=X*Y means that the circuit's on / off state depends on the success of the control signal and the normal mechanical state. Assuming a training dataset is {X=1,Y=1,Z=1}, based on this training dataset, Y=0.8 and Z=1*0.8=0.8 are obtained. By adjusting the parameters of the neural network f_θ using negative log-likelihood loss, the output value of Y is made closer to 1 when X=1 is encountered again. Through iterative training, the structural causal model of the circuit breaker can finally represent the physical rule that "under the closing command, if the mechanical state of the circuit breaker is normal, then the circuit is energized".

[0097] A counterfactual reasoning engine is constructed, which includes a fact predictor, an intervention predictor, and a counterfactual predictor. The counterfactual reasoning engine performs counterfactual reasoning based on do-calculus and a causal graph structure. The fact predictor is used to predict the observed conditions. For example, if the input is X=1, Y=1, the question is what Z will be, and the output is Z=1. The intervention predictor is used to simulate the result after active operation. For example, if the input is X=1, Y=0, the intervention is do (X=0), the question is what Z will be, and the output is Z=0. The counterfactual predictor is used to handle hypothetical scenarios. For example, if the input is X=1, Y=0, Z=0, the question is what Z will be if Y=1 at that time, and the output is Z=1.

[0098] A supervised training strategy is employed to pre-train the counterfactual reasoning engine. Specifically, a question-and-answer dataset containing fact queries, intervention queries, and counterfactual queries is constructed. Based on this dataset, the fact predictor is trained to perform basic state reasoning under known conditions. The intervention predictor is trained to understand how the system state will change after a forced change in a variable. The counterfactual predictor is trained to infer possible outcomes under different historical conditions. During training, the counterfactual reasoning engine calls the structural causal model contained in the primitive structure causal library to reason about query answers. Multi-task cross-entropy loss is used to obtain the training loss between the reasoned answer and the true answer. The parameters of the counterfactual reasoning engine are optimized by backpropagation based on the training loss. Through iterative training, the internal parameters of the counterfactual reasoning engine are continuously optimized, ultimately enabling the counterfactual reasoning engine to accurately and efficiently use the primitive structure causal library for counterfactual reasoning.

[0099] The counterfactual reasoning engine is optimized using adversarial reinforcement training. Specifically, contradictory observation data is intentionally provided in the simulation environment, such as hiding new rules or incorrect labels. A reward function is designed, for example, a +10 reward is applied for correct identification of a new rule, while a -5 penalty is applied for incorrect identification. The engine's conflict detection and hypothesis generation capabilities are trained using a proximate policy optimization algorithm. For instance, if the primitive reasoning model consistently misidentifies a novel normally closed contact as a regular switch, an adversarial reinforcement graph is provided during the training process, showing the contact in a normally closed state. According to the old rules, it is still identified as a tripped switch. The counterfactual reasoning engine reasones that if it is a tripped switch, the entire circuit should be de-energized. However, the telemetry data feedback circuit is energized, which causes a conflict. The counterfactual reasoning engine generates a hypothesis that "this element may not be an ordinary switch, but a normally closed device." If this hypothesis is subsequently verified to be correct, the engine receives a +10 reward. Through multiple similar training sessions, the counterfactual reasoning engine is forced to learn to prioritize generating the hypothesis that "a new device type may exist" when encountering similar scenarios, rather than rigidly adhering to the old rules, thereby improving the reasoning accuracy of the perception reasoning module.

[0100] Step S2: Based on the iterative super-resolution reconstruction mechanism, iterative feature extraction is performed on the wiring diagram to be identified, and feature enhancement is performed in combination with a conditional generative adversarial network to generate a primitive feature set.

[0101] Specifically, features are extracted from the wiring diagram to be identified based on convolutional neural networks and feature pyramid networks to generate multi-level feature sets, which include shallow feature maps and deep feature maps. Regional uncertainty assessment is performed on the deep feature maps to obtain the regional uncertainty assessment results. The regional uncertainty assessment results are used to quantify the degree to which recognition is difficult in local areas within the current feature map due to the ambiguity of primitive semantic information.

[0102] Based on the set of uncertain regions, the corresponding uncertain regions are cropped from the wiring diagram to be identified and the shallow feature map to obtain the corresponding original image block set and shallow feature image block set. The original image block set and shallow feature image block set are input into the conditional generative adversarial network to perform super-resolution reconstruction of the original image block set and generate the corresponding reconstructed image block set.

[0103] Understandably, a shallow feature map represents the feature map spectrum corresponding to the wiring diagram to be identified in a high-resolution state, and each shallow feature vector in the feature map spectrum is used to characterize the primitive details of the wiring diagram to be identified; a deep feature map represents the feature map spectrum corresponding to the wiring diagram to be identified in a low-resolution state, and each deep feature vector in the feature map spectrum is used to characterize the primitive semantic information of the wiring diagram to be identified.

[0104] Furthermore, features are extracted from the reconstructed image patch set based on convolutional neural network and feature pyramid network to generate corresponding local deep feature map set. The local deep feature map set is then superimposed and fused to the region corresponding to the deep feature map to generate reconstructed deep feature map. Regional uncertainty assessment is performed on the reconstructed deep feature map to obtain the corresponding regional uncertainty assessment result. Initial recognition confidence is generated based on the semantic ambiguity contained in the regional uncertainty assessment result.

[0105] If the initial identification confidence level does not reach the predetermined threshold, the operation process of iterative feature extraction, regional uncertainty assessment, and super-resolution reconstruction is carried out.

[0106] If the initial recognition confidence reaches a predetermined threshold, the process ends, and a primitive feature set is generated based on the multi-level feature set corresponding to the super-resolution reconstruction.

[0107] Understandably, regional uncertainty assessment is represented by performing a sliding window segmentation on the deep feature map to generate a corresponding set of local regions, and obtaining the semantic ambiguity corresponding to each local region within the set of local regions. The local region includes multiple deep feature vectors, and the semantic ambiguity is represented by the average information entropy value corresponding to the category prediction probability distribution of all deep feature vectors in the region.

[0108] If the semantic ambiguity meets the first ambiguity condition, it means that the current region can distinguish the primitive categories, and the region is judged as a low uncertainty region and no processing is performed.

[0109] If the semantic ambiguity meets the second ambiguity condition, it means that the current region cannot distinguish the primitive category. The region is judged as a high uncertainty region. The spatial coordinates of the uncertain region and the corresponding semantic ambiguity are encapsulated into an uncertain region set, and the uncertain region set is output as the region uncertainty assessment result.

[0110] In one possible embodiment, a convolutional neural network and a feature pyramid network are used to perform multi-scale feature extraction on the wiring diagram to be identified, generating a feature pyramid {P2, P3, P4, P5}, where P2 has the highest spatial resolution (e.g., 1 / 4 of the wiring diagram) and contains the richest texture details; P5 has the lowest spatial resolution (e.g., 1 / 32 of the wiring diagram) and contains the richest semantic information. Then, a sliding window analysis is performed on the P5 feature map, i.e., the deep feature map, with each window size set to 3x3. A lightweight fully connected layer is used to calculate the probability distribution of the feature vector at each spatial location on a predefined category, and the uncertainty value is calculated using the Shannon entropy formula based on the natural logarithm. This uncertainty value is used as the semantic ambiguity, and the uncertainty values ​​at all locations are combined to construct a semantic ambiguity map with the same resolution as P5. For example, when processing a 512x512 substation wiring diagram, the P5 feature map size is 16x16. It is found that the feature vector at point A has a recognition probability of 0.4 for the circuit breaker category, 0.3 for the disconnector, and 0.3 for the busbar. The corresponding semantic ambiguity is 1.09. Assuming that analysis of historical data yields the following conditions: the first ambiguity condition is that the semantic ambiguity does not exceed 0.3 and the maximum primitive category recognition probability is not less than 0.68; the second ambiguity condition is that the semantic ambiguity is not less than 0.3 and the absolute value of the difference between primitive category recognition probabilities does not exceed 0.13. It should be noted that the greater the semantic ambiguity, the more ambiguous the current area, meaning it is more difficult to recognize primitives. Since the data at point A meets the second ambiguity condition, this indicates that the location is semantically ambiguous and belongs to a high-uncertainty area.

[0111] Non-maximum suppression is applied to the semantic ambiguity heatmap to select corresponding local extrema as super-resolution candidate centers. For each super-resolution candidate center, the size and shape of the corresponding region of interest are dynamically generated based on its corresponding semantic ambiguity and semantic consistency with adjacent regions. For example, a super-resolution candidate center corresponds to a circuit breaker symbol region, and this region is distributed in an elliptical shape with a major axis of about 30 pixels and a minor axis of about 15 pixels. After analyzing the semantic ambiguity and semantic consistency with adjacent regions through the proposal network, an elliptical region of interest with a major axis of 35 pixels and a minor axis of 20 pixels is generated. The elliptical region of interest is then super-resolutiond by 4 times, thereby ensuring complete coverage of the target corresponding to the super-resolution candidate center while minimizing background interference.

[0112] All regions of interest are aggregated and encapsulated into a set of uncertain regions. For each uncertain region, the corresponding low-resolution block is extracted from the original image of the wiring diagram to be identified. At the same time, the low-level texture features corresponding to P2 in the feature pyramid, the high-level semantic features from P5, and the semantic ambiguity of the region in the semantic ambiguity heatmap are obtained and encapsulated into a set of uncertain region conditions. The set of uncertain region conditions is input into a conditional generative adversarial network for super-resolution reconstruction, and finally outputs the corresponding set of reconstructed image blocks. For example, a 32x32 pixel blurred circuit breaker region, combined with the arc texture features from P2 and the circuit breaker semantic label from P5, is reconstructed by the conditional generative adversarial network into a 128x128 high-resolution reconstructed image block.

[0113] Each reconstructed image patch is treated as an independent input region. Features are re-extracted using a convolutional neural network and a feature pyramid network to generate corresponding local deep feature maps. These local deep feature maps are then directly replaced or superimposed onto the corresponding regions in the global deep feature map of the current loop to generate a reconstructed deep feature map. For example, old features representing the fuzzy circuit breaker region are replaced with new features extracted from the reconstructed image patch, generating a locally enhanced reconstructed deep feature map. Regional uncertainty is assessed on the reconstructed deep feature map, and the corresponding regional uncertainty assessment results are obtained. An initial recognition confidence score is generated based on the semantic ambiguity contained in the regional uncertainty assessment results. Specifically, the average semantic ambiguity and worst semantic ambiguity corresponding to the semantic ambiguity heatmap are calculated, and the initial recognition confidence score is generated based on the average semantic ambiguity and worst semantic ambiguity. The semantic ambiguity is used to generate corresponding first and second recognition confidence scores, where the first recognition confidence score = 1 - average semantic ambiguity, and the second recognition confidence score = 1 - worst semantic ambiguity. The first and second recognition confidence scores are weighted and fused to generate the initial recognition confidence score. For example, if the average semantic ambiguity of all semantic ambiguities in the entire semantic ambiguity heatmap is 0.15, then the first recognition confidence score = 1 - 0.15 = 0.85; if the maximum semantic ambiguity value in the semantic ambiguity heatmap is 0.25, then the corresponding second recognition confidence score is 1 - 0.25 = 0.75. By weighted averaging, the first and second recognition confidence scores are weighted and fused to obtain the final initial recognition confidence score of (0.85 + 0.75) * 0.5 = 0.8.

[0114] The initial recognition confidence is compared with a pre-set threshold. If the initial recognition confidence does not reach the predetermined threshold, the process does not end. Based on the latest uncertainty assessment results, areas that are still blurry or highly uncertain are re-identified, and the process jumps back to the super-resolution reconstruction step. For these new or still unresolved uncertain areas, a new round of super-resolution feature enhancement and region uncertainty assessment is initiated, continuously improving the corresponding initial recognition confidence through iterative loops until the predetermined threshold is reached. For example, if the first loop processes the circuit breaker and disconnector areas, before the second loop begins, the initial recognition confidence of the entire feature map is reassessed. If it is found that the initial recognition confidence has not reached the predetermined threshold, a second iterative loop is required. The semantic ambiguity of the circuit breaker area has decreased from the initial 0.8 to 0.25, and the maximum primitive category recognition probability has increased to 0.85, satisfying the first ambiguity condition. Therefore, no further processing is needed for the circuit breaker area. However, the semantic ambiguity of the disconnector area has only decreased from 0.75 to 0.5, still not satisfying the first ambiguity condition. Additionally, a previously obscured grounding switch area was also found to be unsatisfactory. Therefore, the second round of iteration will perform super-resolution feature enhancement and regional uncertainty assessment on the disconnector and grounding switch areas until the initial recognition confidence reaches a predetermined threshold. If the initial recognition confidence reaches the predetermined threshold, the iteration terminates. The high-quality, multi-level feature set obtained after multiple rounds of optimization will then be output as the primitive feature set.

[0115] Step S3: Input the primitive feature set into the primitive inference model for primitive recognition, generate the initial primitive recognition result, and perform recognition verification in conjunction with the primitive consistency verification mechanism.

[0116] Specifically, after inputting the primitive feature set into the primitive reasoning model, the primitive perception submodule performs primitive recognition and causal reasoning based on the primitive feature set, generates a primitive perception knowledge graph, and outputs the primitive perception knowledge graph as the initial primitive recognition result. The perception reasoning submodule performs primitive consistency verification based on the primitive perception knowledge graph and generates recognition verification results. Primitive consistency verification includes at least visual-symbolic consistency verification, topological-geometric consistency verification, and causal-logical consistency verification.

[0117] Understandably, visual-symbolic consistency verification involves back-projecting the edge connections in the primitive-aware knowledge graph to the corresponding positions in the wiring diagram image to be identified, and checking whether there is corresponding pixel-level visual evidence; topological-geometric consistency verification involves verifying that the topological structure corresponding to the primitive-aware knowledge graph is compatible with the actual geometric position corresponding to the wiring diagram to be identified; and causal-logical consistency verification involves verifying whether the primitive structure identified in the primitive-aware knowledge graph is real and reasonable.

[0118] In one possible embodiment, when generating a primitive-aware knowledge graph, the primitive-aware submodule attaches the corresponding image region coordinates to each connection in the primitive-aware knowledge graph. During visual-symbolic consistency verification, it extracts the corresponding high-resolution features based on the image region coordinates of the region to be verified and analyzes the corresponding features, such as edge continuity and color consistency, using a pre-trained convolutional kernel. At the same time, the perception inference submodule provides the visual features that the feature should have as a reference standard for verification. For example, high-voltage connection lines are usually thicker than control lines. For instance, if the perception module identifies that circuit breaker QF1 is connected to disconnector QS1, during visual-symbolic consistency verification, it first locates the image region between these two primitives. After extracting features, it finds obvious pixel-level breaks, such as blank spaces in the middle of the line segment and the color features of the blank area being no different from the background features of the wiring diagram. In this case, it marks the connection "circuit breaker QF1 is connected to disconnector QS1" as having insufficient visual evidence, thereby reducing its corresponding recognition confidence. Conversely, if a clear continuous line segment is detected and matches the corresponding visual features, the verification passes.

[0119] The topology-geometric consistency check involves obtaining the precise geometric coordinates of all elements within the element-aware knowledge graph and calculating the spatial rationality of each connection relationship in the graph. Specifically, it calculates whether the Euclidean distance between two directly connected elements is within a preset threshold, which is determined based on historical data. It also determines whether the connection path violates the physical spatial hierarchy and whether the connection point is located on a reasonable terminal block of the element. For example, if there is a transformer T1 directly connected to a low-voltage cabinet L1 on the other side of the wiring diagram to be identified within the element-aware knowledge graph, calculations show that the distance between the center points of the two elements, transformer T1 and low-voltage cabinet L1, exceeds a predetermined threshold. Furthermore, the connection line needs to directly cross multiple power equipment areas, which seriously violates the common sense of spatial layout in electrical wiring diagrams. At the same time, the perception and reasoning submodule will indicate that large transformers are usually connected via busbar bridges and are not directly connected to low-voltage cabinets, further confirming the spatial irrationality of the connection. Therefore, the topology-geometric consistency check of this connection is deemed to have failed.

[0120] The causal-logical consistency check is performed by the perceptual reasoning submodule, which retrieves the structural causal model corresponding to the primitive node in the primitive perceptual knowledge graph from the primitive structure causal library. The primitive state (node ​​attribute) of the primitive node is then input into the structural causal model to perform causal forward reasoning. The result of the causal forward reasoning is compared with the corresponding attribute in the primitive perceptual knowledge graph to check whether the primitive structure is true and reasonable. For example, if the circuit breaker node QF1 in the primitive perceptual knowledge graph is in the open state, but its corresponding line L1 is marked as energized, the perceptual reasoning submodule inputs the circuit breaker node QF1 being in the open state into the corresponding circuit breaker structural causal model for forward reasoning. It deduces that if the circuit breaker node QF1 is in the open state, then line L1 should be in the de-energized state. This deduction directly contradicts the energized state in the graph, causing the causal-logical consistency check to fail. Furthermore, the identification of the state of QF1 or the energized state of L1 may be incorrect.

[0121] Based on the verification results of visual-symbolic consistency verification, topological-geometric consistency verification, and causal-logical consistency verification, recognition verification results are generated. For example, some recognition verification results can be represented as: {global confidence vector: [0.87, 0.92, 0.78], node-level confidence matrix:}

[0122] {[0.95, 0.93, 0.88], [0.98, 0.96, 0.92], [0.82, 0.85, 0.65]}, edge-level confidence matrix: {[0.96, 0.94, 0.89], [0.75, 0.88, 0.62]}}, where the three elements corresponding to the global confidence vector represent the global confidence scores for visual-symbolic consistency verification, topological-geometric consistency verification, and causal-logical consistency verification, respectively; each node-level confidence matrix... Each row vector corresponds to a primitive node, and each column represents the visual, topological, and causal verification confidence scores of that node. For example, [0.87, 0.92, 0.78] indicates that the visual-symbolic consistency verification confidence score, topological-geometric consistency verification confidence score, and causal-logical consistency verification confidence score of that primitive node are 0.87, 0.92, and 0.78, respectively. Similarly, each row vector of the edge-level confidence matrix corresponds to a connection relationship, and each column represents the visual, topological, and causal verification confidence scores of that node.

[0123] Step S4: Obtain the recognition verification result, and iteratively optimize the initial primitive recognition result based on the recognition verification result to generate an accurate primitive recognition result.

[0124] Specifically, based on the recognition and verification results, the iterative super-resolution reconstruction mechanism of step S2 is restarted. For the regions in the initial primitive recognition results that did not pass the recognition verification, the iterative loop of feature extraction, region uncertainty assessment and super-resolution reconstruction is performed again to obtain the second primitive feature set. The second primitive feature set is input into the primitive inference model for primitive recognition and recognition verification to obtain the corresponding secondary recognition and verification results.

[0125] If the secondary recognition verification result shows that there are still areas that have not passed the recognition verification, then the process of steps S2 to S3 is executed iteratively until the preset iteration termination condition is reached.

[0126] If the secondary recognition verification result shows that there are no areas that fail the recognition verification, then the graphic element recognition result corresponding to the secondary recognition verification result will be output as the accurate graphic element recognition result.

[0127] Understandably, the preset iteration termination conditions include two conditions: the absence of regions that have failed the identification verification and the reaching of a predetermined number of iterations. The iteration can end if either condition is met. The termination condition of the absence of regions that have failed the identification verification indicates that the current model has completely identified all the primitives in the wiring diagram to be identified, and no further identification is needed. Reaching the predetermined number of iterations indicates that the current identification result has reached the optimal effect of the model, and continuing the iteration loop is meaningless. To avoid getting trapped in local optima or wasting computing resources, the loop should end at this time. At the same time, the unidentified regions in the wiring diagram to be identified are marked, a high-difficulty identification task package is generated, and it is submitted to the human-computer interface for manual judgment. Finally, an incremental learning package is generated based on the information from this manual judgment for subsequent incremental training of the primitive reasoning model.

[0128] Step S5: Obtain the feedback dataset of accurate primitive recognition results, and optimize the primitive inference model based on the feedback dataset.

[0129] Specifically, if there is a correction operation for the accurate primitive recognition result, then the sample cases corresponding to the correction operation are subjected to causal analysis to obtain the corresponding correction root cause set. An enhanced training dataset is generated based on the correction root cause set. The enhanced training datasets corresponding to each edge node of the primitive inference model are aggregated using a federated learning mechanism to generate a global incremental training dataset. The primitive inference model is jointly controlled based on the global incremental training dataset to generate a global primitive inference model. The global primitive inference model is then redeployed to each edge node.

[0130] For example, suppose the primitive inference model misidentifies a novel digital relay in a wiring diagram as a traditional mechanical relay. After the expert corrects the error, the feedback adjustment module first extracts the primitive feature set corresponding to the primitive and finds that its shape features are 85% similar to those of a mechanical relay, but there are significant differences in the internal symbol feature dimension. By tracing back the decision-making process of the primitive inference model, it is found that the root cause of the misjudgment is that the primitive perception submodule lacks feature representation of the novel component. At this time, a conditional generative adversarial network is used to generate variant samples of the novel digital relay. Specifically, the original image of the novel digital relay is subjected to controllable semantic editing, that is, the appearance features of the relay are modified while retaining the background environment, generating a corresponding enhanced training dataset. The primitive inference model is then adjusted based on the enhanced training dataset.

[0131] Example 2: This application provides a wiring diagram element recognition system for super-resolution scenarios, applied to a wiring diagram element recognition method for super-resolution scenarios in Example 1, such as... Figure 3 As shown, it includes:

[0132] The model building module is used to build a primitive reasoning model and pre-train the model using a pre-built training dataset.

[0133] The feature extraction module is used to iteratively extract features from the wiring diagram to be identified, and to enhance the features by combining them with a conditional generative adversarial network to generate a set of primitive features.

[0134] The recognition and verification module is used to input the primitive feature set into the primitive inference model to perform primitive recognition and recognition verification, and generate the initial primitive recognition result and recognition verification result.

[0135] The iterative optimization module is used to obtain the recognition verification results and iteratively optimize the initial primitive recognition results based on the recognition verification results to generate accurate primitive recognition results.

[0136] The feedback adjustment module is used to adjust the primitive inference model based on the feedback dataset of the accurate primitive recognition results.

[0137] The specific usage and function of this embodiment are explained below:

[0138] First, a graph-based reasoning model is constructed and pre-trained using a training dataset. Electrical domain knowledge is embedded into the graph-based reasoning model in a structured form, so that the final output meets the hard constraints of the basic principles of the power grid.

[0139] Next, based on the iterative super-resolution reconstruction mechanism, iterative feature extraction is performed on the wiring diagram to be identified, and feature enhancement is performed in combination with conditional generative adversarial network to generate a set of primitive features. Through multiple rounds of iterative optimization, directional super-resolution reconstruction is performed on the uncertain areas in the wiring diagram to be identified, thereby improving the feature representation quality of small primitives and ambiguous areas in the wiring diagram to be identified, and providing a high-quality data foundation for subsequent primitive recognition.

[0140] Then, the set of primitive features is input into the primitive inference model for primitive recognition, generating an initial primitive recognition result. The recognition is then verified by combining the primitive consistency verification mechanism. By performing cross-verification in three dimensions—visual-symbolic, topological-geometric, and causal-logical—the credibility of the recognition result is evaluated, thereby improving the interpretability and accuracy of the primitive recognition result.

[0141] Finally, the identification and verification results are obtained, and the initial primitive identification results are iteratively optimized based on the identification and verification results to generate accurate primitive identification results. The primitive inference model is then optimized based on the feedback dataset of the accurate primitive identification results, thereby achieving accurate identification of low-quality wiring diagrams and accurate tracing and reinforcement correction of erroneous primitive identification outputs.

[0142] Example 3: This application provides an electronic device, including: at least one processor, at least one memory, and a data bus;

[0143] In this system, the processor and the memory communicate with each other via a data bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute a wiring diagram element recognition method in a super-resolution scene, as described in Embodiment 1.

[0144] Example 4: This application provides a non-transitory computer-readable storage medium that stores computer instructions, which cause the computer to execute a wiring diagram element recognition method in a super-resolution scene according to Example 1.

[0145] 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.

[0146] 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.

[0147] 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.

[0148] 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.

[0149] Those skilled in the art will understand that all or part of the steps in the above facts and methods can be implemented by a program instructing related hardware. The program or the program described therein can be stored in a computer-readable storage medium. When the program is executed, it includes the following steps: at this time, the corresponding method steps are introduced. The storage medium can be ROM / RAM, magnetic disk, optical disk, etc.

[0150] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for identifying wiring diagram elements in a super-resolution scene, characterized in that, It includes the following steps: S1: Construct a primitive reasoning model and pre-train the model using a pre-constructed training dataset. The primitive reasoning model includes a primitive perception submodule and a perception reasoning submodule. S2: Based on the iterative super-resolution reconstruction mechanism, iterative feature extraction is performed on the wiring diagram to be identified, and feature enhancement is performed in combination with conditional generative adversarial network to generate primitive feature set; The generation process of the primitive feature set is represented as extracting features from the wiring diagram to be identified based on a convolutional neural network and a feature pyramid network, generating a multi-level feature set, which includes shallow feature maps and deep feature maps. The shallow feature map is represented as the feature map spectrum corresponding to the wiring diagram to be identified in a high-resolution state. Each shallow feature vector in the feature map spectrum is used to characterize the primitive details of the wiring diagram to be identified. The deep feature map is represented as the feature map spectrum corresponding to the wiring diagram to be identified in the low-resolution state. Each deep feature vector in the feature map spectrum is used to characterize the primitive semantic information of the wiring diagram to be identified. The deep feature map is subjected to regional uncertainty assessment to obtain the regional uncertainty assessment result. The regional uncertainty assessment result is used to quantify the degree to which the recognition is difficult in a local area within the current feature map due to the ambiguity of primitive semantic information. Based on the set of uncertain regions, the corresponding uncertain regions are cropped from the wiring diagram to be identified and the shallow feature map to obtain the corresponding set of original image blocks and set of shallow feature image blocks; The original image patch set and the shallow feature image patch set are input into a conditional generative adversarial network to perform super-resolution reconstruction of the original image patch set, generating a corresponding reconstructed image patch set. Feature extraction is performed on the reconstructed image patch set based on convolutional neural network and feature pyramid network to generate a corresponding local deep feature map set, and the local deep feature map set is superimposed and fused to the region corresponding to the deep feature map to generate a reconstructed deep feature map. The reconstructed deep feature map is subjected to regional uncertainty assessment to obtain the corresponding regional uncertainty assessment result. An initial recognition confidence score is generated based on the semantic ambiguity contained in the regional uncertainty assessment result. If the initial identification confidence level does not reach the predetermined threshold, the operation process of iterative feature extraction, regional uncertainty assessment, and super-resolution reconstruction is carried out. If the initial recognition confidence reaches the predetermined threshold, the process ends, and a primitive feature set is generated based on the multi-level feature set corresponding to the super-resolution reconstruction. S3: Input the set of primitive features into the primitive inference model for primitive recognition, generate an initial primitive recognition result, and perform recognition verification in conjunction with the primitive consistency verification mechanism; S4: Obtain the recognition verification result, and iteratively optimize the initial primitive recognition result based on the recognition verification result to generate an accurate primitive recognition result; S5: Obtain a feedback dataset of accurate primitive recognition results, and optimize the primitive inference model based on the feedback dataset.

2. The method for identifying wiring diagram elements in a super-resolution scene according to claim 1, characterized in that, The regional uncertainty assessment includes: Sliding window segmentation is performed on the deep feature map to generate a corresponding set of local regions, and the semantic ambiguity of each local region in the set of local regions is obtained. The local region includes multiple deep feature vectors, and the semantic ambiguity is represented by the average information entropy value corresponding to the category prediction probability distribution of all deep feature vectors in the region. If the semantic ambiguity satisfies the first ambiguity condition, it means that the current region can distinguish the primitive category, and the region is determined to be a low uncertainty region, and no processing is performed. If the semantic ambiguity satisfies the second ambiguity condition, it means that the current region cannot distinguish the primitive category, and the region is judged as a high uncertainty region. The spatial coordinates of the uncertain region and the corresponding semantic ambiguity are encapsulated into an uncertain region set, and the uncertain region set is output as the region uncertainty assessment result.

3. The method for identifying wiring diagram elements in a super-resolution scene according to claim 1, characterized in that, Construct a graph primitive reasoning model and pre-train the model using a pre-built training dataset, including: A first original dataset is constructed using a physical information neural network, and the first original dataset is represented as a virtual wiring diagram that conforms to preset circuit rules; Obtain the identified wiring diagram, perform causal mining on the identified wiring diagram to obtain the corresponding causal feature map, apply a chaotic algorithm and combine the causal feature map to perturb the identified wiring diagram to generate a second original dataset; Based on the iterative super-resolution reconstruction mechanism, features are extracted from the first original dataset and the second original dataset to generate the corresponding model training dataset. A graph perception submodule is constructed by jointly using an object detection network and a differentiable causal discovery layer, and graph perception is performed based on graph neural networks to generate a graph perception knowledge graph. The target detection network is used to process the input primitive feature set in parallel and output the bounding box coordinates and preliminary class probabilities of all primitives in the wiring diagram to be identified. The differentiable causal discovery layer is used to perform differentiable optimization on the input primitive feature set and output a weighted adjacency matrix representing the strength of causal dependencies between primitives.

4. The wiring diagram element recognition method in a super-resolution scene according to claim 3, characterized in that, The method further includes: Based on a pre-built graph structure causal library and counterfactual reasoning engine, a perceptual reasoning submodule is constructed. According to the graph perception knowledge graph, the corresponding structural causal model is matched from the graph structure causal library, and the reasoning is performed in combination with the counterfactual reasoning engine to generate a reasoning confidence report. The primitive structure causal library contains multiple structural causal models. Each structural causal model contains a set of variables and their corresponding causal functions, wherein the causal functions are represented using fully connected neural networks. The primitive perception submodule and the perception reasoning submodule are trained independently using the model training dataset. The primitive perception submodule uses a joint loss combining classification cross-entropy loss and bounding box regression loss for module training. The perception reasoning submodule uses negative log-likelihood loss to train each structural causal model in the primitive structure causal library, uses multi-task cross-entropy loss to train the counterfactual reasoning engine, and uses an adversarial reinforcement training strategy for reinforcement training.

5. The method for identifying wiring diagram elements in a super-resolution scene according to claim 1, characterized in that, The primitive feature set is input into the primitive inference model for primitive recognition, generating an initial primitive recognition result. This result is then verified using a primitive consistency check mechanism, including: After the primitive feature set is input into the primitive reasoning model, the primitive perception submodule performs primitive recognition and causal reasoning based on the primitive feature set, generates a primitive perception knowledge graph, and outputs the primitive perception knowledge graph as the initial primitive recognition result. The perception and reasoning submodule performs graph consistency verification based on the graph perception knowledge graph and generates recognition verification results. The graph consistency verification includes at least visual-symbolic consistency verification, topological-geometric consistency verification, and causal-logical consistency verification. The visual-symbol consistency check is represented by back-projecting the edge connection relationship in the primitive perception knowledge graph to the corresponding position in the wiring diagram image to be identified, and checking whether there is corresponding pixel-level visual evidence. Topology-geometric consistency verification means verifying the compatibility between the topological structure corresponding to the primitive-aware knowledge graph and the actual geometric position corresponding to the wiring diagram to be identified; Causal-logical consistency verification is used to verify whether the graph structure identified in the graph perception knowledge graph is real and reasonable.

6. The method for identifying wiring diagram elements in a super-resolution scene according to claim 1, characterized in that, Obtain the recognition verification result, and iteratively optimize the initial primitive recognition result based on the recognition verification result to generate an accurate primitive recognition result, including: Based on the recognition and verification results, the iterative super-resolution reconstruction mechanism in step S2 is restarted. The regions that did not pass the recognition and verification in the initial primitive recognition results are subjected to iterative cycles of feature extraction, region uncertainty assessment, and super-resolution reconstruction to obtain the second primitive feature set. The second set of primitive features is input into the primitive inference model for primitive recognition and recognition verification, and the corresponding secondary recognition and verification results are obtained. If the secondary recognition verification result shows that there are still areas that have not passed the recognition verification, then the process of steps S2 to S3 is executed iteratively until the preset iteration termination condition is reached. If the secondary recognition verification result shows that there are no areas that fail the recognition verification, then the graphic element recognition result corresponding to the secondary recognition verification result will be output as the accurate graphic element recognition result.

7. The method for identifying wiring diagram elements in a super-resolution scene according to claim 1, characterized in that, Obtain a feedback dataset of accurate primitive recognition results, and perform feedback optimization on the primitive inference model based on the feedback dataset, including: If there is a correction operation for the accurate primitive recognition result, then perform causal analysis on the sample cases corresponding to the correction operation to obtain the corresponding set of correction root causes; An enhanced training dataset is generated based on the modified root cause set. The enhanced training datasets corresponding to each edge node of the deployed primitive inference model are aggregated using a federated learning mechanism to generate a global incremental training dataset. The graph primitive inference model is jointly controlled based on the global incremental training dataset to generate a global graph primitive inference model, which is then redeployed to each edge node.

8. A wiring diagram element recognition system for super-resolution scenes, used to implement the wiring diagram element recognition method for super-resolution scenes according to any one of claims 1 to 7, characterized in that, include: A model building module is used to build a primitive reasoning model and pre-train the model using a pre-built training dataset. The feature extraction module is used to iteratively extract features from the wiring diagram to be identified, and to enhance the features by combining them with a conditional generative adversarial network to generate a set of primitive features. The recognition and verification module is used to input the primitive feature set into the primitive inference model to perform primitive recognition and recognition verification, and generate initial primitive recognition results and recognition verification results. An iterative optimization module is used to obtain the recognition verification result and iteratively optimize the initial primitive recognition result based on the recognition verification result to generate an accurate primitive recognition result. The feedback adjustment module is used to adjust the primitive inference model based on the feedback dataset of the accurate primitive recognition results.

Citation Information

Patent Citations

  • Power grid wiring diagram automatic analysis system and method based on deep learning

    CN120450895A

  • Intelligent diagnosis method for electrical equipment primitive state recognition and rule fusion

    CN121302195A