A kind of drawing compliance review method, system and equipment for distribution network industry expansion

By constructing a cross-page electrical topology diagram and evidence set, combined with a rule and clause library, the problems of information dispersion and cross-page tracking difficulties in the compliance review of power distribution network expansion drawings were solved, realizing the generation of automated and structured review results and improving review efficiency and accuracy.

CN122635313APending Publication Date: 2026-08-25STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611139648.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing technologies for compliance review of power distribution network expansion drawings suffer from problems such as scattered drawing information, difficulty in cross-page tracking, inaccurate correlation between review objects and evidence, and poor interpretability of review conclusions, making it difficult to achieve automated and structured review.

Method used

By analyzing the power distribution network expansion review drawings, a cross-page electrical topology diagram and multiple drawing evidence sets are constructed. Combined with the rule and clause library, structured review clauses are generated. Through cross-page anchor point matching and same-page edge detection, the electrical connection relationship is automatically identified and accurately located, generating traceable review results.

Benefits of technology

It has achieved fully automated compliance review of the entire process from unstructured drawings to verifiable review results, improving review efficiency and accuracy, and meeting the requirements of engineering review for verifiability and accountability boundaries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122635313A_ABST
    Figure CN122635313A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of drawing compliance review method, system and equipment for distribution network expansion, belong to data processing technical field, solve the existing cross-page tracking difficult, review object and evidence correlation inaccuracy and the problem of poor review conclusion explainability.Proceeding with the analysis of the drawing of distribution network expansion review, obtain drawing information, build cross-page electrical topology and multiple drawing evidence collection;From the rule clause library of pre-set, obtain candidate clause and parse into structured review clause;According to review clause, cross-page electrical topology and drawing evidence collection, obtain target review object and its candidate evidence collection, and generate review item in combination with review clause;The candidate evidence collection corresponding to each review item is divided into target evidence collection and conflict evidence collection, the gating confidence score of each candidate evidence collection is calculated, and the review result and review track of each review item are obtained.Full-process automatic compliance review from unstructured drawing to reviewable review result is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, system, and equipment for compliance review of drawings for power distribution network expansion. Background Technology

[0002] Distribution network expansion is a crucial business segment for power supply companies addressing new or increased electricity demand. The compliance review of engineering access plans, design drawings, and construction drawings is a key measure to ensure the safe and stable operation of the power grid. During the review process, reviewers typically need to verify each item on the drawings, including line access methods, switchgear configurations, relay protection configurations, metering circuits, secondary terminals, grounding protection, and cross-page leads, based on national standards, industry standards, enterprise standards, and local management requirements. With the expansion of the power grid and the surge in the number of expansion projects, reviewers are facing the dual pressures of efficiency bottlenecks and quality control.

[0003] Currently, the review of power distribution network expansion drawings mainly relies on manual reading, rule checklist selection, and expert review. While some information systems can archive and manage drawing files, extract title tags, perform keyword searches, or perform tabular verification, they are essentially still tools to assist manual browsing and have failed to achieve automated, structured reasoning from "drawing content" to "review rules." With the development of computer vision and natural language processing technologies, some existing technologies attempt to utilize CAD layer parsing, PDF text extraction, OCR (Optical Character Recognition), or primitive recognition technologies to assist in obtaining text and equipment symbols from drawings.

[0004] However, the application of existing technologies in the specific scenario of compliance review of power distribution network expansion drawings still has the following significant limitations: On the one hand, the review information in power distribution network expansion drawings is usually not presented in the form of a single text paragraph or a single table, but is scattered among equipment symbols, line connections, text labels, drawing descriptions, and inter-page references. Existing technologies, relying solely on text retrieval or partial element recognition results, are insufficient to reliably express the electrical connection relationships between lines, circuit breakers, protection devices, metering devices, and terminal blocks.

[0005] On the other hand, multi-page drawings often use leader lines, cross-page arrows, page number references, circuit numbers, or wire types to express the continuous relationship of the same electrical object across different pages. Existing methods of processing by page or searching by document usually require reviewers to manually trace the inter-page references, making it difficult to automatically determine whether the two ends of a cross-page connection correspond to the same circuit or loop.

[0006] On the other hand, standard clauses typically include the applicable objects, applicable conditions, connection relationships, parameter requirements, and prohibitive or mandatory requirements. Existing rule lists or clause retrieval methods mainly rely on keyword matching, manual selection, or natural language prompts, making it difficult to consistently apply clause requirements to specific drawing objects and their surrounding connections. When different lines or different equipment have similar numbers, the same equipment type, or similar text markings, inconsistencies can easily arise between the location of evidence and the object of review.

[0007] Furthermore, the review conclusions need to be understandable and traceable by the design unit, power supply company reviewers, and subsequent reviewers. If the automated system only provides matching text, similar paragraphs, or conclusive descriptions, without specifying the corresponding drawing objects, connection paths, evidence locations, and triggering rules, it will be difficult to meet the requirements for verifiability and accountability boundaries in engineering reviews. Summary of the Invention

[0008] Based on the above analysis, the embodiments of the present invention aim to provide a method, system and equipment for compliance review of drawings for power distribution network expansion, in order to solve the problems of scattered drawing information, difficulty in cross-page tracking, inaccurate correlation between review objects and evidence, and poor interpretability of review conclusions.

[0009] On the one hand, embodiments of the present invention provide a method for compliance review of drawings for distribution network expansion, including the following steps: The drawings for the expansion review of the power distribution network are analyzed to obtain drawing information; based on the drawing information, a cross-page electrical topology diagram and multiple sets of drawing evidence are constructed. Based on the cross-page electrical topology diagram, candidate clauses are obtained from a preset rule clause library and parsed into structured review clauses; the target review object and its candidate evidence set are obtained according to the review clauses, the cross-page electrical topology diagram and the drawing evidence set, and review items corresponding to the target review object are generated in combination with the review clauses; The candidate evidence set corresponding to each review item is divided into the target evidence set and the conflicting evidence set, and then the gate confidence score of each candidate evidence set is calculated; based on the gate confidence score and the conflicting evidence set, the review result and review trajectory of each review item are obtained.

[0010] Based on further improvements to the above method, the power distribution network expansion review drawings are analyzed to obtain drawing information, including: Each page of the power distribution network expansion review drawing is rendered as a page image and preprocessed; the preprocessed page images are then subjected to OCR text recognition, graphic element recognition and line segment detection to obtain text objects, electrical objects and connecting line graphic elements. The text object and the electrical object are bound together by calculating the distance score between them; Cross-page anchor point matching is performed based on text objects and electrical objects to obtain a set of matching anchor point pairs; same-page edge detection is performed based on electrical objects and connecting line primitives to obtain a set of snapped endpoint pairs, and connecting line primitives are marked as same-page connecting edges or cross-page lead candidate edges.

[0011] Based on the above method, a further improvement is made to perform cross-page anchor point matching based on text objects and electrical objects, obtaining a set of matching anchor point pairs, including: Based on the preset regular expression for cross-page reference text, the text content of the text object is matched, the successfully matched text object is marked as a cross-page text anchor, and the matched cross-page reference phrase is used as the reference text of the cross-page text anchor. If the electrical object to which the cross-page text anchor is bound is a cross-page graphic node, then the bounding box center coordinates of the cross-page graphic node are used as the anchor center coordinates; otherwise, the bounding box center coordinates of the cross-page text anchor are used as the anchor center coordinates; calculate the azimuth angle of each cross-page text anchor relative to the center of the page based on its anchor center coordinates. Calculate the cross-page matching score between any two cross-page text anchors from different pages based on the line number, quoted text, wire type, page number, target page number, and azimuth of each cross-page text anchor. Two cross-page text anchors whose cross-page matching scores reach a preset threshold are selected as candidate anchor pairs and placed into the corresponding candidate pairing set according to the line number; the best match is obtained from the candidate pairing set, and the matching anchor pair is placed into the matching anchor pair set.

[0012] Based on further improvements to the above method, the cross-page matching score is obtained by weighted summation of text consistency, conductor type consistency, page number cross-reference consistency, and directional complementarity consistency. Specifically, text consistency is obtained by weighted summation of the normalized edit distance score and term Jaccard coefficient between the conductor numbers of the two cross-page text anchors and the concatenated text of the quoted text; conductor type consistency is obtained by calculating the proportion of identical field values ​​after decomposing the conductor types of the two cross-page text anchors into multiple fields according to the separator; page number cross-reference consistency is determined based on whether the target page numbers of the two cross-page text anchors point to the page where the other is located; and directional complementarity consistency is obtained based on whether the azimuth angles of the two cross-page text anchors are complementary.

[0013] Based on further improvements to the above method, the optimal match is obtained from the candidate pairing set, resulting in matching anchor pairs, including: Based on the bounding box of the electrical object bound to each cross-page text anchor point in the candidate pairing set, generate four virtual terminal nodes according to the midpoints of the four sides of the bounding box, and select a representative terminal from the four virtual terminal nodes according to the azimuth angle of the cross-page text anchor point. A bipartite graph is constructed using all representative terminals in the candidate pairing set as nodes to be matched. The total cost function of the bipartite graph is constructed based on the cross-page matching score of the candidate anchor pairs corresponding to the representative terminals. The optimal match that minimizes the total cost function value is obtained, and the matching anchor pairs are obtained. Each representative terminal in the matching anchor pair is matched at most once.

[0014] Based on a further improvement to the above method, same-page edge detection is performed based on electrical objects and connecting line primitives to obtain a set of snapped endpoint pairs, and connecting line primitives are marked as candidate edges for same-page connecting edges or cross-page lead edges, including: For connecting line primitives within the same page, obtain the coordinates of their two endpoints and the direction angle of the line segment; for electrical objects within the same page, generate four virtual terminal nodes based on the midpoints of the four sides of their bounding box, thus obtaining a set of candidate adsorption nodes on the same page. The adsorption cost is calculated based on the sum of the weighted distance from each endpoint of the connecting line to each candidate adsorption node and the weighted direction difference; the direction difference is a measure of the angular difference between the line segment direction angle and the outward normal direction angle of the candidate adsorption node. The candidate adsorption node that minimizes the adsorption cost is selected, and the adsorption at the endpoint of the connecting line is successful only if the minimum adsorption cost is not greater than the preset adsorption threshold; otherwise, the adsorption at the endpoint of the connecting line fails. If both endpoints of the connecting line element are successfully snapped, it is marked as a connecting edge on the same page, and the correspondence between the successfully snapped connecting line endpoints and the snapped candidate snapped nodes is added to the snapped endpoint pair set; if only one endpoint is successfully snapped and the other endpoint is less than the preset edge threshold from the page edge, it is marked as a cross-page leader candidate edge.

[0015] A further improvement to the above method involves constructing a cross-page electrical topology diagram based on the diagram information, including: Use electrical objects in the drawing information as topology nodes, and use the text objects bound to the electrical objects as their semantic attribute information to populate the attributes of the topology nodes. Generate same-page connection edges based on the connecting line primitives marked as same-page connection edges; define the edge attributes of same-page connection edges based on the set of snapped endpoint pairs; Associate and match the set of anchor point pairs with the line number and the connecting line primitives marked as candidates for cross-page leader edges, generate cross-page leader edges and define the edge attributes of the cross-page leader edges.

