A method for dynamically loading virtual resources

By comprehensively considering resource dependence and terminal performance, a dynamic virtual resource loading method is developed, which solves the problems of resource loading delay and improper unloading in scenarios where users move quickly and their positioning is unstable, thus achieving more stable virtual resource management and display effects.

CN123114574APending Publication Date: 2026-11-17SHANGHAI HUOYUAN GAME CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611260965.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-19
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing virtual resource loading methods cause resource loading delays, model gaps, missing materials, animation interruptions, and frame rate fluctuations in scenarios involving rapid user movement and unstable positioning. They also fail to effectively manage resource queues and unloading.

Method used

By establishing a virtual resource dynamic loading session, and comprehensively considering resource dependency version, location source version, view frustum rule version, terminal performance budget version, and unloading protection version, a resource dependency closure record, loading queue freshness status, frame budget status, and resource unloading protection status are formed, and the loading and unloading paths are dynamically adjusted.

Benefits of technology

When users are rapidly changing directions, reversing paths, or facing frame budget constraints, avoid resource consumption by expired loading tasks, reduce virtual object display blanks, missing materials, animation interruptions, and frame rate jitter, and optimize resource loading order and unloading management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114574A_ABST
    Figure CN123114574A_ABST
Patent Text Reader

Abstract

This invention discloses a method for dynamically loading virtual resources, belonging to the field of computer resource management technology. The client establishes a dynamic virtual resource loading session, reads versions of resource packages, resource dependencies, scene partitions, location sources, view frustum rules, terminal performance budgets, cache boundaries, and unloading protection, and accesses user pose, location, camera view frustum, terminal performance, resource cache index, and resource reference records. Based on the above data, candidate resource records for loading are formed, and further, resource dependency closure records and local resource availability status are formed. Combining the current pose, location, view frustum, terminal performance, and resource reference records, a loading queue freshness status, frame budget status, and resource unloading protection status are formed. Then, one of the following control paths is executed: continue loading, queue reordering, degraded loading, delayed loading, suspended loading, cancel loading, prohibited unloading, and safe unloading. This method is applicable to virtual resource loading control in AR, VR, and 3D interactive scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer resource management technology, specifically a method for dynamically loading virtual resources. Background Technology

[0002] Dynamic loading of virtual resources is primarily used in mobile games, augmented reality scenes, virtual reality scenes, and 3D interactive display scenarios. During operation, the client needs to load virtual resources such as models, materials, textures, animations, audio, colliders, and interactive state machines in stages according to changes in user position, viewpoint, scene partition, and cache state. Resources are cached or released after leaving the display area to reduce resource consumption during startup and instantaneous loading pressure during runtime.

[0003] In existing implementations, resource loading queues are typically generated based on fixed scene blocks, loading radii, resource priorities, and cache eviction rules. This approach can maintain basic display effects in scenarios where user movement is stable, positioning results are continuous, and resource dependencies are simple. However, in mobile AR, VR, and open 3D scenes, users may experience rapid turns, path reversals, positioning drift, short positioning gaps, and sudden changes in the view frustum within a short period. The partitions, resource groups, and visible ranges corresponding to the original loading queue will become invalid. Continuing to load resources according to the original queue can easily delay the availability of near-field interactive resources.

[0004] Existing dynamic loading methods typically adjust the loading order based solely on distance, resource size, scene block number, and memory limit, lacking joint verification of loading queue freshness, resource dependency closures, current rendering reference state, interaction state machine reference state, and terminal frame budget. This leads to expired loading tasks continuing to occupy network, decoding, and video memory upload resources, while urgently needed near-field resources are delayed in loading. Simultaneously, some resources still referenced by the current frame, animation state machine, or interactive actions may be prematurely unloaded, resulting in model gaps, missing materials, animation interruptions, repeated loading and unloading of the same resource, and short-term frame rate jitter. Therefore, a dynamic virtual resource loading method is needed that can dynamically verify the virtual resource loading queue and unloading conditions as user pose and positioning confidence change. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method for dynamically loading virtual resources, thereby resolving the problems mentioned in the background section.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for dynamically loading virtual resources, executed by a client running a virtual scene application, comprising:

[0007] S1. Establish a virtual resource dynamic loading session, read the resource package version, resource dependency version, scene partition version, positioning source version, view frustum rule version, terminal performance budget version, cache boundary version and unload protection version, and access user pose data, positioning data, camera view frustum data, terminal performance data, resource cache index and resource reference record;

[0008] S2. Based on user pose data, positioning data, camera frustum data, and scene partition version, a candidate resource loading record is formed;

[0009] S3. Based on the candidate loaded resource record, resource dependency version, resource package version and resource cache index, form resource dependency closure record and resource local availability status;

[0010] S4. Based on the candidate loading resource record, current user pose data, current positioning data, current camera frustum data, terminal performance data, and resource reference record, form the loading queue freshness status, frame budget status, and resource unloading protection status.

[0011] S5. Based on the loading queue freshness status, resource dependency closure record, resource local availability status, frame budget status, and resource unloading protection status, execute one of the following control paths: continue loading, queue reordering, degraded loading, delayed loading, suspended loading, cancel loading, prohibit unloading, and safe unloading.

[0012] Furthermore, in S1:

[0013] The virtual resource dynamic loading session registers the application instance number, terminal device identifier, scene number, application version number, local resource directory number, remote resource index number, resource loading cycle, resource unloading cycle, target frame rate, and current image quality level. Each version registers the version number, effective time, applicable terminal type, applicable scene number, and release verification value.

[0014] Furthermore, in S2:

[0015] A location credibility status is formed based on the location source, location update time, location continuity status, and location drift marker. The location credibility status is registered as one of the following: location credibility, location pending verification, and location untrustworthy.

[0016] When the location is untrusted, the client stops generating candidate resource records corresponding to the path's preceding source.

