Power distribution room three-dimensional model construction method and device, computer device, storage medium and computer program product

By using an image segmentation model to perform feature processing on the floor plan image of the power distribution room, the key equipment and vertex coordinates are determined, which solves the problem of low accuracy in traditional manual construction and achieves higher precision 3D model construction.

CN120014154BActive Publication Date: 2025-11-25GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510001545.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-11-25
Estimated Expiration
2045-01-02

AI Technical Summary

Technical Problem

Traditional manual construction of 3D models of power distribution rooms involves subjective factors, resulting in low accuracy.

Method used

An image segmentation model is used to extract features from the apartment layout image and process it with an attention mechanism to determine the mask image of the key power distribution room equipment. A three-dimensional model is then constructed using the target vertex coordinate information and structural information.

Benefits of technology

This improves the accuracy of constructing 3D models of power distribution rooms, avoids subjective errors caused by manual construction methods, and ensures the accuracy of the models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120014154B_ABST
    Figure CN120014154B_ABST
Patent Text Reader

Abstract

The application relates to a power distribution room three-dimensional model construction method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: performing feature extraction processing on a house image corresponding to a power distribution room to be modeled by using a trained image segmentation model to obtain initial image features, performing attention mechanism processing on the initial image features to obtain processed image features, performing fusion processing on the initial image features and the processed image features to obtain fused image features, determining a mask image corresponding to a key power distribution room equipment in the power distribution room according to the fused image features, determining target vertex coordinate information of the mask image, determining a target equipment model corresponding to the key power distribution room equipment according to the target vertex coordinate information and structure information of the power distribution room, and constructing a three-dimensional model corresponding to the power distribution room according to house structure vector data corresponding to the mask image and the target equipment model. The method can improve the construction accuracy of the three-dimensional model of the power distribution room.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power grid technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for constructing a three-dimensional model of a power distribution room. Background Technology

[0002] Currently, in order to ensure the operational stability of the power system, it is crucial to accurately construct a three-dimensional model of the power distribution room.

[0003] In traditional technology, the construction of a 3D model of a power distribution room is generally done manually. However, this manual construction method is subject to subjective factors and is prone to errors, resulting in low accuracy of the 3D model of the power distribution room. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for constructing a 3D model of a power distribution room that can improve the accuracy of constructing a 3D model of a power distribution room, in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a method for constructing a three-dimensional model of a power distribution room, including:

[0006] Obtain the floor plan image corresponding to the power distribution room to be modeled;

[0007] The trained image segmentation model is used to extract features from the apartment layout image to obtain initial image features. The initial image features are then processed using an attention mechanism to obtain processed image features. The initial image features and the processed image features are then fused to obtain fused image features. Based on the fused image features, the mask images corresponding to the key power distribution equipment in the power distribution room are determined.

[0008] The target vertex coordinates corresponding to the mask image are determined;

[0009] Based on the target vertex coordinate information and the structural information of the power distribution room, the target equipment model corresponding to the key power distribution room equipment is determined;

[0010] The unit structure vector data corresponding to the mask image is determined, and a three-dimensional model of the power distribution room is constructed based on the unit structure vector data and the target equipment model.

[0011] In one embodiment, the step of performing attention mechanism processing on the initial image features to obtain the processed image features corresponding to the apartment layout image includes:

[0012] The initial image features are subjected to feature extraction processing to obtain the first image features corresponding to the apartment layout image;

[0013] The initial image features and the first image features are fused together to obtain the second image features corresponding to the apartment layout image;

[0014] The processed image features are obtained based on the initial image features and the second image features.

[0015] In one embodiment, obtaining the processed image features based on the initial image features and the second image features includes:

[0016] The second image features are subjected to feature extraction processing to obtain the third image features corresponding to the apartment layout image;

[0017] The third image feature is normalized to obtain the fourth image feature corresponding to the apartment layout image;

[0018] The fourth image feature is subjected to further feature extraction processing to obtain the fifth image feature corresponding to the apartment layout image;

[0019] The initial image features and the fifth image features are weighted and summed to obtain the processed image features.

[0020] In one embodiment, the trained image segmentation model is obtained by training in the following manner:

[0021] Obtain the sample apartment layout image corresponding to the sample power distribution room;

[0022] The image segmentation model to be trained is used to extract features from the sample apartment image to obtain the initial sample image features corresponding to the sample apartment image. The initial sample image features are then processed by an attention mechanism to obtain the processed sample image features corresponding to the sample apartment image. The initial sample image features and the processed sample image features are then fused to obtain the fused sample image features corresponding to the sample apartment image. Based on the fused sample image features, the prediction mask image corresponding to the key power distribution room equipment in the sample power distribution room is determined.

[0023] Obtain the actual mask image corresponding to the key power distribution equipment in the sample power distribution room, and iteratively train the image segmentation model to be trained based on the difference between the predicted mask image and the actual mask image to obtain the trained image segmentation model.

[0024] In one embodiment, the step of iteratively training the image segmentation model to be trained based on the difference between the predicted mask image and the actual mask image to obtain the trained image segmentation model includes:

[0025] Based on the difference between the predicted mask image and the actual mask image, the cross-entropy loss value, the smoothing loss value, and the mean absolute error loss value are obtained.

[0026] The target loss value is obtained by weighted summation of the cross-entropy loss value, the smoothing loss value, and the mean absolute error loss value.

[0027] Based on the target loss value, the image segmentation model to be trained is iteratively trained to obtain the trained image segmentation model.

[0028] In one embodiment, determining the target vertex coordinate information corresponding to the mask image includes:

[0029] Obtain the initial vertex coordinate information corresponding to the mask image;

[0030] Based on the initial vertex coordinate information, the center point coordinate information, horizontal distance, and vertical distance corresponding to the mask image are determined;

[0031] The coordinates of the target vertex are determined based on the center point coordinates, the horizontal distance, and the vertical distance.

[0032] Secondly, this application also provides a device for constructing a three-dimensional model of a power distribution room, comprising:

[0033] The image acquisition module is used to acquire the floor plan image of the power distribution room to be modeled;

[0034] The model processing module is used to perform feature extraction processing on the apartment layout image through a trained image segmentation model to obtain the initial image features corresponding to the apartment layout image, perform attention mechanism processing on the initial image features to obtain the processed image features corresponding to the apartment layout image, perform fusion processing on the initial image features and the processed image features to obtain the fused image features corresponding to the apartment layout image, and determine the mask image corresponding to the key power distribution room equipment in the power distribution room based on the fused image features.

[0035] The coordinate determination module is used to determine the target vertex coordinate information corresponding to the mask image;

