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

Through the image segmentation model, the distribution room apartment image is extracted and the attention mechanism is processed, the mask image and target vertex coordinate information of key equipment are determined, and the three-dimensional model is constructed based on structural information, which solves the problem of low accuracy in the construction of the three-dimensional model of the distribution room in the existing technology, and achieves higher construction accuracy and reliability.

CN120014154AActive Publication Date: 2025-05-16GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, there are subjective factors in the construction of three-dimensional model of distribution rooms, resulting in low construction accuracy.

Method used

By obtaining the floor image of the distribution room, using the trained image segmentation model for feature extraction and attention mechanism processing, determining the mask image and target vertex coordinate information of key equipment, and building a three-dimensional model based on structural information.

Benefits of technology

It improves the accuracy of the construction of the three-dimensional model of the distribution room, reduces manual intervention, avoids errors caused by subjective factors, and enhances the reliability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120014154A_ABST
    Figure CN120014154A_ABST
Patent Text Reader

Abstract

The invention 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 steps of performing feature extraction processing on a house type image corresponding to a to-be-modeled power distribution room through a trained image segmentation model to obtain initial image features, performing attention mechanism processing on the initial image features to obtain processed image features, and performing fusion processing on the initial image features and the processed image features to obtain a fused image; according to the fused image features, determining a mask image corresponding to key power distribution room equipment in the power distribution room; 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 the structure information of the power distribution room; and constructing a three-dimensional model corresponding to the power distribution room according to the house type structure vector data corresponding to the mask image and the target equipment model. By adopting the method, the construction accuracy of the three-dimensional model of the power distribution room can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

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

[0003] In traditional technology, manual construction is generally used in the process of constructing a three-dimensional model of a distribution room. However, this manual construction method has subjective factors and is prone to errors, resulting in low construction accuracy of the three-dimensional model of the distribution room. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for constructing a three-dimensional model of a distribution room, which can improve the construction accuracy of the three-dimensional model of the distribution room, in order to address the above technical problems.

[0005] In a first aspect, the present application provides a method for constructing a three-dimensional model of a power distribution room, comprising:

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

[0007] Perform feature extraction processing on the apartment image through the trained image segmentation model to obtain initial image features corresponding to the apartment image, perform attention mechanism processing on the initial image features to obtain processed image features corresponding to the apartment image, perform fusion processing on the initial image features and the processed image features to obtain fused image features corresponding to the apartment image, and determine the mask image corresponding to the key distribution room equipment in the distribution room according to the fused image features;

[0008] Determine the target vertex coordinate information corresponding to the mask image;

[0009] Determine the target device model corresponding to the key power distribution room equipment according to the target vertex coordinate information and the structural information of the power distribution room;

[0010] The apartment structure vector data corresponding to the mask image is determined, and a three-dimensional model corresponding to the power distribution room is constructed according to the apartment structure vector data and the target device model.

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

[0012] Performing feature extraction processing on the initial image features to obtain first image features corresponding to the apartment image;

[0013] Performing a fusion process on the initial image feature and the first image feature to obtain a second image feature corresponding to the apartment image;

[0014] The processed image feature is obtained according to the initial image feature and the second image feature.

[0015] In one embodiment, obtaining the processed image feature according to the initial image feature and the second image feature includes:

[0016] Performing feature extraction processing on the second image feature to obtain a third image feature corresponding to the apartment image;

[0017] Normalizing the third image feature to obtain a fourth image feature corresponding to the apartment image;

[0018] Performing feature extraction processing on the fourth image feature again to obtain a fifth image feature corresponding to the apartment image;

[0019] A weighted sum process is performed on the initial image feature and the fifth image feature to obtain the processed image feature.

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

[0021] Obtain sample apartment images corresponding to sample power distribution rooms;

[0022] Perform feature extraction processing on the sample apartment type image through the image segmentation model to be trained to obtain initial sample image features corresponding to the sample apartment type image, perform attention mechanism processing on the initial sample image features to obtain processed sample image features corresponding to the sample apartment type image, perform fusion processing on the initial sample image features and the processed sample image features to obtain fused sample image features corresponding to the sample apartment type image, and determine the predicted mask image corresponding to the key power distribution room equipment in the sample power distribution room according to the fused sample image features;

[0023] The actual mask image corresponding to the key power distribution room equipment in the sample power distribution room is obtained, and according to the difference between the predicted mask image and the actual mask image, the image segmentation model to be trained is iteratively trained to obtain the trained image segmentation model.

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

[0025] According to the difference between the predicted mask image and the actual mask image, a cross entropy loss value, a smoothing loss value and a mean absolute error loss value are obtained;

[0026] Performing weighted sum processing on the cross entropy loss value, the smoothing loss value, and the mean absolute error loss value to obtain a target loss value;

[0027] According to 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] Obtaining initial vertex coordinate information corresponding to the mask image;

[0030] Determine the center point coordinate information, horizontal distance and vertical distance corresponding to the mask image according to the initial vertex coordinate information;

[0031] The target vertex coordinate information is determined according to the center point coordinate information, the horizontal distance and the vertical distance.

[0032] In a second aspect, the present application also provides a device for constructing a three-dimensional model of a power distribution room, comprising:

[0033] An image acquisition module is used to acquire the apartment type image corresponding to the power distribution room to be modeled;

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

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

[0036] A model determination module, used to determine the target device model corresponding to the key power distribution room equipment according to 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 corresponding to the power distribution room according to the apartment structure vector data and the target device model.

[0038] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

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

[0040] Perform feature extraction processing on the apartment image through the trained image segmentation model to obtain initial image features corresponding to the apartment image, perform attention mechanism processing on the initial image features to obtain processed image features corresponding to the apartment image, perform fusion processing on the initial image features and the processed image features to obtain fused image features corresponding to the apartment image, and determine the mask image corresponding to the key distribution room equipment in the distribution room according to the fused image features;

[0041] Determine the target vertex coordinate information corresponding to the mask image;

[0042] Determine the target device model corresponding to the key power distribution room equipment according to the target vertex coordinate information and the structural information of the power distribution room;

[0043] The apartment structure vector data corresponding to the mask image is determined, and a three-dimensional model corresponding to the power distribution room is constructed according to the apartment structure vector data and the target device model.

[0044] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

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

[0046] Perform feature extraction processing on the apartment image through the trained image segmentation model to obtain initial image features corresponding to the apartment image, perform attention mechanism processing on the initial image features to obtain processed image features corresponding to the apartment image, perform fusion processing on the initial image features and the processed image features to obtain fused image features corresponding to the apartment image, and determine the mask image corresponding to the key distribution room equipment in the distribution room according to the fused image features;

[0047] Determine the target vertex coordinate information corresponding to the mask image;

[0048] Determine the target device model corresponding to the key power distribution room equipment according to the target vertex coordinate information and the structural information of the power distribution room;

[0049] The apartment structure vector data corresponding to the mask image is determined, and a three-dimensional model corresponding to the power distribution room is constructed according to the apartment structure vector data and the target device model.

[0050] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

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

[0052] Perform feature extraction processing on the apartment image through the trained image segmentation model to obtain initial image features corresponding to the apartment image, perform attention mechanism processing on the initial image features to obtain processed image features corresponding to the apartment image, perform fusion processing on the initial image features and the processed image features to obtain fused image features corresponding to the apartment image, and determine the mask image corresponding to the key distribution room equipment in the distribution room according to the fused image features;

[0053] Determine the target vertex coordinate information corresponding to the mask image;

[0054] Determine the target device model corresponding to the key power distribution room equipment according to the target vertex coordinate information and the structural information of the power distribution room;

[0055] The apartment structure vector data corresponding to the mask image is determined, and a three-dimensional model corresponding to the power distribution room is constructed according to the apartment structure vector data and the target device model.

[0056] The above-mentioned method, device, computer equipment, storage medium and computer program product for constructing a three-dimensional model of a distribution room first obtain the apartment image corresponding to the distribution room to be modeled, and use the trained image segmentation model to perform feature extraction processing on the apartment image to obtain the initial image features corresponding to the apartment image, perform attention mechanism processing on the initial image features to obtain the processed image features corresponding to the apartment image, fuse the initial image features and the processed image features to obtain the fused image features corresponding to the apartment image, and determine the mask image corresponding to the key distribution room equipment in the distribution room based on the fused image features, then determine the target vertex coordinate information corresponding to the mask image, and then determine the target equipment model corresponding to the key distribution room equipment based on the target vertex coordinate information and the structural information of the distribution room, and finally determine the apartment structure vector data corresponding to the mask image, and construct the three-dimensional model corresponding to the distribution room based on the apartment structure vector data and the target equipment model. In this way, in the process of constructing a three-dimensional model of the distribution room, the trained image segmentation model is used to perform a series of processing on the apartment type images corresponding to the distribution room to be modeled, so that the mask image corresponding to the key distribution room equipment in the distribution room can be accurately determined, so that the target vertex coordinate information corresponding to the mask image can be accurately determined, and then the target equipment model corresponding to the key distribution room equipment can be accurately determined, and combined with the apartment type structure vector data corresponding to the mask image, the three-dimensional model corresponding to the distribution room can be more accurately constructed, which is conducive to improving the construction accuracy of the three-dimensional model of the distribution room; moreover, the entire process does not require human intervention, avoiding the subjective factors in the manual construction method, which is prone to errors and leads to the defect of low construction accuracy of the three-dimensional model of the distribution room, thereby improving the construction accuracy of the three-dimensional model of the distribution room. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0058] Figure 1 A schematic diagram of a flow chart of a method for constructing a three-dimensional model of a power distribution room in one embodiment;

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

[0060] Figure 3 Schematic diagram of the structure of an attention mechanism module in one embodiment;

[0061] Figure 4 A schematic diagram of a flow chart of a method for constructing a three-dimensional model of a power distribution room in another embodiment;

[0062] Figure 5 A schematic diagram of a flow chart of a method for three-dimensional digital modeling of a power distribution room based on artificial intelligence in one embodiment;

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

[0064] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present 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, stored data, displayed data, 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 relevant data must comply with relevant regulations.

[0067] In an exemplary embodiment, Figure 1 As shown, a method for constructing a three-dimensional model of a power distribution room is provided. This embodiment uses the method applied to a server as an example for illustration; it can be understood that the method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be but is not limited to various personal computers, laptops, smart phones and tablets; the server can be implemented as an independent server or a server cluster composed of multiple servers. In this embodiment, the method includes the following steps:

[0068] Step S101, obtaining a house type image corresponding to the power distribution room to be modeled.

[0069] The power distribution room to be modeled refers to a power distribution room for which a three-dimensional model needs to be constructed.

[0070] The apartment type image is used to represent image information for visually displaying the internal space layout of the power distribution room.

[0071] Exemplarily, the server obtains identification information of the distribution room to be modeled in response to a three-dimensional model building instruction for the distribution room to be modeled; then, the server obtains the apartment type image corresponding to the identification information from the database based on the identification information as the apartment type image corresponding to the distribution room to be modeled.

[0072] Step S102, using the trained image segmentation model, perform feature extraction processing on the apartment type image to obtain initial image features corresponding to the apartment type image, perform attention mechanism processing on the initial image features to obtain processed image features corresponding to the apartment type image, perform fusion processing on the initial image features and the processed image features to obtain fused image features corresponding to the apartment type image, and determine the mask image corresponding to the key distribution room equipment in the distribution room based on the fused image features.

[0073] Among them, the image segmentation model refers to a network model that can use the apartment image corresponding to the distribution room to obtain the mask image corresponding to the key distribution room equipment in the distribution room, such as the Attention CNN (Convolutional Neural Network with Attention Mechanism) model.

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

[0075] Among them, the processed image features refer to the image features obtained by performing attention mechanism processing on the initial image features.

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

[0077] Among them, key distribution room equipment refers to distribution room equipment whose importance is greater than the preset importance, such as switch cabinets, distribution cabinets and transformers.

[0078] The mask image refers to the mask image corresponding to the key distribution room equipment in the distribution room.

[0079] Exemplarily, the server inputs the apartment image into a trained image segmentation model, performs feature extraction processing on the apartment image through the trained image segmentation model, and obtains image features corresponding to the apartment image as initial image features; then, the server performs attention mechanism processing on the initial image features to obtain processed image features corresponding to the apartment image; then, the server obtains the weights corresponding to the initial image features and the weights corresponding to the processed image features, and fuses the initial image features and the processed image features according to the weights corresponding to the initial image features and the weights corresponding to the processed image features to obtain fused image features corresponding to the apartment image; then, the server determines the initial mask image corresponding to the fused image features based on the fused image features; then, the server preprocesses the initial mask image to obtain the preprocessed initial mask image as the mask image corresponding to the key distribution room equipment in the distribution room.

[0080] For example, see Figure 2 The server takes the apartment image as input data and inputs it into the trained image segmentation model. The convolution layer in the image segmentation model is used to extract features of the apartment image, and the region proposal network in the image segmentation model is used to obtain the initial image features corresponding to the apartment image. Then, the server inputs the initial image features into the attention mechanism module, and performs attention mechanism processing on the initial image features through the attention mechanism module to obtain the processed image features corresponding to the apartment image. Then, the server fuses the initial image features and the processed image features to obtain the fused image features corresponding to the apartment image. Then, the server inputs the fused image features into the mask branch in the image segmentation model, and determines the mask image corresponding to the key distribution room equipment in the distribution room through the mask branch.

[0081] Step S103, determining the target vertex coordinate information corresponding to the mask image.

[0082] The target vertex coordinate information refers to the adjusted vertex coordinate information corresponding to the mask image.

[0083] Exemplarily, the server obtains initial vertex coordinate information corresponding to the mask image; then, the server adjusts the initial vertex coordinate information to obtain adjusted vertex coordinate information corresponding to the mask image as target vertex coordinate information corresponding to the mask image.

[0084] Step S104, determining the target device model corresponding to the key power distribution room equipment according to the target vertex coordinate information and the structure information of the power distribution room.

[0085] The structural information includes the shape and size of the distribution room.

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

[0087] Exemplarily, the server selects a device model corresponding to the target vertex coordinate information and the structure information of the power distribution room from a preset device model library according to the target vertex coordinate information and the structure information of the power distribution room as the target device model corresponding to the key power distribution room equipment.

[0088] Step S105, determining the apartment structure vector data corresponding to the mask image, and constructing a three-dimensional model corresponding to the power distribution room according to the apartment structure vector data and the target equipment model.

[0089] Among them, the apartment structure vector data is used to represent the digital data form that describes the spatial structure and geometric characteristics of the distribution room apartment, 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] Exemplarily, the server aligns the mask image with the apartment structure vector data of the distribution room to obtain the apartment structure vector data corresponding to the mask image; then, the server uses a three-dimensional visualization tool to construct a three-dimensional model corresponding to the apartment structure vector data and the target device model based on the apartment structure vector data and the target device model, as the three-dimensional model corresponding to the distribution room.

[0091] It should be noted that the three-dimensional visualization tool includes Babylon.js (a three-dimensional visualization tool).