[0016] Based on further improvements to the above method, multiple sets of drawing evidence are constructed through the following steps: Based on the text objects and their attributes in the image information, a first evidence information item with OCR text as the source type is generated, and the text content of the text objects is matched according to the regular expression of the preset evidence slots to obtain the evidence slot list of the first evidence information item. Based on each electrical object and its attributes in the drawing information, a second evidence information item with the source type of visual area is generated, and an evidence slot list for the second evidence information item is obtained according to the electrical object type. Based on the same-page connection edges and their attributes in the cross-page electrical topology diagram, generate a third evidence information item with the source type of topology path; Based on the cross-page lead edges and their attributes in the cross-page electrical topology diagram, a fourth evidence information item with the source type of cross-page reference is generated.

[0017] Based on a further improvement to the above method, candidate clauses are obtained from a pre-defined rule clause library based on a cross-page electrical topology diagram, including: Extract topological features from the cross-page electrical topology diagram, and obtain one or more semantic query terms corresponding to each topological feature according to a preset mapping relationship; One or more semantic query terms corresponding to each topological feature are treated as independent query conditions and encoded into query vectors by a text vector encoder; the first few terms with the highest similarity to the query vectors are retrieved from the vector index pre-built in the rule term library to obtain the initial recall set. Based on each rule clause in the initial recall set and its corresponding query conditions, calculate the comprehensive selection score for each rule clause. The comprehensive selection score is obtained by weighted summation of semantic similarity, topological keyword Jaccard coefficient, topological structure matching degree, and evidence slot availability. For each query condition, multiple terms are selected by sorting them from highest to lowest based on the comprehensive selection score, resulting in candidate terms.

[0018] Based on further improvements to the above methods, rule templates or large language models are used to parse candidate clauses into structured review clauses. The structured review clauses include: clause identifier, clause text, set of applicable object types, set of applicable conditions, set of necessary evidence slots, set of topological constraints, type of obligation, risk level, set of condition triggers, and process markers.

[0019] Based on a further improvement of the above method, the target review object and its candidate evidence set are obtained according to the review clauses, the cross-page electrical topology diagram, and the drawing evidence set, including: From the set of nodes in the cross-page electrical topology diagram, nodes whose electrical object types belong to the set of applicable object types for each review clause are selected as candidate review objects for the corresponding review clause; Based on the cross-page electrical topology diagram, a candidate evidence set for candidate review objects is obtained from the drawing evidence set; and based on the set of applicable conditions, the set of topology constraints, and the set of necessary evidence slots of the review clauses, the applicability satisfaction, topology constraint matching, and necessary slot hit rate of each candidate review object are calculated respectively. The binding score between each candidate review object and the review clause is calculated by weighting and summing the applicable condition satisfaction, the topology constraint matching degree, and the necessary slot hit degree. Candidate review objects whose binding scores are not lower than the preset binding threshold are identified as target review objects.

[0020] Based on further improvements to the above method, the applicability condition satisfaction degree of each candidate for review is calculated, including: If the set of applicable conditions for the review clause is empty, then the degree of satisfaction of the applicable conditions for all candidate review objects of the review clause is 1. Otherwise, obtain the applicable attribute and expected value from each applicable condition expression in the set of applicable conditions, obtain the actual value of the applicable attribute from the attribute field of each candidate review object or the drawing information, and if the actual value is consistent with the expected value, then the applicable condition is satisfied; count the proportion of the number of satisfied applicable conditions to the total number of applicable conditions in the set of applicable conditions to obtain the applicability satisfaction of each candidate review object.

[0021] Based on the further improvement of the above method, the topological constraint matching degree of each candidate review object is calculated, including: Based on the set of necessary evidence slots in the aforementioned review clauses, and based on the pre-defined mapping relationship between evidence slots and electrical object types, the required electrical object type is determined; Based on the set of topology constraints of the review clauses, starting from the candidate review object, search the cross-page electrical topology graph for whether there is a node of the required electrical object type that satisfies the topology constraints. If it exists, the topology constraint verification is passed. The topology constraint matching degree of each candidate review object is obtained by statistically verifying the proportion of the number of topology constraints that pass the topology constraint verification to the total number of topology constraints.

[0022] Based on a further improvement to the above method, a candidate evidence set for candidate review objects is obtained from the drawing evidence set based on the cross-page electrical topology diagram, including: Starting with the candidate review object, a neighborhood search is performed in the cross-page electrical topology graph to obtain the topological neighborhood of the candidate review object; Obtain the evidence information items of each node in the topological neighborhood of each candidate review object in the drawing evidence set, as well as the evidence information items of the necessary evidence slot set in the drawing evidence set that match the review clause of the candidate review object. After merging and deduplicating, the candidate evidence set is obtained.

[0023] Based on further improvements to the above method, the candidate evidence set corresponding to each review item is divided into a target evidence set and a conflicting evidence set, including: Obtain the list of associated node identifiers for each evidence information item in the candidate evidence set; If at least one node in the associated node identifier list is reachable from the target review object within a preset number of hops in the cross-page electrical topology diagram, then the evidence information item is added to the target evidence set; otherwise, it is added to the conflict evidence set.

[0024] Based on further improvements to the above method, the gated confidence score for each candidate evidence set is calculated, including: If the conflicting evidence set of the current candidate evidence set is not empty, then the gate value is 0 and the gate confidence score is 0. Otherwise, calculate five components for the target evidence set of the current candidate evidence set: visual region confidence, OCR text hit rate, topological relevance, slot coverage, and cross-page reference value; multiply each of the five components by its corresponding preset weight and sum them to obtain a weighted sum. The gating value is determined based on the slot coverage. The weighted sum is multiplied by the gating value to obtain the gating confidence score of the current candidate evidence set.

[0025] Based on a further improvement of the above method, the gate value is determined according to the slot coverage, including: If the slot coverage is 1, the gate value is 1; if the slot coverage is between 0 and 1, the gate value is set to the first gate threshold; if the slot coverage is 0, the gate value is set to the second gate threshold; the first gate threshold is less than the second gate threshold.

[0026] Based on further improvements to the above method, the review results for each review item are obtained according to the gated confidence score and the conflicting evidence set, including: If the conflict evidence set for the current review item is not empty: if at least one piece of evidence information in the conflict evidence set hits a preset key evidence slot, it is determined to be non-compliant; if the conflict evidence set does not hit a preset key evidence slot, it is determined to be insufficient evidence. If the set of conflicting evidence for the current review item is empty: if the gate confidence score is greater than or equal to the decision threshold and the slot coverage is 1, it is judged as compliant; if the gate confidence score is less than the decision threshold or the slot coverage is less than 1, it is judged as insufficient evidence.

[0027] On the other hand, embodiments of the present invention provide a drawing compliance review system for distribution network expansion, including: The drawing parsing module is used to parse the drawings for power distribution network expansion review and obtain drawing information; based on the drawing information, it constructs a cross-page electrical topology diagram and multiple sets of drawing evidence. The review item generation module is used to obtain candidate clauses from a preset rule clause library based on the cross-page electrical topology diagram and parse them into structured review clauses; obtain the target review object and its candidate evidence set according to the review clauses, the cross-page electrical topology diagram and the drawing evidence set, and generate review items corresponding to the target review object in combination with the review clauses; The compliance review module is used to divide the candidate evidence set corresponding to each review item into the target evidence set and the conflict evidence set, and then calculate the gate confidence score of each candidate evidence set; based on the gate confidence score and the conflict evidence set, the review result and review trajectory of each review item are obtained.

[0028] On the other hand, embodiments of the present invention provide a computer device for drawing compliance review for distribution network expansion. The computer device includes a memory and a processor. The memory stores a computer program that runs on the processor. When the processor executes the computer program, it executes any of the above-mentioned drawing compliance review methods for distribution network expansion.

[0029] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects: 1. By parsing distribution network expansion review drawings into cross-page electrical topology diagrams and standardized drawing evidence sets, the transformation of drawing information from manual reading to calculable structured data is realized; by parsing rule clauses described in natural language into structured rules and generating review items based on the topology structure, the problem of rules being difficult to stably correspond to specific drawing objects in traditional solutions is solved; by dividing candidate evidence into target evidence sets and conflict evidence sets and introducing gating confidence scores, the three situations of "compliance", "non-compliance" and "insufficient evidence" are effectively distinguished; finally, traceable review results and review trajectories are output, meeting the requirements of verifiability and responsibility boundaries for distribution network expansion project review, and realizing fully automated compliance review from unstructured drawings to verifiable review results.

[0030] 2. By matching cross-page anchor points and detecting edges on the same page, the automatic identification and precise positioning of cross-page electrical connections are achieved. By constructing a cross-page electrical topology diagram that includes topology nodes, edges on the same page, and edges connecting across pages, a unified connectivity relationship is established at the topology level for the same electrical object scattered across multiple pages of drawings. By constructing OCR text, visual regions, topology paths, and cross-page references as four types of evidence information items and assigning standardized evidence slot labels, semantic encapsulation of drawing information is achieved. This overcomes the shortcomings of low efficiency and easy omission in manually tracking inter-page references during the review of multi-page drawings, transforming cross-page connection verification from manual operation to automated calculation.

[0031] 3. By parsing candidate clauses into structured rule clauses and calculating binding scores based on the degree of satisfaction of applicable conditions, the degree of matching of topological constraints, and the degree of hit of necessary slots, the rule clauses are accurately bound to specific target review objects, reducing the probability of rule errors applied to irrelevant objects; by generating review items corresponding to target review objects, the scope of evidence search is narrowed from the entire drawing to a local area, improving the efficiency and accuracy of evidence location.

[0032] 4. By extracting conflicting evidence sets, a hard interception of "evidence location error" situations is achieved; by calculating multiple dimensional components and threshold values ​​and weighting and fusing them into a gated confidence score, a comprehensive quantitative assessment of evidence quality is achieved; by generating review trajectories, the review conclusions have complete traceability.

[0033] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description

[0034] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. Figure 1 This is a flowchart of a drawing compliance review method for distribution network expansion in Embodiment 1 of the present invention; Figure 2 This is an example diagram of the prompt word template for structured review clauses obtained by parsing using a large language model in Embodiment 1 of the present invention; Figure 3 This is an example diagram of the prompt word template for extracting evidence information items using a visual language model in Embodiment 1 of the present invention. Detailed Implementation

[0035] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0036] Example 1 A specific embodiment of the present invention discloses a method for compliance review of drawings for distribution network expansion, such as... Figure 1 As shown, it includes steps S1-S3.

[0037] S1. Analyze the power distribution network expansion review drawings to obtain drawing information, and construct a cross-page electrical topology diagram and multiple drawing evidence sets based on the drawing information.

[0038] It should be noted that the drawings for distribution network expansion review include one or more of the following: primary system diagram, main wiring diagram, protection configuration diagram, and secondary wiring diagram. The drawing types include: PDF files, CAD files, scanned copies, and image files. The purpose of this step is to transform unstructured documents into electrical topology diagram structures and a standardized set of drawing evidence, providing a data foundation for subsequent compliance reviews.

[0039] S10. Render each page of the power distribution network expansion review drawings into a page image and perform preprocessing.

[0040] Each drawing may be a single page or multiple pages. Each page is first rendered as a page image. The rendering method depends on the drawing type: for PDF files, a PDF rendering engine renders them as bitmaps at the page resolution; for CAD files, a CAD parsing interface exports them as images at a specified resolution; for scanned documents or image files, they are directly read into image format.

