Substation two-dimensional diagram generation method and device based on semantic feedback compensation

By employing a full-dimensional semantic modeling and deviation detection mechanism, the substation 2D diagram is automatically detected and compensated, solving the problem of difficult semantic information conversion and realizing the standardization of substation design and the generation of high-precision drawings.

CN121787353APending Publication Date: 2026-04-03STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies face challenges in semantic information conversion during substation design, resulting in incomplete semantic dimensions. Furthermore, drawing generation is often a one-way process, failing to meet the standardization requirements of batch projects.

Method used

By constructing a full-dimensional semantic model, an initial two-dimensional diagram of the substation is generated, and an automated, high-precision detection and compensation mechanism is used to achieve matching between the initial two-dimensional diagram and the semantic model.

Benefits of technology

It has achieved automated, high-precision detection and compensation of 2D diagrams of substations, solved the problem of incomplete semantic dimensions, and met the standardization requirements of batch projects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121787353A_ABST
    Figure CN121787353A_ABST
Patent Text Reader

Abstract

The invention discloses a substation two-dimensional diagram generation method and device based on semantic feedback compensation. The method comprises the steps of obtaining a semantic model of a target substation; wherein the semantic model defines the technical parameters of each electrical equipment element in the target substation, the two-dimensional spatial layout of all electrical equipment elements and all functional area elements, and the topological connection relationship of all electrical equipment elements, and the functional area elements are used for placing the electrical equipment elements; generating an initial two-dimensional diagram of the target substation based on the semantic model; determining deviation information between the initial two-dimensional diagram and the semantic model; and compensating the initial two-dimensional diagram by using the deviation information to generate a final two-dimensional diagram conforming to the semantic model. The invention further provides computer equipment and a computer readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer-aided design technology, and in particular to a method and apparatus for generating two-dimensional diagrams of substations based on semantic feedback compensation. Background Technology

[0002] Currently, State Grid Corporation of China, China Southern Power Grid, and other enterprises have clearly identified intelligent substation design as a key area for research and development, requiring digital delivery from the design stage to support intelligent acceptance during construction and data reconstruction for operation and maintenance. However, the existing technology system has two major problems. First, there is the difficulty in semantic information conversion. Substation design involves multi-dimensional semantic data, and existing methods lack complete semantic dimensions and struggle to accurately map structured semantics to unstructured drawing elements. Second, drawing generation is mostly a one-way process, and deviations between the generated results and the design intent require manual review and correction, which cannot meet the standardization requirements of batch projects.

[0003] There is currently no effective solution to the aforementioned problems with existing technologies. Summary of the Invention

[0004] The purpose of this invention is to provide a method and apparatus for generating two-dimensional diagrams of substations based on semantic feedback compensation, which can solve the above-mentioned technical problems.

[0005] According to one aspect of the present invention, a method for generating two-dimensional diagrams of substations based on semantic feedback compensation is provided, comprising: Obtain the semantic model of the target substation; wherein, the semantic model defines the technical parameters of each electrical equipment component in the target substation, the two-dimensional spatial layout of all electrical equipment components and all functional area components, and the topological connection relationship of all electrical equipment components, and the functional area components are used to place the electrical equipment components; Based on the semantic model, an initial two-dimensional diagram of the target substation is generated; Determine the deviation information between the initial two-dimensional graph and the semantic model; The initial two-dimensional graph is compensated using the deviation information to generate a final two-dimensional graph that conforms to the semantic model.

[0006] Optionally, the two-dimensional spatial layout includes the design two-dimensional coordinates and design equipment spacing of each electrical equipment element, as well as the dimensions, design two-dimensional coordinates, design passage width, and design maintenance spacing of each functional area element; wherein, the design two-dimensional coordinates are used to characterize the two-dimensional coordinates in the design stage, the design equipment spacing is used to characterize the minimum distance between two adjacent electrical equipment elements, the design passage width is used to characterize the minimum width of the external passage between two adjacent functional area elements, and the design maintenance spacing is used to characterize the minimum width between the electrical equipment element placed in the functional area element and each wall of the functional area element; The topological connection relationship includes multiple chain structures, and the order of each chain structure is: the device identifier of the electrical equipment element as the connection starting point, the component identifier of the connecting element as the connection intermediate point, and the device identifier of the electrical equipment element as the connection ending point.

[0007] Optionally, generating an initial two-dimensional map of the target substation based on the semantic model includes: The electrical equipment elements of each electrical equipment component are retrieved from the preset two-dimensional graphic element library, and the technical parameters of each electrical equipment component are displayed in the form of annotations at the corresponding electrical equipment elements. Draw the functional area primitives of each functional area element according to its own size, and display the size of each functional area element in the form of annotations at the corresponding functional area primitive. Based on the design two-dimensional coordinates of each electrical equipment element and the design two-dimensional coordinates of each functional area element, an overall layout scheme is generated, and the positions of each electrical equipment element and each functional area element are adjusted according to the overall layout scheme. Based on each chain structure, elbow-shaped connecting lines are used to construct the topological connection relationship between each electrical equipment element, and the component identification in each chain structure is displayed in the form of annotations at the corresponding elbow-shaped connecting lines.

[0008] Optionally, determining the deviation information between the initial two-dimensional graph and the semantic model includes: The initial two-dimensional image is converted into a preset image format to obtain the target image; The pixel coordinates of each electrical equipment element, each functional area element, each labeled element, and each elbow-shaped connecting line used to establish the topological connection relationship between the electrical equipment elements in the target image are identified. The identified pixel coordinates are converted into two-dimensional coordinates in the coordinate system of the initial two-dimensional image to obtain the actual two-dimensional coordinates corresponding to each pixel coordinate. Identify the annotation content of each annotated element in the target image; wherein, the annotation content is the technical parameters of electrical equipment components or the dimensions of functional area components; Based on each actual two-dimensional coordinate and each labeled content, the deviation information between the initial two-dimensional diagram and the semantic model is determined.

[0009] Optionally, determining the deviation information between the initial two-dimensional map and the semantic model based on each actual two-dimensional coordinate and each labeled content includes: Based on the actual two-dimensional coordinates of the electrical equipment elements, the actual two-dimensional coordinates of the labeled elements, and the labeled content, structured equipment data for each electrical equipment element is generated; wherein, each piece of structured equipment data includes the equipment identifier of the electrical equipment element, the labeled content of the labeled element used to label the electrical equipment element, and the actual two-dimensional coordinates of the electrical equipment element; Based on the actual two-dimensional coordinates of the functional area elements, the actual two-dimensional coordinates of the labeled elements, and the labeled content, regional structured data of each functional area element is generated; wherein, each piece of regional structured data includes the regional identifier of the functional area element, the labeled content of the labeled element used to label the functional area element, and the actual two-dimensional coordinates of the functional area element; Based on the actual two-dimensional coordinates of the electrical equipment elements, the actual two-dimensional coordinates of the elbow-shaped connecting lines, the actual two-dimensional coordinates of the labeled elements, and the labeled content, structured data of each elbow-shaped connecting line is generated; wherein, the structured data of each connecting line includes the labeled content of the labeled elements used to label the elbow-shaped connecting lines and the equipment identifiers of the electrical equipment elements at both ends of the elbow-shaped connecting lines; The structured data of each device, each region, and each connecting line is compared with the corresponding parameters in the semantic model to determine the deviation information between the initial two-dimensional diagram and the semantic model.