[0017] Furthermore, in S2:

[0018] The candidate loading resource record registers the candidate resource unit number, candidate resource group number, source partition number, candidate source type, candidate trigger time, trigger pose record, trigger frustum record, trigger positioning trust status, resource salience level, and candidate validity period.

[0019] Candidate source types are registered as one of the following: line-of-sight center source, near-field interaction source, edge source awaiting kernel, occlusion removal source, path-front source, or reserved reference source.

[0020] Furthermore, in S3:

[0021] The resource dependency closure record takes the candidate resource group number as the entry point, reads the resource unit number corresponding to the model, material, texture, skeleton, animation clip, animation state machine, audio, collider and interaction configuration according to the resource dependency version, and reads the resource package number, file size boundary, check value and applicable scene number according to the resource package version.

[0022] Furthermore, in S3:

[0023] The local availability status of a resource is determined based on the resource cache index, resource integrity verification results, resource decoding records, and graphics processor upload records, and is registered as one of the following: locally available, requires download, requires verification, requires decoding, requires upload, version mismatch, or resource unavailable.

[0024] Furthermore, in S4:

[0025] The freshness status of the loading queue is formed based on the candidate trigger time, trigger pose record, trigger frustum record, trigger positioning confidence status, current user pose data, current positioning data, current camera frustum data, and candidate validity period, and is registered as one of the following: fresh, pending verification, or expired.

[0026] Furthermore, in S4:

[0027] The frame budget status is determined based on the frame time records of the most recent display frames, resource decoding queue, graphics processor upload queue, available running memory, available video memory, number of network request waiting, and terminal temperature control status, and is registered as one of the following: budget sufficient, budget limited, or budget prohibited.

[0028] Furthermore, in S4:

[0029] The resource unloading protection status is formed based on the list of visible objects in the current frame, the list of visible objects in the previous frame, the animation state machine running record, the interactive hit objects, the audio playback list, and the active collision body list, and is registered as one of the following: unloading prohibited, delayed unloading, or allowed unloading.

[0030] Furthermore, in S5:

[0031] Continue loading path corresponds to fresh, complete closure, and load allowed; queue reordering path corresponds to multiple fresh loading tasks and budget-constrained; degraded loading path corresponds to closure pending review and placeholder resource number; lazy loading path corresponds to pending review and budget-constrained; suspended loading path corresponds to untrusted location and incomplete upload of resources; cancel loading path corresponds to invalid and non-prohibited uninstallation; prohibited uninstallation path corresponds to prohibited uninstallation; safe uninstallation path corresponds to allowed uninstallation and not referenced by fresh loading tasks.

[0032] Compared with the prior art, the present invention provides a method for dynamically loading virtual resources, which has the following beneficial effects:

[0033] 1. After establishing a dynamic virtual resource loading session, this method comprehensively considers resource dependency versions, location source versions, view frustum rule versions, terminal performance budget versions, and unloading protection versions to form resource dependency closure records, local availability status, loading queue freshness status, frame budget status, and resource unloading protection status for candidate loading resources. Based on this, it selects the appropriate path: continue loading, queue reordering, degraded loading, delayed loading, suspended loading, canceled loading, prohibited unloading, and safe unloading. Therefore, in situations such as rapid user redirection, path reversal, short-term location loss, and limited frame budget, it can prevent expired loading tasks from continuing to occupy download, decoding, and graphics processor upload resources, and prevent virtual resources still referenced by the current screen, animation state machine, audio playback, and interactive actions from being prematurely unloaded.

[0034] 2. This method no longer uses a single scene block as the basis for resource loading. Instead, it breaks down models, materials, textures, animation state machines, audio, colliders, and interaction configurations into resource units, and performs loading verification based on resource groups and resource dependency closures. When resource dependencies are incomplete, it does not directly proceed to full loading; when locating pending verification, it does not continue to expand the scope of pre-loading; when frame budget is limited, it prioritizes resources at the view center, near-field interaction resources, and reserved referenced resources; when resource versions are inconsistent, it first performs verification and re-fetches records. Through the above processing, it can reduce virtual object display blank windows, missing materials, animation interruptions, repeated loading and unloading of the same resource, and short-term frame rate jitter caused by resource uploading. Attached Figure Description

[0035] Figure 1 This is a schematic diagram of a method for dynamically loading virtual resources according to the present invention. Detailed Implementation

[0036] 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.

[0037] Example: Figure 1 A method for dynamically loading virtual resources is presented, executed by the client running the virtual scene application, including:

[0038] S1. Establish a virtual resource dynamic loading session, read the resource package version, resource dependency version, scene partition version, positioning source version, view frustum rule version, terminal performance budget version, cache boundary version, and unload protection version, and access user pose data, positioning data, camera view frustum data, terminal performance data, resource cache index, and resource reference records. Specifically:

[0039] Before the virtual scene application enters a runnable scene, the client establishes a virtual resource dynamic loading session. This session is generated by the application instance number, terminal device identifier, scene number, application version number, local resource directory number, and remote resource index number, and the session start time, resource loading cycle, resource unloading cycle, target frame rate, and current image quality level are registered in the client's resource management process.

[0040] The resource package version originates from the resource package manifest generated by the resource building tool during packaging and release. The resource package manifest records the resource package number, effective version, resource unit number, file size limits, file checksum, remote download address, local cache directory, and applicable scenario number. Resource dependency versions originate from the resource reference relationship table exported by the resource building tool. This table records the reference relationships between models, materials, textures, skeletons, animation clips, animation state machines, audio, colliders, and interaction configurations.