[0041] To eliminate noise and distortion introduced during image acquisition and conversion, the system performs preprocessing operations on the page image. Preprocessing includes: denoising, grayscale conversion, binarization, tilt correction, and coordinate normalization. Denoising uses median or Gaussian filtering to remove isolated noise points in the image, with the filter window size adaptively determined based on the image resolution. Grayscale conversion converts the color image to grayscale. Binarization uses an adaptive thresholding algorithm (such as the Otsu algorithm) to convert the grayscale image to a binary image to distinguish between the foreground and background of graphics in the image. Tilt correction uses Hough transform to detect horizontal and vertical line segments in the image, calculates the image tilt angle, and applies affine transformation to rotate and correct the image, aligning the paper border with the image coordinate system. Coordinate normalization maps the corrected image coordinates to a unified page coordinate system, ensuring that all subsequent coordinates fall within this system. Within the normalized space, for example, by using the max-min normalization method.

[0042] S11. Analyze the pre-processed distribution network expansion review drawings to obtain drawing information.

[0043] (1) Information recognition per page.

[0044] The preprocessed page image is subjected to OCR text recognition, primitive recognition and line segment detection to obtain text objects, electrical objects and connecting line primitives.

[0045] OCR text recognition employs an optical character recognition engine to detect and recognize all text regions in the page image. For each recognized text object, the following are included: a unique text identifier (text_id) used to uniquely index the text record within the system; a page number (page_id) indicating which page of the review drawing the text is located on; the text content (text), i.e., the string recognized by the OCR engine; and bounding box coordinates (bbox), a rectangular area represented in normalized coordinates. Format, in which The coordinates of the top left corner of the bounding box. Let the coordinates of the bottom right corner of the bounding box satisfy... and OCR confidence represents the reliability of the OCR engine's text recognition result, with a value range of [0,1].

[0046] Primitive recognition uses deep learning-based object detection methods (such as YOLO, Faster R-CNN, etc.) or visual language models (VLM) to identify electrical graphic symbols on a page and obtain the corresponding electrical objects.

[0047] Specifically, a labeled dataset containing various types of electrical symbols for power distribution networks is pre-constructed. The location coordinates and type labels of all electrical graphic symbols are labeled in each training image. After training, the model performs inference on the input page image and outputs a set of detection results. Each detection result includes: electrical object type label, bounding box coordinates, and detection confidence.

[0048] The identified electrical object types include: line nodes (represented as short straight line segments or polyline symbols with line numbers, used to indicate the start, end, or branch points of a line), circuit breaker nodes (represented as standard circuit breaker graphic symbols), protection device nodes (represented as protection device graphic symbols), terminal nodes (represented as terminal graphic symbols), busbar nodes (represented as thick straight line segments), and page-crossing graphic nodes (represented as a combination of lead-out lines and arrow symbols, which together form a complete page-crossing lead-out mark). For each identified electrical object, the following are included: object unique identifier node_id, object type type, page number page_id, bounding box coordinates bbox (using the same normalized coordinate format as OCR text), and visual confidence (i.e., the output detection confidence, representing the reliability of the primitive recognition engine's recognition result for this object).

[0049] It should be noted that the electrical object also includes: object code (such as circuit breaker number, protection device number, etc.), object label (such as equipment code, line number) and attribute field (additional information unique to the object, such as voltage level, equipment model, etc.), which are initially empty and are subsequently filled in after matching the coordinate distance with the text object in the OCR text recognition result.

[0050] Simultaneously, line segment detection methods (such as Hough transform or LSD) are used to identify connecting lines (straight lines, polylines, and curves) representing electrical connections, obtaining connecting line primitives. Taking Hough transform as an example, pixels in the binarized image are mapped from image space to parameter space. By detecting peak points in the parameter space, straight lines in the image are determined, and the endpoint coordinates and direction of the connecting lines are extracted. For polyline connections, multiple line segments are pieced together into a complete connection path by considering the distance and direction continuity between the endpoints; for curve connections, the path of the curve is extracted using contour tracking or curve fitting methods.

[0051] To avoid duplication between the primitive recognition results and the connector primitive recognition results, the following deduplication process is performed after the line segment detection is completed: For each line node detected by primitive recognition, its bounding box region is obtained; the position overlap of each connector primitive extracted by line segment detection with the bounding box is judged, and connector primitives with an overlap ratio greater than the overlap threshold (e.g., 0.7) with the bounding box region of the line node are removed.

[0052] After deduplication, the following information is recorded for the retained connecting line primitives: edge_id (unique identifier); type (initially "ordinary connecting line", subsequently updated to "same-page connecting line" or "cross-page lead candidate line" based on endpoint snapping results); source and target (node ​​identifiers pointing to the two connected electrical objects, initially empty, filled after endpoint snapping); page_ids (same-page connecting lines are a single page number, cross-page lead candidate lines are the page number of the source); and confidence. The confidence is a value in the range [0,1] calculated based on the output of the line segment detection algorithm. For example, if Hough transform is used for line segment detection, the confidence of each connecting line primitive is equal to the accumulator vote value of that line segment in the parameter space divided by the maximum vote value among all detected line segments; if LSD is used for line segment detection, the confidence of each line segment is equal to the normalized negative logarithm of its false alarm number (NFA).

[0053] Furthermore, the identified text objects are bound to the electrical objects they describe to form complete attribute information of the objects, thereby establishing a connection between the text descriptions scattered in the drawing and the corresponding electrical graphic symbols, so that subsequent topological analysis and evidence location can use text information to supplement semantics.

[0054] Specifically, based on the center coordinates of the bounding boxes of text objects and electrical objects, the first distance score from each text object to each electrical object within its page number is calculated using the following formula: , in, For text objects To electrical objects The first distance score, For text objects The center coordinates of the bounding box, , and Electrical objects The center coordinates of the bounding box, and the width and height of the bounding box; A preset small constant (taken in this embodiment) (), used to prevent the abnormal situation where the denominator is zero.

[0055] Furthermore, the text objects are sorted in ascending order of their first distance scores. If the smallest first distance score is not greater than a preset binding threshold (1.2 in this embodiment), then the text objects are... As an electrical object The candidate labels are generated, and the text content of the text object is written into the label or attributes field of the electrical object. For example, if the OCR text content is "L101JKLYJ-10-240", then "L101" is written into the label field as the line number, and "JKLYJ-10-240" is written into the attributes field as the conductor type.

[0056] For text objects that cannot be bound to any electrical object, they will still be used as independent text objects in the subsequent steps of building the drawing evidence set, thus avoiding information loss due to matching failure.

[0057] (2) Perform cross-page anchor point matching based on text objects and electrical objects to obtain a set of matching anchor point pairs.

[0058] In power distribution network expansion review drawings, the same electrical circuit or line often needs to span multiple pages to be fully represented. To indicate the electrical continuity between different pages, drawings typically use methods such as cross-page graphic nodes, page number references, line numbers, and conductor types to establish inter-page connections. This step includes cross-page text anchor point recognition and cross-page lead matching. By automatically recognizing these cross-page connection markers, the electrical connection correspondence between different pages is established, enabling subsequent topology analysis and review reasoning to maintain a complete expression of electrical continuity in multi-page drawing scenarios.

[0059] First, based on the preset regular expression for cross-page reference text, the text content of the text object is matched, the successfully matched text object is marked as a cross-page text anchor, and the matched cross-page reference phrase is used as the reference text of the cross-page text anchor.

[0060] It should be noted that cross-page references usually appear in drawings in a specific text pattern. Common patterns include, but are not limited to: continue to page N, see page N, continue from P(N)-XXX, see page N for details, go to page N, where N is the page number and XXX is the line number.

[0061] This embodiment uses a regular expression template to match the text content of the text object. The regular expression template includes: [link to template]\s (\d+)\s See page \s (\d+)\s Page, following \s P(\d+)-([A-Z0-9\-]+), see \s for details The s (\d+)\s Page, to\s The s (\d+)\s If the text content matches successfully, the text object is marked as a cross-page text anchor.

[0062] The matched cross-page text anchors include the following information: the current page (page_current), the page number where the text is located; the target page (page_target), the page number extracted by the regular expression; the line number (line_code), if the text contains a line number pattern (such as "L\d+", "L-\d+", etc.), it is extracted as the line number; the wire model (line_model), if the text contains a wire model pattern (such as "JKLYJ-\d+-\d+", "YJV-\d+", etc.), it is extracted as the wire model; and the ref_text, the matched cross-page ref phrase.

[0063] Furthermore, for each cross-page text anchor point, locate the electrical object it is bound to. If the electrical object type is a cross-page graphic node (i.e., a combination of leader lines and arrow symbols), then use the center coordinates of the bounding box of the cross-page graphic node as the center coordinates of the anchor point. Otherwise, the coordinates of the bounding box center of the cross-page text anchor point will be used as the anchor point center coordinates. .

[0064] Furthermore, the coordinates of the anchor point center of each cross-page text anchor point are calculated relative to the center of the page. The azimuth angle is given by the following formula: , in, For cross-page text anchors azimuth angle, This is the arctangent function in the four quadrants, and its return value range is... Azimuth This reflects the directional area where the anchor point is located in the center of the page, for example... This indicates that the anchor point is located at the right edge of the page. This indicates that the anchor point is located at the left edge of the page. This indicates that the anchor point is located at the top edge of the page. This indicates that the anchor point is located at the bottom edge of the page.

[0065] Furthermore, based on the line number, quoted text, wire type, page number of the current page, target page number of the reference, and azimuth angle of each cross-page text anchor point, the values ​​of any two cross-page text anchor points from different pages are calculated. Located on the page , Located on the page , Cross-page match score between ) Textual consistency Consistency of wire type Page number cross-reference consistency and complementary and consistent directions The weighted summation yields the following formula: , in, , , and The weights are assigned to text consistency, conductor type consistency, page number cross-reference consistency, and direction complementarity consistency, respectively, and the sum of the four weights is 1. In this embodiment, the four weights are 0.3, 0.25, 0.3, and 0.15, respectively. When a certain component cannot be calculated (such as when neither of the two cross-page text anchors is labeled with a conductor type), the weight of the corresponding component is not included in the denominator, and the remaining weights are renormalized proportionally.

[0066] Specifically, text consistency measures the similarity between the line numbers and quoted text of two cross-page text anchors. It is obtained by calculating the weighted sum of the edit distance normalized score and the term Jaccard coefficient between the concatenated text of the line numbers and quoted text of the two cross-page text anchors, as shown in the formula below: , , , in, and These are cross-page text anchors. and The text string is obtained by concatenating the line number and the quoted text and then standardizing it. The standardization process includes: removing spaces, unifying the case, and removing special characters. The edit distance normalization score has a value range of [0,1]. It takes 1 when two strings are exactly the same and 0 when they are completely different. For strings Convert to The minimum number of single-character editing operations (insert, delete, replace) required. and These are the lengths of the two strings, respectively. This is a word segmentation function that divides a string into word sets based on non-alphanumeric characters (such as spaces, hyphens, and underscores). Similarly, the value range is [0,1]; The weights for the edit distance normalized scores are determined in this embodiment, taking into account that edit distance is better able to capture subtle differences. The weight is higher than the Jaccard coefficient of the term.

[0067] Conductor model consistency is used to measure the consistency of electrical specifications between conductor models marked at two cross-page anchors. Conductor models typically include multiple fields such as material, voltage rating, cross-sectional area, and insulation type. For example, "JKLYJ-10-240" can be broken down into: material "JKLYJ", voltage rating "10kV", cross-sectional area "240mm²", and insulation type "cross-linked polyethylene".

