CN107577766B - Webpage 3D target loading method and device - Google Patents

Webpage 3D target loading method and device Download PDF

Info

Publication number
CN107577766B
CN107577766B CN201710786341.XA CN201710786341A CN107577766B CN 107577766 B CN107577766 B CN 107577766B CN 201710786341 A CN201710786341 A CN 201710786341A CN 107577766 B CN107577766 B CN 107577766B
Authority
CN
China
Prior art keywords
displayed
target
sub
downloading
dimensional model
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.)
Active
Application number
CN201710786341.XA
Other languages
Chinese (zh)
Other versions
CN107577766A (en
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.)
Suzhou Yingnuomai Medical Innovation Services Co ltd
Original Assignee
Suzhou Yingnuomai Medical Innovation Services 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 Suzhou Yingnuomai Medical Innovation Services Co ltd filed Critical Suzhou Yingnuomai Medical Innovation Services Co ltd
Priority to CN201710786341.XA priority Critical patent/CN107577766B/en
Publication of CN107577766A publication Critical patent/CN107577766A/en
Application granted granted Critical
Publication of CN107577766B publication Critical patent/CN107577766B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a method and a device for loading a webpage 3D target, wherein the method comprises the following steps: setting a 3D target as at least two sub-targets in advance; determining at least one sub-target needing background downloading in real time, downloading the at least one sub-target needing background downloading from a server storing the 3D target in a background manner, and storing the sub-target into a browser cache; determining at least one sub-target to be displayed which needs to be displayed on the display webpage; and judging whether the current sub-target to be displayed is stored in the browser cache or not for each sub-target to be displayed, if so, loading the current sub-target to be displayed to the display webpage from the browser cache, otherwise, downloading the current sub-target to be displayed from the server, and loading the current sub-target to be displayed to the display webpage. The invention provides a webpage 3D target loading method and device, which can reduce loading time.

Description

