A method and system for power CAD plot compliance review performed by an edge device

CN122904851APending Publication Date: 2026-10-13PINGSHAN COUNTY JINCHENG POWER CONSTR CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610831684.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-10
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0004]现有技术方案在应对复杂图纸校审场景时存在局限性

Benefits of technology

1.本发明通过在服务器端将非结构化的合规规范文本解构为结构化规则,并预先构建带有语义编码和潜在违规位向量的主空间索引树。该技术特征将自然语言文本的解析与实体关系的判定前置于服务器侧执行,使边缘设备无需在本地承担高消耗的文本处理与全局数据遍历运算,从而降低了边缘设备在图纸校审初期的计算负载。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122904851A_ABST
    Figure CN122904851A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of computer aided design, and relates to a kind of edge device executed power CAD graph spot compliance review method and system, comprising: obtaining specification text construction rule feature library;Extract the graph attribute of CAD source file, compare trigger condition and associate potential violation bit vector in space parent node, build main space index tree;Refer to constraint extension boundary frame to generate bounding box to build auxiliary index layer, package and issue edge device;Based on edge device, selected graph element label generates mask vector, and logical operation is carried out with parent node bit vector to obtain the list to be checked;Load index layer to make bounding box intersection test to obtain potential violation record;According to the actual contour of graph element, distance is calculated to construct violation object, and visual guide layer is drawn in window.This application solves the problem of high operation feedback delay and low automation of existing power graph spot compliance review method on edge device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of computer-aided design and relates to a method and system for compliance review of power CAD plots executed by edge devices. Background Technology

[0002] In the field of power engineering design, ensuring that design drawings comply with various standards and regulations is the foundation for subsequent work. Since relevant compliance specifications are mostly presented in unstructured natural language text, with complex content and interwoven logic, drawing review presents certain challenges. As the complexity of engineering projects increases, the number of rules and drawing entities requiring review also grows significantly, further increasing the workload of traditional review methods and making it more difficult to maintain consistency in review results.

[0003] Currently, the industry's methods for reviewing and verifying drawings for compliance are mainly divided into manual review and semi-automated tool verification. Manual review relies on reviewers comparing the drawings against the specification text, searching for each element in the design software, and measuring their spatial geometric relationships to determine compliance. Semi-automated verification tools, on the other hand, perform parametric checks on specified layers or the spacing of specific elements by running preset scripts or additional programs. This method relies on technicians manually converting unstructured specification text into machine-readable rule configuration instructions.

[0004] Existing technical solutions have limitations when dealing with complex drawing review scenarios. Manual review is inefficient and carries a certain risk of errors when processing large-scale drawings. Semi-automated tools lack the ability to automatically parse and structure natural language specifications, resulting in a large workload for rule configuration and instruction maintenance, and difficulty in quickly responding to frequent changes in specification clauses. In addition, the above review architectures mostly rely on backend workstations for centralized batch processing, which makes it difficult to provide low-latency real-time interactive feedback when facing edge devices with limited computing resources, resulting in high time synchronization costs between design adjustments and compliance verification. Summary of the Invention

[0005] In a first aspect, the present invention provides a method for compliance review of power CAD plots executed by an edge device, comprising the following steps: S1. Obtain the compliance specification text and perform text parsing to generate semantic triggering conditions and spatial geometric constraints. Merge the semantic triggering conditions and spatial geometric constraints to construct a global rule feature library and assign rule identifiers. S2: Read the CAD source file containing graphic data, extract the non-geometric attributes of the graphic elements and verify whether they meet the semantic triggering conditions. If there is an inclusion relationship, associate the potential violation bit vector on the spatial parent node corresponding to the graphic element to form the main spatial index tree. S3, extract the bounding boxes of primitives in the main spatial index tree, perform translation and extension on the bounding boxes with reference to spatial geometric constraints, and generate rule-affected bounding boxes; S4, aggregate the corresponding rule influence bounding boxes based on the rule identifier to build an auxiliary index layer, and package the auxiliary index layer and the main space index tree into an index data packet and transmit it to the storage medium of the edge device; S5, obtain the selected target primitive in the edge device interface, extract the entity classification label of the target primitive, determine whether the entity classification label is included in the semantic triggering condition, and generate an activity rule mask vector based on the judgment result; S6, locate the spatial parent node of the target primitive and extract the corresponding potential violation bit vector, call the processor to perform a bitwise logical AND operation between the potential violation bit vector and the active rule mask vector, and output the list of rules to be inspected; S7: Load the associated auxiliary index layer from memory according to the list of rules to be inspected, extract the bounding box affected by the rules, perform geometric intersection tests, and output potential violation records by combining the relational comparison operators in the spatial geometric constraints. S8 retrieves potential violation records, extracts the actual geometric contours of the target primitives that cause interference, calculates the actual distance, constructs a violation data object based on the calculation results, and calls the graphics rendering interface to draw a visual guide layer in the viewport of the edge device.

[0006] A further aspect of the present invention, step S1, includes the following steps: Based on a pre-defined power equipment ontology dictionary, the compliance and specification text is scanned, and a set of entity categories that serve as common constraint subjects are extracted to generate semantic triggering conditions. The regular expression module is called to match statement fragments containing entity category sets, extract relation comparison operators, quantify numerical values ​​and units of measurement, and generate spatial geometric constraints; A unique rule identifier is assigned to the merged semantic triggering conditions and spatial geometric constraints, and written into the global rule feature library.

[0007] A further aspect of the present invention, step S2, includes the following steps: The preset spatial bounding algorithm is applied to encapsulate the geometric boundaries of the primitives in the CAD source file, construct a hierarchical nested basic bounding box tree, and establish the upper bounding box that completely contains the lower bounding primitive as the corresponding spatial parent node. Non-geometric attributes within the coverage area of ​​the top node are aggregated along the basic bounding box tree and merged into a set of node attributes. Determine whether the semantic triggering condition belongs to a subset of the node's attribute set. If so, establish an intersection hit association. On the spatial nodes that establish the intersection and hit association, set the bit position corresponding to the rule in the potential violation bit vector to logic 1, and generate the main space index tree.

[0008] A further aspect of the present invention, step S3, includes the following steps: By using semantic triggering conditions to perform global traversal verification, the inspected primitives whose non-geometric attributes meet the conditions are retrieved; Access the main spatial index tree and read the bounding box coordinates of each inspected graphic element; Extract the quantized values ​​and units of measurement from the spatial geometric constraints, convert them to global drawing units to obtain the standard quantization threshold, and perform coordinate translation and expansion calculations based on the bounding box vertices and the standard quantization threshold to generate rule-affected bounding boxes.

[0009] A further aspect of the present invention, step S4, includes the following steps: Aggregate all bounding boxes affected by the same rule identifier; use a spatial indexing algorithm to build a tree structure for each group of aggregated bounding boxes, generating an auxiliary index layer; Perform binary serialization processing, concatenating and encapsulating each auxiliary index layer with the main space index tree into an index data packet; Index data packets are sent to the non-volatile memory of the edge device via a communication protocol.

[0010] A further aspect of the present invention, step S5, includes the following steps: Receive the human-machine interaction coordinate signals from the edge device, and confirm the selected graphic element as the target graphic element based on the coordinate query; Access the attribute data of the target graphic element and extract the entity classification label; Initialize a binary vector with all logic 0s. Traverse the global rule feature library. If the semantic triggering condition of a rule contains an entity classification label, set the corresponding bit position in the binary vector to logic 1 to generate an activity rule mask vector.

[0011] A further aspect of the present invention, step S6, includes the following steps: Tracing upwards along the main spatial index tree, a query bounding box is generated for the target primitive based on the preset maximum verification distance, and the lowest-level ancestor node that can completely cover the query bounding box is located as the spatial parent node. Read the potential violation bit vectors residing in the additional data of the corresponding spatial parent node; The potential violation bit vector and the activity rule mask vector are input into the processor's arithmetic logic module to perform a bitwise AND operation, resulting in a test result string; Remove invalid bits with a logical value of 0 from the test result string, extract the bit sequence number with a logical value of 1, and assemble them to generate a list of rules to be inspected.