[0068] The consistency of conductor type is determined by decomposing the conductor type of two cross-page text anchors into fields of material, voltage rating, cross-sectional area, and insulation type according to separators ("-", " / ", "_", etc.), and then calculating the percentage of fields with consistent values. The formula is shown below: , in, This is the set of fields obtained by decomposing the wire type. Indicates cross-page text anchors Fields obtained from decomposing the wire type The value of , Indicates cross-page text anchors Fields obtained from decomposing the wire type The value of numerator This represents the number of fields where two cross-page text anchors have the same value in the same field and neither is empty; the denominator is... This indicates the number of fields in which at least one of the two cross-page text anchors has a non-null value; the value range for conductor model consistency is [0,1], where 1 is taken when the conductor models of the two cross-page text anchors are completely identical, and 0 is taken when they are completely inconsistent.

[0069] Page number cross-reference consistency is used to measure the cross-reference relationship between two cross-page text anchors in terms of page number references. It is determined by whether the target page number of the two cross-page text anchors points to the page where the other is located. Different preset values ​​are corresponding to bidirectional cross-reference, unilateral reference and no cross-reference.

[0070] Specifically, if cross-page text anchors The target page number equals the cross-page text anchor. Page number, and cross-page text anchor The target page number equals the cross-page text anchor. The page number indicates that the two cross-page text anchors form a bidirectional interreference relationship, and the page number interreferences are consistent. The value is 1; if only one side's cross-page text anchor points to the page number on the other side, it forms a one-sided reference. The value is 0.5; if the text anchors on both sides of the page do not point to the page number of the other, then they are not mutually referencing. The value is 0.

[0071] Directional complementarity consistency measures whether the directions of two cross-page text anchors relative to the center of their respective pages are complementary. It is derived from whether the azimuth angles of the two cross-page text anchors relative to the center of their respective pages are complementary, as shown in the formula below: , in, and These are cross-page text anchors. and The azimuth angle; when the text anchor point spans multiple pages actual azimuth With cross-page text anchors Ideal reverse orientation When they are completely identical, the directions of the two cross-page text anchor points are completely complementary. , When the difference in direction between the two is hour, , When the difference in direction between the two exceeds hour, The value is negative, through The cutoff value is 0, therefore The value range is [0,1].

[0072] Text consistency comprehensively considers character-level differences (edit distance) and word-level overlap (Jaccard coefficient), adapting to various variations in line numbering in drawings. Conductor type is crucial for identifying the same line in power distribution network engineering; field-level consistency comparison, rather than simple string matching, tolerates subtle differences in conductor type descriptions across different drawings. Bidirectional cross-reference is the most reliable method for identifying cross-page connections in drawings, but in practice, page number references are sometimes only indicated on one side. Therefore, assigning a moderate score to unilateral references instead of direct exclusion improves the fault tolerance of matching. Utilizing page edge direction constraints as a spatial prior effectively reduces the probability of mismatches between similar text on the same page edge across different pages. For example, when the same line number appears simultaneously on the left and right edges, only complementary pairings receive high scores.

[0073] Furthermore, two cross-page text anchors with a cross-page matching score reaching a preset threshold (e.g., 0.8) are selected as candidate anchor pairs and placed into the corresponding candidate pairing set according to the line number; the optimal match is obtained from the candidate pairing set to obtain the matching anchor pair and placed into the matching anchor pair set.

[0074] Specifically, if the candidate pairing set corresponding to a certain line number is empty, it means that the line number will not generate a cross-page lead edge.

[0075] If the number of candidate anchor pairs in the candidate pairing set is 1, then the unique candidate anchor pair is confirmed as a cross-page connection; and four virtual terminal nodes are generated according to the midpoints of the four sides of the bounding box of the cross-page graphic node bound to the two cross-page text anchors; and the virtual terminal node with the smallest distance from the page edge is selected as the representative terminal according to the azimuth angle of each cross-page text anchor, and the candidate anchor pair and its representative terminal are put into the matching anchor pair set.

[0076] If the number of candidate anchor pairs in the candidate pairing set is greater than 1, then terminal-granularity bipartite graph matching is performed on the candidate pairing set to avoid the same cross-page text anchor being matched repeatedly, ensuring that each cross-page text anchor establishes a connection relationship with only one cross-page text anchor, thereby ensuring the consistency of the topology graph structure.

[0077] First, generate four virtual terminal nodes based on the midpoints of the four sides of the bounding box of the cross-page graphic node to which each cross-page text anchor point is bound; then select the virtual terminal node that is closest to the page edge as the representative terminal based on the azimuth angle of each cross-page text anchor point.

[0078] It should be noted that if neither of the two cross-page text anchors contains a line number, the calculated cross-page matching score is usually less than the preset threshold. This embodiment does not calculate the cross-page matching score in this case.

[0079] Furthermore, a bipartite graph cost matrix is ​​constructed using the terminal representing each cross-page text anchor point as the node to be matched; the total cost function of the bipartite graph is constructed based on the cross-page matching scores of the candidate anchor point pairs corresponding to the terminal, including: One side of the bipartite diagram is the first The representative terminal set of the page The other side is the first The representative terminal set of the page .for Any representative terminal in and Any representative terminal in Its matching cost It is calculated using the following formula: , in, Representative terminal and The cross-page matching score of the corresponding candidate anchor pair. The higher the cross-page matching score, the lower the matching cost, indicating a stronger likelihood of a match.

[0080] The total cost function of the bipartite graph is shown below. The optimal matching that minimizes the total cost function is obtained using either the Hungarian algorithm or a greedy matching algorithm, resulting in the matching anchor point pairs: , in, for and The matching set between them requires that the same representative terminal appear at most once in the same round of matching (i.e., a one-to-one matching constraint). This is the optimal match.

[0081] For example, the greedy matching algorithm sorts the candidate anchor pairs in the current candidate pairing set in ascending order of matching cost, and then performs bidirectional unique placeholder greedy matching: it iterates through the sorted pairing list in turn, and if neither of the two representative terminals in the pair is matched, a matching relationship is established and both ends are marked as matched; otherwise, the pairing is skipped.

[0082] After matching is completed, the matched candidate anchor pairs and their representative terminals are placed into the set of matched anchor pairs.

[0083] (3) Based on electrical objects and connecting line primitives, perform same-page edge detection, obtain the set of adsorption endpoint pairs, and mark the connecting line primitives as same-page connecting edges or cross-page lead candidate edges.

[0084] Having identified the connecting line primitives, this step further attaches the identified connecting line endpoints to the electrical objects they are connected to. Based on the attachment results, the connecting lines are marked as on-page connecting edges or cross-page lead candidate edges. This is used to transform the independent connecting line identification results into calculable topological connection relationships and to initially distinguish between complete connections within the same page and incomplete connections across pages, providing a basic data structure for subsequent topology graph construction.

[0085] For a connecting line element within the same page, obtain the coordinates of its two endpoints and the line segment direction angle. Let the normalized coordinates of the connecting line endpoints be... The corresponding direction angle of the connecting line is Simultaneously, for each electrical object on the same page, four virtual terminal nodes are generated based on the midpoints of the four sides of its bounding box, forming a set of candidate adsorption nodes on the same page; if the electrical object has already generated virtual terminal nodes in the aforementioned steps, there is no need to generate them again.

[0086] The adsorption cost is calculated based on the sum of the weighted distance and weighted direction differences from each endpoint of the connector to each candidate adsorption node, as shown in the following formula: , in, For the endpoints of the connecting line to candidate adsorption nodes The adsorption cost, For the first The set of candidate adsorption nodes for a page. Candidate adsorption nodes The center coordinates, , θ represents the outward normal direction angle of the candidate adsorption node. To calculate the endpoints of the connecting line to candidate adsorption nodes The Euclidean distance; The direction difference term represents the direction angle of the connecting line. Angle with the outward normal direction of the candidate adsorption node The angular difference between the two directions is measured. When the two directions are completely in the same direction, the value of this item is 0; when the two directions are completely opposite, the value of this item is 2; the value range of the direction difference item is [0,2]. This is the distance weighting coefficient. These are directional weighting coefficients, both positive, used to balance the relative contributions of the distance and direction terms to the adsorption cost. In this embodiment, , .

[0087] The distance term in the adsorption cost ensures that the adsorption target is sufficiently close to the endpoint in spatial position, and the direction difference term ensures that the direction of the connecting line is consistent with the external normal direction of the terminal, thus avoiding the incorrect adsorption of the horizontal connecting line onto the vertical terminal node.

[0088] The candidate adsorption node that minimizes the adsorption cost is selected, and the connection endpoints are connected only if the minimum adsorption cost is not greater than a preset adsorption threshold (1.2 in this embodiment). Adsorbed to the corresponding candidate adsorption node If the minimum value exceeds the adsorption threshold, it means that there is no suitable adsorption target for the endpoint of the connection line within the current page, and the endpoint adsorption fails.

[0089] After performing the above adsorption judgment on both ends of each connecting line, the adsorption results are classified and processed accordingly: If both ends of the connecting line are successfully attached to the candidate attachment node (a virtual terminal node of the electrical object), the connecting line is marked as a connecting edge on the same page, and the correspondence between the endpoints of the successfully attached line segment and the attached candidate attachment node is placed into the attachment endpoint pair set.

[0090] If only one end of a line segment successfully attaches to a candidate attachment node, and the other end is less than a preset edge threshold (e.g., 0.02, indicating proximity to the page edge), then the connecting line is marked as a candidate cross-page leader edge. The attributes of the candidate cross-page leader edge record the node identifier of the attached end, the page number, the virtual terminal position of the attached end, the coordinates of the endpoint of the unattached end, and the line number. The line number is inherited from the line number of the electrical object it is attached to. If the electrical object is not bound to a text object and does not have a line number, then the line number is empty.

[0091] If only one end of the connector is successfully attached but the other end is more than or equal to the preset edge threshold (not close to the page edge), or if neither end is successfully attached, then the connector is discarded.

[0092] In this step, text objects, electrical objects, connection line elements, matching anchor point pairs, and snapped endpoint pairs together constitute the drawing information for reviewing the drawings.

[0093] S12. Construct a cross-page electrical topology diagram and a set of multiple drawing evidence based on the drawing information.

[0094] It should be noted that the electrical topology diagram spans multiple pages. The construction process includes: Use electrical objects in the drawing information as topology nodes, and use the text objects bound to the electrical objects as their semantic attribute information to populate the attributes of the topology nodes. Generate same-page connection edges based on the connecting line primitives marked as same-page connection edges; define the edge attributes of same-page connection edges based on the set of adsorption endpoints. The edge attributes include: the node identifier of the adsorption target at the start and end points, the page number, and the confidence level (take the visual confidence level of the corresponding connecting line primitive). By associating and matching anchor point pairs with line numbers and connecting line primitives marked as cross-page leader candidate edges, cross-page leader edges are generated and their edge attributes are defined. The edge attributes include: starting point representing terminal coordinates, ending point representing terminal coordinates, starting point page number, ending point page number, line number, conductor type, and confidence level (taking the cross-page matching score). After the cross-page leader edge is established, a topological connection relationship is established between two cross-page graph nodes that were originally located on different pages, making cross-page path search and connectivity analysis possible.

