A three-dimensional scene resource loading speed optimization method

By dividing 3D scene resources into resource units and establishing a dependent directed acyclic graph, the resource loading process is optimized, solving the problems of invalid processing and frame time jitter caused by unmet dependencies in the 3D engine, and achieving minimum quality rendering of key objects and stability of scene loading.

CN121858302BActive Publication Date: 2026-05-15PTAC CENTURY BEIJING COMM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PTAC CENTURY BEIJING COMM TECH CO LTD
Filing Date
2026-03-13
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing 3D engines suffer from issues such as unmet dependencies in resource loading and rendering coordination, leading to invalid processing, duplicate uploads, and frame time jitter. Especially in complex scenes and with frequent interactions, it is difficult to guarantee that critical objects reach the minimum usable quality in the first frame of interaction, and there is a lack of cross-stage budget constraints and congestion feedback mechanisms.

Method used

By dividing 3D scene resources into resource units, establishing a directed acyclic graph of resource dependencies, determining the set of key resources and generating task deadlines, and adopting a cross-stage sorting and dispatch priority mechanism, combined with degraded resource units and atomic replacement methods, the resource loading process is optimized.

Benefits of technology

It achieves minimum quality rendering of critical objects under limited network bandwidth and processing power, suppresses frame time jitter caused by upload congestion, improves the continuity and stability of scene loading, and reduces the risk of black screen or stuttering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121858302B_ABST
    Figure CN121858302B_ABST
Patent Text Reader

Abstract

The application relates to the field of data processing of graphic images and three-dimensional rendering, and discloses a three-dimensional scene resource loading speed optimization method; including obtaining scene resources and dividing the scene resources into resource units, establishing a resource-dependent directed acyclic graph; establishing a multi-stage loading task chain of obtaining tasks, processing tasks and uploading tasks for each resource unit, and writing into a resource resident registration table after uploading; determining a predicted view based on a camera state and interactive input, extracting a candidate resource subgraph from a space index and determining a key resource set; generating a task deadline according to key path information, and dispatching according to the deadline and a remaining loading time cross-stage sorting under the constraints of a bandwidth budget, a processing budget and an uploading budget; preferentially loading a degraded resource unit when an overdue prediction is made, atomically replacing a rendering reference after uploading is completed, and adaptively adjusting concurrency and a budget according to a running index.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing for graphics and 3D rendering, and specifically to a method for optimizing the loading speed of 3D scene resources. Background Technology

[0002] 3D interactive scenes are widely used in digital twins, industrial visualization, games, and simulation training. As scene scale increases and asset precision improves, scene resources typically include various types of content such as multi-resolution textures, tiled meshes, material parameters, animations, and collision data, and the visible set dynamically switches according to the camera view and user interaction during operation. To ensure a good interactive experience, the system needs to complete on-demand loading and timely presentation of resources under the constraints of limited network bandwidth, processor computing power, and graphics processing unit uploading capacity, while maintaining stable frame rates.

[0003] Existing 3D engines and visualization systems typically employ methods such as chunked loading, asynchronous reading, texture paging, or hierarchical detailing to reduce the pressure of a single load, and reduce the waiting time for visible resources through resource caching, prefetching, or priority queues. Some solutions determine the range of candidate resources based on spatial indexing or view frustum clipping, and then load them in order of distance, screen occupancy, or object importance; other solutions divide the loading chain into stages such as reading, decompression and parsing, and uploading, and improve throughput through thread pools and task queues. However, in complex scenes and with frequent interactions, there are often strong rendering dependencies between resources. For example, materials depend on textures and pipeline states, rendered objects depend on meshes and material parameters, and animations and collisions may affect visibility and interaction logic, making it difficult to balance timely availability and stable frame rates by simply dispatching resources based on visibility or static priority.

[0004] Against the backdrop of the aforementioned technologies, existing solutions still have shortcomings in resource loading and rendering coordination: when loading scheduling mainly relies on single queue priority or is sorted solely based on visibility, invalid processing or duplicate uploads due to unmet dependencies can easily occur. Critical objects may still fail to reach the minimum usable quality in time during the first frame interaction stage due to missing textures, material parameters, or pipeline status. At the same time, the resource consumption characteristics of the three stages of reading, processing, and graphics processing unit upload are different. If there is a lack of cross-stage budget constraints and congestion feedback mechanisms, it may cause congestion in the upload queue and accumulation of intermediate products, leading to frame time jitter and stuttering. In addition, the lack of controllable degradation and smooth replacement strategies when network fluctuations or computing power are limited often leads to sudden changes in image quality or difficulty in converging loading delays, thereby affecting the continuity of interaction and the overall experience. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method for optimizing the loading speed of 3D scene resources. This method solves the technical problems in existing technologies, which lack a cross-stage collaborative scheduling mechanism oriented towards resource dependencies and deadline constraints. This results in critical visible resources being unable to reach the minimum usable quality in a timely manner when bandwidth, processing, and graphics processing unit upload resources are limited. Furthermore, it is prone to invalid loading caused by unmet dependencies and frame time jitter caused by upload congestion.

[0006] The above-mentioned technical objective of the present invention is achieved through the following technical solution:

[0007] A method for optimizing the loading speed of 3D scene resources includes the following steps: S1: Obtain the resource set of the target 3D scene and divide the resource set into multiple resource units; establish a directed acyclic graph of resource dependencies, where the nodes of the directed acyclic graph of resource dependencies are resource units and the edges represent rendering dependencies;

[0008] S2: Establish a multi-stage loading task chain for each resource unit. The multi-stage loading task chain includes at least an acquisition task, a processing task, and an upload task. The acquisition task is used to read resource data from the network or storage medium. The processing task is used to unpack, decompress, parse, or transcode the resource data. The upload task is used to upload the processed data to the graphics processing unit, complete the binding, and write it into the resource residency registration table.