[0012] A further aspect of the present invention, step S7, includes the following steps: Based on the sequence number in the list of rules to be inspected, load the corresponding auxiliary index layer into memory; Retrieve the rule-affected bounding box that matches the current target primitive within the loaded auxiliary index layer; The bounding box affected by the rule is input into the collision detection engine, and a spatial intersection test is performed to obtain the interference Boolean value. The operator is compared with the relationship of the corresponding rule. When the operator represents the minimum spacing requirement and the interference Boolean value is true, or when the operator represents the maximum spacing requirement and the interference Boolean value is false, the potential violation record is output.

[0013] A further aspect of the present invention, step S8, includes the following steps: Obtain potential violation records, extract the actual geometric contours of primitives, and calculate the actual Euclidean distance; The actual Euclidean distance is combined with the relationship comparison operator in the corresponding spatial geometric constraints to determine whether an actual violation has occurred. If a violation is found, the coordinates and rule identifier of the violating primitive are extracted. The corresponding specification text description is queried, and a structured violation data object is generated by combining it with the preset rendering buffer distance; Parse the non-compliant data object and call the graphics interface around the target primitive to render a visual guidance layer containing highlighted lines and prompt text.

[0014] Secondly, the present invention provides a power CAD map compliance review system executed by an edge device, comprising the following modules: The rule deconstruction and fingerprint library construction module is used to obtain compliance specification texts and perform text parsing, generate semantic triggering conditions and spatial geometric constraints, merge semantic triggering conditions and spatial geometric constraints to construct a global rule feature library, and assign rule identifiers; The semantic space index building module is used to read CAD source files containing graphic data, extract non-geometric attributes of graphic elements and verify whether they meet semantic triggering conditions. If there is an inclusion relationship, the potential violation bit vector is associated on the spatial parent node corresponding to the graphic element to form the main space index tree. The spatial influence domain projection module is used to extract the bounding boxes of primitives in the main spatial index tree, perform translation and extension on the bounding boxes with reference to spatial geometric constraints, and generate rule-influenced bounding boxes. The data structure fusion and encapsulation module is used to aggregate the corresponding rule influence bounding boxes based on rule identifiers to build an auxiliary index layer, and to package the auxiliary index layer and the main space index tree into an index data packet for transmission to the storage medium of the edge device; The target verification object capture module is used to acquire the selected target primitive in the edge device interface, extract the entity classification label of the target primitive, determine whether the entity classification label is included in the semantic triggering condition, and generate an activity rule mask vector based on the judgment result. The simplified rule index generation module is used to locate the spatial parent node of the target primitive and extract the corresponding potential violation bit vector. The processor is called to perform a bitwise logical AND operation between the potential violation bit vector and the active rule mask vector, and output the list of rules to be inspected. The geometric intersection test module is used to load the associated auxiliary index layer from memory according to the list of rules to be inspected, extract the bounding box of the rule influence, perform geometric intersection tests, and output potential violation records by combining the relationship comparison operator in the spatial geometric constraints. The violation tracing and visualization module is used to obtain potential violation records, extract the actual geometric contours of the target primitives that cause interference, calculate the actual distance, construct violation data objects based on the calculation results, and call the graphics rendering interface to draw a visualization guide layer in the viewport of the edge device.

[0015] In summary, the present invention has the following beneficial technical effects: 1. This invention deconstructs unstructured compliance specification text into structured rules on the server side and pre-constructs a main space index tree with semantic encoding and potential violation bit vectors. This technical feature places the parsing of natural language text and the determination of entity relationships on the server side, so that edge devices do not need to bear the high-consumption text processing and global data traversal operations locally, thereby reducing the computational load of edge devices in the early stage of drawing review.

[0016] 2. This invention dynamically generates an activity rule mask vector based on the attributes of selected target primitives, and performs a bitwise logical AND operation with the potential violation bit vectors in the main space index tree to output a list of rules to be inspected. This technical feature employs a bitwise vector logical operation filtering mechanism, transforming the conventional rule-by-rule traversal process into low-level logical operations, simplifying irrelevant verification branches, narrowing the actual verification scope that edge devices need to process, and helping to improve the system's response speed at the front end.

[0017] 3. This invention generates bounding boxes that influence the projection of primitives associated with rules on the server side in advance, and aggregates and encapsulates bounding boxes of the same rule into an independent auxiliary index layer. This technical feature transforms the security spacing verification on edge devices into an intersection test based on geometric bounding boxes, converting the complex real-time distance calculation into a lightweight coordinate comparison process. Simultaneously, based on the hierarchical data structure, edge devices can load the data resources of the rules to be inspected on demand, reducing the memory footprint during interactive review.

[0018] 4. After performing the geometric bounding box intersection test, this invention extracts the actual geometric contours of the graphic elements for distance verification and violation determination. It then integrates the specification text, graphic element coordinates, and distance parameters to generate a structured violation data object, and calls a graphical interface for visualization layer rendering. This technical feature transforms the underlying violation determination results into specific overlay visualization information (such as highlighted lines and numerical prompts) and presents it in the CAD in-situ view, providing operators with context-sensitive modification guidance and optimizing the human-computer interaction experience during the drawing review process. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. The drawings are used to provide a further understanding of the present invention.

[0020] Figure 1 A flowchart illustrating an embodiment of this application is disclosed.

[0021] Figure 2 Structural schematic diagrams of embodiments of this application are disclosed. Detailed Implementation

[0022] The following is in conjunction with the appendix Figures 1-2 A preferred description of the present invention is provided below.

[0023] See attached document Figure 1 This invention proposes a method for compliance review of power CAD plots executed by an edge device, comprising the following steps: S1. Obtain the compliance specification text and perform text parsing to generate semantic triggering conditions and spatial geometric constraints. Merge the semantic triggering conditions and spatial geometric constraints to construct a global rule feature library and assign rule identifiers. S2: Read the CAD source file containing graphic data, extract the non-geometric attributes of the graphic elements and verify whether they meet the semantic triggering conditions. If there is an inclusion relationship, associate the potential violation bit vector on the spatial parent node corresponding to the graphic element to form the main spatial index tree. S3, extract the bounding boxes of primitives in the main spatial index tree, perform translation and extension on the bounding boxes with reference to spatial geometric constraints, and generate rule-affected bounding boxes; S4, aggregate the corresponding rule influence bounding boxes based on the rule identifier to build an auxiliary index layer, and package the auxiliary index layer and the main space index tree into an index data packet and transmit it to the storage medium of the edge device; S5, obtain the selected target primitive in the edge device interface, extract the entity classification label of the target primitive, determine whether the entity classification label is included in the semantic triggering condition, and generate an activity rule mask vector based on the judgment result; S6, locate the spatial parent node of the target primitive and extract the corresponding potential violation bit vector, call the processor to perform a bitwise logical AND operation between the potential violation bit vector and the active rule mask vector, and output the list of rules to be inspected; S7: Load the associated auxiliary index layer from memory according to the list of rules to be inspected, extract the bounding box affected by the rules, perform geometric intersection tests, and output potential violation records by combining the relational comparison operators in the spatial geometric constraints. S8 retrieves potential violation records, extracts the actual geometric contours of the target primitives that cause interference, calculates the actual distance, constructs a violation data object based on the calculation results, and calls the graphics rendering interface to draw a visual guide layer in the viewport of the edge device.

[0024] In one embodiment of the present invention, step S1 includes the following steps: Based on a pre-defined power equipment ontology dictionary, the compliance and specification text is scanned, and a set of entity categories that serve as common constraint subjects are extracted to generate semantic triggering conditions. The regular expression module is called to match statement fragments containing entity category sets, extract relation comparison operators, quantify numerical values ​​and units of measurement, and generate spatial geometric constraints; A unique rule identifier is assigned to the merged semantic triggering conditions and spatial geometric constraints, and written into the global rule feature library.

[0025] Performed by a rule parsing server deployed on a server or cloud platform, its goal is to automatically transform unstructured compliance specification texts into machine-readable structured data. First, it reads and loads one or more compliance specification texts containing power design codes, safety standards, and local regulations in batches via a file stream interface. These texts are typically stored in PDF, DOCX, or plain text formats.

[0026] After loading, the text content is fed into the integrated natural language processing engine. The core of this engine is a named entity recognition module built on a domain knowledge graph. Based on a pre-set power equipment ontology dictionary, such as a dictionary containing terms like circuit breaker, disconnector, transformer, and grounding grid, it scans the text content, identifies, and extracts all nouns or noun phrases related to power equipment entities.