[0092] In the above-mentioned method for constructing a three-dimensional model of a distribution room, first, the apartment image corresponding to the distribution room to be modeled is obtained, and the apartment image is subjected to feature extraction processing through the trained image segmentation model to obtain the initial image features corresponding to the apartment image, and the initial image features are subjected to attention mechanism processing to obtain the processed image features corresponding to the apartment image, and the initial image features and the processed image features are fused to obtain the fused image features corresponding to the apartment image, and the mask image corresponding to the key distribution room equipment in the distribution room is determined according to the fused image features, and then the target vertex coordinate information corresponding to the mask image is determined, and then, according to the target vertex coordinate information and the structural information of the distribution room, the target equipment model corresponding to the key distribution room equipment is determined, and finally, the apartment structure vector data corresponding to the mask image is determined, and according to the apartment structure vector data and the target equipment model, the three-dimensional model corresponding to the distribution room is constructed. In this way, in the process of constructing a three-dimensional model of the distribution room, the trained image segmentation model is used to perform a series of processing on the apartment type images corresponding to the distribution room to be modeled, so that the mask image corresponding to the key distribution room equipment in the distribution room can be accurately determined, so that the target vertex coordinate information corresponding to the mask image can be accurately determined, and then the target equipment model corresponding to the key distribution room equipment can be accurately determined, and combined with the apartment type structure vector data corresponding to the mask image, the three-dimensional model corresponding to the distribution room can be more accurately constructed, which is conducive to improving the construction accuracy of the three-dimensional model of the distribution room; moreover, the entire process does not require human intervention, avoiding the subjective factors in the manual construction method, which is prone to errors and leads to the defect of low construction accuracy of the three-dimensional model of the distribution room, thereby improving the construction accuracy of the three-dimensional model of the distribution room.

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

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

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

[0096] Exemplarily, 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 image; then, the server obtains the weights corresponding to the initial image features and the weights corresponding to the first image features, and fuses the initial image features and the first image features according to the weights corresponding to the initial image features and the weights corresponding to the first image features to obtain the second image features corresponding to the apartment image; then, the server obtains the processed image features based on the initial image features and the second image features.

[0097] For example, see Figure 3 The server takes the initial image features as input features and inputs the initial image features into the attention mechanism module in the image segmentation model. The initial image features are subjected to feature extraction processing through the convolution layer in the attention mechanism module, and the first image features corresponding to the apartment 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 apartment image. Then, 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, so that more potential feature information in the apartment image can be mined; and the initial image feature is fused with the first image feature to obtain the second image feature, so that the second image feature contains more comprehensive feature information, thereby providing a sufficient data basis for subsequent data analysis.

[0099] In an exemplary embodiment, a processed image feature is obtained based on the initial image feature and the second image feature, which specifically includes the following contents: performing feature extraction processing on the second image feature to obtain a third image feature corresponding to the apartment type image; performing normalization processing on the third image feature to obtain a fourth image feature corresponding to the apartment type image; performing feature extraction processing on the fourth image feature again to obtain a fifth image feature corresponding to the apartment type image; performing weighted sum processing on the initial image feature and the fifth image feature to obtain the processed image feature.

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

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

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

[0103] Exemplarily, the server performs feature extraction processing on the second image feature through the attention mechanism module in the image segmentation model to obtain the third image feature corresponding to the apartment type image; then, the server performs normalization processing on the third image feature to obtain the normalized third image feature as the fourth image feature corresponding to the apartment type image; then, the server performs feature extraction processing on the fourth image feature again to obtain the fifth image feature corresponding to the apartment type image; then, the server obtains the weight corresponding to the initial image feature and the weight corresponding to the fifth image feature, and performs weighted sum processing on the initial image feature and the fifth image feature according to the weight corresponding to the initial image feature and the weight corresponding to the fifth image feature to obtain the processed image feature.

[0104] For example, see Figure 3 , the server performs feature extraction processing on the second image feature through the convolution layer in the image segmentation model to obtain the third image feature corresponding to the apartment type image; then, the server performs normalization processing on the third image feature through the layer normalization module in the image segmentation model to obtain the fourth image feature corresponding to the apartment type image; then, the server performs feature extraction processing on the fourth image feature again through the convolution layer in the image segmentation model to obtain the fifth image feature corresponding to the apartment type image; then, the server performs weighted sum processing on the initial image feature and the fifth image feature to obtain the processed image feature.

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

[0106] In an exemplary embodiment, the method for constructing a three-dimensional model of a distribution room provided in the present application also includes a training step for a trained image segmentation model, which specifically includes the following contents: obtaining a sample apartment image corresponding to a sample distribution room; performing feature extraction processing on the sample apartment image through 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 the processed sample image features to obtain fused sample image features corresponding to the sample apartment image, and determining the predicted mask image corresponding to the key distribution room equipment in the sample distribution room based on the fused sample image features; obtaining the actual mask image corresponding to the key distribution room equipment in the sample distribution room, and 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 a trained image segmentation model.

[0107] The sample power distribution room refers to a power distribution room used to train the image segmentation model to be trained.

[0108] The sample apartment image refers to the apartment image corresponding to the sample power distribution room.

[0109] The initial sample image features refer to the initial image features corresponding to the sample apartment image.

[0110] The processed sample image features refer to the image features obtained by performing attention mechanism processing on the initial sample image features.

[0111] The fused sample image features refer to image features obtained by fusing the initial sample image features and the processed sample image features.

[0112] The predicted mask image refers to the predicted value of the mask image corresponding to the key distribution room equipment in the sample distribution room.

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