[0009] S3: Obtain the current camera state and user interaction input to determine the predicted field of view; determine candidate spatial units from the spatial index based on the predicted field of view, and extract candidate resource subgraphs from the resource-dependent directed acyclic graph accordingly;

[0010] S4: Determine the key resource set in the candidate resource subgraph. The key resource set is used to satisfy the interactive presentation of the first frame or to satisfy the minimum quality presentation of objects in the predicted field of view.

[0011] S5: Determine critical path information based on the critical resource set, and generate task deadlines for the multi-stage loading task chain based on the critical path information. The critical path information is the information corresponding to the dependency chain with the largest remaining loading time in the critical resource set.

[0012] S6: Based on the task deadline and critical path information, determine the dispatch priority according to the task deadline and remaining loading time, and perform cross-stage sorting and dispatch execution of acquisition tasks, processing tasks and upload tasks under the constraints of bandwidth budget, processing budget and upload budget.

[0013] S7: When it is predicted that the multi-stage loading task chain cannot be completed within the task deadline, select the degraded resource unit for the corresponding resource unit and load the degraded resource unit first to ensure the minimum quality rendering.

[0014] S8: After a resource unit or a degraded resource unit completes its upload task, the rendering reference is updated through atomic replacement, so that the rendering pipeline can switch to the resource unit that has completed the upload without interrupting the frame loop.

[0015] S9: Collect runtime metrics during the loading process, and adaptively adjust at least one of the following based on the runtime metrics: task concurrency depth, number of concurrent task processing threads, upload budget per frame, prediction time range, and number of prediction frames.

[0016] Preferably, the resource unit includes:

[0017] Mesh chunk resource unit, texture page resource unit, material parameter block resource unit, animation clip resource unit, collider or bounding body resource unit, shader or pipeline state cache item resource unit;

[0018] The texture page resource unit includes texture pages at different resolution levels; and for each type of resource unit, a resource type identifier and a quality level identifier are recorded to determine the key resource set and select degraded resource units.

[0019] Preferably, establishing the resource-dependent directed acyclic graph includes:

[0020] Generate a resource unit identifier for each resource unit and record the mapping relationship between the resource unit identifier and the resource storage location;

[0021] Dependency edges are established according to the rule that the parent resource unit references the child resource unit, so that the material parameter block resource unit depends on the texture page resource unit it references, and the render object resource unit depends on the mesh block resource unit and the material parameter block resource unit it references.

[0022] The resource-dependent directed acyclic graph is topologically sorted to obtain a topological sequence, and the in-degree information, direct predecessor set, and direct successor set of each resource unit are stored. During dispatch execution, only the tasks corresponding to resource units with an in-degree of zero and whose budget is satisfied are added to the ready queue.

[0023] Preferably, the multi-stage loading task chain includes:

[0024] Verification tasks are used to perform integrity checks on the acquired resource data;

[0025] The deserialization task is used to parse resource data into data structures that the engine can use;

[0026] Format conversion tasks are used to convert texture data or mesh data into target formats supported by the graphics processing unit.

[0027] Pipeline warm-up task is used to generate or load shader variant information and pipeline state cache items corresponding to resource units before the upload task;

[0028] Record the stage type identifier and the location of intermediate output for each stage task, so that the output of the processing task can be directly used as the input for the upload task.

[0029] Preferably, the spatial index is obtained by partitioning the scene space, and the scene space partitioning adopts quadtree partitioning, octree partitioning, or voxel partitioning;

[0030] A mapping table is established between spatial unit identifiers and resource unit lists for each spatial unit, wherein the resource unit lists include at least a basic quality resource unit list and a high quality resource unit list;

[0031] The basic quality resource unit is used to meet the minimum quality presentation, and the high-quality resource unit is used to gradually replace the basic quality resource unit when the budget allows.

[0032] Preferably, determining the prediction field of view includes:

[0033] Set the prediction time range and the number of prediction frames, and extrapolate the camera state based on the current camera pose, camera linear velocity and camera angular velocity to obtain the predicted camera state sequence;

[0034] The predicted field of view is obtained by calculating the view frustum based on the predicted camera state sequence;

[0035] When the amount of change in user interaction input is detected to exceed a preset threshold, the prediction time range is shortened or the number of prediction frames is reduced to reduce invalid prefetching caused by prediction errors.

[0036] Preferably, determining the set of key resources includes:

[0037] Calculate the screen contribution of resource units in the candidate resource subgraph. The screen contribution is determined based on at least two of the following: screen projection area, distance from camera, occlusion ratio, and object importance weight.

[0038] Resource units whose screen contribution meets a preset threshold are added to the target set, and the target set is supplemented to include resource units that it directly or indirectly depends on.

[0039] The key resource set is further filtered from the target set to obtain the key resource set, so that the key resource set at least covers the proxy mesh resource units or basic quality texture page resource units required for interactive rendering of the first frame, and covers the material parameter block resource units corresponding to the rendering object.

[0040] Preferably, determining the critical path information and generating the task deadline includes:

[0041] Based on the topology sequence and the historical or estimated time consumption of resource units, calculate the remaining loading time required to complete the acquisition, processing and uploading tasks for each resource unit.

[0042] Within the set of critical resources, dependency chains are determined based on rendering dependencies, and the information corresponding to the dependency chain with the longest remaining loading time is used as critical path information.

[0043] Based on at least one of the following: the predicted time when the resource unit corresponding to the object in the predicted field of view meets the screen contribution threshold, the first frame interactive time limit, the allowable upload volume budget per frame, and the allowable processing time budget per frame, a task deadline is generated for the resource unit in the key resource set, and a preset time margin is added to the task deadline.

[0044] Preferably, determining the dispatch priority and performing cross-stage sorting and dispatch execution includes:

[0045] The dispatch priority is determined by comparing the task deadline with the remaining loading time, so that tasks with earlier deadlines and longer remaining loading time have higher dispatch priority.

