A device labeling method and device for a power single-line diagram
By constructing hierarchical path objects and drawing data models, and combining power line diagram parsing and spatial proximity verification, the labeling of power system equipment has been automated, solving the problems of low efficiency and safety risks in existing technologies, and improving the overall efficiency and safety of power operation and maintenance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG ELECTRIC POWER SCI RES INST ENERGY TECH CO LTD
- Filing Date
- 2026-02-10
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies cannot accurately and efficiently label equipment in power systems, resulting in low operation and maintenance efficiency and safety risks.
By constructing a work order parsing model and power equipment hierarchical subordination rules, hierarchical path objects are generated. Combined with the parsing of power line diagram files, drawing data models are generated. Hierarchical constraints and spatial proximity checks are used to determine target equipment, thereby achieving automated equipment labeling.
It significantly improves the efficiency and accuracy of equipment labeling on power line diagrams, reduces the risk of human error, and ensures the safety and reliability of power operation and maintenance.
Smart Images

Figure CN122265996A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of labeling, and more particularly to a method and apparatus for labeling equipment on a single-line power diagram. Background Technology
[0002] In power system operation and maintenance, the single-line power diagram, as a core technical document reflecting the connection relationships and operating status of power equipment, is an important basis for staff to carry out equipment operation and safety measures. Before the operation, the target equipment must be accurately marked on the single-line power diagram (such as marking "circuit breakers to be opened" and "grounding wire locations to be installed") in conjunction with the work order (a text file recording the work task, target equipment, and safety requirements) to ensure work safety and operational accuracy.
[0003] Currently, equipment labeling on power line diagrams largely relies on manual work: staff must first read each work order document to extract target equipment information (e.g., "35kV I-section busbar 312 line circuit breaker at XX substation"), then manually locate the corresponding equipment in the complex single-line diagram, and finally add the label using drawing tools. This method has significant drawbacks: firstly, it is inefficient. Power systems have numerous substation devices with complex hierarchical relationships (e.g., "substation → busbar → line → switch"), making it time-consuming to manually locate targets from a vast number of devices, especially in emergency maintenance scenarios where it can delay work progress; secondly, accuracy is difficult to guarantee. Manual location relies on staff experience, and labeling errors can easily occur due to similar equipment names, dense single-line diagram elements, or confused hierarchical relationships, leading to operational risks and threatening the safe operation of the power system.
[0004] To address the shortcomings of manual annotation, some solutions attempt to introduce automation technology, but key technical bottlenecks remain: First, work order text parsing lacks structured capabilities. Existing technologies can only extract keywords from equipment names and cannot identify hierarchical relationships between equipment (e.g., they cannot distinguish the subordinate line equipment corresponding to "35kV Section I busbar" and "35kV Section II busbar"), resulting in the parsing results not being directly applicable to single-line diagram equipment location. Second, single-line diagram parsing does not achieve automatic association between symbols and information. Although it can extract electrical symbols (such as circuit breaker symbols and disconnector symbols) and text labels (such as equipment numbers) from the diagram, it lacks an effective spatial association mechanism and cannot automatically bind equipment information in text labels to corresponding electrical symbols, still requiring manual matching. Third, target equipment location does not form a dual guarantee of "hierarchical constraints + spatial verification." Existing automated location is mostly based on single keyword matching, easily locating multiple similar devices (circuit breakers of the same type but different levels) in the single-line diagram, making it impossible to determine the target equipment, ultimately requiring manual confirmation.
[0005] These shortcomings prevent existing technologies from accurately and efficiently labeling power systems. Summary of the Invention
[0006] This invention provides a method and apparatus for labeling equipment on a single-line power diagram, thereby solving the problem that existing technologies cannot accurately and efficiently label power systems.
[0007] Firstly, this application provides a method for labeling equipment on a single-line power diagram, including: Obtain the work order text data and the power line diagram file; The work order text data is input into a preset work order parsing model to output a hierarchical path object. The work order parsing model is constructed based on historical work order data and preset power equipment hierarchical subordination rules. The hierarchical path object includes power equipment entities and hierarchical subordination relationships between entities. The power line diagram file is parsed to obtain a drawing data model; wherein, the drawing data model includes each electrical equipment node, the connection relationship between each equipment, and the spatial geometric information of each equipment; Based on the hierarchical path object, a hierarchical constraint graph traversal is performed on the drawing data model to obtain a candidate device set; a spatial proximity check is performed on the candidate device set to determine the target device; Based on the work order text data, the target equipment is marked on the power line diagram.
[0008] This application firstly utilizes a work order parsing model built based on historical work order data and power equipment hierarchical subordination rules to automatically transform work order text data into hierarchical path objects containing equipment entities and hierarchical subordination relationships. This eliminates the need for manual extraction and sorting of equipment hierarchies (such as the subordination relationship of "substation → busbar → line → switch"), reducing efficiency losses caused by manual intervention and avoiding confusion errors when manually identifying hierarchies, significantly improving the efficiency and accuracy of work order parsing. Secondly, by parsing power single-line diagram files to generate a drawing data model containing electrical equipment nodes, connection relationships, and spatial geometric information, the application transforms the originally unstructured single-line diagram elements into machine-recognizable structured data, providing accurate data support for subsequent equipment location and solving the problem of the difficulty of manually finding equipment in dense elements in traditional methods. The application addresses several key issues: firstly, it avoids omissions and errors; secondly, it uses hierarchical constraint graph traversal based on hierarchical path objects to initially filter out candidate equipment sets that meet hierarchical requirements, and then further determines the target equipment through spatial proximity verification. This dual constraint mechanism effectively avoids the problem of mislocating multiple similar equipment caused by single keyword matching, ensuring the accuracy and reliability of target equipment location; thirdly, it automatically generates annotation instructions and completes annotation based on target equipment and work order text data, realizing full automation from data parsing and equipment location to annotation, completely changing the traditional situation of low efficiency and high error in manual annotation, significantly improving the overall efficiency of equipment annotation on power single-line diagrams, and reducing the risk of power operation and maintenance misoperation caused by annotation errors. This application effectively solves the problem of the inability to accurately and efficiently annotate power systems in existing technologies.
[0009] Furthermore, the step of inputting the work order text data into a preset work order parsing model to output a hierarchical path object specifically involves: The acquired work order text data is input into a preset work order parsing model, so that the work order parsing model can perform word segmentation and semantic recognition on the work order text data, extract each power equipment entity, and perform hierarchical relationship reasoning on each extracted equipment entity according to the preset power equipment hierarchical subordination rules to determine the hierarchical path of each power equipment entity. The names, equipment types, and hierarchical paths of each power equipment entity are encapsulated in a structured JSON format to generate a hierarchical path object; wherein, the power equipment entities include substations, lines, circuit breakers, disconnect switches, and their corresponding names or numbers.
[0010] This application inputs work order text data into a pre-defined work order parsing model. This model performs word segmentation and semantic recognition on the work order text to extract various power equipment entities. Subsequently, based on pre-defined power equipment hierarchical subordination rules, hierarchical relationship reasoning is performed on these equipment entities to determine their hierarchical paths. Finally, the names, equipment types, and hierarchical paths of the equipment entities are encapsulated in structured JSON format to generate hierarchical path objects. This processing method ensures that the equipment information in the work order is accurately parsed and structured, thus providing clear and accurate hierarchical semantic information for subsequent equipment location and labeling. This not only improves the accuracy of equipment location but also significantly enhances the efficiency and reliability of the entire power line icon labeling process, avoiding location ambiguities caused by duplicate equipment names or numbers, and effectively reducing safety risks in power operation and maintenance.
[0011] Furthermore, the step of parsing the single-line power diagram file to obtain the drawing data model specifically involves: The power line diagram file is processed by extracting and classifying graphic elements to obtain each first electrical symbol, each connecting line, and each text label; Based on each text tag, construct a spatial index corresponding to each text tag; By using the spatial index, the device name or number corresponding to each first electrical symbol is bound to obtain each second electrical symbol; Based on each second electrical symbol and each connecting line, the electrical topology relationship between each power device is reconstructed to obtain the drawing data model; The drawing data model includes each power equipment node, the connection relationship between each power equipment, and the spatial geometric information of each power equipment.
[0012] The beneficial effects achieved by this application through the aforementioned power line diagram analysis and drawing data model construction process can be logically deduced by combining technical means to solve the pain points of traditional single-line diagram processing: Traditional manual processing of power line diagrams requires manual identification of electrical symbols, text labels, and equipment connection relationships, which is not only inefficient but also prone to information matching errors due to dense graphic elements, similar symbols, or ambiguous spatial correspondence between text labels and symbols (such as mistakenly binding the number of equipment A to the symbol of equipment B). This solution first extracts and classifies graphic elements from the single-line diagram file, clearly distinguishing the chaotic graphic elements into the first electrical symbol, connecting lines, and text labels, laying a clear data foundation for subsequent information association and avoiding graphic element confusion during manual identification. Furthermore, by constructing a spatial index for text labels, a precise association between text labels (including equipment names / numbers) and spatial locations is established, solving the problem of traditional Chinese... This addresses the pain point of "difficult spatial correspondence" between symbols. Subsequently, spatial indexing is used to automatically bind the first electrical symbol to the corresponding equipment name / number as the second electrical symbol, eliminating the need for manual matching and significantly reducing matching errors caused by manual intervention. This improves the efficiency and accuracy of symbol-information association. Finally, based on the second electrical symbol and connecting lines, the electrical topology is reconstructed, forming a drawing data model containing equipment nodes, connection relationships, and spatial geometric information. This transforms the originally unstructured, machine-unreadable single-line diagram into a structured, computable data carrier. This provides accurate data support for subsequent hierarchical positioning and spatial verification of target equipment (avoiding positioning deviations caused by the lack of structured data during manual positioning) and lays the foundation for intelligent processing of power single-line diagrams (such as automatic annotation and digital operation and maintenance). Ultimately, this significantly improves the efficiency, accuracy, and intelligence level of power single-line diagram processing.
[0013] Furthermore, the step of extracting and classifying the elements from the single-line power diagram file to obtain each first electrical symbol, each connecting line, and each text label specifically involves: Traverse the vector primitive nodes of the power line diagram file and extract the paths, rectangles, circles, polylines, and text of the vector primitive nodes as basic primitives; Based on a pre-set power standard symbol library, and combined with a template matching algorithm, the basic graphic elements are compared with the standard electrical symbols in the power standard symbol library to identify the first electrical symbol corresponding to the basic graphic elements. Filter the basic graphic elements. The first graphic element with the style of a thin black solid line and the shape of a straight line or a polyline is selected and identified as each connecting line. Extract all text-type second primitives from the basic primitives, record the text content of each second primitive and the coordinates of the center point of the text's bounding rectangle, and use the text content and center point coordinates as each text label.
[0014] This application extracts and classifies graphic elements from power line diagram files, decomposing complex vector graphic element nodes into basic graphic elements, including paths, rectangles, circles, polylines, and text. Using a pre-defined power standard symbol library and template matching algorithm, the basic graphic elements are compared with standard electrical symbols to accurately identify the corresponding electrical symbols, thus obtaining each first electrical symbol. Simultaneously, basic graphic elements with a thin black solid line style and straight or polyline shape are selected as connecting lines. Furthermore, all text-type graphic elements are extracted, and their text content and the center point coordinates of their circumscribed rectangles are recorded to form text labels. This processing method ensures efficient and accurate extraction of key information from the original power line diagram file, providing a solid foundation for subsequent equipment positioning and labeling. It significantly improves the efficiency and accuracy of processing complex power line diagrams, reduces errors and omissions in manual analysis, and thus enhances the automation level and reliability of the entire power line diagram processing workflow.
[0015] Furthermore, the construction of a spatial index for each text tag based on each text tag specifically involves: Get the minimum bounding rectangle of the bounding rectangle of each text label; The smallest bounding rectangle of each text tag is bound to the corresponding text content and text identifier to obtain each text index unit; Based on the preset dynamic insertion algorithm, all text index units are inserted into the preset R-tree in sequence. Starting from the root node of the R-tree, the child node with the smallest expansion value of the minimum boundary rectangle area after insertion is selected as the insertion node. If the number of text index units of the inserted node exceeds the preset capacity, a secondary splitting algorithm is performed on the inserted node to allocate the text index units of the node that exceeds the preset capacity to two new child nodes. Update the parent node to point to the two new child nodes after the split, and repeat the above insertion and splitting process until all text index units are inserted into the R tree, thus obtaining the spatial index of each text label.
[0016] This application precisely defines the spatial location range of text labels by obtaining the minimum bounding rectangle of the bounding rectangle, providing an accurate location benchmark for subsequent spatial association and avoiding matching errors caused by ambiguous spatial location descriptions. Then, the minimum bounding rectangle is bound to the text content and text identifier to form text index units, ensuring that each index unit simultaneously contains "spatial location + text information + unique identifier," guaranteeing a strong association between text information and spatial location, and solving the problem of "information and location separation" in traditional text management. Subsequently, the index units are inserted into an R-tree (a classic spatial index structure) based on a dynamic insertion algorithm, and the R-tree structure is optimized by "selecting the child node with the smallest area expansion value after insertion," significantly improving subsequent spatial queries (such as...). The R-tree spatial index improves the efficiency of nearest neighbor queries, avoiding the inefficiency of linear retrieval. Simultaneously, when the inserted node exceeds the capacity, a secondary splitting algorithm is executed, ensuring the balance of the R-tree structure and further maintaining high query efficiency, preventing performance degradation due to tree structure imbalance. The final constructed R-tree spatial index can quickly respond to the need to "find the text label closest to the target electrical symbol," providing efficient and reliable technical support for the subsequent accurate binding of the first electrical symbol to the device name / number. This significantly improves the efficiency of text-symbol matching (greatly reducing time compared to linear retrieval) and ensures matching accuracy (based on precise spatial location), laying a crucial foundation for improving the overall efficiency and accuracy of structured analysis of power line diagrams.
[0017] Furthermore, the step of binding the device name or number corresponding to each first electrical symbol through the spatial index to obtain each second electrical symbol specifically involves: Traverse each first electrical symbol and calculate the coordinates of the geometric center point of each first electrical symbol; Using the coordinates of the geometric center point as the query point, initiate a nearest neighbor query to the spatial index, filter out the text label that is closest to the current first electrical symbol, and extract the device name or number corresponding to the closest text label; The device name or number is assigned to the device identifier corresponding to the first electrical symbol to obtain each second electrical symbol.
[0018] This application constructs a spatial index for text labels and uses this index to bind the equipment name or number of the first electrical symbol, enabling efficient and accurate association between electrical symbols and their corresponding text labels. Specifically, the geometric center coordinates of each first electrical symbol are first calculated. Then, using these coordinates as query points, the nearest text label is quickly found through a spatial index (such as an R-tree). This method avoids the inefficiency of traditional global searches and significantly improves the speed and accuracy of text-to-symbol association. Finally, the equipment name or number from the text label is assigned to the corresponding electrical symbol to generate a second electrical symbol, thus providing accurate identification information for subsequent equipment location and labeling, improving the automation level and efficiency of the entire power line diagram processing workflow.
[0019] Furthermore, the step of performing a hierarchical constraint graph traversal on the drawing data model based on the hierarchical path object to obtain a candidate device set specifically involves: Based on the hierarchical path object, obtain a list of hierarchical keywords sorted by subordinate relationship; Based on the first keyword in the hierarchical keyword list, search for all matching first power equipment nodes in the drawing data model to form an initial candidate node set; Based on the keywords in the hierarchical keyword list except the first one, traverse each node in the initial candidate node set, obtain all directly connected neighbor nodes of each node in the drawing data model, and filter the second power equipment node among the neighbor nodes whose equipment name or type matches the keywords except the first one. Based on the second power equipment node, the current candidate node set is obtained, and this process continues until all keywords in the hierarchical keyword list have been traversed, resulting in the final candidate node set.
[0020] This application achieves efficient and accurate location of target devices in a drawing data model through hierarchical constraint graph traversal based on hierarchical path objects. Specifically, it first extracts a list of hierarchical keywords sorted by dependency relationships from the hierarchical path objects. Then, using the first keyword, it searches for all matching first power equipment nodes in the drawing data model, forming an initial candidate node set. Next, starting with the second keyword, iterates through each keyword: traversing each node in the current candidate node set, obtaining all its directly connected neighbor nodes, and filtering out second power equipment nodes whose device names or types match the current keyword, updating the candidate node set. This process is repeated until all keywords are processed, and the final candidate node set is the candidate set for the target device. This method, through hierarchical filtering and utilizing hierarchical relationships to constrain the search range, effectively reduces the search space, improves the accuracy and efficiency of device location, avoids location ambiguities caused by duplicate device names or numbers, and significantly improves the reliability and automation level of power line diagram device location.
[0021] Furthermore, the step of performing spatial proximity verification on the candidate device set to determine the target device specifically involves: Extract each power equipment node and its direct parent node from the candidate equipment set to form multiple node pairs; Based on the preset Euclidean distance formula, the spatial distance of each pair of nodes is calculated; Compare the spatial distances of all node pairs, select the device node with the smallest spatial distance, and determine the device node with the smallest spatial distance as the target device.
[0022] This application improves the accuracy of device location by performing spatial proximity verification on the candidate device set. Specifically, it first extracts each device node in the candidate device set and its direct parent node, forming multiple node pairs. Then, it calculates the spatial distance between each pair of nodes using a preset Euclidean distance formula. Since devices that are functionally at the same level or closely related in a power line diagram are usually close to each other in the diagram layout, the device node with the smallest spatial distance is selected as the target device by comparing the spatial distances of all node pairs. This verification method fully utilizes the spatial layout patterns of devices on the diagram, effectively solving the positioning ambiguity caused by similar device names or non-standard drawing, further improving the accuracy and reliability of device location, and ensuring the accuracy and safety of power line diagram annotations.
[0023] Furthermore, the step of marking the target equipment on the power line diagram based on the work order text data specifically involves: Pre-set measure information is extracted from the work order text data to determine the measure category to which the target equipment belongs. The measure category includes the circuit breaker that should be opened, the grounding wire that should be installed, the area that should be blocked, and the location where the sign should be hung. Based on a pre-defined annotation style rule library, the corresponding annotation style parameters are matched according to the measure category of the target device; Extract spatial geometric data of the target device from the drawing data model; the spatial geometric data includes the coordinates of the target device's circumscribed rectangle and the device's path data. The target device's identifier, annotation style parameters, and extracted spatial geometric data are encapsulated into structured annotation instructions; the annotation instructions include the target device ID, annotation action, style attributes, and geometric coordinates; According to the structured annotation instructions, the target device is annotated on the power line diagram.
[0024] This application extracts pre-defined measure information from work order text data to determine the measure category of the target equipment, such as the circuit breaker to be opened or the grounding wire to be installed. Then, based on these measure categories, it matches corresponding annotation style parameters, such as color and shape, from a pre-defined annotation style rule library. Next, it extracts the spatial geometric data of the target equipment from the drawing data model, including the coordinates of the circumscribed rectangle and the equipment path data. This information is encapsulated into structured annotation instructions, containing detailed information such as the target equipment ID, annotation action, style attributes, and geometric coordinates. Finally, based on these annotation instructions, the target equipment is accurately annotated on the power line diagram. This annotation method not only ensures standardization and consistency but also achieves automated annotation through structured instructions, effectively avoiding errors and omissions in manual annotation. It provides power operation and maintenance personnel with clear and accurate visual guidance, greatly reducing safety risks in power operations and improving work efficiency.
[0025] Secondly, this application provides a device for marking equipment on a single-line power diagram, the device comprising: The acquisition module is used to acquire work order text data and power line diagram files; The first parsing module is used to input the work order text data into a preset work order parsing model to output a hierarchical path object. The work order parsing model is constructed based on historical work order data and preset power equipment hierarchical subordination rules. The hierarchical path object includes power equipment entities and hierarchical subordination relationships between entities. The second parsing module is used to parse the power line diagram file to obtain a drawing data model; wherein, the drawing data model includes each electrical equipment node, the connection relationship between each equipment, and the spatial geometric information of each equipment; The verification module is used to perform hierarchical constraint diagram traversal on the drawing data model based on the hierarchical path object to obtain a candidate device set; and to perform spatial proximity verification on the candidate device set to determine the target device. The annotation module is used to annotate the target equipment on the power line diagram based on the work order text data.
[0026] The equipment labeling device for single-line power diagrams in this application achieves fully automated processing from data acquisition to equipment labeling through modular design. The acquisition module ensures accurate input of work order text data and single-line power diagram files. The first parsing module utilizes a work order parsing model built based on historical data and preset rules to output hierarchical path objects containing power equipment entities and their hierarchical relationships, providing precise semantic guidance for equipment location. The second parsing module parses the single-line power diagram file into a drawing data model containing electrical equipment nodes, connection relationships, and spatial geometric information, providing a comprehensive graphical data foundation for equipment location. The verification module combines the hierarchical path objects and the drawing data model, accurately determining the target equipment through hierarchical constraint graph traversal and spatial proximity verification, effectively solving the location ambiguity problem caused by duplicate equipment names or numbers. The labeling module performs standardized labeling of the target equipment based on the work order text data, ensuring the accuracy and consistency of the labeling. This device not only improves the efficiency and accuracy of equipment labeling on single-line power diagrams but also reduces errors and safety risks caused by manual operation, significantly enhancing the automation level and safety of power operation and maintenance work. Attached Figure Description
[0027] Figure 1 : A schematic flowchart of an embodiment of the equipment labeling method for a single-line power diagram provided in this application; Figure 2 : A schematic flowchart of one embodiment of the single-line diagram analysis provided in this application; Figure 3 This is a schematic flowchart illustrating one embodiment of power line annotation provided in this application. Figure 4 This is a schematic flowchart of an embodiment of the equipment labeling method for a single-line power diagram provided in this application. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] Example 1 Please refer to Figure 1 To address the problem that existing technologies cannot accurately and efficiently label power systems, this invention provides a method for labeling equipment on a single-line power diagram. The method includes steps S01-S05.
[0030] S01: Obtain work order text data and power line diagram file.
[0031] In a preferred embodiment of this invention, the acquisition of work order text data and power line diagram file specifically includes: When carrying out equipment labeling work on power line diagrams, two types of core basic data must first be obtained: work order text data and power line diagram files. The work order text data is an instruction document for on-site operation and maintenance work, containing key information such as a description of the work task, information on the power equipment to be operated, and safety requirements. For example, the document might record information such as "Perform maintenance work on the 312 line circuit breaker of the 35kV I section busbar of XX substation, and open the disconnect switches on both sides of the circuit breaker." This text data is the core basis for subsequently determining the labeling targets and requirements. The power line diagram file is a graphical document reflecting the connection relationships and layout of power system equipment. This file presents the physical distribution and electrical connection logic of various power equipment such as substations, busbars, lines, circuit breakers, and disconnect switches in the form of standardized electrical symbols, connecting lines, and text labels. For example, the diagram uses specific symbols to represent circuit breakers, lines to represent cable connections between equipment, and text labels to indicate the name or number of the equipment. This type of graphical data is the visual carrier for subsequent equipment location and labeling. In practical applications, by connecting to the power system's operation and maintenance management platform, the text data of the work order corresponding to the work to be done (such as documents stored in Word, PDF, etc.) can be directly retrieved from the platform's database. At the same time, the power system's drawing management system can be used to obtain the power single-line diagram file (such as a file stored in CAD, SVG, etc. vector graphics format) that matches the scope of the work. This ensures that both types of data are completely consistent with the objects and scope of the current operation and maintenance work, providing accurate and complete basic support for subsequent data analysis and equipment labeling.
[0032] S02: Input the work order text data into a preset work order parsing model to output a hierarchical path object. The work order parsing model is constructed based on historical work order data and preset power equipment hierarchical subordination rules. The hierarchical path object includes power equipment entities and hierarchical subordination relationships between entities.
[0033] In a preferred embodiment of this invention, the step of inputting the work order text data into a preset work order parsing model to output a hierarchical path object specifically involves: After acquiring the work order text data, it is input into a pre-built work order parsing model. This model then processes the data and outputs a hierarchical path object. The construction of this work order parsing model relies on two core elements: first, historical work order data accumulated by the power system. By learning from a large amount of historical data, the model can grasp the patterns in the expression of equipment information in the work order text, common terminology, and the equipment association characteristics corresponding to the work scenarios; second, pre-defined hierarchical rules for power equipment. These rules are formulated based on the power system's equipment classification standards and actual operational architecture. For example, they clearly define the hierarchical relationship of "substation → busbar → line → circuit breaker → disconnector" or the hierarchical logic of "distribution station → transformer → outgoing line cabinet → switch," ensuring that the model can accurately identify the hierarchical relationships between equipment. When processing the input work order text data, the work order parsing model first performs word segmentation and semantic recognition on the text content. From expressions such as "perform maintenance on the 312 line circuit breaker of the 35kV I section busbar of XX substation", it extracts power equipment entities such as "XX substation", "35kV I section busbar", "312 line", and "circuit breaker". Then, based on the preset power equipment hierarchical subordinate rules, it performs hierarchical relationship reasoning on the extracted equipment entities to determine the subordinate order between each entity. For example, "312 line" belongs to "35kV I section busbar", and "circuit breaker" belongs to "312 line". Finally, these equipment entities, the equipment types of each entity (such as substation, busbar, line, circuit breaker), and the reasoned hierarchical paths are integrated into a hierarchical path object in a structured form. This object can clearly reflect a complete equipment hierarchical chain such as "XX substation → 35kV I section busbar → 312 line → circuit breaker", providing a structured basis for locating target equipment in the power single-line diagram. More specifically, the work ticket parsing model uses a large language model (such as DeepSeekV3 or Qwen3_instruct model) to output structured JSON in the form of prompt words for the input unstructured natural language instructions.
[0034] { "operation": { "type":"maintenance", "target_device": { "device_number":"N", "device_type":"switch", "manufacturer":"XX Electrical Company", "voltage_level":"10kV", "station":"XX station", "line":"YYY line", "substation":"ZZ station", "bay":"", "full_path":"XX station 10kV YYY line 10kV ZZ station N switch", "hierarchy_keywords": ["XX Station","YYY Line","ZZ Station","N Switch"], "location_description":"XX station 10kV YYY line 10kV ZZ station N switch" } } } This model employs an end-to-end intelligent parsing architecture, directly inputting the original work order text into a pre-trained large language model. Through carefully designed power industry-specific prompts, the model is guided to identify key electrical equipment entities within the text, such as "substation," "line," "distribution station," "switch," and "disconnector," as well as their specific names or numbers, such as "XX substation," "YY line," "ZZ station," and "Nth switch." Most importantly, this module leverages the powerful semantic understanding and reasoning capabilities of the large language model to directly parse out the hierarchical and spatial logical relationships between these entities, outputting a "hierarchical path object" in structured JSON format. Simultaneously, this module is equipped with a backup parsing mechanism based on regular expressions, enabling degraded parsing through preset power industry terminology patterns and rule bases when the LLM service is unavailable.
[0035] S03: Parse the power line diagram file to obtain the drawing data model; wherein, the drawing data model includes each electrical equipment node, the connection relationship between each equipment, and the spatial geometric information of each equipment.
[0036] In a preferred embodiment of this invention, the step of parsing the power line diagram file to obtain the drawing data model specifically involves: Parsing the acquired single-line power diagram file involves three core stages: primitive extraction and classification, spatial association based on R-trees, and topological relationship reconstruction. This process transforms the visualized vector file into a machine-readable and computable graph data structure, ultimately forming a graph data model. The specific process is as follows: like Figure 2As shown in the flowchart above, this embodiment generates a drawing data model by sequentially performing three core steps when parsing a single-line power diagram file (taking SVG format as an example, which contains a DOM tree structure): "Element Extraction and Classification," "Spatial Association Based on R-tree," and "Topology Relationship Reconstruction and Graph Structure Generation." Specifically, the "Element Extraction and Classification" step completes basic element parsing, electrical symbol recognition, and text label extraction; the "Spatial Association Based on R-tree" step achieves precise binding between electrical symbols and text labels by constructing a text R-tree index and performing nearest neighbor queries; and the "Topology Relationship Reconstruction and Graph Structure Generation" step completes equipment node generation, equipment R-tree index construction, and edge generation based on the R-tree, ultimately outputting a drawing data model containing equipment nodes, connection relationships, and spatial geometric information, providing structured data support for subsequent target equipment location.
[0037] Specifically, (1) primitive extraction and classification stage: Upon receiving the power line diagram file, the first step is to perform low-level parsing, loading all independent vector primitives into the processing memory. This includes: Basic primitive parsing: Traverse each node of a single-line graph file (such as the DOM tree of an SVG format file), extract basic primitives such as paths, rectangles, circles, polylines, and text, and record the complete geometric attributes (such as coordinates, dimensions, and path data) and style attributes (such as color and line width) of each primitive. Electrical symbol recognition (first electrical symbol generation): Based on a pre-configured power standard symbol library (including the geometric features of standard equipment such as circuit breakers, disconnect switches, and transformers), template matching or geometric feature analysis algorithms are used to identify electrical symbols. Template matching: The combined graphic consisting of multiple basic graphic elements is compared with a symbol library template to calculate shape similarity. If the similarity exceeds a preset threshold, it is determined to be the corresponding electrical symbol (e.g., identifying the graphic element combination as a "circuit breaker" symbol); if not... <symbol>and <use>The SVG image of the tag can be read directly. <use>The symbol ID referenced by the label is used for identification; Geometric feature analysis: For complex symbols, classification is completed by analyzing key features such as the number of corner points, outline description, and aspect ratio; The electrical symbol obtained after identification is the first electrical symbol; Connection line identification: Filter the path or line elements in the basic graphic elements that are thin black solid lines and have the shape of straight lines or polylines, and identify them as electrical connection lines between devices; Text label extraction: Extract all text-type primitives, record the content of each text (such as "K601" "312 line") and the coordinates of the center point of the circumscribed rectangle, and form a text label.
[0038] (2) Spatial association stage based on R-tree index (second electrical symbol generation): This stage achieves precise binding between the first electrical symbol and the text label by constructing a spatial index, specifically including: Text R-tree index construction: Index cell generation: Obtain the minimum bounding rectangle (MBR) of the bounding rectangle of each text label (defined by the coordinates of the lower left corner (min_x, min_y) and the upper right corner (max_x, max_y)), and bind the MBR with the text content and the unique text identifier to form a text index cell; Dynamic insertion and splitting: Based on the dynamic insertion algorithm, all text index units are sequentially inserted into the preset R-tree: Starting from the root node of the R-tree, the child node with the smallest MBR area expansion value after insertion is selected as the insertion node; if the number of index units in the insertion node exceeds the preset capacity, a secondary splitting algorithm is executed to allocate the excess index units to two new child nodes and update the parent node's pointer; the insertion and splitting process is repeated until all index units are inserted, forming a text R-tree index; Nearest neighbor query matching: Query initialization: Traverse each first electrical symbol and calculate its geometric center point coordinates P_device as the query point; initialize the priority queue (sorted by the minimum distance from node MBR to P_device) and the current nearest distance d_best (initially infinity), and add the root node of the R-tree to the queue; Branch and Bound Traversal: Loop through the queue to retrieve the nearest node N. If the distance of N is greater than d_best, prune the branch. If N is a leaf node, calculate the actual distance between its contained text object MBR and P_device, and update d_best and the nearest neighbor text. If N is an intermediate node, add its child nodes and corresponding distances to the queue. When the queue is empty, output the nearest neighbor text label. Symbol-text binding (second electrical symbol generation): The device name or number corresponding to the nearest neighbor text label obtained from the query is assigned to the device identifier of the first electrical symbol to obtain the second electrical symbol containing device information.
[0039] (3) Topology Reconstruction Stage (Drawing Data Model Generation) This stage, based on the second electrical symbol and connecting lines, constructs a drawing data model containing electrical topology and spatial information, specifically including: Device node and device R-tree construction: Initialize each second electrical symbol as a power device node in a graph data structure (such as a NetworkX graph), and at the same time build a device R-tree index based on the device's bounding rectangle (the construction logic is consistent with the text R-tree, the index object is the device MBR, and it is associated with the complete information of the device node). Connector - Node Association (Edge Generation): Endpoint query: Traverse each connection line, obtain the coordinates of its two endpoints P_endpoint, and initiate a contain query to the device R tree: Starting from the root node, recursively check whether the node MBR contains P_endpoint, prune branches that do not contain it, until the leaf node, and return the device node that contains P_endpoint. Edge construction: If the query for the starting point of the connecting line returns node A and the ending point returns node B (A≠B), then an edge connecting A and B is created in the graph, representing that there is a direct electrical connection between the two. Drawing data model output: The final drawing data model includes power equipment nodes and edges, where: Device node attributes include: unique device identifier (Device_ID), device name (Device_Name), device type (Device_Type), geometric data (Geometric_Data, including path data, bounding rectangle, and center coordinates), raw text content and coordinates, layer information (Layer_Info), voltage level (Voltage_Level), and list of connected nodes (Connected_Nodes), etc. Edge attributes include source node ID (Source_Node_ID), target node ID (Target_Node_ID), connection type (Connection_Type, such as "electrical connection"), and geometric path (Geometric_Path), providing structured data support for subsequent target device localization.
[0040] S04: Based on the hierarchical path object, perform hierarchical constraint graph traversal on the drawing data model to obtain a candidate device set; perform spatial proximity verification on the candidate device set to determine the target device.
[0041] In a preferred embodiment of this example, the step of performing a hierarchical constraint graph traversal on the drawing data model based on the hierarchical path object to obtain a candidate device set, and then performing a spatial proximity check on the candidate device set to determine the target device, specifically involves: like Figure 3 As shown, in this embodiment, when determining the target device, the hierarchical path object and drawing data model are used as inputs. First, the "hierarchical constraint traversal" step is used to determine the traversal starting point, iterative neighborhood filtering, and constraint propagation to obtain a set of candidate devices. Then, the "spatial proximity verification" step is used to perform parent-child node pair positioning, K-nearest neighbor query, and double verification to determine the unique target device from the set of candidate devices. Finally, based on the target device, "precise labeling of the target device" is performed to complete information extraction, symbol rendering, and data output, generating modified drawing data with labeling information, thus achieving accurate device labeling of the power line diagram.
[0042] Specifically, after obtaining the hierarchical path object and the drawing data model, the localization process is performed in two steps: "traversing the topology constraint diagram to filter the candidate set" and "verifying the spatial proximity to determine the unique target." The specific process is as follows: Step 1: Topology constraint graph traversal based on hierarchical paths (generation of candidate device set) Extract a list of hierarchical keywords sorted by device affiliation from the hierarchical path object (e.g., ["XX Station", "Line 312", "K601 Switch"]), and transform the hierarchical description of the work order into a targeted search on the drawing data model, specifically including: Initialization and determination of the traversal starting point: The input consists of a keyword list `hierarchy_keywords = [K_1, K_2, ..., K_n]` (e.g., ["XX Station", "Line 312", "K601 Switch"]) and a complete drawing data model `G`. The algorithm extracts the first keyword `K_1` ("XX Station"). It then iterates through all nodes in `G`, performing string matching and type matching on the `Device_Name` and `Device_Type` attributes of each node. Finally, the algorithm outputs an initial candidate set `S_0` containing all device nodes that match `K_1`. For example, all substation or plant type nodes named "XX Station" in the diagram. Simultaneously, a path record is created for each candidate node, initially containing only the node itself.
[0043] Iterative neighborhood filtering and path extension: The algorithm enters a loop, starting from the second keyword K_2 ("Line 312") and iterating to the last keyword K_n. When processing the i-th keyword K_i, the search scope of the algorithm is no longer the entire graph, but is strictly limited to the direct neighbors of all nodes in the candidate set S_{i-1} of the previous stage.
[0044] Specific steps: a. Create a new empty candidate set S_i.
[0045] b. Iterate through each candidate node c in S_{i-1}.
[0046] c. Obtain all direct neighbor nodes N(c) of c in G.
[0047] d. Iterate through each neighbor node n in N(c) and check whether its attributes match the keyword K_i.
[0048] e. If a neighbor node n is successfully matched, it means that a valid hierarchical path has been found. At this time, the algorithm adds n to the new candidate set S_i and updates its path record by appending n to the path of its parent node c (e.g., the path record changes from (c) to (c, n)).
[0049] This process is repeated continuously: S_0 -> S_1 -> S_2 -> ..., and the candidate set is continuously narrowed and refined as the hierarchy deepens. Each step must satisfy the connectivity of the electrical topology, fundamentally eliminating devices that, although matching in name, are not electrically connected.
[0050] Final candidate set generation: After processing the last keyword K_n in the loop, the final candidate set S_final is obtained. Ideally, S_final should contain only one unique device node. If S_final is empty, it means that there is no device path in the graph that completely matches the work ticket description; if it contains multiple nodes, the next stage of verification is initiated.
[0051] Step 2: Secondary verification and decision based on spatial proximity (unique target device determination) In rare cases (such as improper drawing or ambiguous naming), multiple candidate devices may exist in S_final. This stage utilizes the spatial relationships of the devices on the physical plane of the drawing to make the final decision, reflecting the core idea of this application: combining "topology" and "space". Extraction of parent-child node pairs: The input is a set of candidate nodes S_final and their respective complete path records. For each candidate node c_final in S_final, find its direct parent node c_parent from its path record. For example, for the path (..., c_parent, c_final), extract the node pair (c_parent, c_final).
[0052] Spatial distance calculation: For each extracted (c_parent, c_final) node pair, obtain their geometric center coordinates c_parent.Center_Coordinate and c_final.Center_Coordinate from the graph data model. Calculate the straight-line distance d = sqrt((x_parent - x_final)² + (y_parent - y_final)²) between these two center points on the two-dimensional plane using the Euclidean distance formula.
[0053] Target ruling: Compare the spatial distances of all node pairs, select the candidate node with the smallest distance, and determine it as the final target device.
[0054] S05: Mark the target equipment on the power line diagram according to the work order text data.
[0055] In a preferred embodiment of this invention, the step of marking the target equipment on the power line diagram based on the work order text data specifically involves: After identifying the target device, executable annotation instructions are generated through "annotation information integration → geometric data extraction → instruction encapsulation". Then, single-line icon annotation is completed based on the instructions. The specific process is as follows: Annotation information integration: By tracing back the work order text data, the safety measure category of the target equipment (such as "circuit breaker to be opened", "grounding wire to be installed", "signage to be hung") is extracted, and the corresponding annotation style parameters are matched according to the pre-established annotation style rule library. For example, "circuit breaker to be opened" is matched with "red highlighted border, stroke-width=5px", and "grounding wire to be installed" is matched with "yellow dashed border + grounding symbol overlay", ensuring that the annotation style corresponds intuitively with the safety requirements.
[0056] Encapsulation of geometric data extraction and annotation instructions: Extract complete geometric description information (such as SVG format path data, bounding rectangle coordinates and dimensions, element ID, etc.) from the target device node attributes of the drawing data model; based on the extracted geometric data and matching style parameters, generate structured annotation instruction objects. These instruction objects must clearly define the "operation object," "annotation action," and "style attributes," for example: Style modification instructions: {"target_element_id":"path123","action":"modify_style","style": {"stroke":"red","stroke-width":"5px"}}; Overlay element directive: {"action":"add_overlay","type":"text","position": {"x":100,"y": 200},"content":"should be pulled apart"}.
[0057] Annotation execution and visualization: All annotation instructions are compiled into an instruction list. Annotation operations are performed at the corresponding positions on the power line diagram based on the instructions. For example, the border style of the target device symbol is modified according to the "modify_style" instruction, and text or symbols are added at specified coordinates according to the "add_overlay" instruction. After annotation is completed, it is ensured that the annotation elements are clearly associated with the target device and do not obscure other key equipment information. Finally, a visual power line diagram with safety measure annotations is formed, providing intuitive operation guidance for maintenance personnel.
[0058] In summary, this embodiment firstly uses a work order parsing model built based on historical work order data and power equipment hierarchical subordination rules to automatically convert work order text data into hierarchical path objects containing equipment entities and hierarchical subordination relationships. This eliminates the need for manual extraction and sorting of equipment hierarchies (such as the subordination relationship of "substation → busbar → line → switch"), reducing efficiency losses caused by manual intervention and avoiding confusion errors when manually identifying hierarchies, thus significantly improving the efficiency and accuracy of work order parsing. Secondly, by parsing the power single-line diagram file to generate a drawing data model containing electrical equipment nodes, connection relationships, and spatial geometric information, the unstructured single-line diagram elements are transformed into machine-recognizable structured data, providing accurate data support for subsequent equipment location and solving the problem of traditional manual searching for equipment in dense elements. This invention addresses the issues of easy omission and error in equipment labeling. Furthermore, by traversing the hierarchical constraint graph based on hierarchical path objects, a preliminary set of candidate devices meeting hierarchical requirements can be selected. Spatial proximity verification further confirms the target device. This dual constraint mechanism effectively avoids the problem of mislocating multiple similar devices caused by single keyword matching, ensuring the accuracy and reliability of target device positioning. Finally, based on the target device and work order text data, annotation instructions are automatically generated and annotation is completed, achieving full automation from data parsing and device positioning to annotation. This completely changes the traditional low-efficiency and high-error status quo of manual annotation, significantly improving the overall efficiency of power line diagram device annotation while reducing the risk of power operation and maintenance misoperation caused by annotation errors. This application effectively solves the problem of the inability to accurately and efficiently annotate power systems in existing technologies.
[0059] Example 2 Please refer to Figure 4 This is a device labeling device for a single-line power diagram provided in this application embodiment.
[0060] In this embodiment, the device labeling device for the power line diagram includes a first acquisition module 10, a first parsing module 20, a second parsing module 30, a verification module 40, and a labeling module 50.
[0061] Module 10 is used to acquire work order text data and power line diagram files; The first parsing module 20 is used to input the work order text data into a preset work order parsing model to output a hierarchical path object. The work order parsing model is constructed based on historical work order data and preset power equipment hierarchical subordination rules. The hierarchical path object includes power equipment entities and hierarchical subordination relationships between entities. The second parsing module 30 is used to parse the power line diagram file to obtain a drawing data model; wherein, the drawing data model includes each electrical equipment node, the connection relationship between each equipment, and the spatial geometric information of each equipment; Verification module 40 is used to perform hierarchical constraint graph traversal on the drawing data model based on the hierarchical path object to obtain a candidate device set; and to perform spatial proximity verification on the candidate device set to determine the target device. The annotation module 50 is used to annotate the target equipment on the power line diagram based on the work order text data.
[0062] For ease of description and brevity, the embodiments of the device of the present invention include all the implementation methods in the above-described embodiments of the device annotation method for power single-line diagrams, and will not be repeated here.
[0063] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.< / use> < / use> < / symbol>
Claims
1. A method for labeling equipment on a single-line power diagram, characterized in that, include: Obtain the work order text data and the power line diagram file; The work order text data is input into a preset work order parsing model to output a hierarchical path object. The work order parsing model is constructed based on historical work order data and preset power equipment hierarchical subordination rules. The hierarchical path object includes power equipment entities and hierarchical subordination relationships between entities. The power line diagram file is parsed to obtain a drawing data model; wherein, the drawing data model includes each electrical equipment node, the connection relationship between each equipment, and the spatial geometric information of each equipment; Based on the hierarchical path object, a hierarchical constraint graph traversal is performed on the drawing data model to obtain a candidate device set; a spatial proximity check is performed on the candidate device set to determine the target device; Based on the work order text data, the target equipment is marked on the power line diagram.
2. The equipment labeling method for a single-line power diagram according to claim 1, characterized in that, The step of inputting the work order text data into a preset work order parsing model to output a hierarchical path object specifically involves: The acquired work order text data is input into a preset work order parsing model, so that the work order parsing model can perform word segmentation and semantic recognition on the work order text data, extract each power equipment entity, and perform hierarchical relationship reasoning on each extracted equipment entity according to the preset power equipment hierarchical subordination rules to determine the hierarchical path of each power equipment entity. The names, equipment types, and hierarchical paths of each power equipment entity are encapsulated in a structured JSON format to generate a hierarchical path object; wherein, the power equipment entities include substations, lines, circuit breakers, disconnect switches, and their corresponding names or numbers.
3. The equipment labeling method for a single-line power diagram according to claim 1, characterized in that, The process of parsing the single-line power diagram file to obtain the drawing data model is as follows: The power line diagram file is processed by extracting and classifying graphic elements to obtain each first electrical symbol, each connecting line, and each text label; Based on each text tag, construct a spatial index corresponding to each text tag; By using the spatial index, the device name or number corresponding to each first electrical symbol is bound to obtain each second electrical symbol; Based on each second electrical symbol and each connecting line, the electrical topology relationship between each power device is reconstructed to obtain the drawing data model; The drawing data model includes each power equipment node, the connection relationship between each power equipment, and the spatial geometric information of each power equipment.
4. The equipment labeling method for a single-line power diagram according to claim 3, characterized in that, The process of extracting and classifying graphic elements from the single-line power diagram file yields each first electrical symbol, each connecting line, and each text label, specifically as follows: Traverse the vector primitive nodes of the power line diagram file and extract the paths, rectangles, circles, polylines, and text of the vector primitive nodes as basic primitives; Based on a pre-set power standard symbol library, and combined with a template matching algorithm, the basic graphic elements are compared with the standard electrical symbols in the power standard symbol library to identify the first electrical symbol corresponding to the basic graphic elements. Filter the basic graphic elements. The first graphic element with the style of a thin black solid line and the shape of a straight line or a polyline is selected and identified as each connecting line. Extract all text-type second primitives from the basic primitives, record the text content of each second primitive and the coordinates of the center point of the text's bounding rectangle, and use the text content and center point coordinates as each text label.
5. The equipment labeling method for a single-line power diagram according to claim 3, characterized in that, The construction of a spatial index for each text tag based on each text tag specifically involves: Get the minimum bounding rectangle of the bounding rectangle of each text label; The smallest bounding rectangle of each text tag is bound to the corresponding text content and text identifier to obtain each text index unit; Based on the preset dynamic insertion algorithm, all text index units are inserted into the preset R-tree in sequence. Starting from the root node of the R-tree, the child node with the smallest expansion value of the minimum boundary rectangle area after insertion is selected as the insertion node. If the number of text index units of the inserted node exceeds the preset capacity, a secondary splitting algorithm is performed on the inserted node to allocate the text index units of the node that exceeds the preset capacity to two new child nodes. Update the parent node to point to the two new child nodes after the split, and repeat the above insertion and splitting process until all text index units are inserted into the R tree, thus obtaining the spatial index of each text label.
6. The equipment labeling method for a single-line power diagram according to claim 4, characterized in that, The step of binding the device name or number corresponding to each first electrical symbol through the spatial index to obtain each second electrical symbol is as follows: Traverse each first electrical symbol and calculate the coordinates of the geometric center point of each first electrical symbol; Using the coordinates of the geometric center point as the query point, initiate a nearest neighbor query to the spatial index, filter out the text label that is closest to the current first electrical symbol, and extract the device name or number corresponding to the closest text label; The device name or number is assigned to the device identifier corresponding to the first electrical symbol to obtain each second electrical symbol.
7. The equipment labeling method for a single-line power diagram according to claim 1, characterized in that, The step of performing a hierarchical constraint graph traversal on the drawing data model based on the hierarchical path object to obtain a candidate device set is as follows: Based on the hierarchical path object, obtain a list of hierarchical keywords sorted by subordinate relationship; Based on the first keyword in the hierarchical keyword list, search for all matching first power equipment nodes in the drawing data model to form an initial candidate node set; Based on the keywords in the hierarchical keyword list except the first one, traverse each node in the initial candidate node set, obtain all directly connected neighbor nodes of each node in the drawing data model, and filter the second power equipment node among the neighbor nodes whose equipment name or type matches the keywords except the first one. Based on the second power equipment node, the current candidate node set is obtained, and this process continues until all keywords in the hierarchical keyword list have been traversed, resulting in the final candidate node set.
8. The equipment labeling method for a single-line power diagram according to claim 1, characterized in that, The step of performing spatial proximity verification on the candidate device set to determine the target device specifically involves: Extract each power equipment node and its direct parent node from the candidate equipment set to form multiple node pairs; Based on the preset Euclidean distance formula, the spatial distance of each pair of nodes is calculated; Compare the spatial distances of all node pairs, select the device node with the smallest spatial distance, and determine the device node with the smallest spatial distance as the target device.
9. The equipment labeling method for a single-line power diagram according to claim 1, characterized in that, The step of marking the target equipment on the power line diagram based on the work order text data specifically involves: Pre-set measure information is extracted from the work order text data to determine the measure category to which the target equipment belongs. The measure category includes the circuit breaker that should be opened, the grounding wire that should be installed, the area that should be blocked, and the location where the sign should be hung. Based on a pre-defined annotation style rule library, the corresponding annotation style parameters are matched according to the measure category of the target device; Extract spatial geometric data of the target device from the drawing data model; the spatial geometric data includes the coordinates of the target device's circumscribed rectangle and the device's path data. The target device's identifier, annotation style parameters, and extracted spatial geometric data are encapsulated into structured annotation instructions; The annotation instruction includes the target device ID, annotation action, style attributes, and geometric coordinates; According to the structured annotation instructions, the target device is annotated on the power line diagram.
10. A device for marking equipment on a single-line power line diagram, characterized in that, include: The acquisition module is used to acquire work order text data and power line diagram files; The first parsing module is used to input the work order text data into a preset work order parsing model to output a hierarchical path object. The work order parsing model is constructed based on historical work order data and preset power equipment hierarchical subordination rules. The hierarchical path object includes power equipment entities and hierarchical subordination relationships between entities. The second parsing module is used to parse the power line diagram file to obtain a drawing data model; wherein, the drawing data model includes each electrical equipment node, the connection relationship between each equipment, and the spatial geometric information of each equipment; The verification module is used to perform hierarchical constraint diagram traversal on the drawing data model based on the hierarchical path object to obtain a candidate device set; and to perform spatial proximity verification on the candidate device set to determine the target device. The annotation module is used to annotate the target equipment on the power line diagram based on the work order text data.