Method and system for constructing three-dimensional model of electric power engineering CAD (Computer Aided Design) plane cross-section diagram

By extracting the geometric and semantic features of the CAD flat section diagram of power engineering and using the generative adversarial network to generate a three-dimensional model, the problems of low conversion efficiency and insufficient accuracy in the existing technology are solved, efficient and accurate three-dimensional model construction is achieved, and the model complies with the latest industry specifications.

CN120068230APending Publication Date: 2025-05-30POWERCHINA FUJIAN ELECTRIC POWER SURVEY & DESIGN INST CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510215443.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

When converting two-dimensional CAD drawings into three-dimensional models, the prior art is inefficient and prone to errors, and lacks dynamic update mechanisms and automated correction methods, making it difficult to adapt to new equipment or specification changes.

Method used

A three-dimensional model construction method for power engineering CAD flat section diagram is proposed. By obtaining CAD flat section diagram files for preprocessing and graphic element classification, geometric features and semantic features are extracted and integrated to generate comprehensive feature vectors, the generative adversarial network is used for three-dimensional modeling, and the accuracy and normativeness of the model are ensured through physical constraint loss functions and dynamic updated knowledge graphs.

Benefits of technology

Improve the efficiency and accuracy of 3D model construction, reduce the need for manual adjustment, ensure that the generated 3D model complies with the latest industry specifications, and reduce the cost of manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120068230A_ABST
    Figure CN120068230A_ABST
Patent Text Reader

Abstract

The invention relates to an electric power engineering CAD (computer-aided design) plane cross-section diagram three-dimensional model construction method and system, and the method comprises the following steps: obtaining an electric power engineering CAD plane cross-section diagram file, and carrying out the preprocessing and graphic element classification of the CAD plane cross-section diagram file; extracting geometric features and semantic features of the preprocessed electric power engineering CAD plane cross-section diagram file, and fusing the extracted geometric features and semantic features to obtain a comprehensive feature vector; inputting the comprehensive feature vector into a generative adversarial network for three-dimensional modeling, and preliminarily generating a three-dimensional model of the electric power engineering CAD plane cross-section diagram file; verifying the consistency between the geometric dimension and the shape of the preliminarily generated three-dimensional model and the CAD plane cross-section diagram, and adjusting local details; and storing the verified and corrected three-dimensional model in a universal three-dimensional file format, and outputting the three-dimensional model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of three-dimensional modeling technology, and more specifically, to a method and system for constructing a three-dimensional model of a power engineering CAD plan and section drawing. Background Art

[0002] In the field of power engineering, although traditional two-dimensional CAD drawings can accurately express the design details of power engineering, it is difficult for non-professionals to understand the drawing content. Three-dimensional models can display the structure, layout, and operation principle of power engineering in a more intuitive and vivid way, which helps to improve project communication efficiency, assist in design decision-making, and conduct science popularization. However, currently, the process of converting two-dimensional CAD drawings into three-dimensional models usually requires a large amount of manual intervention, with low efficiency and prone to errors. With the development of AI technology, it is of great practical significance to use AI to achieve automated and efficient conversion.

[0003] The prior art, such as the Chinese patent application with the publication number "CN117744227A", discloses a method for constructing a three-dimensional model of a substation. The method includes: a CAD import module, a drawing standardization module, a model library construction module, and a three-dimensional recognition and construction module connected in sequence; importing the substation CAD drawing in dwg format into the CAD import module, performing standardization processing on the substation CAD drawing through the drawing standardization module, converting the two-dimensional walls and roads in the standardized drawing into three-dimensional walls and roads through the three-dimensional recognition and construction module, and constructing a three-dimensional model of the substation by calling the three-dimensional device model in the model library construction module according to the equipment in the standardized drawing.

[0004] The problems existing in the above prior art are that the three-dimensional model library of this method is constructed based on predefined industry standards, lacks a dynamic update mechanism, and is difficult to adapt to new equipment or specification changes; the conversion from two-dimensional images to three-dimensional depends on rule algorithms, which may lead to insufficient modeling accuracy for complex geometric shapes; there is no means to automatically correct the generated three-dimensional model and it is overly dependent on manual adjustment. Summary of the Invention

