Virtual building assembly method, device, electronic device and storage medium

By extracting the attribute parameters in the building image and combining them into a style module instance library, the problem of inefficient construction of building resources is solved, efficient building resource management and style matching is achieved, and human resource needs are reduced.

CN114708385BActive Publication Date: 2025-08-01NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210319174.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2025-08-01
Estimated Expiration
2042-03-29

AI Technical Summary

Technical Problem

In the prior art, building resource construction is inefficient, relies on manual experience and consumes a lot of human resources, and lacks effective management methods, making it difficult for building assembly to achieve the expected style.

Method used

By obtaining architectural images, extracting the attribute parameters of the building module, building a three-dimensional model, and combining three-dimensional models of the same style into a style module instance library, using data structures and adjustable configuration parameters to form a different style module instance library to realize the assembly of virtual buildings.

Benefits of technology

It improves the efficiency of building resource manufacturing, reduces human resource needs, and facilitates management and quickly matches the desired architectural style, reducing manual iteration and repetitive costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114708385B_ABST
    Figure CN114708385B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a virtual building assembly method, device, electronic device, and storage medium, including: obtaining a building image, extracting attribute parameters of each building module of the building in the building image, constructing a three-dimensional model of the building module based on the attribute parameters, combining the three-dimensional models with the same architectural style into a style module instance library, and assembling a virtual building with the architectural style corresponding to the three-dimensional model according to the style module instance library. By applying the embodiment of the present invention, after obtaining the building image, the attribute parameters of each building module of the building in the building image can be directly extracted, and the three-dimensional model of the building module can be constructed based on the attribute parameters, without relying on the experience of the staff, improving the efficiency of building resource manufacturing and reducing the human resources in the process of manufacturing the building.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular, to a virtual building assembly method, a virtual building assembly device, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the rapid development of the game industry, the demand for the construction of game scenes and elements is increasing, and it is necessary to produce and lay scene building resources in a relatively large game scene map.

[0003] Currently, for building resource construction, after an art production staff obtains the building drawings, they need to manually disassemble each module of the building according to their experience, extract the relevant module parameters (dimensions, relative positions, etc.) in the design drawings, and then produce three-dimensional model resources that meet the parameter specifications. However, the above method is highly dependent on the experience of the staff, resulting in low efficiency and a large amount of human resources consumption. In addition, due to the lack of management of the produced scene building resources, it is difficult for the staff to match the desired building style during the building assembly process. Summary of the Invention

[0004] Embodiments of the present invention provide a virtual building assembly method, device, electronic device, and computer-readable storage medium to solve the problems of low efficiency, large consumption of human resources, and lack of management of building resources during the process of building resource construction.

[0005] Embodiments of the present invention disclose a virtual building assembly method, including:

[0006] Obtaining a building image;

[0007] Extracting the attribute parameters of each building module of the building in the building image;

[0008] Constructing a three-dimensional model of the building module based on the attribute parameters;

[0009] Combining the three-dimensional models of the same building style into a style module instance library;

[0010] Assembling a virtual building of the building style corresponding to the three-dimensional model according to the style module instance library.

[0011] Optionally, the combining the three-dimensional models of the same building style into a style module instance library includes:

[0012] Obtaining a data structure set for the building style of the style module library; the data structure includes the building module types of the three-dimensional models and the adjustable configuration parameters of the three-dimensional models of each building module type, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters;

[0013] Screen out target 3D modules from the 3D model according to the data structure, and combine them into a style module library;

[0014] By defining different numerical values for the adjustable configuration parameters of the target 3D modules in the style module library, different style module instance libraries are formed.

[0015] Optionally, the attribute parameters include building module types and building module parameters. Extracting the attribute parameters of each building module of the building in the building image includes:

[0016] Perform semantic segmentation processing on the building image to obtain the building module types of each building module in the building image;

[0017] Perform image feature detection processing on the building image to obtain the building module parameters of each building module.

[0018] Optionally, the attribute parameters include building module types and building module parameters. Extracting the attribute parameters of each building module of the building in the building image includes:

[0019] In response to a contour annotation operation on the building image, annotate the building contours of the building modules in the building image;

[0020] In response to a type annotation operation on the building contour, annotate the building module types of the building modules in the building contour;

[0021] Extract the building module parameters of the building modules from the building contours.

[0022] Optionally, the building module parameters include dimension parameters. Before constructing the 3D model of the building module based on the attribute parameters, it further includes:

[0023] Obtain the target dimension parameters of each building module type;

[0024] Adjust the dimension parameters of each building module to the target dimension parameters corresponding to the building module type.

[0025] Optionally, assembling the virtual building corresponding to the architectural style of the 3D model according to the style module instance library includes:

[0026] Obtain the modular assembly parameters of the virtual building;

[0027] In response to a selection operation on the style module library, determine the target style module library and display the style module instance library corresponding to the target style module library;

[0028] In response to a selection operation on the style module instance library, determine a target style module instance library;

[0029] Based on the modular assembly parameters, assemble the target 3D models in the target style module instance library into a virtual building; display the virtual building.

[0030] Optionally, the target style module instance library has a corresponding modular parameter set, which is a set of adjustable configuration parameters of each target 3D model in the target style module instance library. After displaying the virtual building, it further includes:

[0031] In response to an adjustment operation on the modular parameter set, determine the adjusted modular parameter set;

[0032] Based on the adjusted modular parameter set, update and display the virtual building.

[0033] Optionally, after updating and displaying the virtual building based on the adjusted modular parameter set, it further includes:

[0034] Store the target style module instance library corresponding to the adjusted modular parameter set.

[0035] An embodiment of the present invention discloses a virtual building assembly device, characterized in that the device includes:

[0036] A design drawing acquisition module, configured to acquire a building image;

[0037] A parameter extraction module, configured to extract the attribute parameters of each building module of the building in the building image;

[0038] A model construction module, configured to construct a 3D model of the building module based on the attribute parameters;

[0039] An instance library combination module, configured to combine the 3D models of the same building style into a style module instance library;

[0040] A virtual building assembly module, configured to assemble a virtual building of the building style corresponding to the 3D model according to the style module instance library.

[0041] Optionally, the instance library combination module includes:

[0042] A data structure acquisition sub-module, configured to acquire a data structure set for building style settings of a style module library; the data structure includes the building module types of 3D models and the adjustable configuration parameters of the 3D models of each building module type, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters;