[0036] The model determination module is used to determine the target equipment model corresponding to the key power distribution room equipment based on the target vertex coordinate information and the structural information of the power distribution room;

[0037] The model building module is used to determine the apartment structure vector data corresponding to the mask image, and to build a three-dimensional model of the power distribution room based on the apartment structure vector data and the target equipment model.

[0038] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0039] Obtain the floor plan image corresponding to the power distribution room to be modeled;

[0040] The trained image segmentation model is used to extract features from the apartment layout image to obtain initial image features. The initial image features are then processed using an attention mechanism to obtain processed image features. The initial image features and the processed image features are then fused to obtain fused image features. Based on the fused image features, the mask images corresponding to the key power distribution equipment in the power distribution room are determined.

[0041] The target vertex coordinates corresponding to the mask image are determined;

[0042] Based on the target vertex coordinate information and the structural information of the power distribution room, the target equipment model corresponding to the key power distribution room equipment is determined;

[0043] The unit structure vector data corresponding to the mask image is determined, and a three-dimensional model of the power distribution room is constructed based on the unit structure vector data and the target equipment model.

[0044] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0045] Obtain the floor plan image corresponding to the power distribution room to be modeled;

[0046] The trained image segmentation model is used to extract features from the apartment layout image to obtain initial image features. The initial image features are then processed using an attention mechanism to obtain processed image features. The initial image features and the processed image features are then fused to obtain fused image features. Based on the fused image features, the mask images corresponding to the key power distribution equipment in the power distribution room are determined.

[0047] The target vertex coordinates corresponding to the mask image are determined;

[0048] Based on the target vertex coordinate information and the structural information of the power distribution room, the target equipment model corresponding to the key power distribution room equipment is determined;

[0049] The unit structure vector data corresponding to the mask image is determined, and a three-dimensional model of the power distribution room is constructed based on the unit structure vector data and the target equipment model.

[0050] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0051] Obtain the floor plan image corresponding to the power distribution room to be modeled;

[0052] The trained image segmentation model is used to extract features from the apartment layout image to obtain initial image features. The initial image features are then processed using an attention mechanism to obtain processed image features. The initial image features and the processed image features are then fused to obtain fused image features. Based on the fused image features, the mask images corresponding to the key power distribution equipment in the power distribution room are determined.

[0053] The target vertex coordinates corresponding to the mask image are determined;

[0054] Based on the target vertex coordinate information and the structural information of the power distribution room, the target equipment model corresponding to the key power distribution room equipment is determined;

[0055] The unit structure vector data corresponding to the mask image is determined, and a three-dimensional model of the power distribution room is constructed based on the unit structure vector data and the target equipment model.

[0056] The aforementioned method, apparatus, computer equipment, storage medium, and computer program product for constructing a 3D model of a power distribution room first acquires the floor plan image corresponding to the power distribution room to be modeled. Then, using a trained image segmentation model, feature extraction is performed on the floor plan image to obtain initial image features. Attention mechanisms are then applied to the initial image features to obtain processed image features. The initial and processed image features are then fused to obtain fused image features. Based on the fused image features, mask images corresponding to key power distribution room equipment are determined. Next, the target vertex coordinates corresponding to the mask images are determined. Then, based on the target vertex coordinates and the structural information of the power distribution room, the target equipment model corresponding to the key power distribution room equipment is determined. Finally, the floor plan structure vector data corresponding to the mask images is determined, and based on the floor plan structure vector data and the target equipment model, a 3D model of the power distribution room is constructed. In this way, during the construction of the 3D model of the power distribution room, the trained image segmentation model is used to process the floor plan image of the power distribution room to be modeled. This allows for the accurate determination of the mask images corresponding to the key power distribution equipment in the power distribution room. Consequently, the target vertex coordinates of the mask images can be accurately determined, and the target equipment models corresponding to the key power distribution equipment can be accurately determined. Combined with the floor plan structure vector data corresponding to the mask images, the 3D model of the power distribution room can be constructed more accurately, which helps to improve the accuracy of the 3D model construction. Moreover, the entire process does not require manual intervention, avoiding the subjective factors and errors that can easily occur in manual construction, which can lead to low accuracy in the 3D model construction of the power distribution room. This further improves the accuracy of the 3D model construction of the power distribution room. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 This is a flowchart illustrating a method for constructing a 3D model of a power distribution room in one embodiment;

[0059] Figure 2 This is a schematic diagram of the structure of a convolutional neural network with an attention mechanism in one embodiment;

[0060] Figure 3 This is a schematic diagram of the attention mechanism module in one embodiment;

[0061] Figure 4 This is a flowchart illustrating the method for constructing a three-dimensional model of a power distribution room in another embodiment;

[0062] Figure 5 This is a flowchart illustrating an artificial intelligence-based 3D digital modeling method for a power distribution room in one embodiment.

[0063] Figure 6 This is a structural block diagram of a three-dimensional model construction device for a power distribution room in one embodiment;

[0064] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0066] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0067] In one exemplary embodiment, such as Figure 1 As shown, a method for constructing a 3D model of a power distribution room is provided. This embodiment illustrates the application of this method to a server. It is understood that this method can also be applied to a terminal, and further to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, and tablets; the server can be a standalone server or a server cluster composed of multiple servers. In this embodiment, the method includes the following steps:

[0068] Step S101: Obtain the floor plan image corresponding to the power distribution room to be modeled.

[0069] Among them, the power distribution room to be modeled refers to the power distribution room that needs to be constructed in three dimensions.

[0070] Among them, the floor plan image is used to represent the image information that visualizes the internal spatial layout of the power distribution room.

[0071] For example, in response to a 3D model building instruction for a power distribution room to be modeled, the server obtains the identification information of the power distribution room to be modeled; then, based on the identification information, the server retrieves the floor plan image corresponding to the identification information from the database as the floor plan image corresponding to the power distribution room to be modeled.

[0072] Step S102: Using the trained image segmentation model, feature extraction is performed on the apartment layout image to obtain the initial image features corresponding to the apartment layout image. Attention mechanism processing is applied to the initial image features to obtain the processed image features corresponding to the apartment layout image. The initial image features and the processed image features are fused to obtain the fused image features corresponding to the apartment layout image. Based on the fused image features, the mask image corresponding to the key power distribution room equipment in the power distribution room is determined.

[0073] Among them, image segmentation models refer to network models that can obtain mask images of key power distribution equipment in a power distribution room from the floor plan image of the power distribution room, such as the Attention CNN (Convolutional Neural Network with Attention Mechanism) model.

