CN111028348A - Method for rapidly loading large-batch models - Google Patents

Method for rapidly loading large-batch models Download PDF

Info

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
Application number
CN201911346043.4A
Other languages
Chinese (zh)
Inventor
刘龙昌
张子健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Fazhiyun Technology Co Ltd
Original Assignee
Beijing Fazhiyun Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Fazhiyun Technology Co Ltd filed Critical Beijing Fazhiyun Technology Co Ltd
Priority to CN201911346043.4A priority Critical patent/CN111028348A/en
Publication of CN111028348A publication Critical patent/CN111028348A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic 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

Method for rapidly loading large-batch models
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.
CN201911346043.4A 2019-12-24 2019-12-24 Method for rapidly loading large-batch models Pending CN111028348A (en)

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)

* Cited by examiner, † Cited by third party
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

Citations (5)

* Cited by examiner, † Cited by third party
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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
CN108829468B (en) Three-dimensional space model skipping processing method and device
CN111105507B (en) Virtual accessory model generation method and device, processor and electronic device
CN108776917B (en) Synchronous processing method and device for virtual three-dimensional space
CN111161390A (en) Rendering method and device based on BIM (building information modeling) model and WebGL (Web graphics library)
CN106791953A (en) Many player control methods, server and client
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
CN111583348B (en) Image data encoding method and device, image data displaying method and device and electronic equipment
CN110442519A (en) A kind of crash file processing method, device, electronic equipment and storage medium
CN111343485B (en) Method, device, equipment, system and storage medium for displaying virtual gift
CN108459910A (en) A kind of method and apparatus for deleting resource
CN109542754A (en) The cut-in method of mobile device, the adjustment method of application program, device and system
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
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
CN112051958B (en) Drawing multi-screen terminal interaction method and related device
CN103530370A (en) Method and system for visualization deduction based on electronic map
CN113901051A (en) Method and device for generating WebGL data, storage medium and electronic equipment
CN111242447A (en) Fire hazard assessment method, device, equipment and computer readable storage medium

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