[0043] A module library combination sub-module is used to screen out target 3D modules from the 3D model according to the data structure and combine them into a style module library;

[0044] An instance library formation sub-module forms different style module instance libraries by defining different values for the adjustable configuration parameters of the target 3D modules in the style module library.

[0045] Optionally, it further includes:

[0046] An instance library combination module is also used to combine the 3D models corresponding to the same building image in the style module library into a style module instance library.

[0047] Optionally, the attribute parameters include building module types and building module parameters, and the parameter extraction module includes:

[0048] A semantic segmentation sub-module is used to perform semantic segmentation processing on the building image to obtain the building module types of each building module in the building image;

[0049] A feature detection sub-module is used to perform image feature detection processing on the building image to obtain the building module parameters of each building module.

[0050] Optionally, the attribute parameters include building module types and building module parameters, and the parameter extraction module includes:

[0051] A contour annotation sub-module is used to respond to a contour annotation operation on the building image and annotate the building contours of the building modules in the building image;

[0052] A type annotation sub-module is used to respond to a type annotation operation on the building contour and annotate the building module types of the building modules in the building contour;

[0053] A parameter extraction sub-module is used to extract the building module parameters of the building modules from the building contours.

[0054] Optionally, the building module parameters include dimension parameters, and it further includes:

[0055] A parameter acquisition module is used to acquire the target dimension parameters of each building module type;

[0056] A parameter adjustment module is used to adjust the dimension parameters of each building module to the target dimension parameters corresponding to the building module type.

[0057] Optionally, the virtual building assembly module includes:

[0058] The parameter acquisition module is further configured to acquire modular assembly parameters of the virtual building;

[0059] The module library determination module is configured to determine a target style module library in response to a selection operation for the style module library and other style module libraries, and display a style module instance library corresponding to the target style module library;

[0060] The instance library determination module is configured to determine a target style module instance library in response to a selection operation for the style module instance library;

[0061] The model assembly module is configured to assemble the target 3D models in the target style module instance library into a virtual building based on the modular assembly parameters;

[0062] The model display module is configured to display the virtual building.

[0063] Optionally, the target style module instance library has a corresponding modular parameter set, and the modular parameter set is a set of adjustable configuration parameters of each target 3D model in the target style module instance library, and further includes:

[0064] The parameter adjustment module is configured to determine an adjusted modular parameter set in response to an adjustment operation for the modular parameter set;

[0065] The model display module is further configured to update and display the virtual building based on the adjusted modular parameter set.

[0066] Optionally, it further includes:

[0067] The instance library storage module is configured to store the target style module instance library corresponding to the adjusted modular parameter set.

[0068] An embodiment of the present invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus;

[0069] The memory is used to store a computer program;

[0070] When the processor is configured to execute the program stored in the memory, the method described in the embodiment of the present invention is implemented.

[0071] An embodiment of the present invention also discloses a computer-readable storage medium, on which instructions are stored. When executed by one or more processors, the processors are caused to execute the method described in the embodiment of the present invention.

[0072] The embodiments of the present invention include the following advantages: After obtaining the building image, the attribute parameters of each building module in the building image can be directly extracted, and a 3D model of the building module can be constructed based on the attribute parameters, without relying on the experience of the staff, improving the efficiency of building resource manufacturing and reducing the human resources in the process of building manufacturing.

[0073] In addition, in the embodiments of the present invention, after the 3D model is constructed, the 3D models of building modules with the same architectural style are combined into a style module instance library, which is convenient for managing building resources. In the building assembly link, the staff can select the style module instance library corresponding to the architectural style to match the desired architectural style pattern. Description of the Drawings

[0074] Figure 1 is a flowchart of the steps of a virtual building assembly method provided in the embodiments of the present invention;

[0075] Figure 2 is a flowchart of the steps of another virtual building assembly method provided in the embodiments of the present invention;

[0076] Figure 3 is a schematic diagram of an attribute parameter extraction method provided in the embodiments of the present invention;

[0077] Figure 4 A flowchart of the steps of a virtual building assembly provided in the embodiments of the present invention;

[0078] Figure 5 A flowchart of the steps of another virtual building assembly verification method provided in the embodiments of the present invention;

[0079] Figure 6 is a structural block diagram of a virtual building assembly device provided in the embodiments of the present invention. Detailed Embodiments

[0080] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the drawings and specific embodiments.

[0081] The virtual building assembly method in one of the embodiments of the present invention can run on a local terminal device or a server. When the virtual building assembly method runs on the server, the virtual building assembly method can be implemented and executed based on a cloud interaction system, where the cloud interaction system includes a server and a client device.

[0082] In an alternative embodiment, various cloud applications can run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the running entity of the game program and the presenting entity of the game screen are separated. The storage and operation of the virtual building assembly method are completed on the cloud game server, and the function of the client device is for data reception, transmission, and the presentation of the game screen. For example, the client device can be a display device with data transmission function near the user side, such as the first terminal device, TV set, computer, palm computer, etc.; however, the one performing the virtual building assembly method is the cloud game server in the cloud. When playing the game, the player operates the client device to send operation instructions to the cloud game server. The cloud game server runs the game according to the operation instructions, encodes and compresses data such as the game screen, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.

[0083] In an alternative embodiment, taking games as an example, the local terminal device stores the game program and is used to present the game screen. The local terminal device is used to interact with the player through the graphical user interface, that is, conventionally, the game program is downloaded and installed on the electronic device and run. The way the local terminal device provides the graphical user interface to the player can include various methods. For example, it can be rendered and displayed on the display screen of the terminal, or provided to the player through holographic projection. For example, the local terminal device can include a display screen and a processor. The display screen is used to present the graphical user interface, and the graphical user interface includes the game screen. The processor is used to run the game, generate the graphical user interface, and control the display of the graphical user interface on the display screen.

[0084] Referring to Figure 1 , a step flowchart of a virtual building assembly method provided in an embodiment of the present invention is shown, which may specifically include the following steps:

[0085] Step 101: Obtain a building image.

[0086] Specifically, obtain building images with the same or different architectural styles. Among them, the building image can be an architectural design drawing or a picture, photo, painting, etc. with clear building outlines.

[0087] The buildings in the building images have corresponding architectural styles. The architectural style can be the architectural style corresponding to the buildings in the building images, or the style defined by the staff. The classification criteria for the architectural styles of buildings vary. For example, classified by country and nationality, there are Chinese style, Japanese style, British style, etc.; classified by region, there are European style, Mediterranean style, North American style, etc.; classified by historical development schools, there are classicalism, neoclassicism, etc.; classified by construction methods, there are Gothic, Baroque, Rococo, etc. The embodiments of the present invention do not limit the architectural styles.