[0027] Subsequently, the sentence dependency analysis module intervenes and analyzes the relationships between these identified entities in the sentence structure. When multiple entities are determined to be the subjects of a certain constraint, the system combines the category names of these entities into a set, which constitutes the semantic triggering condition of a rule.

[0028] The regular expression-driven pattern matching module synchronously scans the same statement or adjacent context containing combinations of entity device categories. This module uses predefined patterns, such as those designed to capture comparative relationships and quantified values, to look for relational descriptors like greater than, less than, and equal to, followed by numbers and units such as meters, millimeters, and kilovolts.

[0029] Once a match is successful, the system encapsulates the extracted relational operators, quantized values, and corresponding units of measurement into a structured object, which is the spatial geometric constraint. Finally, the system pairs and merges the semantic triggering conditions generated in the preceding steps with the spatial geometric constraints to form a complete rule record.

[0030] To ensure the uniqueness and traceability of each rule in subsequent processing, the system calls a universally unique identifier generation function to assign a rule identifier to the merged rule record. All rule records generated through this process are uniformly stored in a key-value database, forming a global rule feature library, where the rule identifier serves as the primary key, and the rule record containing semantic triggering conditions and spatial geometric constraints serves as the value.

[0031] A rule parsing server is a computing device with data processing capabilities. It is typically equipped with a multi-core central processing unit with a clock speed of no less than 3.0 GHz, no less than 32 GB of random access memory, and deployed with software applications specifically designed to perform text parsing and data structuring tasks.

[0032] Semantic triggering conditions are a set of one or more strings, where each string represents a power engineering entity category. This set defines the common entity prerequisites that must be present to apply a specific rule.

[0033] The Power Equipment Body Dictionary is pre-compiled based on authoritative industry data and covers standardized terminology for various equipment, components, and facilities in power systems. Spatial geometric constraints are a data structure that includes at least relational operator fields, quantified numerical fields, and unit of measurement fields, used to precisely describe the physical spatial relationship restrictions between entities.

[0034] A global rule feature library is a centralized database or collection of data used to store all structured rules deconstructed from the original specification text. Its data format can be JSON, XML, or a database table.

[0035] A rule identifier, or GURID for short, is a 128-bit unique identifier, usually in the UUID format conforming to the RFC4122 standard, to ensure the uniqueness of each rule in a distributed system.

[0036] For example, a compliance specification text loaded by the rule parsing server contains the sentence: In the design of outdoor substations, the minimum safe clearance between the circuit breaker enclosure of 110kV voltage level and the adjacent outgoing line frame beam shall not be less than 2.5m.

[0037] First, the natural language processing engine identifies the term "circuit breaker" using its built-in power equipment ontology dictionary and combines it with the contextual attribute of 110kV voltage level to form the entity "110kV circuit breaker," while also identifying the entity "outgoing line frame beam." The sentence dependency analysis module confirms that these two entities are the common objects of the minimum safety clearance constraint, thus generating a semantic trigger condition, the content of which is the set {110kV circuit breaker, outgoing line frame beam}. Next, the pattern matching module retrieves the keyword "must not be less than" and the following numerical value 2.5 and unit m from the sentence. The module interprets "must not be less than" as a relational operator, thereby generating a spatial geometric constraint, the structured data of which is {relational operator: ≥, quantified value: 2.5, unit of measurement: m}. Finally, the system merges these two components and calls the UUID generation function to assign a rule identifier to this new rule, for example, f47ac10b-58cc-4372-a567-0e02b2c3d479. Ultimately, a complete rule fingerprint record is created and stored in the global rule feature library. By performing this process on all compliant specification texts, the construction of the global rule feature library can be completed.

[0038] In one embodiment of the present invention, step S2 includes the following steps: The preset spatial bounding algorithm is applied to encapsulate the geometric boundaries of the primitives in the CAD source file, construct a hierarchical nested basic bounding box tree, and establish the upper bounding box that completely contains the lower bounding primitive as the corresponding spatial parent node. Non-geometric attributes within the coverage area of ​​the top node are aggregated along the basic bounding box tree and merged into a set of node attributes. Determine whether the semantic triggering condition belongs to a subset of the node's attribute set. If so, establish an intersection hit association. On the spatial nodes that establish the intersection and hit association, set the bit position corresponding to the rule in the potential violation bit vector to logic 1, and generate the main space index tree.

[0039] Upon receiving the global rule feature library, the rule parsing server reads the underlying source files containing power CAD entity data and constructs the main spatial index tree. This process begins by loading the specified underlying source file, such as an AutoCAD DWG format file.

[0040] The server uses CAD file parsing libraries, such as Teigha or the open-source ezdxf library, to perform a traversal parsing of the file's internal data structure. For each discrete primitive in the file, including but not limited to line segments, arcs, polylines, and block reference entities, the parser extracts its complete geometric coordinate information and calculates a minimum axis-aligned bounding box for it. Simultaneously, for each primitive, the parser not only extracts the coordinate sequence of its precise geometric contour and attaches it to the leaf node data area for subsequent secondary verification, but also extracts its bound non-geometric attributes. This information is typically stored in the primitive's layer attributes, extended entity data (XData), or the attribute tags defined by its block, and includes engineering semantics such as equipment model, voltage level, and material.

[0041] The system adopts, for example The dynamic tree construction algorithm inserts bounding boxes aligned with the minimum axis of all primitives one by one to form a basic bounding box tree with hierarchical spatial containment relationships. The leaf nodes are directly associated with specific primitives, while the parent node contains the union of the bounding boxes of all its child nodes.

[0042] Perform a post-order traversal on the basic bounding box tree. For each node in the tree, whether it is a leaf node or a parent node, the system first aggregates all non-geometric attributes of all primitives covered within the spatial range of that node, forming a temporary set of node attributes.

[0043] This node attribute set is logically compared with the semantic triggering conditions defined by each rule in the global rule feature library. This comparison is essentially a series of subset determination operations, that is, determining whether the semantic triggering conditions of a certain rule are a subset of the current node attribute set.

[0044] If the determination result is true, it means that all entity types required to trigger a certain rule have been gathered within the spatial region represented by the node, forming an intersection hit overlap. For each successful hit, the system will attach a potential violation bit vector to the currently traversed associated node. The length of this vector is set to be equal to the total number of rules in the global rule feature library, and each bit is strictly mapped to the rule identifier from the least significant bit to the most significant bit.

[0045] When the node and identifier are When the rules of the two rules intersect and overlap, the potential violation bit vectors are related to... The corresponding number The bit is set to logic 1. After traversal, each node in the basic bounding box tree is appended with a binary code indicating the potential violation risk inside, thus completing the construction of the main space index tree.

[0046] In this step, nodes are defined. The potential violation bit vector is , its first The value of the bit is determined by the following logic:

[0047] in, For vectors The The value of each bit. It is associated with the rule identifier The semantic triggering conditions. It is at the node The set of non-geometric properties of all primitives contained within the bounding box of a non-leaf node. Its vector The generation of nodes does not depend on bitwise logical operations on child node vectors, but rather on the re-aggregation of attribute sets. Specifically, nodes... attribute set For all its child nodes The union of the attribute sets, that is: Subsequently, the same logical formula as for the leaf nodes is applied to generate the potential violation bit vector for the parent node. If The corresponding bit is then set to Otherwise set to This design ensures that when multiple different entities constrained by a rule are distributed across different child nodes, the parent node can accurately identify the semantic triggering conditions at the aggregation level.

[0048] Discrete primitives are the basic elements that make up CAD drawings, such as LINE, CIRCLE, ARC, POLYLINE, INSERT, etc. Non-geometric attributes are text or coded data attached to primitives to describe their engineering meaning, such as the device category stored in block attributes: circuit breaker, or voltage in XData: 110kV.

[0049] The basic bounding box tree is a spatial indexed data structure, which can be specifically used as follows: The tree implementation is characterized by its ability to efficiently perform spatial range queries. Nodes are organized into a tree structure through parent-child relationships, with the root node covering the entire drawing space. The potential violation bit vector is a bitmask where each bit corresponds one-to-one with a rule in the global rule feature library. It is used to pre-encode the set of rules that may be violated within a spatial region with low storage cost. When a bit in the vector is 1, it indicates that all the semantic prerequisites for triggering the corresponding rule exist within that region, indicating a potential violation; conversely, if it is 0, it indicates that the prerequisites required to trigger the rule are not met.