[0010] Optionally, comparing the structured data of each device, each region, and each connecting line with the corresponding parameters in the semantic model to determine the deviation information between the initial two-dimensional diagram and the semantic model includes: Based on the equipment identifier in each piece of equipment structured data, the labeled content in each piece of equipment structured data is compared with the technical parameters of the corresponding electrical equipment components in the semantic model, and the actual two-dimensional coordinates in each piece of equipment structured data are compared with the design two-dimensional coordinates of the corresponding electrical equipment components in the semantic model. Based on the region identifiers in each region's structured data, the labeled content in each region's structured data is compared with the size of the corresponding functional region element in the semantic model. The actual two-dimensional coordinates in each region's structured data are also compared with the design two-dimensional coordinates of the corresponding functional region element in the semantic model. Based on the device identifiers in the structured data of each connection line, the labeled content in the structured data of each connection line is compared with the component identifiers in the corresponding chain structure in the semantic model; Calculate the actual equipment spacing between each pair of adjacent electrical equipment elements, and compare each actual equipment spacing with the corresponding designed equipment spacing in the semantic model. Calculate the actual channel width for each pair of adjacent functional area elements, and compare each actual channel width with the corresponding designed channel width in the semantic model. Calculate the actual maintenance distance between each functional area element and the electrical equipment element placed within each functional area element, and compare each actual maintenance distance with the corresponding design maintenance distance in the semantic model.

[0011] To achieve the above objectives, the present invention further provides a substation two-dimensional diagram generation device based on semantic feedback compensation, comprising: The acquisition module is used to acquire the semantic model of the target substation; wherein, the semantic model defines the technical parameters of each electrical equipment component in the target substation, the two-dimensional spatial layout of all electrical equipment components and all functional area components, and the topological connection relationship of all electrical equipment components, and the functional area components are used to place the electrical equipment components; A generation module is used to generate an initial two-dimensional diagram of the target substation based on the semantic model. The determination module is used to determine the deviation information between the initial two-dimensional graph and the semantic model; The compensation module is used to compensate the initial two-dimensional image using the deviation information to generate a final two-dimensional image that conforms to the semantic model.

[0012] Optionally, the two-dimensional spatial layout includes the design two-dimensional coordinates and design equipment spacing of each electrical equipment element, as well as the dimensions, design two-dimensional coordinates, design passage width, and design maintenance spacing of each functional area element; wherein, the design two-dimensional coordinates are used to characterize the two-dimensional coordinates in the design stage, the design equipment spacing is used to characterize the minimum distance between two adjacent electrical equipment elements, the design passage width is used to characterize the minimum width of the external passage between two adjacent functional area elements, and the design maintenance spacing is used to characterize the minimum width between the electrical equipment element placed in the functional area element and each wall of the functional area element; The topological connection relationship includes multiple chain structures, and the order of each chain structure is: the device identifier of the electrical equipment element as the connection starting point, the component identifier of the connecting element as the connection intermediate point, and the device identifier of the electrical equipment element as the connection ending point.

[0013] To achieve the above objectives, the present invention also provides a computer device, the computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the substation two-dimensional diagram generation method based on semantic feedback compensation described above.

[0014] To achieve the above objectives, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is used to implement the steps of the substation two-dimensional diagram generation method based on semantic feedback compensation described above.

[0015] The present invention provides a method and apparatus for generating two-dimensional substation diagrams based on semantic feedback compensation. By performing full-dimensional semantic modeling of equipment parameters, layout structure, and connection relationships, it solves the problem of incomplete semantic dimensions in existing technologies. In view of the lack of dynamic feedback mechanism in existing technologies, the present invention constructs a deviation detection mechanism to achieve automated and high-precision detection of the initial drawing and automatically compensate for the deviation in the initial two-dimensional diagram. Attached Figure Description

[0016] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart of the substation two-dimensional diagram generation method based on semantic feedback compensation provided in Embodiment 1; Figure 2 This is a schematic diagram of the substation two-dimensional diagram generation scheme based on semantic feedback compensation provided in Example 1; Figure 3 This is a block diagram of the substation two-dimensional diagram generation device based on semantic feedback compensation provided in Embodiment 2; Figure 4 This is a block diagram of a computer device suitable for implementing a substation two-dimensional diagram generation method based on semantic feedback compensation, as provided in Embodiment 3. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.

[0018] Example 1 Embodiment 1 of the present invention provides a method for generating two-dimensional diagrams of substations based on semantic feedback compensation, such as... Figure 1 As shown, the method includes steps S1 to S4, wherein: Step S1: Obtain the semantic model of the target substation; wherein, the semantic model defines the technical parameters of each electrical equipment component in the target substation, the two-dimensional spatial layout of all electrical equipment components and all functional area components, and the topological connection relationship of all electrical equipment components, and the functional area components are used to place the electrical equipment components.

[0019] The target substation can be any substation with a rated voltage, such as a 10kV substation, a 20kV substation, or a 100kV substation. Electrical equipment components refer to entities within the target substation that have specific electrical functions, such as transformers, circuit breakers, and disconnect switches. Functional area components refer to units that logically divide the space of the target substation, such as high-voltage rooms, low-voltage rooms, and capacitor rooms.

[0020] Optionally, the two-dimensional spatial layout includes the design two-dimensional coordinates and design equipment spacing of each electrical equipment component, as well as the dimensions, design two-dimensional coordinates, design channel width, and design maintenance spacing of each functional area component; wherein, the design two-dimensional coordinates are used to characterize the two-dimensional coordinates in the design stage, the design equipment spacing is used to characterize the minimum distance between two adjacent electrical equipment components, the design channel width is used to characterize the minimum width of the external channel between two adjacent functional area components, and the design maintenance spacing is used to characterize the minimum width between the electrical equipment component placed within the functional area component and each wall of the functional area component; the topological connection relationship includes multiple chain structures, and the sequence of each chain structure is: the equipment identifier of the electrical equipment component as the connection starting point, the component identifier of the connecting component as the connection intermediate point, and the equipment identifier of the electrical equipment component as the connection ending point.

[0021] The connecting element can be a busbar, cable, secondary circuit, or an electrical equipment element that serves as an intermediate connection point. When the intermediate connection point is an electrical equipment element, the element is identified by the equipment identifier.

[0022] To address the shortcomings of existing technologies in semantic modeling due to incomplete dimensions, this step constructs a semantic model covering all design elements, providing accurate input for subsequent drawing generation.

[0023] First, define the semantic information dimension system. Specifically, based on specialized standards and substation design practices, clarify three core semantic dimensions and their subdivided elements to form a complete semantic information framework. Assuming the target substation is a 10kV substation, GB 50059-2011 "Design Code for 35kV~110kV Substations" can be used as the specialized standard.

