Tile data cache optimization method, system, device, medium and program product
By generating an octree-structured tile node queue, the cache loading of the digital twin platform model is optimized, solving the problem of slow model loading speed and improving user experience and model display speed.
Patent Information
- Application Number
- CN202610376458.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-26
AI Technical Summary
Existing digital twin platforms have slow model loading speeds, resulting in poor user experience. Existing caching methods cannot effectively improve model loading efficiency.
A tile data caching optimization method is adopted, which generates an octree-structured tile node queue, asynchronously requests tile data from the backend level by level, and optimizes the model loading process by utilizing the browser's database cache records.
It significantly improves the loading efficiency and user experience of digital twin platform models, especially the first screen display speed, reduces network transmission time, and improves the speed and quality of model display.
Smart Images

Figure CN122285791A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cache optimization technology, and in particular to a method, system, device, medium and program product for optimizing tile data cache. Background Technology
[0002] In existing digital twin platforms, model loading efficiency remains a persistent and difficult-to-overcome challenge. Model loading speed directly impacts user experience, and smooth and rapid model loading and operation are undoubtedly the most direct manifestation of a superior user experience.
[0003] In-depth analysis revealed that the main factors affecting the loading speed of digital twin platform models include: the complexity of the model itself and the level of detail in its textures and materials; the stability and speed of the external network environment; the quality of the client hardware configuration; and the browser version used by the user. These factors collectively influence the loading speed of the digital twin platform model, thereby affecting the overall user experience.
[0004] Currently, there are several methods for loading digital twin platform models: 1. Loading the entire digital twin platform model into the browser at once. Due to the large size of the model file, it is usually loaded into memory in one go, placing excessive demands on hardware and network. 2. Splitting the digital twin platform model file into multiple files and loading the appropriate files as needed. This type of engine can only cache a portion of the files, improving the user experience and effect, but it cannot fully meet customer requirements. 3. Caching the model file, but only setting the cache time in the HTTP header. When encountering large components or a large number of small components, a large number of HTTP requests are required, consuming a lot of time and sometimes blocking threads, resulting in an unsatisfactory user experience and display effect.
[0005] Therefore, there is an urgent need to invent a new method for optimizing the cache loading of digital twin platforms to solve the problems of low model loading efficiency and poor user experience in existing digital twin platform cache loading methods. Summary of the Invention
[0006] In view of this, embodiments of the present invention provide a tile data caching optimization method, system, device, medium, and program product, which at least partially solves the problems existing in the prior art.
[0007] Other features and advantages of the invention will become apparent from the following detailed description, or may be learned in part by practice of the invention.
[0008] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0009] According to a first aspect of the present invention, a tile data caching optimization method is provided, the method comprising:
[0010] Based on the unique identifier of the model to be loaded, retrieve the cache record of the model to be loaded from the browser database;
[0011] Based on the cache records and the preset maximum cache level, an octree-structured tile node queue is generated, and each level of the tile node queue corresponds to the tile data of each level of the model to be loaded.
[0012] Based on the tile node queue, the corresponding tile data of the node is asynchronously requested from the backend level by level.
[0013] Furthermore, the cache record includes the highest cached tile level of the tile data of the model to be loaded that has been cached in the browser database.
[0014] Further, based on the cache records and the preset maximum cache level, an octree-structured tile node queue is generated. Each level of the tile node queue corresponds to a level of tile data in the model to be loaded, including:
[0015] Determine whether the highest cache tile level is greater than or equal to the preset maximum cache level;
[0016] If the highest cached tile level is greater than or equal to the preset maximum cache level, then the model to be loaded has been cached and the cached tile data in the browser database is used directly for rendering.
[0017] If the highest cache tile level is less than the preset maximum cache level, then a tile node queue is generated based on an octree structure according to the preset maximum tile cache level. Each level of the tile node queue corresponds to the tile data of each level of the model to be loaded.
[0018] Furthermore, based on the preset maximum tile cache level, a tile node queue is generated using an octree structure, including:
[0019] Create the root node of the tile node queue, the root node corresponds to the first layer of tile data of the model to be loaded, and the node level of the root node is zero;
[0020] Using the root node as the parent node, the corresponding child nodes are generated using an octree data structure.
[0021] For each child node, the child node is used as the parent node, and corresponding child nodes are generated recursively until the node level of the child node is equal to the preset maximum tile cache level.
[0022] Furthermore, based on the tile node queue, the tile data corresponding to the node is asynchronously requested from the backend level by level, including:
[0023] Starting from the root node level of the tile node queue, the corresponding tile data of each node in the node level is asynchronously requested from the backend.
[0024] Write the tile data returned by the backend into the browser's database.
[0025] Furthermore, the method also includes:
[0026] Once all nodes in the node hierarchy have completed their tile data requests, update the cached record in the browser database corresponding to the model to be loaded.
[0027] According to a second aspect of the present invention, a tile data caching optimization system is provided, the system comprising:
[0028] The cache record acquisition module is used to retrieve the cache record of the model to be loaded from the browser database based on the unique identifier of the model to be loaded;
[0029] The node queue generation module is used to generate an octree-structured tile node queue based on the cache records and the preset maximum cache level. Each level of the tile node queue corresponds to the tile data of each level of the model to be loaded.
[0030] The tile asynchronous request module is used to asynchronously request tile data corresponding to the backend nodes layer by layer based on the tile node queue.
[0031] According to a third aspect of the present invention, a tile data caching optimization device is provided, the device comprising: a processor and a memory;
[0032] The memory is used to store one or more program instructions;
[0033] The processor is configured to run one or more program instructions to perform the steps of a tile data caching optimization method as described in any of the preceding claims.
[0034] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored on the computer program, and the computer program, when executed by a processor, implements the steps of a tile data caching optimization method as described in any of the preceding claims.
[0035] According to a fifth aspect of the present invention, a computer program product is provided, the computer program product comprising a computing program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to implement the steps of a tile data caching optimization method as described in any of the preceding claims.
[0036] This invention provides a method, system, device, medium, and program product for optimizing tile data caching. The method includes: retrieving cache records of the model to be loaded from a browser database based on the unique identifier of the model; generating an octree-structured tile node queue based on the cache records and a preset maximum cache level, where each level of the tile node queue corresponds to the tile data at each level of the model to be loaded; and finally, asynchronously requesting the tile data corresponding to each node from the backend level by level based on the tile node queue. This invention achieves efficient caching and loading of digital twin platform models, significantly improving the user's browsing experience. Attached Figure Description
[0037] 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. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.
[0038] Figure 1 A flowchart illustrating a tile data caching optimization method provided in an embodiment of the present invention;
[0039] Figure 2 This is a schematic diagram of the structure of a tile data caching optimization system provided in an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of the real-world model loading effect of a tile data caching optimization method provided in an embodiment of the present invention;
[0041] Figure 4 This is a schematic diagram illustrating the loading effect of an engineering model for a tile data caching optimization method provided in an embodiment of the present invention. Detailed Implementation
[0042] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0043] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0044] Figure 1 A flowchart of a tile data caching optimization method according to an embodiment of the present invention is shown.
[0045] like Figure 1 As shown, the tile data caching optimization method according to an embodiment of the present invention may include steps S100, S200 and S300.
[0046] In step S100, the cache record of the model to be loaded is obtained from the cacheinfo table of the browser database based on the unique identifier of the model to be loaded.
[0047] Specifically, the above steps include:
[0048] Obtain the unique identifier ID of the model file to be loaded. This unique identifier is used to distinguish the specific model object currently being viewed.
[0049] Using the unique identifier of the model to be loaded, retrieve the most recent cached record of the model from the browser's indexDB database. The cached record includes the highest cached tile level (lastlevel) of the model's tile data that has been cached in the browser's database.
[0050] Next, in step S200, an octree-structured tile node queue is generated based on the cache records and the preset maximum cache level. Each level of the tile node queue corresponds to the tile data of each level of the model to be loaded.
[0051] Specifically, the above steps include:
[0052] First, determine whether the highest cache tile level (lastlevel) is greater than or equal to the preset maximum cache level.
[0053] If the highest cached tile level (lastlevel) is greater than or equal to the preset maximum cache level, then the model to be loaded has been cached and can be rendered directly using the cached tile data in the browser's database.
[0054] If the highest cached tile level (lastlevel) is less than the preset maximum cache level, and the highest cached tile level (lastlevel) is not zero, it means that not all cached data was completed when the last browsing program was closed. In this case, caching will continue based on the levels that have already been cached.
[0055] If the highest cache tile level (lastlevel) is less than the preset maximum cache level, and the highest cache tile level (lastlevel) is zero (meaning there is no corresponding cache record), then a tile node queue is generated based on an octree structure according to the preset maximum cache tile level. Specifically, this includes:
[0056] Create the root node rootTile of the tile node queue. The root node corresponds to the first layer of tile data of the model to be loaded. The node level of the root node is zero, and the node ID of the root node is (0, 0, 0), representing the components in the i, j, and k directions.
[0057] Using the root node as the parent node, an octree data structure is used to generate corresponding child nodes. The level depth of the child node is the level depth of the parent node plus 1. The node IDs i,j,k of each child node are (0,0,0), (0,0,1), (0,1,0), (0,1,1), (1,0,0), (1,0,1), (1,1,0), and (1,1,1). The ID value of each child node is obtained by multiplying the i,j,k component values of the parent node by 2 and adding them to the i,j,k component values of the child node.
[0058] Based on the above rules, for each child node, the child node is used as the parent node, and the corresponding child node is generated recursively until the node level of the child node is equal to the preset maximum tile cache level, thus obtaining a complete multi-level tile node queue.
[0059] Finally, in step S300, based on the tile node queue, the tile data corresponding to the node is asynchronously requested from the backend level by level.
[0060] Specifically, the above steps include:
[0061] Starting from the root node level of the tile node queue, for each node in the node level, asynchronously request the tile data corresponding to the node from the backend, and write the tile data returned by the backend into the browser database indexDB to prevent blocking the rendering of the main program.
[0062] After all nodes in the node hierarchy have completed their tile data requests, update the highest cached tile level (lastlevel) value of the cached record corresponding to the model to be loaded in the browser's indexDB database. Record the currently cached level. If the process is interrupted, the next run can continue to cache tile data based on the progress of this run.
[0063] Once all nodes at all levels of the tile node queue have completed their tile data requests, the cache progress in the browser's indexDB database will be updated to "Completed".
[0064] Figure 3 The illustration shows a real-world model loading effect of a tile data caching optimization method provided by an embodiment of the present invention.
[0065] Figure 4 The diagram illustrates the engineering model loading effect of a tile data caching optimization method provided by an embodiment of the present invention.
[0066] In addition, embodiments of the present invention also provide a tile data caching optimization system. Figure 2 This diagram illustrates the structure of a tile data caching optimization system, which specifically includes:
[0067] The cache record retrieval module is used to retrieve the cache record of the model to be loaded from the browser database based on the unique identifier of the model to be loaded;
[0068] The node queue generation module is used to generate an octree-structured tile node queue based on cache records and a preset maximum cache level. Each level of the tile node queue corresponds to the tile data of each level of the model to be loaded.
[0069] The tile asynchronous request module is used to asynchronously request tile data corresponding to the backend nodes based on the tile node queue, level by level.
[0070] In addition, embodiments of the present invention also provide a tile data caching optimization device, the device comprising: a processor and a memory; the memory for storing one or more program instructions; the processor for running one or more program instructions to perform the steps of a tile data caching optimization method as described above.
[0071] In addition, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of a tile data caching optimization method as described above.
[0072] In addition, embodiments of the present invention also provide a computer program product, which includes computer program instructions that, when executed by a processor, implement the steps of a tile data caching optimization method as described above.
[0073] The tile data caching optimization method, system, device, medium, and program products provided in this invention utilize tile pre-caching technology to cache all tile data in a specified number of layers of the model tiles in advance during operation. This saves the download time required for the front end to request tiles from the back end, improves the loading speed of front end rendering, enhances model loading efficiency and user experience, and thus achieves efficient loading of digital twin platform models, significantly improving the user's browsing experience.
[0074] Compared with existing technologies, it has the following advantages:
[0075] 1. Significantly optimized first-screen display speed of digital twin platform models: The embodiments of this invention use tile-based caching to load digital twin platform models, which can greatly save the time for model data acquisition and significantly improve the first-screen display speed.
[0076] 2. The cache loop method provided in this embodiment of the invention can receive the parameter model ID and the specified maximum cache level from an external call.
[0077] 3. This embodiment of the invention uses IndexedDb local caching technology, which provides high control over cached data, a larger cache size, and a longer cache time. This caching technology effectively reduces network transmission, improves the model display experience, and significantly enhances display speed after using this caching algorithm.
[0078] In this embodiment of the invention, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in this embodiment of the invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in this embodiment of the invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor reads information from the storage medium and, in conjunction with its hardware, completes the steps of the above methods. The storage medium can be memory, for example, volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM).The storage media described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable types of memory. Those skilled in the art will recognize that the functions described in the above examples can be implemented using a combination of hardware and software. When applied software, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium accessible to general-purpose or special-purpose computers. Although the invention has been described in detail above with general description and specific embodiments, modifications or improvements can be made to it, which will be apparent to those skilled in the art. Therefore, such modifications or improvements made without departing from the spirit of the invention are all within the scope of protection claimed by the invention.
[0079] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications, equivalent changes, or alterations made by those skilled in the art using the disclosed technical content shall fall within the protection scope of the present invention.
Claims
1. A method for optimizing tile data caching, characterized in that, The method includes: Based on the unique identifier of the model to be loaded, retrieve the cache record of the model to be loaded from the browser database; Based on the cache records and the preset maximum cache level, an octree-structured tile node queue is generated, and each level of the tile node queue corresponds to the tile data of each level of the model to be loaded. Based on the tile node queue, the corresponding tile data of the node is asynchronously requested from the backend level by level.
2. The tile data caching optimization method according to claim 1, characterized in that, The cache record includes the highest cached tile level of the tile data of the model to be loaded that has been cached in the browser database.
3. The tile data caching optimization method according to claim 2, characterized in that, Based on the cache records and the preset maximum cache level, an octree-structured tile node queue is generated. Each level of the tile node queue corresponds to a tile data level of the model to be loaded, including: Determine whether the highest cache tile level is greater than or equal to the preset maximum cache level; If the highest cached tile level is greater than or equal to the preset maximum cache level, then the model to be loaded has been cached and the cached tile data in the browser database is used directly for rendering. If the highest cache tile level is less than the preset maximum cache level, then a tile node queue is generated based on an octree structure according to the preset maximum tile cache level. Each level of the tile node queue corresponds to the tile data of each level of the model to be loaded.
4. The tile data caching optimization method according to claim 3, characterized in that, Based on the preset maximum tile cache level, a tile node queue is generated using an octree structure, including: Create the root node of the tile node queue, the root node corresponds to the first layer of tile data of the model to be loaded, and the node level of the root node is zero; Using the root node as the parent node, the corresponding child nodes are generated using an octree data structure. For each child node, the child node is used as the parent node, and corresponding child nodes are generated recursively until the node level of the child node is equal to the preset maximum tile cache level.
5. The tile data caching optimization method according to claim 3, characterized in that, Based on the tile node queue, the corresponding tile data of the node is asynchronously requested from the backend level by level, including: Starting from the root node level of the tile node queue, the corresponding tile data of each node in the node level is asynchronously requested from the backend. Write the tile data returned by the backend into the browser's database.
6. The tile data caching optimization method according to claim 5, characterized in that, The method further includes: Once all nodes in the node hierarchy have completed their tile data requests, update the cached record in the browser database corresponding to the model to be loaded.
7. A tile data caching optimization system, characterized in that, The system includes: The cache record acquisition module is used to retrieve the cache record of the model to be loaded from the browser database based on the unique identifier of the model to be loaded; The node queue generation module is used to generate an octree-structured tile node queue based on the cache records and the preset maximum cache level. Each level of the tile node queue corresponds to the tile data of each level of the model to be loaded. The tile asynchronous request module is used to asynchronously request tile data corresponding to the backend nodes layer by layer based on the tile node queue.
8. A tile data caching optimization device, characterized in that, The device includes: a processor and a memory; The memory is used to store one or more program instructions; The processor is configured to run one or more program instructions to perform the steps of a tile data caching optimization method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of a tile data caching optimization method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes computer program instructions that, when executed by a processor, implement the steps of a tile data caching optimization method as described in any one of claims 1 to 6.