A kind of rural distribution network drawing compliance review method, device, equipment and medium
Patent Information
- Application Number
- CN202610866199.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-16
- Publication Date
- 2026-09-25
AI Technical Summary
该方法完全依赖于审查人员的主观经验、专注力和对标准的熟悉程度,其得到的效果是能够发现一些表层的、孤立的违规问题,但审查效率低下,且审查结果因人员不同而存在标准不一、不稳定的问题
[0043]本申请提供一种农配网图纸合规性审查方法,包括:获取农配网图纸;对所述农配网图纸进行解析,构建图结构,所述图结构包括表示电气设备的节点和表示连接的边;根据预设的合规性规则集对所述图结构进行匹配,得到违规项集合;对所述图结构进行多跳邻域信息聚合处理,得到所述节点之间的隐含依赖关系;根据所述隐含依赖关系,识别存在耦合作用的设备组合;对所述图结构的节点进行编码,生成所述节点的语义嵌入向量;根据所述存在耦合作用的设备组合中节点的语义嵌入向量及其拓扑连接关系,生成语义序列向量;根据所述存在耦合作用的设备组合中节点的语义嵌入向量与所述隐含依赖关系,生成所述存在耦合作用的设备组合的耦合强度量化值;将所述耦合强度量化值编码为耦合强度特征向量;将所述语义序列向量与所述耦合强度特征向量进行特征融合,生成上下文特征表示;根据所述上下文特征表示与预设的设备组合配置规则进行匹配推理,得到组合性违规项集合;将所述违规项集合与所述组合性违规项集合进行合并,生成扩展违规项集合。本申请通过设备组合的上下文特征表示与规则进行匹配推理,实现了对传统人工审查及简单规则匹配无法发现的跨设备组合性不合规状态的自动化识别,从而克服了现有技术因缺乏上下文感知推理机制而导致组合性违规漏检的缺陷,显著提升了审查的全面性和深度。
Smart Images