[0074] The initial image features refer to the image features obtained by performing feature extraction processing on the apartment layout image.

[0075] Here, the processed image features refer to the image features obtained by applying an attention mechanism to the initial image features.

[0076] Among them, fused image features refer to image features obtained by fusing the initial image features and the processed image features.

[0077] Among them, critical power distribution room equipment refers to power distribution room equipment with an importance greater than the preset importance level, such as switch cabinets, distribution cabinets, and transformers.

[0078] Among them, the mask image refers to the mask image corresponding to the key power distribution equipment in the power distribution room.

[0079] For example, the server inputs the apartment layout image into a trained image segmentation model. The trained model extracts features from the apartment layout image to obtain image features corresponding to the layout image, which serve as initial image features. Next, the server applies an attention mechanism to the initial image features to obtain processed image features corresponding to the apartment layout image. Then, the server obtains the weights corresponding to the initial image features and the processed image features, and fuses the initial and processed image features according to these weights to obtain fused image features corresponding to the apartment layout image. Next, the server determines the initial mask image corresponding to the fused image features based on these fused image features. Finally, the server preprocesses the initial mask image to obtain a preprocessed initial mask image, which serves as the mask image for the key power distribution equipment in the power distribution room.

[0080] For example, see reference. Figure 2 The server takes the apartment layout image as input data and feeds it into the trained image segmentation model. The convolutional layers in the image segmentation model extract features from the apartment layout image, and the region proposal network in the image segmentation model obtains the initial image features corresponding to the apartment layout image. Next, the server inputs the initial image features into the attention mechanism module, which processes the initial image features to obtain the processed image features corresponding to the apartment layout image. Then, the server fuses the initial image features and the processed image features to obtain the fused image features corresponding to the apartment layout image. Finally, the server inputs the fused image features into the mask branch of the image segmentation model, and through the mask branch, determines the mask images corresponding to the key power distribution equipment in the power distribution room.

[0081] Step S103: Determine the target vertex coordinate information corresponding to the mask image.

[0082] Among them, the target vertex coordinate information refers to the adjusted vertex coordinate information corresponding to the mask image.

[0083] For example, the server obtains the initial vertex coordinate information corresponding to the mask image; then, the server adjusts the initial vertex coordinate information to obtain the adjusted vertex coordinate information corresponding to the mask image, which is used as the target vertex coordinate information corresponding to the mask image.

[0084] Step S104: Based on the target vertex coordinate information and the structural information of the power distribution room, determine the target equipment model corresponding to the key power distribution room equipment.

[0085] The structural information includes details such as the shape and dimensions of the power distribution room.

[0086] Among them, the target equipment model refers to the three-dimensional model corresponding to the key power distribution room equipment, including switch cabinet model, power distribution cabinet model and transformer model.

[0087] For example, the server selects the device model corresponding to the target vertex coordinate information and the structural information of the power distribution room from the preset device model library, and uses it as the target device model corresponding to the key power distribution room equipment.

[0088] Step S105: Determine the unit structure vector data corresponding to the mask image, and construct the three-dimensional model of the power distribution room based on the unit structure vector data and the target equipment model.

[0089] Among them, the unit structure vector data is used to represent the digital data form describing the spatial structure and geometric features of the power distribution room unit, such as the geometric information of points (representing vertices, key points), lines (representing walls, boundary lines, etc.), and surfaces (representing rooms, functional areas, etc.).

[0090] For example, the server registers the mask image with the floor plan vector data of the power distribution room to obtain the floor plan vector data corresponding to the mask image; then, the server uses a 3D visualization tool to construct a 3D model corresponding to the floor plan vector data and the target equipment model based on the floor plan vector data and the target equipment model, which serves as the 3D model of the power distribution room.

[0091] It should be noted that 3D visualization tools include Babylon.js (a 3D visualization tool).

[0092] In the above-mentioned method for constructing a 3D model of a power distribution room, the following steps are taken: First, the floor plan image corresponding to the power distribution room to be modeled is obtained. Then, through a trained image segmentation model, feature extraction processing is performed on the floor plan image to obtain the initial image features corresponding to the floor plan image. The initial image features are then processed using an attention mechanism to obtain the processed image features corresponding to the floor plan image. The initial image features and the processed image features are then fused to obtain the fused image features corresponding to the floor plan image. Based on the fused image features, the mask image corresponding to the key power distribution room equipment in the power distribution room is determined. Next, the target vertex coordinate information corresponding to the mask image is determined. Then, based on the target vertex coordinate information and the structural information of the power distribution room, the target equipment model corresponding to the key power distribution room equipment is determined. Finally, the floor plan structure vector data corresponding to the mask image is determined, and based on the floor plan structure vector data and the target equipment model, the 3D model corresponding to the power distribution room is constructed. In this way, during the construction of the 3D model of the power distribution room, the trained image segmentation model is used to process the floor plan image of the power distribution room to be modeled. This allows for the accurate determination of the mask images corresponding to the key power distribution equipment in the power distribution room. Consequently, the target vertex coordinates of the mask images can be accurately determined, and the target equipment models corresponding to the key power distribution equipment can be accurately determined. Combined with the floor plan structure vector data corresponding to the mask images, the 3D model of the power distribution room can be constructed more accurately, which helps to improve the accuracy of the 3D model construction. Moreover, the entire process does not require manual intervention, avoiding the subjective factors and errors that can easily occur in manual construction, which can lead to low accuracy in the 3D model construction of the power distribution room. This further improves the accuracy of the 3D model construction of the power distribution room.

[0093] In an exemplary embodiment, step S102 above, which involves processing the initial image features using an attention mechanism to obtain the processed image features corresponding to the apartment layout image, specifically includes the following: performing feature extraction processing on the initial image features to obtain the first image features corresponding to the apartment layout image; performing fusion processing on the initial image features and the first image features to obtain the second image features corresponding to the apartment layout image; and obtaining the processed image features based on the initial image features and the second image features.

[0094] The first image feature refers to the image feature obtained by performing feature extraction processing on the initial image features.

[0095] The second image feature refers to the image feature obtained by fusing the initial image feature and the first image feature.

[0096] For example, the server performs feature extraction processing on the initial image features through the attention mechanism module in the image segmentation model to obtain the first image features corresponding to the apartment layout image; then, the server obtains the weights corresponding to the initial image features and the first image features, and performs fusion processing on the initial image features and the first image features according to the weights corresponding to the initial image features and the first image features to obtain the second image features corresponding to the apartment layout image; then, the server obtains the processed image features based on the initial image features and the second image features.