[0095] Specifically, by associating and matching anchor point pairs with line primitives marked as candidate edges for cross-page leaders according to line numbers, cross-page leader edges are generated, including: For each matched candidate anchor pair in the set of matched anchor pairs ,in Located in the Page, Located in the Page; Find the candidate edges of the cross-page leader that match... Having the same line number and the adsorbed end is located at the first For candidate edges on a page, obtain the identifiers of their attached end nodes and the positions of their virtual ends as the starting points for cross-page lead edges; similarly, search for... Having the same line number and the adsorbed end is located at the first The candidate edges of a page are used to obtain the identifiers of the adsorbed end nodes and the positions of the virtual end nodes as the endpoint information of the cross-page leader edges. If the search is successful, a complete cross-page leader edge is generated by combining the cross-page matching scores of the candidate anchor point pairs. If the line number is empty, weak correlation matching is performed based on the wire type and the position of the representative terminal; If no matching candidate edge for the cross-page leader can be found, the cross-page leader edge is generated using the representative terminal position of the candidate anchor point as the endpoint position.

[0096] The metadata of the entire cross-page electrical topology diagram is organized into a set of diagram attributes, which include, but are not limited to: total number of pages in the drawing, size information of each page, total number of nodes and edges, number of cross-page lead edges, coordinates of each node, page number, equipment code, line number and conductor type, and cross-page reference text.

[0097] When the drawing being reviewed is a single-page drawing, there is no need to perform the above-mentioned cross-page information identification and matching. The cross-page electrical topology diagram degenerates into a single-page electrical topology diagram, but the construction method of the node set and the same-page connection edge set remains unchanged.

[0098] Furthermore, to facilitate subsequent rule and clause recall and target review object selection, a topology summary is generated after the topology graph is constructed. The topology summary includes: summary information of the node list and edge list, adjacency list (recording the one-hop neighbors of each node in the topology graph), list of key nodes (including: the node with the highest degree, nodes involved in cross-page leading edges, and nodes containing line numbers), cross-page matching records (matching details of all cross-page leading edges, including anchor point identifiers at both ends, matching scores, and representative terminal positions), statistics on the number of nodes of each type, and a set of line numbers.

[0099] It should be noted that each piece of evidence information in the drawing evidence set includes: source type, page number, location coordinates, text content, associated node identifier, associated edge identifier, evidence slot, and confidence level; the source type includes at least four types: OCR text, visual area, topological path, and cross-page reference.

[0100] Constructing a set of drawing evidence The steps include: Based on the text objects and their attributes in the image information, a first evidence information item with OCR text as the source type is generated, and the text content of the text objects is matched according to the regular expression of the preset evidence slots to obtain the evidence slot list of the first evidence information item. Based on each electrical object and its attributes in the drawing information, a second evidence information item with the source type of visual area is generated, and an evidence slot list for the second evidence information item is obtained according to the electrical object type. Based on each same-page connection edge and its attributes in the cross-page electrical topology diagram, a third evidence information item with the source type of topology path is generated, and the evidence slot list of the third evidence information item is obtained according to the edge type or the node associated with the edge. Based on the cross-page lead edges and their attributes in the cross-page electrical topology diagram, a fourth evidence information item with the source type of cross-page reference is generated, and the evidence slot list of the fourth evidence information item is obtained according to the edge type.

[0101] It should be noted that each evidence slot represents a type of evidence tag that the evidence information item can support. For example, a first evidence information item containing the line number "L101" in OCR text will have "line_code" in its evidence slot list field, indicating that the evidence can support the "line_code" evidence slot. Evidence type tags include, but are not limited to: line number (line_code), conductor model (line_model), circuit breaker, differential protection, ground protection, protection device, meter loop, current transformer, ratio, terminal number, topology connection, and cross-page ref. Pre-defined regular expressions are provided for the evidence slots to match the text content of the text object.

[0102] For example, if the text content of a text object matches a line number regular expression (such as "L\d+", "L-\d+", "LINE-\d+", etc.), then line_code is added to the evidence slot list; if the text content contains keywords such as "differential protection" or "differential", then differential_protection is added to the evidence slot list; if the electrical object type is a line node, then line_code is added to the evidence slot list; if the electrical object type is a bus node or the edge type is a same-page connection edge, then topology_connection is added to the evidence slot list; if the node associated with the edge contains a line number, then line_code is added to the evidence slot list; if the edge type is a cross-page lead edge, then cross_page_ref is added to the evidence slot list.

[0103] The common fields for the above four types of evidence information items include, but are not limited to: evidence identifier, source type, page number, coordinates, list of associated node identifiers, list of evidence slots, confidence level and / or text content.

[0104] If a certain type of evidence is missing (e.g., a single-page drawing without a cross-page leader, no cross-page connection evidence information item will be generated), the evidence set for the corresponding source type will be empty, but this will not affect the construction of evidence from other source types. After the drawing evidence set is constructed, an evidence summary is also generated, including the number of evidence items from each source type, the coverage of each evidence slot, and the distribution statistics of evidence confidence levels. This evidence summary is displayed along with the cross-page electrical topology. Figure 1 And store.

[0105] S2. Based on the cross-page electrical topology diagram, candidate clauses are obtained from the preset rule clause library and parsed into structured review clauses; the target review object and its candidate evidence set are obtained according to the review clauses, the cross-page electrical topology diagram and the drawing evidence set, and review items corresponding to the target review object are generated in combination with the review clauses.

[0106] S21. Obtain candidate clauses and parse them into structured rule clauses.

[0107] It should be noted that the pre-defined rule and clause library includes at least: national standards (such as the GB series), industry standards (such as the DL / T series), enterprise standards (such as the Q / GDW series), and local management regulations or internal review rules that have been manually reviewed. The rule and clause library is divided into clause segments according to clause number. Each clause segment is a rule clause, including: clause identifier (clause_id), title, body, source, and version. The clause identifier, title, and body of the rule clause are concatenated and encoded into a fixed-dimensional vector using a pre-trained text vector encoder (such as BERT, RoBERTa, etc.), and a vector index is built to support subsequent semantic retrieval.

[0108] A terminology database for the power distribution network expansion field is pre-established, including: equipment type keywords (such as "circuit breaker," "protection device," and "metering circuit"), topological relationship keywords (such as "two ends," "page span," and "same circuit"), and parameter requirement keywords (such as "transformer ratio" and "cross-section"). For each rule clause in the rule clause database, the text is segmented and stop words are filtered out, retaining words that match the terminology database to form a keyword set for each clause; alternatively, a large language model is used to perform structured parsing and extraction of the text of each rule clause to obtain the keyword set.

[0109] Following the method described above for obtaining the evidence slot list for each evidence information item when constructing the drawing evidence set, obtain the evidence slots required for each rule clause.

[0110] The semantic query set is automatically constructed from the cross-page electrical topology diagram, including: extracting topological features from the cross-page electrical topology diagram, obtaining the semantic query terms corresponding to each topological feature according to the preset mapping relationship, and forming a semantic query set.

[0111] The topology features include: node type distribution, node degree sorting, line number set, number of cross-page edges, number of protection devices, number of differential protection devices, number of circuit breakers, line number set, number of metering devices, number of terminal nodes, and number of cross-page lead edges.

[0112] The preset mapping relationship assigns one or more semantic query terms to the topological features that are determined to "exist". For example, if the number of protection devices is greater than 0, it indicates that protection devices exist, and the corresponding semantic query terms are: protection device and configuration requirements; if the number of circuit breakers is greater than 1, it indicates that multiple circuit breakers exist, and the corresponding semantic query terms are: circuit breaker, switching equipment, and configuration at both ends; if the number of cross-page lead edges is greater than 1, it indicates that cross-page lead edges exist, and the corresponding semantic query terms are: cross-page lead, page number reference, and drawing continuity.

[0113] Furthermore, the semantic query term corresponding to each topological feature is treated as an independent query condition and encoded into a query vector by a pre-trained text vector encoder. Multiple terms with the highest similarity (e.g., cosine similarity) to the query vector are retrieved from the vector index of the rule term library. After merging and deduplication, the initial recall set is obtained.

[0114] The composite score for each rule clause in the initial recall set is calculated using the following formula: , in, Based on query conditions Regarding the rules and terms Calculated composite score; For the rules and terms Vectors and query conditions The cosine similarity between vectors is calculated by a pre-trained text vector encoder and reflects whether the rule clauses are semantically related to the topological features of the drawing.

[0115] For the rules and terms Topological keyword set extracted from the main text , and query conditions Word segmentation set The Jaccard coefficient.

[0116] Topology matching degree, i.e., rule terms In the keyword set, equipment keywords and topology relationship keywords appear in the cross-page electrical topology diagram. The verification process involves several steps: First, for each topology keyword, the required equipment type is determined by combining it with the equipment keyword. Then, the system searches the cross-page electrical topology diagram for at least one structural instance that satisfies the topology relationship. If such an instance exists, the verification passes, and the verification count is incremented by 1. For example, for the topology keyword "both ends" and the equipment keyword "circuit breaker," the system searches the cross-page electrical topology diagram for any line node whose two ends are connected to circuit breaker nodes. If such a node exists, the verification passes. For the topology keyword "cross-page," the system searches the cross-page electrical topology diagram for cross-page lead edges. If such edges exist, the verification passes.

[0117] For evidence slot availability, i.e., rule clauses Required evidence slots and drawing evidence set Calculate the intersection ratio of the evidence slot set; , , and These are the weighting coefficients, and the sum of the four weighting coefficients is 1; in this embodiment, they are taken as 0.4, 0.2, 0.25 and 0.15 respectively.

[0118] For each query condition, multiple candidate clauses are selected based on their comprehensive scores from highest to lowest. These candidate clauses are then aggregated, deduplicated, and added to the candidate clause set. Simultaneously, the query condition, the hit topological features, the scores of the four components, the comprehensive score, and the recall criteria are recorded for subsequent evidence trajectory reference. If the rule clause library is small (e.g., only a few dozen built-in rules), the step of obtaining the initial clause set through vector retrieval is skipped. Instead, the comprehensive scores of all rule clauses are calculated, and multiple candidate clauses are selected to obtain the candidate clause set.

[0119] Furthermore, each candidate clause in the candidate clause set is parsed into a structured review clause using rule templates, manual configuration, or a large language model. For example, when using a large language model, the prompt word template might be as follows: Figure 2 As shown.

[0120] Each structured review clause obtained includes the following fields: The clause identifier (clause_id) matches the number in the original clause library; the clause title; the clause body; the applicable object type set (applicable_object_types), indicating the types of electrical objects to which this clause applies; the applicable condition set (applicability_conditions), indicating the additional conditions that this clause must meet, with condition expressions using the key-value pair format of "applicable attribute = expected value"; the necessary evidence slots set (evidence_slots), indicating the types of evidence slots that must be verified in the drawings to determine whether this clause is compliant; and the topology constraint set (topology_constraints), indicating the... The clause includes the type of topological relationship (e.g., "both ends", "nearby", "same loop", "connected", "included", "spanning pages"), the obligation type (deontic), indicating the normative strength of the clause (e.g., "mandatory", "should", "appropriate", "may"), the risk level (severity), indicating the severity of the violation of the clause (e.g., high, medium, low), the conditional trigger set (conditional_trigger), indicating the triggering conditions with condition prefixes in the clause (if the clause does not contain conditional triggers, it is an empty set), and the process clause (is_process_clause), indicating whether the clause is a process clause (process clauses do not generate review items, but are only included in the proof trajectory).

[0121] Furthermore, the structured review clauses output are validated for legality, including: all fields must be complete, enumerated values ​​must fall into a preset set, the necessary evidence slot set must come from the available evidence slot set, and the topological constraint set must come from the available topological constraint set.