[0024] The equipment parameter dimension includes the technical parameters of various electrical equipment components. For example, it covers 128 key parameters of 23 types of core equipment, such as transformers (capacity, voltage level, no-load loss, load loss, impedance voltage), circuit breakers (model, rated current, rated breaking current, operating mechanism type), disconnect switches (model, rated voltage, rated current), and instrument transformers (turn ratio, accuracy class). Each parameter is related to special standards such as GB / T 6451 "Technical Parameters and Requirements for Three-Phase Oil-Immersed Power Transformers".

[0025] The layout structure dimension includes the two-dimensional spatial layout of all electrical equipment components and all functional area components. For example, it includes the length / width / height dimensions of functional area components, the relative positional relationship of the areas; equipment positioning coordinates (establishing a two-dimensional coordinate system with the lower left corner of the substation as the origin), equipment spacing (e.g., minimum spacing between transformers and circuit breakers ≥ 2.5m), and passage width (main passage ≥ 1.2m, auxiliary passage ≥ 0.8m), etc. All dimensions meet the requirements of GB 50059-2011.

[0026] The connection relationship dimension includes the topological connection relationships of all electrical equipment components. For example, it includes the topological relationships of busbars (material, cross-sectional specifications, laying method, phase sequence), cables (model, cross-sectional area, length, laying path, protection level), and secondary circuits (circuit number, conductor type, terminal block number), which are described using a chain structure of "starting device - connecting element - ending device", such as "10kV incoming cabinet → LGJ-120 busbar → VS1-12 circuit breaker → SCB14-1250 transformer high-voltage side".

[0027] Secondly, the semantic information is structured and a data quality control mechanism is added. Specifically, XML is used to construct a standardized structure for the semantic data, and custom tags are used to achieve precise descriptions of semantic elements.

[0028] XML tag system design: Design dedicated root tags for the above three dimensions, such as the root tag corresponding to the device parameter dimension.<equipment_parameter> Layout structure dimension corresponding to root tag<layout_structure> The root label corresponding to the connection relationship dimension<connection_relation> Each dimension's sub-elements correspond to sub-labels; for example, the technical parameters of a transformer are categorized by... <transformer capacity="1250kVA" voltage="10kV / 0.4kV" / > The description states that the two-dimensional coordinates of the electrical equipment design are obtained through...<equipment_position transformer="(3.5,4.2)" circuit_breaker="(6.0,4.2)" / > Description. The tag attribute values ​​must strictly adhere to the "number-unit" format specification.

[0029] Data quality control: Develop semantic data verification algorithms to automatically detect issues such as missing parameters (e.g., transformer capacity not filled in), parameters exceeding limits (e.g., circuit breaker rated current is lower than design requirements), and logical conflicts (e.g., equipment spacing is less than the standard minimum value); for fuzzy data that the machine cannot judge (e.g., parameters of special model equipment), submit them to designers for review through a visual interface.

[0030] Next, a structured semantic model is generated. Specifically, based on the processed and standardized semantic data, an interactive semantic model is constructed, which has the following three core functions.

[0031] Information Query and Modification: Supports quick retrieval of semantic data by equipment type and parameter name. For example, entering "circuit breaker rated current" will display the corresponding parameters for all circuit breakers. Designers are allowed to modify data online, and modifications automatically trigger associated checks. For instance, after modifying the transformer capacity, the system automatically checks whether the rated current of the matching circuit breakers matches.

[0032] Version management: Records the creation time, modifier, and modified content of the semantic model, supports version rollback, and avoids data loss due to accidental operations.

[0033] Interface adaptation: Built-in interface for integration with domestic design platforms, supporting real-time transmission of semantic data in JSON format.

[0034] Step S2: Based on the semantic model, generate an initial two-dimensional diagram of the target substation.

[0035] It reads the spatial layout and connection information from the semantic model, automatically calculates the position of primitives, and calls the preset graphics library to draw the initial two-dimensional map.

[0036] Optionally, step S2 includes: The electrical equipment elements of each electrical equipment component are retrieved from the preset two-dimensional graphic element library, and the technical parameters of each electrical equipment component are displayed in the form of annotations at the corresponding electrical equipment elements. Draw the functional area primitives of each functional area element according to its own size, and display the size of each functional area element in the form of annotations at the corresponding functional area primitive. Based on the design two-dimensional coordinates of each electrical equipment element and the design two-dimensional coordinates of each functional area element, an overall layout scheme is generated, and the positions of each electrical equipment element and each functional area element are adjusted according to the overall layout scheme. Based on each chain structure, elbow-shaped connecting lines are used to construct the topological connection relationship between each electrical equipment element, and the component identification in each chain structure is displayed in the form of annotations at the corresponding elbow-shaped connecting lines.

[0037] A semantic-driven drawing plugin is pre-embedded in the system. This plugin includes a data parsing module, a primitive calling module, and a layout calculation module. The data parsing plugin is responsible for transforming the semantic model into an internal data structure that the system can recognize. A standard, parameterized 2D primitive library is pre-established, where each primitive is a symbol and predefined technical parameter mounting points, such as capacity labeling positions. The primitive calling module is responsible for calling this built-in 2D primitive library. The layout calculation module is responsible for generating the overall layout scheme based on the various design 2D coordinates in the semantic model. Specifically: First, a three-dimensional mapping relationship between semantic elements, primitives, and standard specifications is established in advance to ensure that the conversion process is accurate and conforms to engineering standards, and the mapping rules cover all semantic dimensions.

[0038] Equipment parameter dimension mapping: This associates the technical parameters of electrical equipment components with the "graphical symbols and parameter annotations" in drawings. For example, it maps technical parameters... <transformer capacity="1250kVA" / > The mapping is in accordance with GB / T4728.6 "Graphical Symbols for Electrical Diagrams Part 6: Generation and Conversion of Electrical Energy" and the label is "Capacity: 1250kVA". The label position is, for example, 5mm to the right of the electrical equipment element by default, and the font is SimSun GB2312, size 5.

[0039] Layout structure dimension mapping: Associating spatial elements with "boundary lines and dimensions" in drawings, such as mapping the dimensions of functional area components themselves.<area_size high_voltage_room="8m×6m" / > The mapping is "rectangular boundary line (length 8m, width 6m, line width 0.35mm)" and "dimension annotation '8m' '6m'", with the annotation position located in the middle of the boundary line, adopting the standard style of GB / T 16675.2 "Simplified representation of technical drawings Part 2: dimensioning".

[0040] Connection relationship dimension mapping: Associates topological relationships with "connector lines and path annotations" in drawings, for example, ... <bus path="inlet_cabinet→circuit_breaker" / > The mapping is "solid line (0.5mm line width, color C100M0Y0K0)" and "labeled 'LGJ-120 busbar'", and the connecting lines automatically avoid equipment symbols.

[0041] Secondly, based on the mapping relationship, the semantic-driven drawing function of the system is launched, and the initial two-dimensional map is automatically generated according to the following process without manual intervention.