[0041] The scene partition version is exported by the virtual scene editing tool during the scene release phase and written into the client-readable partition configuration along with the scene resource package. The partition configuration registers the partition number, partition boundary, adjacent partition relationship, vertical hierarchy, resource group number, and resource salience level, which is used to limit the initial reading range of candidate loaded resources. The positioning source version is generated by the application positioning adaptation configuration, recording at least one positioning source among visual inertial positioning, cloud positioning, spatial anchor point positioning, head-mounted display internal positioning, and character logical position, and registers the effective positioning time boundary, short positioning loss boundary, continuous drift upper limit, and positioning recovery cycle, which are used to form a reliable positioning state.

[0042] The view frustum rule version is generated jointly by the rendering camera configuration and interaction distance configuration, registering the line-of-sight center range, near-field interaction range, edge waiting range, occlusion removal preparation range, and far-field degradation range, used to distinguish between currently visible resources, near-field interaction resources, and waiting resources. The terminal performance budget version is generated from the target terminal model adaptation verification record, registering the target frame rate, frame latency boundary, decoding queue boundary, graphics processor upload queue boundary, low memory margin boundary, low video memory margin boundary, network request concurrency limit, and temperature control limit boundary, used to form the frame budget state and limit resource loading concurrency.

[0043] The cache boundary version originates from the resource caching strategy configuration, registering the resource file retention period, intermediate result retention period, path backtracking resource retention level, and cache cleanup boundaries. The unload protection version originates from the runtime protection configuration shared by the rendering engine, animation engine, audio engine, interaction engine, and physics engine, registering the unload protection scope for current frame visibility, previous frame visibility, animation transition references, interaction hit references, audio playback references, collision detection references, and state machine entry references.

[0044] When the client accesses user pose data, positioning data, camera frustum data, terminal performance data, resource cache index, and resource reference record, the user pose data comes from at least one of the following: camera node, inertial measurement unit, head-mounted display attitude sensor, mobile terminal gyroscope, and role control record. The positioning data comes from the positioning access process. The current camera frustum data comes from the rendering engine camera node. The terminal performance data comes from the rendering frame callback, resource decoding queue, graphics processor upload queue, operating system memory interface, graphics interface video memory budget record, and network request process. The resource cache index comes from the local cache directory scan result and resource integrity verification result. The resource reference record comes from the current frame rendering list, animation state machine running record, audio playback list, interactive hit object list, and physical collider list.

[0045] In this implementation, the resource loading cycle is between 100 and 200 milliseconds, and the resource unloading cycle is between 300 and 1 second. The specific values ​​are registered by the terminal performance budget version, cache boundary version, and unloading protection version. The values ​​are based on continuous roaming tests, fast turning tests, path backtracking tests, weak network request tests, and temperature control frequency reduction tests. The verification criteria are that the resource idle window period, the number of times the frame time exceeds the boundary, the number of times the resource is repeatedly downloaded, and the number of times it is mistakenly unloaded all fall into the project acceptance record.

[0046] When establishing a virtual resource dynamic loading session, the client performs integrity verification on each version record. If any version record is missing, the client does not enable the loading, candidate, budget, or unloading control scope corresponding to that version. When a resource package version is missing, only resources that have passed verification in the basic resource package are retained; when a resource dependency version is missing, remote extended resources are not loaded, and the formation of complete resource dependency closure records is stopped; when a location source version is missing, a path precursor source is not formed based on the location result; when a view frustum rule version is missing, only resources corresponding to objects visible in the current frame and near-field interaction objects are retained; when a terminal performance budget version is missing, the client switches to the lowest image quality level and performs resource loading according to the lowest concurrency; when an unloading protection version is missing, resources are actively unloaded during the pause period and only released when the virtual scene exits or the session ends.

[0047] S2. Based on user pose data, positioning data, camera frustum data, and scene partition version, a candidate resource loading record is generated, specifically as follows:

[0048] In the virtual resource dynamic loading session, the client reads user pose data, positioning data, camera frustum data, and scene partition versions, and forms a candidate resource loading record. User pose data originates from the current camera node and pose input records, registering the position, orientation, camera height, and pose changes in the virtual scene coordinates. Position data originates from the positioning access process, registering the positioning source, positioning update time, positioning continuity status, positioning drift markers, and positioning reliability status. Camera frustum data originates from the rendering engine camera node and occlusion culling records, registering the near clipping boundary, far clipping boundary, horizontal field of view, vertical field of view, camera forward direction, camera upward direction, and frustum coverage partition. Based on the above records and the partition boundaries, adjacent partitions, and resource group numbers in the scene partition versions, the client organizes the virtual resources that can enter the candidate range within the current period.

[0049] The client first reads the valid time boundary and continuous drift limit registered in the location source version, and registers the location result as one of the following: location trustworthy, location pending verification, or location untrustworthy. Location trustworthy corresponds to the location source existing in the location source version, the location update time not exceeding the valid time boundary, no continuous drift markers registered in adjacent location results, and the location partition being consistent with the partition where the camera is located.

[0050] If the location source has been registered by the location source version, but the location update time reaches the short missing boundary, the single drift marker has not yet reached the continuous drift limit, or the difference between the cloud location partition and the local inertial location partition still falls within the range of the pending partition, the client will register the location trust status as location pending verification. If at least one of the following exists: the location source has not been registered by the location source version, the location update time exceeds the valid time boundary, or the continuous drift marker reaches the continuous drift limit, the client will register the location trust status as location untrusted.

[0051] After completing the location trust status registration, the client reads the partition number, adjacent partition number, and vertical hierarchy marker corresponding to the current camera position from the scene partition version, and registers the source of resources covered by the current camera's view frustum in conjunction with the view frustum rule version. Resources located within the view frustum center range are registered as view center sources; resources within the near-field interaction range and with interaction configuration, collider, and triggerable object numbers are registered as near-field interaction sources; resources located within the view frustum edge waiting kernel range are registered as edge waiting kernel sources; resources with occlusion release preparation markers in the occlusion culling record are registered as occlusion release sources; resources within the adjacent partition corresponding to the current pose change direction are registered as path preceding sources; resources that have been referenced by at least one of the following: current frame rendering, animation state machine, audio playback, interaction hit, and physical collider are registered as reserved reference sources.