[0050] The main spatial index tree is the final composite data structure. It adds a potential violation bit vector to each node of the R* tree, thereby integrating semantic rule information into the geometric spatial index.

[0051] In an example scenario of this invention, the rule generated in S1 is used as an example. It is ranked 5th in the global rule feature library, and its semantic triggering condition is {110kV circuit breaker, outgoing line structure beam}. The existing underlying source files are parsed. The system constructs a basic bounding box tree. The leaf nodes of the tree... It contains only one graphic element, whose non-geometric attribute is {110kV circuit breaker}. The system is... Calculate its potential violation bit vector .because The attribute set {110kV circuit breaker} is not a subset of the semantic triggering condition {110kV circuit breaker, outgoing line frame beam}, therefore The 5th bit is set to 0. Then, in another leaf node... It contains a primitive with the attribute {outgoing structure beam}, and similarly its vector. The fifth digit is also 0. Now consider... and parent node System aggregation The attributes of all elements covered are combined to form the set {110kV circuit breaker, outgoing line frame beam}. At this point, the semantic trigger condition of system rule 5, {110kV circuit breaker, outgoing line frame beam}, is a subset of this aggregated set. Therefore, in order to... Generated potential violation bit vector In the rule set, the 5th bit is set to 1. The rule base contains a total of 256 rules. This can be represented as a 256-bit binary number, where the 5th bit from right to left is 1. By using this vector... Attach to node In the data structure, this node has completed semantic encoding and becomes part of the main space index tree.

[0052] In one embodiment of the present invention, step S3 includes the following steps: By using semantic triggering conditions to perform global traversal verification, the inspected primitives whose non-geometric attributes meet the conditions are retrieved; Access the main spatial index tree and read the bounding box coordinates of each inspected graphic element; Extract the quantized values ​​and units of measurement from the spatial geometric constraints, convert them to global drawing units to obtain the standard quantization threshold, and perform coordinate translation and expansion calculations based on the bounding box vertices and the standard quantization threshold to generate rule-affected bounding boxes.

[0053] After the main spatial index tree is built in the previous steps, the rule parsing server continues to perform the projection operation of the spatial influence domain. This process lays the data foundation for subsequent lightweight collision detection on edge devices.

[0054] The server initiates a traversal program that takes a global rule feature library as input and processes each rule defined in the library one by one. For any given rule, the program first reads its rule identifier. Using this identifier, the program extracts spatial geometric constraints from the rule definition and locates all target primitives related to that rule. The identification of target primitives is achieved by performing a global semantic query in the main spatial index tree to find all primitive instances whose non-geometric attributes contain the entity category label required by the semantic triggering condition. For each identified target primitive, the program accesses its node data in the main spatial index tree to precisely obtain the recorded boundary outline, which is defined by two sets of coordinate values ​​representing its minimum and maximum vertices in two-dimensional space.

[0055] The program parses the quantized values ​​and units of measurement from the previously extracted spatial geometric constraints. Simultaneously, it reads the underlying source file to obtain its global drawing units and calculates the conversion factor from the units of measurement to the global drawing units. The quantized values ​​are multiplied by this conversion factor to obtain the standard quantization threshold. Subsequently, the core translation and extension calculation is performed: the standard quantization threshold is subtracted from the coordinates of the smallest vertex of the bounding box, and the standard quantization threshold is added to the coordinates of its largest vertex, thereby generating a new bounding box that is more spatially expanded.

[0056] The newly generated bounding box, after being extended and solidified, is defined as the rule-affected bounding box for the current rule and the current primitive. This operation will be repeated for all identified target primitives under inspection, ultimately generating a set of one or more rule-affected bounding boxes associated with each rule that has spatial geometric constraints.

[0057] In this step, if a bounding box is defined by its lower left corner coordinates... and the coordinates of the upper right corner Defined as The quantized values ​​extracted from the spatial geometric constraints are The unit of measurement is The global drawing unit read from the underlying source file is Calculate the unit conversion factor. The standard quantization threshold is obtained by conversion. To ensure that when bounding boxes intersect within the same auxiliary layer, it is exactly equivalent to the original primitives reaching the Chebyshev distance threshold, the expansion tolerance is set to... The generated rules then affect the bounding box. Its new lower left corner coordinates and the coordinates of the upper right corner The calculation is as follows:

[0058] Through this calculation, the rule influences the bounding box to geometrically form a uniformly expanded region of the boundary frame.

[0059] The target inspected primitive refers to a specific primitive instance in the underlying source file whose non-geometric properties satisfy one of the entity categories defined in the semantic triggering conditions of a certain rule. The bounding box is the axis-aligned minimum bounding box of the primitive's geometry, which has been calculated and stored when constructing the main spatial index tree, and is usually represented as two two-dimensional coordinate points. and .

[0060] Quantitative values These are the raw values ​​extracted from spatial geometric constraints, representing the physical distance required by the rules, and converted using coefficients. Convert to standard quantization threshold Subsequently, a unified alignment with CAD coordinate units was achieved.

[0061] Rule-influenced bounding boxes are computationally generated virtual geometric regions that materialize the abstract distance constraints defined in the rules into concrete geometric bounding boxes. Their core function is to preprocess and transform the complex distance comparison calculations in subsequent steps into simpler, less computationally expensive bounding box intersection tests.

[0062] For example, consider a rule identifier. The server program first locates the rule and extracts the spatial geometric constraints {operator: ≥, value: 2.5, unit: m}, thereby determining the quantized value. It is 2.5, the unit of measurement. The value is m. Simultaneously, the program obtains the global drawing unit of the CAD file. Also given as m, the conversion factor can be calculated. The standard quantization threshold is obtained. The value is 2.5. Next, based on the semantic triggering condition of the rule {110kV circuit breaker, outgoing line frame beam}, the program retrieves all elements of type 110kV circuit breaker in the main spatial index tree. A target element, circuit breaker CB-01, is retrieved, and its stored boundary frame is obtained, with its coordinates ranging from the lower left corner. and the top right corner Definition: All units are meters. Subsequently, the server application expands tolerance. Perform a translation and extension operation, and calculate using the formula: the new bottom left corner. Coordinates are Rice, new bottom left corner Coordinates are Rice; new top right corner Coordinates are Rice, in the new top right corner Coordinates are Meters. Based on this, the system generates a rule-affected bounding box for the CB-01 circuit breaker element, bound to the aforementioned rules. The geometric extent of this bounding box is determined by points. and points Limited. This process will be performed on all 110kV circuit breaker and outgoing line structure beam elements, generating a series of rule influence bounding boxes associated with this rule.

[0063] In one embodiment of the present invention, step S4 includes the following steps: Aggregate all bounding boxes affected by the same rule identifier; use a spatial indexing algorithm to build a tree structure for each group of aggregated bounding boxes, generating an auxiliary index layer; Perform binary serialization processing, concatenating and encapsulating each auxiliary index layer with the main space index tree into an index data packet; Index data packets are sent to the non-volatile memory of the edge device via a communication protocol.

[0064] After the server generates all rule impact bounding boxes for all applicable rules, it enters the preprocessing stage, which involves encapsulating and sending out data packets. This step first performs an aggregation operation. The server program iterates through the global rule feature library, using each rule identifier as the key, and aggregates all rule impact bounding boxes associated with that identifier into a temporary data set. In this way, the originally scattered bounding boxes are grouped according to the rules they belong to.

[0065] For each group of aggregated rule-affected bounding boxes, the system invokes a pre-defined spatial indexing algorithm. This algorithm essentially constructs a lightweight spatial index structure, such as an R* tree or quadtree, independently for each group of bounding boxes. By inserting all the bounding boxes of the same rule into this new index structure, the system solidifies it into an auxiliary index layer. Each auxiliary index layer contains only the spatial influence information of a single rule and uses its corresponding rule identifier as its identity label.

[0066] The system performs a collaborative serialization and packaging process. This process serializes the main spatial index tree generated in step S2, as well as all the auxiliary index layers generated for all rules in this step, as a whole. By employing efficient binary serialization frameworks such as Google Protocol Buffers or FlatBuffers, these complex in-memory data structures are transformed into a compact, single binary file. This final generated file is the merged data packet. This data packet is organized into a structure containing a main index and auxiliary index dictionaries, facilitating fast addressing by edge devices.