[0042] Specifically, the semantic modeling tool transmits the structured semantic model to the semantic-driven drawing plugin via an interface. The parsing module in the plugin verifies the semantic model, and after confirming that there are no format errors, extracts key information from each dimension. The element retrieval module is responsible for retrieving electrical equipment elements corresponding to each electrical equipment component from the built-in 2D element library and placing each retrieved electrical equipment element at a specified position on the drawing interface, such as the lower left corner. The element retrieval module also draws each functional area element based on its own dimensions and places each drawn functional area element at a specified position on the drawing interface. The layout calculation module generates an overall layout scheme based on the design 2D coordinates of the electrical equipment components and the functional area components, automatically adjusting the arrangement of electrical equipment elements and functional area elements to avoid overlap. Furthermore, the element retrieval module adjusts the position of each element according to the layout scheme and draws an initial 2D drawing. After exporting the initial 2D drawing, a preliminary drawing in DWG format can be generated. This drawing includes a complete set of design drawings, such as a primary wiring diagram, a floor plan, and equipment installation diagrams, and is automatically saved to a specified path.

[0043] Step S3: Determine the deviation information between the initial two-dimensional graph and the semantic model.

[0044] Implementation scheme one for step S3: direct reading, that is, by parsing the internal data structure of the generated initial two-dimensional map, directly reading the coordinates and attributes of the graphic elements, and comparing them with the design values ​​in the semantic model.

[0045] The second implementation scheme for step S3 is image analysis, which involves converting the initial two-dimensional image into a bitmap, using computer vision technology to identify the pixel coordinates of the primitives, and then converting them back to two-dimensional coordinates through coordinate mapping relationships, thereby calculating the deviation.

[0046] Option 1 relies on directly reading the internal data of the initial 2D drawing. While accurate, it is limited by specific software platforms and suffers from poor compatibility. Option 2, through image analysis technology, completely decouples the verification system from the software platform that generates the drawings, enabling it to handle output from any design tool and offering greater versatility. Furthermore, the original file format of the initial 2D drawing is complex and may fail to read due to version incompatibility or data corruption, while image formats are standard and stable, significantly reducing the risk of the entire verification process being interrupted due to file parsing errors.

[0047] Optionally, step S3 includes: The initial two-dimensional image is converted into a preset image format to obtain the target image; The pixel coordinates of each electrical equipment element, each functional area element, each labeled element, and each elbow-shaped connecting line used to establish the topological connection relationship between the electrical equipment elements in the target image are identified. The identified pixel coordinates are converted into two-dimensional coordinates in the coordinate system of the initial two-dimensional image to obtain the actual two-dimensional coordinates corresponding to each pixel coordinate. Identify the annotation content of each annotated element in the target image; wherein, the annotation content is the technical parameters of electrical equipment components or the dimensions of functional area components; Based on each actual two-dimensional coordinate and each labeled content, the deviation information between the initial two-dimensional diagram and the semantic model is determined.

[0048] In this embodiment, the initial 2D image is read using OpenCV (Open Source Computer Vision Library) and converted into a bitmap. A contour detection algorithm is used to extract the pixel coordinates of electrical equipment primitives, functional area primitives, annotation primitives, and elbow-shaped connecting lines from the image. OCR (Optical Character Recognition) technology is used to identify the annotation content of the annotation primitives. A transformation relationship is established between the pixel coordinate system and the 2D coordinate system in the initial 2D image, thereby converting each pixel coordinate into actual 2D coordinates. Specifically, the actual 2D coordinates converted from the pixel coordinates of the electrical equipment primitives are called the actual 2D coordinates of the electrical equipment primitives; the actual 2D coordinates converted from the pixel coordinates of the functional area primitives are called the actual 2D coordinates of the functional area primitives; the actual 2D coordinates converted from the pixel coordinates of the annotation primitives are called the actual 2D coordinates of the annotation primitives; and the actual 2D coordinates converted from the pixel coordinates of the elbow-shaped connecting lines are called the actual 2D coordinates of the elbow-shaped connecting lines.

[0049] Furthermore, the difference between the converted actual two-dimensional coordinates and the design two-dimensional coordinates in the semantic model is calculated to obtain the positional deviation; the annotation content recognized by OCR is compared with the technical parameters / size / component identifiers in the semantic model by string or numerical comparison to obtain the parameter deviation; and the validity of the deviation is determined according to the preset tolerance threshold.

[0050] Optionally, determining the deviation information between the initial two-dimensional map and the semantic model based on each actual two-dimensional coordinate and each labeled content includes: Based on the actual two-dimensional coordinates of the electrical equipment elements, the actual two-dimensional coordinates of the labeled elements, and the labeled content, structured equipment data for each electrical equipment element is generated; wherein, each piece of structured equipment data includes the equipment identifier of the electrical equipment element, the labeled content of the labeled element used to label the electrical equipment element, and the actual two-dimensional coordinates of the electrical equipment element; Based on the actual two-dimensional coordinates of the functional area elements, the actual two-dimensional coordinates of the labeled elements, and the labeled content, regional structured data of each functional area element is generated; wherein, each piece of regional structured data includes the regional identifier of the functional area element, the labeled content of the labeled element used to label the functional area element, and the actual two-dimensional coordinates of the functional area element; Based on the actual two-dimensional coordinates of the electrical equipment elements, the actual two-dimensional coordinates of the elbow-shaped connecting lines, the actual two-dimensional coordinates of the labeled elements, and the labeled content, structured data of each elbow-shaped connecting line is generated; wherein, the structured data of each connecting line includes the labeled content of the labeled elements used to label the elbow-shaped connecting lines and the equipment identifiers of the electrical equipment elements at both ends of the elbow-shaped connecting lines; The structured data of each device, each region, and each connecting line is compared with the corresponding parameters in the semantic model to determine the deviation information between the initial two-dimensional diagram and the semantic model.

[0051] In this embodiment, the discrete, unstructured pixel information obtained from image recognition is reorganized into three types of structured data with clear engineering semantics, including: Structured equipment data: Establishing a link between equipment identification, technical parameters, and actual coordinates; Structured regional data: Establishing a relationship between region identifiers, size parameters, and actual coordinates; Structured data for connectors: Establishing the association between connector elements, endpoint devices, and annotation parameters.

[0052] It should be noted that during the process of establishing structured data, the labeled elements are automatically associated and matched with the corresponding electrical equipment elements, functional area elements, and elbow-shaped connecting lines based on spatial location relationships.

[0053] This embodiment converts pixel information into structured data, reorganizing the discrete and meaningless visual dots in the drawings into digital objects with clear engineering semantics (such as equipment identification, technical parameters, and connection relationships). This provides a unique and reliable data foundation for subsequent automated comparison, intelligent analysis, and precise correction, completely solving the problems of inefficiency and uncertainty caused by relying on manual image interpretation.