[0046] Establish an acquisition ready queue, a processing ready queue, and an upload ready queue, and set the corresponding bandwidth budget, processing budget, and upload budget for each queue.

[0047] Within each scheduling cycle, tasks with higher dispatch priority are dispatched first. When multiple tasks have the same dispatch priority, tasks located on the dependency chain corresponding to the critical path information are dispatched first.

[0048] When the waiting time of the upload ready queue exceeds the congestion threshold, reduce the processing budget or bandwidth budget to create back pressure; limit the upload amount of each frame within the upload budget so that the frame time jitter of the rendering thread does not exceed the preset jitter threshold.

[0049] Preferably, S7-S9 further include:

[0050] An alternative mapping table is established for each resource unit. The alternative mapping table contains at least the original resource unit identifier, the degraded resource unit identifier, and the quality level information. The degraded resource unit includes at least one of the following: low-resolution layer texture page, low-detail layer mesh block, and simplified material parameter block.

[0051] When it is predicted that the original resource unit cannot complete the upload task within the task deadline, the degraded resource unit is loaded and enabled for rendering first, while the original resource unit is kept as a high-quality resource unit to be replaced, so as to trigger a gradual replacement when the budget allows.

[0052] The atomic replacement method includes versioned handle switching or pointer swapping, and performs a resource residency registry consistency check before replacement. The consistency check includes at least confirming that the resource unit identifier to be switched is in a residency state in the resource residency registry, and confirming that the resource unit identifier pointed to by the rendering reference is consistent with the residency resource unit identifier in the resource residency registry.

[0053] The operational metrics are collected, which include at least two or more of the following: cache hit rate, number of task expirations, upload queue waiting time, and frame time jitter. Based on the operational metrics, at least one of the following is adjusted: prediction time range, prediction frame count, acquisition task concurrency depth, number of concurrent threads for processing tasks, and upload budget per frame.

[0054] In summary, the present invention has the following main beneficial effects:

[0055] This invention divides the 3D scene resource set into resource units such as mesh blocks, texture pages, and material parameter blocks, and establishes a directed acyclic graph of resource dependencies. This transforms resource loading from a single sequence or static priority into a controllable dispatch under dependency constraints, thereby achieving the effects of reducing invalid loading and repeated processing, shortening the preparation time for interactive presentation of the first frame, and reducing the risk of black screens or stuttering caused by missing dependencies, all while ensuring that dependencies are satisfied.

[0056] This invention determines the predicted field of view and extracts candidate resource subgraphs based on camera status and user interaction input. It further filters the set of key resources and completes their direct or indirect dependencies by screen contribution. At the same time, it constructs the dispatch priority by combining critical path information and task deadlines, and performs cross-stage sorting and dispatch under the constraints of bandwidth budget, processing budget and upload budget. This achieves the effect of prioritizing the minimum quality presentation of key objects, suppressing frame time jitter caused by upload congestion, and improving the continuity and stability of scene loading even when network bandwidth, processing power and graphics processing unit upload capacity are limited.

[0057] This invention introduces a mechanism for prioritizing the loading of degraded resource units when predictions fail to complete on schedule. After resource loading is completed, a consistency check is performed based on the resource residency register. The rendering reference is updated using atomic replacement methods such as versioned handle switching or pointer swapping. At the same time, operational metrics such as cache hit rate, number of task overdues, upload queue waiting time, and frame time jitter are collected and the concurrency depth, number of threads, upload budget per frame, and prediction parameters are adaptively adjusted. This achieves a smooth transition between degraded availability and high-quality gradual replacement under different device and network fluctuation conditions, improves operational robustness, and maintains a stable frame rate and loading efficiency over a long period. Attached Figure Description

[0058] Figure 1This is a system structure block diagram of the present invention;

[0059] Figure 2 This is the resource-dependent directed acyclic graph of the present invention. Detailed Implementation

[0060] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.

[0061] Example 1

[0062] refer to Figure 1 A method for optimizing the loading speed of 3D scene resources includes the following steps: S1: Obtain the resource set of the target 3D scene and divide the resource set into multiple resource units; establish a directed acyclic graph of resource dependencies, where the nodes of the directed acyclic graph of resource dependencies are resource units and the edges represent rendering dependencies;

[0063] S2: Establish a multi-stage loading task chain for each resource unit. The multi-stage loading task chain includes at least an acquisition task, a processing task, and an upload task. The acquisition task is used to read resource data from the network or storage medium. The processing task is used to unpack, decompress, parse, or transcode the resource data. The upload task is used to upload the processed data to the graphics processing unit, complete the binding, and write it into the resource residency registration table.

[0064] S3: Obtain the current camera state and user interaction input to determine the predicted field of view; determine candidate spatial units from the spatial index based on the predicted field of view, and extract candidate resource subgraphs from the resource-dependent directed acyclic graph accordingly;

[0065] S4: Determine the key resource set in the candidate resource subgraph. The key resource set is used to satisfy the interactive presentation of the first frame or to satisfy the minimum quality presentation of objects in the predicted field of view.

[0066] S5: Determine critical path information based on the critical resource set, and generate task deadlines for the multi-stage loading task chain based on the critical path information. The critical path information is the information corresponding to the dependency chain with the largest remaining loading time in the critical resource set.

[0067] S6: Based on the task deadline and critical path information, determine the dispatch priority according to the task deadline and remaining loading time, and perform cross-stage sorting and dispatch execution of acquisition tasks, processing tasks and upload tasks under the constraints of bandwidth budget, processing budget and upload budget.

[0068] S7: When it is predicted that the multi-stage loading task chain cannot be completed within the task deadline, select the degraded resource unit for the corresponding resource unit and load the degraded resource unit first to ensure the minimum quality rendering.