[0114] Exemplarily, in response to a model training instruction for an image segmentation model to be trained, the server obtains a sample apartment image corresponding to a sample distribution room from a database; then, the server inputs the sample apartment image into the image segmentation model to be trained, and performs feature extraction processing on the sample apartment image through the image segmentation model to be trained to obtain initial sample image features corresponding to the sample apartment image; then, the server performs attention mechanism processing on the initial sample image features to obtain processed sample image features corresponding to the sample apartment image; then, the server performs fusion processing on the initial sample image features and the processed sample image features to obtain fused sample image features corresponding to the sample apartment image; then, the server determines the predicted mask image corresponding to the key distribution room equipment in the sample distribution room based on the fused sample image features; then, the server obtains the actual mask image corresponding to the key distribution room equipment in the sample distribution room, and obtains the target loss value based on the difference between the predicted mask image and the actual mask image; then, the server iteratively trains the image segmentation model to be trained based on the target loss value to obtain a trained image segmentation model.

[0115] In this embodiment, by pre-training the image segmentation model, it is convenient to predict the mask image corresponding to the key distribution room equipment in the distribution room after obtaining the apartment type image corresponding to the distribution room to be modeled in actual application; moreover, the image segmentation model receives new data in each round of iteration, and performs internal improvements and optimizations on the model, so as to make predictions more effective, which is beneficial to improving the prediction accuracy of the image segmentation model.

[0116] In an exemplary embodiment, according to the difference between the predicted mask image and the actual mask image, the image segmentation model to be trained is iteratively trained to obtain a trained image segmentation model, which specifically includes the following contents: according to the difference between the predicted mask image and the actual mask image, a cross entropy loss value, a smoothing loss value and a mean absolute error loss value are obtained; the cross entropy loss value, the smoothing loss value and the mean absolute error loss value are weightedly summed to obtain a target loss value; according to the target loss value, the image segmentation model to be trained is iteratively trained to obtain a trained image segmentation model.

[0117] Among them, the cross entropy loss value refers to an indicator used to measure the difference between the prediction results of the classification model and the true label.

[0118] The smoothed loss value refers to the loss value after the loss function is smoothed.

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

[0120] Among them, the target loss value refers to the loss value obtained by weighted summing the cross entropy loss value, smoothing loss value and mean absolute error loss value.

[0121] Exemplarily, the server obtains a cross entropy loss value, a smoothing loss value, and a mean absolute error loss value based on the difference between the predicted mask image and the actual mask image; then, the server performs weighted summation processing on the cross entropy loss value, the smoothing loss value, and the mean absolute error loss value to obtain the loss value after the weighted summation processing as the target loss value; then, the server adjusts the model parameters of the image segmentation model to be trained according to the target loss value; then, the server re-trains the image segmentation model after the model parameters are adjusted until the target loss value obtained by the trained image segmentation model is less than the loss value threshold, then stops training, and uses the trained image segmentation model as the trained image segmentation model.

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

[0123] , formula (1)

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

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

[0126] , formula (2)

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

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

[0129] , formula (3)

[0130] in, refers to the mean absolute error loss value, Represents the total number of pixels. refers to the pixel value in the actual mask image, Refers to the pixel value in the predicted mask image.

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

[0132] , formula (4)

[0133] Among them, L refers to the target loss value.

[0134] In this embodiment, by calculating the cross entropy loss value, the smoothing loss value and the mean absolute error loss value, the performance of the image segmentation model to be trained can be evaluated from different angles, so that the obtained target loss value is more accurate, and the model develops in the direction of reducing the target loss value in each round of iteration, which is conducive to improving the training quality of the image segmentation model.

[0135] In an exemplary embodiment, the above step S103 determines the target vertex coordinate information corresponding to the mask image, which specifically includes the following contents: 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; 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 center point horizontal coordinate value and the center point vertical coordinate value.

[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] Exemplarily, the server obtains initial vertex coordinate information corresponding to the mask image; then, the server determines the maximum horizontal coordinate value, minimum horizontal coordinate value, maximum vertical coordinate value and minimum vertical coordinate value corresponding to the initial vertex coordinate information based on the initial vertex coordinate information; then, the server determines the center point coordinate information, horizontal distance and vertical distance corresponding to the mask image based on the maximum horizontal coordinate value, minimum horizontal coordinate value, maximum vertical coordinate value and minimum vertical coordinate value corresponding to the initial vertex coordinate information; then, the server determines the vertex coordinate information corresponding to the center point coordinate information, horizontal distance and vertical distance based on 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 horizontal coordinate value, the minimum horizontal coordinate value, the maximum vertical coordinate value, and the minimum vertical coordinate value corresponding to the initial vertex coordinate information through 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 coordinate information is A (x1, y1), B (x2, y2), C (x3, y3), and D (x4, y4). min refers to the minimum horizontal coordinate value, x max refers to the maximum horizontal coordinate value, y min refers to the minimum ordinate value, y max It refers to the maximum vertical coordinate value.

[0147] For example, the server can determine the center point coordinate information corresponding to the mask image through the following formula:

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

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

[0150] Among them, x center refers to the horizontal coordinate value of the center point, y center It refers to the vertical coordinate value of the center point.

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

[0152] , formula (11)

[0153] Where w is the horizontal distance.

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