[0052] The source of the gaze center is formed by the resource group covered by the current view frustum center range; the source of near-field interaction is formed by the resource group with interaction configuration files, collider files and triggerable object numbers within the near-field interaction range; the source of edge waiting kernel is formed by the resource group that is in the edge waiting kernel range of the view frustum and may enter the gaze center range in the next resource loading cycle; the source of occlusion removal is formed by the resource group that is occluded in the occlusion culling record but has an occlusion removal preparation mark; the source of path precedence is formed by the adjacent partition resource group corresponding to the current pose change direction; the source of retained reference is formed by the resource group that has been referenced in the current frame rendering list, animation state machine running record, audio playback list, interaction hit object list and physical collider list.

[0053] The candidate loading resource record registers the candidate resource unit number, candidate resource group number, source partition number, candidate source type, candidate trigger time, trigger pose record, trigger view frustum record, trigger positioning trust status, resource salience level, current local status of the resource, and candidate validity period.

[0054] The candidate resource unit number and candidate resource group number are derived from the common index of the resource package version and the scene partition version. The source partition number is derived from the current view frustum coverage partition, the adjacent partition, and the reserved reference object partition. The candidate trigger time is recorded using the client session clock. The trigger pose record and the trigger view frustum record are based on the camera node and view frustum coverage record within the same resource loading cycle.

[0055] The candidate validity period is derived from the view frustum rule version and the positioning source version. The candidate validity period corresponding to the dwell state is longer than that of the fast movement state, and the candidate validity period corresponding to the reliable positioning is longer than that of the positioning pending verification state. If the positioning is unreliable, the client does not register the path preceding source and the far-field degradation source, but only registers and retains the reference source, the view center source within the currently loaded partition, and the near-field interaction source.

[0056] If either the horizontal or vertical field of view is missing from the camera's view frustum data, the client reads the application's basic camera configuration. If the basic camera configuration is still missing, the view frustum coverage partition is registered as a view frustum pending kernel, and the candidate resource loading record is limited to currently visible objects and near-field interactive objects.

[0057] If the candidate resource group list is missing in the scene partition version, the client registers a record of missing partition resource index and prohibits writing the partition resource into the candidate loading resource record. The candidate loading resource record formed through this step is only used as input for subsequent resource dependency closure and loading queue freshness verification, and does not directly trigger the complete loading action.

[0058] S3. Based on the candidate loaded resource record, resource dependency version, resource package version, and resource cache index, form a resource dependency closure record and the local availability status of the resource, specifically:

[0059] After the client generates a candidate resource loading record, it uses the candidate resource loading record, resource dependency version, resource package version, and resource cache index to form a resource dependency closure record and the local availability status of the resource. The resource dependency closure record uses the candidate resource group number as the entry point, reads the resource reference relationship table corresponding to the candidate resource group number in the resource dependency version, and reads the resource unit number corresponding to the model, material, texture, skeleton, animation clip, animation state machine, audio, collider, and interaction configuration along the reference hierarchy registered in the resource reference relationship table.

[0060] Model resources read model hierarchy files, mesh files, and bone files; material resources read material parameter files and referenced texture numbers; texture resources read the registered items in base color maps, normal maps, metallic maps, and transparency maps; animation resources read animation state machine entry points, state nodes, transition nodes, and animation clip numbers; audio resources read audio file numbers, playback trigger markers, and spatial audio configurations; collider resources read collider file numbers, trigger object numbers, and physics hierarchy markers; interaction configuration resources read interaction entry point numbers, hit object numbers, interaction action numbers, and interaction feedback resource numbers.

[0061] The client registers the candidate resource group's entry resources, directly referenced resources, and continued referenced resources as a dependency resource list, removing duplicate registrations by resource unit number while retaining the number of duplicate references and the source of the reference. Each resource unit in the dependency resource list reads the resource package number, file size boundary, checksum, resource layer level, applicable scenario number, and remote download address registered in the resource package version.

[0062] Resource dependency closures are registered in one of the following states: complete, pending verification, or abnormal. A complete closure corresponds to the existence of resource unit numbers, resource package numbers, and verification values ​​in the core model, core material, state machine entry, interaction configuration entry, and collider entry in the resource dependency list, and there are no unregistered circular references in the resource dependency versions.

[0063] If at least one of the following dependencies—non-core decorative textures, backup sound effects, or background replacement models—is missing, and the resource dependency version has registered at least one of the following: placeholder resource number, low-precision resource number, or lazy loading allowed flag, the resource dependency closure status is registered as "closure pending kernel". If at least one of the following is missing: core model, core material, state machine entry point, interaction configuration entry point, or collider entry point; the resource dependency version has an unregistered circular reference; or the resource package version and the resource dependency version point to different resource unit numbers, the resource dependency closure status is registered as "closure exception".

[0064] The local availability status of a resource is determined based on the resource cache index, resource integrity verification results, resource decoding records, and graphics processor upload records. It is registered as one of the following: locally available, requires download, requires verification, requires decoding, requires upload, version mismatch, or resource unavailable. Local availability corresponds to the existence of the resource file in the local cache directory, the file verification value matching the resource package version, the decoding record being complete, the graphics processor upload record being complete, and the resource package version matching the current virtual resource dynamic loading session.

[0065] The following scenarios require downloading resource files that do not exist in the corresponding local cache directory, but for which the resource package version has a remote download address and verification value. Alternatively, it requires verifying that the corresponding local cache directory contains resource files but lacks integrity verification records. Finally, it requires decoding resource files that have passed verification but have not generated resource objects that the rendering engine can accept.

