CN111028348A - Method for rapidly loading large-batch models - Google Patents
Method for rapidly loading large-batch models Download PDFInfo
- Publication number
- CN111028348A CN111028348A CN201911346043.4A CN201911346043A CN111028348A CN 111028348 A CN111028348 A CN 111028348A CN 201911346043 A CN201911346043 A CN 201911346043A CN 111028348 A CN111028348 A CN 111028348A
- Authority
- CN
- China
- Prior art keywords
- loading
- model
- scene
- template
- application scene
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 24
- 230000006870 function Effects 0.000 claims description 2
- 238000012544 monitoring process Methods 0.000 claims description 2
- 230000000694 effects Effects 0.000 abstract description 2
- 239000000779 smoke Substances 0.000 description 9
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 7
- 238000012360 testing method Methods 0.000 description 6
- 230000035807 sensation Effects 0.000 description 4
- 239000007921 spray Substances 0.000 description 4
- 238000005507 spraying Methods 0.000 description 2
- 238000012800 visualization Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Geometry (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a method for rapidly loading mass models, belonging to the technical field of software. The technical scheme of the invention is that a three-dimensional model library is established, an application scene library is established, and a scene loading scheme is set. When the application scene is displayed, the template model is loaded firstly, and then the application scene is loaded according to the scene loading scheme. When the application scene is loaded, the existing template is copied in the memory, and other information attached to the scene element is loaded, so that the aims of reducing the data loading capacity and improving the loading speed are fulfilled. The method reduces the data volume transmitted by the model network by preloading the template model; the model copy is generated through the memory copy template model, so that the data loading speed is increased; by setting a model loading scheme, the flexible loading of the model according to an application scene is realized; by adding different model attributes, different display effects of the models are realized, and therefore the application scene is quickly loaded.
Description
Technical Field
The invention belongs to the technical field of software, and particularly relates to a method for rapidly loading large-batch models.
Background
With the development of software technology, three-dimensional visual display of data is rapidly developed according to the intuitiveness and convenience of data display. In the fields of smart cities, smart communities, smart factories and the like, three-dimensional visualization of data is indispensable.
In application scenes such as smart cities, smart communities, smart factories and the like, three-dimensional modeling of buildings is the basis of three-dimensional visualization. Due to the fact that the structure of the building is complex, and various equipment facilities attached to the building are added, the data volume of the three-dimensional model is huge, when the three-dimensional model of a large scene is loaded by the system in the prior art, the system is limited by system hardware and network environments, data loading is slow, user interaction efficiency is low, particularly when the three-dimensional model is loaded in a webpage and a mobile terminal, the system cannot run smoothly, the situation of blocking and even connection overtime often occurs, and practical application is not facilitated.
The existing processing method improves the loading speed by improving the system hardware configuration and increasing the network bandwidth, which not only increases the cost, but also can not solve the problem fundamentally for the building groups with complex structures and large quantity. There is therefore a need for a method that can increase the loading speed of three-dimensional models.
Disclosure of Invention
The invention aims to provide a method for rapidly loading mass models so as to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme:
firstly, establishing a three-dimensional model library, establishing an application scene library and setting a scene loading scheme. When the application scene is displayed, the template model is loaded firstly, and then the application scene is loaded according to the scene loading scheme. When the application scene is loaded, whether the loaded scene element has the loaded template model or not is judged, the existing template is copied in the memory, and other information added to the scene element is loaded, so that the aims of reducing the data loading amount and improving the loading speed are fulfilled.
The specific scheme is as follows:
step one, establishing a three-dimensional model library. The method comprises the steps of modeling a component through three-dimensional drawing software, modeling the same component in an application scene only once, storing only one record in a three-dimensional model library, setting a mark, and setting the record as a template model. For a single building block in the application scenario, the template flag is not set.
And step two, establishing an application scene library. The method comprises the steps of splitting an application scene into building blocks of a three-dimensional model, and storing information of all building blocks required to be used by the scene and attribute information attached to the building blocks in a database.
And step three, setting a scene loading scheme. The set content comprises the loading sequence of the components in the scene and the required model template. The setting mode is manual setting or automatic setting. After the scheme is set, the scheme can be stored as a scheme template and reused in other scenes.
And fourthly, preloading the model. And reading three-dimensional model data from the three-dimensional model library according to the template model required by the scene set in the third step, and preloading the three-dimensional model data in a webpage by using the model loading function of three.
And step five, loading the application scene. Reading scene information from an application scene library, setting light, a camera, a scene and a renderer of the scene by using three.js in a webpage, loading a three-dimensional model according to the scene information and the scene loading sequence set in the step, and copying the template model in a memory to establish a copy of the template model when a component needing to be loaded is the template model which is loaded in advance.
And step six, loading the attribute information of the additional model. And reading attribute information attached to the member in the application scene library, and adding the attribute information to the model. And finishing the display of the three-dimensional model of the application scene according to the position information in the attribute information. And additional display of other attributes.
The same components described in the first step are components with the same structure but different properties.
The attribute information attached to the component in the second step includes position, color, name, file, monitoring status and other related dynamic service data.
The manual setting in the third step means that the loading sequence of the model and the required model template are set by a system user according to experience.
The automatic setting in step three means that the system automatically sets according to parameters such as the size of a scene, corresponding services, the load condition of a server, the use frequency of a template and the like.
The scheme template multiplexing described in step three means that the same loading scheme is used in different scenes.
Compared with the prior art, the invention has the following beneficial effects: the method reduces the data volume transmitted by the model network by preloading the template model; the model copy is generated through the memory copy template model, so that the data loading speed is increased; by setting a model loading scheme, the flexible loading of the model according to an application scene is realized; by adding different model attributes, different display effects of the models are realized, and therefore the application scene is quickly loaded.
Drawings
Fig. 1 is a flowchart of scene loading provided in embodiment 1 of the present invention.
Detailed Description
The present invention will be described in detail below with reference to the drawings and examples, but the practice of the invention is not limited thereto.
Example 1
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
The method is performed according to the scene loading flow chart shown in fig. 1, and specifically includes the following operations:
step 1, establishing a three-dimensional model library.
Step 1.1, establishing a three-dimensional model for a factory building and an attached fire-fighting facility through three-dimensional drawing software, such as Autodesk Revit, Inventor and the like.
The attached fire-fighting equipment includes: smoke detector, fire hydrant, terminal water testing device, fire pump, spray system, fire pipeline, etc.
And step 1.2, storing the model data into a data table corresponding to the database, wherein the data table comprises fields such as template ID, template type, whether the model is a template model, creation time, updating time, template marks and the like. Wherein, smoke detector, fire hydrant, terminal water testing device, fire pump, spraying device, fire pipeline are template models, and the factory building is a common model.
And 2, establishing an application scene library.
And 2.1, establishing an application scene library of the factory building, wherein the application scene library comprises the elements of the factory building, N1 smoke detectors, N2 fire hydrants, N3 tail end water testing devices, N4 fire water pumps, N5 spraying devices, N6 fire pipelines and the like.
And 2.2, storing the scene information into a data table corresponding to the database, wherein the data table comprises fields such as a scene ID, a scene element ID, an element type, a template type, an element position, creation time, updating time and the like.
And 3, setting a loading scheme of a scene, and loading the template model by manual setting, wherein the types of the template model are smoke detector, fire hydrant, tail end water testing device, fire pump, spray header and fire pipeline. The loading sequence is 1, factory building; 2. a fire-fighting pipeline; 3. a fire pump; 4. a fire hydrant; 5. a terminal water test device; 6. smoke sensation; 7. and a spray header.
And 4, preloading the model. According to the scene loading scheme, the loading types are template models of smoke detection, fire hydrant, tail end water testing device, fire pump, spray header and fire pipeline.
And 5, loading an application scene, reading scene setting in a database, firstly reading scene setting data, and respectively loading each element in the scene. And (3) loading accessory facilities, taking smoke sensation as an example, when the smoke sensation is loaded in a scene, firstly judging whether the template of the smoke sensation has a pre-loaded template or not, if so, copying in a memory, and establishing a copy object.
And 6, reading the auxiliary information in the scene database, and assigning the auxiliary information to the copied copy object.
And the loading of the whole application scene is completed.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (10)
1. A method for rapidly loading mass models is characterized by comprising the following steps: establishing a three-dimensional model library, establishing an application scene library and setting a scene loading scheme; when the application scene is displayed, firstly loading a template model, and then loading the application scene according to a scene loading scheme; when the application scene is loaded, whether the loaded scene element has the loaded template model or not is judged, the existing template is copied in the memory, and the attribute information of the scene element additional model is loaded.
2. The method for rapid loading of a large batch of models according to claim 1, wherein the method for establishing the three-dimensional model library comprises the following steps: the method comprises the steps of modeling a component through three-dimensional drawing software, modeling the same component in an application scene only once, storing only one record in a three-dimensional model library, setting a mark, setting the record as a template model, and not setting the template mark for a single component in the application scene.
3. The method for rapid loading of large batch models according to claim 1, wherein the method for establishing the application scene library comprises the following steps: the application scene is divided into building blocks of a three-dimensional model, and information of all the building blocks used by the scene and attribute information attached to the building blocks are stored in a database.
4. The method for rapid loading of large batch of models according to claim 1, wherein the set scenario loading scheme includes set contents and a set manner, the set contents include a loading order of components in the scenario and a required model template, the set manner is manual setting and automatic setting, and after the scenario is set, the scenario can be saved as a scenario template and reused in other scenarios.
5. The method for rapidly loading the large-batch models according to claim 1, wherein the model preloading is to read three-dimensional model data from a three-dimensional model library according to the template model required by the set scene, and the model preloading is performed in a webpage by using a model loading function of three.
6. The method for rapidly loading the large-batch models according to claim 1, wherein the application scene loading is to read scene information from an application scene library, light, a camera, a scene and a renderer of the scene are set in a webpage by using three.js, the three-dimensional models are loaded according to the set scene loading sequence according to the scene information, and when the component to be loaded is a pre-loaded template model, the template model is copied in a memory to establish a copy of the template model.
7. The method for rapidly loading the large-batch models according to claim 1, wherein the loading additional model attribute information is attribute information attached to a member in an application scene library, and the attribute information is added to the model; and completing the three-dimensional model display of the application scene according to the position information in the attribute information, and additionally displaying other attributes.
8. The method for rapid loading of large batch models according to claim 2, wherein the same components are components with the same structure but different properties.
9. The method of claim 3, wherein the component-attached attribute information includes location, color, name, profile, monitoring status, and associated dynamic business data.
10. The method for rapid loading of large batch of models according to claim 4, wherein the manual setting is performed by a system user according to experience and the loading sequence of the models and the required model templates; the automatic setting system automatically sets according to parameters such as scene size, corresponding service, load condition of the server, use frequency of the template and the like; the scheme templates are multiplexed to use the same loading scheme in different scenes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911346043.4A CN111028348A (en) | 2019-12-24 | 2019-12-24 | Method for rapidly loading large-batch models |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911346043.4A CN111028348A (en) | 2019-12-24 | 2019-12-24 | Method for rapidly loading large-batch models |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111028348A true CN111028348A (en) | 2020-04-17 |
Family
ID=70212059
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911346043.4A Pending CN111028348A (en) | 2019-12-24 | 2019-12-24 | Method for rapidly loading large-batch models |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111028348A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112287322A (en) * | 2020-11-23 | 2021-01-29 | 上海同态信息科技有限责任公司 | Preloading mode of encrypted face recognition model |
CN112891933A (en) * | 2021-03-25 | 2021-06-04 | 腾讯科技(深圳)有限公司 | Game service starting method and related device |
CN112906235A (en) * | 2021-03-09 | 2021-06-04 | 上汽通用五菱汽车股份有限公司 | Method for three-dimensional factory construction and engineering application |
CN117883789A (en) * | 2024-03-15 | 2024-04-16 | 腾讯科技(深圳)有限公司 | Data acquisition method, apparatus, device, readable storage medium, and program product |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110307290A1 (en) * | 2010-06-14 | 2011-12-15 | Jerome Rolia | Personalized capacity planning scenarios using reusable capacity planning scenario templates |
CN102831307A (en) * | 2012-05-31 | 2012-12-19 | 山东电力集团公司青岛供电公司 | Three-dimensional GIS (Geographic Information System) technology based power grid visualization system and method |
CN103617646A (en) * | 2013-10-23 | 2014-03-05 | 山东康威通信技术股份有限公司 | Three-dimensional model library establishment method of power tunnel environment |
CN103885788A (en) * | 2014-04-14 | 2014-06-25 | 焦点科技股份有限公司 | Dynamic WEB 3D virtual reality scene construction method and system based on model componentization |
CN108364341A (en) * | 2018-03-05 | 2018-08-03 | 四川易利数字城市科技有限公司 | Three-dimensional scenic based on reusable template model loads rendering efficiency improvement method |
-
2019
- 2019-12-24 CN CN201911346043.4A patent/CN111028348A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110307290A1 (en) * | 2010-06-14 | 2011-12-15 | Jerome Rolia | Personalized capacity planning scenarios using reusable capacity planning scenario templates |
CN102831307A (en) * | 2012-05-31 | 2012-12-19 | 山东电力集团公司青岛供电公司 | Three-dimensional GIS (Geographic Information System) technology based power grid visualization system and method |
CN103617646A (en) * | 2013-10-23 | 2014-03-05 | 山东康威通信技术股份有限公司 | Three-dimensional model library establishment method of power tunnel environment |
CN103885788A (en) * | 2014-04-14 | 2014-06-25 | 焦点科技股份有限公司 | Dynamic WEB 3D virtual reality scene construction method and system based on model componentization |
CN108364341A (en) * | 2018-03-05 | 2018-08-03 | 四川易利数字城市科技有限公司 | Three-dimensional scenic based on reusable template model loads rendering efficiency improvement method |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112287322A (en) * | 2020-11-23 | 2021-01-29 | 上海同态信息科技有限责任公司 | Preloading mode of encrypted face recognition model |
CN112906235A (en) * | 2021-03-09 | 2021-06-04 | 上汽通用五菱汽车股份有限公司 | Method for three-dimensional factory construction and engineering application |
CN112891933A (en) * | 2021-03-25 | 2021-06-04 | 腾讯科技(深圳)有限公司 | Game service starting method and related device |
CN117883789A (en) * | 2024-03-15 | 2024-04-16 | 腾讯科技(深圳)有限公司 | Data acquisition method, apparatus, device, readable storage medium, and program product |
CN117883789B (en) * | 2024-03-15 | 2024-05-28 | 腾讯科技(深圳)有限公司 | Data acquisition method, apparatus, device, readable storage medium, and program product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111028348A (en) | Method for rapidly loading large-batch models | |
US10521971B2 (en) | Method and apparatus for marking and displaying spatial size in virtual three-dimensional house model | |
CN108829468B (en) | Three-dimensional space model skipping processing method and device | |
CN111105507B (en) | Virtual accessory model generation method and device, processor and electronic device | |
CN111161390A (en) | Rendering method and device based on BIM (building information modeling) model and WebGL (Web graphics library) | |
CN112000911B (en) | Page management method, device, electronic equipment and storage medium | |
CN113037545A (en) | Network simulation method, device, equipment and storage medium | |
CN108682439B (en) | Recording method and device for house source introduction based on virtual three-dimensional space | |
CN109542754B (en) | Access method of mobile equipment, debugging method, device and system of application program | |
CN108459910A (en) | A kind of method and apparatus for deleting resource | |
CN111343485A (en) | Method, device, equipment, system and storage medium for displaying virtual gift | |
CN111193731A (en) | Method and device for generating network shooting range scene description file | |
CN111273980B (en) | Interface thread visualization method and device, computer equipment and storage medium | |
CN112233196A (en) | Live broadcast room green screen detection method, device, equipment and storage medium | |
CN117313674A (en) | Processing method, system, equipment and medium of rich text editor | |
CN110609825B (en) | Power system graphic data visualization processing method and device | |
CN114266170B (en) | Gas supply range identification method and device in gas distribution pipe network | |
CN106550250A (en) | Barrage exchange method, device and electronic equipment | |
CN114187416A (en) | Conference room reservation method and device | |
CN111242447B (en) | Fire hazard assessment method, device, equipment and computer readable storage medium | |
CN112051958B (en) | Drawing multi-screen terminal interaction method and related device | |
CN105260194B (en) | A kind of chemical industrial park comprehensive monitoring system fast construction platform | |
CN113901051A (en) | Method and device for generating WebGL data, storage medium and electronic equipment | |
CN113590225A (en) | Map detection method and device, electronic equipment and storage medium | |
CN105630624A (en) | Deep mirroring method, device and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200417 |
|
RJ01 | Rejection of invention patent application after publication |