Figure CN122820114A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of drawing review, and in particular relates to a method, device, equipment and medium for reviewing the compliance of agricultural power grid drawings. Background Technology
[0002] With the continuous advancement of rural power grid construction and renovation projects, the number of rural power distribution network design drawings has increased significantly. To ensure the safe and stable operation of the power system, the need for compliance review of these drawings is becoming increasingly urgent. Traditional compliance review of rural power distribution network drawings mainly relies on manual inspection by professionals according to national and industry standards. This method aims to use the experience and knowledge of the reviewers to check whether the equipment configuration, connection relationships, parameter annotations, and other contents in the drawings comply with the specifications, in order to discover and correct design errors and ensure power grid safety.
[0003] Current technology relies entirely on manual drawing review methods. The review process involves: reviewers manually reading and understanding all graphic elements, wiring connections, and text annotations on the drawings; comparing the drawing content with compliance regulations (such as the "Rural Power Grid Low-Voltage Distribution Design Code") from memory or manuals; and manually identifying obvious, isolated violations, such as mismatched individual equipment parameters or incorrect direct connections. This method depends entirely on the reviewer's subjective experience, focus, and familiarity with standards. While it can uncover some superficial, isolated violations, it is inefficient, and the results are inconsistent and vary depending on the reviewer.
[0004] Because the aforementioned purely manual review method lacks the ability to structurally analyze drawing data, it cannot effectively transform the drawing content into computable primitive objects and their topological relationships, resulting in a fragmented and incomplete understanding of the drawing content. More importantly, this method completely fails to identify and quantify the implicit dependencies between electrical devices through multi-hop connections, making it difficult to discover potential problems that may only be exposed when multiple devices work together in a specific topology configuration. Ultimately, due to the lack of a context-aware automated reasoning mechanism, in complex rural power grid topologies, existing technology cannot accurately identify composite non-compliance states across device combinations and preset configurations. This directly leads to a large number of such deep-seated violations being missed, seriously affecting the comprehensiveness of the review and the safety of power grid operation. Summary of the Invention
[0005] The purpose of this application is to overcome the deficiencies in the prior art and provide a method, apparatus, equipment and medium for reviewing the compliance of agricultural power distribution network drawings.
[0006] This application provides a method for reviewing the compliance of agricultural power distribution network drawings, including:
[0007] Obtain rural power distribution network drawings; parse the rural power distribution network drawings and construct a graph structure, the graph structure including nodes representing electrical equipment and edges representing connections;
[0008] The graph structure is matched according to a preset set of compliance rules to obtain a set of violations;
[0009] The graph structure is subjected to multi-hop neighborhood information aggregation processing to obtain the implicit dependencies between the nodes; based on the implicit dependencies, device combinations with coupling effects are identified; the nodes of the graph structure are encoded to generate semantic embedding vectors for the nodes; based on the semantic embedding vectors of the nodes in the device combinations with coupling effects and their topological connections, a semantic sequence vector is generated; based on the semantic embedding vectors of the nodes in the device combinations with coupling effects and the implicit dependencies, a coupling strength quantization value of the device combinations with coupling effects is generated; the coupling strength quantization value is encoded into a coupling strength feature vector; the semantic sequence vector and the coupling strength feature vector are fused to generate a context feature representation; the context feature representation is matched and reasoned with preset device combination configuration rules to obtain a set of combination violation items;
[0010] The set of violations is merged with the set of combined violations to generate an extended set of violations.
[0011] Optionally, the graph structure is subjected to multi-hop neighborhood information aggregation processing, including:
[0012] During the iterative aggregation process, for each node in the graph structure, the current representation vector of its one-hop neighbor nodes is aggregated;
[0013] The node's current representation vector is non-linearly fused with the aggregated neighborhood vector to update the node's representation vector.
[0014] Optionally, based on the implicit dependencies, identifying combinations of devices with coupling effects includes:
[0015] Determine whether the association strength between each pair of nodes in the implicit dependency relationship exceeds a preset threshold;
[0016] Node pairs whose association strength exceeds the preset threshold are identified as the device combinations with coupling effects.
[0017] Optionally, the nodes of the graph structure are encoded to generate semantic embedding vectors for the nodes, including:
[0018] Obtain the multi-hop aggregated representation vector of the node and the original attributes of the node;
[0019] The multi-hop aggregated representation vector is jointly encoded with the original attribute;
[0020] The result of joint encoding is projected onto the semantic space to generate the semantic embedding vector.
[0021] Optionally, based on the semantic embedding vectors of nodes in the coupled device assembly and the implicit dependency relationship, a coupling strength quantization value for the coupled device assembly is generated, including:
[0022] Calculate the distance between the semantic embedding vectors of the nodes in the device assembly;
[0023] Obtain the association strength of the node in the implicit dependency relationship;
[0024] The distance and the correlation strength are fused together to generate the quantized value of the coupling strength.
[0025] Optionally, the preset compliance rules are generated by the following steps:
[0026] Extract the locations of violations and their corresponding regulatory provisions from historical review cases;
[0027] In the graph structure of historical drawings, based on the combination of equipment types and their connection structures, we can identify equipment configuration patterns that occur more frequently than a first preset threshold.
[0028] The distribution of the violation locations in the device configuration modes is statistically analyzed, and the device configuration modes in which the frequency of violation distribution exceeds a second preset threshold are identified as high-risk configuration modes.
[0029] Extract the device attribute constraints from the aforementioned specification clauses;
[0030] The high-risk configuration mode is associated with the device attribute constraints to generate the compliance rules.
[0031] Optionally, a set of combinational violations is obtained by matching and reasoning based on the contextual feature representation and preset device combination configuration rules, including:
[0032] The device combination configuration rules include constraints on semantic patterns and limitations on the range of coupling strength;
[0033] The matching reasoning includes: determining whether the context feature representation conforms to the constraints on the semantic pattern, and determining whether the coupling strength in the context feature representation is within the range of the coupling strength;
[0034] Based on the results of the matching inference, the set of combinatorial violations is generated.
[0035] This application also provides a device for reviewing the compliance of agricultural power distribution network drawings, including:
[0036] The drawing module acquires rural power distribution network drawings; it parses the rural power distribution network drawings and constructs a graph structure, which includes nodes representing electrical equipment and edges representing connections.
[0037] The matching module matches the graph structure according to a preset set of compliance rules to obtain a set of violations;
[0038] The analysis module performs multi-hop neighborhood information aggregation on the graph structure to obtain implicit dependencies between nodes; identifies device combinations with coupling based on the implicit dependencies; encodes the nodes of the graph structure to generate semantic embedding vectors for the nodes; generates semantic sequence vectors based on the semantic embedding vectors of nodes in the coupled device combinations and their topological connections; generates a coupling strength quantization value for the coupled device combinations based on the semantic embedding vectors of nodes in the coupled device combinations and the implicit dependencies; encodes the coupling strength quantization value into a coupling strength feature vector; fuses the semantic sequence vectors and the coupling strength feature vectors to generate a context feature representation; and performs matching reasoning based on the context feature representation and preset device combination configuration rules to obtain a set of combination violation items.
[0039] The merging module merges the set of violations with the set of combined violations to generate an extended set of violations.
[0040] This application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described above.
[0041] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the above-described method.
[0042] The beneficial effects of this application are:
[0043] This application provides a method for compliance review of rural power distribution network drawings, comprising: acquiring rural power distribution network drawings; parsing the rural power distribution network drawings to construct a graph structure, the graph structure including nodes representing electrical equipment and edges representing connections; matching the graph structure according to a preset set of compliance rules to obtain a set of violations; performing multi-hop neighborhood information aggregation processing on the graph structure to obtain implicit dependencies between the nodes; identifying equipment combinations with coupling effects based on the implicit dependencies; encoding the nodes of the graph structure to generate semantic embedding vectors for the nodes; and identifying the semantic embedding vectors of the nodes in the equipment combinations with coupling effects. The application generates a semantic sequence vector from the input vector and its topological connections. Based on the semantic embedding vectors of nodes in the coupled device combination and the implicit dependencies, it generates a coupling strength quantization value for the coupled device combination. This coupling strength quantization value is encoded as a coupling strength feature vector. The semantic sequence vector and the coupling strength feature vector are fused to generate a contextual feature representation. The contextual feature representation is matched and reasoned against preset device combination configuration rules to obtain a set of combinational violations. The violation set is merged with the combinational violation set to generate an extended violation set. This application achieves automated identification of cross-device combinational non-compliance states that cannot be detected by traditional manual review and simple rule matching by matching and reasoning with the contextual feature representation of the device combination. This overcomes the shortcomings of existing technologies that lack context-aware reasoning mechanisms, leading to missed detections of combinational violations, and significantly improves the comprehensiveness and depth of the review. Attached Figure Description
[0044] Figure 1 This is a schematic diagram of the compliance review process for agricultural power grid drawings in this application;
[0045] Figure 2 This is a schematic diagram of the compliance review device for agricultural power grid drawings in this application. Detailed Implementation
[0046] Exemplary embodiments of the present disclosure will now be provided in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it is to be understood that various forms of implementation of the present disclosure are intended and should not be limited to the embodiments set forth herein. Rather, the embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0047] This application provides a method for reviewing the compliance of rural power distribution network drawings, which is applied to the field of intelligent power system drawing review technology. It is used to solve the problems of existing rural power distribution network drawing compliance review relying on manual labor, resulting in low efficiency, inconsistent standards, unstable review results, and inability to effectively detect non-compliant status of cross-equipment combinations.
[0048] Please refer to Figure 1 As shown, the method for reviewing the compliance of agricultural power grid drawings described in this application includes:
[0049] S101. Obtain the rural power distribution network drawing; parse the rural power distribution network drawing and construct a graph structure, the graph structure including nodes representing electrical equipment and edges representing connections.
[0050] Parsing the rural power distribution network drawing and constructing the graph structure includes performing structured parsing of the rural power distribution network drawing data, extracting graph primitives and their topological relationships, and constructing them into a graph structure.
[0051] The rural power distribution network drawing data is divided into a connection line layer and a labeling information layer according to electrical function categories, and graphic element detection is performed. Independent graphic units are located based on contour extraction and closed region recognition methods. The independent graphic units are extracted as graphic element objects. The graphic element object refers to the graphic entity extracted from the drawing that represents an independent electrical component or unit.
[0052] The graphic features of the graphic object are matched with standard electrical symbols to identify the type and equipment attributes of the graphic object. The type and equipment attributes refer to the category of electrical equipment represented by the graphic object, such as transformer, circuit breaker, busbar, etc.
[0053] Extract the geometric information of the line segments in the connection line layer, determine the connection relationship between the geometric information of the line segments and the primitive objects based on the endpoint coordinate matching rules, and establish a topological connection mapping between the primitive objects. The topological connection mapping records the physical or electrical connection relationship between the primitive objects established through line segments.
[0054] The text annotations in the annotation information layer are parsed, and the equipment parameters, rated capacity and installation location information in the text annotations are associated with the corresponding graphic element objects to form attribute tags for the graphic element objects. The attribute tags refer to descriptive information and parameters related to the graphic element objects.
[0055] Based on the type attributes, device attributes, and attribute labels of the primitive objects, a set of nodes is created. Based on the topology connection mapping, an edge set is established through the electrical connection relationship between two primitive objects to obtain the complete graph structure. The graph structure is a data structure composed of nodes and edges, used to describe electrical equipment and its connection relationships.
[0056] In practice, rural power grid drawings are processed in layers according to electrical function categories, mainly divided into connection line layer and labeling information layer.
[0057] For the connecting line layer, a contour detection algorithm based on OpenCV is used to detect graphic elements. This algorithm uses an adaptive threshold segmentation method to convert the drawing into a binary image, and then applies the findContours function to extract contour information. In order to locate independent graphic units, closed regions are identified through contour hierarchical structure analysis and area filtering. Contours with an area in the range of 100-5000 pixels are considered as valid primitives. These contours are extracted as independent graphic units, and primitive objects are established. The primitive objects contain basic geometric feature information such as contour coordinates, area, and bounding box.
[0058] A standard electrical symbol library is constructed, containing standard graphic templates of common power distribution equipment such as transformers, circuit breakers, and disconnect switches. Each graphic object is feature-extracted through shape descriptors. The main features include contour moments, Hu moment invariants, contour perimeter and area ratio, etc. The template matching method is used to calculate the similarity between the extracted features and the standard symbol library. Matches with a similarity of more than 0.85 are considered valid recognitions.
[0059] For complex primitives, refined identification is performed through region-based semantic segmentation to extract attribute information such as device type and rated value.
[0060] Extract the geometric information of line segments and use Hough transform to detect straight line segments in the drawing. The detection parameters are set to a threshold of 100, a minimum line segment length of 20 pixels, and a maximum gap of 5 pixels. For the detected line segments, extract their start and end coordinates and line segment direction vectors.
[0061] To determine the connection relationship between line segments and primitive objects, an endpoint coordinate matching rule is defined: if the distance between the endpoint coordinates of a line segment and the bounding box of a primitive object is less than 10 pixels, then the line segment is considered to be connected to the primitive.
[0062] For paths formed by connecting multiple line segments, the connecting line segments are merged using the disjoint-set data structure algorithm through line segment endpoint analysis to identify the complete connecting path.
[0063] Through the above process, a topological connection mapping between primitive objects is established, and the connection status of the input and output ends of each primitive object is recorded.
[0064] OCR technology was used to parse the text annotations. In the preprocessing stage, Gaussian filtering and morphological operations were employed to enhance the clarity of text regions. Text localization used the MSER algorithm to detect text regions, with a threshold set between 10 and 30. Text recognition employed a CRNN-based model, and the recognition results were then subjected to regular expression pattern matching.
[0065] Extract device parameter information and establish association rules between text annotations and graphic objects: if the center point coordinates of the text annotation are less than 100 pixels away from the center point of the graphic object, then associate the text information with the graphic object.
[0066] A set of nodes is created based on the type attributes, device attributes, and attribute labels of primitive objects. Each node contains multi-dimensional attribute information such as ID, type, geometric features, and electrical parameters. At the same time, based on the aforementioned topology connection mapping, a set of edges is established through the electrical connection relationship between two primitive objects. Each edge records attributes such as the starting node ID, connection type, and physical length. The final generated graph structure is stored in an adjacency list, which supports efficient path query and network analysis operations.
[0067] S102. Match the graph structure according to the preset compliance rule set to obtain a set of violations.
[0068] The set of violations includes identifying compliance constraint patterns in historical agricultural power grid drawing review cases through pattern mining, and generating a set of compliance rules for agricultural power grid drawings.
[0069] The manually marked violation locations and compliance clauses were extracted from the historical agricultural power grid drawing review cases. The violation locations refer to the spatial coordinates of non-compliant areas manually marked on the drawings, and the compliance clauses are the technical standard provisions on which they are based.
[0070] Using preset combinations of equipment types and the topological connection structures between these combinations as equipment configuration patterns, the topological patterns of the historical rural power grid drawing review cases are extracted to identify recurring equipment configuration patterns.
[0071] The device configuration mode is a topological subgraph formed by a specific combination of device types and their connection relationships.
[0072] The frequency of manually marked violations in the device configuration modes is statistically analyzed. Device configuration modes with a frequency exceeding a preset threshold are identified as high-risk configuration modes. The frequency refers to the number of times a specific configuration mode appears in historical violation cases.
[0073] Extract device attribute constraints from the compliance clauses corresponding to the manually marked violation locations. Associate and map the high-risk configuration mode with these device attribute constraints.
[0074] When extracting the topological features of the graph structure that satisfy the high-risk configuration mode, the device attribute constraints that need to be checked are established, trigger rules are created, and the trigger rules and device attribute constraints are summarized to generate the compliance rule set of the rural power grid drawing.
[0075] The compliance rule set is a set of rules used to automatically check whether drawings are compliant.
[0076] The cases for reviewing distribution network drawings are derived from the review archives of rural distribution network engineering projects. Specifically, they include drawings for newly built rural distribution network projects and renovation projects, covering various types such as 10kV distribution line projects, distribution transformer substation projects, and low-voltage line renovation projects.
[0077] To automatically discover potential irregular configuration patterns from historical data, a frequent subgraph mining algorithm was used to perform pattern mining on the graph structure data of 1000 historical drawings. Specifically, the gSpan (graph-based substructure pattern mining) algorithm was adopted. This algorithm traverses the subgraph space through a depth-first search strategy, which can efficiently discover frequently occurring topological structure patterns.
[0078] Each historical drawing is converted into a graph structure representation G=(V,E), where node V represents electrical equipment (such as transformers, circuit breakers, etc.) and edge E represents the electrical connection relationship between the equipment.
[0079] The graph-structured dataset is preprocessed to label each node with equipment type attributes (e.g., "distribution transformer", "circuit breaker") and each edge with connection type attributes (e.g., "high-voltage side connection", "low-voltage side connection"). A minimum support threshold of 8% is set for frequent subgraph mining, meaning a candidate pattern must appear in at least 80 graphs (8% x 1000) to be considered a frequent pattern.
[0080] The gSpan algorithm iterates from a single-edge subgraph, gradually generating larger candidate subgraphs through right expansion (adding new edges to the right side of the DFS tree) and back expansion (adding edges connecting existing nodes). It uses DFS encoding as the normalized representation of the subgraph, ensuring that each topology has a unique minimum DFS encoding and avoiding redundant computation of isomorphic subgraphs.
[0081] During the mining process, the algorithm automatically discovered a variety of frequent topology patterns, including "distribution transformer-low voltage side bus-missing node" and "overhead line-vacant position-missing surge arrester".
[0082] For example, the three-node pattern "distribution transformer - low-voltage side busbar - connection without protection equipment" appeared 189 times in 127 drawings, with a support rate of 12.7%, exceeding the minimum support threshold; the two-node pattern "overhead line - connection without surge arrester" appeared 210 times in 143 drawings, with a support rate of 14.3%.
[0083] By employing an anti-monotonic pruning strategy, subgraphs with support below a threshold are no longer expanded, reducing the candidate pattern space from millions in theory to just over 3,200 in practice.
[0084] To further identify high-risk configuration patterns strongly correlated with violations, a comparative pattern mining method is introduced.
[0085] The 1000 historical drawings were divided into a non-compliant sample set D_v (432 drawings containing non-compliant drawings) and a compliant sample set D_c (568 fully compliant drawings).
[0086] For each frequent pattern p, calculate its support in both sample sets. and And calculate the risk ratio R(p) = / .
[0087] When R(p)>3.0, it indicates that the pattern appears more frequently in violation samples than in compliance samples, and has a high degree of indicativeness of violation.
[0088] Among them, the The frequency of pattern p in the set of violations, the R(p) represents the frequency of pattern p in the compliant sample set, and R(p) represents the risk ratio of pattern p.
[0089] The chi-square independence test was used to verify the statistical significance of the association between the model and violations.
[0090] For each candidate high-risk pattern, construct a 2x2 contingency table: it appears a times in the violation samples and does not appear b times; it appears c times in the compliance samples and does not appear d times.
[0091] Calculate the chi-square statistic:
[0092]
[0093] Where n=1000 is the total number of samples.
[0094] The null hypothesis of independence was rejected when the p-value was less than 0.05, indicating that the pattern was significantly associated with the violation.
[0095] Wherein, 'a' represents the frequency of the pattern appearing in the violation sample set, 'b' represents the frequency of the pattern not appearing in the violation sample set, 'c' represents the frequency of the pattern appearing in the compliance sample set, 'd' represents the frequency of the pattern not appearing in the compliance sample set, and 'n' represents the total number of samples. This is the chi-square test statistic.
[0096] For example, comparative analysis revealed that the "distribution transformer-low-voltage busbar-no-protection equipment" pattern appeared 156 times in the non-compliant samples (sup_v=36.1%), while it appeared only 33 times in the compliant samples (sup_c=5.8%). The risk ratio R=6.22 and the chi-square test p-value <0.001, which identified it as a significantly high-risk configuration pattern.
[0097] The same method identified several high-risk patterns, such as "overhead line - missing surge arrester" (R=5.87, p<0.001) and "three-phase load - single-phase protection" (R=4.35, p=0.003).
[0098] Through the automated pattern mining process described above, 76 frequent topological patterns were discovered from historical data, of which 23 were identified as high-risk configuration patterns through comparative mining and statistical testing.
[0099] The preset combinations of device types and their topological connection structures are defined as a verification benchmark and supplement to the pattern mining results.
[0100] Common equipment types for rural power distribution networks are predefined, including distribution transformers, circuit breakers, fuses, disconnect switches, surge arresters, cables, overhead lines, etc.
[0101] For these equipment types, several common combination patterns are preset as reference templates based on domain expert knowledge, such as the combination of "distribution transformer-low voltage side-protection equipment" and "overhead line-pole switch-surge arrester".
[0102] The 23 high-risk configuration patterns discovered through pattern mining were compared and verified with the preset reference template.
[0103] Meanwhile, the mining process also discovered three new violation patterns not included in the preset templates, such as "multiple transformers - shared grounding - impedance mismatch". These newly discovered patterns were added to the configuration pattern library.
[0104] Each drawing is parsed into a graph structure of device nodes and connecting edges. Then, the subgraph isomorphic matching algorithm (VF2 algorithm) is used to match the high-risk configuration patterns obtained by pattern mining with the graph structure of the drawing to identify instances of non-compliant configurations in the drawing.
[0105] For example, in a certain drawing, the distribution transformer node ID is identified as T-056, which is connected to the low-voltage side bus node ID as B-112. However, B-112 is not connected to any circuit breaker or fuse node, which is a perfect match for the high-risk pattern "distribution transformer - low-voltage side - lack of protection equipment" found by pattern mining.
[0106] The frequency of manually marked violations was statistically analyzed across various equipment configuration modes. Assuming a preset frequency threshold of 20 occurrences, for the configuration mode "distribution transformer - low-voltage side - lack of protection equipment," 156 out of 189 occurrences were manually marked as violations, far exceeding the preset threshold, thus it was selected as a high-risk configuration mode.
[0107] Similarly, other high-risk configuration patterns were identified, such as "overhead line - missing surge arrester" (occurred 132 times, of which 118 were marked improperly) and "three-phase load - single-phase protection" (occurred 85 times, of which 73 were marked improperly).
[0108] When extracting equipment attribute constraints from the compliance regulations corresponding to manually marked violation locations, natural language processing is performed on the regulatory text.
[0109] Taking Clause 3.2.4, "The low-voltage side of the distribution transformer shall be equipped with fuses or circuit breakers for short-circuit protection," as an example, the extracted equipment attribute constraints are: Equipment type = "distribution transformer", location = "low-voltage side", and required connected equipment = [{type = "fuse" or type = "circuit breaker", function = "short-circuit protection"}].
[0110] Establish the correspondence between configuration modes and constraints. Summarize all trigger rules and device attribute constraints to form a complete set of compliance rules for rural power distribution network drawings. This rule set contains multiple rule entries, each consisting of a trigger condition and a constraint check.
[0111] For example, the entry with rule ID R001 defines the trigger condition "a distribution transformer node is detected and no protective equipment is connected on the low-voltage side", the constraint check is "verify whether a fuse or circuit breaker is connected on the low-voltage side of the distribution transformer", and the reference clause for violation is Article 3.2.4. The final generated rule set contains 76 compliance check rules related to high-risk configuration modes, covering compliance requirements in multiple aspects such as transformer protection, line protection, grounding systems, and load distribution.
[0112] S103. Based on the graph structure, implicit dependencies are obtained through multi-hop neighborhood aggregation, coupled device combinations are identified, node semantics are encoded, and then a sequence vector that integrates topological semantics and a feature vector that quantifies coupling strength are generated. After fusion and rule matching reasoning, a set of combinatorial violations is obtained.
[0113] S1031. Perform multi-hop neighborhood information aggregation processing on the graph structure to obtain the implicit dependencies between the nodes.
[0114] The graph structure is subjected to multi-hop neighborhood information aggregation processing, which includes aggregating the current representation vector of its one-hop neighbor nodes for each node in the graph structure during the iterative aggregation process.
[0115] The node's current representation vector is non-linearly fused with the aggregated neighborhood vector to update the node's representation vector.
[0116] The graph structure undergoes multi-hop neighborhood information aggregation processing. Through an iterative propagation mechanism, each node collects and merges the attribute information of its neighboring nodes along the topological edges to obtain the implicit dependencies between electrical devices. The type attribute, device attribute, and attribute label of each node in the graph structure are encoded into a node attribute vector, which is a numerical representation of the node's features.
[0117] In each iteration, each node in the graph structure is traversed, and the neighboring nodes directly connected to the current node through edges are identified. The node attribute vectors of each neighboring node are concatenated and combined to generate the neighborhood aggregation vector of the current node. The neighborhood aggregation vector is a comprehensive representation of the features of all direct neighboring nodes of the current node.
[0118] The node attribute vector of the current node is fused with the neighborhood aggregation vector. The feature fusion includes updating the node attribute vector of the current node with the attribute features of the current node and the attribute features of the neighboring nodes through nonlinear transformation, so as to obtain the updated node attribute vector.
[0119] In each round of iterative propagation, the neighborhood range is expanded, so that the node attribute vector gradually merges the attribute features of multi-hop neighborhood nodes. Multi-hop neighborhood nodes refer to nodes that are more than one hop away from the current node.
[0120] Extract the updated node attribute vector of each node in the graph structure, calculate the similarity between the updated node attribute vectors of any two nodes, and when the similarity exceeds a preset similarity threshold, determine that there is an implicit dependency relationship between the electrical devices corresponding to the two nodes. The implicit dependency relationship refers to the association relationship between electrical devices that are not directly connected but affect each other in function or state.
[0121] In practical implementation, embedding technology is used to transform different types of attributes into vector representations of a unified dimension. For equipment type attributes, such as transformers, circuit breakers, and busbars, one-hot encoding is used to convert them into vectors of a fixed dimension. For numerical attributes of equipment, such as rated voltage and capacity, they are directly used after normalization. For text-based attribute tags, word embedding technology is used to convert them into vector representations.
[0122] Taking transformer equipment as an example, its type attribute "transformer" is encoded as [1, 0, 0, 0, 0], the equipment attributes "220kV" and "100MVA" are normalized to [0.85, 0.62], the attribute label "main transformer" is encoded as [0.72, 0.31, 0.45], and after concatenation, the initial node attribute vector is obtained as [1, 0, 0, 0, 0, 0.85, 0.62, 0.72, 0.31, 0.45].
[0123] In the neighborhood information aggregation stage, for each neighboring node u∈N(v) of the current node v, its node attribute vector is extracted, and the attribute vectors of all neighboring nodes are combined to generate a neighborhood aggregation vector.
[0124] For example, bus 101 is connected to three circuit breakers. The node attribute vectors of these three circuit breakers are [0.5, 0.3, 0.7, 0.2], [0.4, 0.6, 0.3, 0.5], and [0.7, 0.2, 0.6, 0.4], respectively. The weights assigned according to the connection strength are 0.4, 0.35, and 0.25, respectively. Then, the neighborhood aggregation vector of bus 101 is:
[0125] [0.50.4+0.40.35+0.70.25, 0.30.4+0.60.35+0.20.25, 0.70.4+0.30.35+0.60.25, 0.20.4+0.50.35+0.40.25]=[0.52, 0.38, 0.55, 0.34]
[0126] The feature fusion step combines the attribute vector of the current node v with the neighborhood aggregation vector to generate an updated node attribute vector. The fusion adopts a non-linear transformation method, which concatenates the current node attribute vector with the neighborhood aggregation vector and performs a non-linear transformation through a multilayer perceptron to output an updated vector with the same dimension as the original node attribute vector. ReLU is used as the activation function in this process.
[0127] For example, suppose the attribute vector of node v is [0.6, 0.4, 0.8, 0.3] and the neighborhood aggregation vector is [0.52, 0.38, 0.55, 0.34]. Concatenating the two results in [0.6, 0.4, 0.8, 0.3, 0.52, 0.38, 0.55, 0.34]. After a nonlinear transformation, the updated node attribute vector is obtained as [0.65, 0.42, 0.75, 0.35].
[0128] Through K iterations, the node representation vector incorporates the attribute features of all nodes within the K-hop neighborhood. In power grid scenarios, the number of iterations is typically set to 3-5 rounds. After multiple iterations, the similarity between the updated attribute vectors of any two nodes is calculated. The similarity calculation uses the cosine similarity method, and the similarity threshold is typically set to 0.75-0.85. When the similarity between two nodes exceeds this threshold, it is determined that there is an implicit dependency between their corresponding electrical devices.
[0129] For example, two circuit breakers in a substation that are not directly connected have node attribute vectors of [0.82, 0.56, 0.73, 0.41, 0.65] and [0.80, 0.52, 0.76, 0.45, 0.68] after multi-hop neighborhood information aggregation. The calculated cosine similarity is 0.992, which exceeds the preset threshold of 0.8. Therefore, it is determined that there is an implicit dependency between the two circuit breakers.
[0130] The electrical equipment involved mainly includes primary equipment such as distribution transformers, circuit breakers, load switches, fuses, surge arresters, instrument transformers, and busbars, as well as secondary equipment such as protection relays and measuring instruments.
[0131] Implicit dependencies mainly include four types: First, functional coordination dependency, such as the high-voltage side fuse and low-voltage side circuit breaker of a transformer, which, although not directly connected, together constitute the transformer protection system; second, protection coordination dependency, such as the upstream line circuit breaker and the downstream branch fuse need to coordinate in terms of operating sequence; third, power supply path dependency, such as the main transformer and the terminal distribution transformer, which, although separated by multiple levels of equipment, have a constraint relationship in terms of capacity configuration; and fourth, grounding system dependency, such as transformers, surge arresters, and distribution cabinets in the same area forming an electrical connection through a shared grounding network.
[0132] By identifying these implicit dependencies, compliance issues that are difficult to detect through traditional topology analysis can be discovered, such as "mismatch between high and low voltage protection of transformers", "inconsistent protection configuration of circuit breakers on the same busbar", "inadequate capacity of upstream circuit breakers to meet downstream loads", and "conflicts in grounding system configuration".
[0133] S1032. Identify the combination of devices that have coupling effects based on the implicit dependencies.
[0134] Identifying a device combination with coupling based on the implicit dependency relationship includes determining whether the association strength between each pair of nodes in the implicit dependency relationship exceeds a preset threshold, and identifying the node pairs with the association strength exceeding the preset threshold as the device combination with coupling.
[0135] The strength of the association can be characterized by the similarity calculated above.
[0136] For each node pair with the implicit dependency relationship, obtain the semantic embedding vectors of the two nodes respectively, and calculate the vector distance between the two semantic embedding vectors in the semantic representation space. The semantic embedding vectors are the deep semantic feature representations of the nodes, and the vector distance is used to measure the distance between the nodes in the semantic space.
[0137] The coupling strength quantification value of the node pair is generated by fusing the similarity in the vector distance and the implicit dependency. The coupling strength quantification value is a numerical value that quantifies the interaction strength between the node pairs.
[0138] Traverse all node pairs that have the implicit dependency relationship, obtain the coupling strength quantization value of each node pair, and identify node pairs whose coupling strength quantization value exceeds the preset coupling strength threshold as device combinations with coupling effect. The device combinations with coupling effect refer to device node pairs with strong interaction relationship.
[0139] In specific implementation, assuming the preset coupling strength threshold is 0.6, node pairs with coupling strength quantification values exceeding this threshold are identified as device combinations with coupling effects.
[0140] For each node, multi-hop neighborhood information aggregation is performed. Assume the graph structure contains device nodes A, B, and C, and the initial value of node A's attribute vector is [0.2, 0.5, 0.1]. Through neighborhood aggregation, the information of node A's one-hop neighbors B and C is aggregated to node A, so that node A's attribute vector is updated to [0.25, 0.48, 0.15].
[0141] During two-hop aggregation, the neighbor information of B and C is also indirectly aggregated to node A, so that the final attribute vector of node A is updated to [0.27, 0.46, 0.18]. Assuming that there is an implicit dependency between nodes A and B, the semantic embedding vectors of A and B are obtained as [0.65, 0.42, 0.37, 0.58, 0.21] and [0.72, 0.35, 0.41, 0.52, 0.18], and the Euclidean distance between the two vectors is calculated to be 0.132.
[0142] The similarity of implicit dependencies can be obtained from historical data. For example, if the historical frequency of collaboration between nodes A and B is 85%, it can be converted into a similarity value of 0.85.
[0143] By weighted fusion calculation, the vector distance of 0.132 and similarity of 0.85 are processed to generate a quantized value of 0.78 for the coupling strength between nodes A and B.
[0144] In the specific fusion calculation process, the vector distance is normalized to a value between 0.0 and 1.0, and then a weighted average with similarity is calculated. The weights can be adjusted according to the specific application scenario.
[0145] Iterate through all node pairs with implicit dependencies and obtain the quantized coupling strength value for each node pair. For example, the quantized coupling strength value for nodes A and C is calculated as 0.45, and the quantized coupling strength value for nodes B and C is calculated as 0.62. Assuming a preset coupling strength threshold of 0.6, node pairs with coupling strength values exceeding this threshold are A and B, and B and C. These node pairs are identified as device combinations with coupling effects.
[0146] Once the device combination is identified, it can be further applied to real-world scenarios. For example, in a smart home scenario, if node A represents an air conditioner and node B represents a temperature sensor, and the two are identified as a device combination with a coupling relationship, users can be advised to configure them as a linked pair.
[0147] In industrial equipment monitoring scenarios, if node B represents a pressure valve and node C represents a flow meter, the two are identified as a device combination with a coupling effect, and they can be displayed in adjacent positions on the monitoring interface.
[0148] The device combinations identified by the above methods can effectively reduce the management complexity of the system and improve the efficiency of collaborative work between devices.
[0149] In practical applications, the preset coupling strength threshold can be adjusted according to different scenarios. In large device networks, a higher threshold, such as 0.75, needs to be set to filter out the most tightly coupled device combinations. In small device networks, a lower threshold, such as 0.5, can be used to discover more potential device collaboration opportunities.
[0150] S1033. Encode the nodes of the graph structure to generate semantic embedding vectors for the nodes.
[0151] Encoding the nodes of the graph structure to generate semantic embedding vectors for the nodes includes: obtaining the multi-hop aggregated representation vector of the node and the original attributes of the node, wherein the multi-hop aggregated representation vector is an updated node attribute vector.
[0152] The original attributes include the node's type attribute, device attribute, and attribute label.
[0153] The multi-hop aggregated representation vector is jointly encoded with the original attribute, and the result of the joint encoding is projected onto the semantic space to generate the semantic embedding vector.
[0154] Specifically, the node attribute vector after multi-hop neighborhood information aggregation is jointly encoded with the node's type attribute, device attribute, and attribute label, and then projected onto a unified semantic representation space through semantic mapping transformation to generate the node's semantic embedding vector.
[0155] In the specific implementation, a hash encoding method is used to map type attributes, device attributes, etc. into vectors. The node attribute vector after multi-hop aggregation is concatenated with the type attribute vector, device attribute vector and attribute label vector to form a high-dimensional vector. The high-dimensional vector is projected onto a unified semantic representation space through semantic mapping transformation to generate the semantic embedding vector of the node.
[0156] Furthermore, node A's type attribute is "thermostat", its device attributes include "location = living room, power = 1000W", and its attribute label is "core control device". A hash encoding method is used to map the type attribute to a vector [0.8, 0.2, 0.0], the device attribute to a vector [0.5, 0.7, 0.4], and the attribute label to a vector [0.9, 0.1, 0.3].
[0157] During the joint encoding process, the node attribute vector [0.27, 0.46, 0.18] after multi-hop aggregation is concatenated with the type attribute vector, device attribute vector and attribute label vector to form a high-dimensional vector [0.27, 0.46, 0.18, 0.8, 0.2, 0.0, 0.5, 0.7, 0.4, 0.9, 0.1, 0.3].
[0158] To reduce dimensionality and extract effective features, a semantic mapping transformation is used to project the high-dimensional vector onto a unified semantic representation space, generating the semantic embedding vector [0.65, 0.42, 0.37, 0.58, 0.21] for node A. Nodes B and C also generate their respective semantic embedding vectors through the same process, with B's semantic embedding vector being [0.72, 0.35, 0.41, 0.52, 0.18] and C's semantic embedding vector being [0.48, 0.67, 0.25, 0.37, 0.42].
[0159] S1034. Generate a semantic sequence vector based on the semantic embedding vectors of the nodes in the device combination with coupling and their topological connection relationships.
[0160] In a device assembly with coupling, the topological connections of each node in the graph structure are extracted, which describe the connection order of nodes within the device assembly.
[0161] In a device assembly with coupling, the topological connection relationship of each node in the graph structure and the semantic embedding vector are extracted. The semantic embedding vectors are concatenated according to the connection order in the topological connection relationship to generate a semantic sequence vector. The semantic sequence vector is the result of concatenating the semantic embedding vectors arranged according to the device connection order, and is used to characterize the overall semantic features of the device assembly.
[0162] In practice, the semantic embedding vectors of the three devices are sequentially concatenated according to the connection order of pressure sensor → control valve → flow meter to obtain semantic sequence vector.
[0163] In an industrial automation system, pressure sensors, control valves, and flow meters form a device combination. The pressure sensor is connected to the control valve, and the control valve is then connected to the flow meter, forming a linear topology.
[0164] Each device node has a pre-computed semantic embedding vector. For example, the semantic embedding vector of the pressure sensor is [0.24, 0.56, 0.78, 0.11, 0.93], the semantic embedding vector of the control valve is [0.44, 0.21, 0.66, 0.38, 0.51], and the semantic embedding vector of the flow meter is [0.33, 0.62, 0.45, 0.79, 0.27].
[0165] These vectors typically have a dimension between 50 and 300 and are used to represent semantic information such as the device's functions, characteristics, and operating parameters.
[0166] Following the connection order of "pressure sensor → control valve → flow meter", the semantic embedding vectors of the three devices are concatenated sequentially to obtain the semantic sequence vector [0.24, 0.56, 0.78, 0.11, 0.93, 0.44, 0.21, 0.66, 0.38, 0.51, 0.33, 0.62, 0.45, 0.79, 0.27].
[0167] S1035. Based on the semantic embedding vectors of the nodes in the device combination with coupling and the implicit dependency relationship, generate a coupling strength quantization value for the device combination with coupling.
[0168] Based on the semantic embedding vectors of nodes in the coupled device group and the implicit dependency relationship, a coupling strength quantification value of the coupled device group is generated, including: calculating the distance between the semantic embedding vectors of nodes in the device group, obtaining the association strength of the nodes in the implicit dependency relationship, and fusing the distance and the association strength to generate the coupling strength quantification value.
[0169] In the specific implementation, assuming an implicit dependency exists between nodes A and B, we obtain the semantic embedding vectors of A and B respectively, and calculate the Euclidean distance between the two vectors. The smaller the vector distance, the closer the two nodes are in the semantic space. We then fuse the vector distance with the similarity in the implicit dependency. The similarity of the implicit dependency can be obtained from historical data, such as the historical frequency of collaboration between nodes A and B. Through weighted fusion calculation, we process the vector distance and similarity to generate a quantified value of the coupling strength between nodes A and B.
[0170] S1036. Encode the quantized value of the coupling strength into a coupling strength feature vector.
[0171] The quantized value of the coupling strength is encoded into a coupling strength feature vector, which is a characteristic representation of the coupling strength value.
[0172] In specific implementation, the coupling strength between the pressure sensor and the control valve is 0.85, and the coupling strength between the control valve and the flow meter is 0.62. These coupling strength quantization values are encoded into a coupling strength feature vector, such as [0.85, 0.62].
[0173] S1036. The semantic sequence vector and the coupling strength feature vector are fused to generate a context feature representation.
[0174] The semantic sequence vector and the coupling strength feature vector are fused to generate a context feature representation of the device combination. The context feature representation is a feature vector that integrates the semantic information of the device combination and the coupling strength.
[0175] In practical implementation, feature fusion can be performed using concatenation operations or weighted summation. Assuming a simple concatenation is used, the context feature is represented by concatenating the semantic sequence vector and the coupling strength feature vector.
[0176] Furthermore, assuming simple connections are used, the context features are represented as [0.24, 0.56, 0.78, 0.11, 0.93, 0.44, 0.21, 0.66, 0.38, 0.51, 0.33, 0.62, 0.45, 0.79, 0.27, 0.85, 0.62].
[0177] S1037. Based on the context feature representation and the preset device combination configuration rules, perform matching reasoning to obtain a set of combination violations.
[0178] The set of combination violations is obtained by matching and reasoning with the context feature representation and the preset device combination configuration rules.
[0179] The device combination configuration rules include: constraints on semantic patterns and limitations on the range of coupling strength.
[0180] The matching inference includes: determining whether the context feature representation conforms to the constraints on the semantic pattern, and determining whether the coupling strength in the context feature representation is within the range of the coupling strength. Based on the result of the matching inference, the set of combinatorial violations is generated.
[0181] Based on the context feature representation and the preset device combination configuration rules, matching reasoning is performed. By analyzing whether the semantic sequence vector conforms to the semantic pattern constrained by the device combination configuration rules, and whether the coupling strength feature vector exceeds the coupling strength range defined by the device combination configuration rules, it is determined whether the device combination violates the device combination configuration rules under the preset topology configuration. If so, combination violation items are generated and all device combinations are traversed to obtain a set of combination violation items. The device combination configuration rules are compliance constraints for specific device combination types, and the set of combination violation items is a set of violation items generated for cross-device combination rule violations.
[0182] In specific implementation, a certain rule stipulates that "in a combination of pressure control equipment, the response speed of the control valve must match the signal frequency of the upstream sensor, and the coupling strength must not exceed 0.8". By analyzing the semantic sequence vector part of the context feature representation, the semantic pattern is identified. At the same time, the 0.85 in the coupling strength feature vector exceeds the 0.8 range limited by the rule. Therefore, it is determined that the combination of equipment violates the configuration rule, and this violation is generated as a combination violation item.
[0183] Matching and reasoning are performed based on contextual feature representations and preset device combination configuration rules. The device combination configuration rules include two parts of constraints: semantic pattern constraints and coupling strength constraints.
[0184] For example, a rule stipulates that "in a pressure control device combination, the response speed of the control valve must match the signal frequency of the upstream sensor, and the coupling strength must not exceed 0.8." Analyzing the semantic sequence vector part of the context feature representation, the semantic pattern identified indicates that this is a pressure control device combination. However, the difference between the response speed of the control valve (represented by 0.66 in the embedding vector) and the signal frequency of the pressure sensor (represented by 0.78 in the embedding vector) exceeds the allowable range; at the same time, the 0.85 in the coupling strength feature vector exceeds the 0.8 range specified by the rule. Therefore, it is determined that this device combination violates the configuration rule.
[0185] This violation is generated as a combined violation item: "The coupling strength of the pressure sensor and control valve combination is too high (0.85>0.8), and the response speed of the control valve does not match the frequency of the sensor signal."
[0186] By traversing all combinations of devices with coupling, a complete set of compositional violations is generated.
[0187] The above methods can effectively identify situations that appear compliant at the individual device level but are actually non-compliant at the device combination level, significantly improving the level of compliance management in industrial environments.
[0188] For example, in a real-world application scenario, it was successfully identified that although the temperature sensors, emergency valves, and alarm systems in a chemical plant were individually compliant, their combined configuration did not meet the safety redundancy requirements, thus avoiding potential safety hazards.
[0189] S104. Merge the set of violations with the set of combined violations to generate an extended set of violations.
[0190] The set of violations is merged with the set of combined violations to generate the set of extended violations, which is a comprehensive set of results including single-device violations and cross-device combined violations.
[0191] For the extended set of violations, the responsible nodes and edges can be located on the graph structure based on the backpropagation mechanism to determine the spatial location of the violation and the involved graph primitives, and generate a compliance review report for the agricultural power grid drawings.
[0192] Based on the backpropagation mechanism, the responsible nodes and edges are located on the graph structure to determine the spatial location of the violation and the involved graph primitives, including:
[0193] Based on the topological connections between nodes in the combined violation, reverse path tracing is performed on the graph structure. Starting from the multiple nodes involved in the combined violation, the edges in the graph structure are traversed in reverse to calculate the contribution of each edge to the combined violation.
[0194] Edges whose contribution exceeds a preset contribution threshold are identified as responsible edges, and nodes connected by the responsible edges are identified as responsible nodes; the mapping relationship between nodes and graphic objects is queried to obtain the graphic object corresponding to the responsible node, and the spatial coordinate position of the graphic object is located in the agricultural power grid drawing data.
[0195] In rural power distribution network drawing data, various devices and connections are represented as a graph structure, where nodes represent various equipment components, such as transformers, distribution boxes, and cables, and edges represent the connections between devices.
[0196] Combination violations involve situations where the topological relationships between multiple nodes violate the specifications, such as exceeding cable length limits or having an excessively large power supply radius.
[0197] To locate responsible nodes and edges, a graph structure is constructed. This graph structure contains multiple nodes and edges. Each node corresponds to a graphical element in the rural power distribution network drawing; for example, a transformer node corresponds to a transformer element in the drawing, and a cable node corresponds to a cable element. Edges represent the connections between nodes, such as the connection between a transformer and a cable. The graph structure stores node attributes, such as equipment type and rated power, and edge attributes, such as cable length and cable specifications.
[0198] Once the detection system identifies a combination of violations, it begins to execute a backpropagation mechanism to locate the responsible nodes and edges.
[0199] Reverse path tracing starts from multiple nodes involved in the violation. For example, for the violation of "excessive power supply radius", it starts from the end user node and the power supply node.
[0200] In the graph structure, traverse backwards along the edges to calculate the contribution of each edge to the violation. The contribution is calculated as follows: for each edge e(i, j), where i and j are two connected nodes, the contribution C(e) is determined by the degree of association between the edge's attributes and the violation type.
[0201] For example, for the violation of "excessive cable length", the contribution of an edge is closely related to its length attribute; for the violation of "excessive power supply radius", the contribution is related to the position and length of the edge in the power supply path.
[0202] Specifically, the contribution is calculated by the ratio of edge attribute values to violation thresholds. For example, in length violations, the proportion of edge length to the total excessive length can be used as a contribution indicator.
[0203] In the example, a power supply path contains a sequence of nodes [A, B, C, D], with corresponding edges [e(A, B), e(B, C), e(C, D)] and edge lengths of [100 meters, 300 meters, 200 meters].
[0204] If the standard specifies a maximum power supply distance of 500 meters, but the actual total length is 600 meters, it exceeds the limit by 100 meters.
[0205] By calculating the proportion of each side length, the contribution of e(B,C) is determined to be 0.5, while the contributions of e(A,B) and e(C,D) are 0.17 and 0.33, respectively.
[0206] If the preset contribution threshold is set to 0.3, then edges e(B, C) and e(C, D) whose contribution exceeds the threshold are identified as responsible edges.
[0207] Furthermore, nodes B, C, and D connected by the responsible edge are identified as responsible nodes.
[0208] These nodes and edges are the primary responsible parties for violations.
[0209] After identifying the responsible nodes, the mapping relationship between nodes and graphic element objects is queried. Each node in the graph structure has a one-to-one correspondence with a graphic element object in the agricultural power grid drawing. This mapping relationship is stored in the database, recording the correspondence between node IDs and graphic element IDs. The corresponding graphic element object ID is retrieved by querying the node ID of the responsible node.
[0210] Based on the element object ID, the spatial coordinates of the element object are further queried in the agricultural power grid drawing data. The agricultural power grid drawing uses a two-dimensional coordinate system, and each element object has clearly defined spatial coordinates.
[0211] For example, for the responsible node B in the above example, the corresponding primitive object is a distribution box with spatial coordinates (X=1200, Y=850); node C corresponds to a cable segment with spatial coordinates [(X1=1200, Y1=850), (X2=1500, Y2=850)].
[0212] Once the location is determined, the violation location information and the responsible graphic element information are returned to the user interface. The violation location and related responsible objects are then displayed on the rural power distribution network drawing using highlighting and marking techniques, helping engineers quickly locate and correct the violation. This application is applicable to various combined violation scenarios, such as insufficient cable current carrying capacity and unreasonable equipment configuration.
[0213] This application also provides a device for reviewing the compliance of agricultural power distribution network drawings, including:
[0214] Drawing module 201: Obtain rural power distribution network drawings; parse the rural power distribution network drawings and construct a graph structure, the graph structure including nodes representing electrical equipment and edges representing connections;
[0215] The matching module 202 matches the graph structure according to a preset set of compliance rules to obtain a set of violations;
[0216] Analysis module 203 performs multi-hop neighborhood information aggregation processing on the graph structure to obtain implicit dependencies between nodes; identifies device combinations with coupling based on the implicit dependencies; encodes the nodes of the graph structure to generate semantic embedding vectors for the nodes; generates semantic sequence vectors based on the semantic embedding vectors of nodes in the coupled device combinations and their topological connections; generates a coupling strength quantization value for the coupled device combinations based on the semantic embedding vectors of nodes in the coupled device combinations and the implicit dependencies; encodes the coupling strength quantization value into a coupling strength feature vector; fuses the semantic sequence vectors and the coupling strength feature vectors to generate a context feature representation; and performs matching reasoning based on the context feature representation and preset device combination configuration rules to obtain a set of combination violation items.
[0217] The merging module 204 merges the set of violations with the set of combined violations to generate an extended set of violations.
[0218] This application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described above.
[0219] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the above-described method.
[0220] The above embodiments are provided to enable those skilled in the art to understand and apply this application. Those skilled in the art will readily make various modifications to the above embodiments and apply the general principles described herein to other embodiments without inventive effort. Therefore, this application is not limited to the above embodiments, and any improvements and modifications made to this application based on the disclosure thereof should be within the scope of protection of this application.
Claims
1. A method for reviewing the compliance of agricultural power distribution network drawings, characterized in that, include: Obtain agricultural power distribution network drawings; The rural power grid drawing is parsed to construct a graph structure, which includes nodes representing electrical equipment and edges representing connections. The graph structure is matched according to a preset set of compliance rules to obtain a set of violations; The graph structure is subjected to multi-hop neighborhood information aggregation processing to obtain the implicit dependencies between the nodes; based on the implicit dependencies, device combinations with coupling effects are identified; the nodes of the graph structure are encoded to generate semantic embedding vectors for the nodes; based on the semantic embedding vectors of the nodes in the device combinations with coupling effects and their topological connections, a semantic sequence vector is generated; based on the semantic embedding vectors of the nodes in the device combinations with coupling effects and the implicit dependencies, a coupling strength quantization value of the device combinations with coupling effects is generated; the coupling strength quantization value is encoded into a coupling strength feature vector; the semantic sequence vector and the coupling strength feature vector are fused to generate a context feature representation. Based on the context feature representation and the preset device combination configuration rules, a set of combination violations is obtained; The set of violations is merged with the set of combined violations to generate an extended set of violations.
2. The method according to claim 1, characterized in that, The graph structure is subjected to multi-hop neighborhood information aggregation processing, including: During the iterative aggregation process, for each node in the graph structure, the current representation vector of its one-hop neighbor nodes is aggregated; The node's current representation vector is non-linearly fused with the aggregated neighborhood vector to update the node's representation vector.
3. The method according to claim 1, characterized in that, Based on the implicit dependencies, identify combinations of devices that are coupled, including: Determine whether the association strength between each pair of nodes in the implicit dependency relationship exceeds a preset threshold; Node pairs whose association strength exceeds the preset threshold are identified as the device combinations with coupling effects.
4. The method according to claim 1, characterized in that, Encoding the nodes of the graph structure to generate semantic embedding vectors for the nodes includes: Obtain the multi-hop aggregated representation vector of the node and the original attributes of the node; The multi-hop aggregated representation vector is jointly encoded with the original attribute; The result of joint encoding is projected onto the semantic space to generate the semantic embedding vector.
5. The method according to claim 1, characterized in that, Based on the semantic embedding vectors of nodes in the coupled device assembly and the implicit dependency relationship, a coupling strength quantization value for the coupled device assembly is generated, including: Calculate the distance between the semantic embedding vectors of the nodes in the device assembly; Obtain the association strength of the node in the implicit dependency relationship; The distance and the correlation strength are fused together to generate the quantized value of the coupling strength.
6. The method according to claim 1, characterized in that, The preset compliance rules are generated through the following steps: Extract the locations of violations and their corresponding regulatory provisions from historical review cases; In the graph structure of historical drawings, based on the combination of equipment types and their connection structures, we can identify equipment configuration patterns that occur more frequently than a first preset threshold. The distribution of the violation locations in the device configuration modes is statistically analyzed, and the device configuration modes in which the frequency of violation distribution exceeds a second preset threshold are identified as high-risk configuration modes. Extract the device attribute constraints from the aforementioned specification clauses; The high-risk configuration mode is associated with the device attribute constraints to generate the compliance rules.
7. The method according to claim 1, characterized in that, Based on the context feature representation and the preset device combination configuration rules, a set of combination violations is obtained, including: The device combination configuration rules include constraints on semantic patterns and limitations on the range of coupling strength; The matching reasoning includes: determining whether the context feature representation conforms to the constraints on the semantic pattern, and determining whether the coupling strength in the context feature representation is within the range of the coupling strength; Based on the results of the matching inference, the set of combinatorial violations is generated.
8. A device for reviewing the compliance of agricultural power grid drawings, characterized in that, include: The drawing module retrieves agricultural power distribution network drawings; The rural power grid drawing is parsed to construct a graph structure, which includes nodes representing electrical equipment and edges representing connections. The matching module matches the graph structure according to a preset set of compliance rules to obtain a set of violations; The analysis module performs multi-hop neighborhood information aggregation on the graph structure to obtain implicit dependencies between nodes; identifies device combinations with coupling based on the implicit dependencies; encodes the nodes of the graph structure to generate semantic embedding vectors for the nodes; generates semantic sequence vectors based on the semantic embedding vectors of nodes in the coupled device combinations and their topological connections; generates a coupling strength quantization value for the coupled device combinations based on the semantic embedding vectors of nodes in the coupled device combinations and the implicit dependencies; encodes the coupling strength quantization value into a coupling strength feature vector; and fuses the semantic sequence vectors and the coupling strength feature vectors to generate a contextual feature representation. Based on the context feature representation and the preset device combination configuration rules, a set of combination violations is obtained; The merging module merges the set of violations with the set of combined violations to generate an extended set of violations.
9. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement any one of the methods described in claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed in a computer, causes the computer to perform any one of the methods described in claims 1 to 7.