[0088] Step 102: Extract the attribute parameters of each building module of the building in the building image.

[0089] Among them, the buildings in the building images are composed of multiple building modules. The types of building modules include but are not limited to ground modules, step modules, wall modules, column modules, and roof modules.

[0090] The attribute parameters of the building modules include parameters and the corresponding numerical values. The parameters include but are not limited to the types of building modules of the building modules, dimension parameters, and relative positions (the relative positions between the modules and the reference points in the building image).

[0091] Specifically, to extract the attribute parameters of each building module in the building image, for example, various methods such as voxel segmentation, image semantic segmentation, and image feature detection can be used to extract the attribute parameters of each building module in the building image. The embodiments of the present invention do not limit this.

[0092] Step 103: Construct a three-dimensional model of the building module based on the attribute parameters.

[0093] Specifically, after extracting the attribute parameters of each building module in the building image, a three-dimensional model of the building module can be constructed through three-dimensional animation rendering and production tools such as 3dsmax (3D Studio Max).

[0094] Step 104: Combine the three-dimensional models with the same architectural style into a style module instance library.

[0095] Step 105: Assemble the virtual buildings with the architectural styles corresponding to the three-dimensional models according to the style module instance library.

[0096] Specifically, after constructing the three-dimensional models of the building modules in several building images, the architectural styles of the building modules in the building images with the same architectural style are the same. Therefore, the three-dimensional models corresponding to the building modules with the same architectural style can be combined into a style module instance library, and the staff uses the three-dimensional models in the style module instance library to assemble the virtual buildings with the architectural styles corresponding to the style module instance library.

[0097] In the embodiments of the present invention, after obtaining a building image, the attribute parameters of each building module of the building in the building image can be directly extracted, and a 3D model of the building module can be constructed based on the attribute parameters, without relying on the experience of the staff, improving the efficiency of building resource manufacturing and reducing the human resources in the process of manufacturing building resources.

[0098] In addition, in the embodiments of the present invention, after the 3D model is constructed, the 3D models of building modules of the same style are combined into a style module instance library, which is convenient for managing building resources. In the building assembly link, the staff can select the corresponding style module instance library to match the desired building style.

[0099] Refer to Figure 2 , which shows the flowchart of steps of another virtual building assembly method provided in the embodiments of the present invention, and specifically may include the following steps:

[0100] Step 201: Obtain a building image.

[0101] Step 202: Extract the attribute parameters of each building module of the building in the building image.

[0102] In an embodiment of the present invention, step 202 includes: performing semantic segmentation processing on the building image to obtain the building module types of each building module in the building image; performing image feature detection processing on the building image to obtain the building module parameters of each building module.

[0103] Among them, the attribute parameters include building module types and building module parameters. The building module types are ground modules, step modules, wall modules, column modules, roof modules, etc.; the parameters of the building module parameters are size parameters, relative positions and other parameters of the building module.

[0104] The embodiments of the present invention adopt different attribute parameter extraction methods for different precision application scenarios. For example, for ordinary precision application scenarios and high-precision application scenarios, different technical processing solutions are proposed to extract the attribute parameters of building modules.

[0105] For ordinary-precision application scenarios, such as a large number of background building resources in the distance in a game scenario, the building module types and building module parameters of building modules can be extracted in a procedural manner. The main technical means are image semantic segmentation and image feature detection. The semantic segmentation algorithms can include FCN (Fully Convolutional Networks), SegNet (Semantic Segmentation), Deeplab V1 / v2 / v3, etc.; the image feature detection algorithms can be Harris (Harris Corner Detection), SIFT (Scale-invariant feature transform), etc.

[0106] Specifically, image semantic segmentation is good at type classification at the module level and can segment building module types such as roofs, windows, columns, foundations, steps, etc. contained in a building image, helping staff quickly and automatically classify building modules. For example, in the embodiment of the present invention, the FCN algorithm (an FCN model trained using a publicly available general dataset or an FCN model trained using a training set of the corresponding building) can be used to extract the building module types of the input building image and extract the corresponding building module types and contour dimensions.

[0107] To improve the accuracy of modular parameter extraction, the image feature detection method is separately used to detect the building module contour dimensions (size parameters) of the building image and the relative positions of the contours, that is, the relative positions of the building modules in the building space. Taking the lower left corner of the building as the coordinate origin as an example, the positions of each building module relative to the lower left corner origin can be extracted. Through image feature detection, the size parameters, relative positions, etc. of each building module in the building image are detected, eliminating the process of manual evaluation and parameter calculation.

[0108] In the embodiment of the present invention, the building module types and building module parameters in the building image can be directly extracted through image semantic segmentation and image feature detection, eliminating the process of manually splitting each module of the building according to experience and extracting the relevant module parameters in the design drawing, without relying on the experience of the staff, improving the efficiency of building resource manufacturing, and reducing the human resources in the process of building construction.

[0109] In an embodiment of the present invention, the step 202 includes: in response to a contour annotation operation on the building image, annotating the building contour of the building module in the building image; in response to a type annotation operation on the building contour, annotating the building module type of the building module in the building contour; and extracting the building module parameters of the building module from the building contour.

[0110] Specifically, for high-precision application scenarios, this case introduces a semi-automated processing method. Staff members use methods such as dotting and stroking (contour marking operations) to mark the building contour. Then, the building module type is marked for the closed area (building contour), and the image feature extraction algorithm for the general-precision scenario is reused to extract the building module parameters in the building contour. Thus, the extraction of the building module type and building module parameters is completed.

[0111] Refer to Figure 3 , which shows a schematic diagram of a method for extracting attribute parameters provided in an embodiment of the present invention. After inputting a building image, for general-precision application scenarios, image semantic segmentation and image feature detection are used to extract attribute parameters; for high-precision application scenarios, manual area marking and manual quick stroking are used to extract attribute parameters.

[0112] In the embodiments of the present invention, different methods are used to extract the attribute parameters of building modules for general-precision application scenarios and high-precision application scenarios respectively, which can meet the requirements of different application scenarios.

[0113] Step 203: Construct a three-dimensional model of the building module based on the attribute parameters.