[0155] , formula (12)

[0156] Here, h refers to the vertical distance.

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

[0158]

[0159]

[0160]

[0161]

[0162] In this embodiment, the center point coordinate information, horizontal distance and vertical distance are determined based on the initial vertex coordinate information, thereby realizing the conversion from vertex information to more generalized spatial features; moreover, the target vertex coordinate information is determined based on the center point coordinate information, horizontal distance and vertical distance, so that it can be flexibly adjusted according to specific needs, thereby providing a data basis for subsequent data analysis.

[0163] In an exemplary embodiment, Figure 4 As shown, another method for constructing a three-dimensional model of a power distribution room is provided, and the method is applied to a server as an example for explanation, including the following steps:

[0164] Step S401, obtaining a house type image corresponding to the power distribution room to be modeled.

[0165] Step S402: Perform feature extraction processing on the apartment type image through the trained image segmentation model to obtain initial image features corresponding to the apartment type image.

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

[0167] Step S404: fusing the initial image feature and the first image feature to obtain a second image feature corresponding to the apartment image.

[0168] Step S405: perform feature extraction processing on the second image feature to obtain a third image feature corresponding to the apartment image.

[0169] Step S406: normalize the third image feature to obtain a fourth image feature corresponding to the apartment image.

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

[0171] Step S408: Perform weighted sum processing on the initial image feature and the fifth image feature to obtain processed image features.

[0172] Step S409, fusing the initial image features and the processed image features to obtain fused image features corresponding to the apartment image, and determining the mask image corresponding to the key distribution room equipment in the distribution room based on the fused image features.

[0173] Step S410, obtaining 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 according to the initial vertex coordinate information; determining the target vertex coordinate information according to the center point coordinate information, horizontal distance and vertical distance.

[0174] Step S411, determining the target device model corresponding to the key power distribution room equipment according to the target vertex coordinate information and the structure information of the power distribution room.

[0175] Step S412, determining the apartment structure vector data corresponding to the mask image, and constructing a three-dimensional model corresponding to the power distribution room according to the apartment structure vector data and the target equipment model.

[0176] In the above-mentioned method for constructing a three-dimensional model of a distribution room, in the process of constructing a three-dimensional model of the distribution room, a series of processing is performed on the apartment type image corresponding to the distribution room to be modeled using the trained image segmentation model, so that the mask image corresponding to the key distribution room equipment in the distribution room can be accurately determined, thereby accurately determining the target vertex coordinate information corresponding to the mask image, and then accurately determining the target equipment model corresponding to the key distribution room equipment, and combining the apartment type structure vector data corresponding to the mask image, the three-dimensional model corresponding to the distribution room can be more accurately constructed, which is conducive to improving the construction accuracy of the three-dimensional model of the distribution room; moreover, the entire process does not require human intervention, avoiding the defect of low construction accuracy of the three-dimensional model of the distribution room due to subjective factors and prone to errors in the manual construction method, thereby improving the construction accuracy of the three-dimensional model of the distribution room.

[0177] In an exemplary embodiment, in order to more clearly illustrate the method for constructing a three-dimensional model of a power distribution room provided in the embodiment of the present application, the method for constructing a three-dimensional model of a power distribution room is specifically described below using a specific embodiment. Figure 5 As shown, the present application also provides a three-dimensional digital modeling method for a power distribution room based on artificial intelligence. In the process of constructing a three-dimensional model of the power distribution room, the Attention CNN model is first used to perform instance segmentation on the floor plan of the power distribution room to obtain a mask image of the key elements of the power distribution room, and then the mask image is accurately aligned with the floor plan structure vector data of the power distribution room to obtain the floor plan structure vector data corresponding to the mask image. Next, the four initial vertex coordinates in the mask image are adjusted to obtain the adjusted vertex coordinates. Then, according to 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, according to the device model matching the key elements and the floor plan structure vector data corresponding to the mask image, a three-dimensional model of the power distribution room is constructed. Specifically, it includes the following contents:

[0178] The first step is the floor plan instance segmentation stage:

[0179] At this stage, we use Attention CNN to perform deep learning-driven instance segmentation on the floor plan of the power distribution room. Attention CNN can identify and segment each key element 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] Among them, the attention mechanism consists of three 1×1 convolutions (Conv 1×1), layer normalization (LayerNorn) and Softmax activation function. Figure 3 shown.

[0181] Among them, the structure diagram of the convolutional neural network with attention mechanism is as follows: Figure 2 shown.

[0182] Among them, the loss function L consists of three parts:

[0183] , formula (4)

[0184] , formula (1)

[0185] in, is the loss function of the first part, is a binary label of whether the anchor contains an object, is the probability that the model predicts that the anchor point contains an object, is the number of anchor points involved in the calculation, is an indicator function.

[0186] , formula (2)

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

[0188] , formula (3)

[0189] in, is the loss function of the third part, Represents the total number of pixels. is the true value, is the predicted value.

[0190] The second step is the image registration stage:

[0191] Through image registration technology, the mask image obtained in the previous step ( Figure 2 The mask output in the image is precisely aligned with the structure vector data of the distribution room. 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] The third step is the 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 position of each device inside the power distribution room, providing the necessary data support for the accurate placement of the model.