[0122] If validation fails, the rule template is used for correction. After parsing, each structured review clause is saved.

[0123] S22. Generate review items corresponding to the target review object.

[0124] From the node set of the cross-page electrical topology diagram, nodes whose electrical object type belongs to the applicable object type in the review clause are selected as candidate review objects. For example, if the applicable object type in the review clause includes line_label, breaker, and protection_device, then all nodes in the node set whose electrical object type is line node, circuit breaker node, and protection device node are selected. This pre-screening by applicable object type avoids invalid clause binding calculations for all nodes, improving the efficiency of review item generation.

[0125] If the conditional_trigger set of the review clause is not empty, the required object or text for triggering the condition is searched along the connected components of the line number where the candidate review object is located. For example, if the review clause requires "when differential protection is configured at both ends, the differential protection should meet XXX requirements", then first check whether there is a differential protection device or differential protection text in the connected components of the line (starting from the target review object, traversing along the connecting edges on the same page and the leading edges across pages, searching for all nodes with the same line number); if it exists, then the candidate review object of the review clause is further processed; if it does not exist, then the candidate review object of the review clause is deleted. This method only requires the application of the review clause when the triggering condition is met, avoiding the unconditional application of all review clauses across the entire map.

[0126] If the set of applicable conditions for a review clause is empty, the applicability_conditions of the candidate review object is 1. Otherwise, the applicable attribute and expected value are obtained from each condition expression in the set of applicable conditions, and the actual value of the applicable attribute is obtained from the node attribute (attributes field) of each candidate review object. If there is no applicable attribute in the node attribute, the actual value of the applicable attribute is obtained from the map label text, line text annotation or topology summary of the map information. If the actual value is not empty and is consistent with the expected value, the number of applicable conditions satisfied is incremented by 1. The proportion of the number of applicable conditions satisfied by each candidate review object to the total number of applicable conditions in the set of applicable conditions is calculated to obtain the applicability satisfaction of each candidate review object.

[0127] For example, the applicable condition is: line_usage=important_user_access, indicating that the line is used for important user access; if the candidate review object is line node L102, then check the attributes.usage field of L102. If the value is important_user_access, the applicable condition is met; if the value is general_access or there is no usage field in attributes, then the applicable condition is not met.

[0128] Furthermore, based on the set of topological constraints of the review clauses, each candidate review object is sequentially verified to ensure that it meets the topological constraints of the review clauses. The proportion of the number of verified topological constraints to the total number in the set of topological constraints is recorded to obtain the topological constraint matching degree of each candidate review object.

[0129] The verification methods for each topological constraint are shown in Table 1 below, where the target object is each candidate review object.

[0130] Table 1. Examples of Topological Constraint Verification Methods

[0131] It should be noted that during verification, the required electrical object type is determined based on the necessary evidence slots set (evidence_slots) of the review clause and the pre-defined mapping relationship between evidence slots and electrical object types. For example, if the topological constraint in the topological constraint set is "two ends" and the necessary evidence slot set is "breaker," then the required electrical object type is a circuit breaker node. Based on Table 1, a search is conducted in the cross-page electrical topology diagram to determine if a node of the required electrical object type exists that satisfies the topological constraints. If such a node exists, the topological constraint verification passes.

[0132] Starting with each candidate object for review, a neighborhood search is performed in the cross-page electrical topology graph based on a preset maximum depth (e.g., a maximum depth of 2) to obtain the topology neighborhood. The neighborhood search spans both same-page connecting edges and cross-page leading edges, ensuring that cross-page neighborhood relationships are fully captured.

[0133] Furthermore, the shortest path from the candidate object to the required electrical object is obtained as the target topology path set target_paths, which is used for subsequent evidence location and proof trajectory reference.

[0134] For example, if the evidence slot set contains a breaker, the shortest path from the candidate review object to the breaker node is obtained; if the evidence slot set contains a cross_page_ref, the endpoint path of the cross-page lead edge corresponding to the line where the candidate review object is located is obtained; if the evidence slot set contains a topology_connection, all adjacent paths of the candidate review object are obtained.

[0135] Furthermore, the candidate evidence set (candidate_evidence_unit_ids) for the candidate review object is obtained from the drawing evidence set. This includes: obtaining the evidence information items of each node in the topological neighborhood of the candidate review object in the drawing evidence set; obtaining the evidence information items of the necessary evidence slot set in the drawing evidence set that match the review clause of the candidate review object; and merging and deduplicating these to obtain the candidate evidence set. Simultaneously, the proportion of evidence slots covered by the candidate evidence set to the total number of necessary evidence slots is calculated to obtain the necessary slot hit rate for each target review object.

[0136] Finally, the binding score between each candidate review object and the review clause is calculated by weighting and summing the applicability of the conditions, the matching degree of the topology constraints, and the hit rate of the necessary slots, as shown in the following formula: , in, Candidate review object With review terms The binding score, Candidate review object Attributes and review terms Compared to the set of applicable conditions, the degree of satisfaction of applicable conditions. Candidate review object and its topological neighborhood and review terms The degree of topological constraint matching compared to the set of topological constraints. Candidate review object Candidate evidence set and review terms The necessary evidence slot set compared to the necessary slot hit rate; , and The weights are the weights of the three components, and the sum of the three weights is 1; in this embodiment, they are 0.3, 0.4 and 0.3 respectively.

[0137] Candidate review objects with a binding score not lower than a preset binding threshold (0.6 in this embodiment) are identified as target review objects. If the binding score is lower than the preset binding threshold, it indicates that the review clause is not sufficiently relevant to the candidate review object, and the candidate review object will not be selected as a target review object. This method automatically obtains target review objects to which review clauses can be applied, avoiding the tedious work of manually specifying the scope of application of each clause, and reducing the probability of applying rules incorrectly to irrelevant objects.

[0138] Finally, based on the target review object and its set of candidate evidence, and combined with the review clauses associated with the target review object, a structured review item corresponding to the target review object is generated. This means that relevant data is extracted from the attributes of the target review object and its set of candidate evidence, as well as the attributes of the review clauses, to form the review item.

[0139] It should be noted that each review item includes the following fields: review item identifier task_id, target review object node identifier audit_object, associated clause identifier clause_id, necessary evidence slot set evidence_slots, target review object topology_neighborhood, target topology path set target_paths, candidate evidence unit_ids, clause object binding score binding_score, and cross-page tracking flag cross_page_required (true if the necessary evidence slot set contains cross_page_ref).

[0140] Preferably, each review item also includes a review question (audit_question), which is used to present a readable description of the review question to the reviewer when the final report is output. The review question can be generated by concatenating templates, such as "Does {target review object} meet the requirements of {associated structured rule clause identifier}?", or it can be generated by passing the review item information to a pre-trained large language model.

[0141] S3. Divide the candidate evidence set corresponding to each review item into the target evidence set and the conflict evidence set, and then calculate the gate confidence score of each candidate evidence set; based on the gate confidence score and the conflict evidence set, obtain the review result and review trajectory of each review item.

[0142] S31. Divide the set of candidate evidence corresponding to each review item into a set of target evidence and a set of conflicting evidence.

[0143] It should be noted that the target evidence set and the conflict evidence set are distinguished based on the topological relationship between the evidence information items of the examination items and the target examination object, including: Obtain a list of associated node identifiers for each evidence information item in the candidate evidence set. If at least one node is reachable from the target object within a preset hop count in the cross-page electrical topology diagram, then the evidence information item is added to the target evidence set; otherwise, it is added to the conflict evidence set, and the reason for the conflict is recorded. For example, the preset hop count is 3.

[0144] Specifically, if the necessary evidence slot set for the review item contains ground_protection, then obtain all evidence information items in the drawing evidence set, identify all information items that contain ground_protection slots but whose associated nodes are not reachable from the target review object within three hops in the cross-page electrical topology diagram, put them into the conflict evidence set, and record the conflict reason as: the ground protection evidence is located outside the topology neighborhood of {target review object}.

[0145] The detection of conflicting evidence facilitates the identification of situations where "evidence exists but belongs to other lines or equipment," avoiding misjudging the protection devices of other objects as compliance evidence of the current review object. Therefore, the conflicting evidence set is used to trigger the "non-compliance" determination; the target evidence set is used to support the "compliance" determination.

[0146] It should be noted that for typical drawing scenarios with good primitive recognition and OCR recognition quality, directly obtaining the corresponding evidence information items from the candidate evidence set of the review items is highly efficient.

[0147] Given the diverse sources of drawings in engineering implementation (such as old scanned copies, hand-drawn sketches, or low-quality faxes), element recognition or OCR recognition may contain omissions or errors, potentially leading to an incomplete set of candidate evidence for each review item. In such cases, a visual language model is used to supplement the evidence, including: First, candidate pages and candidate areas are determined based on the topological neighborhood and target topological path set of the target review object in the review items, thus narrowing the evidence search scope from the entire drawing to a local area related to the target review object.

[0148] Specifically, a candidate page is the union of the pages containing all nodes within the topological neighborhood and all nodes in the target topological path set. For each candidate page, the union of the bounding boxes of the relevant nodes on that page is taken, and expanded by a preset expansion ratio (e.g., 0.05) to form a candidate region. If the candidate region is empty, the region after expanding the bounding box of the target object itself is used as the candidate region.

[0149] For each candidate region's cropped image, a Visual Language Model (VLM) is used for evidence localization. Based on the prompt word template, supplementary evidence information items related to the review item within the candidate region are output, including: evidence slot, electrical object type, bounding box, visible text, and confidence level. This method leverages the comprehensive understanding of image content by the Visual Language Model to directly identify evidence information items from the image without relying on primitive recognition and OCR, effectively supplementing the candidate evidence set for the review item.

[0150] For example, the prompt word template of the visual language model is as follows: Figure 3 As shown.

[0151] S32. Calculate the gate confidence score for each candidate evidence set.

[0152] It should be noted that each candidate evidence set contains one or more evidence information items in both the target evidence set and the conflicting evidence set, and the source types of these evidence information items may differ. The gate confidence score for each candidate evidence set is calculated through the following steps: If the conflicting evidence set of the current candidate evidence set is not empty, then the gate value is 0 and the gate confidence score is 0. Otherwise, calculate five components for the current candidate evidence set: visual region confidence, OCR text hit rate, topological relevance, slot coverage, and cross-page reference value; determine the gate value based on the topological relevance and slot coverage; multiply each of the five components by its corresponding preset weight and sum them to obtain a weighted sum; multiply the weighted sum by the gate value to obtain the gate confidence score for the current candidate evidence set, as shown in the following formula: , in, For the current set of candidate evidence The gate confidence score, For the current set of candidate evidence The threshold value, , , , and Based on the current set of candidate evidence The target evidence set The visual region confidence, OCR text hit rate, topological relevance, slot coverage, and cross-page reference value are calculated. , , , and These are the weights of the corresponding components, and the sum of these five weights is 1; in this embodiment, they are 0.2, 0.2, 0.25, 0.25 and 0.1 respectively.