[0097] For example, see reference. Figure 3 The server takes the initial image features as input features and feeds them into the attention mechanism module of the image segmentation model. The initial image features are extracted through the convolutional layer in the attention mechanism module, and the first image features corresponding to the house type image are obtained through the activation layer in the image segmentation model. Then, the server fuses the initial image features and the first image features to obtain the second image features corresponding to the house type image. Finally, the server obtains the processed image features based on the initial image features and the second image features.

[0098] In this embodiment, the first image feature is obtained by performing feature extraction processing on the initial image feature, thereby enabling the discovery of more potential feature information in the floor plan image; moreover, the initial image feature and the first image feature are fused to obtain the second image feature, thereby making the second image feature contain more comprehensive feature information, thus providing a sufficient data foundation for subsequent data analysis.

[0099] In an exemplary embodiment, processed image features are obtained based on initial image features and second image features, specifically including the following: performing feature extraction processing on the second image features to obtain third image features corresponding to the apartment layout image; performing normalization processing on the third image features to obtain fourth image features corresponding to the apartment layout image; performing further feature extraction processing on the fourth image features to obtain fifth image features corresponding to the apartment layout image; and performing weighted summation processing on the initial image features and the fifth image features to obtain processed image features.

[0100] The third image feature refers to the image feature obtained by performing feature extraction processing on the second image feature.

[0101] The fourth image feature refers to the image feature obtained by normalizing the third image feature.

[0102] The fifth image feature refers to the image feature obtained by performing feature extraction processing on the fourth image feature again.

[0103] For example, the server uses the attention mechanism module in the image segmentation model to perform feature extraction processing on the second image features to obtain the third image features corresponding to the apartment layout image. Then, the server normalizes the third image features to obtain the normalized third image features, which serve as the fourth image features corresponding to the apartment layout image. Next, the server performs feature extraction processing on the fourth image features again to obtain the fifth image features corresponding to the apartment layout image. Then, the server obtains the weights corresponding to the initial image features and the weights corresponding to the fifth image features, and performs a weighted summation of the initial image features and the fifth image features according to their respective weights to obtain the processed image features.

[0104] For example, see reference. Figure 3 The server extracts features from the second image features using convolutional layers in the image segmentation model to obtain the third image features corresponding to the apartment layout image. Next, the server normalizes the third image features using the layer normalization module in the image segmentation model to obtain the fourth image features corresponding to the apartment layout image. Then, the server extracts features from the fourth image features again using convolutional layers in the image segmentation model to obtain the fifth image features corresponding to the apartment layout image. Finally, the server performs a weighted summation of the initial image features and the fifth image features to obtain the processed image features.

[0105] In this embodiment, by performing a series of processes on the second image features, a deeper fifth image feature can be obtained. The final processed image feature is obtained by performing a weighted summation of the initial image feature and the fifth image feature, thereby making the quality of the integrated feature higher and providing an accurate data foundation for subsequent data processing.

[0106] In an exemplary embodiment, the method for constructing a 3D model of a power distribution room provided in this application further includes a training step for a trained image segmentation model, specifically including the following: obtaining a sample apartment image corresponding to the sample power distribution room; performing feature extraction processing on the sample apartment image using the image segmentation model to be trained to obtain initial sample image features corresponding to the sample apartment image; performing attention mechanism processing on the initial sample image features to obtain processed sample image features corresponding to the sample apartment image; performing fusion processing on the initial sample image features and processed sample image features to obtain fused sample image features corresponding to the sample apartment image; determining the prediction mask image corresponding to the key power distribution room equipment in the sample power distribution room based on the fused sample image features; obtaining the actual mask image corresponding to the key power distribution room equipment in the sample power distribution room; and iteratively training the image segmentation model to be trained based on the difference between the prediction mask image and the actual mask image to obtain the trained image segmentation model.

[0107] Among them, the sample power distribution room refers to the power distribution room used to train the image segmentation model to be trained.

[0108] Among them, the sample apartment type image refers to the apartment type image corresponding to the sample power distribution room.

[0109] Among them, the initial sample image features refer to the initial image features corresponding to the sample apartment type image.

[0110] Among them, the processed sample image features refer to the image features obtained by applying an attention mechanism to the initial sample image features.

[0111] Among them, fused sample image features refer to the image features obtained by fusing the features of the initial sample image and the features of the processed sample image.

[0112] Among them, the predicted mask image refers to the predicted value of the mask image corresponding to the key power distribution equipment in the sample power distribution room.

[0113] The actual mask image refers to the actual value of the mask image corresponding to the key power distribution equipment in the sample power distribution room.

[0114] For example, in response to a model training instruction for the image segmentation model to be trained, the server retrieves sample apartment images corresponding to sample substations from the database. Next, the server inputs the sample apartment images into the image segmentation model to be trained, and performs feature extraction processing on the sample apartment images to obtain initial sample image features. Then, the server applies an attention mechanism to the initial sample image features to obtain processed sample image features corresponding to the sample apartment images. Next, the server fuses the initial and processed sample image features to obtain fused sample image features corresponding to the sample apartment images. Then, based on the fused sample image features, the server determines the predicted mask images corresponding to the key substation equipment in the sample substation. Next, the server obtains the actual mask images corresponding to the key substation equipment in the sample substation, and obtains the target loss value based on the difference between the predicted and actual mask images. Finally, based on the target loss value, the server iteratively trains the image segmentation model to be trained to obtain the trained image segmentation model.

[0115] In this embodiment, by pre-training the image segmentation model, it is convenient to predict the mask images corresponding to the key power distribution equipment in the power distribution room after obtaining the floor plan image of the power distribution room to be modeled in practical applications. Moreover, the image segmentation model receives new data in each iteration, and performs internal model improvement and optimization, which makes it easier to make predictions more effectively and improves the prediction accuracy of the image segmentation model.

[0116] In an exemplary embodiment, the image segmentation model to be trained is iteratively trained based on the difference between the predicted mask image and the actual mask image to obtain a trained image segmentation model. Specifically, this includes: obtaining cross-entropy loss, smoothing loss, and mean absolute error loss based on the difference between the predicted mask image and the actual mask image; performing weighted summation on the cross-entropy loss, smoothing loss, and mean absolute error loss to obtain a target loss value; and iteratively training the image segmentation model to be trained based on the target loss value to obtain a trained image segmentation model.

[0117] Cross-entropy loss is an indicator used to measure the difference between the prediction results of the classification model and the true labels.

[0118] Among them, the smoothed loss value refers to the loss value after smoothing the loss function.