[0194] Assume 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-coordinate values ​​and the minimum and maximum y-coordinate values ​​of the four vertices of the circumscribed rectangle.

[0201] (2) Calculate the center point of the bounding box, that is, 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, formula (9)

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

[0204] x center ,y center : These two variables represent the x-coordinate and y-coordinate 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 distance from the center point to the edge of the bounding box:

[0206] , formula (11)

[0207] , formula (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 to ensure that the rectangle can completely contain 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, where A' is the lower left vertex, B' is the lower right vertex, C' is the upper right vertex, and D' is the upper left vertex.

[0215] Step 4: Model library adaptation phase:

[0216] According to the calculated coordinates and the specific structure of the distribution room, select the appropriate switchgear, distribution cabinet and transformer models from the preset model library. This step involves the selection and adjustment of the model to ensure the best match between the model and the actual equipment in terms of size and function.

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

[0218] Finally, we use professional 3D visualization tools (such as Babylon.js) to build a 3D model of the power distribution room in combination with the adapted equipment model and apartment structure vector data. This stage not only completes the 3D construction of the model, but also enables online display and interaction of the model, providing users with an intuitive virtual experience.

[0219] In the above-mentioned embodiment, in the process of constructing a three-dimensional model of the distribution room, the trained image segmentation model is used to perform a series of processing on the apartment type image corresponding to the distribution room to be modeled, so that the mask image corresponding to the key distribution room equipment in the distribution room can be accurately determined, so that the target vertex coordinate information corresponding to the mask image can be accurately determined, and then the target equipment model corresponding to the key distribution room equipment can be accurately determined, and combined with the apartment type structure vector data corresponding to the mask image, the three-dimensional model corresponding to the distribution room can be more accurately constructed, which is conducive to improving the construction accuracy of the three-dimensional model of the distribution room; moreover, the whole process does not require human intervention, avoiding the subjective factors in the manual construction method, which is prone to errors and leads to the defect of low construction accuracy of the three-dimensional model of the distribution room, thereby improving the construction accuracy of the three-dimensional model of the distribution room. At the same time, by adopting Attention CNN, through the attention mechanism, can focus more on the key parts of the image, improving the model's recognition and segmentation accuracy of internal equipment in the distribution room, such as switch cabinets, distribution cabinets, and transformers; the introduction of the attention mechanism enables the model to better capture long-distance dependencies and improves the model's ability to handle complex scenes; image registration ensures the correspondence between two-dimensional image data and actual three-dimensional space, improves the model's spatial positioning accuracy, and provides an accurate spatial reference for subsequent three-dimensional modeling; by calculating the vertex coordinates of the circumscribed rectangle in the mask image, it provides the necessary data support for the precise placement of the model, enhancing the model's spatial positioning The accuracy of the proposed method is improved; according to the calculated coordinates and the specific structure of the 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 practicality and adaptability of the model; a 3D model of the distribution room is constructed using a 3D visualization tool, and online display and interaction are realized, providing users with an intuitive virtual experience and enhancing the visualization and interactivity of the model; the loss function L consists of three parts, including the binary label loss of object existence, the regression loss of the bounding box parameters, and the segmentation loss of the pixel points. These three parts work together to improve the performance of the model in the instance segmentation task.

[0220] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0221] Based on the same inventive concept, the embodiment of the present application also provides a power distribution room 3D model construction device for implementing the above-mentioned power distribution room 3D model construction method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more power distribution room 3D model construction device embodiments provided below can refer to the limitations of the power distribution room 3D model construction method above, and will not be repeated here.

[0222] In an exemplary embodiment, Figure 6 As shown, a device for constructing a three-dimensional model of a power distribution room is provided, comprising: 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 apartment type image corresponding to the power distribution room to be modeled.

[0224] Model processing module 602 is used to perform feature extraction processing on the apartment type image through the trained image segmentation model to obtain initial image features corresponding to the apartment type image, perform attention mechanism processing on the initial image features to obtain processed image features corresponding to the apartment type image, fuse the initial image features and the processed image features to obtain fused image features corresponding to the apartment type image, and determine the mask image corresponding to the key distribution room equipment in the 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 device model corresponding to the key power distribution room equipment according to the target vertex coordinate information and the structure information of the power distribution room.

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

[0228] In an exemplary embodiment, the model processing module 602 is also used to perform feature extraction processing on the initial image features to obtain first image features corresponding to the apartment type image; perform fusion processing on the initial image features and the first image features to obtain second image features corresponding to the apartment type image; and obtain 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 also used to perform feature extraction processing on the second image feature to obtain a third image feature corresponding to the apartment type image; perform normalization processing on the third image feature to obtain a fourth image feature corresponding to the apartment type image; perform feature extraction processing on the fourth image feature again to obtain a fifth image feature corresponding to the apartment type image; and perform weighted sum processing on the initial image feature and the fifth image feature to obtain a processed image feature.