[0054] Optionally, comparing the structured data of each device, each region, and each connecting line with the corresponding parameters in the semantic model to determine the deviation information between the initial two-dimensional diagram and the semantic model includes: Based on the equipment identifier in each piece of equipment structured data, the labeled content in each piece of equipment structured data is compared with the technical parameters of the corresponding electrical equipment components in the semantic model, and the actual two-dimensional coordinates in each piece of equipment structured data are compared with the design two-dimensional coordinates of the corresponding electrical equipment components in the semantic model. Based on the region identifiers in each region's structured data, the labeled content in each region's structured data is compared with the size of the corresponding functional region element in the semantic model. The actual two-dimensional coordinates in each region's structured data are also compared with the design two-dimensional coordinates of the corresponding functional region element in the semantic model. Based on the device identifiers in the structured data of each connection line, the labeled content in the structured data of each connection line is compared with the component identifiers in the corresponding chain structure in the semantic model; Calculate the actual equipment spacing between each pair of adjacent electrical equipment elements, and compare each actual equipment spacing with the corresponding designed equipment spacing in the semantic model. Calculate the actual channel width for each pair of adjacent functional area elements, and compare each actual channel width with the corresponding designed channel width in the semantic model. Calculate the actual maintenance distance between each functional area element and the electrical equipment element placed within each functional area element, and compare each actual maintenance distance with the corresponding design maintenance distance in the semantic model.

[0055] When comparing parameter content, string similarity algorithms or numerical tolerance comparisons can be used; when comparing coordinate positions, Euclidean distance can be calculated and deviations can be judged in conjunction with engineering tolerance thresholds, such as judging whether the deviation value is less than or equal to the tolerance threshold.

[0056] Specifically, for the semantic comparison and detection part, the detected data is compared with the corresponding information in the semantic model. For example, comparing "transformer labeled 125kVA" with the semantic "1250kVA" determines that the parameters are inconsistent; comparing "equipment spacing 2.0m" with the semantic "≥2.5m" determines that the layout is non-compliant. The text comparison process can use the cosine similarity algorithm, and the numerical comparison process can use absolute error calculation. For the coordinate and topology verification part, the extracted pixel coordinates are converted into actual two-dimensional coordinates, and the deviation value is calculated with the design two-dimensional coordinates in the semantic model. If the deviation is greater than the coordinate deviation threshold, it is determined to be a positioning deviation; the topological relationship of the connecting lines is analyzed by the adjacency matrix and compared with the chain structure in the semantic model. If a key node is missing (such as the busbar not being connected to the circuit breaker), it is determined to be an incomplete connection.

[0057] This embodiment converts drawing elements into structured data and performs multi-dimensional automated comparison with the original semantic model. This not only detects position coordinate deviations but also accurately identifies deeper issues such as incorrect technical parameter annotations, insufficient safety spacing, and inconsistent connection relationships. It transforms qualitative review, which relies on engineers' experience, into rule-based quantitative detection, thereby constructing a closed-loop quality control system across the entire chain.

[0058] Optionally, the method further includes: A deviation report is generated based on the deviation information; wherein, the deviation report includes: deviation statistics and deviation details; the deviation statistics include the compliance rate and the number of deviations under each dimension type, and the deviation details include the dimension type, design two-dimensional coordinates, pixel coordinates and the reason for the deviation for each deviation, wherein the dimension type is a technical parameter dimension, a two-dimensional spatial layout dimension or a topological connection relationship dimension; The compliance rate under the technical parameter dimension includes the percentage of the number of parameter matches relative to the total number of all technical parameters in the semantic model. The number of parameter matches is the number of times the annotation content in the initial two-dimensional image matches the technical parameters in the semantic model. The deviation under the technical parameter dimension is the difference between the total number of all technical parameters in the semantic model and the number of parameter matches. The compliance rate in the two-dimensional spatial layout dimension includes the layout compliance rate and the equipment positioning compliance rate. The layout compliance rate is the percentage of the number of matching layouts relative to the total number of device spacings and channel widths in the semantic model. The number of matching layouts is the sum of the first number of matching device spacings in the initial two-dimensional diagram with the device spacings in the semantic model, and the second number of matching channel widths in the initial two-dimensional diagram with the channel widths in the semantic model. The equipment positioning compliance rate is the percentage of the number of matching equipment positionings relative to the total number of electrical devices in the semantic model. The number of matching equipment positionings is the number of matching actual two-dimensional coordinates of electrical devices in the initial two-dimensional diagram with the designed two-dimensional coordinates of electrical devices in the semantic model. The deviation in the two-dimensional spatial layout dimension is the difference between the total number of layouts and the total number of matching layouts. The total number of layouts is the sum of the total number of device spacings and channel widths in the semantic model and the total number of electrical devices in the semantic model. The total number of matching layouts is the sum of the number of matching layouts and the number of matching equipment positionings. The compliance rate under the topological connection dimension includes the percentage of the number of complete connection paths to the total number of all chain structures in the semantic model, where the number of complete connection paths is the total number of structured connection lines that match the chain structures in the semantic model; the deviation under the topological connection dimension is the difference between the total number of all chain structures in the semantic model and the number of complete connection paths.

[0059] Furthermore, deviations in the deviation report can be prioritized, such as categorizing them into high, medium, and low levels based on their impact, facilitating subsequent compensation. High-impact deviations include, for example, incomplete connections affecting power supply safety; medium-impact deviations include, for example, incorrect parameter labeling affecting equipment selection; and low-impact deviations include, for example, offset labeling positions, which do not affect functionality.

[0060] Step S4: Use the deviation information to compensate the initial two-dimensional graph to generate a final two-dimensional graph that conforms to the semantic model.

[0061] Based on the type of deviation information, specific compensation rules are triggered. For example, if the deviation information is insufficient spacing, a local optimization algorithm can be invoked to fine-tune the position of the relevant electrical equipment elements until they meet the design equipment spacing and design maintenance spacing defined in the semantic model, without regenerating the entire drawing.

[0062] Optionally, step S4 includes: Determine the type of deviation to which the deviation information belongs; When the deviation type is a parameter mapping error type, the preset effective data extraction range is expanded; wherein, the effective data extraction range is used to extract the strings that need to be used as annotations in the initial two-dimensional figure from each technical parameter in the semantic model; When the deviation type is parameter annotation position offset, the preset annotation coordinate algorithm is adjusted, and the position of the corresponding annotation element is modified based on the adjusted annotation coordinate algorithm and boundary detection logic; wherein, the position of the modified annotation element does not exceed the outer border of the initial two-dimensional image; When the deviation type is a layout size mapping error, the preset size mapping formula is adjusted so that the size of the functional area primitive generated based on the adjusted size mapping formula is consistent with the size of the corresponding functional area element in the semantic model. When the deviation type is device positioning deviation, the mapping coefficient between pixel coordinates and actual two-dimensional coordinates in the preset coordinate transformation algorithm is adjusted so that the deviation between the new actual two-dimensional coordinates obtained based on the adjusted coordinate transformation algorithm and the corresponding design two-dimensional coordinates is less than the preset coordinate deviation threshold. When the deviation type is a missing connection path, a chain structure is added to the semantic model to represent the missing connection path. When the deviation type is non-standard elbow connection line, adjust the elbow connection line calling specification in the preset element calling rules.

[0063] Based on the deviation detection results, the deviations are divided into 6 typical types, and corresponding compensation strategies are formulated for each type of deviation, forming a reusable strategy library.