Webpage 3D target loading method and device
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for loading a 3D target of a webpage.
Background
With the rapid development of 3D technology, the 3D technology is also more and more widely applied. Taking a 3D virtual exhibition hall as an example, the 3D virtual exhibition hall is a digital exhibition hall constructed by using the technology of computer graphics, and is a three-dimensional interactive experience mode.
In the prior art, the loading of the 3D object is mainly an integral loading manner, that is, the whole program of the whole 3D object is packaged, when the user needs to load the 3D object, the program of the whole 3D object needs to be downloaded locally from the server, and then the 3D object can be viewed from the webpage.
Since the data size of the 3D object is generally large, loading by the loading method of the prior art requires a long loading time.
Disclosure of Invention
The embodiment of the invention provides a method and a device for loading a 3D target of a webpage, which can reduce the loading time.
In one aspect, an embodiment of the present invention provides a method for loading a 3D object of a web page, including:
setting a 3D target as at least two sub-targets in advance;
determining at least one sub-target needing background downloading in real time, downloading the at least one sub-target needing background downloading from a server storing the 3D target in a background manner, and storing the sub-target into a browser cache;
determining at least one sub-target to be displayed which needs to be displayed on the display webpage;
and judging whether the current sub-target to be displayed is stored in the browser cache or not for each sub-target to be displayed, if so, loading the current sub-target to be displayed to the display webpage from the browser cache, otherwise, downloading the current sub-target to be displayed from the server, and loading the current sub-target to be displayed to the display webpage.
Further, the air conditioner is provided with a fan,
the at least two sub-goals include: a three-dimensional scene of at least one 3D exhibition hall and at least one internal three-dimensional model inside the at least one 3D exhibition hall;
the real-time determination of at least one sub-target needing background downloading, the background downloading of the at least one sub-target needing background downloading from a server storing the 3D target, and the storing of the at least one sub-target needing background downloading into a browser cache, includes:
a1: judging whether a three-dimensional scene which is not stored in the browser cache exists in the three-dimensional scenes of the at least one 3D exhibition hall, if so, executing A2, otherwise, executing A3;
a2: determining at least one three-dimensional scene needing background downloading from the three-dimensional scenes which are not stored in the browser cache, downloading the at least one three-dimensional scene needing background downloading from the server in a background manner, storing the at least one three-dimensional scene needing background downloading into the browser cache, and returning to A1;
a3: judging whether an internal three-dimensional model which is not saved in the browser cache exists in at least one internal three-dimensional model in the at least one 3D exhibition hall, if so, executing A4;
a4: and determining at least one internal three-dimensional model needing background downloading from the internal three-dimensional models which are not stored in the browser cache, downloading the at least one internal three-dimensional model needing background downloading from the server in a background manner, storing the internal three-dimensional model needing background downloading into the browser cache, and returning to A3.
Further, the air conditioner is provided with a fan,
the at least two sub-targets further include: the catalog map of the at least one 3D exhibition hall comprises an entrance of the at least one 3D exhibition hall, so that a user can select the entrance of a target 3D exhibition hall needing to be viewed from the catalog map;
the real-time determination of at least one sub-target needing background downloading, the background downloading of the at least one sub-target needing background downloading from a server storing the 3D target, and the storing of the at least one sub-target needing background downloading into a browser cache, includes:
before a1, further comprising:
judging whether the directory map is stored in the browser cache, if so, executing A1, otherwise, determining that the directory map needs to be downloaded in a background, downloading the directory map from the server in the background, storing the downloaded directory map in the browser cache, and executing A1;
the determining at least one sub-target to be displayed, which needs to be displayed on the display webpage, includes:
when the user selects an entrance of the target 3D exhibition hall needing to be viewed on the catalog map, determining that a three-dimensional scene of the target 3D exhibition hall and at least one internal three-dimensional model in the target 3D exhibition hall need to be displayed on the display webpage.
Further, the air conditioner is provided with a fan,
the at least one internal three-dimensional model comprising: a low-quality three-dimensional model of the exhibit;
the 3D object comprises: each high-quality exhibit three-dimensional model corresponds to the low-quality exhibit three-dimensional model;
the data volume of the low-quality three-dimensional model of the exhibit is smaller than that of the corresponding high-quality three-dimensional model of the exhibit;
further comprising:
when at least one high-quality exhibit three-dimensional model to be displayed needs to be displayed on the display webpage,
and judging whether the high-quality exhibit three-dimensional model to be displayed currently is stored in the browser cache or not aiming at each high-quality exhibit three-dimensional model to be displayed currently, if so, loading the high-quality exhibit three-dimensional model to be displayed currently onto the display webpage from the browser cache, otherwise, downloading the high-quality exhibit three-dimensional model to be displayed currently from the server, storing the high-quality exhibit three-dimensional model to be displayed currently into the browser cache, and loading the high-quality exhibit three-dimensional model to be displayed currently onto the display webpage.
Further, the air conditioner is provided with a fan,
when the currently to-be-displayed sub-object is not saved in the browser cache,
after the downloading the currently to-be-displayed sub-target from the server, further comprising:
and storing the sub-targets to be displayed currently into the browser cache.
Further, the air conditioner is provided with a fan,
when the current sub-target to be displayed is judged not to be stored in the browser cache,
before the downloading the current sub-target to be displayed from the server, further comprising:
determining the target number according to the preset proportion and the total number of the running threads;
the downloading the current sub-target to be displayed from the server includes:
and downloading the current sub-targets to be displayed from the server by utilizing the target number of threads.
Further, the air conditioner is provided with a fan,
the 3D object comprises: at least one plane information;
further comprising:
when at least one piece of plane information to be displayed needs to be displayed on the display webpage,
and judging whether the current plane information to be displayed is stored in the browser cache or not for each piece of the plane information to be displayed, if so, loading the current plane information to be displayed to the display webpage from the browser cache, otherwise, downloading the current plane information to be displayed from the server, storing the current plane information to be displayed to the browser cache, and loading the current plane information to be displayed to the display webpage.
On the other hand, an embodiment of the present invention provides a device for loading a 3D object of a web page, including:
the target setting unit is used for setting the 3D target into at least two sub-targets;
the sub-target cache unit is used for determining at least one sub-target needing background downloading in real time, downloading the at least one sub-target needing background downloading from a server storing the 3D target to a background, and storing the sub-target into a browser cache;
the display device comprises a determining unit, a display unit and a display unit, wherein the determining unit is used for determining at least one sub-target to be displayed which needs to be displayed on a display webpage;
and the display unit is used for judging whether the sub-targets to be displayed currently are stored in the browser cache or not for each sub-target to be displayed, if so, loading the sub-targets to be displayed currently to the display webpage from the browser cache, otherwise, downloading the sub-targets to be displayed currently from the server, and loading the sub-targets to be displayed currently to the display webpage.
Further, the air conditioner is provided with a fan,
the at least two sub-goals include: a three-dimensional scene of at least one 3D exhibition hall and at least one internal three-dimensional model inside the at least one 3D exhibition hall;
the sub-target cache unit is used for executing:
a1: judging whether a three-dimensional scene which is not stored in the browser cache exists in the three-dimensional scenes of the at least one 3D exhibition hall, if so, executing A2, otherwise, executing A3;
a2: determining at least one three-dimensional scene needing background downloading from the three-dimensional scenes which are not stored in the browser cache, downloading the at least one three-dimensional scene needing background downloading from the server in a background manner, storing the at least one three-dimensional scene needing background downloading into the browser cache, and returning to A1;
a3: judging whether an internal three-dimensional model which is not saved in the browser cache exists in at least one internal three-dimensional model in the at least one 3D exhibition hall, if so, executing A4;
a4: and determining at least one internal three-dimensional model needing background downloading from the internal three-dimensional models which are not stored in the browser cache, downloading the at least one internal three-dimensional model needing background downloading from the server in a background manner, storing the internal three-dimensional model needing background downloading into the browser cache, and returning to A3.
Further, the air conditioner is provided with a fan,
the at least two sub-targets further include: the catalog map of the at least one 3D exhibition hall comprises an entrance of the at least one 3D exhibition hall, so that a user can select the entrance of a target 3D exhibition hall needing to be viewed from the catalog map;
the sub-target cache unit is used for executing:
before A1, judging whether the catalog map is stored in the browser cache, if so, executing A1, otherwise, determining that the catalog map needs to be downloaded in a background, downloading the catalog map from the server in the background, storing the downloaded catalog map in the browser cache, and executing A1;
the determining unit is configured to determine that a three-dimensional scene of the target 3D exhibition hall and at least one internal three-dimensional model of the target 3D exhibition hall need to be displayed on the display webpage when the user selects an entrance of the target 3D exhibition hall that needs to be viewed on the catalog map.
Further, the air conditioner is provided with a fan,
the at least one internal three-dimensional model comprising: a low-quality three-dimensional model of the exhibit;
the 3D object comprises: each high-quality exhibit three-dimensional model corresponds to the low-quality exhibit three-dimensional model;
the data volume of the low-quality three-dimensional model of the exhibit is smaller than that of the corresponding high-quality three-dimensional model of the exhibit;
further comprising:
the exhibition loading unit is used for judging whether the high-quality three-dimensional model to be displayed currently is stored in the browser cache or not aiming at each high-quality exhibition three-dimensional model to be displayed when at least one high-quality exhibition three-dimensional model to be displayed needs to be displayed on the display webpage, if so, loading the high-quality exhibition three-dimensional model to be displayed currently onto the display webpage from the browser cache, otherwise, downloading the high-quality exhibition three-dimensional model to be displayed currently from the server, storing the high-quality exhibition three-dimensional model to be displayed currently into the browser cache, and loading the high-quality exhibition three-dimensional model to be displayed currently onto the display webpage.
Further, the air conditioner is provided with a fan,
the display unit is configured to, when the current sub-target to be displayed is not stored in the browser cache, store the current sub-target to be displayed in the browser cache after downloading the current sub-target to be displayed from the server.
Further, the air conditioner is provided with a fan,
and the display unit is used for determining the target number according to a preset proportion and the total number of the running threads when judging that the current sub-target to be displayed is not stored in the browser cache, and downloading the current sub-target to be displayed from the server by using the target number of threads.
Further, the air conditioner is provided with a fan,
the 3D object comprises: at least one plane information;
further comprising:
the plane information display unit is used for judging whether the current plane information to be displayed is stored in the browser cache or not according to each plane information to be displayed when at least one plane information to be displayed needs to be displayed on the display webpage, if so, loading the current plane information to be displayed onto the display webpage from the browser cache, and otherwise, downloading the current plane information to be displayed from the server, storing the current plane information to be displayed into the browser cache, and loading the current plane information to be displayed onto the display webpage.
In the embodiment of the invention, the 3D object is set as at least two sub-objects, when the foreground provides corresponding service for the user, the sub-objects needing to be downloaded in the background can be downloaded in the background, when the user needs to display the sub-objects stored in the browser cache, the sub-objects can be directly loaded from the browser cache, because the downloading process is completed in the background, the loading time is reduced, when the sub-objects needing to be displayed on the display webpage are not stored in the browser cache, only the sub-objects needing to be displayed are downloaded from the server, the whole 3D object does not need to be downloaded, the data downloading amount is greatly reduced, the downloading time is reduced, and the loading time is further reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a method for loading a 3D object of a web page according to an embodiment of the present invention;
FIG. 2 is a flowchart of another method for loading a 3D object of a web page according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a device for loading a 3D object of a web page according to an embodiment of the present invention;
fig. 4 is a schematic diagram of another loading apparatus for a 3D object of a web page according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a method for loading a 3D object of a web page, where the method may include the following steps:
step 101: setting a 3D target as at least two sub-targets in advance;
step 102: determining at least one sub-target needing background downloading in real time, downloading the at least one sub-target needing background downloading from a server storing the 3D target in a background manner, and storing the sub-target into a browser cache;
step 103: determining at least one sub-target to be displayed which needs to be displayed on the display webpage;
step 104: and judging whether the current sub-target to be displayed is stored in the browser cache or not for each sub-target to be displayed, if so, loading the current sub-target to be displayed to the display webpage from the browser cache, otherwise, downloading the current sub-target to be displayed from the server, and loading the current sub-target to be displayed to the display webpage.
In the embodiment of the invention, the 3D object is set as at least two sub-objects, when the foreground provides corresponding service for the user, the sub-objects needing to be downloaded in the background can be downloaded in the background, when the user needs to display the sub-objects stored in the browser cache, the sub-objects can be directly loaded from the browser cache, because the downloading process is completed in the background, the loading time is reduced, when the sub-objects needing to be displayed on the display webpage are not stored in the browser cache, only the sub-objects needing to be displayed are downloaded from the server, the whole 3D object does not need to be downloaded, the data downloading amount is greatly reduced, the downloading time is reduced, and the loading time is further reduced.
In an embodiment of the present invention, determining at least one sub-target needing background downloading in real time may be implemented by: predicting the next sub-target to be displayed on the display webpage in real time, and determining the predicted sub-target to be downloaded in the background. Specifically, the next sub-target to be displayed on the display webpage can be predicted according to the operation habit of the current user and the currently displayed sub-target of the display webpage. And predicting the next sub-target to be displayed on the displayed webpage according to the operation habits of each user and the currently displayed sub-target of the displayed webpage.
In an embodiment of the present invention, the at least two sub-targets include: a three-dimensional scene of at least one 3D exhibition hall and at least one internal three-dimensional model inside the at least one 3D exhibition hall;
the real-time determination of at least one sub-target needing background downloading, the background downloading of the at least one sub-target needing background downloading from a server storing the 3D target, and the storing of the at least one sub-target needing background downloading into a browser cache, includes:
a1: judging whether a three-dimensional scene which is not stored in the browser cache exists in the three-dimensional scenes of the at least one 3D exhibition hall, if so, executing A2, otherwise, executing A3;
a2: determining at least one three-dimensional scene needing background downloading from the three-dimensional scenes which are not stored in the browser cache, downloading the at least one three-dimensional scene needing background downloading from the server in a background manner, storing the at least one three-dimensional scene needing background downloading into the browser cache, and returning to A1;
a3: judging whether an internal three-dimensional model which is not saved in the browser cache exists in at least one internal three-dimensional model in the at least one 3D exhibition hall, if so, executing A4;
a4: and determining at least one internal three-dimensional model needing background downloading from the internal three-dimensional models which are not stored in the browser cache, downloading the at least one internal three-dimensional model needing background downloading from the server in a background manner, storing the internal three-dimensional model needing background downloading into the browser cache, and returning to A3.
In an embodiment of the invention, the 3D object may be a 3D exhibition hall, which may include at least one 3D exhibition hall, and each 3D exhibition hall includes a three-dimensional scene and an internal three-dimensional model. The three-dimensional scene herein mainly refers to the overall structure of the exhibition hall, for example: interior decoration of the exhibition hall, layout of doors, windows and the like of the exhibition hall. The internal three-dimensional model here mainly includes: a three-dimensional model of a booth, a three-dimensional model of a display board, a three-dimensional model of an exhibit and the like.
For a 3D exhibition hall, the internal three-dimensional model inside the 3D exhibition hall may change due to different exhibition merchants, different exhibition products, and the like, but the three-dimensional scene of the 3D exhibition hall does not need to be changed. For example, in the 3D exhibition hall a, monday needs to show the exhibit a of the merchant a, at this time, the merchant a sets internal three-dimensional models such as the exhibition hall three-dimensional model a, the exhibition board three-dimensional model a and the exhibit three-dimensional model of the exhibit a in the 3D exhibition hall a as required, while monday needs to show the exhibit B of the merchant B, at this time, the merchant B sets internal three-dimensional models such as the exhibition hall three-dimensional model B, the exhibition board three-dimensional model B and the exhibit three-dimensional model of the exhibit B in the 3D exhibition hall B as required, so that it is clear that the overall structure of the 3D exhibition hall a does not need to be changed, and only the exhibition hall three-dimensional model, the exhibition board three-dimensional model and the exhibit three-dimensional model need to be changed. In the embodiment of the invention, the three-dimensional scene of the 3D exhibition hall is taken as a sub-target, and when the content in the 3D exhibition hall needs to be modified, the three-dimensional scene of the 3D exhibition hall does not need to be modified, so that the workload can be greatly reduced.
In the embodiment of the invention, the three-dimensional scene of the 3D exhibition hall is downloaded in the background, and then the internal three-dimensional model is downloaded. Therefore, when a user needs to enter a certain 3D exhibition hall, if the internal three-dimensional model of the 3D exhibition hall is not downloaded, the three-dimensional scene of the 3D exhibition hall can be displayed for the user firstly, and the user is prevented from waiting for too long time.
When the three-dimensional scene needing background downloading is determined, downloading can be carried out according to a preset downloading sequence. For example, there are three 3D exhibition halls, namely 3D exhibition halls a, 3D exhibition halls B and 3D exhibition halls C, and the preset downloading sequence is: and 3D exhibition hall A → 3D exhibition hall B → 3D exhibition hall C, and determining the three-dimensional scenes needing background downloading from the three-dimensional scenes which are not stored in the browser cache according to the downloading sequence. For example: if the three-dimensional scenes of the 3D exhibition hall A, the 3D exhibition hall B and the 3D exhibition hall C are not stored in the browser cache, firstly, the three-dimensional scenes needing background downloading are determined to be the three-dimensional scenes of the 3D exhibition hall A, then the three-dimensional scenes of the 3D exhibition hall B and finally the three-dimensional scenes of the 3D exhibition hall C. If the three-dimensional scene of the 3D exhibition hall B is stored in the browser cache because the user has already looked at the 3D exhibition hall B, at this time, the three-dimensional scenes of the 3D exhibition hall A and the 3D exhibition hall C are not stored in the browser cache, according to the downloading sequence, the three-dimensional scene of the 3D exhibition hall A is firstly downloaded in the background, and then the three-dimensional scene of the 3D exhibition hall C is downloaded in the background.
In addition, after all three-dimensional scenes are stored in the browser cache, background downloading of the internal three-dimensional model is carried out. When at least one internal three-dimensional model needing background downloading is determined from the internal three-dimensional models which are not stored in the browser cache, the internal three-dimensional models can be downloaded according to a preset downloading sequence, and the downloading sequence can be the same as the downloading sequence of the three-dimensional models. Or take 3D exhibition hall a, 3D exhibition hall B and 3D exhibition hall C as examples, the preset downloading sequence is: and 3D exhibition hall A → 3D exhibition hall B → 3D exhibition hall C, determining the internal three-dimensional model needing background downloading from the internal three-dimensional models which are not stored in the browser cache according to the downloading sequence. For example: if the internal three-dimensional models of the 3D exhibition hall A, the 3D exhibition hall B and the 3D exhibition hall C are not stored in the browser cache, firstly, the internal three-dimensional model needing background downloading is determined to be the internal three-dimensional model of the 3D exhibition hall A, then the internal three-dimensional model of the 3D exhibition hall B and finally the internal three-dimensional model of the 3D exhibition hall C. If the internal three-dimensional model of the 3D exhibition hall B is stored in the browser cache because the user has already looked at the 3D exhibition hall B, at this time, the internal three-dimensional models of the 3D exhibition hall A and the 3D exhibition hall C are not stored in the browser cache, according to the downloading sequence, the internal three-dimensional model of the 3D exhibition hall A is firstly downloaded in the background, and then the internal three-dimensional model of the 3D exhibition hall C is downloaded in the background. Because no merchant is resident in a certain 3D exhibition hall, the internal three-dimensional model of the 3D exhibition hall may not exist, and at this time, the internal three-dimensional model of the 3D exhibition hall does not need to be downloaded, and the user can see the three-dimensional scene of the 3D exhibition hall after entering the 3D exhibition hall. At this time, after all the internal three-dimensional models of the 3D exhibition hall are downloaded in the background, the background downloading of the next 3D exhibition hall is performed. When the downloading sequence is set, the possibility that each 3D exhibition hall is accessed first can be ranked according to factors such as the historical times of access, and the downloading sequence is determined according to the ranking. For example: due to the reasons of exhibition hall publicity, traffic attraction and the like, the possibility that a user visits the VIP exhibition hall first is high, and the VIP exhibition hall can be set to be the first one when the downloading sequence is set.
In addition, all internal three-dimensional models in the 3D target are stored in the browser cache, and then it is determined that no sub-targets needing background downloading exist, at this time, the background downloading can be finished, and only the sub-targets need to be displayed on the display webpage according to the requirements of the user.
In an embodiment of the invention, the method further comprises:
the at least two sub-targets further include: the catalog map of the at least one 3D exhibition hall comprises an entrance of the at least one 3D exhibition hall, so that a user can select the entrance of a target 3D exhibition hall needing to be viewed from the catalog map;
the real-time determination of at least one sub-target needing background downloading, the background downloading of the at least one sub-target needing background downloading from a server storing the 3D target, and the storing of the at least one sub-target needing background downloading into a browser cache, includes:
before a1, further comprising:
judging whether the directory map is stored in the browser cache, if so, executing A1, otherwise, determining that the directory map needs to be downloaded in a background, downloading the directory map from the server in the background, storing the downloaded directory map in the browser cache, and executing A1;
the determining at least one sub-target to be displayed, which needs to be displayed on the display webpage, includes:
when the user selects an entrance of the target 3D exhibition hall needing to be viewed on the catalog map, determining that a three-dimensional scene of the target 3D exhibition hall and at least one internal three-dimensional model in the target 3D exhibition hall need to be displayed on the display webpage.
In the embodiment of the invention, in order to facilitate the user to access each 3D exhibition hall, a catalog map is set for each 3D exhibition hall, the catalog map can be a 2.5D map, and the catalog map is connected with each 3D exhibition hall by using a 3D pre-rendering technology. Specifically, the catalog map is provided with icons of each 3D exhibition hall, the icons are entrances of the 3D exhibition halls, and a user can enter a certain 3D exhibition hall by clicking the icon of the 3D exhibition hall.
In the embodiment of the invention, before the three-dimensional scene is downloaded in the background, the catalog map is downloaded, so that the entries of all the 3D exhibition halls are provided for the user through the catalog map. In addition, cutscenes may be included in the 3D object. After a user opens a display webpage, the user enters a picture loading node, firstly plays the scene cut animation, and can download the directory map in a background in the process of playing the scene cut animation, specifically, the process animation is played through a main thread, and the directory map is downloaded in a background through a branch thread. Therefore, the user can directly enter the directory map after the process animation is played, so that the waiting time of the user is greatly reduced, and the user experience is improved.
The method has the advantages that background downloading of the three-dimensional scene and the internal three-dimensional model can be performed in the process that a user views the catalog map, when the user enters a certain 3D venue through the catalog map, the three-dimensional scene and the internal three-dimensional model of the 3D venue can be stored in the browser cache, the user can directly view the three-dimensional scene and the internal three-dimensional model of the 3D venue, waiting is not needed, the loading speed is greatly improved, and user experience is improved.
When the user selects an entrance of the target 3D exhibition hall on the catalog map, it is necessary to display the three-dimensional scene of the target 3D exhibition hall and the internal three-dimensional model on the presentation web page for the user. That is, the three-dimensional scene of the target 3D exhibition hall and the internal three-dimensional model are taken as at least one sub-target to be displayed.
In an embodiment of the invention, the at least one internal three-dimensional model comprises: a low-quality three-dimensional model of the exhibit;
the 3D object comprises: each high-quality exhibit three-dimensional model corresponds to the low-quality exhibit three-dimensional model;
the data volume of the low-quality three-dimensional model of the exhibit is smaller than that of the corresponding high-quality three-dimensional model of the exhibit;
further comprising:
when at least one high-quality exhibit three-dimensional model to be displayed needs to be displayed on the display webpage,
and judging whether the high-quality exhibit three-dimensional model to be displayed currently is stored in the browser cache or not aiming at each high-quality exhibit three-dimensional model to be displayed currently, if so, loading the high-quality exhibit three-dimensional model to be displayed currently onto the display webpage from the browser cache, otherwise, downloading the high-quality exhibit three-dimensional model to be displayed currently from the server, storing the high-quality exhibit three-dimensional model to be displayed currently into the browser cache, and loading the high-quality exhibit three-dimensional model to be displayed currently onto the display webpage.
In the embodiment of the invention, the three-dimensional model of the exhibit displayed in the 3D exhibition hall is the three-dimensional model of the exhibit with low quality, and the loading speed of the 3D exhibition hall can be greatly improved because the data volume of the three-dimensional model of the exhibit with low quality is small.
In addition, a corresponding high-quality three-dimensional model of the exhibit is also set for each low-quality three-dimensional model of the exhibit in the 3D object. In order to avoid excessive content loaded at one time, the high-quality three-dimensional models of the exhibits are not downloaded in the background, and are downloaded to the browser cache only when the user needs to check the high-quality three-dimensional models. The high quality and the low quality are relatively expressed, and are distinguished by the size of the data volume, and for the same exhibit, the three-dimensional model of the exhibit with the large data volume is the high-quality three-dimensional model of the exhibit, and the three-dimensional model of the exhibit with the small data volume is the low-quality three-dimensional model of the exhibit. And for the same exhibit incoming book, setting a low-quality exhibit three-dimensional model as an internal three-dimensional model, and setting a high-quality exhibit three-dimensional model for the exhibit. For example, a user may click on a low quality three-dimensional model of an exhibit in a 3D exhibition hall to view a corresponding high quality three-dimensional model of the exhibit. Each high-quality three-dimensional model of the exhibit is prefabricated in a database, cannot be downloaded in advance, and is downloaded from the database when a user needs to check the three-dimensional model, and the database can be arranged on a server for storing a 3D object.
In the embodiment of the invention, if a certain high-quality three-dimensional model of an exhibit is checked in the current browser, the high-quality three-dimensional model of the exhibit is stored in the browser cache without being downloaded from a server; and if the high-quality three-dimensional model of the exhibit is not viewed in the current browser, downloading the high-quality three-dimensional model of the exhibit from the server, and storing the high-quality three-dimensional model in a browser cache, so that the high-quality three-dimensional model of the exhibit can be conveniently viewed in the current browser.
In an embodiment of the present invention, when the currently to-be-displayed sub-object is not saved in the browser cache,
after the downloading the currently to-be-displayed sub-target from the server, further comprising:
and storing the sub-targets to be displayed currently into the browser cache.
In the embodiment of the invention, the downloaded sub-targets are saved in the browser cache, and the sub-targets do not need to be downloaded from the server when being displayed later, so that the loading speed is increased.
In an embodiment of the present invention, when it is determined that the currently to-be-displayed sub-target is not stored in the browser cache,
before the downloading the current sub-target to be displayed from the server, further comprising:
determining the target number according to the preset proportion and the total number of the running threads;
the downloading the current sub-target to be displayed from the server includes:
and downloading the current sub-targets to be displayed from the server by utilizing the target number of threads.
In the embodiment of the invention, if the sub-targets to be displayed currently are not stored in the browser cache, the sub-targets to be displayed currently are downloaded from the server by using the target number of threads, and the downloading speed is ensured by the target number of threads, so that the sub-targets to be displayed currently are displayed on the display webpage as soon as possible. The preset proportion may be greater than or equal to 50%, specifically, the preset proportion may be 100%, that is, the sub-targets to be displayed currently are loaded fully through all the threads to increase the loading speed, and when the preset proportion is 100%, the background downloading process is suspended during the downloading of the sub-targets to be displayed currently.
In an embodiment of the present invention, the 3D object includes: at least one plane information;
further comprising:
when at least one piece of plane information to be displayed needs to be displayed on the display webpage,
and judging whether the current plane information to be displayed is stored in the browser cache or not for each piece of the plane information to be displayed, if so, loading the current plane information to be displayed to the display webpage from the browser cache, otherwise, downloading the current plane information to be displayed from the server, storing the current plane information to be displayed to the browser cache, and loading the current plane information to be displayed to the display webpage.
In the embodiment of the invention, the 3D object comprises plane information, and the plane information can provide more detailed description of the 3D object for a user. The plane information can be characters, pictures, audios and videos, and the like, for example: the system comprises the image-text information of an enterprise, the display video of the enterprise, the image-text information of an exhibit, the display video of the exhibit and the like.
The plane information is prefabricated in the server for storing the 3D target in advance, background downloading is not performed in advance, and when a user needs to display, the corresponding plane information is downloaded from the server, so that the problem of excessive content loading at one time is solved. The loaded plane information is stored in the browser cache, and can be directly called from the browser cache when being loaded again later, so that the plane information does not need to be downloaded again from the server, and the loading speed is increased. In addition, the plane information can be pre-prepared in the database of the server in advance.
In an embodiment of the present invention, when the user selects an entrance of a target 3D exhibition hall to be viewed on the catalog map, the loading process is as follows:
s1: determining a three-dimensional scene of a target 3D exhibition hall and at least one internal three-dimensional model in the target 3D exhibition hall which need to be displayed on a display webpage;
s2: judging whether the three-dimensional scene of the target 3D exhibition hall is stored in a browser cache, if so, executing S3 and S4, otherwise, executing S7;
s3: loading the three-dimensional scene of the target 3D exhibition hall onto a display webpage from the browser cache, and executing S4;
s4: judging whether at least one internal three-dimensional model in the target 3D exhibition hall is stored in a browser cache, if so, executing S5, otherwise, executing S6;
s5: loading at least one internal three-dimensional model in the target 3D exhibition hall onto a display webpage from a browser cache;
s6: downloading at least one internal three-dimensional model in the target 3D exhibition hall from a server, loading the at least one internal three-dimensional model in the target 3D exhibition hall onto a display webpage, and storing the at least one internal three-dimensional model in the target 3D exhibition hall into a browser cache;
s7: the method comprises the steps of downloading a three-dimensional scene of a target 3D exhibition hall and at least one internal three-dimensional model in the target 3D exhibition hall from a server, loading the three-dimensional scene of the target 3D exhibition hall and the at least one internal three-dimensional model in the target 3D exhibition hall onto a display webpage, and storing the three-dimensional scene of the target 3D exhibition hall and the at least one internal three-dimensional model in the target 3D exhibition hall into a browser cache.
In an embodiment of the present invention, determining at least one to-be-displayed sub-target that needs to be displayed on the display webpage may be implemented by:
the first method is as follows: and determining a corresponding target 3D exhibition hall according to the identification of the 3D exhibition hall input by the user, and determining that the three-dimensional scene of the target 3D exhibition hall and at least one internal three-dimensional model in the target 3D exhibition hall need to be displayed on the display network. Specifically, the user may jump from the currently located 3D exhibition hall to the target 3D exhibition hall. A jump entry is arranged on the display page, and the jump entry can be identified by the name of a 3D exhibition hall and the like.
The second method comprises the following steps: and determining a corresponding target 3D exhibition hall according to the entrance of the target 3D exhibition hall selected by the user on the catalog map, and determining that the three-dimensional scene of the target 3D exhibition hall and at least one internal three-dimensional model in the target 3D exhibition hall need to be displayed on the display network.
The third method comprises the following steps: the method comprises the steps of determining a target 3D exhibition hall where an enterprise is located according to an identification of the enterprise needing to be checked and input by a user, and determining a three-dimensional scene of the target 3D exhibition hall and at least one internal three-dimensional model in the target 3D exhibition hall needing to be displayed on a display network.
In an embodiment of the present invention, step 102 may be executed when the user opens the presentation webpage, and executed until there is no sub-icon requiring background downloading.
As shown in fig. 2, an embodiment of the present invention provides a method for loading a 3D object of a webpage, where the method may include the following steps:
step 201: setting the 3D target as at least two sub-targets in advance, wherein the at least two sub-targets comprise: the system comprises at least one 3D exhibition hall directory map, at least one 3D exhibition hall three-dimensional scene and at least one 3D exhibition hall internal three-dimensional model, wherein the directory map comprises at least one 3D exhibition hall entrance.
Specifically, the internal three-dimensional model includes: a three-dimensional model of a booth, a three-dimensional model of a display board and a three-dimensional model of an exhibit.
For example, the 3D object may be a 3D exhibition hall, including 3D exhibition hall a, 3D exhibition hall B, and 3D exhibition hall C. Each 3D exhibition hall comprises a three-dimensional scene and an internal three-dimensional model of the 3D exhibition hall. The catalog map comprises: an entrance to 3D exhibition hall a, an entrance to 3D exhibition hall B, and an entrance to 3D exhibition hall C.
Step 202: and judging whether the directory map is stored in the browser cache, if so, executing step 204, otherwise, executing step 203.
When the user opens the display webpage, the cut scene animation can be displayed for the user, and the directory map can be downloaded in the background in the process of playing the cut scene animation. Of course, if the catalog map is cached in the browser before, the process animation can be skipped and the catalog map can be directly entered.
The catalog map is to provide the user with the entrance of each 3D exhibition hall, which is only one way of providing the user with the entrance of each 3D exhibition hall, and the entrance of each 3D exhibition hall may be directly displayed in text form on the page without passing through the catalog map, for example: the names of the respective 3D exhibition halls are displayed.
Step 203: determining that the directory map needs to be downloaded in the background, downloading the directory map in the background from the server, storing the downloaded directory map in the cache of the browser, and executing step 204.
Specifically, if the user stays on the catalog map for a long time, the background can finish background downloading of all three-dimensional scenes, and then the user can directly enter the 3D exhibition hall without waiting.
Step 204: and judging whether a three-dimensional scene which is not saved in the browser cache exists in the three-dimensional scenes of at least one 3D exhibition hall, if so, executing the step 205, otherwise, executing the step 206.
Step 205: and determining at least one three-dimensional scene needing background downloading from the three-dimensional scenes which are not stored in the browser cache, downloading the at least one three-dimensional scene needing background downloading from the server in a background manner, storing the three-dimensional scene in the browser cache, and returning to the step 204.
Specifically, when at least one three-dimensional scene needing background downloading is determined, a preset number of three-dimensional scenes can be selected from the three-dimensional scenes which are not stored in the browser cache for background downloading, and if all the three-dimensional scenes which are not stored in the browser cache are subjected to background downloading, the problems of displayed page blocking and the like due to excessive downloading content can be caused.
In addition, in the background downloading process, the user may select a certain three-dimensional scene to view, the three-dimensional scene is directly loaded to the display page from the server and is stored in the browser cache, and when at least one three-dimensional scene needing background downloading is determined next time, the three-dimensional scene is stored in the browser cache, so that repeated downloading can be avoided. For example, when determining at least one three-dimensional scene needing background downloading for the ith time, determining that the three-dimensional scene of the 3D exhibition hall a, the three-dimensional scene of the 3D exhibition hall B and the three-dimensional scene of the 3D exhibition hall C are not in the browser cache, determining that the three-dimensional scene of the 3D exhibition hall a needs background downloading, and in the background downloading process, selecting to view the 3D exhibition hall B by a user, at this time, directly loading the three-dimensional scene of the 3D exhibition hall B from the server onto the display webpage and storing the three-dimensional scene into the browser cache, and when determining at least one three-dimensional scene needing background downloading for the (i + 1) th time, only the three-dimensional scene of the 3D exhibition hall C is not in the browser cache, only the three-dimensional scene of the 3D exhibition hall C needs to be downloaded in the background, so that the three-dimensional scene of the 3D exhibition hall B is prevented from.
Step 206: and judging whether at least one internal three-dimensional model in at least one 3D exhibition hall has an internal three-dimensional model which is not saved in a browser cache, if so, executing step 207, otherwise, executing step 208.
Step 207: and determining at least one internal three-dimensional model needing background downloading from the internal three-dimensional models which are not stored in the browser cache, downloading the at least one internal three-dimensional model needing background downloading from the server in a background manner, storing the internal three-dimensional model in the browser cache, and returning to the step 206.
Specifically, when the internal three-dimensional models are downloaded in the background, all the internal three-dimensional models in the current 3D exhibition hall can be downloaded after the background downloading is completed, and then all the internal three-dimensional models in the next 3D exhibition hall can be downloaded. Further, when at least one internal three-dimensional model needing background downloading is determined each time, the background downloading can be performed by taking the 3D exhibition hall as a unit, that is, all internal three-dimensional models inside the current 3D exhibition hall are taken as the internal three-dimensional models needing background downloading. For example, when determining that at least one internal three-dimensional model needs to be downloaded in the background, all internal three-dimensional models inside 3D exhibition hall a, all internal three-dimensional models inside 3D exhibition hall B, and all internal three-dimensional models inside 3D exhibition hall C are not in the browser cache, determining that all internal three-dimensional models inside 3D exhibition hall a need to be downloaded in the background.
Step 208: the current flow is ended.
The background download may be stopped after the catalog map, all three-dimensional scenes, and all internal three-dimensional models are saved in the browser cache. And the plane information such as characters, pictures, audios and videos in the 3D target can be directly loaded from the server.
Step 209: at least one sub-target to be displayed, which needs to be displayed on the display webpage, is determined.
Specifically, when the user selects to view a certain 3D exhibition hall, it is determined that the three-dimensional scene of the 3D exhibition hall and all internal three-dimensional models of the 3D exhibition hall need to be displayed on the exhibition webpage. The user may select the 3D exhibition hall that needs to be viewed by:
the first method is as follows: the user selects an entrance of a certain 3D exhibition hall through the directory map.
The second method comprises the following steps: and the user directly selects to enter a certain 3D exhibition hall through a search function.
In addition, when the user selects to enter the catalog map, it is determined that the catalog map needs to be displayed on the presentation web page. Specifically, the user may select an entry to the catalog map on the displayed 3D exhibition hall interface, or select to enter the catalog map through a search function.
Step 210: and judging whether the sub-targets to be displayed currently are stored in a browser cache or not for each sub-target to be displayed, if so, loading the sub-targets to be displayed currently to the display webpage from the browser cache, otherwise, downloading the sub-targets to be displayed currently from a server, loading the sub-targets to be displayed currently to the display webpage, and storing the sub-targets to be displayed currently to the browser cache.
Specifically, if the sub-targets to be displayed currently are stored in the browser cache, the sub-targets to be displayed currently are directly loaded from the browser cache, so that the loading time is greatly reduced.
In one embodiment of the invention, when setting the 3D target, the number of the three-dimensional models of the exhibition stands in each 3D exhibition hall is generally not more than 20, and the number of the three-dimensional models of the exhibit in each exhibition stand is generally not more than 10. Based on the quantity requirement of the exhibition three-dimensional models and/or the quantity requirement of the exhibit three-dimensional models, the data volume required to be loaded by each 3D exhibition hall can be reduced, the problems of blocking and the like caused by overlarge data volume required to be loaded by the 3D exhibition hall are avoided, the loading speed can be increased through the embodiment of the invention, and the user experience is improved.
Each exhibition position generally represents one exhibition enterprise, and exhibits corresponding enterprise exhibits on each exhibition position.
In an embodiment of the present invention, the display of the 3D object may be implemented by a Unity Web Player plug-in, or may be implemented by a Web GL (Web Graphics Library, 3D drawing standard) without a plug-in.
The user may roam within the 3D gym.
In an embodiment of the invention, the 3D objects can be processed by the distributed servers, and the distributed servers respectively store the 3D objects, so that the user can obtain similar loading speeds across the country.
In addition, when the sub-targets are downloaded from the server, the network downloading amount of the user can be judged according to the network condition of the user, and the downloading capability of the network of the user is utilized to the maximum extent to carry out downloading, so that the loading speed is improved.
The embodiment of the invention can realize the online and offline synchronous browsing of the 3D target; the user can directly input the website for access, can also download the website to the local, and can access off line at any time, thereby greatly expanding the application range of the 3D target.
In the embodiment of the invention, the function of online interactive viewing of a large number of 3D targets can be realized by distributed loading.
In the embodiment of the invention, by distributing and loading the functions of the online 3D exhibition halls, a plurality of 3D exhibition halls can be simultaneously accessed in a complete UnityWeb Player program, and the phenomenon that the loading time is too long due to the increase of the number of large exhibition halls and the increase of the display content is avoided.
As shown in fig. 3 and 4, an embodiment of the present invention provides a device for loading a 3D object of a web page. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. From a hardware level, as shown in fig. 3, a hardware structure diagram of a device where a webpage 3D target loading apparatus according to an embodiment of the present invention is located is provided, where the device in the embodiment may generally include other hardware, such as a forwarding chip responsible for processing a packet, in addition to the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 3. Taking a software implementation as an example, as shown in fig. 4, as a logical apparatus, the apparatus is formed by reading a corresponding computer program instruction in a non-volatile memory into a memory by a CPU of a device in which the apparatus is located and running the computer program instruction. The loading device for the 3D object of the webpage provided by the embodiment includes:
a target setting unit 401 for setting the 3D target as at least two sub-targets;
the sub-target cache unit 402 is configured to determine at least one sub-target that needs to be downloaded in the background in real time, download the at least one sub-target that needs to be downloaded in the background from the server that stores the 3D target, and store the sub-target in the browser cache;
a determining unit 403, configured to determine at least one sub-target to be displayed, where the sub-target needs to be displayed on a display webpage;
a display unit 404, configured to determine, for each sub-object to be displayed, whether the current sub-object to be displayed is stored in the browser cache, if so, load the current sub-object to be displayed onto the display webpage from the browser cache, otherwise, download the current sub-object to be displayed from the server, and load the current sub-object to be displayed onto the display webpage.
An external browser cache 405 is shown in fig. 4.
In the embodiment of the invention, the 3D object is set as at least two sub-objects, when the foreground provides corresponding service for the user, the sub-objects needing to be downloaded in the background can be downloaded in the background, when the user needs to display the sub-objects stored in the browser cache, the sub-objects can be directly loaded from the browser cache, because the downloading process is completed in the background, the loading time is reduced, when the sub-objects needing to be displayed on the display webpage are not stored in the browser cache, only the sub-objects needing to be displayed are downloaded from the server, the whole 3D object does not need to be downloaded, the data downloading amount is greatly reduced, the downloading time is reduced, and the loading time is further reduced.
In an embodiment of the present invention, the at least two sub-targets include: a three-dimensional scene of at least one 3D exhibition hall and at least one internal three-dimensional model inside the at least one 3D exhibition hall;
the sub-target cache unit is used for executing:
a1: judging whether a three-dimensional scene which is not stored in the browser cache exists in the three-dimensional scenes of the at least one 3D exhibition hall, if so, executing A2, otherwise, executing A3;
a2: determining at least one three-dimensional scene needing background downloading from the three-dimensional scenes which are not stored in the browser cache, downloading the at least one three-dimensional scene needing background downloading from the server in a background manner, storing the at least one three-dimensional scene needing background downloading into the browser cache, and returning to A1;
a3: judging whether an internal three-dimensional model which is not saved in the browser cache exists in at least one internal three-dimensional model in the at least one 3D exhibition hall, if so, executing A4;
a4: and determining at least one internal three-dimensional model needing background downloading from the internal three-dimensional models which are not stored in the browser cache, downloading the at least one internal three-dimensional model needing background downloading from the server in a background manner, storing the internal three-dimensional model needing background downloading into the browser cache, and returning to A3.
In an embodiment of the present invention, the at least two sub-targets further include: the catalog map of the at least one 3D exhibition hall comprises an entrance of the at least one 3D exhibition hall, so that a user can select the entrance of a target 3D exhibition hall needing to be viewed from the catalog map;
the sub-target cache unit is used for executing:
before A1, judging whether the catalog map is stored in the browser cache, if so, executing A1, otherwise, determining that the catalog map needs to be downloaded in a background, downloading the catalog map from the server in the background, storing the downloaded catalog map in the browser cache, and executing A1;
the determining unit is configured to determine that a three-dimensional scene of the target 3D exhibition hall and at least one internal three-dimensional model of the target 3D exhibition hall need to be displayed on the display webpage when the user selects an entrance of the target 3D exhibition hall that needs to be viewed on the catalog map.
In an embodiment of the invention, the at least one internal three-dimensional model comprises: a low-quality three-dimensional model of the exhibit;
the 3D object comprises: each high-quality exhibit three-dimensional model corresponds to the low-quality exhibit three-dimensional model;
the data volume of the low-quality three-dimensional model of the exhibit is smaller than that of the corresponding high-quality three-dimensional model of the exhibit;
further comprising:
the exhibition loading unit is used for judging whether the high-quality three-dimensional model to be displayed currently is stored in the browser cache or not aiming at each high-quality exhibition three-dimensional model to be displayed when at least one high-quality exhibition three-dimensional model to be displayed needs to be displayed on the display webpage, if so, loading the high-quality exhibition three-dimensional model to be displayed currently onto the display webpage from the browser cache, otherwise, downloading the high-quality exhibition three-dimensional model to be displayed currently from the server, storing the high-quality exhibition three-dimensional model to be displayed currently into the browser cache, and loading the high-quality exhibition three-dimensional model to be displayed currently onto the display webpage.
In an embodiment of the present invention, the presentation unit is configured to, when the current sub-target to be displayed is not stored in the browser cache, store the current sub-target to be displayed in the browser cache after downloading the current sub-target to be displayed from the server.
In an embodiment of the present invention, the display unit is configured to determine a target number according to a preset proportion and a total number of running threads when it is determined that the current sub-target to be displayed is not stored in the browser cache, and download the current sub-target to be displayed from the server by using the target number of threads.
In an embodiment of the present invention, the 3D object includes: at least one plane information;
further comprising:
the plane information display unit is used for judging whether the current plane information to be displayed is stored in the browser cache or not according to each plane information to be displayed when at least one plane information to be displayed needs to be displayed on the display webpage, if so, loading the current plane information to be displayed onto the display webpage from the browser cache, and otherwise, downloading the current plane information to be displayed from the server, storing the current plane information to be displayed into the browser cache, and loading the current plane information to be displayed onto the display webpage.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
The embodiment of the invention provides a readable medium, which comprises an execution instruction, and when a processor of a storage controller executes the execution instruction, the storage controller executes any webpage 3D object loading method provided by the embodiment of the invention.
An embodiment of the present invention provides a storage controller, including: a processor, a memory, and a bus;
the memory is used for storing an execution instruction, the processor is connected with the memory through the bus, and when the storage controller runs, the processor executes the execution instruction stored in the memory, so that the storage controller executes any webpage 3D object loading method provided by the embodiment of the invention.
The embodiments of the invention have at least the following beneficial effects:
1. in the embodiment of the invention, the 3D object is set as at least two sub-objects, when the foreground provides corresponding service for the user, the sub-objects needing to be downloaded in the background can be downloaded in the background, when the user needs to display the sub-objects stored in the browser cache, the sub-objects can be directly loaded from the browser cache, because the downloading process is completed in the background, the loading time is reduced, when the sub-objects needing to be displayed on the display webpage are not stored in the browser cache, only the sub-objects needing to be displayed are downloaded from the server, the whole 3D object does not need to be downloaded, the data downloading amount is greatly reduced, the downloading time is reduced, and the loading time is further reduced.
2. In the embodiment of the invention, the background downloading of the three-dimensional scene and the internal three-dimensional model can be carried out in the process of checking the directory map by the user, when the user enters a certain 3D venue through the directory map, the three-dimensional scene and the internal three-dimensional model of the 3D venue can be stored in the browser cache, the user can directly check the three-dimensional scene and the internal three-dimensional model of the 3D venue without waiting, the loading speed is greatly improved, and the user experience is improved.
3. In the embodiment of the invention, the three-dimensional model of the exhibit displayed in the 3D exhibition hall is the three-dimensional model of the exhibit with low quality, and the loading speed of the 3D exhibition hall can be greatly improved because the data volume of the three-dimensional model of the exhibit with low quality is small.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (8)