[0119] The mean absolute error loss value refers to the average value used to measure the absolute error between the predicted value and the actual value.

[0120] The target loss value refers to the loss value obtained by weighted summation of the cross-entropy loss value, the smoothing loss value, and the mean absolute error loss value.

[0121] For example, the server obtains cross-entropy loss, smoothing loss, and mean absolute error loss based on the difference between the predicted mask image and the actual mask image. Then, the server performs a weighted summation of the cross-entropy loss, smoothing loss, and mean absolute error loss to obtain a weighted summation loss value, which is used as the target loss value. Next, the server adjusts the model parameters of the image segmentation model to be trained based on the target loss value. Then, the server retrains the image segmentation model with adjusted model parameters until the target loss value obtained by the trained image segmentation model is less than the loss value threshold, at which point training stops, and the trained image segmentation model is taken as the trained image segmentation model.

[0122] For example, the server can obtain the cross-entropy loss value using the following formula:

[0123] Equation (1)

[0124] in, This refers to the cross-entropy loss value. This refers to the total number of categories obtained by classifying the categories in the mask image. This refers to the label corresponding to the category in the actual mask image. It refers to predicting the probability of the corresponding category in the mask image.

[0125] For example, the server can obtain the smoothing loss value using the following formula:

[0126] Equation (2)

[0127] in, This refers to the smoothing loss value. This refers to the number of anchor points in the mask image used in the calculation. This refers to the label corresponding to the category in the actual mask image. This refers to predicting the parameters (such as position, size, etc.) corresponding to the mask image. This refers to the parameters corresponding to the actual mask image.

[0128] For example, the server can obtain the mean absolute error loss value using the following formula:

[0129] Equation (3)

[0130] in, This refers to the mean absolute error loss value. This represents the total number of pixels. This refers to the pixel values ​​in the actual mask image. It refers to predicting pixel values ​​in a mask image.

[0131] For example, the server can obtain the target loss value using the following formula:

[0132] Equation (4)

[0133] Where L refers to the target loss value.

[0134] In this embodiment, by calculating the cross-entropy loss value, smoothing loss value, and mean absolute error loss value, the performance of the image segmentation model to be trained can be evaluated from different perspectives, thereby making the target loss value more accurate. This allows the model to move towards reducing the target loss value in each iteration, which is beneficial to improving the training quality of the image segmentation model.

[0135] In an exemplary embodiment, step S103, which determines the target vertex coordinate information corresponding to the mask image, specifically includes the following: obtaining the initial vertex coordinate information corresponding to the mask image; determining the center point coordinate information, horizontal distance, and vertical distance corresponding to the mask image based on the initial vertex coordinate information; and determining the target vertex coordinate information based on the center point coordinate information, horizontal distance, and vertical distance.

[0136] The initial vertex coordinate information refers to the original vertex coordinate values ​​corresponding to the mask image.

[0137] The center point coordinate information refers to the center point coordinate value corresponding to the mask image, including the horizontal coordinate value and the vertical coordinate value of the center point.

[0138] The horizontal distance is used to represent the distance between two specific points in the horizontal direction of the mask image.

[0139] The vertical distance is used to represent the distance between two specific points in the vertical direction of the mask image.

[0140] For example, the server obtains the initial vertex coordinate information corresponding to the mask image; then, based on the initial vertex coordinate information, the server determines the maximum x-coordinate value, minimum x-coordinate value, maximum y-coordinate value, and minimum y-coordinate value corresponding to the initial vertex coordinate information; then, based on the maximum x-coordinate value, minimum x-coordinate value, maximum y-coordinate value, and minimum y-coordinate value corresponding to the initial vertex coordinate information, the server determines the center point coordinate information, horizontal distance, and vertical distance corresponding to the mask image; then, based on the center point coordinate information, horizontal distance, and vertical distance, the server determines the vertex coordinate information corresponding to the center point coordinate information, horizontal distance, and vertical distance, as the target vertex coordinate information.

[0141] For example, the server can obtain the maximum x-coordinate, minimum x-coordinate, maximum y-coordinate, and minimum y-coordinate values ​​corresponding to the initial vertex coordinate information using the following formula:

[0142] x min =min(x1, x2, x3, x4), formula (5)

[0143] x max =max(x1,x2,x3,x4), formula (6)

[0144] y min =min(y1, y2, y3, y4), formula (7)

[0145] y max =max(y1, y2, y3, y4), formula (8)

[0146] The initial vertex coordinates are A(x1, y1), B(x2, y2), C(x3, y3), and D(x4, y4), respectively. min This refers to the minimum x-coordinate value. max This refers to the maximum x-coordinate value, y min This refers to the minimum ordinate value, y max This refers to the maximum ordinate value.

[0147] For example, the server can determine the center point coordinates of the mask image using the following formula:

[0148] x center = (x min +x max ) / 2, Equation (9)

[0149] y center =(y min +y max ) / 2, Equation (10)

[0150] Where, x center This refers to the x-coordinate value of the center point, y center This refers to the ordinate value of the center point.

[0151] For example, the server can determine the horizontal distance corresponding to the mask image using the following formula:

[0152] Equation (11)

[0153] Where w refers to the horizontal distance.

[0154] For example, the server can determine the vertical distance corresponding to the mask image using the following formula:

[0155] Equation (12)

[0156] Where h refers to the vertical distance.

[0157] For example, through the above processing, the coordinates of the target vertex can be:

[0158]

[0159]

[0160]

[0161]

[0162] In this embodiment, the center point coordinates, horizontal distance, and vertical distance are determined based on the initial vertex coordinates, realizing the transformation from vertex information to more generalized spatial features. Moreover, the target vertex coordinates are determined based on the center point coordinates, horizontal distance, and vertical distance, which allows for flexible adjustment according to specific needs, thereby providing a data foundation for subsequent data analysis.

[0163] In one exemplary embodiment, such as Figure 4 As shown, another method for constructing a 3D model of a power distribution room is provided. Taking the application of this method to a server as an example, the method includes the following steps:

[0164] Step S401: Obtain the floor plan image corresponding to the power distribution room to be modeled.

[0165] Step S402: Using the trained image segmentation model, feature extraction is performed on the apartment layout image to obtain the initial image features corresponding to the apartment layout image.

[0166] Step S403: Perform feature extraction processing on the initial image features to obtain the first image features corresponding to the apartment layout image.

[0167] Step S404: The initial image features and the first image features are fused to obtain the second image features corresponding to the apartment layout image.

[0168] Step S405: Perform feature extraction processing on the second image features to obtain the third image features corresponding to the apartment layout image.

