Search

CN-116796090-B - Model tile loading method, device and storage medium

CN116796090BCN 116796090 BCN116796090 BCN 116796090BCN-116796090-B

Abstract

The embodiment of the disclosure discloses a model tile loading method, a model tile loading device and a storage medium, wherein the method comprises the steps of determining a browsing state of a user according to first information and second information, discarding execution of dequeuing operation of tile identification information in a network resource loading queue in response to the browsing state being a quick browsing state, executing dequeuing operation of the tile identification information in the network resource loading queue in response to the browsing state being a common browsing state, loading tiles identified by the dequeued tile identification information in response to the tiles identified by the dequeued tile identification information being visible tiles in a current frame, discarding the tiles identified by the dequeued tile identification information in response to the tiles identified by the dequeued tile identification information being not visible tiles in the current frame. According to the method and the device for the virtual machine navigation, invalid downloading of network resources can be avoided, CPU consumption caused by analyzing the downloaded resources can be avoided, and the frame rate of a tour VR space is indirectly improved.

Inventors

  • LI PEILUN

Assignees

  • 如你所视(北京)科技有限公司

Dates

Publication Date
20260505
Application Date
20230619

Claims (8)

  1. 1. A model tile loading method, applied to a scene of a user browsing a three-dimensional model space in a browser client, comprising: determining a browsing state of the user according to first information and second information, wherein the first information is a camera view angle or a camera position coordinate when a visible tile of a current frame is determined, and the second information is a camera view angle or a camera position coordinate when a visible tile of a previous frame is determined; Responding to the browsing state as a quick browsing state, and abandoning execution of dequeuing operation of tile identification information in a network resource loading queue, wherein the quick browsing state is a browsing state in which network resources do not need to be loaded, and the network resource loading queue records the tile identification information of the determined visible tiles; Responding to the browsing state being a common browsing state, executing dequeuing operation of tile identification information in the network resource loading queue, wherein the common browsing state is a browsing state needing to load network resources; responsive to the dequeued tile identifying information identifying a tile that is also a visible tile in the current frame, loading the tile identified by the tile identifying information; responsive to the dequeued tile identifying information identifying a tile that is not a visible tile in the current frame, relinquishing loading the tile identified by the tile identifying information; The determining the browsing state of the user according to the first information and the second information includes: Calculating a position offset of the first information and the second information, determining the browsing state as a quick browsing state in response to the position offset being greater than a set offset, determining the browsing state as a normal browsing state in response to the position offset being not greater than the set offset, or The method includes the steps of receiving first information, receiving second information, calculating a field angle difference between the first information and the second information, determining the browsing state as a quick browsing state in response to the field angle difference being greater than a set field angle, and determining the browsing state as a normal browsing state in response to the field angle difference being not greater than the set field angle.
  2. 2. The method of claim 1, wherein the performing dequeuing of tile identification information in the network resource load queue comprises: and according to the first-in first-out principle, performing a dequeue operation on tile identification information of visible tiles of other frames except the current frame in the network resource loading queue one by one.
  3. 3. The method of claim 2, wherein prior to determining the browsing status of the user based on the first information and the second information, the method further comprises: determining a visible tile of the current frame; Tile identification information of the visible tiles of the current frame is inserted into the network resource load queue.
  4. 4. The method of claim 3, wherein the determining visible tiles for the current frame comprises: acquiring relevant parameters of a current camera corresponding to the current frame, wherein the relevant parameters of the current camera comprise a camera view angle of the current camera and a distance between the camera and a model tile; Calculating a camera view cone of the current camera according to the related parameters of the current camera; and calculating a model tile in the camera view cone range of the current camera by adopting a multi-detail level tree visibility judging algorithm to obtain a visible tile of the current frame.
  5. 5. The method of claim 3, wherein inserting tile identification information for visible tiles of the current frame into the network resource load queue comprises: Traversing the visible multi-detail level tree of the current frame based on a depth-first traversing algorithm to obtain the enqueuing sequence of the visible tiles of the current frame; And sequentially inserting tile identification information of the visible tiles of the current frame into the network resource loading queue according to the enqueuing sequence.
  6. 6. A model tile loading apparatus for use with a user browsing a scene of a three-dimensional model space in a browser client, the apparatus comprising: The first determining module is used for determining the browsing state of the user according to first information and second information, wherein the first information is a camera view angle or a camera position coordinate when the visible tile of the current frame is determined, and the second information is a camera view angle or a camera position coordinate when the visible tile of the previous frame is determined; The first processing module is used for responding to the browsing state as a quick browsing state, and abandoning execution of dequeuing operation of the tile identification information in the network resource loading queue, wherein the quick browsing state is a browsing state in which network resources do not need to be loaded, and the determined tile identification information of the visible tiles is recorded in the network resource loading queue; the second processing module is used for responding to the browsing state to be a common browsing state, and executing dequeuing operation of the tile identification information in the network resource loading queue, wherein the common browsing state is a browsing state in which network resources need to be loaded; a resource loading module, configured to load a tile identified by the tile identification information in response to the tile identified by the dequeued tile identification information being also a visible tile in the current frame; A discard loading module, configured to discard loading the tile identified by the tile identification information in response to the tile identified by the dequeued tile identification information not being a visible tile in the current frame; the first determination module comprises a first calculation sub-module for calculating the position offset of the first information and the second information, a first judgment sub-module for determining the browsing state as a quick browsing state in response to the position offset being larger than a set offset, a second judgment sub-module for determining the browsing state as a normal browsing state in response to the position offset being not larger than the set offset, or The first determining module comprises a second calculating sub-module, a third judging sub-module and a fourth judging sub-module, wherein the second calculating sub-module is used for calculating the angle difference between the first information and the second information, the third judging sub-module is used for responding to the angle difference being larger than a set angle of view and determining the browsing state as a quick browsing state, and the fourth judging sub-module is used for responding to the angle difference being not larger than the set angle of view and determining the browsing state as a common browsing state.
  7. 7. An electronic device for use with a user browsing a scene of a three-dimensional model space in a browser client, comprising: A memory for storing a computer product; A processor for executing a computer product stored in said memory, which, when executed, implements the method of any of the preceding claims 1-5.
  8. 8. A computer readable storage medium having stored thereon computer instructions for application to a user browsing a scene of a three-dimensional model space in a browser client, which computer instructions, when executed by a processor, implement the method of any of the preceding claims 1-5.