1. A method for loading a 3D object of a webpage is characterized in that,
setting a 3D target as at least two sub-targets in advance;
the method comprises the following steps:
determining at least one sub-target needing background downloading in real time, downloading the at least one sub-target needing background downloading from a server storing the 3D target in a background manner, and storing the sub-target into a browser cache;
determining at least one sub-target to be displayed which needs to be displayed on the display webpage;
for each sub-target to be displayed, judging whether the current sub-target to be displayed is stored in the browser cache, if so, loading the current sub-target to be displayed to the display webpage from the browser cache, otherwise, downloading the current sub-target to be displayed from the server, and loading the current sub-target to be displayed to the display webpage;
the at least two sub-goals include: a three-dimensional scene of at least one 3D exhibition hall and at least one internal three-dimensional model inside the at least one 3D exhibition hall;
the real-time determination of at least one sub-target needing background downloading, the background downloading of the at least one sub-target needing background downloading from a server storing the 3D target, and the storing of the at least one sub-target needing background downloading into a browser cache, includes:
a1: judging whether a three-dimensional scene which is not stored in the browser cache exists in the three-dimensional scenes of the at least one 3D exhibition hall, if so, executing A2, otherwise, executing A3;
a2: determining at least one three-dimensional scene needing background downloading from the three-dimensional scenes which are not stored in the browser cache, downloading the at least one three-dimensional scene needing background downloading from the server in a background manner, storing the at least one three-dimensional scene needing background downloading into the browser cache, and returning to A1;
a3: judging whether an internal three-dimensional model which is not saved in the browser cache exists in at least one internal three-dimensional model in the at least one 3D exhibition hall, if so, executing A4;
a4: and determining at least one internal three-dimensional model needing background downloading from the internal three-dimensional models which are not stored in the browser cache, downloading the at least one internal three-dimensional model needing background downloading from the server in a background manner, storing the internal three-dimensional model needing background downloading into the browser cache, and returning to A3.
2. The method of claim 1,
the at least two sub-targets further include: the catalog map of the at least one 3D exhibition hall comprises an entrance of the at least one 3D exhibition hall, so that a user can select the entrance of a target 3D exhibition hall needing to be viewed from the catalog map;
the real-time determination of at least one sub-target needing background downloading, the background downloading of the at least one sub-target needing background downloading from a server storing the 3D target, and the storing of the at least one sub-target needing background downloading into a browser cache, includes:
before a1, further comprising:
judging whether the directory map is stored in the browser cache, if so, executing A1, otherwise, determining that the directory map needs to be downloaded in a background, downloading the directory map from the server in the background, storing the downloaded directory map in the browser cache, and executing A1;
the determining at least one sub-target to be displayed, which needs to be displayed on the display webpage, includes:
when the user selects an entrance of the target 3D exhibition hall needing to be viewed on the catalog map, determining that a three-dimensional scene of the target 3D exhibition hall and at least one internal three-dimensional model in the target 3D exhibition hall need to be displayed on the display webpage.
3. The method of claim 1,
the at least one internal three-dimensional model comprising: a low-quality three-dimensional model of the exhibit;
the 3D object comprises: each high-quality exhibit three-dimensional model corresponds to the low-quality exhibit three-dimensional model;
the data volume of the low-quality three-dimensional model of the exhibit is smaller than that of the corresponding high-quality three-dimensional model of the exhibit;
further comprising:
when at least one high-quality exhibit three-dimensional model to be displayed needs to be displayed on the display webpage,
and judging whether the high-quality exhibit three-dimensional model to be displayed currently is stored in the browser cache or not aiming at each high-quality exhibit three-dimensional model to be displayed currently, if so, loading the high-quality exhibit three-dimensional model to be displayed currently onto the display webpage from the browser cache, otherwise, downloading the high-quality exhibit three-dimensional model to be displayed currently from the server, storing the high-quality exhibit three-dimensional model to be displayed currently into the browser cache, and loading the high-quality exhibit three-dimensional model to be displayed currently onto the display webpage.
4. The method according to any one of claims 1 to 3,
when the currently to-be-displayed sub-object is not saved in the browser cache,
after the downloading the currently to-be-displayed sub-target from the server, further comprising:
storing the sub-targets to be displayed currently into the browser cache;
and/or the presence of a gas in the gas,
when the current sub-target to be displayed is judged not to be stored in the browser cache,
before the downloading the current sub-target to be displayed from the server, further comprising:
determining the target number according to the preset proportion and the total number of the running threads;
the downloading the current sub-target to be displayed from the server includes:
downloading the current sub-targets to be displayed from the server by utilizing the target number of threads;
and/or the presence of a gas in the gas,
the 3D object comprises: at least one plane information;
further comprising:
when at least one piece of plane information to be displayed needs to be displayed on the display webpage,
and judging whether the current plane information to be displayed is stored in the browser cache or not for each piece of the plane information to be displayed, if so, loading the current plane information to be displayed to the display webpage from the browser cache, otherwise, downloading the current plane information to be displayed from the server, storing the current plane information to be displayed to the browser cache, and loading the current plane information to be displayed to the display webpage.
5. A device for loading a 3D object on a web page, comprising:
the target setting unit is used for setting the 3D target into at least two sub-targets;
the sub-target cache unit is used for determining at least one sub-target needing background downloading in real time, downloading the at least one sub-target needing background downloading from a server storing the 3D target to a background, and storing the sub-target into a browser cache;
the display device comprises a determining unit, a display unit and a display unit, wherein the determining unit is used for determining at least one sub-target to be displayed which needs to be displayed on a display webpage;
the display unit is used for judging whether the sub-targets to be displayed currently are stored in the browser cache or not for each sub-target to be displayed, if so, loading the sub-targets to be displayed currently to the display webpage from the browser cache, otherwise, downloading the sub-targets to be displayed currently from the server, and loading the sub-targets to be displayed currently to the display webpage;
the at least two sub-goals include: a three-dimensional scene of at least one 3D exhibition hall and at least one internal three-dimensional model inside the at least one 3D exhibition hall;
the sub-target cache unit is used for executing:
a1: judging whether a three-dimensional scene which is not stored in the browser cache exists in the three-dimensional scenes of the at least one 3D exhibition hall, if so, executing A2, otherwise, executing A3;
a2: determining at least one three-dimensional scene needing background downloading from the three-dimensional scenes which are not stored in the browser cache, downloading the at least one three-dimensional scene needing background downloading from the server in a background manner, storing the at least one three-dimensional scene needing background downloading into the browser cache, and returning to A1;
a3: judging whether an internal three-dimensional model which is not saved in the browser cache exists in at least one internal three-dimensional model in the at least one 3D exhibition hall, if so, executing A4;
a4: and determining at least one internal three-dimensional model needing background downloading from the internal three-dimensional models which are not stored in the browser cache, downloading the at least one internal three-dimensional model needing background downloading from the server in a background manner, storing the internal three-dimensional model needing background downloading into the browser cache, and returning to A3.
6. The apparatus of claim 5,
the at least two sub-targets further include: the catalog map of the at least one 3D exhibition hall comprises an entrance of the at least one 3D exhibition hall, so that a user can select the entrance of a target 3D exhibition hall needing to be viewed from the catalog map;
the sub-target cache unit is used for executing:
before A1, judging whether the catalog map is stored in the browser cache, if so, executing A1, otherwise, determining that the catalog map needs to be downloaded in a background, downloading the catalog map from the server in the background, storing the downloaded catalog map in the browser cache, and executing A1;
the determining unit is configured to determine that a three-dimensional scene of the target 3D exhibition hall and at least one internal three-dimensional model of the target 3D exhibition hall need to be displayed on the display webpage when the user selects an entrance of the target 3D exhibition hall that needs to be viewed on the catalog map.
7. The apparatus of claim 5,
the at least one internal three-dimensional model comprising: a low-quality three-dimensional model of the exhibit;
the 3D object comprises: each high-quality exhibit three-dimensional model corresponds to the low-quality exhibit three-dimensional model;
the data volume of the low-quality three-dimensional model of the exhibit is smaller than that of the corresponding high-quality three-dimensional model of the exhibit;
further comprising:
the exhibition loading unit is used for judging whether the high-quality three-dimensional model to be displayed currently is stored in the browser cache or not aiming at each high-quality exhibition three-dimensional model to be displayed when at least one high-quality exhibition three-dimensional model to be displayed needs to be displayed on the display webpage, if so, loading the high-quality exhibition three-dimensional model to be displayed currently onto the display webpage from the browser cache, otherwise, downloading the high-quality exhibition three-dimensional model to be displayed currently from the server, storing the high-quality exhibition three-dimensional model to be displayed currently into the browser cache, and loading the high-quality exhibition three-dimensional model to be displayed currently onto the display webpage.
8. The apparatus according to any one of claims 5 to 7,
the display unit is used for storing the sub-targets to be displayed into the browser cache after the current sub-targets to be displayed are downloaded from the server when the current sub-targets to be displayed are not stored in the browser cache;
and/or the presence of a gas in the gas,
the display unit is used for determining the target number according to a preset proportion and the total number of running threads when judging that the current sub-target to be displayed is not stored in the browser cache, and downloading the current sub-target to be displayed from the server by utilizing the target number of threads;
and/or the presence of a gas in the gas,
the 3D object comprises: at least one plane information;
further comprising:
the plane information display unit is used for judging whether the current plane information to be displayed is stored in the browser cache or not according to each plane information to be displayed when at least one plane information to be displayed needs to be displayed on the display webpage, if so, loading the current plane information to be displayed onto the display webpage from the browser cache, and otherwise, downloading the current plane information to be displayed from the server, storing the current plane information to be displayed into the browser cache, and loading the current plane information to be displayed onto the display webpage.
CN201710786341.XA 2017-09-04 2017-09-04 Webpage 3D target loading method and device Active CN107577766B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710786341.XA CN107577766B (en) 2017-09-04 2017-09-04 Webpage 3D target loading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710786341.XA CN107577766B (en) 2017-09-04 2017-09-04 Webpage 3D target loading method and device