[0169] Step S406: Normalize the third image features to obtain the fourth image features corresponding to the apartment layout image.

[0170] Step S407: Perform feature extraction processing on the fourth image features again to obtain the fifth image features corresponding to the apartment layout image.

[0171] Step S408: Perform a weighted summation on the initial image features and the fifth image features to obtain the processed image features.

[0172] Step S409: The initial image features and the processed image features are fused to obtain the fused image features corresponding to the apartment layout image. Based on the fused image features, the mask images corresponding to the key power distribution room equipment in the power distribution room are determined.

[0173] Step S410: Obtain the initial vertex coordinate information corresponding to the mask image; determine the center point coordinate information, horizontal distance, and vertical distance corresponding to the mask image based on the initial vertex coordinate information; determine the target vertex coordinate information based on the center point coordinate information, horizontal distance, and vertical distance.

[0174] Step S411: Based on the target vertex coordinate information and the structural information of the power distribution room, determine the target equipment model corresponding to the key power distribution room equipment.

[0175] Step S412: Determine the unit structure vector data corresponding to the mask image, and construct the three-dimensional model of the power distribution room based on the unit structure vector data and the target equipment model.

[0176] In the aforementioned method for constructing a 3D model of a power distribution room, during the process of constructing the 3D model, a trained image segmentation model is used to process the floor plan image corresponding to the power distribution room to be modeled. This accurately determines the mask image corresponding to the key power distribution equipment in the power distribution room, thereby accurately determining the target vertex coordinate information corresponding to the mask image. Consequently, the target equipment model corresponding to the key power distribution equipment can be accurately determined. Combined with the floor plan structure vector data corresponding to the mask image, the 3D model of the power distribution room can be constructed more accurately, which is beneficial to improving the accuracy of the 3D model construction. Moreover, the entire process does not require manual intervention, avoiding the subjective factors and errors that are prone to occur in manual construction, which leads to low accuracy in the 3D model construction of the power distribution room. This further improves the accuracy of the 3D model construction of the power distribution room.

[0177] In an exemplary embodiment, to more clearly illustrate the method for constructing a three-dimensional model of a power distribution room provided in this application, the following specific embodiment will be used to describe the method in detail. In one embodiment, as follows... Figure 5 As shown, this application also provides a method for three-dimensional digital modeling of power distribution rooms based on artificial intelligence. In the process of constructing a three-dimensional model of the power distribution room, firstly, an Attention CNN model is used to segment the floor plan of the power distribution room to obtain mask images of key elements. Then, the mask images are precisely registered with the floor plan structure vector data of the power distribution room to obtain the floor plan structure vector data corresponding to the mask images. Next, the coordinates of the four initial vertices in the mask images are adjusted to obtain the adjusted vertex coordinates. Then, based on the adjusted vertex coordinates and the structural information of the power distribution room, a device model matching the key elements is selected from a preset model library. Finally, based on the device model matching the key elements and the floor plan structure vector data corresponding to the mask images, a three-dimensional model of the power distribution room is constructed. Specifically, it includes the following:

[0178] Step 1, Floor Plan Instance Segmentation Stage:

[0179] In this stage, Attention CNN is used to perform deep learning-driven instance segmentation on the floor plan of the power distribution room. Attention CNN is able to identify and segment key elements in the image, such as switch cabinets, distribution cabinets, and transformers. This process automatically generates mask images of these elements, providing accurate two-dimensional data for subsequent modeling work.

[0180] The attention mechanism consists of three parts: three 1×1 convolutions (Conv 1×1), layer normalization (LayerNorn), and a softmax activation function, as follows: Figure 3 As shown.

[0181] Among them, the structure diagram of a convolutional neural network with an attention mechanism, such as Figure 2 As shown.

[0182] The loss function L consists of three parts:

[0183] Equation (4)

[0184] Equation (1)

[0185] in, This is the loss function in the first part. Does the anchor contain the object's binary tag? The model predicts the probability that the anchor point contains an object. This refers to the number of anchor points involved in the calculation. It is an indicator function.

[0186] Equation (2)

[0187] in, This is the loss function in the second part. These are the predicted bounding box parameters. These are the actual bounding box parameters. This is the number of anchor points involved in the calculation.

[0188] Equation (3)

[0189] in, This is the loss function in the third part. Indicates the total number of pixels. It is the actual value. This is a predicted value.

[0190] The second step, image registration stage:

[0191] Using image registration techniques, the mask image obtained in the previous step ( Figure 2 The mask output is precisely registered with the vector data of the power distribution room's floor plan. This step ensures the correspondence between the two-dimensional image data and the actual three-dimensional space, providing an accurate spatial reference for subsequent three-dimensional modeling.

[0192] Step 3, coordinate calculation stage:

[0193] Based on image registration, the vertex coordinates of the circumscribed rectangle in the mask image are calculated. These coordinates are directly related to the spatial location of each device inside the power distribution room, providing necessary data support for the accurate placement of the model.

[0194] Suppose that the circumscribed rectangle in the mask image is defined by four vertices, namely A(x1, y1), B(x2, y2), C(x3, y3), and D(x4, y4).

[0195] (1) Determine the minimum and maximum coordinates of the bounding box, that is, find the minimum and maximum values ​​of the x and y coordinates of the four vertices:

[0196] x min =min(x1, x2, x3, x4), formula (5)

[0197] x max =max(x1,x2,x3,x4), formula (6)

[0198] y min =min(y1, y2, y3, y4), formula (7)

[0199] y max =max(y1, y2, y3, y4), formula (8)

[0200] x min x max y min y max These variables represent the minimum and maximum x-coordinates and the minimum and maximum y-coordinates of the four vertices of the circumscribed rectangle, respectively.

[0201] (2) Calculate the center point of the bounding box, i.e., the geometric center of the bounding box, by taking the average of the minimum and maximum values ​​of the x and y coordinates:

[0202] x center = (x min +x max ) / 2, Equation (9)

[0203] y center =(y min +y max ) / 2, Equation (10)

[0204] x center y center These two variables represent the x and y coordinates of the center point of the circumscribed rectangle.

[0205] (3) Calculate the width and height of the bounding box, that is, the horizontal and vertical distances from the center point to the edge of the bounding box:

[0206] Equation (11)

[0207] Equation (12)

[0208] The variable w represents the width of the circumscribed rectangle; the variable h represents the height of the circumscribed rectangle.

[0209] (4) Calculate the coordinates of the four vertices of the circumscribed rectangle. These coordinates are calculated based on the center point, width, and height, ensuring that the rectangle completely contains all vertices:

[0210]

[0211] )