[0114] In an embodiment of the present invention, the building module parameters include dimension parameters. Before the step 203, it further includes: obtaining the target dimension parameters of each building module type; adjusting the dimension parameters of each building module to the target dimension parameters corresponding to the building module type.

[0115] Among them, the target dimension parameter is a reference dimension parameter, which can be obtained by staff members through self-definition.

[0116] Specifically, after extracting the dimension parameters of building modules in several building images, since the dimension parameters of building modules of the same building module type in different building images are inconsistent, it will cause the parameter inconsistency of the interface when splicing building modules between different building images, resulting in the inability to splice building modules between different building images, or there are defects after splicing.

[0117] In the embodiments of the present invention, the dimension parameters of building modules of the same building module type in different building images are adjusted to the target dimension parameters corresponding to the building module type, so that the dimension parameters of the same building module type in different building images are the same, which is convenient for the assembly of virtual buildings, and solves the problem of parameter inconsistency of the interface when splicing building modules between different building images, resulting in the inability to splice building modules between different building images, or there are defects after splicing.

[0118] Step 204: Obtain the data structure of the building style setting for the style module library.

[0119] Among them, the data structure includes the building module types of the 3D model and the adjustable configuration parameters of the 3D models of each of the building module types, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters.

[0120] The data structure is related to the architectural style. One architectural style can define one data structure, that is, one style module library corresponds to one data structure; the data structure corresponding to the architectural style can be defined for the staff; the data structure includes the building module types of the 3D model, such as the ground module, the step module, the wall module, etc., and also includes the adjustable configuration parameters of the 3D models of each of the building module types. For example, the parameters of the adjustable configuration parameters of the ground module include the ground model instance object, the position, and the position correction. The values corresponding to the parameters of the adjustable configuration parameters can take any initialized value, which can be specifically set by the staff.

[0121] Specifically, the staff can set the data structure for the architectural style of the style module library. For example, for an ancient building in the style of a folk house, the data structure can be designed in the following way. The data structure table is as follows:

[0122]

[0123] Among them, the data types in the data structure include the structural types of the building and the building module types such as the ground module, the step module, the wall module, etc.; the adjustable configuration parameters in the data structure include the adjustable configuration parameters corresponding to the structural types of the building, such as the regular type, the T-shaped, the cross-shaped, and the adjustable configuration parameters corresponding to the 3D models of each of the building module types. For example, the parameters of the adjustable configuration parameters of the ground module include the ground model instance object, the position, and the position correction. The numerical values of the parameters of the adjustable configuration parameters are the initialized values defined by the staff.

[0124] It should be noted that the parameters of the adjustable configuration parameters corresponding to the 3D models of each of the building module types are different from or not completely the same as the parameters in the attribute parameters. For example, the parameters of the ground module attribute parameters extracted from the building image can include the ground model instance object, the dimension parameters, and the relative position of the ground module, while the adjustable configuration parameters of the ground module in the data structure include the ground model instance object, the position, and the position correction, and the two are not the same.

[0125] Step 205: Screen out the target 3D modules from the 3D model according to the data structure and combine them into a style module library.

[0126] Among them, the adjustable configuration parameters of 3D models belonging to different architectural styles and of the same architectural module type are different. For example, the adjustable configuration parameters of the step module in architectural style A include the step model instance object, position offset, and attachment point, while the adjustable configuration parameters of the step module in architectural style B include the step model instance object and position offset. That is, the attachment point of the step module in architectural style A is adjustable, while the attachment point of the step module in architectural style B is not adjustable. Therefore, the architectural style of a 3D model can be determined based on its adjustable configuration parameters.

[0127] Specifically, a 3D model is determined from the constructed 3D models, where the architectural module type and the parameters of the adjustable configuration parameters are the same as those included in the parameter and data structure corresponding to the architectural module type and the architectural module type. This 3D model is used as the target 3D model, and the target 3D models are combined into a style module library. For the style module libraries of different architectural styles, the adjustable configuration parameters of the 3D models of the same architectural module type are different.

[0128] Step 206: Different style module instance libraries are formed by defining different values for the parameters of the adjustable configuration parameters of the target 3D modules in the style module library.

[0129] Specifically, after the style module library is combined, the values of the adjustable configuration parameters of the target 3D models in the style module library are initial values. Therefore, the values of the adjustable configuration parameters of each target 3D model in the style module library are defined. For example, taking the ground module as an example, the staff can define the model instance object, position, and position correction value of the ground module. After obtaining the target 3D models with the values of the adjustable configuration parameters defined, the target 3D models with the values of the adjustable configuration parameters defined are used to form a style module instance library. The values of the adjustable configuration parameters of the target 3D models can be defined as different values. Therefore, based on the target 3D modules in the style module library, different style module instance libraries can be defined, and the values of the adjustable configuration parameters of the target 3D models in different style module instance libraries corresponding to the same style module library are different.

[0130] It should be noted that the module library instance libraries corresponding to the same style module library correspond to the same data structure, but the values of the adjustable configuration parameters of the 3D models of each architectural module type in the data structure corresponding to the module library instance libraries are different.

[0131] In addition, the values of the adjustable configuration parameters of each target 3D model in the style module library are defined, and the set of the adjustable configuration parameters of each target 3D model after definition is the modular parameter set corresponding to the style module instance library.

[0132] In an example of the present invention, the numerical values of the adjustable configuration parameters of the target three-dimensional model can also be randomized through program randomization to quickly form a library of different style module instances, which is suitable for use in some occasions with weak stylization requirements.

[0133] Step 207: Assemble the virtual building corresponding to the architectural style of the three-dimensional model according to the style module instance library.

[0134] In an embodiment of the present invention, referring to Figure 4 , the step 207 may include the following steps:

[0135] Step 401: Obtain the modular assembly parameters of the virtual building.

[0136] The embodiments of the present invention are implemented based on the production environment of the Unreal Engine 4 game engine.

[0137] Among them, the modular assembly parameters are parameters input by the user, which may be a general virtual building structure (one-story building, two-story building, etc.), or the building module type of the virtual building structure and the building modules that make up the virtual building, or the virtual building structure, the building module type of the building modules that make up the virtual building, the relative position of the building modules, and the building module parameters of the building modules. Specifically, they are set according to actual needs, and the embodiments of the present invention are not limited thereto.

[0138] Specifically, after the style module instance library is constructed, obtain the modular assembly parameters input by the staff, which are mainly used to assemble the three-dimensional models in the style module instance library.