[0064] For example, a parameter mapping error occurs when "1250kVA" is mapped to "125kVA". The compensation strategy is to "correct the mapping logic between XML tags and drawing annotations, and change the parameter value extraction rule from 'take the first 3 digits' to 'take the complete number string'". A parameter annotation position offset occurs when the annotation exceeds the drawing boundary. The compensation strategy is to "adjust the annotation coordinate algorithm, change the annotation position from '5mm to the right of the equipment' to '3mm above the equipment', and add boundary detection logic to avoid exceeding the drawing range". A layout dimension mapping error occurs when "3m" is generated as "2.8m". The compensation strategy is to "correct the dimension mapping formula, change 'semantic dimension × 0.93' to 'semantic dimension × 1.0', and add dimension verification logic to ensure that the generated dimension is consistent with the semantics". A device positioning deviation occurs when coordinates (3.5, 4.2) are generated as (3.8, 4.2). The compensation strategy is to "correct the coordinate transformation algorithm, calibrate the mapping coefficient between pixel coordinates and design coordinates, and control the deviation within 0.5mm". A missing connection path occurs when the busbar is not connected to the transformer. The compensation strategy is to "supplement the connection relationship mapping rules, in..."<connection_relation> Add mandatory association logic for 'busbar-transformer' to the label; non-standard connection line is due to line width not meeting the standard, the compensation strategy is to "update the element calling rules and change the connection line width from '0.3mm' to '0.5mm', in accordance with GB / T 17452 'Guidelines and Baselines for Technical Drawings'".

[0065] This embodiment automates the execution of the compensation strategy without requiring manual code modification. Specifically, a strategy parsing algorithm is developed to convert the selected compensation strategy into machine-executable instructions, such as converting "correcting parameter mapping logic" into "XML tags".<transformer capacity> The annotation generation rules are as follows: "Truncate the complete string of attribute values, retaining units," and the instruction format uses JSON to ensure parsing compatibility with domestic platforms. Through a bidirectional interface between the semantic modeling tool and the domestic design platform, compensation instructions are fed back to both the semantic model and the drawing generation plugin. Instructions fed back to the semantic model are used to update data validation rules (such as adding parameter value integrity checks); instructions fed back to the plugin are used to update the mapping rule library, coordinate algorithm, and primitive calling rules. After receiving the instructions, the domestic platform plugin automatically updates its internal configuration files (such as mapping rule XML and algorithm parameter JSON), without requiring a platform restart. After receiving the instructions, the semantic model automatically updates its data validation logic, and subsequent input semantic data will be validated according to the new rules. This embodiment solves the problem of lack of dynamic feedback by constructing a deviation detection system that integrates six quantitative indicators with machine vision and semantic comparison algorithms, and establishes a compensation strategy library and automated update mechanism for six typical deviations to address the problem of inefficient deviation correction.

[0066] like Figure 2As shown, in this embodiment, the "optimized drawing generation and verification" step can also be used as the final step in the closed-loop process. By optimizing the generation and secondary testing strategies, the final drawings can be ensured to meet the engineering requirements. The specific process is as follows.

[0067] Optimized drawing generation: The domestic design platform re-executes the drawing generation process based on the updated semantic model (including new verification rules) and drawing generation plugin (including new mapping rules and algorithms) to generate optimized drawings in DWG format. The generation logic is the same as the initial version, but the updated parameter configuration is used. Secondary inspection of optimized drawings: Repeat the process of "multi-dimensional deviation detection" to perform full-element inspection on optimized drawings, focusing on verifying whether the compensated deviations have been corrected, and checking whether new deviations have been generated (such as whether the correction of parameter annotations has caused overlapping annotations). Acceptance judgment and output: If the secondary inspection results show that all dimensional indicators meet the standard thresholds, the drawing is judged to be qualified, and the final version of the drawing (including DWG file, deviation detection report, semantic model file) is automatically output, and batch export to the project management system is supported; if there are still uncorrected deviations (such as deviations with high priority), the process returns to the "semantic feedback compensation" stage, and the compensation strategy is re-formulated and executed until the drawing is qualified. The number of closed-loop iterations does not exceed N (to avoid infinite loops), where N is a positive integer set according to requirements.

[0068] Compared to existing technologies, this invention offers several advantages. First, its semantic modeling is more complete, significantly improving drawing conversion accuracy. Existing solutions employ weak topology modeling, relying solely on equipment numbers and location keywords to establish connections. This completely lacks semantic information for core parameters such as transformer capacity and circuit breaker rated current, and also fails to cover layout information like equipment spacing and area dimensions. Consequently, generating drawings requires extensive manual annotation of parameters, resulting in high rates of mislabeling and omissions. The semantic model constructed in this invention covers 128 key parameters across 23 equipment categories (all related to standards such as GB / T 6451). It utilizes XML structured processing and incorporates machine verification and manual review mechanisms, resulting in higher semantic data accuracy. On the other hand, this invention adopts a closed-loop feedback compensation mechanism, which improves the efficiency of deviation correction: the existing solution only relies on a semi-closed-loop process of "automatic generation-manual verification", there is no quantitative standard for detection, and deviation correction requires manual re-calling of the template library to perform a full process regeneration, which is time-consuming for deviation correction of a single substation; while this invention constructs a fusion algorithm of 6 quantitative indicators and "machine vision and semantic comparison" to achieve automated deviation detection; a compensation strategy library is established based on 6 typical deviations, and the semantic model and drawing generation module are dynamically updated through JSON commands, without the need for manual intervention.

[0069] Example 2 This invention provides a substation two-dimensional diagram generation device based on semantic feedback compensation, such as... Figure 3As shown, the substation two-dimensional diagram generation device 30 based on semantic feedback compensation specifically includes the following components: The acquisition module 301 is used to acquire the semantic model of the target substation; wherein, the semantic model defines the technical parameters of each electrical equipment component in the target substation, the two-dimensional spatial layout of all electrical equipment components and all functional area components, and the topological connection relationship of all electrical equipment components, and the functional area components are used to place the electrical equipment components; The generation module 302 is used to generate an initial two-dimensional diagram of the target substation based on the semantic model; The determination module 303 is used to determine the deviation information between the initial two-dimensional graph and the semantic model; The compensation module 304 is used to compensate the initial two-dimensional image using the deviation information to generate a final two-dimensional image that conforms to the semantic model.

[0070] Optionally, the two-dimensional spatial layout includes the design two-dimensional coordinates and design equipment spacing of each electrical equipment element, as well as the dimensions, design two-dimensional coordinates, design passage width, and design maintenance spacing of each functional area element; wherein, the design two-dimensional coordinates are used to characterize the two-dimensional coordinates in the design stage, the design equipment spacing is used to characterize the minimum distance between two adjacent electrical equipment elements, the design passage width is used to characterize the minimum width of the external passage between two adjacent functional area elements, and the design maintenance spacing is used to characterize the minimum width between the electrical equipment element placed in the functional area element and each wall of the functional area element; The topological connection relationship includes multiple chain structures, and the order of each chain structure is: the device identifier of the electrical equipment element as the connection starting point, the component identifier of the connecting element as the connection intermediate point, and the device identifier of the electrical equipment element as the connection ending point.