[0005] To solve the above technical problems, the present invention proposes a method and system for constructing a three-dimensional model of a power engineering CAD plan and section drawing.

[0006] The technical solution of the present invention is as follows:

[0007] The present invention proposes a method for constructing a three-dimensional model of a power engineering CAD plan and section drawing, including the following steps:

[0008] Step S1, obtaining a power engineering CAD plan and section drawing file, and performing preprocessing and graphic element classification on the CAD plan and section drawing file;

[0009] Step S2: Extract the geometric features and semantic features from the preprocessed power engineering CAD plan and profile drawing file, and fuse the extracted geometric features and semantic features to obtain a comprehensive feature vector.

[0010] Step S3: Input the comprehensive feature vector into a generative adversarial network for 3D modeling to initially generate a 3D model of the power engineering CAD plan and profile drawing file.

[0011] Step S4: Verify the consistency between the geometric dimensions and shapes of the initially generated 3D model and the CAD plan and profile drawing, and make adjustments to local details.

[0012] Step S5: Save the verified and corrected 3D model in a common 3D file format and output the 3D model.

[0013] As a preferred embodiment, the preprocessing of the CAD plan and profile drawing file includes: format conversion and noise removal, where:

[0014] Format conversion: Uniformly convert the read power engineering CAD plan and profile drawing file into a standard computer - processable format through the interface function of CAD software or a third - party library.

[0015] Noise removal: Adopt a morphological filtering algorithm to perform noise removal operations on the converted graphic data; the morphological filtering algorithm includes dilation and erosion operations, where:

[0016] The expression for the dilation operation is:

[0017]

[0018] The expression for the erosion operation is:

[0019]

[0020] In the formula: (I⊕S)(x,y) is the pixel value at the coordinate (x,y) after performing the dilation operation on the image I; is the union operation of the values of I(x - i,y - j) corresponding to all pixel points (i,j) in the structuring element S; is the pixel value at the coordinate (x,y) after performing the erosion operation on the image I; is the intersection operation of the values of I(x + i,y + j) corresponding to all pixel points (i,j) in the structuring element S.

[0021] As a preferred embodiment, preprocess the CAD plan and profile drawing file and classify graphic elements; among them, for graphic elements in the CAD plan and profile drawing file larger than a preset size, use the YOLO series algorithm to classify and locate the graphic elements.

[0022] For graphic elements smaller than the preset size in the CAD plan and section drawing files, a model combining the Vision Transformer (ViT) and the Convolutional Neural Network (CNN) is used for classification. The specific calculation formula is as follows:

[0023] Output = MLP(GlobalAvgPoll(ViT(I) ⊕ CNN(I)));

[0024] In the formula: Output is the classification result output by the model combining the Vision Transformer (ViT) and the Convolutional Neural Network (CNN); MLP is the Multi-Layer Perceptron for classification output; GlobalAvgPoll is the global average pooling operation; ViT(I) is the feature extracted by the Vision Transformer (ViT); CNN(I) is the feature extracted by the Convolutional Neural Network (CNN); ⊕ is the feature concatenation operation.

[0025] As a preferred implementation, the extracted geometric features and semantic features are fused to obtain a comprehensive feature vector; for the geometric feature extraction: for elements with regular geometric shapes, the geometric features are obtained by calculating the vertex coordinates, line segment lengths, and angles of the graphics. For elements with complex shapes, the polygon approximation algorithm is used for simplification before extracting features; for the semantic features: combining natural language processing and image recognition technologies, semantic features are extracted from the annotation information and graphic elements of the CAD plan and section drawing; the expression of the comprehensive vector is:

[0026] F = αJ + βO;

[0027] In the formula: F is the comprehensive feature vector obtained by fusion; J is the geometric feature vector; O is the semantic feature vector; α and β are the weight coefficients of the geometric feature vector and the semantic feature vector respectively.

[0028] As a preferred implementation, the generative adversarial network includes a generator and a discriminator; the generator receives the comprehensive feature vector as input and generates a corresponding 3D model; the discriminator discriminates between the generated 3D model and the real 3D model samples; the training objective function of the generative adversarial network is:

[0029]

[0030] In the formula: is the objective function of the generative adversarial network; G is the generator; D is the discriminator; x is the real 3D model sample, z is the random noise vector, p data (x) is the distribution of the real data, p z (z) is the distribution of the noise;