[0066] The uploaded resource must be decoded but the graphics processor is not registered. Upload complete. Version mismatch: The version of the resource file in the local cache directory is inconsistent with the current resource package version. Resource unavailable: This corresponds to at least one of the following: missing resource file, missing remote download address, missing checksum, or mismatched applicable scenario number.

[0067] When a resource's local availability status shows a version inconsistency, the client does not reuse the old version of the resource, but first registers a version re-verification record; if the verification fails, the old resource file is deleted and a resource retrieval record is registered. When a resource is unavailable, the client does not write the resource unit into the full loading path, but instead writes it as a resource missing exception record, and reads the placeholder resource number registered for the resource's dependent version.

[0068] When a placeholder resource number is missing, the client registers the corresponding candidate resource group as a resource pending verification, stops writing the candidate resource group into the continue loading path, and retains the resource unit number, candidate resource group number, missing dependencies, and resource dependency version number. When the freshness status, frame budget status, and resource unloading protection status of the subsequent loading queue are established, the client reads the aforementioned dependency list, local resource level, and exception records to prevent candidate resources with incomplete dependencies from directly entering the full loading process.

[0069] S4. Based on the candidate resource loading records, current user pose data, current location data, current camera frustum data, terminal performance data, and resource reference records, the loading queue freshness status, frame budget status, and resource unloading protection status are formed, specifically as follows:

[0070] After the candidate resource loading record is formed, the client rereads the user pose, positioning result, camera frustum, terminal performance, and resource reference status within the current resource loading cycle, and verifies them against the pose record, frustum record, and positioning reliability status saved when the candidate was triggered. The verification result is used to register the loading queue freshness status, frame budget status, and resource unloading protection status, serving as input for subsequent judgments on continuing loading, queue reordering, delayed loading, canceling loading, and unloading control.

[0071] The current user pose data and the triggered pose record in the candidate loaded resource record use the same positioning source version and the same virtual scene coordinate caliber. The current positioning data and the triggered positioning confidence state use the same effective positioning time boundary and continuous drift limit. The current camera view frustum data and the triggered view frustum record use the same view frustum rule version. The terminal performance data comes from the frame time records of the most recent multiple display frames, the resource decoding queue, the graphics processor upload queue, the amount of available running memory, the amount of available video memory, the number of network request waiting, and the terminal temperature control status. The resource reference records come from the list of visible objects in the current frame, the list of visible objects in the previous frame, the current state and transition state of the animation state machine, the interactive hit objects, the audio playback list, and the list of active colliders.

[0072] The freshness status of the loading queue is registered as one of the following: fresh, pending verification, or expired. Fresh corresponds to the candidate resource still being within at least one of the current line-of-sight center range, near-field interaction range, or occlusion removal preparation range, the current location credibility status is not lower than the trigger location credibility status, and the candidate trigger time has not exceeded the candidate validity period.

[0073] If the candidate resource corresponding to the pending kernel is out of the center of the line of sight but is still at the edge of the pending kernel range, or if the location trust status changes from location trust to location pending kernel, or if the candidate resource is still one of the following after the user quickly turns around: near-field interaction resource, retained reference resource, and path return retained resource.

[0074] The failure indicates that the candidate resource has left the current view frustum coverage area and near-field interaction range, the candidate validity period has expired, there is no reserved reference source in the current resource reference record, and the resource salience level is not a path return reserved resource. The frame budget status is registered as one of the following: budget sufficient, budget limited, and budget prohibited.

[0075] The client reads the frame latency records of the most recent display frames, the resource decoding queue, the graphics processor upload queue, available RAM, available VRAM, the number of network requests waiting, and the terminal temperature control status to form a frame budget status. If the frame latency of the most recent display frames has not reached the frame latency boundary registered in the terminal performance budget version, the resource decoding queue and graphics processor upload queue have not reached their respective queue boundaries, the available RAM and available VRAM are both above the low margin boundary, and the number of network requests waiting has not reached the concurrency limit, the frame budget status is registered as budget sufficient.

[0076] When at least one of the following conditions is met—frame latency, resource decoding queue, graphics processor upload queue, available RAM, available video memory, and number of waiting network requests—reaches a restricted boundary but has not yet reached a prohibited boundary, the frame budget status is registered as budget-restricted. When at least one of the following conditions is met—frame latency continuously reaching a prohibited boundary, available video memory falling below a safety reserve boundary, graphics processor upload queue continuously reaching a congestion boundary, or terminal temperature control entering performance degradation limits—the frame budget status is registered as budget-prohibited.

[0077] The resource unloading protection status is registered as one of the following: prohibited unloading, delayed unloading, and allowed unloading. The resource unit that is prohibited from unloading appears in at least one of the following: the list of visible objects in the current frame, the list of visible objects in the previous frame, the current state of the animation state machine, the animation transition state, the interactive hit object, the audio being played, the active collider, and the resource dependency closure of the current view center.

[0078] The resource unit corresponding to delayed unloading does not appear in the visible object list of the current frame, but appears in the visible object list of the most recent unloading cycles, or the resource unit belongs to the path turnaround reserved resource, or the resource unit is a near-field safety resource during the location waiting period.

[0079] Unloading is permitted for resource units that are not referenced by the current rendering, animation, audio, interaction, collision, and fresh load tasks, and are not registered as safe-reserved resources in the unloading protection version. If a resource reference record is missing, the client must not register the resource unloading protection status as allowed to unload; it can only register it as delayed unloading and wait for re-reading in the next unloading cycle.

[0080] If terminal performance data is missing, the client registers the frame budget status as budget-limited and uses the resource loading concurrency limit corresponding to the lowest image quality level. If current location data is missing but the location trust status is triggered as trustworthy, the loading queue freshness status is not directly rewritten to invalid, but is first registered as pending verification, waiting for the short missing boundary registered by the location source version to expire. This step uses pose, location, view frustum, performance, and reference records within the same cycle to form an executable loading and unloading pre-state for each candidate resource, avoiding direct loading actions based solely on distance, partition number, and cache availability.