[0071] Optionally, the generation module is specifically used for: The electrical equipment elements of each electrical equipment component are retrieved from the preset two-dimensional graphic element library, and the technical parameters of each electrical equipment component are displayed in the form of annotations at the corresponding electrical equipment elements. Draw the functional area primitives of each functional area element according to its own size, and display the size of each functional area element in the form of annotations at the corresponding functional area primitive. Based on the design two-dimensional coordinates of each electrical equipment element and the design two-dimensional coordinates of each functional area element, an overall layout scheme is generated, and the positions of each electrical equipment element and each functional area element are adjusted according to the overall layout scheme. Based on each chain structure, elbow-shaped connecting lines are used to construct the topological connection relationship between each electrical equipment element, and the component identification in each chain structure is displayed in the form of annotations at the corresponding elbow-shaped connecting lines.

[0072] Optionally, the determining module is specifically used for: The initial two-dimensional image is converted into a preset image format to obtain the target image; The pixel coordinates of each electrical equipment element, each functional area element, each labeled element, and each elbow-shaped connecting line used to establish the topological connection relationship between the electrical equipment elements in the target image are identified. The identified pixel coordinates are converted into two-dimensional coordinates in the coordinate system of the initial two-dimensional image to obtain the actual two-dimensional coordinates corresponding to each pixel coordinate. Identify the annotation content of each annotated element in the target image; wherein, the annotation content is the technical parameters of electrical equipment components or the dimensions of functional area components; Based on each actual two-dimensional coordinate and each labeled content, the deviation information between the initial two-dimensional diagram and the semantic model is determined.

[0073] Optionally, when the determining module performs the step of determining the deviation information between the initial two-dimensional map and the semantic model based on each actual two-dimensional coordinate and each labeled content, it is specifically used for: Based on the actual two-dimensional coordinates of the electrical equipment elements, the actual two-dimensional coordinates of the labeled elements, and the labeled content, structured equipment data for each electrical equipment element is generated; wherein, each piece of structured equipment data includes the equipment identifier of the electrical equipment element, the labeled content of the labeled element used to label the electrical equipment element, and the actual two-dimensional coordinates of the electrical equipment element; Based on the actual two-dimensional coordinates of the functional area elements, the actual two-dimensional coordinates of the labeled elements, and the labeled content, regional structured data of each functional area element is generated; wherein, each piece of regional structured data includes the regional identifier of the functional area element, the labeled content of the labeled element used to label the functional area element, and the actual two-dimensional coordinates of the functional area element; Based on the actual two-dimensional coordinates of the electrical equipment elements, the actual two-dimensional coordinates of the elbow-shaped connecting lines, the actual two-dimensional coordinates of the labeled elements, and the labeled content, structured data of each elbow-shaped connecting line is generated; wherein, the structured data of each connecting line includes the labeled content of the labeled elements used to label the elbow-shaped connecting lines and the equipment identifiers of the electrical equipment elements at both ends of the elbow-shaped connecting lines; The structured data of each device, each region, and each connecting line is compared with the corresponding parameters in the semantic model to determine the deviation information between the initial two-dimensional diagram and the semantic model.

[0074] Optionally, when the determining module performs the comparison of the structured data of each device, each region, and each connecting line with the corresponding parameters in the semantic model to determine the deviation information between the initial two-dimensional diagram and the semantic model, it is specifically used for: Based on the equipment identifier in each piece of equipment structured data, the labeled content in each piece of equipment structured data is compared with the technical parameters of the corresponding electrical equipment components in the semantic model, and the actual two-dimensional coordinates in each piece of equipment structured data are compared with the design two-dimensional coordinates of the corresponding electrical equipment components in the semantic model. Based on the region identifiers in each region's structured data, the labeled content in each region's structured data is compared with the size of the corresponding functional region element in the semantic model. The actual two-dimensional coordinates in each region's structured data are also compared with the design two-dimensional coordinates of the corresponding functional region element in the semantic model. Based on the device identifiers in the structured data of each connection line, the labeled content in the structured data of each connection line is compared with the component identifiers in the corresponding chain structure in the semantic model; Calculate the actual equipment spacing between each pair of adjacent electrical equipment elements, and compare each actual equipment spacing with the corresponding designed equipment spacing in the semantic model. Calculate the actual channel width for each pair of adjacent functional area elements, and compare each actual channel width with the corresponding designed channel width in the semantic model. Calculate the actual maintenance distance between each functional area element and the electrical equipment element placed within each functional area element, and compare each actual maintenance distance with the corresponding design maintenance distance in the semantic model.

[0075] Example 3 This embodiment also provides a computer device, such as a smartphone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server, or cabinet server (including a standalone server or a server cluster composed of multiple servers), etc., capable of executing programs. Figure 4 As shown, the computer device 40 in this embodiment includes, but is not limited to, a memory 401 and a processor 402 that are communicatively connected to each other via a system bus. It should be noted that... Figure 4Only a computer device 40 with components 401-402 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0076] In this embodiment, the memory 401 (i.e., the readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 401 may be an internal storage unit of the computer device 40, such as the hard disk or memory of the computer device 40. In other embodiments, the memory 401 may also be an external storage device of the computer device 40, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 40. Of course, the memory 401 may include both the internal storage unit and the external storage device of the computer device 40. In this embodiment, the memory 401 is typically used to store the operating system and various application software installed on the computer device 40. In addition, the memory 401 may also be used to temporarily store various types of data that have been output or will be output.

[0077] In some embodiments, processor 402 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. This processor 402 is typically used to control the overall operation of computer device 40.

[0078] Specifically, in this embodiment, the processor 402 is used to execute the program stored in the memory 401 for the substation two-dimensional diagram generation method based on semantic feedback compensation.

[0079] For a detailed description of the above method steps, please refer to Example 1. This example will not be repeated here.

[0080] Example 4 This embodiment also provides a computer-readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, App application store, etc., which stores a computer program. When the computer program is executed by a processor, it is used to implement the steps of the substation two-dimensional diagram generation method based on semantic feedback compensation.

[0081] For a detailed description of the above method steps, please refer to Example 1. This example will not be repeated here.

[0082] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0083] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0084] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0085] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for generating two-dimensional diagrams of substations based on semantic feedback compensation, characterized in that, include: Obtain the semantic model of the target substation; wherein, the semantic model defines the technical parameters of each electrical equipment component in the target substation, the two-dimensional spatial layout of all electrical equipment components and all functional area components, and the topological connection relationship of all electrical equipment components, and the functional area components are used to place the electrical equipment components; Based on the semantic model, an initial two-dimensional diagram of the target substation is generated; Determine the deviation information between the initial two-dimensional graph and the semantic model; The initial two-dimensional graph is compensated using the deviation information to generate a final two-dimensional graph that conforms to the semantic model.

2. The method for generating two-dimensional substation diagrams based on semantic feedback compensation according to claim 1, characterized in that, The two-dimensional spatial layout includes the design two-dimensional coordinates and design equipment spacing of each electrical equipment component, as well as the dimensions, design two-dimensional coordinates, design passage width, and design maintenance spacing of each functional area component; wherein, the design two-dimensional coordinates are used to characterize the two-dimensional coordinates in the design stage, the design equipment spacing is used to characterize the minimum distance between two adjacent electrical equipment components, the design passage width is used to characterize the minimum width of the external passage between two adjacent functional area components, and the design maintenance spacing is used to characterize the minimum width between the electrical equipment components placed within the functional area component and the walls of that functional area component; The topological connection relationship includes multiple chain structures, and the order of each chain structure is: the device identifier of the electrical equipment element as the connection starting point, the component identifier of the connecting element as the connection intermediate point, and the device identifier of the electrical equipment element as the connection ending point.