[0153] It should be noted that the confidence level of the visual region Take the target evidence set The average confidence level of the second evidence information item whose source type is visual region is taken. If there is no second evidence information item, the average confidence level of all evidence information items is taken. OCR Text Hit Rate Take the target evidence set The mean confidence level of the first evidence information item whose source type is OCR text. If there is no first evidence information item, the OCR text hit rate is 0. Topological correlation Take 1; because at this point the conflict evidence set for the review item is empty, and the target evidence set... yes; Slot coverage is obtained by calculating the ratio of the intersection of the available evidence slots of the target evidence set and the necessary evidence slots of its respective review item to the size of the necessary evidence slots; it is used to measure the degree to which the evidence information items contained in the target evidence set cover the necessary evidence slots required by its respective review item.

[0154] Specifically, obtain the current target evidence set. The list of evidence slots for each evidence information item (obtained in step S12 when constructing the drawing evidence set) is merged to obtain the available slot set for the target evidence set. ; Obtain the review items to which the target evidence set belongs Necessary evidence slot set .

[0155] Furthermore, by taking the intersection of the available slot set and the necessary evidence slot set, the number of necessary slots covered by the current target evidence set is obtained. Then, the ratio of the number of necessary slots covered to the total number of necessary evidence slots is calculated to obtain the slot coverage of the current target evidence set, as shown in the following formula: , in, To determine the number of elements in the set.

[0156] For example, a certain review item The necessary evidence slots are [line_code, breaker_pair, differential_protection]; a certain target evidence candidate. The data contains two evidence information items, with evidence slot lists of [line_code] and [breaker_pair], whose union is [line_code, breaker_pair]. The intersection with the necessary slots is [line_code, breaker_pair], meaning the number of necessary slots covered is 2, the total number of necessary slots is 3, and the slot coverage is 2 / 3 = 0.667.

[0157] The cross-page reference value is determined based on whether the evidence slot list of each evidence information item in the target evidence set contains a cross-page leader. If it does, the cross-page reference value is 1; otherwise, it is 0.

[0158] Furthermore, the gate value is determined based on the slot coverage, including: If the slot coverage is 1, the gate value is 1; if the slot coverage is 0, the gate value is set to the first gate threshold; if the slot coverage is between 0 and 1, the gate value is set to the second gate threshold.

[0159] The second gate threshold is less than the second gate threshold. For example, the first gate threshold is 0.25 and the second gate threshold is 0.55.

[0160] S33. Based on the gate confidence score and the set of conflicting evidence, obtain the review result and review trajectory for each review item.

[0161] It should be noted that the review results include: compliance, non-compliance, and insufficient evidence. The review result for each review item is obtained based on the gate confidence score and the conflicting evidence set, including: ① If the conflict evidence set of the current review item is not empty: when at least one piece of evidence information in the conflict evidence set matches the key evidence slot of the current review item, it is judged as non-compliant; when the conflict evidence set does not match the key evidence slot of the current review item, it is judged as insufficient evidence.

[0162] It should be noted that key evidence slots are pre-configured during the initialization phase according to the power distribution network expansion security review specifications, and can be added, deleted, or adjusted through configuration files based on the review requirements of different regions. For example, evidence slot types involving security protection are pre-configured as key evidence slots, including: ground_protection, differential_protection, and breaker. Identification-type evidence slot types (such as line_code, line_model, etc.) are not considered key slots to avoid over-judgment due to errors in auxiliary identification information.

[0163] The evidence information item hits the key evidence slot of the review item, that is, the intersection of the available slot set obtained by merging the evidence slot lists of each evidence information item in the conflict evidence set and the key evidence slot set is not empty.

[0164] ② If the set of conflicting evidence for the current review item is empty: when the gate confidence score is greater than or equal to the decision threshold and the slot coverage is 1, it is judged as compliant; when the gate confidence score is less than the decision threshold and the slot coverage is less than 1, it is judged as insufficient evidence.

[0165] For example, the threshold is set to 0.6.

[0166] When determining the review result for each review item, the complete judgment process and basis are recorded as a review trajectory, so that the review conclusion can be traced back to the specific clause, object, path, evidence and judgment rules, thus meeting the requirements for verifiability and responsibility boundaries in engineering review.

[0167] The review trajectory includes, but is not limited to, the following information: the review item identifier task_id, the associated clause identifier clause_id, the node identifier audit_object of the target review object, the necessary evidence slot set evidence_slots, the candidate evidence set candidate_evidence_unit_ids, and the source type, page, coordinate frame, evidence slot list and confidence level of each evidence information item; five components: visual region confidence level, OCR text hit rate, topological relevance, slot coverage and cross-page reference value, gating value, gating confidence score, conflict cause, judgment basis and review result.

[0168] Compared with existing technologies, this embodiment provides a drawing compliance review method for distribution network expansion projects. By parsing the drawings for distribution network expansion review into a cross-page electrical topology diagram and a standardized set of drawing evidence, it realizes the transformation of drawing information from manual reading to computable structured data. By parsing the rule clauses described in natural language into structured rules and generating review items based on the topology, it solves the problem that rules are difficult to stably correspond to specific drawing objects in traditional solutions. By dividing candidate evidence into a target evidence set and a conflict evidence set and introducing a gating confidence score, it effectively distinguishes between the three situations of "compliant", "non-compliant" and "insufficient evidence". Finally, it outputs traceable review results and review trajectory, meeting the requirements of verifiability and responsibility boundaries for distribution network expansion project review, and realizing fully automated compliance review from unstructured drawings to verifiable review results. By using cross-page anchor point matching and same-page edge detection, automatic identification and precise positioning of cross-page electrical connections are achieved. By constructing a cross-page electrical topology diagram containing topological nodes, same-page connecting edges, and cross-page lead edges, a unified connectivity relationship is established at the topological level for the same electrical object scattered across multiple pages of drawings. By constructing OCR text, visual regions, topological paths, and cross-page references as four types of evidence information items and assigning standardized evidence slot labels, semantic encapsulation of drawing information is achieved. This overcomes the inefficiency and ease of omission in manually tracking inter-page references during multi-page drawing review, transforming cross-page connection verification from manual operation to automated calculation. By parsing candidate clauses into structured rule clauses and calculating binding scores based on the applicability of conditions, topological constraint matching, and necessary slot hit rate, precise binding of rule clauses to specific target review objects is achieved, reducing the probability of rule errors applied to irrelevant objects. By generating review items corresponding to the target review object, the evidence search scope is narrowed from the entire drawing to a local area, improving the efficiency and accuracy of evidence positioning. By extracting conflicting evidence sets, a hard interception of "evidence location error" situations was achieved; by calculating multiple dimensional components and threshold values ​​and weighting and fusing them into a gated confidence score, a comprehensive quantitative assessment of evidence quality was achieved; and by generating review trajectories, the review conclusions were made fully traceable.

[0169] Example 2 Another embodiment of the present invention discloses a drawing compliance review system for distribution network expansion, thereby implementing the drawing compliance review method for distribution network expansion in Embodiment 1. The specific implementation of each module is described in the corresponding description in Embodiment 1. The system includes: The drawing parsing module is used to parse the drawings for power distribution network expansion review and obtain drawing information; based on the drawing information, it constructs a cross-page electrical topology diagram and multiple sets of drawing evidence. The review item generation module is used to obtain candidate clauses from a preset rule clause library based on the cross-page electrical topology diagram and parse them into structured review clauses; obtain the target review object and its candidate evidence set according to the review clauses, the cross-page electrical topology diagram and the drawing evidence set, and generate review items corresponding to the target review object in combination with the review clauses; The compliance review module is used to divide the candidate evidence set corresponding to each review item into the target evidence set and the conflict evidence set, and then calculate the gate confidence score of each candidate evidence set; based on the gate confidence score and the conflict evidence set, the review result and review trajectory of each review item are obtained.

[0170] Since the drawing compliance review system for distribution network expansion described in this embodiment and the drawing compliance review method for distribution network expansion described above are related and can be mutually referenced, this description is redundant and will not be repeated here. Because this system embodiment shares the same principle as the above method embodiment, it also possesses the corresponding technical effects of the above method embodiment.

[0171] Example 3 Another embodiment of the present invention discloses a computer device for drawing compliance review for distribution network expansion. The computer device includes a memory and a processor. The memory stores a computer program that runs on the processor. When the processor executes the computer program, it implements a drawing compliance review method for distribution network expansion according to Embodiment 1.

[0172] The computer device in this embodiment is a server, a terminal, or any other electronic device with the necessary computing and / or processing capabilities.

[0173] In one specific embodiment, the processor of the computer device provides the necessary computing, processing, and / or control capabilities. The memory of the computer device includes: a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and serves as a working area for runtime, temporarily storing intermediate and final results. The internal memory provides the operating environment for the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for network connection and communication with external devices.

[0174] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0175] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for reviewing the compliance of drawings for power distribution network expansion, characterized in that, Includes the following steps: The drawings for the power distribution network expansion review are analyzed to obtain drawing information; based on the drawing information, a cross-page electrical topology diagram and multiple sets of drawing evidence are constructed. Based on the cross-page electrical topology diagram, candidate clauses are obtained from a preset rule clause library and parsed into structured review clauses; the target review object and its candidate evidence set are obtained according to the review clauses, the cross-page electrical topology diagram and the drawing evidence set, and review items corresponding to the target review object are generated in combination with the review clauses; The candidate evidence set corresponding to each review item is divided into the target evidence set and the conflicting evidence set, and then the gate confidence score of each candidate evidence set is calculated. Based on the gate confidence score and the set of conflicting evidence, obtain the review results and review trajectory for each review item.

2. The method for reviewing drawings for distribution network expansion according to claim 1, characterized in that, The process of parsing the power distribution network expansion review drawings to obtain drawing information includes: Each page of the power distribution network expansion review drawing is rendered as a page image and preprocessed; the preprocessed page images are then subjected to OCR text recognition, graphic element recognition and line segment detection to obtain text objects, electrical objects and connecting line graphic elements. The text object and the electrical object are bound together by calculating the distance score between them; Cross-page anchor point matching is performed based on text objects and electrical objects to obtain a set of matching anchor point pairs; same-page edge detection is performed based on electrical objects and connecting line primitives to obtain a set of snapped endpoint pairs, and connecting line primitives are marked as same-page connecting edges or cross-page lead candidate edges.

3. The method for reviewing drawings for distribution network expansion according to claim 2, characterized in that, The method of performing cross-page anchor point matching based on text objects and electrical objects to obtain a set of matching anchor point pairs includes: Based on the preset regular expression for cross-page reference text, the text content of the text object is matched, the successfully matched text object is marked as a cross-page text anchor, and the matched cross-page reference phrase is used as the reference text of the cross-page text anchor. If the electrical object to which the cross-page text anchor is bound is a cross-page graphic node, then the bounding box center coordinates of the cross-page graphic node are used as the anchor center coordinates; otherwise, the bounding box center coordinates of the cross-page text anchor are used as the anchor center coordinates; calculate the azimuth angle of each cross-page text anchor relative to the center of the page based on its anchor center coordinates. Calculate the cross-page matching score between any two cross-page text anchors from different pages based on the line number, quoted text, wire type, page number of the current page, target page number, and azimuth of each cross-page text anchor. Two cross-page text anchor points whose cross-page matching scores reach a preset threshold are selected as candidate anchor point pairs and placed into the corresponding candidate pairing set according to the line number; the optimal match is obtained from the candidate pairing set to obtain the matching anchor point pair and placed into the matching anchor pair set.

