Background
In the field of Building engineering, Building Information Modeling (BIM) applications are embodied in a component production phase, a transportation phase, a field construction phase, and an operation and maintenance phase. How to complete the modeling better and faster is a very important issue.
At present, offline software modeling is generally adopted and then uploaded to a network terminal, for example, a conventional modeling mode includes local modeling through engineering software such as REVIT and the like and then uploading to the network terminal for lightweight analysis and display, and a user needs to manually model according to drawings, so that time and labor are wasted, and the modeling efficiency is low.
Disclosure of Invention
Based on the problems, the application provides a modeling method and a related device, which can identify components in a target engineering drawing through artificial intelligence, automatically select a corresponding component model from a preset component model library for modeling, and improve the modeling efficiency.
In a first aspect, an embodiment of the present application provides a modeling method, where the method includes:
identifying and processing a target engineering drawing to obtain component data;
selecting a component model corresponding to the component data from a preset component model library;
and generating a target model according to the component model and the component data, wherein the target model is a model representing the construction information of the target engineering drawing.
In an application embodiment, the identifying the target engineering drawing to obtain the component data includes:
uploading the target engineering drawing to a webpage end for light-weight processing to obtain light-weight drawing data;
and inputting the lightweight drawing data into a drawing identification model, and obtaining a component structure set and a component parameter set in the target engineering drawing according to the output of the drawing identification model.
In one application embodiment, the component structure set comprises at least one component type, and the number of components corresponding to each component type is at least one; selecting the component model corresponding to the component data from a preset component model library, wherein the selecting comprises the following steps:
selecting component type models corresponding to all component types from the preset component model library;
and determining the model number of each component type model according to the component number corresponding to each component type.
In one application embodiment, the set of component parameters includes a dimensional parameter for each component and an orientation parameter for each component; the generating a target model from the component model and the component data includes:
generating a target component model according to the size parameter of each component, the component type model and the model number of each component type model, wherein the target component model comprises building information models corresponding to all the components;
the target model is generated from the orientation parameters of each component and the target component model.
In a second aspect, an embodiment of the present application provides a modeling apparatus, including:
the identification unit is used for identifying the target engineering drawing to obtain component data;
the selection unit is used for selecting a component model corresponding to the component data from a preset component model library;
and the modeling unit is used for generating a target model according to the component model and the component data, wherein the target model is a model representing the building information of the target engineering drawing.
In an application embodiment, in the aspect of obtaining the component data by performing the identification process on the target engineering drawing, the identification unit is specifically configured to:
uploading the target engineering drawing to a webpage end for light-weight processing to obtain light-weight drawing data;
and inputting the lightweight drawing data into a trained drawing recognition model, and obtaining a component structure set and a component parameter set in the target engineering drawing according to the output of the drawing recognition model.
In one application embodiment, the component structure set comprises at least one component type, and the number of components corresponding to each component type is at least one; in the aspect of selecting the component model corresponding to the component data from the preset component model library, the selecting unit is specifically configured to:
selecting component type models corresponding to all component types from the preset component model library;
and determining the model number of each component type model according to the component number corresponding to each component type.
In one application embodiment, the set of component parameters includes a dimensional parameter for each component and an orientation parameter for each component; in the context of the generating a target model from the component model and the component data, the modeling unit is specifically configured to:
generating a target component model according to the size parameter of each component, the component type model and the model number of each component type model, wherein the target component model comprises building information models corresponding to all the components;
an object model is generated from the orientation parameters of each component and the object component model.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program enables a computer to perform some or all of the steps described in the first aspect of the embodiment of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
Therefore, according to the modeling method and the related device provided by the embodiment of the application, firstly, a target engineering drawing is identified to obtain component data; selecting a component model corresponding to the component data from a preset component model library; and generating a target model according to the component model and the component data, wherein the target model is a model representing the construction information of the target engineering drawing. The components in the target engineering drawing can be identified through artificial intelligence, the corresponding component models are automatically selected from the preset component model library for modeling, and the modeling efficiency is improved.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The electronic device described in the embodiment of the present application may include a smart Phone (e.g., an Android Phone, an iOS Phone, a Windows Phone, etc.), a tablet computer, a palm computer, a notebook computer, a video matrix, a monitoring platform, a Mobile Internet device (MID, Mobile Internet Devices), or a wearable device, which are merely examples, but not exhaustive, and include but are not limited to the foregoing Devices.
An application scenario of the Modeling method in the embodiment of the present application is described below with reference to fig. 1, where fig. 1 is an application scenario diagram of the Modeling method provided in the embodiment of the present application, and includes adrawing providing unit 110, a webpage Modeling platform 120, and a presetcomponent model library 130, where thedrawing providing unit 110 is connected to the webpage Modeling platform 120 and may be used to provide a target engineering drawing, the target engineering drawing may be drawn by CAD software, and may include a dwg format, it may be understood that the target engineering drawing may include multiple drawings, a complete Building Information Modeling (BIM) (hereinafter referred to as a BIM model) may be constructed according to the target engineering drawing, the webpage Modeling platform 120 is connected to the presetcomponent model library 130 and may perform recognition processing after receiving the target engineering drawing, a corresponding component model is called from the presetcomponent model library 130 to generate a final target model, the target model may be a BIM model, and the presetcomponent model library 130 may be a database including all component models, and the component models are updated in real time when a new component is identified.
Specifically, a user may upload a target engineering drawing to the web-basedmodeling platform 120 through thedrawing providing unit 110, and the web-basedmodeling platform 120 may perform lightweight analysis on the target engineering drawing, identify only component data related to modeling and store the component data in a lightweight form, and then call a component model corresponding to the identified component data from the presetcomponent model library 130 to generate a target model, which is a three-dimensional model representing building information of the target engineering drawing.
According to the application scene, the components in the target engineering drawing can be identified through artificial intelligence, the corresponding component model is automatically selected from the preset component model library for modeling, and the modeling efficiency is improved.
A modeling method in the embodiment of the present application is described below with reference to fig. 2, where fig. 2 is a schematic flow chart of the modeling method provided in the embodiment of the present application, and specifically includes the following steps:
step 201, identifying the target engineering drawing to obtain component data.
The target engineering drawing includes all CAD drawings capable of building a complete BIM model, the component data may include a component structure set and a component parameter set, the component structure set represents a set formed by each component type, and the component parameter set represents a size parameter, an orientation parameter, and the like of each component.
In an optional embodiment, the target engineering drawing may be uploaded to a webpage end to perform lightweight processing, so as to obtain lightweight drawing data.
Specifically, the weight reduction process may include a parametric geometric description and a triangulated geometric description:
parametric geometry description, i.e. a geometry is described by a number of parameters, e.g. a cylinder, which can be described by 3 parameters, parameter 1, bottom origin coordinates (x, y, z, 3 values); parameter 2, bottom radius (r, 1 number); parameter 3, column height (h, 1 value). Therefore, the construction of a cylinder can be completed by 5 numerical values, the construction is very simple, the parameterized geometric description can realize the most light weight of a single primitive, and the parameterized geometric description can be applied to a target engineering drawing to complete light weight treatment;
triangularized geometric description, i.e., a plurality of triangles are used to describe a target engineering drawing, the triangles can be spliced into any plane or curved surface, and a three-dimensional body is composed of a plurality of plane curved surfaces, which is also the basis of modern computer graphics processing and is not described herein again.
And then inputting the lightweight drawing data into a drawing identification model, and obtaining a component structure set and a component parameter set in the target engineering drawing according to the output of the drawing identification model.
Specifically, the drawing recognition model may be a trained neural network model, including a convolutional neural network model, a cyclic neural network model, and the like, the training data may be a marked target engineering drawing, and the trained drawing recognition model may automatically output the component structure set and the component parameter set according to input lightweight drawing data.
Therefore, the efficiency and the accuracy of identifying the target engineering drawing can be improved.
In an alternative embodiment, the specific identification processing means may be an image identification technology, or may also be a search based on component identifiers, different component structures have different component identifiers, and a component structure may be at least one of the following: rectangular columns, circular columns, i-beams, etc., without limitation. In this embodiment, each component in the BIM model may correspond to a component identifier, and the component identifier may be at least one of the following: reference numbers, names, location labels, etc., without limitation. Specifically, the electronic device may obtain a component identifier set in the BIM model, and then may analyze the BIM model according to the component identifier set to obtain a target component set. Specifically, a component identification set in a target engineering drawing can be obtained; and then, identifying and analyzing the target engineering drawing according to the component identification set to obtain the component data.
Therefore, the efficiency and the accuracy of target engineering drawing identification can be improved.
Step 202, selecting a component model corresponding to the component data from a preset component model library.
The preset component model library stores all the component types in an ideal state, the component data may include a component structure set and a component parameter set, the component structure set may include a plurality of component types, the number of components corresponding to each component type is plural, component type models corresponding to all the component types may be selected from the preset component model library according to a mapping relationship of the component types, and then the number of models of each component type is determined according to the number of components corresponding to each component type.
For example, if it is recognized that there are 20 circular columns, 15 square columns, 1 door, 4 walls and 2 windows in the target engineering drawing, 20 circular column models, 15 square column models, 1 door model, 4 wall models and 2 window models can be automatically called from the building library so as to subsequently build the target model.
By selecting the component model corresponding to the component data from a preset component model library, the corresponding component model can be called based on the mapping relation between the component type and the component number, and the component model can be automatically selected.
Step 203, generating a target model according to the component model and the component data.
And the target model is a model representing the building information of the target engineering drawing. The component parameter set comprises the dimension parameter of each component and the orientation parameter of each component, so that a target component model can be generated according to the dimension parameter of each component, the component type model and the model number of each component type model, and the target component model comprises building information models corresponding to all the components; the target model is generated from the orientation parameters of each component and the target component model.
For example, the component data identified from the target engineering drawing is: the number of the circular columns is 1, the diameter of each circular column is 500 cm, the elevation of each circular column is 3 meters, and each circular column is located in a first area; the square columns are 1, 200 cm in diameter and 2 m in elevation and are located in a second area, the second area is located above the first area, and the circular columns are connected with the square columns. Then, the size of 1 circular column model can be set to be 500 cm in diameter and 3 m in elevation, the size of 1 square column model can be set to be 200 cm in diameter and 2 m in elevation, and then the final generated target model is: the combination of the circular column model located in the first area and the square column model arranged above the circular column model.
It should be noted that the target model may be a light weight BIM model, which can be displayed on a web page, and geometric transformation and rendering processing may be adopted for model light weight, which is not described herein again. Therefore, the target model is displayed at the webpage end, and the viewing experience of the user can be improved.
According to the method, firstly, a target engineering drawing is identified to obtain component data; selecting a component model corresponding to the component data from a preset component model library; and generating a target model according to the component model and the component data, wherein the target model is a model representing the construction information of the target engineering drawing. The components in the target engineering drawing can be identified through artificial intelligence, the corresponding component models are automatically selected from the preset component model library for modeling, and the modeling efficiency is improved.
Another modeling method in the embodiment of the present application is described below with reference to fig. 3, where fig. 3 is a schematic flow chart of another modeling method provided in the embodiment of the present application, and specifically includes the following steps:
step 301, a basic recognition model is established.
The basic recognition model can be a related neural network model for engineering drawing recognition.
Step 302, inputting training engineering drawing data into a basic recognition model, and determining training component data according to the output of the basic recognition model.
The training engineering drawing can be derived from a database of building design and is a marked engineering drawing, and the training component data is a training structure set and a training parameter set output by the basic recognition model.
Optionally, the training engineering drawing may be subjected to lightweight processing, such as parameterized geometric processing, at the web page end to obtain lightweight training drawing data, the lightweight training drawing data is input into a basic recognition model, and the training parameter set of the training structure set is obtained according to the output of the basic recognition model.
By inputting training engineering drawing data into a basic recognition model and determining training component data from the output of the basic recognition model, the basic recognition model can be efficiently trained based on training data.
Step 303, obtaining the contact ratio of the training component data and the standard component data corresponding to the training component data.
The standard component data is a correct result corresponding to the training component data, and can be obtained according to a mark made in advance, the coincidence degree of the training rib image and the standard rib image can be determined by calculating a Dice coefficient and a cross entropy loss function, and the higher the coincidence degree is, the more accurate the result output by the basic semantic segmentation model is.
And obtaining the contact ratio of the training rib image and the standard rib image corresponding to the training image data to obtain accurate training progress.
And 304, updating the basic identification model according to the contact ratio to obtain a drawing identification model.
And when the contact ratio accords with a preset contact ratio threshold value, the training can be stopped, and the drawing recognition model is considered to be obtained.
305, identifying the target engineering drawing to obtain component data;
step 306, selecting a component model corresponding to the component data from a preset component model library;
step 307, a target model is generated from the component model and the component data.
The above-mentioned parts not described in detail can refer to the description of all or part of the method steps in fig. 2, and are not described herein again.
By the method, the components in the target engineering drawing can be identified through artificial intelligence, the corresponding component model is automatically selected from the preset component model library for modeling, and the modeling efficiency is improved.
Fig. 4 is a schematic structural diagram of an electronic device 400 according to an embodiment of the present application, and the electronic device 400 includes anapplication processor 401, acommunication interface 402, and amemory 403, where theapplication processor 401, thecommunication interface 402, and thememory 403 are connected to each other through abus 404, and thebus 404 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Thebus 404 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus. Wherein thememory 403 is used for storing a computer program comprising program instructions, theapplication processor 401 is configured for invoking the program instructions for performing the method of:
identifying and processing a target engineering drawing to obtain component data;
selecting a component model corresponding to the component data from a preset component model library;
and generating a target model according to the component model and the component data, wherein the target model is a model representing the construction information of the target engineering drawing.
Firstly, identifying a target engineering drawing to obtain component data; selecting a component model corresponding to the component data from a preset component model library; and generating a target model according to the component model and the component data, wherein the target model is a model representing the construction information of the target engineering drawing. The components in the target engineering drawing can be identified through artificial intelligence, the corresponding component models are automatically selected from the preset component model library for modeling, and the modeling efficiency is improved.
In a possible embodiment, in terms of the component data obtained by performing the identification process on the target engineering drawing, the instructions in the program are specifically configured to perform the following operations:
uploading the target engineering drawing to a webpage end for light-weight processing to obtain light-weight drawing data;
and inputting the lightweight drawing data into a drawing identification model, and obtaining a component structure set and a component parameter set in the target engineering drawing according to the output of the drawing identification model.
In one possible embodiment, the component structure set comprises at least one component type, each component type corresponding to at least one component number; in the aspect of selecting the component model corresponding to the component data from the preset component model library, the instructions in the program are specifically configured to perform the following operations:
selecting component type models corresponding to all component types from the preset component model library;
and determining the model number of each component type model according to the component number corresponding to each component type.
In one possible embodiment, the set of component parameters includes a dimensional parameter for each component and an orientation parameter for each component; in the context of the generating a target model from the component model and the component data, the instructions in the program are specifically configured to perform the following:
generating a target component model according to the size parameter of each component, the component type model and the model number of each component type model, wherein the target component model comprises building information models corresponding to all the components;
the target model is generated from the orientation parameters of each component and the target component model.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In the case of dividing each functional module according to each function, a detailed description is given below with reference to fig. 5 to a modeling apparatus in an embodiment of the present application, where fig. 5 is a block diagram of functional units of amodeling apparatus 500 provided in the embodiment of the present application, where themodeling apparatus 500 includes:
theidentification unit 510 is used for identifying the target engineering drawing to obtain component data;
a selectingunit 520, configured to select a component model corresponding to the component data from a preset component model library;
amodeling unit 530, configured to generate a target model according to the component model and the component data, where the target model is a model representing the construction information of the target engineering drawing.
All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
In the case of using integrated units, the following describes in detail anothermodeling apparatus 600 in the embodiment of the present application with reference to fig. 6, where themodeling apparatus 600 includes aprocessing unit 601 and acommunication unit 602, where theprocessing unit 601 is configured to perform any step in the above method embodiments, and when performing data transmission such as sending, thecommunication unit 602 is optionally invoked to complete the corresponding operation.
Wherein themodeling apparatus 600 may further comprise astorage unit 603 for storing program codes and data. Theprocessing unit 601 may be a micro control unit, thecommunication unit 602 may be a touch display screen, and thestorage unit 603 may be a memory.
Theprocessing unit 601 is specifically configured to:
identifying and processing a target engineering drawing to obtain component data;
selecting a component model corresponding to the component data from a preset component model library;
and generating a target model according to the component model and the component data, wherein the target model is a model representing the construction information of the target engineering drawing.
It can be understood that, since the method embodiment and the apparatus embodiment are different presentation forms of the same technical concept, the content of the method embodiment portion in the present application should be synchronously adapted to the apparatus embodiment portion, and is not described herein again. Both themodeling apparatus 500 and themodeling apparatus 600 described above can perform all of the positioning methods included in the above embodiments.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to perform part or all of the steps of any one of the methods as described in the above method embodiments, and the computer includes a fish school detection device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.