[0067] Once generated, the server transmits the fused data packet completely to the non-volatile storage medium of the target edge device, such as its internal eMMC flash memory or external SD card, via standard file transfer protocols, such as TCP or HTTP, for subsequent real-time verification tasks.

[0068] In this embodiment, the spatial indexing algorithm refers to the R* tree construction algorithm, which dynamically aggregates spatially adjacent bounding boxes under the same tree node to achieve fast spatial location and query of bounding box clusters.

[0069] Cooperative serialization and packaging refers to the process of integrating multiple heterogeneous data structures and converting them into a single, transmissible, and persistent binary stream. This process ensures that the logical reference relationships between data structures are maintained after serialization and deserialization. The fused data packet is the final data product produced on the server side of this invention. It is a highly optimized binary file that encapsulates all the results of the preprocessing stage. The essence of its fusion lies in pre-compiling and solidifying abstract semantic rules and quantified geometric constraints into a unified data structure.

[0070] Continuing with the aforementioned scenario, the server program first performs an aggregation operation, finding all rule-affected bounding boxes associated with the rule identifier. This includes the bounding boxes generated for circuit breaker CB-01. ,scope: arrive In addition, a bounding box was generated for the crossbeam G-01 of the primitive outgoing structure. Based on its original extreme point arrive Extend the generation by 1.25, the new range is: arrive The system will This is treated as a collection. The system then builds an auxiliary index layer for this collection. It initializes a new R-tree and... and Inserted as a leaf node. This small R tree is labeled with an identifier and becomes a secondary index layer for this rule. This process is repeated for all other rules. Finally, the server performs a packaging process. It takes the generated S2 containing the nodes... and its vector The main space index tree, along with the secondary index layer generated for rule f47ac10b… and the secondary index layers for all other rules, are serialized using Protocol Buffers into a file named project_x_rev1.sgcfi. Finally, this project_x_rev1.sgcfi file is sent via TCP socket to an edge device and stored in its internal storage directory, awaiting retrieval.

[0071] In one embodiment of the present invention, step S5 includes the following steps: Receive the human-machine interaction coordinate signals from the edge device, and confirm the selected graphic element as the target graphic element based on the coordinate query; Access the attribute data of the target graphic element and extract the entity classification label; Initialize a binary vector with all logic 0s. Traverse the global rule feature library. If the semantic triggering condition of a rule contains an entity classification label, set the corresponding bit position in the binary vector to logic 1 to generate an activity rule mask vector.

[0072] Specifically, the first action performed on the edge device is to respond to the operator's interactive instructions to determine the verification target. After startup, the edge device's application first loads the fusion data packet generated in step S4 from its non-volatile storage medium, and deserializes the main space index tree and rule definition portions into memory for graphics rendering and querying. The application's event listening module continuously monitors the user interface, waiting for human-machine interaction selection signals.

[0073] When an operator makes a selection on the currently displayed CAD view using a touchscreen or mouse, the event listener module is triggered and captures the screen coordinates of the click event. The application then calls a pick function, which converts the screen coordinates to world coordinates and uses these world coordinates to perform a selection range query on the main spatial index tree in memory. This query starts from the root node of the tree and recursively searches downwards, eventually locating the discrete primitive containing the selected coordinates and displayed at the top level among all overlapping primitives, and extracting its unique identifier. This selected primitive is then marked by the program as the target verification object. After identifying the target verification object, the program uses its unique identifier to search for it in the attribute data area loaded within the fusion data package.

[0074] Through this retrieval, the program extracts the entity classification label from the non-geometric attributes associated with the object, which were bound in step S2. After obtaining the label, the program enters the dynamic assembly stage. It initializes a binary vector with a length equal to the total number of rules in the global rule feature library, where all bits are logical false. Subsequently, the program reverse-addresses the global rule feature library, traversing each rule and checking whether the semantic triggering condition set of the current rule contains the entity classification label just obtained. If it does, it means that the rule has a potential association with the target verification object. The program then reads the rule identifier of that rule and determines its sequence number in the rule library.

[0075] Based on this sequence number, the program sets the value of the corresponding bit in the binary vector to a logical true value, forming a Boolean mask logic combination. After traversing all rules, this dynamically set binary vector finally constitutes the active rule mask vector specifically for the current target verification object, and is passed as output to the next step.

[0076] Edge devices typically refer to portable or embedded devices with graphics display capabilities and touch or mouse input, such as industrial tablets, AR glasses, or in-vehicle computers, whose computing and storage resources are limited compared to servers. A human-computer interaction selection signal is an event object dispatched by the operating system, encapsulating the precise two-dimensional coordinate information of a user's click or touch on the screen.

[0077] The target verification object is a single CAD element entity that the user actively selects during the current review session and that requires compliance checking. The entity category label is a string describing the engineering attributes of the element, such as 110kV circuit breaker, grounding switch, or cable trench, and its content and format are consistent with the entity category parsed in step S1.

[0078] The activity rule mask vector is a bit mask whose function is to filter out a subset of rules that are semantically related to the currently selected target from the global rule set, thereby avoiding invalid processing of irrelevant rules in subsequent calculations.

[0079] Boolean mask logic combination refers to the operation of assigning values ​​to specific bits of the active rule mask vector based on the matching result. The logical truth value is usually 1, and the logical false value is 0.

[0080] For example, an operator views power CAD drawings on an industrial tablet PC loaded with a fusion data package. The operator clicks an icon representing a circuit breaker on the screen. The system captures this click signal and, by querying the main space index tree, determines that the clicked element is circuit breaker CB-01 and marks it as the target verification object. Next, the system looks up the attributes of circuit breaker CB-01 in the data package and obtains its entity classification label as 110kV circuit breaker. Subsequently, the system begins generating an active rule mask vector. The global rule feature library contains 256 rules, and the system initializes a 256-bit vector filled with zeros. The program begins traversing the rule library. When it traverses to the 5th rule in the S1 example, the semantic trigger condition is {110kV circuit breaker, outgoing line structure beam}. Since this set contains 110kV circuit breakers, the match is successful, and the program sets the 5th bit of the vector to 1. Continuing the iteration, rule 89 concerns the circuit breaker's own technical parameters, with the semantic trigger condition being {110kV circuit breaker}. This also matches successfully, and the program sets bit 89 of the vector to 1. After this iteration, no other rules match. Finally, the system outputs a 256-bit active rule mask vector, with bits 5 and 89 set to 1, and the remaining bits set to 0. This vector encodes all rule indices related to the 110kV circuit breaker, providing direct input for subsequent simplification and review.

[0081] In one embodiment of the present invention, step S6 includes the following steps: Tracing upwards along the main spatial index tree, a query bounding box is generated for the target primitive based on the preset maximum verification distance, and the lowest-level ancestor node that can completely cover the query bounding box is located as the spatial parent node. Read the potential violation bit vectors residing in the additional data of the corresponding spatial parent node; The potential violation bit vector and the activity rule mask vector are input into the processor's arithmetic logic module to perform a bitwise AND operation, resulting in a test result string; Remove invalid bits with a logical value of 0 from the test result string, extract the bit sequence number with a logical value of 1, and assemble them to generate a list of rules to be inspected.

[0082] Specifically, after obtaining the active rule mask vector specifically for the target verification object, the edge device's verification engine immediately executes step S6 to quickly filter out the list of rules requiring detailed geometric verification. This process begins with addressing and locating the target verification object. The program uses the unique identifier of the target verification object to extract its geometric boundary and expands outwards using a preset maximum rule verification distance, generating a query bounding box. It then searches the main spatial index tree loaded in memory, tracing back up the tree hierarchy until it finds the lowest-level ancestor node that completely covers the query bounding box, which is then taken as the nearest spatial parent node.

[0083] After locating the node, the program directly extracts the potential violation bit vector, pre-calculated and stored in step S2, from the node's additional data. Subsequently, the verification engine calls the arithmetic logic module of the processor on the device, taking the potential violation bit vector extracted in the previous step and the activity rule mask vector generated in step S5 as input, and performs a strict bitwise AND operation. This calculation performs a logical AND operation on the corresponding bits of the two vectors one by one, producing a binary result string of the same length as the input vector; this is the bitwise AND test result string.