[0212]

[0213]

[0214] A′, B′, C′, and D′ represent the new coordinates of the four vertices of the adjusted circumscribed rectangle. Here, A′ is the bottom-left vertex, B′ is the bottom-right vertex, C′ is the top-right vertex, and D′ is the top-left vertex.

[0215] Step 4, Model Library Adaptation Phase:

[0216] Based on the calculated coordinates and the specific structure of the power distribution room, suitable switchgear, distribution cabinet, and transformer models are selected from a pre-set model library. This step involves model selection and adjustment to ensure optimal matching between the model and the actual equipment in terms of size and function.

[0217] Step 5, 3D scene visualization stage:

[0218] Finally, using professional 3D visualization tools (such as Babylon.js), combined with adapted equipment models and floor plan vector data, a 3D model of the power distribution room is constructed. This stage not only completes the 3D construction of the model but also enables online display and interaction, providing users with an intuitive virtual experience.

[0219] In the above embodiment, during the construction of a 3D model of a power distribution room, a trained image segmentation model is used to process the floor plan image corresponding to the power distribution room to be modeled. This accurately determines the mask images corresponding to key power distribution equipment in the power distribution room, thereby accurately determining the target vertex coordinates of the mask images. This, in turn, allows for the accurate determination of the target equipment model corresponding to the key power distribution equipment. Combined with the floor plan structure vector data corresponding to the mask images, the 3D model of the power distribution room can be constructed more accurately, improving the accuracy of the 3D model construction. Furthermore, the entire process requires no manual intervention, avoiding the subjective factors and errors inherent in manual construction methods, which can lead to lower accuracy in the 3D model construction. This further improves the overall accuracy of the 3D model construction. Simultaneously, by employing Attention... CNNs, through their attention mechanism, can focus more intently on key parts of an image, improving the model's accuracy in recognizing and segmenting equipment inside a power distribution room, such as switchgear, distribution cabinets, and transformers. The introduction of the attention mechanism allows the model to better capture long-distance dependencies, enhancing its ability to handle complex scenes. Image registration ensures the correspondence between 2D image data and actual 3D space, improving the model's spatial localization accuracy and providing accurate spatial references for subsequent 3D modeling. By calculating the vertex coordinates of the circumscribed rectangle in the mask image, necessary data support is provided for precise model placement, enhancing the model's spatial localization capabilities. The accuracy of the model is ensured; based on the calculated coordinates and the specific structure of the power distribution room, a suitable model is selected from the preset model library to ensure the best match between the model and the actual equipment in terms of size and function, thereby improving the model's practicality and adaptability; a 3D visualization tool is used to construct a 3D model of the power distribution room and realize online display and interaction, providing users with an intuitive virtual experience and enhancing the model's visualization effect and interactivity; the loss function L consists of three parts, including the binary label loss of object existence, the regression loss of bounding box parameters, and the segmentation loss of pixels. These three parts work together to improve the model's performance in instance segmentation tasks.

[0220] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0221] Based on the same inventive concept, this application also provides a three-dimensional model construction device for a power distribution room to implement the above-mentioned method for constructing a three-dimensional model of a power distribution room. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the three-dimensional model construction device for a power distribution room provided below can be found in the limitations of the three-dimensional model construction method for a power distribution room described above, and will not be repeated here.

[0222] In one exemplary embodiment, such as Figure 6 As shown, a three-dimensional model construction device for a power distribution room is provided, including: an image acquisition module 601, a model processing module 602, a coordinate determination module 603, a model determination module 604, and a model construction module 605, wherein:

[0223] The image acquisition module 601 is used to acquire the floor plan image corresponding to the power distribution room to be modeled.

[0224] The model processing module 602 is used to perform feature extraction processing on the apartment layout image through the trained image segmentation model to obtain the initial image features corresponding to the apartment layout image, perform attention mechanism processing on the initial image features to obtain the processed image features corresponding to the apartment layout image, perform fusion processing on the initial image features and the processed image features to obtain the fused image features corresponding to the apartment layout image, and determine the mask image corresponding to the key power distribution room equipment in the power distribution room based on the fused image features.

[0225] The coordinate determination module 603 is used to determine the target vertex coordinate information corresponding to the mask image.

[0226] The model determination module 604 is used to determine the target equipment model corresponding to the key power distribution room equipment based on the target vertex coordinate information and the structural information of the power distribution room.

[0227] The model building module 605 is used to determine the unit structure vector data corresponding to the mask image, and to build a three-dimensional model of the power distribution room based on the unit structure vector data and the target equipment model.

[0228] In an exemplary embodiment, the model processing module 602 is further configured to perform feature extraction processing on the initial image features to obtain the first image features corresponding to the apartment layout image; perform fusion processing on the initial image features and the first image features to obtain the second image features corresponding to the apartment layout image; and obtain the processed image features based on the initial image features and the second image features.

[0229] In an exemplary embodiment, the model processing module 602 is further configured to perform feature extraction processing on the second image features to obtain the third image features corresponding to the apartment layout image; perform normalization processing on the third image features to obtain the fourth image features corresponding to the apartment layout image; perform feature extraction processing on the fourth image features again to obtain the fifth image features corresponding to the apartment layout image; and perform weighted summation processing on the initial image features and the fifth image features to obtain the processed image features.

[0230] In an exemplary embodiment, the 3D model construction device for the power distribution room further includes a model training module, used to acquire sample apartment images corresponding to the sample power distribution room; through the image segmentation model to be trained, feature extraction processing is performed on the sample apartment images to obtain initial sample image features corresponding to the sample apartment images; attention mechanism processing is performed on the initial sample image features to obtain processed sample image features corresponding to the sample apartment images; the initial sample image features and processed sample image features are fused to obtain fused sample image features corresponding to the sample apartment images; based on the fused sample image features, the prediction mask images corresponding to the key power distribution room equipment in the sample power distribution room are determined; the actual mask images corresponding to the key power distribution room equipment in the sample power distribution room are acquired; and based on the difference between the prediction mask images and the actual mask images, the image segmentation model to be trained is iteratively trained to obtain the trained image segmentation model.

[0231] In an exemplary embodiment, the model training module is further configured to obtain cross-entropy loss, smoothing loss, and mean absolute error loss based on the difference between the predicted mask image and the actual mask image; perform weighted summation on the cross-entropy loss, smoothing loss, and mean absolute error loss to obtain a target loss value; and iteratively train the image segmentation model to be trained based on the target loss value to obtain a trained image segmentation model.