[0069] S8: After a resource unit or a degraded resource unit completes its upload task, the rendering reference is updated through atomic replacement, so that the rendering pipeline can switch to the resource unit that has completed the upload without interrupting the frame loop.

[0070] S9: Collect runtime metrics during the loading process, and adaptively adjust at least one of the following based on the runtime metrics: task concurrency depth, number of concurrent task processing threads, upload budget per frame, prediction time range, and number of prediction frames.

[0071] This embodiment is applicable to the runtime environment of an interactive 3D scene. The scene contains multiple rendering objects, which at least depend on mesh data and material parameters, and may further depend on texture data, animation data, collision data, and shader or pipeline state cache items. The system side includes at least a rendering thread and a loading-side execution unit. The loading-side execution unit is used to perform acquisition tasks, processing tasks, and upload tasks, and completes consistency connection with rendering references through a resource residency registry.

[0072] To avoid ambiguity, this embodiment provides the data fields of the resource unit, the direction of the dependency graph, the recording method of intermediate products of the task chain, the default determination method of the budget and threshold, and the thread consistency strategy of atomic replacement in the step description, so that those skilled in the art can implement it directly.

[0073] S1: Obtain the resource set, divide it into resource units, and establish a directed acyclic graph of resource dependencies: First, obtain the resource set of the target 3D scene and divide it into multiple resource units. A resource unit is the smallest granularity object that can be independently obtained, processed, uploaded, and referenced in rendering. To ensure that subsequent scheduling, degradation, and replacement can all be implemented, each resource unit must record at least the following fields in the resource management module: resource unit identifier, resource type identifier, quality level identifier, storage location, dependency list, alternative mapping information, and statistical fields.

[0074] The resource type identifier is used to distinguish at least mesh tile resource units, texture page resource units, material parameter block resource units, animation clip resource units, collider or bounding body resource units, and shader or pipeline state cache item resource units. The quality level identifier distinguishes at least between base quality and high quality. Base quality is preferred for interactive rendering in the first frame or for the lowest quality rendering, while high quality is used to gradually replace base quality when budget allows. The storage location is used to locate the network address or storage medium location. The storage medium location can be a file path and offset, or a resource package index. The dependency list records the set of resource unit identifiers that the rendering depends on. The alternative mapping information records the degraded resource unit identifiers and their corresponding quality levels. The statistics field records the sample size, statistical values, and update timestamps required for subsequent time estimation.

[0075] After resource unit partitioning, a directed acyclic graph (DAG) of resource dependencies is established. Nodes in the DAG represent resource units, and edges represent rendering dependencies. To standardize direction and facilitate computation, this embodiment specifies the edge direction as follows: if resource unit A requires resource unit B to be available before rendering, a directed edge is established from resource unit A to resource unit B, and resource unit B belongs to the dependency list of resource unit A. In this way, the dependency list of any resource unit can be directly used for subsequent recursive calculations of the critical path and readiness determination.

[0076] To ensure directed acyclicity, dependencies are validated during resource import or packaging. If a loop is detected, this embodiment employs at least one of the following loop elimination strategies to ensure the dependency graph satisfies the topological sorting condition: First, a reference in the loop is changed to an indirect reference. The indirect reference obtains the dependent resource identifier through a runtime lookup table, thereby removing back edges from the dependency graph; Second, composite resources are broken down into finer-grained resource units, making the dependency relationship a unidirectional link; Third, references used only during editing or non-rendering critical paths are subject to delayed binding, preventing them from participating in rendering dependencies.

[0077] A topological sort is performed on the resource-dependent directed acyclic graph to obtain a topological sequence, and the in-degree information, direct predecessor set, and direct successor set of each resource unit are stored. To enable the subsequent "in-degree is zero" determination, this embodiment specifies the in-degree update rule as follows: when a resource unit completes its upload and is written to the resource residency register as a resided state, the in-degree values ​​of all its direct predecessors are decremented; when the in-degree of a predecessor resource unit decreases to zero, the predecessor resource unit meets the dependency completion condition and can enter the ready determination process.

[0078] S2: Establish a multi-stage loading task chain for each resource unit and record the location of intermediate artifacts:

[0079] A multi-stage loading task chain is established for each resource unit. This chain includes at least three tasks: acquisition, processing, and upload. The acquisition task reads resource data from the network or storage medium. The processing task unpacks, decompresses, parses, or transcodes the resource data. The upload task uploads the processed data to the graphics processing unit, binds it, and writes it to the resource residency registration table.

[0080] To ensure unambiguous transition between the processing and uploading phases, this embodiment specifies that the location of intermediate processing artifacts is represented by buffer handles. A buffer handle includes at least a buffer index or address, length, format identifier, and ownership identifier. The task outputs the raw data buffer handle. The processing task reads the raw data buffer handle and outputs an intermediate artifact buffer handle that can be used for uploading. The uploading task reads the intermediate artifact buffer handle, uploads it to the graphics processing unit side to complete the binding, and writes the resource unit identifier, residency status, resource handle, and version number into the resource residency registration table.

[0081] As a preferred implementation, the processing task includes at least one of the following sub-tasks, and records the stage type identifier and the intermediate product position of the stage output for each stage task, so that the output of the processing task can be directly used as the input of the upload task: the verification task is used to perform integrity verification on the acquired resource data; the deserialization task is used to parse the resource data into a data structure usable by the engine; the format conversion task is used to convert the texture data or mesh data into a target format supported by the graphics processing unit; the pipeline warm-up task is used to generate or load the shader variant information and pipeline state cache items corresponding to the resource unit before the upload task, so as to reduce the blocking of the first use after the upload.