[0084] The program performs a check on the result string. Starting from the least significant bit, it examines each bit's record value. Bits with a record value of logic 0 are considered invalid rule branches and ignored, as this indicates that even if semantically related, the combination of all entities triggering a violation cannot be satisfied within that space region. Conversely, for bits with a record value of logic 1, the program collects their bit index, i.e., the index position of that bit in the binary string. All collected bit indices are assembled into an integer array or list, ultimately forming a list of rules to be checked, which is then passed as the output of this step to the subsequent geometric testing phase.

[0085] In this step, if the potential violation bit vector is The activity rule mask vector is Then, perform a bitwise logical AND test result string. The calculation method is as follows:

[0086] in, The symbol represents a bitwise AND operation. For any one of the bits Its value equal and The logic and results. List of rules to be inspected. Then all satisfying index constitute: The nearest spatial parent node is In a tree structure, the lowest-level ancestor node that can simultaneously cover the current target primitive and at least one other primitive is selected to make a potential judgment within a sufficiently small but potentially related local space.

[0087] General-purpose microprocessors typically refer to CPUs based on ARM, x86, or RISC-V architectures integrated into edge devices. Their built-in arithmetic logic units (ALUs) can efficiently perform bitwise operations. Bitwise AND operations are fundamental and extremely fast CPU instructions, capable of performing parallel comparisons of two equal-length bit strings in a single operation. The bitwise AND test result string is the direct product of this AND operation, where each 1 represents a highly suspicious rule that is semantically related and has coexisting entities.

[0088] Invalid rule branches refer to those rule branches corresponding to bits with a value of 0 in the result string. These branches were proven in this review to require no further geometric calculations, thus achieving large-scale computational pruning. The list of rules to be checked is the final product of this step, reducing the number of rules that need to be geometrically tested and refining the global rule set into a few or even just one most relevant rule index.

[0089] For example, the target verification object is circuit breaker CB-01. The system finds it in the main space index tree and traces upwards to locate its nearest space parent node. .from In the process, the system extracts its potential violation bit vector. In the example of S2, this vector has been computed as a 256-bit vector with the 5th bit set to 1 and the remaining bits set to 0. This vector can be represented as a binary sequence with a value of 1 at the 5th index and all other bits set to 0. Meanwhile, step S5 has generated the activity rule mask vector. Its value is 1 only at the 5th and 89th indexes. Now, the processor performs a bitwise AND operation. The binary result string produced after the comparison operation. Only the 5th bit retains a logic 1, while the 89th bit... The corresponding bit is set to 0. This new binary string is the result string of the bitwise AND test. The system traverses the result string and finds that only the 5th bit is a logic 1, while the 89th bit and all other bits are logic false 0. Therefore, the branch corresponding to the 89th rule is considered an invalid rule branch and is discarded, and only the 5th bit is recognized as valid. The system collects the bit sequence number of this high-level bit, i.e., the number 5. Finally, the program assembles this sequence number into a list of rules to be checked, the contents of which are [5]. This list shows that for the currently selected circuit breaker CB-01, in its local environment, only the 5th rule, i.e. the spacing rule with the outgoing frame beam, needs to be subsequently geometrically checked.

[0090] To support the aforementioned efficient verification, this invention also introduces a predictive caching optimization mechanism in the edge device before performing the cross-data layer loading and geometry test in step S7.

[0091] The application pre-divides and builds a dedicated cache pool structure within the storage layer of the edge device. To reduce the overhead of frequent flash or disk I / O read / write operations, the system's built-in prediction module continuously tracks the operator's panning and zooming trajectories in the CAD window, predicting the spatial regional patterns of interactive commands. Based on this prediction result, the system asynchronously loads the auxiliary index layer associated with local drawing areas with a hit rate higher than a preset threshold from non-volatile storage into the cache pool in advance.

[0092] During subsequent verification, the system prioritizes retrieving auxiliary index layer data from this cache pool, only initiating a read request to the underlying data packet when a cache miss occurs. This mechanism transforms physical media reading into memory addressing, significantly reducing I / O overhead during real-time verification and improving verification response speed.

[0093] In one embodiment of the present invention, step S7 includes the following steps: Based on the sequence number in the list of rules to be inspected, load the corresponding auxiliary index layer into memory; Retrieve the rule-affected bounding box that matches the current target primitive within the loaded auxiliary index layer; The bounding box affected by the rule is input into the collision detection engine, and a spatial intersection test is performed to obtain the interference Boolean value. The operator is compared with the relationship of the corresponding rule. When the operator represents the minimum spacing requirement and the interference Boolean value is true, or when the operator represents the maximum spacing requirement and the interference Boolean value is false, the potential violation record is output.

[0094] Specifically, after the S6 step successfully generates the list of rules to be inspected, the edge device's verification engine immediately moves on to the final geometric verification stage.

[0095] The program first disassembles the list of rules to be inspected, extracting any bit sequence number contained therein. For each extracted bit sequence number, the program uses it as a direct index key to perform a cross-data layer lookup within the previously loaded fusion data packet. The destination of this lookup is the set of auxiliary index layers encapsulated in step S4. By using the bit sequence number, i.e., the sequence number of the rule identifier, the program can directly locate and load the auxiliary index layer that perfectly corresponds to the rule's identity tag in O(1) time complexity.

[0096] Once the auxiliary index layer is loaded and activated, the program continues to search within it to obtain the rule-affected bounding box that is recorded within that index layer and specifically generated for the projection of the current target verification object in step S3.

[0097] Simultaneously, the program activates its built-in collision detection calculation engine. This engine receives multiple inputs; it first receives the previously acquired rule-affected bounding boxes and uses them as the dynamic query subject. Next, it utilizes the auxiliary index layer itself, or in some implementations, the main space index tree, to quickly query the geometric boundaries of other static primitives existing in the physical environment surrounding the target object. This boundary information, such as polar coordinate boundaries or, more commonly, axis-aligned bounding boxes, is fed into the engine as the query object.

[0098] The collision detection calculation engine performs the core region interference judgment. It uses a series of efficient coordinate comparison algorithms to determine whether the bounding box of the rule affecting the query subject spatially overlaps with the bounding box of the rule affecting the queried object within the auxiliary index layer, thus outputting an interference Boolean value. Next, the engine filters the Boolean value based on the relationship comparison operator in the rule: when the operator represents a minimum spacing requirement (greater than or not less than) and the Boolean value is true, or when the operator represents a maximum spacing requirement (less than or not greater than) and the Boolean value is false, meaning the specification requires primitives to maintain a specified distance, but the affected bounding boxes do not actually intersect, indicating that the actual distance exceeds the maximum limit, the engine classifies this test case as having a violation risk. The set of all records that meet the risk judgment constitutes the potential violation record and is passed as the final output of this step to subsequent modules.

[0099] Cross-data-layer loading refers to the program obtaining index information from the main data structure and using that information to access another independent, parallel data structure, enabling fast switching between different data encapsulations. The auxiliary index layer, as mentioned earlier, is a spatial index pre-built for a single rule, containing only the bounding boxes of the rule's related influence domains. It has a small data volume and loads quickly. The rule influence bounding box is a virtual bounding box pre-calculated in step S3 for each target primitive, representing its safe distance influence range.

[0100] A collision detection computation engine is an algorithmic module specifically designed to efficiently determine whether two or more geometric objects intersect in space. Its underlying implementation is typically based on the separating axis theorem or optimized axis-aligned bounding box intersection tests. Polar coordinate boundaries are a way to represent primitive outlines, but in this field, it is more common to use rectangular axis-aligned bounding boxes. Region interference refers to the existence of at least one shared common point between two geometric bounding boxes in two-dimensional or three-dimensional space; this is a direct geometric basis for determining violations of spatial distance constraints.

[0101] For example, the program receives the list of rules to be inspected output by S6, the content of which is [5]. The program extracts bit number 5 and loads the bounded auxiliary index layer. Then, the program obtains the rule influence bounding box generated for circuit breaker CB-01 in the example of S3 in this layer, the range of which is the point and points Limited. The engine was then activated and used as the query subject. Simultaneously, the engine extracted the rule influence bounding box corresponding to the wireframe beam G-01 within the secondary index layer, with a range of... arrive Now, the engine performs a region interference determination. It compares the projections of the two regions on the X-axis. and There is an overlapping part On the Y-axis and There is an overlapping part Because there is overlap on both axes, the engine outputs an interference Boolean value of true. Next, the engine reads the relational operator "≥" from Rule 5, identifies it as a minimum spacing constraint, and because the Boolean value is true, determines that it meets the risk condition. This record is encapsulated as a potential violation record, indicating a potential violation risk regarding the spatial distance between circuit breaker CB-01 and outgoing frame beam G-01 according to Rule 5, and is transferred to the next stage for precise verification.