[0139] Step 402: In response to the selection operation for the style module library, determine the target style module library and display the style module instance library corresponding to the target style module library.

[0140] Specifically, after the modular assembly parameters input by the staff, the staff can select the corresponding style module library. For example, if the staff inputs that the virtual building is a house, then the architectural style of the house can be switched according to the selected style module library. Style module library A is in the Gothic style, and style module library B is in the Baroque style. The target style module library includes multiple style module instance libraries. Therefore, after the target style module library is determined, display the style module instance library corresponding to the target style module library for the user to select from the style module instance library.

[0141] Step 403: In response to the selection operation for the style module instance library, determine the target style module instance library.

[0142] Among them, the modular parameter sets of the building modules in different style module instance libraries corresponding to the same style module library are different. Taking the ground module as an example, the ground model instance objects, positions, and position corrections of the ground modules in different style module instance libraries of the same style module library are different. Therefore, the display effects of the virtual buildings formed in different style module instance libraries corresponding to the same style module library are different.

[0143] Specifically, after determining the target style module library and displaying the style module instance library corresponding to the target style module library, in response to the selection operation of the staff on the style module instance library, the target style module instance library is determined from multiple style module instance libraries.

[0144] Step 404: Assemble the target 3D models in the target style module instance library into a virtual building based on the modular assembly parameters.

[0145] Step 405: Display the virtual building.

[0146] Specifically, after the staff determines the target style module instance library, based on the modular assembly parameters, the 3D models in the target style module instance library are assembled into a virtual building and displayed to the staff for preview, so that the staff can judge whether the virtual building generated based on the target style module instance library meets the requirements.

[0147] Refer to Figure 5 , which shows the step flow chart of another virtual building assembly verification method provided in the embodiment of the present invention. As can be seen from the figure, after inputting the modular assembly parameters, the staff can determine the target style module library from Style Module Library A and Style Module Library B. If the target style module library is Style Module Library A, then the target style module instance library such as target style module instance library a is determined from the style module instance library corresponding to Style Module Library A, and a virtual building is output based on the modular assembly parameters and the modular parameter set corresponding to target style module instance library a.

[0148] Currently, after the modules are split, it is necessary to enter the assembly verification link. In the traditional method, the art staff will first produce the corresponding module art assets, and then manually combine and match different architectural style patterns, but this method is inefficient. In the embodiment of the present invention, by switching the style module instance library, it is possible to quickly preview the performance of each building module in the virtual building under different styles, which is convenient for the staff to quickly preview the effects of any combination of modular buildings.

[0149] In an embodiment of the present invention, the target style module instance library has a corresponding modular parameter set, which is a set of adjustable configuration parameters of each target 3D model in the target style module instance library. After step 405, the method further includes: in response to an adjustment operation on the modular parameter set, determining the adjusted modular parameter set; and based on the adjusted modular parameter set, updating and displaying the virtual building.

[0150] Among them, the modular parameter set is a set of adjustable configuration parameters (including parameters and their corresponding values) of each target 3D model in the corresponding target style module instance library. When assembling the 3D models in the style module instance library through assembly parameters, it is carried out based on the predefined adjustable configuration parameters of each 3D model. Therefore, the displayed virtual building can be adjusted by adjusting the modular parameter set.

[0151] Specifically, the staff can adjust the modular parameter set corresponding to the target style module instance library, so as to adjust the displayed virtual building, so that the staff can directly adjust the virtual building to meet the requirements.

[0152] Among them, after the module is split, it needs to enter the assembly verification link. In the traditional method, the art staff will first produce the corresponding module art assets, and then combine them manually to match different architectural style patterns. However, this method is inefficient. When there are manual defects in some places such as seams and corners, it is necessary to go back to the upstream link to iterate the module assets again.

[0153] In the embodiment of the present invention, while viewing the virtual building, the staff can adjust the modular parameter set corresponding to the target style module instance library, what you see is what you get, which is convenient for the staff to quickly adjust to obtain a building matching style that meets the conditions, without having to go back to the upstream link to iterate the module assets again, effectively improving the control force of the art production staff in the modular assembly link and reducing the cost of repeated iteration.

[0154] In an embodiment of the present invention, after updating and displaying the virtual building based on the adjusted modular parameter set, the method further includes: storing the target style module instance library corresponding to the adjusted modular parameter set.

[0155] Specifically, when adjusting the modular parameter set corresponding to the target style module instance library and the adjusted virtual building meets the requirements, the target style module instance library after adjusting the modular parameter set can be stored separately as a new style module instance library, or the target style module instance library after adjusting the modular parameter set can be used to overwrite the prior target style module instance library for saving.

[0156] In the embodiments of the present invention, the building module type and building module parameters of the building modules in the building image are extracted through image semantic segmentation and image feature detection, eliminating the process of manually splitting each module of the building based on experience and extracting the relevant module parameters in the design drawing. It does not rely on the experience of the staff, improves the efficiency of building resource manufacturing, and reduces the human resources in the process of building manufacturing.

[0157] For ordinary-precision application scenarios and high-precision application scenarios, different methods are respectively used to extract the attribute parameters of the building modules to meet the requirements of different application scenarios.

[0158] The size parameters of the building modules of the same building module type in different building images are adjusted to the target size parameters, so that the size parameters of the same building module type in different building images are the same, solving the problem that the parameter inconsistency of the interface during the splicing of building modules between different building images causes the building modules between different building images to not be spliced or there are defects after splicing.

[0159] By switching the style module instance library, it is possible to quickly preview the performance of each building module in the virtual building under different styles, facilitating the staff to quickly preview the effects of any combination of modular buildings.

[0160] While watching the virtual building, the staff can adjust the modular parameter set corresponding to the target style module instance library. What you see is what you get, which is convenient for the staff to quickly adjust to obtain a building combination style that meets the conditions, without having to go back to the upstream link to iterate the module assets again, effectively improving the control ability of the art production staff in the modular assembly link and reducing the cost of repeated iteration.

[0161] It should be noted that for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequence, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present invention.

[0162] Refer to Figure 6 , which shows the structural block diagram of a virtual building assembly device provided in the embodiments of the present invention, and specifically may include the following modules:

[0163] The design drawing acquisition module 601 is used to acquire building images;

[0164] The parameter extraction module 602 is used to extract the attribute parameters of each building module of the building in the building image;

[0165] The model construction module 603 is configured to construct a three-dimensional model of the building module based on the attribute parameters;