[0082] Meanwhile, to ensure the feasibility of subsequent critical path and dispatch priority calculations, this embodiment introduces initialization and update rules for stage time estimation at this stage. Three types of time estimates are maintained for each resource unit u: acquisition task time estimate, processing task time estimate, and upload task time estimate. During the first run or when the sample size is insufficient, a conservative default value is set according to the resource type identifier; the default value is provided by the configuration file or device settings. During operation, the actual time is recorded after each task completion, and the time estimate is updated using sliding window statistics. To improve robustness, the sliding window statistics preferably use the median or a higher quantile value as the time estimate to avoid occasional fluctuations causing underestimation and frequent delays.

[0083] S3: Obtain camera status and user interaction input, determine the prediction field of view, and extract candidate resource sub-images:

[0084] The system acquires the current camera state and user interaction input, sets the prediction time range and the number of prediction frames, and extrapolates the camera state based on the current camera pose, camera linear velocity, and camera angular velocity to obtain a predicted camera state sequence. The system then calculates the view frustum frame by frame based on the predicted camera state sequence, and uses the union of the view frustums within the prediction time range as the predicted field of view.

[0085] Candidate spatial units are determined from the spatial index based on the predicted view domain. The spatial index is obtained by partitioning the scene space, which can be done using quadtree, octree, or voxel partitioning. To make candidate resource determination feasible, this embodiment establishes a mapping table between spatial unit identifiers and resource unit lists for each spatial unit. The resource unit list includes at least a list of basic quality resource units and a list of high-quality resource units, with each element being a set of resource unit identifiers. Candidate spatial units are determined by intersecting the view frustum with the bounding box of the spatial unit. Subsequently, the resource unit identifier sets corresponding to the candidate spatial units are aggregated to form a candidate resource set. Based on this set, a candidate resource subgraph is extracted from the directed acyclic graph of resource dependencies. The candidate resource subgraph contains the candidate resource set and the dependencies between the candidate resource sets.

[0086] When the detected change in user interaction input exceeds a preset threshold, the prediction time range is shortened or the number of prediction frames is reduced, and the prediction field of view and candidate spatial unit set are recalculated to reduce invalid prefetching caused by prediction errors. The preset threshold is a configurable parameter that can be configured according to device level or interaction mode.

[0087] S4: Identify the set of key resources in the candidate resource subgraph and complete the dependencies:

[0088] A set of key resources is determined in the candidate resource subgraph. This set is used to satisfy either the requirement for interactive rendering of the first frame or the requirement for minimum quality rendering of objects within the predicted viewport. To ensure unambiguous determination of interactive rendering of the first frame, this embodiment adopts the following default determination rule: when the proxy mesh resource unit or basic quality texture page resource unit corresponding to the set of interactive objects has been resident, and the material parameter block resource unit corresponding to the object has been resident, it is considered that interactive rendering of the first frame is satisfied.

[0089] The determination of the key resource set includes: calculating the screen contribution of resource units in the candidate resource subgraph, whereby the screen contribution is determined based on at least two of the following: screen projection area, distance from the camera, occlusion ratio, and object importance weight. Resource units whose screen contribution meets a preset threshold are added to the target set, and the target set is supplemented to include resource units that directly or indirectly depend on them, ensuring that the selected rendering objects will not fail to bind or render abnormally due to missing texture pages, material parameter blocks, or pipeline state cache items after loading. The target set is further filtered to obtain the key resource set, which at least covers the proxy mesh resource units or basic quality texture page resource units required for interactive rendering in the first frame, and also covers the material parameter block resource units corresponding to the rendering objects.

[0090] S5: Determine critical path information and generate task deadlines based on the set of critical resources.

[0091] The critical path information is determined based on the critical resource set, and task deadlines are generated for the multi-stage loading task chain based on the critical path information. The critical path information is the information corresponding to the dependency chain with the longest remaining loading time in the critical resource set.

[0092] To make the calculation of remaining load time feasible, the following notation is defined and the calculation formula is given. For any resource unit ,definition Representing resource units Estimated time for acquiring tasks Representing resource units Estimated processing time for the task Representing resource units Estimated upload time Representing resource units The dependency list corresponds to the set of resource units. Representing resource units The remaining loading time estimate required to reach the resident state is defined as follows:

[0093] ;

[0094] when When empty, the maximum value term is zero. It can be calculated recursively from bottom to top according to the topological sequence, and the calculation uses Taken from The sliding window statistics are used, and a conservative default value is taken when the sample is insufficient.

[0095] Within the critical resource set, dependency chains are determined based on rendering dependencies, and the information corresponding to the dependency chain with the longest remaining load time is used as critical path information. Critical path information includes at least the sequence of resource unit identifiers on the dependency chain and an estimated remaining load time for that dependency chain.

[0096] When generating task deadlines, the deadlines for each resource unit in the key resource set are generated based on at least one of the following: the predicted time when the resource unit corresponding to the object within the viewport meets the screen contribution threshold, the first frame's interactive time limit, the allowable upload budget per frame, and the allowable processing time budget per frame. To reduce statistical errors and scheduling jitter, a preset duration margin is added to the task deadlines. The preset duration margin is a configurable parameter and can also be adjusted in tiers based on the number of historical task overdues, ensuring system stability under different network and device conditions.

[0097] S6: Determine dispatch priority based on task deadline and critical path information, and sort and dispatch tasks across stages under three budget constraints: Based on task deadline and critical path information, determine dispatch priority according to task deadline and remaining loading time, and sort and dispatch tasks across stages under bandwidth budget, processing budget and upload budget constraints.

[0098] To ensure that dispatch priority is computable and unambiguous, for resource units definition Representing resource units Task deadline corresponding time Representing resource units Remaining loading time estimate Representing resource units Task margin is defined as:

[0099] ;

[0100] A smaller task margin indicates a more urgent task and a higher assignment priority. When multiple tasks have the same or insignificantly different task margins, tasks located on the dependency chain corresponding to the critical path information are assigned first to ensure that the critical dependency chain necessary for the first frame to be interactive and to achieve the minimum quality rendering is completed first.