3. The method for generating two-dimensional diagrams of substations based on semantic feedback compensation according to claim 2, characterized in that, The process of generating an initial two-dimensional diagram of the target substation based on the semantic model includes: The electrical equipment elements of each electrical equipment component are retrieved from the preset two-dimensional graphic element library, and the technical parameters of each electrical equipment component are displayed in the form of annotations at the corresponding electrical equipment elements. Draw the functional area primitives of each functional area element according to its own size, and display the size of each functional area element in the form of annotations at the corresponding functional area primitive. Based on the design two-dimensional coordinates of each electrical equipment element and the design two-dimensional coordinates of each functional area element, an overall layout scheme is generated, and the positions of each electrical equipment element and each functional area element are adjusted according to the overall layout scheme. Based on each chain structure, elbow-shaped connecting lines are used to construct the topological connection relationship between each electrical equipment element, and the component identification in each chain structure is displayed in the form of annotations at the corresponding elbow-shaped connecting lines.

4. The method for generating two-dimensional diagrams of substations based on semantic feedback compensation according to claim 2, characterized in that, Determining the deviation information between the initial two-dimensional graph and the semantic model includes: The initial two-dimensional image is converted into a preset image format to obtain the target image; The pixel coordinates of each electrical equipment element, each functional area element, each labeled element, and each elbow-shaped connecting line used to establish the topological connection relationship between the electrical equipment elements in the target image are identified. The identified pixel coordinates are converted into two-dimensional coordinates in the coordinate system of the initial two-dimensional image to obtain the actual two-dimensional coordinates corresponding to each pixel coordinate. Identify the annotation content of each annotated element in the target image; wherein, the annotation content is the technical parameters of electrical equipment components or the dimensions of functional area components; Based on each actual two-dimensional coordinate and each labeled content, the deviation information between the initial two-dimensional diagram and the semantic model is determined.

5. The method for generating two-dimensional diagrams of substations based on semantic feedback compensation according to claim 4, characterized in that, The process of determining the deviation information between the initial two-dimensional graph and the semantic model based on each actual two-dimensional coordinate and each labeled content includes: Based on the actual two-dimensional coordinates of the electrical equipment elements, the actual two-dimensional coordinates of the labeled elements, and the labeled content, structured equipment data for each electrical equipment element is generated; wherein, each piece of structured equipment data includes the equipment identifier of the electrical equipment element, the labeled content of the labeled element used to label the electrical equipment element, and the actual two-dimensional coordinates of the electrical equipment element; Based on the actual two-dimensional coordinates of the functional area elements, the actual two-dimensional coordinates of the labeled elements, and the labeled content, regional structured data of each functional area element is generated; wherein, each piece of regional structured data includes the regional identifier of the functional area element, the labeled content of the labeled element used to label the functional area element, and the actual two-dimensional coordinates of the functional area element; Based on the actual two-dimensional coordinates of the electrical equipment elements, the actual two-dimensional coordinates of the elbow-shaped connecting lines, the actual two-dimensional coordinates of the labeled elements, and the labeled content, structured data of each elbow-shaped connecting line is generated; wherein, the structured data of each connecting line includes the labeled content of the labeled elements used to label the elbow-shaped connecting lines and the equipment identifiers of the electrical equipment elements at both ends of the elbow-shaped connecting lines; The structured data of each device, each region, and each connecting line is compared with the corresponding parameters in the semantic model to determine the deviation information between the initial two-dimensional diagram and the semantic model.

6. The method for generating two-dimensional diagrams of substations based on semantic feedback compensation according to claim 5, characterized in that, The step of comparing the structured data of each device, each region, and each connecting line with the corresponding parameters in the semantic model to determine the deviation information between the initial two-dimensional diagram and the semantic model includes: Based on the equipment identifier in each piece of equipment structured data, the labeled content in each piece of equipment structured data is compared with the technical parameters of the corresponding electrical equipment components in the semantic model, and the actual two-dimensional coordinates in each piece of equipment structured data are compared with the design two-dimensional coordinates of the corresponding electrical equipment components in the semantic model. Based on the region identifiers in each region's structured data, the labeled content in each region's structured data is compared with the size of the corresponding functional region element in the semantic model. The actual two-dimensional coordinates in each region's structured data are also compared with the design two-dimensional coordinates of the corresponding functional region element in the semantic model. Based on the device identifiers in the structured data of each connection line, the labeled content in the structured data of each connection line is compared with the component identifiers in the corresponding chain structure in the semantic model; Calculate the actual equipment spacing between each pair of adjacent electrical equipment elements, and compare each actual equipment spacing with the corresponding designed equipment spacing in the semantic model. Calculate the actual channel width for each pair of adjacent functional area elements, and compare each actual channel width with the corresponding designed channel width in the semantic model. Calculate the actual maintenance distance between each functional area element and the electrical equipment element placed within each functional area element, and compare each actual maintenance distance with the corresponding design maintenance distance in the semantic model.

7. A device for generating two-dimensional diagrams of substations based on semantic feedback compensation, characterized in that, include: The acquisition module is used to acquire the semantic model of the target substation; wherein, the semantic model defines the technical parameters of each electrical equipment component in the target substation, the two-dimensional spatial layout of all electrical equipment components and all functional area components, and the topological connection relationship of all electrical equipment components, and the functional area components are used to place the electrical equipment components; A generation module is used to generate an initial two-dimensional diagram of the target substation based on the semantic model. The determination module is used to determine the deviation information between the initial two-dimensional graph and the semantic model; The compensation module is used to compensate the initial two-dimensional image using the deviation information to generate a final two-dimensional image that conforms to the semantic model.

8. The substation two-dimensional diagram generation device based on semantic feedback compensation according to claim 7, characterized in that, The two-dimensional spatial layout includes the design two-dimensional coordinates and design equipment spacing of each electrical equipment component, as well as the dimensions, design two-dimensional coordinates, design passage width, and design maintenance spacing of each functional area component; wherein, the design two-dimensional coordinates are used to characterize the two-dimensional coordinates in the design stage, the design equipment spacing is used to characterize the minimum distance between two adjacent electrical equipment components, the design passage width is used to characterize the minimum width of the external passage between two adjacent functional area components, and the design maintenance spacing is used to characterize the minimum width between the electrical equipment components placed within the functional area component and the walls of that functional area component; The topological connection relationship includes multiple chain structures, and the order of each chain structure is: the device identifier of the electrical equipment element as the connection starting point, the component identifier of the connecting element as the connection intermediate point, and the device identifier of the electrical equipment element as the connection ending point.

9. A computer device, the computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, is configured to implement the steps of the method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it is used to implement the steps of the method according to any one of claims 1 to 6.