[0166] The instance library combination module 604 is configured to combine the three-dimensional models of the same architectural style into a style module instance library;

[0167] The virtual building assembly module 605 is configured to assemble a virtual building of the architectural style corresponding to the three-dimensional model according to the style module instance library.

[0168] Optionally, the instance library combination module 604 includes:

[0169] The data structure acquisition sub-module is configured to acquire a data structure set for the architectural style of the style module library; the data structure includes the building module types of the three-dimensional models and the adjustable configuration parameters of the three-dimensional models of each of the building module types, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters;

[0170] The module library combination sub-module is configured to screen out target three-dimensional modules from the three-dimensional models according to the data structure and combine them into a style module library;

[0171] The instance library formation sub-module forms different style module instance libraries by defining different values for the parameters of the adjustable configuration parameters of the target three-dimensional modules in the style module library.

[0172] Optionally, it further includes:

[0173] The instance library combination module is further configured to combine the three-dimensional models corresponding to the same building image in the style module library into a style module instance library.

[0174] Optionally, the attribute parameters include building module types and building module parameters, and the parameter extraction module 602 includes:

[0175] The semantic segmentation sub-module is configured to perform semantic segmentation processing on the building image to obtain the building module types of the building modules in the building image;

[0176] The feature detection sub-module is configured to perform image feature detection processing on the building image to obtain the building module parameters of the building modules.

[0177] Optionally, the attribute parameters include building module types and building module parameters, and the parameter extraction module 602 includes:

[0178] The contour annotation sub-module is configured to, in response to a contour annotation operation on the building image, annotate the building contours of the building modules in the building image;

[0179] A type annotation sub-module, configured to annotate the building module types of the building modules in the building outline in response to a type annotation operation on the building outline;

[0180] A parameter extraction sub-module, configured to extract the building module parameters of the building modules from the building outline.

[0181] Optionally, the building module parameters include dimension parameters, and further include:

[0182] A parameter acquisition module, configured to acquire the target dimension parameters of each building module type;

[0183] A parameter adjustment module, configured to adjust the dimension parameters of each building module to the target dimension parameters corresponding to the building module type.

[0184] Optionally, the virtual building assembly module 605 includes:

[0185] A parameter acquisition module, further configured to acquire the modular assembly parameters of the virtual building;

[0186] A module library determination module, configured to determine a target style module library in response to a selection operation on the style module library and other style module libraries, and display the style module instance library corresponding to the target style module library;

[0187] An instance library determination module, configured to determine a target style module instance library in response to a selection operation on the style module instance library;

[0188] A model assembly module, configured to assemble the target 3D models in the target style module instance library into a virtual building based on the modular assembly parameters;

[0189] A model display module, configured to display the virtual building.

[0190] Optionally, the target style module instance library has a corresponding modular parameter set, and the modular parameter set is a set of adjustable configuration parameters of each target 3D model in the target style module instance library, and further includes:

[0191] A parameter adjustment module, configured to determine an adjusted modular parameter set in response to an adjustment operation on the modular parameter set;

[0192] A model display module, further configured to update and display the virtual building based on the adjusted modular parameter set.

[0193] Optionally, it further includes:

[0194] An instance library storage module, configured to store the target style module instance library corresponding to the adjusted modular parameter set.

[0195] In summary, in the embodiments of the present invention, after obtaining the building image, the attribute parameters of each building module of the building in the building image can be directly extracted, and a three-dimensional model of the building module can be constructed based on the attribute parameters, without relying on the experience of the staff, improving the efficiency of building resource manufacturing and reducing the human resources in the process of manufacturing building resources.

[0196] In addition, in the embodiments of the present invention, after the three-dimensional model is constructed, the three-dimensional models of building modules of the same style are combined into a style module instance library, which is convenient for managing building resources. In the building assembly link, the staff can select the corresponding style module instance library to match the desired building style.

[0197] For the device embodiments, since they are basically similar to the method embodiments, they are described relatively simply, and the relevant parts can refer to the partial description of the method embodiments.

[0198] Preferably, the embodiments of the present invention further provide an electronic device, including: a processor, a memory, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, it implements each process of the above virtual building assembly method embodiment, for example:

[0199] Obtain a building image;

[0200] Extract the attribute parameters of each building module of the building in the building image;

[0201] Construct a three-dimensional model of the building module based on the attribute parameters;

[0202] Combine the three-dimensional models of the same building style into a style module instance library;

[0203] According to the style module instance library, assemble the virtual building of the building style corresponding to the three-dimensional model.

[0204] Optionally, the combining the three-dimensional models of the same building style into a style module instance library includes:

[0205] Obtain the data structure set for the building style of the style module library; the data structure includes the building module types of the three-dimensional models and the adjustable configuration parameters of the three-dimensional models of each building module type, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters;

[0206] Screen out the target three-dimensional modules from the three-dimensional models according to the data structure and combine them into a style module library;

[0207] By defining different numerical values for the adjustable configuration parameters of the target 3D module in the style module library, different style module instance libraries are formed.

[0208] Optionally, the attribute parameters include building module type and building module parameters. Extracting the attribute parameters of each building module of the building in the building image includes:

[0209] Performing semantic segmentation processing on the building image to obtain the building module types of each building module in the building image;

[0210] Performing image feature detection processing on the building image to obtain the building module parameters of each building module.

[0211] Optionally, the attribute parameters include building module type and building module parameters. Extracting the attribute parameters of each building module of the building in the building image includes:

[0212] In response to a contour annotation operation on the building image, annotate the building contours of the building modules in the building image;

[0213] In response to a type annotation operation on the building contour, annotate the building module types of the building modules in the building contour;

[0214] Extract the building module parameters of the building modules from the building contours.

[0215] Optionally, the building module parameters include dimension parameters. Before constructing the 3D model of the building module based on the attribute parameters, it further includes: [[ID=2C]]

[0216] Obtain the target dimension parameters of each building module type;

[0217] Adjust the dimension parameters of each building module to the target dimension parameters corresponding to the building module type.

[0218] Optionally, assembling the virtual building corresponding to the building style of the 3D model according to the style module instance library includes:

[0219] Obtain the modular assembly parameters of the virtual building;

[0220] In response to a selection operation on the style module library, determine the target style module library and display the style module instance library corresponding to the target style module library;

[0221] In response to a selection operation on the style module instance library, determine the target style module instance library;

[0222] Based on the modular assembly parameters, assemble the target 3D models in the target style module instance library into a virtual building; display the virtual building.