[0081] S5. Based on the load queue freshness status, resource dependency closure record, resource local availability status, frame budget status, and resource unloading protection status, execute one of the following control paths: continue loading, queue reordering, degraded loading, delayed loading, suspended loading, cancel loading, disable unloading, and safe unloading. Specifically:

[0082] Based on the loading queue freshness status, resource dependency closure record, resource local availability status, frame budget status, and resource unloading protection status, the client executes one of the following control paths: continue loading, queue reordering, degraded loading, delayed loading, suspended loading, cancel loading, prohibit unloading, and safe unloading.

[0083] Continue loading path applies when the loading queue freshness status is fresh, the resource dependency closure status is complete, the resource local availability status is not unavailable, and the frame budget status is sufficient, or the frame budget status is limited but the candidate resource belongs to one of the following: eye-center resource, near-field interaction resource, and reserved reference resource.

[0084] The loading path continues, performing resource download, integrity verification, resource decoding, graphics processor upload, and virtual object binding according to the local availability of resources. The download action reads the resource package number, resource unit number, remote download address, and verification value. The integrity verification action reads the verification value registered in the local resource file and resource package version. The resource decoding action reads the verified resource file and generates a resource object that the rendering engine can accept. The graphics processor upload action reads the decoded resource object and writes it to the graphics processor resource pool. The virtual object binding action reads the resource dependency closure record and scene object record, and binds the model, material, texture, animation, audio, collider, and interaction configuration to the corresponding virtual object.

[0085] Queue reordering is suitable for situations where multiple fresh tasks coexist and the frame budget state is budget-constrained. The client organizes the execution order based on candidate source type, resource salience level, resource local availability status, dependency closure state, and candidate trigger time. Sources at the center of the line of sight take priority over near-field interaction sources, near-field interaction sources take priority over edge-waiting sources, edge-waiting sources take priority over occlusion removal sources, occlusion removal sources take priority over path-preceding sources, and path-preceding sources take priority over low-priority decoration resources. Interaction state machine entry resources take priority over ordinary center of the line of sight resources. Center of the line of sight resources that have been downloaded and verified take priority over resources of the same level that have not yet started downloading.

[0086] The downgraded loading path is applicable when the resource dependency closure status is "closure pending core", the frame budget status is "budget limited" or the location trust status is "location pending core", and the resource dependency version is registered with a placeholder resource number or a low-precision resource number. The client loads the placeholder resource or the low-precision resource, registers the placeholder display status, and retains the complete resource group candidate loading record.

[0087] The lazy loading path applies when the loading queue freshness status is "pending core," the frame budget status is "budget-limited," and the resource's significance level is not among the center-of-view or near-field interactive resources. The client pauses new downloads and new GPU uploads, retains completed download files, verification results, and decoding results, and records the recovery conditions and maximum retention period. The suspended loading path applies when the location trust status is "location untrusted," and the resource has entered any stage of downloading, verification, or decoding but has not yet been uploaded to the GPU. The client stops expanding the candidate resource range, retains received file fragments and completed verification records, and waits for location recovery conditions to be met.

[0088] Cancel loading path applies when the loading queue freshness status is invalid, the resource is not currently referenced, and the resource unloading protection status is not prohibited from unloading. The client stops downloading, decoding, and uploading actions that have not yet started, and transfers resources that have completed verification but have not been bound to objects to low-priority cache records.

[0089] The "Disable Uninstallation Path" option applies when the resource uninstallation protection status is "Disable Uninstallation". The client retains the resource binding relationships, graphics processor resources, decoding objects, and cache files, and registers the reason for disabling uninstallation. The reason for disabling uninstallation is read from the current frame visibility, previous frame visibility, animation transition reference, interaction hit reference, audio playback reference, collision detection reference, and state machine entry reference.

[0090] The safe unload path applies when the resource unload protection status is allowed to be unloaded, the resource is not referenced by a freshly loaded task, the resource is not within the lazy loading recovery cycle, and the cache boundary version allows release. The client executes the following steps in the order of unbinding virtual objects, releasing graphics processor resources, releasing decoding objects, processing cache files, and updating resource cache indexes.

[0091] When any path fails, the client registers the failed resource unit number, the failed action, the failed time, the failed source, and the recovery action; if the download fails, it enters the re-fetch record; if the verification fails, it enters the resource file deletion and re-fetch record; if the decoding fails, it enters the placeholder loading path; if the graphics processor upload fails, it enters the frame budget review path; and if the binding fails, it enters the resource dependency review path.

[0092] After the control path is executed, the client writes the candidate loaded resource record, resource dependency closure record, resource local availability status, load queue freshness status, frame budget status, resource unloading protection status, and path execution record to the session log as input for the next resource loading cycle and the next resource unloading cycle.

[0093] The trigger boundaries, retention periods, re-fetch limits, and safety waiting periods of the above paths are all derived from the resource package version, terminal performance budget version, cache boundary version, and offload protection version. The design is based on the continuous roaming, fast turning, path reversal, weak network recovery, animation transition, and interactive action verification records of the target terminal. The verification criteria are the near-field resource empty window period, the number of times the same resource is downloaded repeatedly, the number of times it is accidentally offloaded, the number of times the frame time exceeds the boundary, and the number of times the graphics processor upload is congested.