[0102] In one embodiment of the present invention, step S8 includes the following steps: Obtain potential violation records, extract the actual geometric contours of primitives, and calculate the actual Euclidean distance; The actual Euclidean distance is combined with the relationship comparison operator in the corresponding spatial geometric constraints to determine whether an actual violation has occurred. If a violation is found, the coordinates and rule identifier of the violating primitive are extracted. The corresponding specification text description is queried, and a structured violation data object is generated by combining it with the preset rendering buffer distance; Parse the non-compliant data object and call the graphics interface around the target primitive to render a visual guidance layer containing highlighted lines and prompt text.

[0103] Specifically, after the edge device's verification engine completes the S7 step to obtain potential violation records, it enters the secondary precise verification and final visualization stage. Because the coarse interference screening of axis-aligned bounding boxes contains certain false interferences, such as slender primitives that are not axis-parallel, and the false values ​​of the maximum distance constraint also need to be reviewed, the violation tracing and visualization module performs precise interference calculations on the screened suspected violation records. The program extracts the identifiers of the primitives that trigger potential violations, directly retrieves their pre-serialized and stored precise geometric contours, such as line segment vertices and polygon contours, from the leaf nodes of the main space index tree, and uses the underlying calculation engine to obtain the actual minimum Euclidean distance between primitives. Subsequently, the system combines this actual Euclidean distance with the relational comparison operator for final evaluation: when the operator represents the minimum spacing requirement and the actual Euclidean distance is less than the specified threshold, or when the operator represents the maximum spacing requirement and the actual Euclidean distance is greater than the specified threshold, it is determined to be an actual violation. The program specifically captures those final result records that have been precisely verified and determined to be violations, and extracts their primitive coordinate sets.

[0104] Simultaneously, the program records the bit sequence number used in this interference test and obtains the rule identifier mapped to that sequence number by querying the global rule feature library in reverse. Next, the system performs data fusion and splicing operations. It extracts the text description of the procedural constraints associated with the current rule identifier from a locally stored specification knowledge base, such as "the safe clearance between 110kV devices must not be less than 2.5m".

[0105] The text description, the primitive coordinate set extracted in the previous step, and a spatial out-of-bounds tolerance parameter obtained from the rules or preset, such as 0.05m, are combined and encapsulated into a structured data object. This data object, containing complete violation context information, is thus solidified as the violation data object. After generating this object, the system's rendering module immediately performs a re-parse. The parser extracts the screen position of the violating primitive, the type of violation, and the specific value from this object.

[0106] Finally, the rendering module calls the graphics interface to activate the dynamic vector brush mechanism. This mechanism uses the empty space around the interface topology of the target verification object as a reference to overlay auxiliary graphics. For example, it might draw a striking red highlighted line between two interfering primitives and pop up an information box near the midpoint of this line, accurately displaying the procedure text parsed from the non-compliant data object and the difference between the current actual distance and the required distance. This dynamically generated and overlaid vector graphics layer constitutes a correction guidance layer that intuitively guides the user to make corrections, thus completing the closed loop of the entire verification process.

[0107] The primitive coordinate set is the geometric location data of the primitives that caused the conflict in the CAD coordinate system. The spatial out-of-bounds tolerance parameter is a small value used to provide a visual buffer during display, preventing the guide graphic from completely overlapping with the original primitive and becoming difficult to identify. The violation data object is a structured data package that aggregates all information about a specific violation event, including what it is (violation rule), where it is (primitive coordinates), why it happened (procedure text), and how much it differs (specific numerical value), providing all the necessary data sources for visualization. The dynamic vector brush mechanism, part of the graphics rendering engine, can overlay temporary, interactive vector graphic elements, such as lines, arrows, and text boxes, onto the screen view in real time without modifying the underlying CAD data. The correction guide layer is the final visual overlay presented to the user, drawn by the dynamic vector brush mechanism, containing all violation information and correction suggestions.

[0108] For example, the system obtains a potential violation record from step S7 regarding Rule 5 between circuit breaker CB-01 and outgoing line frame beam G-01, indicating that the minimum clearance width of the adjacent bounding box intersects, suggesting potential interference. The system then retrieves the precise geometric contours of both elements and calculates their actual minimum Euclidean distance to be 2.4m. Since Rule 5 includes a minimum safety clearance requirement of not less than 2.5m, the system compares the calculated actual distance of 2.4m with the requirement: 2.4m < 2.5m, confirming a violation. The system extracts the coordinate sets of these two elements and records the rule identifier associated with this violation. Next, the system begins constructing a violation data object. It retrieves the corresponding specification description from the specification knowledge base: Minimum safety clearance between 110kV circuit breaker and outgoing line frame beam: 2.5m. Combining this with the previously calculated actual distance of 2.4m, the system determines the out-of-bounds value to be -0.1m. The system concatenates this information into a data object, such as a JSON object. Finally, the rendering module parses this object. It activates a dynamic vector drawing mechanism, drawing a flashing red dashed line on the tablet screen between the graphics of circuit breaker CB-01 and the outgoing frame beam G-01. Simultaneously, a virtual label is generated next to this dashed line, displaying the text: Insufficient spacing, requirement: ≥2.5m, current: 2.4m. Additionally, the system may draw a semi-transparent circle with a radius of 2.5m centered on circuit breaker CB-01 to visually indicate its safety impact zone. All these dynamically drawn red dashed lines, labels, and circles together constitute a correction guidance layer, providing field operators with clear and accurate compliance feedback and modification guidance.

[0109] See appendix Figure 2 The present invention also proposes a power CAD patch compliance review system executed by an edge device, comprising the following modules: The rule deconstruction and fingerprint library construction module is used to obtain compliance specification texts and perform text parsing, generate semantic triggering conditions and spatial geometric constraints, merge semantic triggering conditions and spatial geometric constraints to construct a global rule feature library, and assign rule identifiers; The semantic space index building module is used to read CAD source files containing graphic data, extract non-geometric attributes of graphic elements and verify whether they meet semantic triggering conditions. If there is an inclusion relationship, the potential violation bit vector is associated on the spatial parent node corresponding to the graphic element to form the main space index tree. The spatial influence domain projection module is used to extract the bounding boxes of primitives in the main spatial index tree, perform translation and extension on the bounding boxes with reference to spatial geometric constraints, and generate rule-influenced bounding boxes. The data structure fusion and encapsulation module is used to aggregate the corresponding rule influence bounding boxes based on rule identifiers to build an auxiliary index layer, and to package the auxiliary index layer and the main space index tree into an index data packet for transmission to the storage medium of the edge device; The target verification object capture module is used to acquire the selected target primitive in the edge device interface, extract the entity classification label of the target primitive, determine whether the entity classification label is included in the semantic triggering condition, and generate an activity rule mask vector based on the judgment result. The simplified rule index generation module is used to locate the spatial parent node of the target primitive and extract the corresponding potential violation bit vector. The processor is called to perform a bitwise logical AND operation between the potential violation bit vector and the active rule mask vector, and output the list of rules to be inspected. The geometric intersection test module is used to load the associated auxiliary index layer from memory according to the list of rules to be inspected, extract the bounding box of the rule influence, perform geometric intersection tests, and output potential violation records by combining the relationship comparison operator in the spatial geometric constraints. The violation tracing and visualization module is used to obtain potential violation records, extract the actual geometric contours of the target primitives that cause interference, calculate the actual distance, construct violation data objects based on the calculation results, and call the graphics rendering interface to draw a visualization guide layer in the viewport of the edge device.

[0110] Each of the modules can be implemented in whole or in part through software, hardware, or a combination thereof. It supports hardware embedded in or independent of the processor in the computer device, and also supports software stored in the memory of the computer device, so that the processor can call and execute the operations corresponding to each of the above modules.