[0031] The generative adversarial network generator also includes a physical constraint loss function to ensure that the generated 3D model meets the engineering requirements; the physical constraint loss function is:

[0032]

[0033] Where: L physics is the physical constraint loss function; is the divergence of the stress tensor for generating the 3D model; BCE is the binary cross-entropy loss; λ is the balance coefficient.

[0034] As a preferred embodiment, the generative adversarial network generates a 3D model according to the dynamically updated knowledge graph to ensure that the generated 3D model conforms to the latest industry specifications of the power engineering; the dynamically updated knowledge graph is updated based on the GNN neural network, and the specific calculation formula is:

[0035]

[0036] Where: is the embedding vector of node v at layer (l + 1); N (v) is the set of neighbor nodes of node v; b (1) is the bias vector of the l-th layer; W (1) is the weight matrix of the l-th layer; is the embedding vector of node u at the l-th layer; δ is the activation function.

[0037] As a preferred embodiment, verify the consistency of the geometric dimensions and shape of the initially generated 3D model with the CAD cross-sectional view, and perform local detail adjustments; among them, the local detail adjustments include: manual interaction correction and automated correction algorithm; the automated correction algorithm is based on reinforcement learning and automatically generates correction actions according to geometric deviations, and the specific formula is:

[0038] a t = argmax a Q(s t , a; θ);

[0039] s t+1 = f(s t , a t );

[0040] Where: Q is the state-action value function; s t is the current 3D model state; a t is the correction action; s t+1 is the 3D model state at the next moment; θ is the parameter of the value function; argmax a () is the operation of finding the maximum value with respect to the action a; f() is the 3D model state transition function.

[0041] On the other hand, the present invention also provides a 3D model construction system for power engineering CAD cross-sectional views, including:

[0042] A data acquisition and preprocessing module that acquires power engineering CAD profile and sectional view drawings and preprocesses and classifies graphic elements of the CAD profile and sectional view drawings;

[0043] A feature fusion module that extracts geometric features and semantic features from the preprocessed power engineering CAD profile and sectional view drawings, and fuses the extracted geometric features and semantic features to obtain a comprehensive feature vector;

[0044] A 3D modeling module that inputs the comprehensive feature vector into a generative adversarial network for 3D modeling to initially generate a 3D model of the power engineering CAD profile and sectional view drawings;

[0045] A model verification and correction module that verifies the consistency of the geometric dimensions and shape of the initially generated 3D model with the CAD profile and sectional view drawings and makes local detail adjustments;

[0046] A model output module that saves the verified and corrected 3D model in a common 3D file format and outputs the 3D model.

[0047] On the other hand, the present invention also provides an electronic device with a computer program stored thereon, and when the computer program is executed by a processor, it implements a method for constructing a 3D model of a power engineering CAD profile and sectional view drawing as described in any embodiment of the present invention.

[0048] On the other hand, the present invention also provides a computer-readable medium for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement a method for constructing a 3D model of a power engineering CAD profile and sectional view drawing as described in any embodiment of the present invention.

[0049] The present invention has the following beneficial effects:

[0050] 1. By combining geometric features and semantic features and generating a comprehensive feature vector through weight coefficients, the understanding ability of the model for complex drawings is enhanced;

[0051] 2. A generative adversarial network is used to generate a 3D model, and a physical constraint loss function is used to ensure that the model complies with engineering specifications, reducing the need for manual adjustment;

[0052] 3. Based on the GNN to update the knowledge graph, the generated 3D model complies with the latest industry standards;

[0053] 4. An enhanced learning algorithm is introduced to automatically correct the geometric deviation of the generated 3D model, reducing the cost of manual intervention. Description of the Drawings

[0054] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other relevant drawings can also be obtained based on these drawings.

[0055] Figure 1 It is a schematic flowchart of the method of the present invention. Specific embodiments

[0056] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0057] It should be understood that the step numbers used in the text are only for convenient description and do not limit the execution order of the steps.

[0058] It should be understood that the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.

[0059] The terms "comprising" and "including" indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their combinations.

[0060] The term "and / or" refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0061] Embodiment 1:

[0062] To make the purpose, technical solutions and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions of the present invention in combination with specific embodiments of the present application and with reference to the appended Figure 1 , and describe the technical solutions of the present invention clearly and completely.

[0063] To solve the problems of the prior art, the present invention provides a method for constructing a three-dimensional model of a power engineering CAD plan and profile drawing, including the following steps:

[0064] Step S1: Obtain the power engineering CAD plan and profile drawing file, and perform preprocessing and graphic element classification on the CAD plan and profile drawing file;

[0065] The preprocessing of the CAD plan and profile drawing file includes: format conversion and noise removal, where:

[0066] Format conversion: Through the interface function of CAD software or a third-party library (for example, using the ezdxf library of Python to read and process DXF files), the read power engineering CAD plan and profile drawing file is uniformly converted into a standard computer-processable format;

[0067] Noise removal: Adopt a morphological filtering algorithm to perform noise removal operations on the converted graphic data; The morphological filtering algorithm includes dilation and erosion operations, where:

[0068] The expression for the dilation operation is:

[0069]

[0070] The expression for the erosion operation is:

[0071]

[0072] In the formula: (I⊕S)(x,y) is the pixel value at the coordinate (x,y) after performing the dilation operation on the image I; is the union operation of the values of I(x - i, y - j) corresponding to all pixel points (i,j) in the structuring element S; is the pixel value at the coordinate (x,y) after performing the erosion operation on the image I; is the intersection operation of the values of I(x + i, y + j) corresponding to all pixel points (i,j) in the structuring element S.

[0073] The preprocessing and graphic element classification of the CAD plan and profile drawing file classify the graphic elements in the CAD plan and profile drawing, and identify different types of elements such as towers, conductors, insulators, and substation buildings;

[0074] For graphic elements in the CAD plan and profile drawing file that are larger than the preset size (such as towers and substation buildings), use the YOLO series algorithm to classify and locate the graphic elements;

[0075] For graphic elements in the CAD plan and profile drawing file that are smaller than the preset size (such as insulators and small connectors), use a model that combines the Vision Transformer ViT and the CNN convolutional neural network for classification. The specific calculation formula is:

[0076] Output = MLP(GlobalAvgPoll(ViT(I) ⊕ CNN(I)));

[0077] Where: Output is the classification result output by the model that combines the Vision Transformer (ViT) and the CNN convolutional neural network; MLP is the multi-layer perceptron for classification output; GlobalAvgPoll is the global average pooling operation; ViT(I) is the feature extracted by the Vision Transformer ViT; CNN(I) is the feature extracted by the CNN convolutional neural network; ⊕ is the feature concatenation operation.

[0078] Step S2: Extract the geometric features and semantic features from the preprocessed power engineering CAD plan and sectional view file, and fuse the extracted geometric features and semantic features to obtain a comprehensive feature vector;

[0079] The fusing of the extracted geometric features and semantic features to obtain a comprehensive feature vector; The geometric feature extraction: For elements with regular geometric shapes, such as the height, bottom area, and inclination angle of the tower, the length and curvature of the wire, etc., the geometric features are obtained by calculating the vertex coordinates, line segment lengths, and angles of the graph. For elements with complex shapes, the polygon approximation algorithm is used for simplification and then the features are extracted, such as after simplification by the Douglas-Peucker algorithm and then the features are extracted;

[0080] The semantic features: Combining natural language processing and image recognition technologies, extract semantic features from the annotation information and graphic elements of the CAD plan and sectional view; For example, the text annotations in the figure are recognized by optical character recognition (OCR) technology and converted into text information, which is associated with the graphic elements. Using a word vector model, such as Word2Vec, the text information is converted into a vector representation as the semantic feature.

[0081] The expression of the comprehensive vector is:

[0082] F = αJ + βO;

[0083] Where: F is the comprehensive feature vector obtained by fusion; J is the geometric feature vector; O is the semantic feature vector; α and β are the weight coefficients of the geometric feature vector and the semantic feature vector respectively.

[0084] Step S3: Input the comprehensive feature vector into the generative adversarial network for 3D modeling to initially generate a 3D model of the power engineering CAD plan and sectional view file;

[0085] The generative adversarial network includes a generator and a discriminator; The generator receives the comprehensive feature vector as input and generates the corresponding 3D model; The discriminator discriminates between the generated 3D model and the real 3D model samples; The training objective function of the generative adversarial network is:

[0086]

[0087] In the formula: is the objective function of the generative adversarial network; G is the generator; D is the discriminator; x is the real three-dimensional model sample, z is the random noise vector, p data (x) is the distribution of the real data, p z (z) is the distribution of the noise;

[0088] The generative adversarial network generator also includes a physical constraint loss function to ensure that the generated three-dimensional model meets the engineering requirements; the physical constraint loss function is:

[0089]

[0090] In the formula: L physics is the physical constraint loss function; is the divergence of the stress tensor of the generated three-dimensional model. According to factors such as the geometric shape, material properties, and external forces of the model, the stress tensor is obtained through corresponding mathematical calculations, and then the divergence of the stress tensor is calculated; BCE is the binary cross-entropy loss; λ is the balance coefficient.

[0091] The generative adversarial network is adjusted based on the dynamically updated knowledge graph: Construct a knowledge graph for power engineering, including knowledge such as the attributes, relationships, and industry specifications of power equipment. According to the knowledge graph, the initially generated three-dimensional model is adjusted and corrected to ensure that the model meets the actual requirements of power engineering. For example, according to the connection relationship between the pole tower and the wire in the knowledge graph, the positions and connection methods of the pole tower and the wire in the model are adjusted. When the generator generates a three-dimensional model, it refers to the updated information in the knowledge graph, such as the latest specification parameters of various equipment in power engineering and the connection relationships between different components. The information in the knowledge graph serves as a constraint condition or auxiliary information for the generator, guiding the generator to generate a three-dimensional model that meets the latest industry specifications of power engineering. When the discriminator discriminates the generated three-dimensional model, it also combines the specification information in the knowledge graph to determine whether the generated model meets the actual industry standards, thereby providing feedback and optimization to the generator, prompting the generator to continuously improve the generated three-dimensional model to make it more in line with the real situation and the latest requirements of power engineering.

[0092] The generative adversarial network generates a three-dimensional model according to the dynamically updated knowledge graph to ensure that the generated three-dimensional model meets the latest industry specifications of power engineering; the dynamically updated knowledge graph is updated based on the GNN neural network, and the specific calculation formula is:

[0093]

[0094] In the formula: is the embedding vector of node v at layer (l + 1); N (v) is the set of neighbor nodes of node v; b (l) is the bias vector at layer l; W (l) is the weight matrix at layer l; is the embedding vector of node u at layer l; δ is the activation function.

[0095] Step S4: Verify the consistency between the geometric dimensions and shape of the preliminarily generated 3D model and the CAD cross-sectional view, and make adjustments to local details;

[0096] Verify the consistency between the geometric dimensions and shape of the preliminarily generated 3D model and the CAD cross-sectional view, and make adjustments to local details; among them, the adjustment of local details includes: manual interaction correction and automated correction algorithm;

[0097] The manual interaction correction: Provide a manual interaction interface to allow users to manually correct and adjust the generated 3D model. Users can modify the local details of the model according to actual experience and requirements, such as adjusting the position and angle of the equipment.

[0098] The automated correction algorithm is based on reinforcement learning and automatically generates correction actions according to geometric deviations. The specific formula is:

[0099] a t = argmax a Q(s t , a; θ);

[0100] s t+1 = f(s t , a t );

[0101] In the formula: Q is the state-action value function; s t is the current 3D model state; a t is the correction action; s t+1 is the 3D model state at the next moment; θ is the parameter of the value function; argmax a () is the operation of finding the maximum value with respect to action a; f() is the 3D model state transition function.

[0102] Step S5: Save the verified and corrected 3D model in a common 3D file format and output the 3D model.

[0103] Save the verified and corrected 3D model in a common 3D file format, such as STL, OBJ, etc., for viewing, analysis, and application in different 3D software.

[0104] Embodiment 2:

[0105] This embodiment provides a three-dimensional model construction system for the CAD plan and profile drawings of power engineering, including:

[0106] A data acquisition and preprocessing module, which acquires the CAD plan and profile drawing files of power engineering and preprocesses the CAD plan and profile drawing files and classifies graphic elements;