[0094] In a specific data embodiment, the virtual scene application is an AR exhibition hall navigation application. The client runs on AR glasses, the target frame rate is registered as 60 frames per second, and the terminal performance budget version registers the single-frame display control caliber as 16.6ms, the resource loading cycle as 100ms, and the resource unloading cycle as 500ms. The above values ​​are derived from the continuous roaming test, rapid turning test, path reversal test, and weak network resource request test records of the AR glasses in the exhibition hall A project. The verification caliber is that the near-field resource idle period within 10 minutes of continuous operation does not exceed the upper limit registered in the project acceptance record, and the number of repeated resource downloads and the number of erroneous unloadings both fall within the project acceptance record.

[0095] The scene-partitioned version of the AR exhibition hall navigation application registers the exhibition hall entrance area, main exhibition area, interactive exhibit area, and immersive demonstration area as partitions A1, A2, A3, and A4, respectively. Exhibit A is located in partition A2, corresponding to resource group number RA. Resource group RA registers 18MB of model resources, 1.2MB of material resources, 32MB of texture resources, 0.8MB of animation state machine resources, 5MB of narration audio resources, and 0.4MB of collider resources. The above resource sizes are derived from the resource package list generated by the resource building tool during the packaging stage of the exhibition hall A project, used to illustrate the composition and loading order of the resource groups in this implementation.

[0096] In the resource dependency version, exhibit A model resources reference material resources, material resources reference texture resources, animation state machine resources reference the open animation clip and the looped animation clip, and interactive configuration resources reference collider resources and narration audio resources. The resource package version synchronously registers each resource unit number, resource package number, file size boundary, checksum, and remote download address, enabling the client to read dependent resources item by item and verify whether each resource unit meets the loading conditions when forming a resource dependency closure record.

[0097] The positioning source version registers the effective positioning time boundary as 300ms, the short positioning gap boundary as 600ms, and the continuous drift limit as 3 resource loading cycles. These values ​​are derived from static positioning tests, walking positioning tests, and occlusion recovery tests conducted by the AR glasses in Hall A, and are not fixed parameters across halls or terminals. When the current user enters partition A2, the positioning update time does not exceed 300ms, and both the visual inertial positioning result and the cloud positioning result point to partition A2. The client registers the positioning trustworthy status as trustworthy. The view frustum rule version registers the current camera view frustum center area as the center of vision range, the resource group with interactive configurations and colliders within 2m in front of the camera as the near-field interaction range, and the view frustum edge area as the edge kernel range.

[0098] During the 8th resource loading cycle, Exhibit A is within the center of view, and the Exhibit A button is within the near-field interaction range. The client generates a candidate resource loading record for Exhibit A. The resource cache index shows that Exhibit A's model and texture resources are in a state of needing to be downloaded, the audio narration resource is in a state of needing to be verified, the collider resource is in a state of needing to be decoded, and the low-precision placeholder model is in a state of local availability. The resource dependency closure record shows that Exhibit A's core model, core materials, textures, animation state machine, audio narration, and collider all have resource unit numbers, resource package numbers, and verification values. The client registers the resource dependency closure status as complete.

[0099] Within the same cycle, terminal performance data indicates that the frame latency of the most recent display frames did not exceed 16.6ms, and the video memory margin is higher than the low margin boundary registered in the terminal performance budget version. The client registers the frame budget status as sufficient and executes the continue loading path for exhibit A. By the 12th resource loading cycle, the user's head orientation change reaches the fast turning boundary registered in the view frustum rule version. The current center of vision switches from exhibit A to exhibit C. Exhibit A leaves the center of vision but remains at the edge of the near-field interaction range. At this time, the texture resources of exhibit A have been downloaded and verified but have not yet been uploaded to the graphics processor. The model resources and material resources of exhibit C enter the new candidate loading resource record, which the client uses to provide input for subsequent loading queue freshness verification and queue reordering.

[0100] The terminal performance data shows that the last three display frames took more than 18ms to load, indicating that the graphics processor upload queue has reached the limited boundary registered in the terminal performance budget version, and the frame budget status is now registered as budget-limited. The client registers the loading queue freshness status of exhibit A's texture resources as pending, keeps exhibit A's collider resources as fresh, and registers exhibit C's model and material resources as fresh. It then performs queue reordering, prioritizing exhibit C's view center resources over exhibit A's pending texture resources.

[0101] During the 15th resource loading cycle, a short gap occurred in cloud positioning, with the positioning update time exceeding 300ms but not exceeding 600ms. Visual inertial positioning remained continuous, and the positioning reliability status was registered as "positioning pending verification." The high-precision texture of Exhibit C had not yet been fully downloaded, but the low-precision placeholder model was available locally. The resource dependency version registration allowed low-precision resources to participate in placeholder display. The client executed a downgraded loading path, first binding the low-precision placeholder model and low-resolution texture of Exhibit C, and retaining the candidate loading record for the complete resource group of Exhibit C.

[0102] Cloud positioning resumed in the 18th resource loading cycle, and the positioning update time fell back within 300ms. After the frame budget status was restored to sufficient budget, the client continued to load the complete resource group of exhibit C and replaced the low-precision placeholder resources with the complete resource group at the rendering frame boundary.

[0103] In the 22nd resource loading cycle, the user returns to exhibit A, and exhibit A re-enters the center of the field of vision. The cache boundary version records the retention period for intermediate resources that have been downloaded and verified but not yet uploaded as 3 seconds, a value derived from the test records of the tour guide A path reversal.

[0104] The texture resources for exhibit A are still within the intermediate resource retention period. The resource package version has not changed, and the verification value is consistent. The client changes the freshness status of the loading queue for exhibit A's texture resources from pending to fresh, and directly executes decoding and graphics processor upload without re-initiating a download request.

[0105] After the animation state machine of Exhibit A enters the animation transition state and the audio explanation enters the playback state, the resource reference record registers the animation transition reference and the audio playback reference, and the uninstallation protection state of Exhibit A related resources is registered as prohibited from uninstallation; after the animation transition ends, the audio playback ends and it is not referenced again within a continuous uninstallation safety waiting period, the client then transfers the related resources to the delayed uninstallation and safe uninstallation paths.