[0232] In an exemplary embodiment, the coordinate determination module 603 is further configured to obtain the initial vertex coordinate information corresponding to the mask image; determine the center point coordinate information, horizontal distance, and vertical distance corresponding to the mask image based on the initial vertex coordinate information; and determine the target vertex coordinate information based on the center point coordinate information, horizontal distance, and vertical distance.

[0233] Each module in the aforementioned 3D model construction device for power distribution rooms can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0234] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data such as floor plan images and mask images. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for constructing a 3D model of a power distribution room.

[0235] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0236] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0237] In one exemplary embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above-described method embodiments.

[0238] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0239] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0240] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0241] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for constructing a three-dimensional model of a power distribution room, characterized in that, The method includes: Obtain the floor plan image corresponding to the power distribution room to be modeled; The trained image segmentation model is used to extract features from the apartment layout image to obtain initial image features. The initial image features are then processed using an attention mechanism to obtain processed image features. The initial image features and the processed image features are then fused to obtain fused image features. Based on the fused image features, the mask images corresponding to the key power distribution equipment in the power distribution room are determined. The target vertex coordinates corresponding to the mask image are determined; Based on the target vertex coordinate information and the structural information of the power distribution room, the target equipment model corresponding to the key power distribution room equipment is determined; The unit structure vector data corresponding to the mask image is determined, and a three-dimensional model of the power distribution room is constructed based on the unit structure vector data and the target equipment model. The trained image segmentation model is obtained through the following method: Obtain the sample apartment layout image corresponding to the sample power distribution room; The image segmentation model to be trained is used to extract features from the sample apartment image to obtain the initial sample image features corresponding to the sample apartment image. The initial sample image features are then processed by an attention mechanism to obtain the processed sample image features corresponding to the sample apartment image. The initial sample image features and the processed sample image features are then fused to obtain the fused sample image features corresponding to the sample apartment image. Based on the fused sample image features, the prediction mask image corresponding to the key power distribution room equipment in the sample power distribution room is determined. Obtain the actual mask images corresponding to the key power distribution equipment in the sample power distribution room; Based on the difference between the predicted mask image and the actual mask image, the cross-entropy loss value, the smoothing loss value, and the mean absolute error loss value are obtained. The target loss value is obtained by weighted summation of the cross-entropy loss value, the smoothing loss value, and the mean absolute error loss value. Based on the target loss value, the image segmentation model to be trained is iteratively trained to obtain the trained image segmentation model.

2. The method according to claim 1, characterized in that, The process of applying an attention mechanism to the initial image features to obtain the processed image features corresponding to the apartment layout image includes: The initial image features are subjected to feature extraction processing to obtain the first image features corresponding to the apartment layout image; The initial image features and the first image features are fused together to obtain the second image features corresponding to the apartment layout image; The processed image features are obtained based on the initial image features and the second image features.

3. The method according to claim 2, characterized in that, The step of obtaining the processed image features based on the initial image features and the second image features includes: The second image features are subjected to feature extraction processing to obtain the third image features corresponding to the apartment layout image; The third image feature is normalized to obtain the fourth image feature corresponding to the apartment layout image; The fourth image feature is subjected to further feature extraction processing to obtain the fifth image feature corresponding to the apartment layout image; The initial image features and the fifth image features are weighted and summed to obtain the processed image features.

4. The method according to any one of claims 1 to 3, characterized in that, Determining the target vertex coordinate information corresponding to the mask image includes: Obtain the initial vertex coordinate information corresponding to the mask image; Based on the initial vertex coordinate information, the center point coordinate information, horizontal distance, and vertical distance corresponding to the mask image are determined; The coordinates of the target vertex are determined based on the center point coordinates, the horizontal distance, and the vertical distance.

5. A device for constructing a three-dimensional model of a power distribution room, characterized in that, The device includes: The image acquisition module is used to acquire the floor plan image of the power distribution room to be modeled; The model processing module is used to perform feature extraction processing on the apartment layout image through a trained image segmentation model to obtain the initial image features corresponding to the apartment layout image, perform attention mechanism processing on the initial image features to obtain the processed image features corresponding to the apartment layout image, perform fusion processing on the initial image features and the processed image features to obtain the fused image features corresponding to the apartment layout image, and determine the mask image corresponding to the key power distribution room equipment in the power distribution room based on the fused image features. The coordinate determination module is used to determine the target vertex coordinate information corresponding to the mask image; The model determination module is used to determine the target equipment model corresponding to the key power distribution room equipment based on the target vertex coordinate information and the structural information of the power distribution room; The model building module is used to determine the apartment structure vector data corresponding to the mask image, and to build a three-dimensional model of the power distribution room based on the apartment structure vector data and the target equipment model. The device further includes a model training module for acquiring sample apartment images corresponding to sample power distribution rooms; performing feature extraction processing on the sample apartment images using the image segmentation model to be trained to obtain initial sample image features corresponding to the sample apartment images; applying an attention mechanism to the initial sample image features to obtain processed sample image features corresponding to the sample apartment images; fusing the initial sample image features and the processed sample image features to obtain fused sample image features corresponding to the sample apartment images; determining the prediction mask images corresponding to the key power distribution room equipment in the sample power distribution room based on the fused sample image features; acquiring the actual mask images corresponding to the key power distribution room equipment in the sample power distribution room; obtaining cross-entropy loss values, smoothing loss values, and mean absolute error loss values ​​based on the differences between the prediction mask images and the actual mask images; performing weighted summation processing on the cross-entropy loss values, the smoothing loss values, and the mean absolute error loss values ​​to obtain a target loss value; and iteratively training the image segmentation model to be trained based on the target loss value to obtain the trained image segmentation model.

6. The apparatus according to claim 5, characterized in that, The model processing module is further configured to perform feature extraction processing on the initial image features to obtain the first image features corresponding to the apartment layout image; perform fusion processing on the initial image features and the first image features to obtain the second image features corresponding to the apartment layout image; and obtain the processed image features based on the initial image features and the second image features.

7. The apparatus according to claim 6, characterized in that, The model processing module is further configured to perform feature extraction processing on the second image features to obtain the third image features corresponding to the apartment layout image; perform normalization processing on the third image features to obtain the fourth image features corresponding to the apartment layout image; perform feature extraction processing on the fourth image features again to obtain the fifth image features corresponding to the apartment layout image; and perform weighted summation processing on the initial image features and the fifth image features to obtain the processed image features.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

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

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method and device for training image processing model and image processing

    CN115641481A

  • Three-dimensional modeling method and system based on two-dimensional data of power distribution station house and electronic equipment

    CN117830509A