[0223] Optionally, the target style module instance library has a corresponding modular parameter set, which is a set of adjustable configuration parameters for each target 3D model in the target style module instance library. After displaying the virtual building, it further includes:

[0224] In response to an adjustment operation for the modular parameter set, determine the adjusted modular parameter set;

[0225] Based on the adjusted modular parameter set, update and display the virtual building.

[0226] Optionally, after updating and displaying the virtual building based on the adjusted modular parameter set, it further includes:

[0227] Store the target style module instance library corresponding to the adjusted modular parameter set.

[0228] In the above manner, after obtaining a building image, the attribute parameters of each building module of the building in the building image can be directly extracted, and 3D models of the building modules can be constructed based on the attribute parameters, without relying on the experience of staff, improving the efficiency of building resource manufacturing and reducing the human resources in the process of manufacturing building resources.

[0229] In addition, in the embodiments of the present invention, after constructing the 3D models, the 3D models of building modules of the same style are combined into a style module instance library, which is convenient for managing building resources. In the building assembly link, staff can select the corresponding style module instance library to match the desired building style.

[0230] The embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements each process of the above embodiment of the virtual building assembly method, for example:

[0231] Obtain a building image;

[0232] Extract the attribute parameters of each building module of the building in the building image;

[0233] Construct 3D models of the building modules based on the attribute parameters;

[0234] Combine the 3D models of the same building style into a style module instance library;

[0235] According to the style module instance library, assemble a virtual building of the building style corresponding to the 3D models.

[0236] Optionally, combining the 3D models of the same architectural style into a style module instance library includes:

[0237] Obtaining a data structure for the architectural style settings of the style module library; the data structure includes the architectural module types of the 3D models and the adjustable configuration parameters of the 3D models of each of the architectural module types, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters;

[0238] Screening out target 3D modules from the 3D models according to the data structure and combining them into a style module library;

[0239] Forming different style module instance libraries by defining different numerical values for the parameters of the adjustable configuration parameters of the target 3D modules in the style module library.

[0240] Optionally, the attribute parameters include architectural module types and architectural module parameters, and extracting the attribute parameters of each architectural module of the building in the building image includes:

[0241] Performing semantic segmentation processing on the building image to obtain the architectural module types of each architectural module in the building image;

[0242] Performing image feature detection processing on the building image to obtain the architectural module parameters of each architectural module.

[0243] Optionally, the attribute parameters include architectural module types and architectural module parameters, and extracting the attribute parameters of each architectural module of the building in the building image includes:

[0244] Responding to a contour annotation operation on the building image, and annotating the building contours of the architectural modules in the building image;

[0245] Responding to a type annotation operation on the building contour, and annotating the architectural module types of the architectural modules in the building contour;

[0246] Extracting the architectural module parameters of the architectural modules from the building contours.

[0247] Optionally, the architectural module parameters include dimension parameters. Before constructing the 3D model of the architectural module based on the attribute parameters, it further includes:

[0248] Obtaining the target dimension parameters of each architectural module type;

[0249] Adjusting the dimension parameters of each architectural module to the target dimension parameters corresponding to the architectural module type.

[0250] Optionally, assembling the virtual building corresponding to the architectural style of the 3D model according to the style module instance library includes:

[0251] Obtaining the modular assembly parameters of the virtual building;

[0252] In response to a selection operation on the style module library, determining a target style module library and displaying the style module instance library corresponding to the target style module library;

[0253] In response to a selection operation on the style module instance library, determining a target style module instance library;

[0254] Based on the modular assembly parameters, assembling the target 3D models in the target style module instance library into a virtual building; displaying the virtual building.

[0255] Optionally, the target style module instance library has a corresponding modular parameter set, which is a set of adjustable configuration parameters of each target 3D model in the target style module instance library. After displaying the virtual building, it further includes:

[0256] In response to an adjustment operation on the modular parameter set, determining the adjusted modular parameter set;

[0257] Based on the adjusted modular parameter set, updating and displaying the virtual building.

[0258] Optionally, after updating and displaying the virtual building based on the adjusted modular parameter set, it further includes:

[0259] Storing the target style module instance library corresponding to the adjusted modular parameter set.

[0260] In the above manner, after obtaining the building image, the attribute parameters of each building module in the building image can be directly extracted, and the 3D model of the building module can be constructed based on the attribute parameters, without relying on the experience of the staff, improving the efficiency of building resource manufacturing and reducing the human resources in the process of manufacturing building resources.

[0261] In addition, in the embodiments of the present invention, after constructing the 3D model, the 3D models of building modules of the same style are combined into a style module instance library, which is convenient for managing building resources. In the building assembly link, the staff can select the corresponding style module instance library to match the desired architectural style.

[0262] Among them, the computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc.

[0263] An embodiment of the present invention provides a computer program product. The program product is stored in a storage medium and is executed by at least one processor to implement each process of the virtual building assembly method embodiment as described above. For example:

[0264] Obtain a building image;

[0265] Extract the attribute parameters of each building module of the building in the building image;

[0266] Construct a three-dimensional model of the building module based on the attribute parameters;

[0267] Combine the three-dimensional models with the same building style into a style module instance library;

[0268] According to the style module instance library, assemble a virtual building with the building style corresponding to the three-dimensional model.

[0269] Optionally, the combining the three-dimensional models with the same building style into a style module instance library includes:

[0270] Obtain a data structure for setting the building style of the style module library; the data structure includes the building module types of the three-dimensional models and the adjustable configuration parameters of the three-dimensional models of each building module type, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters;

[0271] Screen out target three-dimensional modules from the three-dimensional models according to the data structure and combine them into a style module library;

[0272] By defining different numerical values for the parameters of the adjustable configuration parameters of the target three-dimensional modules in the style module library, different style module instance libraries are formed.

[0273] Optionally, the attribute parameters include building module types and building module parameters. The extracting the attribute parameters of each building module of the building in the building image includes:

[0274] Perform semantic segmentation processing on the building image to obtain the building module types of each building module in the building image;

[0275] Perform image feature detection processing on the building image to obtain the building module parameters of each building module.

[0276] Optionally, the attribute parameters include the building module type and building module parameters, and extracting the attribute parameters of each building module of the building in the building image includes:

[0277] In response to a contour annotation operation on the building image, annotate the building contours of the building modules in the building image;

[0278] In response to a type annotation operation on the building contour, annotate the building module type of the building module in the building contour;