[0111] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for compliance review of power CAD plots executed by an edge device, characterized in that, Includes the following steps: S1. Obtain the compliance specification text and perform text parsing to generate semantic triggering conditions and spatial geometric constraints. Merge the semantic triggering conditions and spatial geometric constraints to construct a global rule feature library and assign rule identifiers. S2: Read the CAD source file containing graphic data, extract the non-geometric attributes of the graphic elements and verify whether they meet the semantic triggering conditions. If there is an inclusion relationship, associate the potential violation bit vector on the spatial parent node corresponding to the graphic element to form the main spatial index tree. S3, extract the bounding boxes of primitives in the main spatial index tree, perform translation and extension on the bounding boxes with reference to spatial geometric constraints, and generate rule-affected bounding boxes; S4, aggregate the corresponding rule influence bounding boxes based on the rule identifier to build an auxiliary index layer, and package the auxiliary index layer and the main space index tree into an index data packet and transmit it to the storage medium of the edge device; S5, obtain the selected target primitive in the edge device interface, extract the entity classification label of the target primitive, determine whether the entity classification label is included in the semantic triggering condition, and generate an activity rule mask vector based on the judgment result; S6, locate the spatial parent node of the target primitive and extract the corresponding potential violation bit vector, call the processor to perform a bitwise logical AND operation between the potential violation bit vector and the active rule mask vector, and output the list of rules to be inspected; S7: Load the associated auxiliary index layer from memory according to the list of rules to be inspected, extract the bounding box affected by the rules, perform geometric intersection tests, and output potential violation records by combining the relational comparison operators in the spatial geometric constraints. S8 retrieves potential violation records, extracts the actual geometric contours of the target primitives that cause interference, calculates the actual distance, constructs a violation data object based on the calculation results, and calls the graphics rendering interface to draw a visual guide layer in the viewport of the edge device.

2. The method for compliance verification of power CAD plots executed by an edge device according to claim 1, characterized in that, Step S1 includes the following steps: Based on a pre-defined power equipment ontology dictionary, the compliance and specification text is scanned, and a set of entity categories that serve as common constraint subjects are extracted to generate semantic triggering conditions. The regular expression module is called to match statement fragments containing entity category sets, extract relation comparison operators, quantify numerical values ​​and units of measurement, and generate spatial geometric constraints; A unique rule identifier is assigned to the merged semantic triggering conditions and spatial geometric constraints, and written into the global rule feature library.

3. The method for compliance verification of power CAD plots executed by an edge device according to claim 1, characterized in that, Step S2 includes the following steps: The preset spatial bounding algorithm is applied to encapsulate the geometric boundaries of the primitives in the CAD source file, construct a hierarchical nested basic bounding box tree, and establish the upper bounding box that completely contains the lower bounding primitive as the corresponding spatial parent node. Non-geometric attributes within the coverage area of ​​the top node are aggregated along the basic bounding box tree and merged into a set of node attributes. Determine whether the semantic triggering condition belongs to a subset of the node's attribute set. If so, establish an intersection hit association. On the spatial nodes that establish the intersection and hit association, set the bit position corresponding to the rule in the potential violation bit vector to logic 1, and generate the main space index tree.

4. The method for compliance review of power CAD plots executed by an edge device according to claim 1, characterized in that, Step S3 includes the following steps: By using semantic triggering conditions to perform global traversal verification, the inspected primitives whose non-geometric attributes meet the conditions are retrieved; Access the main spatial index tree and read the bounding box coordinates of each inspected graphic element; Extract the quantized values ​​and units of measurement from the spatial geometric constraints, convert them to global drawing units to obtain the standard quantization threshold, and perform coordinate translation and expansion calculations based on the bounding box vertices and the standard quantization threshold to generate rule-affected bounding boxes.

5. The method for compliance review of power CAD plots executed by an edge device according to claim 1, characterized in that, Step S4 includes the following steps: Aggregate all bounding boxes affected by the same rule identifier; use a spatial indexing algorithm to build a tree structure for each group of aggregated bounding boxes, generating an auxiliary index layer; Perform binary serialization processing, concatenating and encapsulating each auxiliary index layer with the main space index tree into an index data packet; Index data packets are sent to the non-volatile memory of the edge device via a communication protocol.

6. The method for compliance review of power CAD plots executed by an edge device according to claim 1, characterized in that, Step S5 includes the following steps: Receive the human-machine interaction coordinate signals from the edge device, and confirm the selected graphic element as the target graphic element based on the coordinate query; Access the attribute data of the target graphic element and extract the entity classification label; Initialize a binary vector with all logic 0s. Traverse the global rule feature library. If the semantic triggering condition of a rule contains an entity classification label, set the corresponding bit position in the binary vector to logic 1 to generate an activity rule mask vector.

7. The method for compliance review of power CAD plots executed by an edge device according to claim 1, characterized in that, Step S6 includes the following steps: Tracing upwards along the main spatial index tree, a query bounding box is generated for the target primitive based on the preset maximum verification distance, and the lowest-level ancestor node that can completely cover the query bounding box is located as the spatial parent node. Read the potential violation bit vectors residing in the additional data of the corresponding spatial parent node; The potential violation bit vector and the activity rule mask vector are input into the processor's arithmetic logic module to perform a bitwise AND operation, resulting in a test result string; Remove invalid bits with a logical value of 0 from the test result string, extract the bit sequence number with a logical value of 1, and assemble them to generate a list of rules to be inspected.

8. The method for compliance verification of power CAD plots executed by an edge device according to claim 1, characterized in that, Step S7 includes the following steps: Based on the sequence number in the list of rules to be inspected, load the corresponding auxiliary index layer into memory; Retrieve the rule-affected bounding box that matches the current target primitive within the loaded auxiliary index layer; The bounding box affected by the rule is input into the collision detection engine, and a spatial intersection test is performed to obtain the interference Boolean value. The operator is compared with the relationship of the corresponding rule. When the operator represents the minimum spacing requirement and the interference Boolean value is true, or when the operator represents the maximum spacing requirement and the interference Boolean value is false, the potential violation record is output.

9. The method for compliance verification of power CAD plots executed by an edge device according to claim 1, characterized in that, Step S8 includes the following steps: Obtain potential violation records, extract the actual geometric contours of primitives, and calculate the actual Euclidean distance; The actual Euclidean distance is combined with the relationship comparison operator in the corresponding spatial geometric constraints to determine whether an actual violation has occurred. If a violation is found, the coordinates and rule identifier of the violating primitive are extracted. The corresponding specification text description is queried, and a structured violation data object is generated by combining it with the preset rendering buffer distance; Parse the non-compliant data object and call the graphics interface around the target primitive to render a visual guidance layer containing highlighted lines and prompt text.

10. A compliance review system for power CAD maps executed by an edge device, characterized in that, Includes the following modules: The rule deconstruction and fingerprint library construction module is used to obtain compliance specification texts and perform text parsing, generate semantic triggering conditions and spatial geometric constraints, merge semantic triggering conditions and spatial geometric constraints to construct a global rule feature library, and assign rule identifiers; The semantic space index building module is used to read CAD source files containing graphic data, extract non-geometric attributes of graphic elements and verify whether they meet semantic triggering conditions. If there is an inclusion relationship, the potential violation bit vector is associated on the spatial parent node corresponding to the graphic element to form the main space index tree. The spatial influence domain projection module is used to extract the bounding boxes of primitives in the main spatial index tree, perform translation and extension on the bounding boxes with reference to spatial geometric constraints, and generate rule-influenced bounding boxes. The data structure fusion and encapsulation module is used to aggregate the corresponding rule influence bounding boxes based on rule identifiers to build an auxiliary index layer, and to package the auxiliary index layer and the main space index tree into an index data packet for transmission to the storage medium of the edge device; The target verification object capture module is used to acquire the selected target primitive in the edge device interface, extract the entity classification label of the target primitive, determine whether the entity classification label is included in the semantic triggering condition, and generate an activity rule mask vector based on the judgment result. The simplified rule index generation module is used to locate the spatial parent node of the target primitive and extract the corresponding potential violation bit vector. The processor is called to perform a bitwise logical AND operation between the potential violation bit vector and the active rule mask vector, and output the list of rules to be inspected. The geometric intersection test module is used to load the associated auxiliary index layer from memory according to the list of rules to be inspected, extract the bounding box of the rule influence, perform geometric intersection tests, and output potential violation records by combining the relation comparison operator in the spatial geometric constraints. The violation tracing and visualization module is used to obtain potential violation records, extract the actual geometric contours of the target primitives that cause interference, calculate the actual distance, construct violation data objects based on the calculation results, and call the graphics rendering interface to draw a visualization guide layer in the view of the edge device.