[0107] A feature fusion module, which extracts geometric features and semantic features from the preprocessed CAD plan and profile drawing files of power engineering, fuses the extracted geometric features and semantic features, and obtains a comprehensive feature vector;

[0108] A three-dimensional modeling module, which inputs the comprehensive feature vector into a generative adversarial network for three-dimensional modeling and initially generates a three-dimensional model of the CAD plan and profile drawing files of power engineering;

[0109] A model verification and correction module, which verifies the consistency between the geometric dimensions and shapes of the initially generated three-dimensional model and the CAD plan and profile drawings and makes adjustments to local details;

[0110] A model output module, which saves the verified and corrected three-dimensional model in a common three-dimensional file format and outputs the three-dimensional model.

[0111] Embodiment 3:

[0112] This embodiment provides an electronic device, on which a computer program is stored, and when the computer program is executed by a processor, it implements a method for constructing a three-dimensional model of CAD plan and profile drawings of power engineering as described in any embodiment of the present invention.

[0113] Embodiment 4:

[0114] This embodiment provides a computer-readable medium for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement a method for constructing a three-dimensional model of CAD plan and profile drawings of power engineering as described in any embodiment of the present invention.

[0115] In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, A and / or B may represent the situation where A exists alone, A and B exist simultaneously, or B exists alone. Where A and B may be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one of the following" and its similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c may be single or multiple.

[0116] Those of ordinary skill in the art can realize that the various units and algorithm steps described in the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.

[0117] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.

[0118] In several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM for short), random access memories (RAM for short), magnetic disks, or optical discs that can store program codes.

[0119] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A method for constructing a three-dimensional model of a CAD plan section of an electric power engineering project, characterized in that: The following steps are involved: Step S1, obtaining a CAD plan-section drawing file of a power engineering project, and preprocessing and classifying graphic elements of the CAD plan-section drawing file; Step S2, extracting geometric features and semantic features from the preprocessed power engineering CAD plan-section drawing file, and fusing the extracted geometric features and semantic features to obtain a comprehensive feature vector; Step S3, inputting the comprehensive feature vector into the generative adversarial network for three-dimensional modeling, and preliminarily generating a three-dimensional model of the electric power engineering CAD plan and section drawing file; Step S4, verifying the consistency of the geometric size and shape of the initially generated three-dimensional model with the CAD plan view, and adjusting local details; Step S5, saving the verified and corrected three-dimensional model in a common three-dimensional file format and outputting the three-dimensional model.

2. A method for constructing a three-dimensional model of a CAD plan-section diagram of an electric power engineering project according to claim 1, characterized in that: The preprocessing of the CAD plan section file includes: format conversion and noise removal, wherein: Format conversion: The read power engineering CAD plan and section drawing files are converted into a standard computer-processable format through the interface function of the CAD software or a third-party library; Noise removal: A morphological filtering algorithm is used to perform noise removal on the converted graphic data; the morphological filtering algorithm includes dilation and erosion operations, wherein: The expression of the expansion operation is: The expression of the corrosion operation is: Where: is the pixel value at coordinate (x, y) after the expansion operation is performed on image I; To perform a union operation on the values ​​of I(xi,yj) corresponding to all pixel points (i,j) in the structural element S; is the pixel value at coordinate (x, y) after the erosion operation on image I; To perform an intersection operation on the values ​​of I(x+i,y+j) corresponding to all pixel points (i,j) in the structural element S.

3. The method for constructing a three-dimensional model of a CAD plan-section diagram of an electric power engineering project according to claim 1, characterized in that: The CAD plan-section drawing file is preprocessed and the graphic elements are classified; wherein, for the graphic elements in the CAD plan-section drawing file that are larger than a preset size, a YOLO series algorithm is used to classify and locate the graphic elements; For graphic elements in CAD plan-section files that are smaller than the preset size, a model combining the visual converter ViT and the CNN convolutional neural network is used for classification. The specific calculation formula is: Where: Output is the classification result of the model output by combining the visual converter ViT and the CNN convolutional neural network; MLP is a multi-layer perceptron, which is used for classification output; GlobalAvgPoll is a global average pooling operation; ViT(I) is the feature extracted by the visual converter ViT; CNN(I) is the feature extracted by the CNN convolutional neural network; It is a feature concatenation operation.