[0101] To achieve cross-stage dispatch, this embodiment establishes an acquisition ready queue, a processing ready queue, and an upload ready queue, and sets corresponding bandwidth budgets, processing budgets, and upload budgets for each. The bandwidth budget limits the concurrency depth of acquisition tasks or the amount of data acquired per unit time, and is determined by bandwidth detection or preset configuration by default. The processing budget limits the number of concurrent processing threads or the available processing time per frame, and is determined by the maximum number of threads in the processing thread pool and the available processing time per frame by default. The upload budget limits the amount of data allowed to be uploaded per frame, and is calculated by the time slice reserved for upload in the frame time target by default, or dynamically converged from historical frame time statistics.

[0102] The scheduling cycle is triggered once at the beginning of each frame by default, and can be additionally triggered during idle periods within the frame if necessary. The following rules are executed within each scheduling cycle:

[0103] First, the readiness determination process only adds the tasks corresponding to resource units with an in-degree of zero and whose budget is met to the corresponding ready queue. An in-degree of zero means that all its dependent resources have been uploaded and are in a resided state in the resource residency register.

[0104] Secondly, sorting and dispatching: select tasks from the set of dispatchable tasks in ascending order of task margin, and dispatch and execute them provided that the bandwidth budget, processing budget, and upload budget are met.

[0105] Third, back pressure control: when the waiting time of the upload ready queue exceeds the congestion threshold, the processing budget or bandwidth budget is reduced to form back pressure, which limits the generation rate of intermediate products and avoids memory accumulation and frame time jitter caused by upload-side congestion.

[0106] Fourth, the frame upload limit restricts the upload amount per frame to within the upload budget, ensuring that the frame time jitter of the rendering thread does not exceed the preset jitter threshold. The congestion threshold and jitter threshold are preset and configurable parameters, and can also be automatically set according to device level or historical statistics, thereby ensuring stability on different platforms.

[0107] S7: Selecting and prioritizing degraded resource units when predictions cannot be completed on time: When a multi-stage loading task chain for predictions cannot be completed within the task deadline, a degraded resource unit is selected for the corresponding resource unit and prioritized for loading, in order to ensure minimum quality rendering.

[0108] This embodiment provides feasible default triggering conditions. If at least one of the following conditions is met, it is considered that the task may not be completed on schedule: the resource unit task margin is less than zero; the resource unit has not entered the upload ready queue for several consecutive scheduling cycles and the task deadline is approaching; the upload queue is continuously congested and back pressure is triggered, and there are still unresident resource units in the critical resource set.

[0109] To support degradation selection, an alternative mapping table is established. This table contains at least the original resource unit identifier, the degraded resource unit identifier, and quality level information. The degraded resource unit includes at least one of the following: low-resolution layer texture pages, low-detail layer mesh chunks, and simplified material parameter chunks. When degradation is triggered, the degraded resource unit is loaded and enabled for rendering, while the original resource unit remains as the high-quality resource unit to be replaced, allowing for gradual replacement as the budget allows. To avoid changes in binding semantics introduced by degradation switching, the degraded resource unit preferably maintains consistency with the original resource unit in terms of interface, and the same resource handle structure is maintained on the rendering object side, with only the resident resource pointed to by the handle changing.

[0110] S8: After the upload is complete, update the render reference via atomic replacement and perform a consistency check:

[0111] Once a resource unit or a degraded resource unit has completed its upload task, the rendering reference is updated via atomic replacement, allowing the rendering pipeline to switch to the uploaded resource unit without interrupting the frame loop.

[0112] To ensure consistency in replacement, this embodiment stipulates that the rendering object does not directly hold the underlying resource pointer, but instead holds the resource handle. The resource handle includes at least the resource unit identifier, version number, and graphics processing unit-side handle value or pointer. The resource residency register includes at least the resource unit identifier, residency status, resource handle, version number, and last update time. The residency status includes at least non-residency, uploading, and residency.

[0113] After the upload task is completed, the replacement is performed in the following sequence: First, write to the resource residency registration table, update the residency status to resided, and write the resource handle and version number; then update the resource handle version number and perform versioned handle switching or pointer swapping; the rendering thread reads the resource handle at the beginning of the frame or at a safe point during rendering object traversal. If a version number change is detected, the handle is reread at the next safe point to ensure that the handle field is consistent within a single frame.

[0114] Before replacement, a consistency check of the resource residency register is performed. This check includes at least: confirming that the resource unit identifier to be switched is already resided in the resource residency register; and confirming that the resource unit identifier pointed to by the rendering reference matches the already resided resource unit identifier in the resource residency register. If the consistency check fails, the replacement is not performed and is postponed to the next safe point. Simultaneously, the currently downgraded resource unit continues to be used for rendering to avoid dangling rendering references or frame interruptions. As a preferred implementation, the resource handle table is implemented using double buffering or atomic fields. The loading side updates the write buffer and completes the switch, while the rendering side only reads the read buffer, thereby reducing lock contention and improving frame stability.

[0115] S9: Collect operational metrics and adaptively adjust concurrency and budget parameters:

[0116] Collect runtime metrics during the loading process, and adaptively adjust at least one of the following based on the runtime metrics: task concurrency depth, number of concurrent task processing threads, upload budget per frame, prediction time range, and number of prediction frames.

[0117] Performance metrics must include at least two of the following: cache hit rate, number of task expirations, upload queue wait time, and frame time jitter. Cache hit rate is calculated by counting the number of times the resource is read from the memory cache or disk cache. Number of task expirations is calculated by comparing the resource unit's upload completion time with the task's deadline. Upload queue wait time is calculated by the difference between the enqueue and dequeue times of the upload task. Frame time jitter is calculated by counting the frame-by-frame latency fluctuations of the rendering thread.

