Power distribution network defect intelligent detection method and system based on knowledge graph and graph thinking chain
By constructing a structured reasoning path based on knowledge graphs and graph thinking chains, the problems of low efficiency and poor accuracy in power distribution network defect detection are solved, and efficient and interpretable defect detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID HUBEI ELECTRIC POWER RES INST
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-16
AI Technical Summary
Existing technologies for power distribution network defect detection suffer from problems such as low efficiency, high subjectivity, limited coverage, insufficient interpretability of model reasoning, high cost of knowledge graph construction, difficulty in guaranteeing knowledge accuracy, and lack of graph structure information in the reasoning process of visual-language models.
By employing a knowledge graph and graph thinking chain-based approach, a structured reasoning path is constructed through multimodal data preprocessing, entity relationship extraction, self-verification mechanism, graph topology parsing, and reasoning path planning. This guides the visual-language model to perform hierarchical defect detection, achieving a transparent and traceable reasoning process.
It significantly reduces the manual cost of knowledge graph construction, improves the accuracy and reliability of knowledge, enhances visual-semantic consistency and the interpretability of the reasoning process, and improves detection capabilities under small sample/zero sample conditions.
Smart Images

Figure CN122222987A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the interdisciplinary field of artificial intelligence and knowledge engineering, specifically to an intelligent detection method and system for power distribution network defects based on knowledge graphs and graph thinking chains. Background Technology
[0002] The power distribution network is located at the end of the power system, with widely distributed equipment, a complex operating environment, and diverse defect types. The results of defect detection directly affect the reliability of power supply and the safety of operation and maintenance. Existing technologies mainly include manual inspection and deep learning-based target detection.
[0003] Manual inspections rely on the on-site experience of maintenance personnel, resulting in low efficiency, strong subjectivity, and limited coverage, making it difficult to meet the real-time monitoring needs of large-scale distribution networks. While deep learning-based object detection methods have improved automation to some extent, they primarily rely on convolutional neural networks for end-to-end classification or localization of defect images, lacking explicit modeling and utilization of distribution network domain knowledge. Specifically, existing deep learning methods typically treat defect detection as an isolated visual recognition task, failing to effectively integrate structured domain knowledge such as equipment topology relationships, defect causal evolution, and maintenance procedure constraints. This leads to insufficient interpretability of the model's reasoning in complex scenarios, and a significant decrease in generalization performance when faced with long-tailed defect types or situations with scarce samples.
[0004] In recent years, knowledge graphs, as an important carrier of structured knowledge representation, have received widespread attention in the field of intelligent operation and maintenance of power systems. Knowledge graphs, through entity-relationship-attribute triples, can systematically characterize multi-dimensional elements such as distribution network equipment, defects, environment, and operation and maintenance measures, as well as their interrelationships, providing a reasonable and verifiable knowledge foundation for defect detection. However, existing knowledge graph construction methods face two bottlenecks: First, traditional knowledge extraction relies on manual rules and expert annotation, resulting in high construction costs and long cycles, making it difficult to adapt to the dynamic updating needs of knowledge in the distribution network field; second, while large language models possess powerful text understanding and generation capabilities, when directly applied to domain knowledge graph construction, they suffer from quality problems such as factual illusions, redundant relationships, and logical contradictions, lacking an effective self-verification mechanism to ensure knowledge accuracy.
[0005] Meanwhile, the development of visual-language multimodal large models has provided a new technical path for intelligent detection of distribution network defects. Existing visual-language models, through image-text alignment pre-training, have a certain cross-modal understanding ability, but when facing distribution network defect detection tasks, their reasoning process still exhibits "black box" characteristics, lacking explicit utilization of graph structure information such as equipment spatial topology, defect propagation paths, and hierarchical causal structures. Summary of the Invention
[0006] To address the shortcomings of the prior art, this invention provides a method and system for intelligent detection of distribution network defects based on knowledge graphs and graph thinking chains, in order to solve the following problems in the prior art: (1) under small sample / zero sample conditions, reduce the manual cost of constructing the knowledge graph of distribution network defects and suppress the illusion of large models, so that the knowledge has usable reliability; (2) solve the problem of the separation between knowledge and visual semantics, so that the defect description has the feature expression of "visualizable and distinguishable"; (3) integrate the knowledge graph into the reasoning process of the visual language model, construct a structured reasoning path of "component location - feature inspection - defect judgment", and realize a transparent and traceable reasoning link.
[0007] The technical solution provided by this invention is: an intelligent detection method for distribution network defects based on knowledge graphs and graph thinking chains, comprising the following steps:
[0008] (1) Data acquisition and preprocessing: Acquire domain text data and image data, perform multimodal data preprocessing, and construct image and text label dataset;
[0009] (2) Knowledge graph generation: Entity relations are extracted based on the large language model to construct an initial knowledge graph;
[0010] (3) Knowledge graph self-verification: Quality verification is carried out through a multi-dimensional self-verification mechanism, including integrity verification, visual semantic rationality verification and granularity and logical consistency verification;
[0011] (4) Graph topology analysis and reasoning path planning: Analyze the verified knowledge graph topology, design dynamic reasoning paths, and activate subgraph retrieval and candidate pruning;
[0012] (5) Structured reasoning execution: The reasoning path is converted into structured prompt words to guide the visual-language model to perform hierarchical defect detection;
[0013] (6) Result aggregation and report output: Construct a three-level tree-structured reasoning report of “equipment-component-defect” based on the reasoning results, remove duplicates and group synonymous defects, and output the detection results in a structured JSON form.
[0014] Furthermore, in step (1), based on real data in the power distribution network defect inspection scenario, drone inspection images and corresponding defect labeling information are obtained. At the same time, the "Distribution Network Equipment Defect Labeling Specification" is obtained as a source of professional knowledge. A standard defect set is obtained through corpus processing. Metadata is extracted from the image data, and the text description is associated with the corresponding image sample to construct a pairwise dataset of "image-text description-defect label".
[0015] Furthermore, step (2) includes:
[0016] (2-1) First, a large language model is used as the basis for knowledge generation, and small sample instances of distribution network inspection scenarios and component anchor point sets are provided. The large language model is then used to perform in-depth analysis of the scenario to generate a core component set. Each component is supplemented with certain attribute descriptions: component function, visible part, and typical features; at the same time, the names of generated synonymous components are unified to obtain a set of components generated from the large model. and component attribute set ;
[0017] (2-2) Through component assembly Component attributes Using new prompts, the large model is guided to generate hierarchical relationships between components, resulting in a top-down component hierarchy tree. and obtain the path For any component in the set Inferring its set of defect candidates with "visually observable features" Continue to deduce the connection relationships between the components. ;
[0018] (2-3) Based on the obtained defect candidate set Component hierarchy tree With connection relationship Design a parallel triplet construction method with two branches:
[0019] Component-component connection triples: , indicating component With components There is a connection between them This reflects the hierarchical relationship between the two.
[0020] Component-Defect Connection Triple: , indicating component There are defect types on it. ,
[0021] Simultaneously, for the component-defect triplet, attribute fields are generated: defect definition and typical features, thus obtaining the set of triplets required to construct the knowledge graph. With attribute collection ;
[0022] (2-4) Based on the component hierarchy tree, the set of triples is transformed into a knowledge graph with structured fields and stored in jsonld file format.
[0023] The representation of a knowledge graph is as follows:
[0024] in, Let R be the set of entities, and R be the set of relations. The set of triples, It is a set of entity and defect attributes.
[0025] Furthermore, the integrity verification in step (3) includes:
[0026] The generated knowledge entries are compared with the standard defect manual to calculate the coverage of key defect types. Let the set of defect types in the standard manual be denoted as . The generated knowledge graph covers a set of defect types. Arbitrary defect types generated using the embedding model Standard Defect Types semantic similarity of each defect , The calculation formula is:
[0027] like ≥ When, it indicates existence. With defect type Similar groups are considered valid generated groups and are used to calculate the completeness of generated defect labels; otherwise, they will be excluded. From the set Remove from inside. The semantic similarity threshold is represented by the coverage calculation formula: , ,
[0028] Coverage analysis guides the iterative improvement of knowledge graphs, ensuring no core knowledge is omitted. When this occurs, it indicates that the generated defect type is insufficient, triggering defect type completion and regeneration.
[0029] Furthermore, the visual semantic rationality verification in step (3) includes:
[0030] The Qwen3-VL vision-language model is used to perform visual understanding of typical defect images associated with a knowledge graph, generating fine-grained image description text.
[0031] The generated image description text and the original "entity-defect" text in the graph are embedded into a unified semantic space using an embedding model. The cosine similarity of the embedded text is calculated. Let the text embedding vector be... The image description embedding vector is The similarity is calculated as follows:
[0032] Similarity thresholds were set based on preliminary experiments. Knowledge with a similarity higher than θ is judged as "consistent with text and image and reasonable visualization"; otherwise, it is judged as having unclear visual features or a hallucinatory description, triggering the correction and pruning mechanism.
[0033] Furthermore, the granularity and logical consistency verification in step (3) includes:
[0034] Based on the ontology hierarchy tree, check whether the generated entities belong to the correct hierarchy. Let the ontology hierarchy tree be... ,in For a set of nodes, For the generated entity, the set of hierarchical edges is... Check if it meets the following requirements:
[0035] (1) Hierarchical constraints
[0036] For any entity It should satisfy the requirements of legal hierarchical affiliation, and for non-root entities, satisfy the constraint of having a unique parent node, and the hierarchical path should be acyclic.
[0037] (2) Relationship constraints
[0038] For any triplet Its head entity and tail entity should satisfy the relation respectively. Head and tail constraints, i.e., component relationship type Both the beginning and end nodes belong to components, and the relationship between components and defects is as follows: The head node belongs to the set of components, and the tail node belongs to the set of defects.
[0039] (3) Conflict constraints
[0040] For the same entity, it is not allowed to set the set of relations in the knowledge graph as follows: For any two relations Check whether it meets the logical consistency constraints, and perform conflict correction for cases with hierarchical conflicts or domain value conflicts.
[0041] Furthermore, step (4) includes:
[0042] (4-1) Parse the knowledge graph, extract the hierarchical topological relationships between devices, and use a graph traversal algorithm to transform the static graph structure into a dynamic reasoning path.
[0043] Let the knowledge graph be ,in For a set of nodes, Let the set of edges be the input image. First, the Qwen3-VL model is used to identify the main device in the image. The location of the master device is retrieved in the knowledge graph, and relevant subgraphs are activated based on the graph topology. ,in:
[0044] in The preset search depth, Subordinate components of the main component Indicating activation subgraph The list of associated sub-components, based on the activation subgraph. The depth-first search algorithm of the graph is used to calculate the reasoning path. Each It follows a hierarchical structure of "main equipment location → sub-component traversal → defect feature verification";
[0045] (4-2) Based on the obtained sub-components and the defect candidate set associated with each sub-component. In the original knowledge graph Based on the obtained activation subgraph, the reasoning space for subsequent judgments is restricted to a finite graph reachable range. Subsequent reasoning is only based on the complete knowledge graph. Activation subgraph Expanding upwards, we obtain the constructed activation sub-map. With candidate detection defect list { },
[0046] definition Skip Neighbor Subgraph:
[0047] in For nodes of Skip the neighborhood, then process each component Only retain the associated defect candidate set:
[0048] This constrains the output space of the VLM to the “candidate set allowed by the graph”.
[0049] Furthermore, regarding the main equipment List of retrieved sub-components The process is repeated with the Qwen3-VL model to determine the set of existing components item by item.
[0050] in Representation model in image The above further distinguishes the sub-components Existing confidence scores; with new Non-existent components can be excluded from the reasoning path. In addition, it serves as a pruning tool, reducing the search space.
[0051] Furthermore, step (5) includes:
[0052] The planned The inference path is transformed into structured cue words, which are then injected into the context of the Qwen3-VL visual-language model for defect-level judgment. The activation subgraphs obtained during the inference process are analyzed. Expand upwards, let the original image be... Structured Prompt is The model output is:
[0053] in It includes key node information along the reasoning path, and for different levels of the path, there are multiple sets of preset prompt word templates to guide the components. The injection yields complete visual exploration cues, guiding the model to follow the expert thinking pattern of "finding components first, then looking at features," and outputting an interpretable reasoning process that includes the model's judgment criteria.
[0054] Another technical solution provided by this invention: an intelligent detection system for distribution network defects based on knowledge graphs and graph thinking chains, implementing the above-mentioned detection method, including:
[0055] The data input and preprocessing module is used to acquire domain text data and image data, perform multimodal data preprocessing, and construct an image and text label dataset;
[0056] The knowledge graph generation module extracts entity relationships based on a large language model and constructs an initial knowledge graph.
[0057] The self-verification module includes: an integrity verification submodule, a visual semantic rationality verification submodule, and a granularity and logical consistency verification submodule, which respectively perform integrity verification, visual semantic rationality verification, and granularity and logical consistency verification.
[0058] The graph topology parsing and reasoning path planning module is used to parse the verified knowledge graph topology, design dynamic reasoning paths, and activate subgraph retrieval and candidate pruning.
[0059] The inference execution module is used to convert the inference path into structured prompt words to guide the visual-language model to perform hierarchical defect detection.
[0060] The results aggregation and report output module is used to construct a three-level tree-structured reasoning report of "equipment-component-defect" based on the reasoning results, remove duplicates and group synonymous defects, and output the detection results in the form of a structured JSON form.
[0061] This invention constructs a multi-stage knowledge graph self-verification generation mechanism. Through entity-relationship joint constraints and multi-source evidence cross-verification, it suppresses the "illusion" generation of large models in professional fields. Secondly, it establishes a visual-semantic fusion knowledge representation framework, explicitly embedding visual features into the attributes of knowledge graph nodes. Finally, it designs a structured reasoning method guided by the knowledge graph topology, enabling the visual-language model to follow an expert-style reasoning path of "component localization - feature extraction - relational reasoning - comprehensive judgment," thereby achieving interpretable multimodal decision-making.
[0062] Compared with the prior art, the present invention has the following significant advantages:
[0063] (1) Significantly improved reliability of knowledge generation: Through a multi-dimensional self-verification mechanism (completeness, visual semantics, granular logic), the "illusion" problem of large models in professional fields is effectively suppressed, ensuring that the generated knowledge graph has high accuracy and professionalism.
[0064] (2) Visual-semantic consistency enhancement: Through cross-modal visual semantic rationality verification, it is ensured that every piece of knowledge in the knowledge graph can be aligned with the actual image, effectively serving the downstream visual recognition task.
[0065] (3) Enhanced interpretability of reasoning process: By transforming the knowledge graph topology into a dynamic reasoning path, the visual-language model is guided to perform structured reasoning, making the reasoning process have clear step traceability and conforming to the expert thinking mode.
[0066] (4) Strong adaptability to few / zero samples: Fully utilize the zero / few sample generalization ability of large models to achieve high-quality knowledge graph construction under limited domain data conditions, significantly reducing the cost of manual knowledge engineering. Attached Figure Description
[0067] Figure 1 This is an overall framework diagram of the present invention;
[0068] Figure 2 This is a knowledge graph generation and self-verification framework diagram of the present invention;
[0069] Figure 3 This is a diagram illustrating the knowledge graph generation effect of the present invention;
[0070] Figure 4 This invention is a structured reasoning strategy diagram based on mind maps;
[0071] Figure 5 This is a flowchart of the visual semantic rationality verification process of the present invention;
[0072] Figure 6 This is a diagram illustrating the detection effect of an embodiment of the present invention. Detailed Implementation
[0073] 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. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0074] This invention adopts a two-stage framework of "knowledge graph self-verification generation - graph thinking chain reasoning detection":
[0075] (1) First stage: Use a multi-stage pipeline to generate a knowledge graph of distribution network equipment-components-defects, and introduce three self-verifications: integrity verification, visual semantic rationality verification, and granularity and logical consistency verification, to form a closed loop of "generation-evaluation-correction".
[0076] (2) Second stage: Model the defect detection task as a directed acyclic reasoning graph of mind map, with nodes including input, component identification, sub-component refinement, component-level defect multi-label discrimination, global defect detection (optional) and result aggregation, etc.; the knowledge graph provides candidate space constraints and semantic attributes for each node, thereby reducing illusion and attention distraction.
[0077] The overall implementation process of this invention includes the following steps:
[0078] S1 Data Acquisition and Preprocessing: Acquire domain text and image data, perform multimodal data preprocessing, and construct an image and text label dataset.
[0079] S2~S7 Knowledge Graph Self-Verification Generation: Based on a large language model, entity relations are extracted to construct an initial knowledge graph, and quality is verified through a multi-dimensional self-verification mechanism.
[0080] S8~S9 Graph Topology Analysis and Reasoning Path Planning: Analyze the verified knowledge graph topology structure and design dynamic reasoning paths.
[0081] S10 Structured Reasoning Execution: Transforms the reasoning path into structured prompts to guide the visual-language model in hierarchical defect detection.
[0082] Knowledge graph self-verification generation stage
[0083] This stage utilizes a large language model to extract domain knowledge under few-sample / zero-sample conditions, constructing a professional knowledge graph. The knowledge graph is represented as follows:
[0084] in, R is a set of entities (equipment / parts / defects, etc.), and R is a set of relations (connections between entities). A set of triples (e.g., a triple of device and sub-component, or a triple of component and defect) is constructed in the form of entity-relationship-entity, where the entity includes component nodes and defect label nodes. That is, relationships in the form of component-association-component or component-association-defect are possible. It is a set of entity and defect attributes (function, visible part, visual features, easily confused items, etc.).
[0085] Based on the generated knowledge graph, a multi-dimensional self-verification mechanism is designed to verify the quality of the generated knowledge. The multi-dimensional self-verification mechanism includes:
[0086] Completeness Check:
[0087] The generated knowledge entries are compared with the standard defect manual to calculate the coverage rate of key defect types. The calculation formula is:
[0088] in, To generate standard defect types that cover knowledge entries, For the defect types specified in the standard manual, when (threshold) When configurable, it indicates that there are not enough defect types generated, triggering defect type completion and regeneration.
[0089] Visual-Semantic Plausibility Check:
[0090] A vision-language model is used to perform visual understanding of typical defect images associated with the knowledge graph (if a corresponding image does not exist, an image generation model is triggered to draw it), generating fine-grained image captions. The generated image captions are then embedded into a unified semantic space along with the original entity-defect text in the knowledge graph using an embedding model, and cosine similarity is calculated.
[0091] in, For visual feature embedding vectors, This is an embedding vector for the text description. Based on a preset similarity threshold. The similarity is higher than The knowledge is judged as "consistent with the text and images and reasonable visualization"; otherwise, it is judged as having unclear visual features or being a hallucination in the description, that is, the generation defect has non-visualizable characteristics, triggering the correction and pruning mechanism.
[0092] Granularity & Logic Check:
[0093] Based on the ontology hierarchy tree, the system checks whether the generated entities belong to the correct hierarchy and also checks the logical consistency between nodes to avoid conflicts. This mainly includes the following constraints:
[0094] Hierarchical constraints: any component entity There must be a unique parent node. (Except for the root node), and the path Acyclic;
[0095] Relational constraints: for any triplet Must meet ;
[0096] Conflict constraint: The same component cannot be declared as two mutually exclusive categories at the same level. (Structured reasoning stage)
[0097] This phase integrates the validated knowledge graph with the visual-language model, enhancing defect detection capabilities and interpretability by transforming the knowledge graph's topology into dynamic reasoning paths. Specifically, this includes:
[0098] Activation subgraphs and inference candidate space pruning:
[0099] During the inference phase, based on the set of components detected in the image... It retrieves and "activates" related local subgraphs from the knowledge graph, providing structural and attribute support for subsequent reasoning. Definition Skip Neighbor Subgraph:
[0100] in For nodes of Skip the neighborhood, then process each component Only retain the associated defect candidate set:
[0101] This constrains the output space of the VLM to the "candidate set allowed by the graph," reducing illusions and false alarms. Inference paths are then constructed.
[0102] Knowledge Injection and Structured Reasoning:
[0103] During the inference phase, activation sequences of atlas device nodes are generated based on the current image content. According to the obtained local subgraphs and inference paths, the planned inference paths are transformed into structured prompt words and injected into the context of the visual-language model, guiding the model to follow the expert thinking mode of "finding components first, then looking at features" for inference.
[0104] Example
[0105] A method for intelligent detection of defects in power distribution networks based on knowledge graphs and graph thinking chains includes the following steps:
[0106] S1: Data Acquisition and Preprocessing
[0107] Based on real-world business data from power distribution network defect inspection scenarios provided by our partners, we acquired over 5,000 high-resolution drone inspection images. (Resolution ≥ 4K) and corresponding defect labeling information. Simultaneously, the "Distribution Network Equipment Defect Labeling Specification" was obtained as a source of professional knowledge, and a standard defect set was derived through corpus processing. .
[0108] Metadata is extracted from the image data, and the text descriptions are associated with the corresponding image samples to construct a pairwise dataset of "image-text description-defect label" as a benchmark for subsequent visual semantic consistency verification.
[0109] S2: Domain Knowledge Graph Phase 1 (Power Component Knowledge)
[0110] Taking the power distribution network tower inspection scenario as an example, we first use a large language model as the basis for knowledge generation, and provide small sample instances of relevant scenario descriptions and component anchor point sets. Then, we perform in-depth analysis of the scenario using the large language model to generate a core component set. Each component is then supplemented with attribute descriptions: component function, visible location, and typical features; simultaneously, synonymous components are named uniformly. This step yields a set of components generated from the large model. and component attribute set .
[0111] S3: Domain Knowledge Graph Phase 2 (Self-Structured: Defect Reasoning and Hierarchical Connections)
[0112] Based on the generation result (part set) obtained in S2 Component attributes Using new prompts, the large model is guided to generate hierarchical relationships between components, resulting in a top-down component hierarchy tree. and obtain the path Meanwhile, for any component in the set Inferring its set of defect candidates with "visually observable features" This step in the large model continues to deduce the connection relationships between components. (e.g., mounted on / suspended on / supported on) to support the context for optimizing subsequent reasoning work; this step yields a set of defect candidates. Hierarchical tree With connection relationship ; This represents the mapping relationship from component nodes to the defect candidate set (i.e., all sets). This indicates that the mapping is in a specific component node. The value on, i.e., component The corresponding defect candidate set.
[0113] S4: Domain Knowledge Graph Stage 3 (Generation of Two-Branch Triples)
[0114] Based on the defect candidate set obtained in step S3 Component hierarchy tree With connection relationship To avoid the limitations of context length generated in a single operation and the illusion problem, a two-branch parallel triplet construction method is designed:
[0115] Component-component connection triples: , indicating component With components There is a connection between them This reflects the hierarchical relationship between the two.
[0116] Component-Defect Connection Triple: , indicating component There are defect types on it.
[0117] Simultaneously, for the component-defect triple, attribute fields are generated: defect definition and typical features (as context for subsequent inference). This step yields the set of triples required to construct the knowledge graph. With attribute collection .
[0118] S5: Domain Knowledge Graph Stage 4 (Structured Output)
[0119] The set of triples obtained in step S4 is obtained. With attribute collection fields Next, based on the component hierarchy tree from step S3, the set of triples is transformed into a knowledge graph with structured fields, stored in JSON-LD file format for easy retrieval during reasoning. Entities are assigned unique identifiers and output in a structured format (such as JSON-LD / equivalence graph structure file) for incremental updates and retrieval. This step yields the initial knowledge graph. .
[0120] S6: Triple Self-Verification and Closed-Loop Correction
[0121] Integrity verification design: The generated knowledge entries are compared with the standard defect manual to calculate the coverage of key defect types. Let the set of defect types in the standard manual be... The generated knowledge graph covers a set of defect types. Since the knowledge description generated by the large model may not be consistent with the standard defect type description, arbitrary defect types generated using the embedding model are... Standard Defect Types semantic similarity of each defect , The calculation formula is:
[0122] like ≥ (This represents the semantic similarity threshold, which can be manually set based on experimental results; in this experiment, it was set to 0.75.) When the value is closer to 1 (representing a more stringent judgment), it indicates the existence of... With defect type Similar groups are considered valid generated groups and are used to calculate the completeness of generated defect labels; otherwise, they will be excluded. From the set Remove from the inside. The coverage calculation formula is: ,
[0123] Coverage analysis guides the iterative improvement of knowledge graphs, ensuring no core knowledge is omitted. If the value is too small, it will be regenerated.
[0124] Visual semantic rationality verification design: Utilizing the visual-language model Qwen3-VL to perform visual understanding of typical defect images associated in the knowledge graph (for defects not in the standard). The "new category defect" in the image generation model generates its simulated image, generating fine-grained image description text.
[0125] The generated image description text and the original "entity-defect" text in the graph are embedded into a unified semantic space using an embedding model, and the cosine similarity of the embedded text is calculated. Let the text embedding vector be... The image description embedding vector is The similarity is calculated as follows:
[0126] Similarity thresholds were set based on preliminary experiments. (e.g., 0.75) Knowledge with a similarity higher than θ is judged as “consistent with text and image and reasonable visualization”; otherwise, it is judged as having unclear visual features or an illusion in the description, triggering the correction and pruning mechanism.
[0127] S7: Granularity and Logical Consistency Verification
[0128] Based on the ontology hierarchy tree, check whether the generated entities belong to the correct hierarchy. Let the ontology hierarchy tree be... ,in For a set of nodes, This is a hierarchical edge set. For the generated entity... Check if it meets the following requirements:
[0129] Simultaneously check the logical consistency between nodes to avoid conflicting relationships. Let the set of relationships in the knowledge graph be... For any two relations Check whether it meets the logical consistency constraints. For cases with hierarchical conflicts or domain value conflicts, perform conflict correction (delete relations or entities that do not meet the constraints).
[0130] S8: Graph Topology-Driven Inference Path Planning
[0131] The knowledge graph is analyzed to extract the hierarchical topological relationships between devices. A graph traversal algorithm (DFS) is used to transform the static graph structure into a dynamic reasoning path.
[0132] Let the knowledge graph be ,in It is a set of nodes (including device nodes and defective nodes). Let be the set of edges. For the input image... First, the Qwen3-VL model is used to identify the main device in the image. The location of the master device is retrieved in the knowledge graph, and relevant subgraphs are activated based on the graph topology. ,in:
[0133] in The preset search depth, Subordinate components of the main component Indicating activation subgraph A list of associated sub-components. Based on activation subgraphs. The depth-first search algorithm of the graph is used to calculate the reasoning path. Each It follows a hierarchical structure of "main equipment location → sub-component traversal → defect feature verification".
[0134] Optionally, for the master device List of retrieved sub-components The process can be repeatedly passed to the Qwen3-VL model to determine the set of existing components item by item.
[0135] in Representation model in image The above further distinguishes the sub-components Existing confidence scores; with new Non-existent components can be excluded from the reasoning path. In addition, it serves as a pruning tool, reducing the search space.
[0136] S9: Activation Subgraph Retrieval and Candidate Pruning
[0137] Based on the obtained sub-components and the defect candidate set associated with each sub-component. In the original knowledge graph Based on the obtained activation subgraph, the reasoning space for subsequent judgments is restricted to a finite graph reachable range. Subsequent reasoning is only based on the complete knowledge graph. Activation subgraph Expand upwards. This step mainly yields the constructed activation sub-map. With candidate detection defect list { }
[0138] S10: Knowledge Injection and Structured Reasoning
[0139] The planned The inference path is transformed into structured cue words, which are then injected into the context of the Qwen3-VL visual-language model for defect-level judgment. The inference process is reflected in the activation subgraph obtained in S10. Expand upwards. Let the original image be... Structured Prompt is The model output is:
[0140] in It includes key node information along the reasoning path, and for different levels of the path, there are multiple sets of preset prompt word templates to guide the components. The injection of complete visual exploration prompts guides the model to follow the expert thinking mode of "finding the parts first, then looking at the features," thereby improving the defect recognition ability in complex backgrounds and outputting an interpretable reasoning process containing the model's judgment criteria.
[0141] S11: Results Aggregation and Structured Report Output
[0142] Based on the reasoning results, a three-level tree-structured reasoning report of "equipment-component-defect" is constructed, and duplicates are eliminated and synonyms are grouped together. The detection results are returned in the form of a structured JSON form, including component path, defect type, defect name, and judgment criteria, to meet the requirements of verifiability and traceability.
[0143] This invention also provides an intelligent detection system for distribution network defects based on knowledge graphs and graph thinking chains, implementing the above-mentioned detection method, including:
[0144] The data input and preprocessing module is used to acquire domain text data and image data, perform multimodal data preprocessing, and construct an image and text label dataset;
[0145] The knowledge graph generation module extracts entity relationships based on a large language model and constructs an initial knowledge graph.
[0146] The self-verification module includes: an integrity verification submodule, a visual semantic rationality verification submodule, and a granularity and logical consistency verification submodule, which respectively perform integrity verification, visual semantic rationality verification, and granularity and logical consistency verification.
[0147] The graph topology parsing and reasoning path planning module is used to parse the verified knowledge graph topology, design dynamic reasoning paths, and activate subgraph retrieval and candidate pruning.
[0148] The inference execution module is used to convert the inference path into structured prompt words to guide the visual-language model to perform hierarchical defect detection.
[0149] The results aggregation and report output module is used to construct a three-level tree-structured reasoning report of "equipment-component-defect" based on the reasoning results, remove duplicates and group synonymous defects, and output the detection results in the form of a structured JSON form.
[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention without departing from the spirit and scope of the present invention.
Claims
1. A method for intelligent detection of distribution network defects based on knowledge graphs and graph thinking chains, characterized in that, Includes the following steps: (1) Data acquisition and preprocessing: Acquire domain text data and image data, perform multimodal data preprocessing, and construct image and text label dataset; (2) Knowledge graph generation: Entity relations are extracted based on the large language model to construct an initial knowledge graph; (3) Knowledge graph self-verification: Quality verification is carried out through a multi-dimensional self-verification mechanism, including integrity verification, visual semantic rationality verification and granularity and logical consistency verification; (4) Graph topology analysis and reasoning path planning: Analyze the verified knowledge graph topology, design dynamic reasoning paths, and activate subgraph retrieval and candidate pruning; (5) Structured reasoning execution: The reasoning path is converted into structured prompt words to guide the visual-language model to perform hierarchical defect detection; (6) Result aggregation and report output: Construct a three-level tree-structured reasoning report of "equipment-component-defect" based on the reasoning results, remove duplicates and group synonymous defects, and output the detection results in a structured JSON form.
2. The intelligent detection method for distribution network defects based on knowledge graphs and graph thinking chains according to claim 1, characterized in that, In step (1), based on real data in the power distribution network defect inspection scenario, drone inspection images and corresponding defect labeling information are obtained. At the same time, the "Distribution Network Equipment Defect Labeling Specification" is obtained as a source of professional knowledge. A standard defect set is obtained through corpus processing. Metadata is extracted from the image data, and the text description is associated with the corresponding image sample to construct a pairwise dataset of "image-text description-defect label".
3. The intelligent detection method for distribution network defects based on knowledge graphs and graph thinking chains according to claim 1, characterized in that, Step (2) includes: (2-1) First, a large language model is used as the basis for knowledge generation, and small sample instances of distribution network inspection scenarios and component anchor point sets are provided. The large language model is then used to perform in-depth analysis of the scenario to generate a core component set. Each component is supplemented with certain attribute descriptions: component function, visible part, and typical features; at the same time, the names of generated synonymous components are unified to obtain a set of components generated from the large model. and component attribute set ; (2-2) Through component assembly Component attributes Using new prompts, the large model is guided to generate hierarchical relationships between components, resulting in a top-down component hierarchy tree. and obtain the path For any component in the set Inferring its candidate set of defects with "visually observable features" Continue to deduce the connection relationships between the components. ; (2-3) Based on the obtained defect candidate set Component hierarchy tree With connection relationship Design a parallel triplet construction method with two branches: Component-component connection triples: , indicating component With components There is a connection between them This reflects the hierarchical relationship between the two. Component-Defect Connection Triple: , indicating component There are defect types on it. , Simultaneously, for the component-defect triplet, attribute fields are generated: defect definition and typical features, thus obtaining the set of triplets required to construct the knowledge graph. With attribute collection ; (2-4) Based on the component hierarchy tree, the set of triples is transformed into a knowledge graph with structured fields and stored in jsonld file format. The representation of a knowledge graph is as follows: , in, Let R be the set of entities, and R be the set of relations. The set of triples, It is a set of entity and defect attributes.
4. The intelligent detection method for distribution network defects based on knowledge graphs and graph thinking chains according to claim 1, characterized in that, The integrity verification in step (3) includes: The generated knowledge entries are compared with the standard defect manual to calculate the coverage of key defect types. Let the set of defect types in the standard manual be denoted as . The generated knowledge graph covers a set of defect types. Arbitrary defect types generated using the embedding model Standard Defect Types Semantic similarity of each defect , The calculation formula is: , like ≥ When, it indicates existence. With defect type Similar groups are considered valid generated groups and are used to calculate the completeness of generated defect labels; otherwise, they will be excluded. From the set Remove from inside. The semantic similarity threshold is represented by the coverage calculation formula: , Coverage analysis guides the iterative improvement of knowledge graphs, ensuring no core knowledge is omitted. When this occurs, it indicates that the generated defect type is insufficient, triggering defect type completion and regeneration.
5. The intelligent detection method for distribution network defects based on knowledge graphs and graph thinking chains according to claim 1, characterized in that, The visual semantic rationality verification in step (3) includes: The Qwen3-VL vision-language model is used to perform visual understanding of typical defect images associated with a knowledge graph, generating fine-grained image description text. The generated image description text and the original "entity-defect" text in the graph are embedded into a unified semantic space using an embedding model. The cosine similarity of the embedded text is calculated. Let the text embedding vector be... The image description embedding vector is The similarity is calculated as follows: , Similarity thresholds were set based on preliminary experiments. Knowledge with a similarity higher than θ is judged as "consistent with text and image and reasonable visualization"; otherwise, it is judged as having unclear visual features or a hallucinatory description, triggering the correction and pruning mechanism.
6. The intelligent detection method for distribution network defects based on knowledge graphs and graph thinking chains according to claim 1, characterized in that, The granularity and logical consistency verification in step (3) includes: Based on the ontology hierarchy tree, check whether the generated entities belong to the correct hierarchy. Let the ontology hierarchy tree be... ,in For a set of nodes, For the generated entity, the set of hierarchical edges is... Check if it meets the following requirements: ① Hierarchical constraints , For any entity The hierarchical structure satisfies the legal hierarchical belonging requirement, and for non-root entities, it satisfies the unique parent node constraint, and the hierarchical path is acyclic. ② Relationship Constraints For any triplet Its head entity and tail entity should satisfy the relation respectively. Head and tail constraints, i.e., component relationship type Both the beginning and end nodes belong to components, and the relationship between components and defects is as follows: The condition is satisfied that the head node belongs to the set of parts, and the tail node belongs to the set of defects. ③ Conflict constraints For the same entity, let the set of relations in the knowledge graph be . For any two relations Check whether it meets the logical consistency constraints, and perform conflict correction for cases with hierarchical conflicts or domain value conflicts.
7. The intelligent detection method for distribution network defects based on knowledge graphs and graph thinking chains according to claim 1, characterized in that, Step (4) includes: (4-1) Parse the knowledge graph, extract the hierarchical topological relationships between devices, and use a graph traversal algorithm to transform the static graph structure into a dynamic reasoning path. Let the knowledge graph be ,in For a set of nodes, Let the set of edges be the input image. First, the Qwen3-VL model is used to identify the main device in the image. The location of the master device is retrieved in the knowledge graph, and relevant subgraphs are activated based on the graph topology. ,in: , in The preset search depth, Subordinate components of the main component Indicating activation subgraph The list of associated sub-components, based on the activation subgraph. The inference path is calculated using a depth-first search algorithm for the graph. Each It follows a hierarchical structure of "main equipment location → sub-component traversal → defect feature verification"; (4-2) Based on the obtained sub-components and the defect candidate set associated with each sub-component. In the original knowledge graph Based on the obtained activation subgraph, the reasoning space for subsequent judgments is restricted to a finite graph reachable range. Subsequent reasoning is only based on the complete knowledge graph. Activation subgraph Expanding upwards, we obtain the constructed activation sub-map. With candidate detection defect list { }, definition Skip Neighbor Subgraph: , in For nodes of Skip the neighborhood, then process each component Only retain the associated defect candidate set: , This constrains the output space of the VLM to the "candidate set allowed by the graph".
8. The intelligent detection method for distribution network defects based on knowledge graphs and graph thinking chains according to claim 7, characterized in that, For the main device List of retrieved sub-components The process is repeated, submitting the data to the Qwen3-VL model for item-by-item evaluation of sub-components to obtain the set of existing components. , in Representation model in image The above further distinguishes the sub-components Existing confidence scores; with new Non-existent components can be excluded from the reasoning path. In addition, it serves as a pruning tool, reducing the search space.
9. The intelligent detection method for distribution network defects based on knowledge graphs and graph thinking chains according to claim 7, characterized in that, Step (5) includes: The planned The inference path is transformed into structured cue words, which are then injected into the context of the Qwen3-VL visual-language model for defect-level judgment. The activation subgraphs obtained during the inference process are analyzed. Expand upwards, let the original image be... Structured Prompt is The model output is: , in It includes key node information along the reasoning path, and for different levels of the path, there are multiple sets of preset prompt word templates to guide the components. The injection yields complete visual exploration cues, guiding the model to follow the expert thinking pattern of "finding components first, then looking at features," and outputting an interpretable reasoning process that includes the model's judgment criteria.
10. A power distribution network defect intelligent detection system based on knowledge graphs and graph thinking chains, implementing the detection method as described in any one of claims 1-9, characterized in that, include: The data input and preprocessing module is used to acquire domain text data and image data, perform multimodal data preprocessing, and construct an image and text label dataset; The knowledge graph generation module extracts entity relationships based on a large language model and constructs an initial knowledge graph. The self-verification module includes: an integrity verification submodule, a visual semantic rationality verification submodule, and a granularity and logical consistency verification submodule, which respectively perform integrity verification, visual semantic rationality verification, and granularity and logical consistency verification. The graph topology parsing and reasoning path planning module is used to parse the verified knowledge graph topology, design dynamic reasoning paths, and activate subgraph retrieval and candidate pruning. The inference execution module is used to convert the inference path into structured prompt words to guide the visual-language model to perform hierarchical defect detection. The results aggregation and report output module is used to construct a three-level tree-structured reasoning report of "equipment-component-defect" based on the reasoning results, remove duplicates and group synonymous defects, and output the detection results in the form of a structured JSON form.