[0230] In an exemplary embodiment, the three-dimensional model construction device of the distribution room also includes a model training module, which is used to obtain a sample apartment image corresponding to a sample distribution room; through the image segmentation model to be trained, feature extraction processing is performed on the sample apartment image to obtain initial sample image features corresponding to the sample apartment image, attention mechanism processing is performed on the initial sample image features to obtain processed sample image features corresponding to the sample apartment image, the initial sample image features and the processed sample image features are fused to obtain fused sample image features corresponding to the sample apartment image, and based on the fused sample image features, the predicted mask image corresponding to the key distribution room equipment in the sample distribution room is determined; the actual mask image corresponding to the key distribution room equipment in the sample distribution room is obtained, and based on the difference between the predicted mask image and the actual mask image, the image segmentation model to be trained is iteratively trained to obtain a trained image segmentation model.

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

[0232] In an exemplary embodiment, the coordinate determination module 603 is also used 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 above-mentioned power distribution room three-dimensional model construction device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0234] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as house type images and mask images. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for constructing a three-dimensional model of a power distribution room is implemented.

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

[0236] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0237] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0238] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0239] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium 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), magnetoresistive 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0240] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, 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 above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for constructing a three-dimensional model of a power distribution room, characterized in that: The method comprises: Obtain the apartment image corresponding to the power distribution room to be modeled; Perform feature extraction processing on the apartment image through the trained image segmentation model to obtain initial image features corresponding to the apartment image, perform attention mechanism processing on the initial image features to obtain processed image features corresponding to the apartment image, perform fusion processing on the initial image features and the processed image features to obtain fused image features corresponding to the apartment image, and determine the mask image corresponding to the key distribution room equipment in the distribution room according to the fused image features; Determine the target vertex coordinate information corresponding to the mask image; Determine the target device model corresponding to the key power distribution room equipment according to the target vertex coordinate information and the structural information of the power distribution room; The apartment structure vector data corresponding to the mask image is determined, and a three-dimensional model corresponding to the power distribution room is constructed according to the apartment structure vector data and the target device model.

2. The method according to claim 1, characterized in that The performing attention mechanism processing on the initial image features to obtain processed image features corresponding to the apartment image includes: Performing feature extraction processing on the initial image features to obtain first image features corresponding to the apartment image; Performing a fusion process on the initial image feature and the first image feature to obtain a second image feature corresponding to the apartment image; The processed image feature is obtained according to the initial image feature and the second image feature.

3. The method according to claim 2, characterized in that The step of obtaining the processed image feature according to the initial image feature and the second image feature comprises: Performing feature extraction processing on the second image feature to obtain a third image feature corresponding to the apartment image; Normalizing the third image feature to obtain a fourth image feature corresponding to the apartment image; Performing feature extraction processing on the fourth image feature again to obtain a fifth image feature corresponding to the apartment image; A weighted sum process is performed on the initial image feature and the fifth image feature to obtain the processed image feature.

4. The method according to claim 1, characterized in that: The trained image segmentation model is obtained by training in the following way: Obtain sample apartment images corresponding to sample power distribution rooms; Perform feature extraction processing on the sample apartment type image through the image segmentation model to be trained to obtain initial sample image features corresponding to the sample apartment type image, perform attention mechanism processing on the initial sample image features to obtain processed sample image features corresponding to the sample apartment type image, perform fusion processing on the initial sample image features and the processed sample image features to obtain fused sample image features corresponding to the sample apartment type image, and determine the predicted mask image corresponding to the key power distribution room equipment in the sample power distribution room according to the fused sample image features; The actual mask image corresponding to the key power distribution room equipment in the sample power distribution room is obtained, and according to the difference between the predicted mask image and the actual mask image, the image segmentation model to be trained is iteratively trained to obtain the trained image segmentation model.

5. The method according to claim 4, characterized in that The iterative training of the image segmentation model to be trained according to the difference between the predicted mask image and the actual mask image to obtain the trained image segmentation model comprises: According to the difference between the predicted mask image and the actual mask image, a cross entropy loss value, a smoothing loss value and a mean absolute error loss value are obtained; Performing weighted sum processing on the cross entropy loss value, the smoothing loss value, and the mean absolute error loss value to obtain a target loss value; According to the target loss value, the image segmentation model to be trained is iteratively trained to obtain the trained image segmentation model.

6. The method according to any one of claims 1 to 5, characterized in that: The step of determining target vertex coordinate information corresponding to the mask image includes: Obtaining 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 according to the initial vertex coordinate information; The target vertex coordinate information is determined according to the center point coordinate information, the horizontal distance and the vertical distance.

7. A device for constructing a three-dimensional model of a power distribution room, characterized in that: The device comprises: An image acquisition module is used to acquire the apartment type image corresponding to the power distribution room to be modeled; A model processing module is used to perform feature extraction processing on the apartment type image through the trained image segmentation model to obtain initial image features corresponding to the apartment type image, perform attention mechanism processing on the initial image features to obtain processed image features corresponding to the apartment type image, perform fusion processing on the initial image features and the processed image features to obtain fused image features corresponding to the apartment type image, and determine the mask image corresponding to the key power distribution room equipment in the power distribution room according to the fused image features; A coordinate determination module, used to determine the target vertex coordinate information corresponding to the mask image; A model determination module, used to determine the target device model corresponding to the key power distribution room equipment according to 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 corresponding to the power distribution room according to the apartment structure vector data and the target device model.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

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

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

Citation Information

Patent Citations

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

    CN115641481A

  • Three-dimensional building model generation method and system based on planar graph

    CN116958424A

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

    CN117830509A