[0118] To ensure stability during parameter tuning, this embodiment employs a gradual adjustment with upper and lower limits to avoid frequent budget fluctuations. The default adjustment strategy includes: when the upload queue waiting time consistently exceeds the congestion threshold, reducing the number of concurrent processing task threads or the concurrency depth of acquisition tasks, while prioritizing frame time stability; when the number of task overdue times increases, shortening the prediction time range or reducing the number of prediction frames, and appropriately increasing the preset duration margin or the intensity of key resource set filtering to reduce invalid prefetching; when the cache hit rate increases and frame time stabilizes, appropriately increasing the upload budget per frame or increasing the number of concurrent processing task threads to accelerate the gradual replacement of high-quality resources.

[0119] This invention uses resource units as the smallest loading granularity, dividing the 3D scene resource set into resource units such as mesh blocks, texture pages, and material parameter blocks. It also establishes a directed acyclic graph of resource dependencies based on the reference relationships between the rendering object and the mesh, material, texture, and pipeline state. The dependency satisfaction order is obtained through topological sorting, ensuring that subsequent loading and dispatch always occur under the premise of dependency satisfaction.

[0120] During operation, the system extrapolates the predicted field of view based on the current camera status and user interaction input. It selects candidate spatial units that intersect with the predicted field of view in the spatial index and extracts the corresponding candidate resource subgraphs. Then, it filters the key resource set based on screen contribution and supplements the key resource set with its direct or indirect dependencies to ensure that the objects entering the key set can achieve interactive or minimum quality rendering in the first frame using proxy meshes or basic texture pages.

[0121] Based on this, the system calculates the remaining loading time using the time estimates of the three stages of resource unit acquisition, processing, and uploading. It selects the dependency chain with the largest remaining loading time from the set of key resources as the critical path information. Combined with the expected time when the object reaches the screen contribution threshold, the first frame's interactive time limit, and the allowable processing time budget and upload budget for each frame, it generates the task deadline. Then, it determines the dispatch priority by comparing the task deadline with the remaining loading time. Under the constraints of bandwidth budget, processing budget, and upload budget, it sorts and dispatches the acquisition task, processing task, and upload task across stages. When the upload queue is congested, it creates back pressure by reducing the bandwidth budget or processing budget, limiting the accumulation of intermediate products and suppressing frame time jitter.

[0122] When it is predicted that high-quality resources cannot be completed within the deadline, the system prioritizes loading degraded resource units such as low-resolution texture pages, low-detail mesh chunks, or simplified material parameter blocks based on the alternative mapping table to ensure minimum quality rendering. After the high-quality resources are uploaded, the system confirms the resident status through the resource resident registration table and updates the rendering reference using atomic replacement methods such as versioned handle switching or pointer swapping to achieve seamless upgrade without interrupting the frame loop.

[0123] The system continuously collects operational metrics such as cache hit rate, number of task expirations, upload queue waiting time, and frame time jitter, and adaptively adjusts the acquisition task concurrency depth, the number of concurrent threads for processing tasks, the upload budget per frame, and the prediction time range and number of prediction frames accordingly, so that loading speed and rendering stability are optimized in a coordinated manner under different network and device conditions.

[0124] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for optimizing the loading speed of 3D scene resources, characterized in that, include: S1: Obtain the resource set of the target 3D scene and divide the resource set into multiple resource units; establish a directed acyclic graph of resource dependencies, where the nodes of the directed acyclic graph of resource dependencies are resource units and the edges represent rendering dependencies; S2: Establish a multi-stage loading task chain for each resource unit. The multi-stage loading task chain includes at least an acquisition task, a processing task, and an upload task. The acquisition task is used to read resource data from the network or storage medium. The processing task is used to unpack, decompress, parse, or transcode the resource data. The upload task is used to upload the processed data to the graphics processing unit, complete the binding, and write it into the resource residency registration table. S3: Obtain the current camera state and user interaction input to determine the predicted field of view; determine candidate spatial units from the spatial index based on the predicted field of view, and extract candidate resource subgraphs from the resource-dependent directed acyclic graph accordingly; S4: Determine the key resource set in the candidate resource subgraph. The key resource set is used to satisfy the interactive presentation of the first frame or to satisfy the minimum quality presentation of objects in the predicted field of view. S5: Determine critical path information based on the critical resource set, and generate task deadlines for the multi-stage loading task chain based on the critical path information. The critical path information is the information corresponding to the dependency chain with the largest remaining loading time in the critical resource set. S6: Based on the task deadline and critical path information, determine the dispatch priority according to the task deadline and remaining loading time, and perform cross-stage sorting and dispatch execution of acquisition tasks, processing tasks and upload tasks under the constraints of bandwidth budget, processing budget and upload budget. S7: When it is predicted that the multi-stage loading task chain cannot be completed within the task deadline, select the degraded resource unit for the corresponding resource unit and load the degraded resource unit first to ensure the minimum quality rendering. S8: After a resource unit or a degraded resource unit completes its upload task, the rendering reference is updated through atomic replacement, so that the rendering pipeline can switch to the resource unit that has completed the upload without interrupting the frame loop. S9: Collect runtime metrics during the loading process, and adaptively adjust at least one of the following based on the runtime metrics: task concurrency depth, number of concurrent task processing threads, upload budget per frame, prediction time range, and number of prediction frames.

2. The method for optimizing the loading speed of three-dimensional scene resources according to claim 1, characterized in that, The resource unit includes: Mesh chunk resource unit, texture page resource unit, material parameter block resource unit, animation clip resource unit, collider or bounding body resource unit, shader or pipeline state cache item resource unit; The texture page resource unit includes texture pages at different resolution levels; and for each type of resource unit, a resource type identifier and a quality level identifier are recorded to determine the key resource set and select degraded resource units.