4. The method for reviewing drawings for distribution network expansion according to claim 3, characterized in that, The cross-page matching score is obtained by weighted summation of text consistency, conductor type consistency, page number cross-reference consistency, and directional complementarity consistency. Specifically, text consistency is obtained by weighted summation of the normalized edit distance score and term Jaccard coefficient between the conductor numbers of the two cross-page text anchors and the concatenated text of the quoted text. Conductor type consistency is obtained by calculating the proportion of identical field values ​​after decomposing the conductor types of the two cross-page text anchors into multiple fields according to the separator. Page number cross-reference consistency is determined based on whether the target page numbers of the two cross-page text anchors point to the page of the other. Directional complementarity consistency is obtained based on whether the azimuth angles of the two cross-page text anchors are complementary.

5. The method for reviewing drawings for distribution network expansion according to claim 3, characterized in that, The step of obtaining the optimal match from the candidate pairing set to obtain the matching anchor pair includes: Based on the bounding box of the electrical object bound to each cross-page text anchor point in the candidate pairing set, generate four virtual terminal nodes according to the midpoints of the four sides of the bounding box, and select a representative terminal from the four virtual terminal nodes according to the azimuth angle of the cross-page text anchor point. A bipartite graph is constructed using all representative terminals in the candidate pairing set as nodes to be matched. The total cost function of the bipartite graph is constructed based on the cross-page matching score of the candidate anchor pairs corresponding to the representative terminals. The optimal match that minimizes the total cost function value is obtained, and the matching anchor pairs are obtained. Each representative terminal in the matching anchor pair is matched at most once.

6. The method for reviewing drawings for distribution network expansion according to claim 2, characterized in that, The method of detecting same-page edges based on electrical objects and connecting line primitives, obtaining a set of snapped endpoint pairs, and marking connecting line primitives as candidate edges for same-page connecting edges or cross-page lead edges includes: For connecting line primitives within the same page, obtain the coordinates of their two endpoints and the direction angle of the line segment; for electrical objects within the same page, generate four virtual terminal nodes based on the midpoints of the four sides of their bounding box, thus obtaining a set of candidate adsorption nodes on the same page. The adsorption cost is calculated based on the sum of the weighted distance and weighted direction difference from each endpoint of the connecting line to each candidate adsorption node; the direction difference is a measure of the angular difference between the line segment direction angle and the outward normal direction angle of the candidate adsorption node. The candidate adsorption node that minimizes the adsorption cost is selected, and the adsorption at the endpoint of the connecting line is successful only if the minimum adsorption cost is not greater than the preset adsorption threshold; otherwise, the adsorption at the endpoint of the connecting line fails. If both endpoints of the connecting line element are successfully snapped, it is marked as a connecting edge on the same page, and the correspondence between the successfully snapped connecting line endpoints and the snapped candidate snapped nodes is added to the snapped endpoint pair set; if only one endpoint is successfully snapped and the other endpoint is less than the preset edge threshold from the page edge, it is marked as a cross-page leader candidate edge.

7. The method for reviewing drawings for distribution network expansion according to claim 2, characterized in that, The construction of the cross-page electrical topology diagram based on the diagram information includes: The electrical objects in the drawing information are used as topology nodes, and the text objects bound to the electrical objects are used as their semantic attribute information to populate the attributes of the topology nodes. Generate same-page connection edges based on the connecting line primitives marked as same-page connection edges; define the edge attributes of same-page connection edges based on the set of snapped endpoint pairs; Associate and match the set of anchor point pairs with the line number and the connecting line primitives marked as candidates for cross-page leader edges, generate cross-page leader edges and define the edge attributes of the cross-page leader edges.

8. The method for reviewing drawings for distribution network expansion according to claim 7, characterized in that, The multiple sets of drawing evidence are constructed through the following steps: Based on the text objects and their attributes in the image information, a first evidence information item with OCR text as the source type is generated, and the text content of the text objects is matched according to the regular expression of the preset evidence slots to obtain the evidence slot list of the first evidence information item. Based on each electrical object and its attributes in the drawing information, a second evidence information item with a source type of visual region is generated, and an evidence slot list for the second evidence information item is obtained according to the electrical object type; Based on the same-page connection edges and their attributes in the cross-page electrical topology diagram, a third evidence information item with the source type of topology path is generated; Based on the cross-page lead edges and their attributes in the cross-page electrical topology diagram, a fourth evidence information item with a source type of cross-page reference is generated.

9. The method for reviewing drawings for distribution network expansion according to claim 1, characterized in that, The step of retrieving candidate clauses from a preset rule clause library based on the cross-page electrical topology diagram includes: Extract topological features from the cross-page electrical topology diagram, and obtain one or more semantic query terms corresponding to each topological feature according to a preset mapping relationship; One or more semantic query terms corresponding to each topological feature are treated as independent query conditions and encoded into query vectors by a text vector encoder; the most terms with the highest similarity to the query vectors are retrieved from the vector index pre-established in the rule term library to obtain an initial recall set; Based on each rule clause in the initial recall set and its corresponding query conditions, a comprehensive selection score is calculated for each rule clause. The comprehensive selection score is obtained by weighted summation of semantic similarity, topological keyword Jaccard coefficient, topological structure matching degree, and evidence slot availability. For each query condition, multiple terms are selected by sorting them from high to low according to the comprehensive selection score to obtain candidate terms.

10. The method for reviewing drawings for distribution network expansion according to claim 1, characterized in that, The candidate clauses are parsed into structured review clauses using rule templates or large language models; The structured review clauses include: clause identifier, clause text, set of applicable object types, set of applicable conditions, set of necessary evidence slots, set of topological constraints, type of obligation, risk level, set of condition triggers, and process markers.

11. The method for reviewing drawings for distribution network expansion according to claim 10, characterized in that, Based on the aforementioned review terms, the cross-page electrical topology diagram, and the set of drawing evidence, the target review object and its candidate evidence set are obtained, including: From the set of nodes in the cross-page electrical topology diagram, nodes whose electrical object types belong to the set of applicable object types for each review clause are selected as candidate review objects for the corresponding review clause; Based on the cross-page electrical topology diagram, a candidate evidence set for candidate review objects is obtained from the drawing evidence set; and based on the set of applicable conditions, the set of topology constraints, and the set of necessary evidence slots of the review clauses, the applicability satisfaction, topology constraint matching, and necessary slot hit rate of each candidate review object are calculated respectively. The binding score between each candidate review object and the review clause is calculated by weighting and summing the applicable condition satisfaction, topology constraint matching degree, and necessary slot hit degree. Candidate review objects whose binding scores are not lower than the preset binding threshold are identified as target review objects.

12. The method for reviewing drawings for distribution network expansion according to claim 11, characterized in that, Calculate the degree to which each candidate meets the applicable conditions, including: If the set of applicable conditions for the review clause is empty, then the degree of satisfaction of the applicable conditions for all candidate review objects of the review clause is 1. Otherwise, obtain the applicable attribute and expected value from each applicable condition expression in the set of applicable conditions, obtain the actual value of the applicable attribute from the attribute field of each candidate review object or the drawing information, and if the actual value is consistent with the expected value, then the applicable condition is satisfied; count the proportion of the number of satisfied applicable conditions to the total number of applicable conditions in the set of applicable conditions to obtain the applicability satisfaction of each candidate review object.

13. The method for reviewing drawings for distribution network expansion according to claim 11, characterized in that, Calculate the topological constraint matching degree for each candidate review object, including: Based on the set of necessary evidence slots in the aforementioned review clauses, and based on the pre-defined mapping relationship between evidence slots and electrical object types, the required electrical object type is determined; Based on the set of topology constraints of the review clauses, starting from the candidate review object, search the cross-page electrical topology graph for whether there is a node of the required electrical object type that satisfies the topology constraints. If it exists, the topology constraint verification is passed. The topology constraint matching degree of each candidate review object is obtained by statistically verifying the proportion of the number of topology constraints that pass the topology constraint verification to the total number of topology constraints.

14. The method for reviewing drawings for distribution network expansion according to claim 11, characterized in that, The step of obtaining a candidate evidence set for candidate review objects from the drawing evidence set based on the cross-page electrical topology diagram includes: Starting with the candidate review object, a neighborhood search is performed in the cross-page electrical topology graph to obtain the topological neighborhood of the candidate review object; Obtain the evidence information items of each node in the topological neighborhood of each candidate review object in the drawing evidence set, as well as the evidence information items of the necessary evidence slot set in the drawing evidence set that match the review clause of the candidate review object. After merging and deduplicating, the candidate evidence set is obtained.

15. The method for reviewing drawings for distribution network expansion according to claim 1, characterized in that, The candidate evidence set corresponding to each review item is divided into a target evidence set and a conflicting evidence set, including: Obtain the list of associated node identifiers for each evidence information item in the candidate evidence set; If at least one node in the associated node identifier list is reachable from the target review object within a preset number of hops in the cross-page electrical topology diagram, then the evidence information item is placed in the target evidence set; otherwise, it is placed in the conflict evidence set.

16. The method for reviewing drawings for distribution network expansion according to claim 1, characterized in that, The calculation of the gated confidence score for each candidate evidence set includes: If the conflicting evidence set of the current candidate evidence set is not empty, then the gate value is 0 and the gate confidence score is 0. Otherwise, calculate five components of the target evidence set in the current candidate evidence set: visual region confidence, OCR text hit rate, topological relevance, slot coverage, and cross-page reference value; multiply each of the five components by its corresponding preset weight and sum them to obtain a weighted sum. The gate value is determined based on the slot coverage, and the weighted sum is multiplied by the gate value to obtain the gate confidence score of the current candidate evidence set.

17. The method for reviewing drawings for distribution network expansion according to claim 16, characterized in that, Determining the gate value based on the slot coverage includes: If the slot coverage is 1, the gate value is 1; if the slot coverage is between 0 and 1, the gate value is set to a first gate threshold; if the slot coverage is 0, the gate value is set to a second gate threshold; the first gate threshold is less than the second gate threshold.

18. The method for reviewing drawings for distribution network expansion according to claim 16, characterized in that, The process of obtaining the review result for each review item based on the gated confidence score and the conflicting evidence set includes: If the set of conflicting evidence for the current review item is not empty: when at least one piece of evidence information in the set of conflicting evidence hits a preset key evidence slot, it is determined to be non-compliant; when the set of conflicting evidence does not hit a preset key evidence slot, it is determined to be insufficient evidence. If the set of conflicting evidence for the current review item is empty: when the gate confidence score is greater than or equal to the decision threshold and the slot coverage is 1, it is determined to be compliant; when the gate confidence score is less than the decision threshold or the slot coverage is less than 1, it is determined to be insufficient evidence.

19. A drawing compliance review system for power distribution network expansion, characterized in that, include: The drawing parsing module is used to parse the power distribution network expansion review drawings and obtain drawing information; Based on the aforementioned drawing information, a cross-page electrical topology diagram and multiple sets of drawing evidence are constructed; The review item generation module is used to obtain candidate clauses from a preset rule clause library based on the cross-page electrical topology diagram and parse them into structured review clauses; obtain the target review object and its candidate evidence set according to the review clauses, the cross-page electrical topology diagram and the drawing evidence set, and generate review items corresponding to the target review object in combination with the review clauses; The compliance review module is used to divide the candidate evidence set corresponding to each review item into the target evidence set and the conflicting evidence set, and then calculate the gate confidence score of each candidate evidence set; Based on the gate confidence score and the set of conflicting evidence, obtain the review results and review trajectory for each review item.

20. A computer device for compliance review of drawings for power distribution network expansion, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program running on the processor, and the processor executing the computer program implementing the drawing compliance review method for distribution network expansion as described in any one of claims 1 to 18.