Description

Model tile loading method, device and storage medium Technical Field The disclosure relates to the technical field of three-dimensional texture and image processing, in particular to a model tile loading method, a model tile loading device and a storage medium. Background Currently, a global wide area network graphics function library (Web Graphics Library, simply referred to as WebGL) provides technical support for displaying and developing scene models (indoor space models, etc.) in a browser. In the related art, the scene model can be cut into an octree or a quadtree, so that when the scene model is large in scale, whether the three-dimensional tile is loaded or not is selected by judging the distance between the camera and the model tile, and further the problems of slow loading, loading katon and the like caused by loading the whole scene model are avoided. But when the user moves in the scene quickly, the user can see a tile in the previous frame, and the tile is no longer visible in the current frame, so that when the user stops carefully observing the current frame, the tile seen in the previous frame is loaded but does not need to be displayed, and therefore, the invalid loading of tile resources is caused, and resources are wasted. Disclosure of Invention The technical problem to be solved by the embodiment of the disclosure is to provide a model tile loading method, a model tile loading device and a storage medium. According to an aspect of the disclosed embodiments, there is provided a model tile loading method applied to a scene where a user browses a three-dimensional model space in a browser client, the method including: Determining a browsing state of the user according to first information and second information, wherein the first information is information when determining a visible tile of a current frame, and the second information is information when determining a visible tile of a previous frame; Responding to the browsing state as a quick browsing state, and abandoning execution of dequeuing operation of tile identification information in a network resource loading queue, wherein the quick browsing state is a browsing state in which network resources do not need to be loaded, and the network resource loading queue records the tile identification information of the determined visible tiles; Responding to the browsing state being a common browsing state, executing dequeuing operation of tile identification information in the network resource loading queue, wherein the common browsing state is a browsing state needing to load network resources; responsive to the dequeued tile identifying information identifying a tile that is also a visible tile in the current frame, loading the tile identified by the tile identifying information; Responsive to the dequeued tile identifying information identifying a tile that is not a visible tile in the current frame, the loading of the tile identified by the tile identifying information is aborted. In one embodiment of the disclosure, the performing the dequeuing operation of tile identification information in the network resource load queue includes: and according to the first-in first-out principle, performing a dequeue operation on tile identification information of visible tiles of other frames except the current frame in the network resource loading queue one by one. In one embodiment of the disclosure, before the determining the browsing status of the user according to the first information and the second information, the method further includes: determining a visible tile of the current frame; Tile identification information of the visible tiles of the current frame is inserted into the network resource load queue. In yet another embodiment of the present disclosure, the determining the visible tile of the current frame includes: acquiring relevant parameters of a current camera corresponding to the current frame, wherein the relevant parameters of the current camera comprise a camera view angle of the current camera and a distance between the camera and a model tile; Calculating a camera view cone of the current camera according to the related parameters of the current camera; and calculating a model tile in the camera view cone range of the current camera by adopting a multi-detail level tree visibility judging algorithm to obtain a visible tile of the current frame. In yet another embodiment of the present disclosure, the inserting tile identification information of the visible tiles of the current frame into the network resource load queue includes: Traversing the visible multi-detail level tree of the current frame based on a depth-first traversing algorithm to obtain the enqueuing sequence of the visible tiles of the current frame; And sequentially inserting tile identification information of the visible tiles of the current frame into the network resource loading queue according to the enqueuing sequence. In yet another embodiment of the