3. The method for optimizing the loading speed of three-dimensional scene resources according to claim 2, characterized in that, When constructing the resource-dependent directed acyclic graph, the following steps are included: Generate a resource unit identifier for each resource unit and record the mapping relationship between the resource unit identifier and the resource storage location; Dependency edges are established according to the rule that the parent resource unit references the child resource unit, so that the material parameter block resource unit depends on the texture page resource unit it references, and the render object resource unit depends on the mesh block resource unit and the material parameter block resource unit it references. The resource-dependent directed acyclic graph is topologically sorted to obtain a topological sequence, and the in-degree information, direct predecessor set, and direct successor set of each resource unit are stored. During dispatch execution, only the tasks corresponding to resource units with an in-degree of zero and whose budget is satisfied are added to the ready queue.

4. The method for optimizing the loading speed of three-dimensional scene resources according to claim 3, characterized in that, The multi-stage loading task chain includes: Verification tasks are used to perform integrity checks on the acquired resource data. The deserialization task is used to parse resource data into data structures that the engine can use; Format conversion tasks are used to convert texture data or mesh data into target formats supported by the graphics processing unit. Pipeline warm-up task is used to generate or load shader variant information and pipeline state cache items corresponding to resource units before the upload task; Record the stage type identifier and the location of intermediate output for each stage task, so that the output of the processing task can be directly used as the input for the upload task.

5. The method for optimizing the loading speed of three-dimensional scene resources according to claim 4, characterized in that, The spatial index is obtained by partitioning the scene space, which is done using a quadtree partition, an octree partition, or a voxel partition. A mapping table is established between spatial unit identifiers and resource unit lists for each spatial unit, wherein the resource unit lists include at least a basic quality resource unit list and a high quality resource unit list; The basic quality resource unit is used to meet the minimum quality presentation, and the high-quality resource unit is used to gradually replace the basic quality resource unit when the budget allows.

6. The method for optimizing the loading speed of three-dimensional scene resources according to claim 5, characterized in that, Determining the prediction field of view includes: Set the prediction time range and the number of prediction frames, and extrapolate the camera state based on the current camera pose, camera linear velocity and camera angular velocity to obtain the predicted camera state sequence; The predicted field of view is obtained by calculating the view frustum based on the predicted camera state sequence; When the amount of change in user interaction input is detected to exceed a preset threshold, the prediction time range is shortened or the number of prediction frames is reduced to reduce invalid prefetching caused by prediction errors.

7. The method for optimizing the loading speed of three-dimensional scene resources according to claim 6, characterized in that, Determining the set of key resources includes: Calculate the screen contribution of resource units in the candidate resource subgraph. The screen contribution is determined based on at least two of the following: screen projection area, distance from camera, occlusion ratio, and object importance weight. Resource units whose screen contribution meets a preset threshold are added to the target set, and the target set is supplemented to include resource units that it directly or indirectly depends on. The key resource set is further filtered from the target set to obtain the key resource set, so that the key resource set at least covers the proxy mesh resource units or basic quality texture page resource units required for interactive rendering of the first frame, and covers the material parameter block resource units corresponding to the rendering object.

8. The method for optimizing the loading speed of three-dimensional scene resources according to claim 7, characterized in that, Determining the critical path information and generating the task deadline includes: Based on the topology sequence and the historical or estimated time consumption of resource units, calculate the remaining loading time required to complete the acquisition, processing and uploading tasks for each resource unit. Within the set of critical resources, dependency chains are determined based on rendering dependencies, and the information corresponding to the dependency chain with the longest remaining loading time is used as critical path information. Based on at least one of the following: the predicted time when the resource unit corresponding to the object in the predicted field of view meets the screen contribution threshold, the first frame interactive time limit, the allowable upload volume budget per frame, and the allowable processing time budget per frame, a task deadline is generated for the resource unit in the key resource set, and a preset time margin is added to the task deadline.

9. The method for optimizing the loading speed of three-dimensional scene resources according to claim 8, characterized in that, Determining the dispatch priority and performing cross-stage sorting and dispatch execution includes: The dispatch priority is determined by comparing the task deadline with the remaining loading time, so that tasks with earlier deadlines and longer remaining loading time have higher dispatch priority. Establish an acquisition ready queue, a processing ready queue, and an upload ready queue, and set the corresponding bandwidth budget, processing budget, and upload budget for each queue. Within each scheduling cycle, tasks with higher dispatch priority are dispatched first. When multiple tasks have the same dispatch priority, tasks located on the dependency chain corresponding to the critical path information are dispatched first. When the waiting time of the upload ready queue exceeds the congestion threshold, reduce the processing budget or bandwidth budget to create back pressure; limit the upload amount of each frame within the upload budget so that the frame time jitter of the rendering thread does not exceed the preset jitter threshold.

10. A method for optimizing the loading speed of three-dimensional scene resources according to claim 9, characterized in that, S7-S9 further include: An alternative mapping table is established for each resource unit. The alternative mapping table contains at least the original resource unit identifier, the degraded resource unit identifier, and the quality level information. The degraded resource unit includes at least one of the following: low-resolution layer texture page, low-detail layer mesh block, and simplified material parameter block. When it is predicted that the original resource unit cannot complete the upload task within the task deadline, the degraded resource unit is loaded and enabled for rendering first, while the original resource unit is kept as a high-quality resource unit to be replaced, so as to trigger a gradual replacement when the budget allows. The atomic replacement method includes versioned handle switching or pointer swapping, and performs a resource residency registry consistency check before replacement. The consistency check includes at least confirming that the resource unit identifier to be switched is in a residency state in the resource residency registry, and confirming that the resource unit identifier pointed to by the rendering reference is consistent with the residency resource unit identifier in the resource residency registry. The operational metrics are collected, which include at least two or more of the following: cache hit rate, number of task expirations, upload queue waiting time, and frame time jitter. Based on the operational metrics, at least one of the following is adjusted: prediction time range, prediction frame count, acquisition task concurrency depth, number of concurrent threads for processing tasks, and upload budget per frame.