[0106] The above data is only used to illustrate the formation process of each state and control path in this embodiment. In actual application, it is jointly registered by the corresponding terminal model adaptation record, resource construction record, virtual scene trial operation record, fast turnaround test record, path backtracking test record, weak network request test record and project acceptance record, and is not used as a general fixed value across terminals, applications and virtual scenes.

[0107] It should be noted that this invention can be deployed on the device itself to realize embedded applications, or it can run on a PC or other terminal with a user interface, thereby meeting various hardware environments and usage requirements.

[0108] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented in software, the above embodiments can be implemented in whole or in part by a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions of the embodiments of this application are implemented in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted wirelessly or wiredly from one website, computer, server, or data center to another website, computer, server, or data center. Wired methods include optical fiber, twisted pair, coaxial cable, etc. Wireless methods include infrared, microwave, etc. Available media include any available media that can be accessed by a computer or data storage devices such as servers and data centers that contain one or more sets of available media. Available media can be magnetic media (floppy disks, hard disks, magnetic tapes), optical media (DVDs), or semiconductor media. Semiconductor media can be solid-state drives.

[0109] The above content is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A virtual resource dynamic loading method, characterized in that, Executed by the client running the virtual scene application, including: S1. Establish a virtual resource dynamic loading session, read the resource package version, resource dependency version, scene partition version, positioning source version, view frustum rule version, terminal performance budget version, cache boundary version and unload protection version, and access user pose data, positioning data, camera view frustum data, terminal performance data, resource cache index and resource reference record; S2. Based on user pose data, positioning data, camera frustum data, and scene partition version, a candidate resource loading record is formed; S3. Based on the candidate loaded resource record, resource dependency version, resource package version and resource cache index, form resource dependency closure record and resource local availability status; S4. Based on the candidate loading resource record, current user pose data, current positioning data, current camera frustum data, terminal performance data, and resource reference record, form the loading queue freshness status, frame budget status, and resource unloading protection status. S5. Based on the loading queue freshness status, resource dependency closure record, resource local availability status, frame budget status, and resource unloading protection status, execute one of the following control paths: continue loading, queue reordering, degraded loading, delayed loading, suspended loading, cancel loading, prohibit unloading, and safe unloading.

2. The method for dynamically loading virtual resources according to claim 1, characterized in that, In S1: The virtual resource dynamic loading session registers the application instance number, terminal device identifier, scene number, application version number, local resource directory number, remote resource index number, resource loading cycle, resource unloading cycle, target frame rate, and current image quality level. Each version registers the version number, effective time, applicable terminal type, applicable scene number, and release verification value.

3. The method for dynamically loading virtual resources according to claim 1, characterized in that, In S2: A location credibility status is formed based on the location source, location update time, location continuity status, and location drift marker. The location credibility status is registered as one of the following: location credibility, location pending verification, and location untrustworthy. When the location is untrusted, the client stops generating candidate resource records corresponding to the path's preceding source.

4. The method for dynamically loading virtual resources according to claim 1, characterized in that, In S2: The candidate loading resource record registers the candidate resource unit number, candidate resource group number, source partition number, candidate source type, candidate trigger time, trigger pose record, trigger frustum record, trigger positioning trust status, resource salience level, and candidate validity period. Candidate source types are registered as one of the following: line-of-sight center source, near-field interaction source, edge source awaiting kernel, occlusion removal source, path-front source, or reserved reference source.

5. The method for dynamically loading virtual resources according to claim 1, characterized in that, In S3: The resource dependency closure record takes the candidate resource group number as the entry point, reads the resource unit number corresponding to the model, material, texture, skeleton, animation clip, animation state machine, audio, collider and interaction configuration according to the resource dependency version, and reads the resource package number, file size boundary, check value and applicable scene number according to the resource package version.

6. The method for dynamically loading virtual resources according to claim 1, characterized in that, In S3: The local availability status of a resource is determined based on the resource cache index, resource integrity verification results, resource decoding records, and graphics processor upload records, and is registered as one of the following: locally available, requires download, requires verification, requires decoding, requires upload, version mismatch, or resource unavailable.

7. The method for dynamically loading virtual resources according to claim 1, characterized in that, In S4: The freshness status of the loading queue is formed based on the candidate trigger time, trigger pose record, trigger frustum record, trigger positioning confidence status, current user pose data, current positioning data, current camera frustum data, and candidate validity period, and is registered as one of the following: fresh, pending verification, or expired.

8. The method for dynamically loading virtual resources according to claim 1, characterized in that, In S4: The frame budget status is determined based on the frame time records of the most recent display frames, resource decoding queue, graphics processor upload queue, available running memory, available video memory, number of network request waiting, and terminal temperature control status, and is registered as one of the following: budget sufficient, budget limited, or budget prohibited.

9. A method for dynamically loading virtual resources according to claim 1, characterized in that, In S4: The resource unloading protection status is formed based on the list of visible objects in the current frame, the list of visible objects in the previous frame, the animation state machine running record, the interactive hit objects, the audio playback list, and the active collision body list, and is registered as one of the following: unloading prohibited, delayed unloading, or allowed unloading.

10. A method for dynamically loading virtual resources according to claim 1, characterized in that, In S5: Continue loading path corresponds to fresh, complete closure, and load allowed; queue reordering path corresponds to multiple fresh loading tasks and budget-constrained; degraded loading path corresponds to closure pending verification and placeholder resource number; lazy loading path corresponds to pending verification and budget-constrained; suspended loading path corresponds to untrusted location and incomplete uploaded resources; Unloading paths are disabled and uninstallation is not prohibited; Uninstallation is prohibited for certain paths; uninstallation is permitted for certain paths that are not referenced by fresh loading tasks.