Publications (2)

Publication Number Publication Date
CN107577766A CN107577766A (en) 2018-01-12
CN107577766B true CN107577766B (en) 2020-09-15

Family

ID=61031144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710786341.XA Active CN107577766B (en) 2017-09-04 2017-09-04 Webpage 3D target loading method and device

Country Status (1)

Country Link
CN (1) CN107577766B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710219B (en) * 2018-12-10 2022-04-05 武汉烽火众智智慧之星科技有限公司 Processing method for rapidly loading data with different orders of magnitude based on Openlayers
CN110445881B (en) * 2019-09-19 2022-03-11 聚好看科技股份有限公司 Data transmission method, device and system
CN111723271A (en) * 2020-07-15 2020-09-29 山东省计量科学研究院 Measurement and weighing and measurement science popularization knowledge electronic museum holographic navigation display system and method
CN112395034A (en) * 2020-11-23 2021-02-23 北京奇艺世纪科技有限公司 Page display method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010255767A (en) * 2009-04-27 2010-11-11 Ihi Corp Three-dimensional base isolation device
CN103077074A (en) * 2012-12-26 2013-05-01 深圳先进技术研究院 Three-dimensional space data parallel scheduling method and system
CN104102545A (en) * 2014-07-04 2014-10-15 北京理工大学 Three-dimensional resource allocation and loading optimization method for mobile augmented reality browser
CN106611056A (en) * 2016-12-27 2017-05-03 广州都市圈网络科技有限公司 Method and device for slicing three-dimensional simulation map

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8644575B2 (en) * 2011-02-28 2014-02-04 Kabushiki Kaisha Toshiba Processing of abdominal images
CN103021023A (en) * 2012-12-05 2013-04-03 上海创图网络科技发展有限公司 Three-dimensional scene construction method based on browser
CN103345507B (en) * 2013-07-04 2016-10-12 江西交通咨询公司 A kind of method based on collision box principle dynamic load three-dimensional map
CN103500115A (en) * 2013-10-17 2014-01-08 广东威创视讯科技股份有限公司 Three-dimensional GIS data rapid loading method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010255767A (en) * 2009-04-27 2010-11-11 Ihi Corp Three-dimensional base isolation device
CN103077074A (en) * 2012-12-26 2013-05-01 深圳先进技术研究院 Three-dimensional space data parallel scheduling method and system
CN104102545A (en) * 2014-07-04 2014-10-15 北京理工大学 Three-dimensional resource allocation and loading optimization method for mobile augmented reality browser
CN106611056A (en) * 2016-12-27 2017-05-03 广州都市圈网络科技有限公司 Method and device for slicing three-dimensional simulation map

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《数字地球中海量三维模型实时可视化的新方法》;江玮 等;《计算机应用》;20130630(第S1期);112-125 *