4. A method for constructing a three-dimensional model of a CAD plan-section diagram of an electric power engineering project according to claim 1, characterized in that: The extracted geometric features and semantic features are fused to obtain a comprehensive feature vector; the geometric feature extraction: for elements of regular geometric shapes, the geometric features are obtained by calculating the vertex coordinates, line segment length and angle of the graphics, and for elements of complex shapes, the polygon approximation algorithm is used to simplify and then extract the features; the semantic features: combining natural language processing and image recognition technology, extracting semantic features from the annotation information and graphic elements of the CAD plane section; the expression of the comprehensive vector is: F = αJ + βO; Where: F is the comprehensive feature vector obtained by fusion; J is the geometric feature vector; O is the semantic feature vector; α and β are the weight coefficients of the geometric feature vector and the semantic feature vector respectively.

5. The method for constructing a three-dimensional model of a CAD plan-section diagram of an electric power engineering project according to claim 1, characterized in that: The generative adversarial network includes a generator and a discriminator; the generator receives the comprehensive feature vector as input and generates a corresponding three-dimensional model; the discriminator discriminates the generated three-dimensional model and the real three-dimensional model sample; the training objective function of the generative adversarial network is: Where: is the objective function of the generative adversarial network; G is the generator; D is the discriminator; x is the real 3D model sample, z is the random noise vector, p data (x) is the distribution of real data, p z (z) is the distribution of noise; The generative adversarial network generator also includes a physical constraint loss function to ensure that the generated 3D model meets engineering requirements; the physical constraint loss function is: Where: L physics is the physical constraint loss function; is the divergence of the stress tensor for generating the three-dimensional model; BCE is the binary cross entropy loss; λ is the balance coefficient.

6. A method for constructing a three-dimensional model of a CAD plan-section diagram of an electric power engineering project according to claim 5, characterized in that: The generative adversarial network generates a three-dimensional model based on the dynamically updated knowledge graph to ensure that the generated three-dimensional model complies with the latest industry standards for power engineering; the dynamically updated knowledge graph is updated based on the GNN neural network, and the specific calculation formula is: Where: is the embedding vector of node v at the (l+1) layer; N (v) is the set of neighbor nodes of node v; b (l) is the bias vector of the lth layer; W (l) is the weight matrix of the lth layer; is the embedding vector of node u in layer l; δ is the activation function.

7. A method for constructing a three-dimensional model of a power engineering CAD plane section diagram according to claim 1, characterized in that: The verification of the consistency between the geometric size and shape of the initially generated 3D model and the CAD plane section drawing, and the adjustment of local details; wherein the adjustment of local details includes: manual interaction correction and automatic correction algorithm; the automatic correction algorithm is based on reinforcement learning, and automatically generates correction actions according to geometric deviations, and the specific formula is: a t =argmax a Q(s t ,a;i); s t+1 =f(s t ,a t ); Where: Q is the state-action value function; s t is the current 3D model state; a t To correct the action; t+1 is the state of the three-dimensional model at the next moment; θ is the parameter of the value function; argmax a () is the maximum value operation for action a; f() is the three-dimensional model state transfer function.

8. A three-dimensional model construction system for electric power engineering CAD plan and section drawings, characterized in that: include: The data acquisition and preprocessing module acquires the CAD plan-section drawing files of the power engineering project, and performs preprocessing and graphic element classification on the CAD plan-section drawing files; The feature fusion module extracts geometric features and semantic features from the preprocessed power engineering CAD plan-section drawing file, and fuses the extracted geometric features and semantic features to obtain a comprehensive feature vector; The 3D modeling module inputs the comprehensive feature vector into the generative adversarial network for 3D modeling, and preliminarily generates a 3D model of the CAD plan-section file of the power engineering project; Model verification and correction module, which verifies the consistency between the geometric size and shape of the initially generated 3D model and the CAD plane section drawing, and adjusts local details; The model output module saves the verified and corrected 3D model into a common 3D file format and outputs the 3D model.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements a method for constructing a three-dimensional model of a plan and section view of an electric power engineering CAD as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a method for constructing a three-dimensional model of a plan-section drawing of an electric power engineering CAD is implemented as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Transformer substation three-dimensional model construction system and method, storage medium and equipment

    CN117744227A