[0279] Extract the building module parameters of the building module from the building contour.

[0280] Optionally, the building module parameters include dimension parameters. Before building the three-dimensional model of the building module based on the attribute parameters, it further includes:

[0281] Obtain the target dimension parameters of each building module type;

[0282] Adjust the dimension parameters of each building module to the target dimension parameters corresponding to the building module type.

[0283] Optionally, assembling the virtual building of the building style corresponding to the three-dimensional model according to the style module instance library includes:

[0284] Obtain the modular assembly parameters of the virtual building;

[0285] In response to a selection operation on the style module library, determine the target style module library and display the style module instance library corresponding to the target style module library;

[0286] In response to a selection operation on the style module instance library, determine the target style module instance library;

[0287] Based on the modular assembly parameters, assemble the target three-dimensional models in the target style module instance library into a virtual building; display the virtual building.

[0288] Optionally, the target style module instance library has a corresponding modular parameter set, and the modular parameter set is a set of adjustable configuration parameters of each target three-dimensional model in the target style module instance library. After displaying the virtual building, it further includes:

[0289] In response to an adjustment operation on the modular parameter set, determine the adjusted modular parameter set;

[0290] Based on the adjusted modular parameter set, update and display the virtual building.

[0291] Optionally, after updating and displaying the virtual building based on the adjusted modular parameter set, the following steps are further included:

[0292] Store the target style module instance library corresponding to the adjusted modular parameter set.

[0293] By the above method, after obtaining the building image, the attribute parameters of each building module in the building image can be directly extracted, and a 3D model of the building module can be constructed based on the attribute parameters, without relying on the experience of the staff, improving the efficiency of building resource manufacturing and reducing the human resources in the process of manufacturing building resources.

[0294] In addition, in the embodiments of the present invention, after constructing the 3D model, the 3D models of building modules of the same style are combined into a style module instance library, which is convenient for managing building resources. In the building assembly link, the staff can select the corresponding style module instance library to match the desired building style.

[0295] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including that element.

[0296] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment method can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0297] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the spirit and scope of the present invention as protected by the claims, and all of them fall within the protection scope of the present invention.

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

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

[0300] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be electrical, mechanical, or other forms.

[0301] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0302] In addition, the functional units in various embodiments of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.

[0303] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs that can store program codes.

[0304] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A virtual building assembly method, characterized in that, Including: Obtaining a building image; Extracting the attribute parameters of each building module of the building in the building image; Constructing a 3D model of the building module based on the attribute parameters; Combining the 3D models with the same building style into a style module instance library; According to the style module instance library, assembling a virtual building of the building style corresponding to the 3D model; wherein, the combining the 3D models with the same building style into a style module instance library includes: Obtaining a data structure of the building style setting for the style module library; the data structure includes the building module types of the 3D models and the adjustable configuration parameters of the 3D models of each building module type, and the parameters of the adjustable configuration parameters are different or not completely the same as the parameters in the attribute parameters; Screening out target 3D modules from the 3D models according to the data structure and combining them into a style module library; By defining different values for the parameters of the adjustable configuration parameters of the target 3D modules in the style module library, different style module instance libraries are formed.

2. The method according to claim 1, wherein The attribute parameters include building module types and building module parameters, and the extracting the attribute parameters of each building module of the building in the building image includes: Performing semantic segmentation processing on the building image to obtain the building module types of each building module in the building image; Performing image feature detection processing on the building image to obtain the building module parameters of each building module.

3. The method according to claim 1, wherein The attribute parameters include building module types and building module parameters, and the extracting the attribute parameters of each building module of the building in the building image includes: In response to a contour annotation operation on the building image, annotating the building contours of the building modules in the building image; In response to a type annotation operation on the building contour, annotating the building module types of the building modules in the building contour; Extracting the building module parameters of the building modules from the building contours.

4. The method according to claim 2 or 3, characterized in that, The building module parameters include dimension parameters. Before constructing the 3D model of the building module based on the attribute parameters, it further includes: Obtaining the target dimension parameters of each building module type; Adjusting the dimension parameters of each building module to the target dimension parameters corresponding to the building module type.

5. The method according to claim 1, wherein The assembling the virtual building of the building style corresponding to the 3D model according to the style module instance library includes: Obtaining the modular assembling parameters of the virtual building; In response to a selection operation on the style module library, determining a target style module library and displaying the style module instance library corresponding to the target style module library; In response to a selection operation on the style module instance library, determining a target style module instance library; Based on the modular assembling parameters, assembling the target 3D models in the target style module instance library into a virtual building; displaying the virtual building.

6. The method according to claim 5, characterized in that The target style module instance library has a corresponding modular parameter set, and the modular parameter set is a set of the adjustable configuration parameters of each target 3D model in the target style module instance library. After displaying the virtual building, it further includes: In response to an adjustment operation for the modular parameter set, determine the adjusted modular parameter set; Based on the adjusted modular parameter set, update and display the virtual building.

7. The method according to claim 6, wherein After the virtual building is updated and displayed based on the adjusted modular parameter set, it further includes: Store the target style module instance library corresponding to the adjusted modular parameter set.

8. A virtual building assembly device, characterized in that, The device includes: A design drawing acquisition module for acquiring a building image; A parameter extraction module for extracting the attribute parameters of each building module of the building in the building image; A model construction module for constructing a three-dimensional model of the building module based on the attribute parameters; An instance library combination module for combining the three-dimensional models of the same building style into a style module instance library; A virtual building assembly module for assembling a virtual building of the building style corresponding to the three-dimensional model according to the style module instance library; Among them, the instance library combination module includes: A data structure acquisition sub-module for acquiring the data structure set for the building style of the style module library; the data structure includes the building module types of the three-dimensional models and the adjustable configuration parameters of the three-dimensional models of each building module type, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters; A module library combination sub-module for screening out target three-dimensional modules from the three-dimensional models according to the data structure and combining them into a style module library; An instance library formation sub-module for forming different style module instance libraries by defining different values for the parameters of the adjustable configuration parameters of the target three-dimensional modules in the style module library.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus; The memory is used for storing computer programs; When the processor is used to execute the program stored on the memory, it implements the method according to any one of claims 1-7.

10. A computer-readable storage medium, on which instructions are stored, and when executed by one or more processors, cause the processors to execute the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Method for generating three-dimensional virtual interior design plan

    CN102737409A

  • Virtual building processing method, device and equipment and storage medium

    CN112258634A