Also Published As

Publication number Publication date
CN107577766A (en) 2018-01-12

Similar Documents

Publication Publication Date Title
CN107577766B (en) Webpage 3D target loading method and device
US10542106B2 (en) Content pre-render and pre-fetch techniques
US9773069B2 (en) Pre-fetching of network page content in a browser application
AU2011101579A4 (en) Selective rendering of off-screen content
CN103974138B (en) For preloading the method and apparatus of video in content distributing network
US20170330598A1 (en) Method and system for creating and using video tag
WO2017085717A1 (en) System and method for presentation of content linked comments
CN106791953B (en) Multi-player control method, server and client
US10212108B2 (en) Method and system for expanding function of message in communication session
CN109858962B (en) Advertisement display method based on electronic book and electronic equipment
CN104484235B (en) A kind of Memory Optimize Method and device based on waterfall Flow Technique
US9665965B2 (en) Video-associated objects
US9917917B2 (en) Prefetching of video resources for a network page
CN110337011A (en) Method for processing video frequency, device and equipment
US20130184075A1 (en) Contents providing system and operating method thereof
US10623517B2 (en) Content prefetching and cache management
CN104321762A (en) Page phase time
JP2016528585A (en) Method and system for automatically resizing a window in response to a user action
CN112988400A (en) Video memory optimization method and device, electronic equipment and readable storage medium
US9734218B2 (en) Spiral listing of items
US8140404B1 (en) Browsing with static pages
CN110087120B (en) Same-window switching method of online list and local list and computing equipment
CN109948084A (en) Methods of exhibiting, device, medium and the calculating equipment of webpage information
CN110798748A (en) Audio and video preloading method and device and electronic equipment
US9330079B1 (en) Systems and methods for blocking data management for distributed content delivery for interactive documents

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
GR01 Patent grant
GR01 Patent grant