A game scene resource dynamic loading and scheduling processing method

By dynamically calculating the spatial demand intensity and reuse half-life of resources, and combining system memory and bandwidth, asynchronous I/O queues are used to optimize resource scheduling, solving the problems of unstable resource scheduling and uneven memory utilization in traditional solutions, and achieving a smoother gaming experience.

CN123157145APending Publication Date: 2026-11-24QINGDAO YUBO NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611525467.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-29
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Traditional game engine scene resource scheduling schemes cause rigidity in resource loading and unloading when players move frequently, resulting in game screen stuttering. They cannot adapt to the memory and bandwidth of different devices, and their assessment of critical resources is inaccurate, leading to memory overflow or false resource killing.

Method used

By acquiring the bounding box features of the player's viewpoint position and scene resources, the spatial demand intensity is calculated. The reuse half-life of resources is dynamically determined in combination with system memory and bandwidth. A capacity crowding penalty factor is introduced, and an asynchronous I/O queue mechanism is used for the discretized loading and release of resources.

Benefits of technology

It improves game smoothness, avoids redundant resource loading, optimizes memory utilization, ensures stable loading of critical resources, and enhances the gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123157145A_ABST
    Figure CN123157145A_ABST
Patent Text Reader

Abstract

This invention discloses a dynamic loading and scheduling method for game scene resources, belonging to the field of game engine resource management technology. The method acquires features such as player viewpoint and speed to calculate the effective distance, thus determining the spatial demand intensity immune to singularities. It dynamically determines the reuse half-life of scene resources by combining available system memory and total read bandwidth. Using the demand snapshot at the time of resource detachment as a base, it calculates the remaining reuse value through a time decay model. Subsequently, it calculates the residency weight integral of the capacity crowding penalty factor by combining the resource's own data volume and total memory. Finally, based on dual thresholds for loading and unloading and hysteresis control, it combines asynchronous queues to perform dynamic loading or instantaneous memory release. This invention requires no empirical parameters, can adapt to different hardware environments, effectively eliminates resource scheduling jitter, protects small core assets, and significantly improves the smoothness of seamless game loading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of game engine resource management technology, and in particular relates to a method for dynamic loading and scheduling of game scene resources. Background Technology

[0002] In modern 3D game development, especially in seamless large-map or open-world games, the dynamic loading and unloading (streaming) of scene resources is a core underlying technology that determines the smoothness of game operation and the visual performance. With the exponential growth in the scale of game scenes and the improvement in asset precision, the physical memory and storage read bandwidth of devices face enormous challenges.

[0003] Traditional game engine scene resource scheduling schemes mostly employ fixed timeout eviction strategies based on rigid spatial boundaries (such as trigger boxes or distance thresholds) and least recently used (LRU) mechanisms. These traditional techniques often suffer from the following drawbacks: When players repeatedly move or frequently turn around at the edge of two areas, the system will rigidly trigger the repeated loading and destruction of the same large batch of resources, causing severe congestion in the underlying I / O queue and resulting in severe lag in the game screen.

[0004] Traditional solutions typically rely on experience-based timeout parameters manually calibrated by developers. They cannot adaptively adjust based on the available physical memory and actual read bandwidth of different devices (such as high-end PCs with large memory and low-end mobile devices with small memory), which can easily lead to memory overflow on low-end models or failure of high-end models to fully utilize memory cache space.

[0005] In traditional coarse-grained memory eviction strategies, small key effects, sound effects, or UI materials are easily treated the same as giant scene models and mistakenly killed when memory is tight, resulting in the loss of key audiovisual feedback.

[0006] Traditional solutions rely solely on absolute distance for judgment, failing to consider the Doppler effect of the player's motion velocity vector. Furthermore, when the player's viewpoint penetrates the interior of the scene model, it can easily trigger mathematical singularities in the evaluation logic, causing partial system crashes or scheduling anomalies. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides a method for dynamically loading and scheduling game scene resources, thus solving the aforementioned problems.

[0008] To achieve the above objectives, the present invention provides the following technical solution: a method for dynamically loading and scheduling game scene resources, comprising: The system obtains the player's viewpoint position and movement speed in the game world, as well as the bounding box feature attributes of the scene resources. Based on the viewpoint position and the bounding box feature attributes, it determines the effective distance and calculates the spatial demand intensity of the scene resources at the current moment. The system obtains the amount of currently available free physical memory data and the total read bandwidth currently allocable to the memory. Combined with the intensity of space demand, the dynamic reuse half-life of the scene resources is dynamically determined. The continuous idle time of the scene resources after being deactivated is obtained. The snapshot value of the space demand intensity at the start of the idle state is used as a dynamic base. Combined with the dynamic reuse half-life, the remaining reuse value of the scene resources after decay is calculated through the time decay model. Based on the reused residual value, the data volume of the scene resources themselves, and the upper limit of the total physical memory allocated by the system, calculate the residency weight integral of the capacity crowding penalty factor. A preset loading integral threshold and unloading integral threshold with a difference are established. Based on the comparison result of the resident weight integral and the two thresholds, the discrete dynamic loading of the scene resources or the instantaneous release of the physical memory handle is performed in combination with the asynchronous I / O queue mechanism.

[0009] Based on the above technical solutions, the present invention also provides the following optional technical solutions: A further technical solution: The step of calculating the spatial demand intensity of the scene resources at the current moment specifically includes: The actual distance between the player's viewpoint and the center of the bounding box of the scene resource is determined. The actual distance is compared with the equivalent radius of the bounding box of the scene resource to obtain an effective distance that is not less than the equivalent radius of the bounding box, so as to prevent the player's viewpoint from entering the interior of the scene resource and causing the function to diverge without bounds. The spatial demand intensity is calculated based on the effective distance, the equivalent radius of the bounding box, and the angle projection between the player's movement speed direction and the direction of the scene resource. The spatial demand intensity is negatively correlated with the effective distance and positively correlated with the equivalent radius of the bounding box; and the spatial demand intensity dynamically increases as the player's movement speed direction approaches the scene resource.

[0010] Further technical solution: In the step of dynamically determining the dynamic reuse half-life of the scene resources: The dynamic reuse half-life is configured to be positively correlated with the amount of currently available free physical memory data and the intensity of space demand, and negatively correlated with the total read bandwidth.

[0011] A further technical solution: The calculation logic of the dynamic reuse half-life includes a basic minimum threshold. The basic minimum threshold is positively correlated with the amount of data of the scene resource itself and negatively correlated with the total read bandwidth, so that the calculated dynamic reuse half-life is always not less than the theoretical time required to fully load the scene resource from the memory to the physical memory.

[0012] Further technical solution: In the step of calculating the reused residual value of the scene resources after decay using the time decay model: The reuse residual value is initially anchored to the snapshot value of the spatial demand intensity, and after entering the idle state, it exhibits a monotonically decreasing trend as the continuous idle time increases; The monotonically decreasing decay rate is controlled by the dynamic reuse half-life, and the decay rate is negatively correlated with the dynamic reuse half-life to ensure a smooth extension of the cache lifecycle of scene resources when hardware resources are sufficient.

[0013] Further technical solution: In the step of calculating the residency weight integral of the capacity crowding penalty factor: The residency weight integral is configured to be positively correlated with the reuse residual value obtained from the aforementioned calculation.

[0014] A further technical solution: The capacity crowding penalty factor is dynamically generated based on the ratio of the scene resource's own data volume to the total physical memory limit; the capacity crowding penalty factor makes the resident weight integral negatively correlated with the ratio, thereby triggering priority downgrade constraints for scene resources that occupy too large a proportion of memory.

[0015] A further technical solution: The step of performing discrete dynamic loading of the scene resources or instantaneous release of the physical memory handle specifically includes: Preset loading integration threshold in the scheduling system With the unloaded points threshold And satisfy ; When the scene resources It is not currently loaded into physical memory, and the calculated residency weight integral satisfies... At that time, the system pushes the loading request for the scenario resource into the asynchronous I / O loading queue. The asynchronous I / O loading queue is dynamically sorted from largest to smallest according to the residency weight of each resource. The underlying I / O thread then loads the resource based on the total read bandwidth. Perform a full data read sequentially; When the scene resources It already exists in physical memory, and its availability increases with continued idle time. The increase in leads to exponential decay, causing the calculated residency weight integral to satisfy ... When this happens, the system immediately releases the scene resources from physical memory. The memory handle occupied is then removed from the resource list.

[0016] This invention provides a method for dynamically loading and scheduling game scene resources, which has the following advantages compared with the prior art: 1. This invention introduces a resource reuse half-life model and a hysteresis dual threshold control mechanism. By establishing an integral difference range between loading and unloading, the system can absorb the state fluctuations caused by players repeatedly turning back or frequently switching perspectives, so that resources are not immediately destroyed after leaving the field of view, but their cache value is slowly decayed according to the hardware availability, which greatly reduces the overhead of invalid repeated I / O reads and greatly improves the smoothness of the seamless open world. 2. The half-life derivation model of this invention deeply couples the real-time idle available memory of the system with the total I / O read bandwidth, and physically locks the lower limit of the half-life to "the absolute time spent reading the resource". This means that on high-end devices, the system will automatically extend the resource residence time to achieve ultimate smoothness, while on low-end devices, it will aggressively reclaim memory to prevent crashes; 3. This invention eliminates the infinite computational singularity collapse problem caused by the player's viewpoint directly penetrating or standing inside the resource by introducing the concept of "effective distance" with the equivalent radius of the bounding box; at the same time, it introduces the player's movement speed vector projection into the spatial demand assessment, enabling the engine to predict in advance whether the player is "rushing towards" or "moving away from" a certain area, achieving advanced and accurate preloading that goes beyond simple distance judgment. 4. This invention introduces a capacity-consuming penalty factor into the final retention weight score. This factor has almost no weight reduction for resources that occupy a very small proportion of system memory (such as key effects and skill sound effects), while imposing a significant downgrade penalty on redundant large models that occupy a large amount of memory. This ensures that when memory is extremely tight, the engine prioritizes kicking out large, idle background buildings, firmly preserving high-frequency, small core assets, and guaranteeing the integrity of the core combat or interactive experience of the game. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the process of the present invention.

[0018] Figure 2 This is a logic diagram for hysteresis dual threshold control and resource scheduling. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0020] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.

[0021] Please see Figure 1 as well as Figure 2 The present invention provides a method for dynamically loading and scheduling game scene resources, comprising: Obtain the player's viewpoint position vector and movement speed vector in the game world, as well as the bounding box center position vector and equivalent radius of the scene resources, calculate the effective distance, and calculate the spatial demand intensity of the scene resources at the current moment accordingly. The system obtains the amount of currently available free physical memory data and the total read bandwidth currently allocable to the memory. Combined with the intensity of space demand, the dynamic reuse half-life of the scene resources is dynamically calculated. The continuous idle time of the scene resources is obtained, and the snapshot value of the spatial demand intensity at the start of the idle state is used as the decay basis dynamic base. Combined with the dynamic reuse half-life, the reuse residual value of the scene resources after time decay is calculated through the isotope decay model. Based on the reused residual value, the data volume of the scene resources themselves, and the upper limit of the total physical memory allocated by the system, calculate the residency weight integral of the capacity crowding penalty factor. A preset loading integral threshold and unloading integral threshold with a difference are established. Based on the comparison result between the resident weight integral and the two thresholds, the discrete dynamic loading of the scene resources or the instantaneous release of the physical memory handle is performed in combination with the asynchronous I / O queue mechanism.

[0022] The following example will provide a more detailed explanation of the above technical solution: Imagine a large open-world game where user A is moving through a vast plain area containing multiple scene resources, such as distant mountain resources, nearby forest resources, and some small but important special effects resources.

[0023] First, the system continuously acquires user A's viewpoint position vector and movement speed vector, as well as the bounding box center position vector and equivalent radius of these scene resources. For example, when user A moves quickly towards the forest resource, the system calculates the effective distance between user A and the forest resource, and combines this with user A's movement speed to calculate the higher spatial demand intensity of the forest resource. Meanwhile, the spatial demand intensity of the mountain resource behind user A will be lower.

[0024] Subsequently, the system obtains the amount of currently available free physical memory and the total read bandwidth that can be allocated to the memory. Combining this with the previously calculated space demand intensity, the system dynamically calculates the dynamic reuse half-life of resources for each scenario. For example, if the current system has sufficient memory and high read bandwidth, the dynamic reuse half-life of forest resources will be calculated to be longer, indicating that the resource can reside in memory for a longer period. Conversely, if system resources are scarce, the half-life will be shortened.

[0025] Next, the system tracks the continuous idle time of each scene resource. When a forest resource is continuously monitored and loaded by user A, if user A moves to another area, the forest resource will enter an idle state. At this time, the system records a snapshot of the spatial demand intensity when the resource enters the idle state as the dynamic base value for decay. Combining its continuous idle time and dynamic reuse half-life, the system calculates the current reuse residual value of the forest resource using an isotope decay model. As the idle time increases, this reuse residual value gradually decays.

[0026] Based on this, the system calculates the residency weight score by combining the remaining reuse value of each scenario resource, its own data volume, and the system's total allocated physical memory limit. For example, a large forest resource, even with a high remaining reuse value, will have its residency weight score relatively lower due to the large data volume, affected by the capacity crowding penalty factor, to avoid excessive memory consumption. Conversely, a small resource with high remaining reuse value (e.g., a key effect that user A is about to trigger) may maintain a high residency weight score.

[0027] Finally, the system presets loading and unloading point thresholds. Based on the comparison between the residency weight score of each scene resource and these two thresholds, the system performs corresponding loading or releasing operations using an asynchronous I / O queue mechanism. For example, when the residency weight score of a forest resource is higher than the loading point threshold, its loading request is pushed into the asynchronous I / O loading queue. This queue is sorted according to the resource's residency weight score, ensuring that higher-priority resources are loaded first. When user A is away from the forest resource for an extended period, causing its residency weight score to decay below the unloading point threshold, the system immediately releases the physical memory handle occupied by that resource. In this way, the system can intelligently schedule the loading and unloading of scene resources based on the player's real-time behavior, hardware status, and resource characteristics, avoiding the scheduling jitter and resource mis-killing problems caused by rigid thresholds in traditional solutions.

[0028] First, addressing the "scheduling jitter" problem in traditional solutions, this embodiment introduces dynamic reuse half-life and reuse residual value calculation based on isotope decay models, making resource value assessment no longer a simple binary judgment. For example, when user A repeatedly moves at the edge of a forest resource, the resource's residency weight integral will fluctuate smoothly, rather than the frequent loading and unloading triggered by a rigid distance threshold in traditional solutions, thus effectively avoiding I / O queue congestion and game lag.

[0029] Secondly, addressing the deficiency of traditional solutions in "lacking hardware state awareness," this embodiment incorporates the amount of currently available free physical memory and the total allocatable read bandwidth of the memory into the calculation of the dynamic reuse half-life. For example, when system memory is scarce or read bandwidth is low, the dynamic reuse half-life of resources is shortened accordingly, prompting the system to more actively release infrequently used resources and prevent memory overflow. Conversely, when hardware resources are abundant, the half-life is extended, allowing more resources to reside in memory and fully utilizing hardware performance. This contrasts sharply with the fixed timeout parameters set manually in traditional solutions.

[0030] Furthermore, addressing the issue of traditional solutions being "extremely unfriendly to small but core resources," this embodiment introduces a capacity crowding-out penalty factor and combines it with the residual value of reuse to calculate the retention weight score. For example, a small but crucial special effects resource, due to its high space requirement intensity and residual value of reuse, will have its retention weight score remain high, and will not be easily eliminated even if its data volume is small. This avoids the situation where critical small resources are mistakenly eliminated in traditional coarse-grained elimination strategies.

[0031] Finally, addressing the limitation of traditional solutions' "single-dimensional spatial evaluation," this embodiment considers not only the distance between the player's viewpoint and scene resources but also the player's movement speed vector when calculating spatial demand intensity. For example, when user A rapidly approaches an area, even if the distance is still far, their spatial demand intensity will increase earlier due to the speed factor, allowing the system to predict and load the required resources sooner. Furthermore, by calculating the effective distance, this embodiment also avoids the mathematical singularity problem that may occur when the player's viewpoint enters the interior of scene resources, ensuring the stability of the evaluation logic.

[0032] Preferably, the step of calculating the spatial demand intensity of the scene resources at the current moment specifically includes: The actual distance between the player's viewpoint and the center of the bounding box of the scene resource is determined. The actual distance is compared with the equivalent radius of the bounding box of the scene resource to obtain an effective distance that is not less than the equivalent radius of the bounding box, so as to prevent the player's viewpoint from entering the interior of the scene resource and causing the function to diverge without bounds. The spatial demand intensity is calculated based on the effective distance, the equivalent radius of the bounding box, and the angle projection between the player's movement speed direction and the direction of the scene resource. The spatial demand intensity is negatively correlated with the effective distance and positively correlated with the bounding box equivalent radius; and the spatial demand intensity dynamically increases as the player's movement speed direction approaches the scene resource. Specifically, the step of calculating the spatial demand intensity of the scene resources at the current moment includes: First, calculate the current time. Player's viewpoint pointing to scene resources Distance vector of the center :

[0033] in, For scene resources The bounding box center position vector, in meters; The distance vector represents the player's viewpoint position in the game world, in meters; The unit is meters; Subsequently, to prevent the function from diverging unbounded due to the player's viewpoint entering the scene resources, the effective distance was calculated. :

[0034] in, The distance vector The modulus length; For the scene resources The bounding box equivalent radius, in meters; the effective distance The unit is meters; Finally, calculate the spatial demand intensity of resources in this scenario at the current moment. :

[0035] in, This is the player's current movement speed vector, in meters per second. The maximum possible movement speed of the player, set by the system, in meters per second.

[0036] Distance vector Indicates from the player's perspective Pointing to scene resources enclosing box center The direction and distance of the vector quantify the relative spatial relationship between the player and specific scene resources, serving as the basis for assessing resource space requirements. This vector can be used to define scene resources... bounding box center position vector Subtract the player's viewpoint position vector in the game world To obtain it. For example, in a three-dimensional coordinate system, if the player's viewpoint coordinates are... The coordinates of the scene resource center are Then the distance vector is Another approach is for the system to maintain a global coordinate system and obtain the coordinates of the player and all scene resources in real time, calculating the coordinates directly through the coordinate differences.

[0037] Effective distance The calculations are designed to solve the problem when the player's viewpoint enters the scene resources. When inside the bounding box, the magnitude of the distance vector This value may approach zero, leading to a situation where the denominator in the subsequent spatial demand intensity calculation formula is zero or close to zero, causing the function to diverge unbounded. This can be addressed by adjusting the magnitude of the distance vector. With scene resources The bounding box equivalent radius By comparing the two values ​​and taking the larger one, the effective distance is ensured. Never less than This ensures that the calculation results remain stable and meaningful even when the player is inside the resource. For example, conditional statements can be used; if... ,but ,otherwise Alternatively, you can directly use the `max` function from the math library to perform the calculation.

[0038] Space demand intensity Scene resources A quantitative indicator of the degree to which a player is currently or will soon be receiving attention from players. It takes into account both the distance between the player and the resource and the player's movement trend. This intensity value is calculated using a composite formula, which includes a decay factor based on effective distance. and a player movement speed vector With distance vector Direction factor of dot product The attenuation factor ensures that the closer the distance, the higher the demand intensity; the direction factor further adjusts the intensity: when a player moves towards a resource (positive dot product), the demand intensity increases, and vice versa (negative dot product), the demand intensity decreases. For example, the system can obtain the player's movement speed vector in real time. And preset a maximum possible movement speed scalar. Then, these parameters are substituted into the formula for calculation. Another approach is to utilize the physics or motion module provided by the game engine to directly obtain the player's instantaneous velocity and direction information, convert it into vector form, and then perform formula calculations.

[0039] The solution in this application employs a series of precise mathematical calculations to accurately assess the spatial demand intensity of game scene resources at the current moment. First, the system obtains the distance vector by calculating the difference between the player's viewpoint position vector and the center position vector of the scene resource bounding box. This vector intuitively reflects the relative positional relationship between the player and the resource. Subsequently, to avoid situations where the calculation results are abnormal or meaningless due to the player being too close when entering the scene resource, the system introduced an effective distance. The concept of distance vectors is used. By comparing the magnitude of the distance vector with the equivalent radius of the scene resources and taking the larger value, the stability and rationality of the calculation are ensured. Even if the player is inside the resources, a meaningful minimum distance can be obtained. Finally, based on the distance vector and the effective distance, the player's current movement speed vector is combined... and the system's maximum possible movement speed scalar The spatial demand intensity of scene resources is calculated using a comprehensive formula. This formula not only considers the distance between the player and the resource but also cleverly incorporates the player's movement direction and speed trend. When a player moves towards the resource, their spatial demand intensity is moderately increased; conversely, when the player moves away from the resource, the demand intensity decreases. This comprehensive calculation method allows the spatial demand intensity to more accurately reflect the player's potential attention to resources in a specific scene, thus providing a solid and dynamically changing input foundation for subsequent calculations of dynamic reuse half-life, reuse residual value, and residency weight integral. In this way, the proposed solution effectively solves the problems of inaccurate, unstable, or insufficiently considered player movement trends in traditional methods, significantly improving the accuracy and foresight of dynamic resource loading and scheduling decisions in game scenes.

[0040] As a specific implementation method, the aforementioned spatial demand intensity calculation can be performed periodically within the rendering or logic update loop of the game engine. For example, at each frame or at fixed time intervals, the system first obtains the current player's viewpoint position vector from the game world. and movement speed vector At the same time, for each potential scene resource The system will query its predefined bounding box center position vector. and equivalent radius Next, using this data, the direction from the player's viewpoint to the scene resource center is calculated. Distance vector Subsequently, to avoid potential calculation errors when players enter the resource encirclement box, the system will calculate the effective distance. Finally, substitute all the calculated vectors and scalars into the space demand intensity formula. This allows us to obtain the spatial demand intensity of resources in this scenario at the current moment. Among them, the player's maximum possible movement speed scalar. This could be a constant preset during game design, such as the character's maximum running speed. These calculation results are then passed to the subsequent resource scheduling module for dynamically reusing parameters such as half-life.

[0041] It should be noted that, in order to ensure efficient computation during game execution, the aforementioned scene resources... bounding box center position vector and equivalent radius Instead of being calculated in real time during game execution, the system directly queries its predefined bounding box center position vector and equivalent radius. Specifically, during the asset import and baking phase of the game engine, the system performs offline calibration and embeds it as metadata in the resource descriptor; when 3D scene resources are imported into the engine, the system automatically traverses all vertex coordinates of the resource mesh. Extract the maximum and minimum values ​​of all vertices on the three orthogonal coordinate axes X, Y, and Z. , , , , , This is used to construct the axial bounding box of the resource, and the center position vector of the bounding box is calculated using the geometric center formula:

[0042] Subsequently, the obtained center position vector Let the center of the sphere be the scalar value of the farthest distance from it to the eight vertices of the bounding box, and define it as the equivalent radius:

[0043] During actual game execution, when the resource is registered to the scene management tree, the scheduling system directly reads the descriptor file. and The field provides the basic input for subsequent calculations of space requirement intensity with extremely low time complexity. Through the above technical solution, this application provides a more accurate, stable, and forward-looking method for calculating the spatial demand intensity of game scene resources. By introducing the concept of effective distance, this method effectively avoids the unbounded divergence problem that may occur when the player's viewpoint enters the interior of scene resources, ensuring the stability of the system at any player's position. Simultaneously, by incorporating the player's movement speed vector and direction into the spatial demand intensity calculation, the system can not only perceive the player's current position but also predict the player's future movement trends, thereby determining the player's potential demand for specific scene resources earlier and more accurately. This refined spatial demand intensity calculation provides high-quality input for subsequent calculations of resource dynamic reuse half-life, reuse residual value, and residency weight integral, significantly improving the accuracy and response speed of dynamic loading and scheduling decisions for game scene resources. Ultimately, this optimizes the player's gaming experience, reduces unnecessary resource loading and unloading operations, and improves the utilization efficiency of system resources.

[0044] Preferably, in the step of dynamically determining the dynamic reuse half-life of the scene resources: The dynamic reuse half-life is configured to be positively correlated with the amount of currently available free physical memory data and the intensity of space demand, and negatively correlated with the total read bandwidth; Furthermore, the calculation logic of the dynamic reuse half-life includes a basic minimum threshold. The basic minimum threshold is positively correlated with the amount of data of the scene resource itself and negatively correlated with the total read bandwidth, so that the calculated dynamic reuse half-life is always not less than the theoretical time required to fully load the scene resource from the memory to the physical memory. Specifically, the step of dynamically calculating the dynamic reuse half-life of the scene resources is calculated using the following formula:

[0045] in, For the current moment Scene resources The dynamic reuse half-life, in seconds; This represents the amount of currently available free physical memory in the system, in bytes. The total available read bandwidth for the memory, in bytes per second; Intensity of space demand; For scene resources The base data size is measured in bytes. This formula ensures that the lower limit of the half-life is always greater than or equal to the absolute physical time required to load the scene resources from memory to physical memory using the total read bandwidth.

[0046] The dynamic reuse half-life refers to the length of time a scene resource is considered "valuable" and worth keeping in memory within the system. It is not a fixed value but changes dynamically based on the real-time state of the system and the characteristics of the resource itself. This half-life can be understood as the time required for the resource's value to decay to half its original value; its length directly affects the resource's residency priority and duration in memory. For example, when system resources are abundant or resource demand is high, the half-life may be longer, allowing the resource to remain in memory for a longer period; conversely, it may be shorter. The amount of currently available free physical memory refers to the total amount of unoccupied physical memory that the operating system or game engine can allocate to loading scene resources at the current moment. This reflects the real-time supply of system memory resources. This data can be obtained from APIs provided by the operating system or statistically reported by the game engine's internal memory manager. The total available read bandwidth of the memory refers to the maximum transfer rate that the system storage device can use to read scene resource data at the current moment. This reflects the real-time throughput capability of the I / O system. This bandwidth can be a preset system upper limit or a real-time value that is dynamically monitored and adjusted based on the current I / O load. For example, it can be obtained by monitoring the I / O performance metrics of the disk controller or file system. The basic data size of the scene resource itself refers to the original data storage space occupied by a single scene resource on the storage medium. This value is usually determined when the resource is packaged or imported and stored as the resource's metadata. For example, a high-precision 3D model may have a large data size, while a simple texture map has a smaller data size. The above formula is used to calculate the dynamic reuse half-life, which combines system memory availability, I / O bandwidth, the space requirement intensity of the scene resource, and the data size of the resource itself. The first term of the formula considers the impact of available system memory and I / O bandwidth on the half-life and is proportional to the space requirement intensity, meaning that resources with higher requirements will have a longer half-life when memory and bandwidth are sufficient. The second term of the formula ensures a lower limit for the half-life, which is to include at least the minimum physical time required to load the resource from memory to physical memory, preventing the resource from being frequently loaded and unloaded due to an excessively short half-life.

[0047] The solution in this application introduces the amount of currently available free physical memory data in the system. and the total read bandwidth currently available for memory. And combined with the spatial demand intensity calculated above and scene resources Its own basic data size This is used to dynamically determine the appropriate "living" time of resources in memory. Specifically, the formula... The design enables dynamic reuse of the half-life. Not only related to the spatial importance of resources It is positively correlated with the current memory availability of the system. Proportional to I / O bandwidth Inversely proportional. This means that when system memory is ample or I / O bandwidth is high, resources can have a longer half-life, thus residing in memory for longer and reducing the overhead of repeated loading. Conversely, when system resources are scarce, the half-life will shorten accordingly, prompting the system to more actively unload less urgent resources. Furthermore, the formula... This design ensures a lower bound on the half-life, meaning that the half-life of any resource is at least equal to the minimum physical time required to fully load it from memory into physical memory. This design avoids situations where the calculated half-life is lower than the actual loading time, thus preventing invalid operations where resources are immediately deemed to need to be unloaded after loading due to excessively short half-lives, guaranteeing the physical feasibility and efficiency of resource scheduling decisions. In this way, the proposed solution closely integrates pure spatial importance assessment with the actual resource supply capacity of the system, enabling subsequent resource value decay and residency weight integral calculations to be performed under physical constraints that better reflect the actual operating environment, thereby achieving more intelligent and efficient dynamic resource loading and scheduling.

[0048] The following concrete example illustrates how the calculation of the dynamic reuse half-life can be performed: Assume that at a certain moment... The amount of free physical memory currently available in the system. The total read bandwidth currently available for the memory is 2GB. The speed is 500MB / s. This applies to a specific scene resource. The spatial demand intensity calculated above The value is 0.8, and the resources in this scene are... Its own basic data size It is 100MB. Based on the formula, the resources for this scene can be calculated. Dynamic reuse half-life Approximately 3.4768 seconds. This means that under the current system state, the resources for this scenario... The time required for the value to decay to half is approximately 3.4768 seconds. If the system's available memory decreases, for example... If it becomes 1GB, or the I / O bandwidth is reduced, for example... If it becomes 250MB / s, then the calculated... The half-life will be shortened accordingly, thus prompting the resource to be determined as unloadable more quickly. Conversely, if system resources are plentiful, the half-life will be extended.

[0049] By incorporating the current available free physical memory data and the total allocatable read bandwidth of the memory into the calculation of the dynamic reuse half-life, the decay rate of resource value no longer depends solely on its spatial importance, but is closely linked to the actual resource supply capacity of the system. This solves the system resource bottleneck problem that may result from scheduling based solely on the intensity of spatial demand. Specifically, this solution ensures the dynamic reuse half-life. The lower limit is always greater than or equal to the absolute physical time required to load the scene resources from memory to physical memory using the total read bandwidth. This avoids invalid operations caused by frequent loading and unloading of resources due to excessively short half-lives, significantly improving the physical feasibility and efficiency of resource scheduling. In this way, the system can more accurately assess the actual residency value of resources, avoiding excessive memory consumption when resources are scarce or frequent loading triggers when I / O is busy. This optimizes the dynamic loading and scheduling of game scene resources, improves memory utilization and I / O efficiency, and ultimately provides players with a smoother, lag-free gaming experience.

[0050] Preferably, in the step of calculating the reused residual value of the scene resources after decay using a time decay model: The reuse residual value is initially anchored to the snapshot value of the spatial demand intensity, and after entering the idle state, it exhibits a monotonically decreasing trend as the continuous idle time increases; The monotonically decreasing decay rate is controlled by the dynamic reuse half-life, and the decay rate is negatively correlated with the dynamic reuse half-life to ensure that the cache life of scene resources is smoothly extended when hardware resources are sufficient. Specifically, the step of calculating the remaining reuse value of the scene resources after time decay using the isotope decay model is specifically calculated using the following formula:

[0051] in, For the current moment Scene resources Reusable residual value after time decay; For scene resources Snapshot value of space demand intensity at the start of entering the idle state; For the scene resources The duration of idle time not directly invoked, in seconds; The half-life is used for dynamic reuse; the calculation uses the snapshot value to anchor the decay start point, preventing the spatiotemporal double decay penalty caused by the synchronous expansion of the spatial distance variable over time.

[0052] The isotope decay model is a mathematical model describing the exponential decay of matter or energy over time. Its core principle is that the decay rate is proportional to the current quantity and determined by a fixed half-life parameter. In resource management, this model can be abstractly applied to describe the process of resource value or importance decreasing over time. For example, it can be used to assess the freshness of cached data or analyze the decay of user behavior patterns. The reused residual value... This is intended to represent the potential value or priority of scene resources after time decay, indicating their potential reuse in the future. It serves as an important basis for subsequent scheduling decisions (such as loading or unloading), ensuring the system prioritizes resources with high reuse potential. The spatial demand intensity snapshot value... As the initial value anchor point when a resource enters an idle state, and as a benchmark for subsequent decay calculations, it can record the real-time space demand intensity value of a resource at the instant it transitions from an active state to an inactive state (i.e., begins to idle), or set a condition for a resource to be marked as "idle," and immediately capture and store its current value when that condition is met. Value. The continuous idle time. This indicates how long a scene resource has remained unused since its last direct access or call. This can be achieved by maintaining a timestamp in the system to record the last access time for each resource. When calculations are needed... In this case, the timestamp can be subtracted from the current time, or a timer can be maintained for each resource, starting when the resource enters an idle state and resetting when the resource is used again. The dynamic reuse half-life is mentioned. The half-life determines the rate of resource value decay; a longer half-life results in slower decay, while a shorter half-life leads to faster decay. This dynamic nature allows the decay process to adapt to system resource conditions and the resource's own characteristics. This calculation uses the snapshot value to anchor the decay starting point, preventing the spatiotemporal double decay penalty caused by the synchronous expansion of spatial distance variables over time. By using the snapshot value of spatial demand intensity when the resource enters an idle state as the decay basis, it avoids the possibility that the spatial demand intensity (based on the player's viewpoint distance) might further decrease during resource idle periods, thus preventing a "double penalty" on value. This ensures that decay is based solely on the time dimension, rather than the superposition effect of time and space dimensions.

[0053] The proposed solution quantifies the residual value of scene resources by introducing an isotope decay model. Specifically, when a scene resource enters an idle state, the system captures a snapshot of its spatial demand intensity at that moment. This is used as the starting point for the resource's value decay. Subsequently, the system will continuously track the resource's continuous idle time. Simultaneously, by combining the amount of currently available free physical memory data in the system, the total read bandwidth currently allocable to the memory, and the spatial demand intensity of resources in this scenario, the dynamic reuse half-life of resources in this scenario is dynamically calculated. Finally, using an isotope decay model, the snapshot value was... As the decay starting point, with dynamic reuse half-life The decay rate parameter is used for the duration of idle time. Perform exponential decay calculations to determine the remaining reuse value of resources in this scenario at the current moment. This mechanism solves the problem of potential spatiotemporal decay penalties that may occur in traditional methods. It avoids the dual negative impacts of reduced spatial demand due to player absence and temporal decay due to prolonged idle time. By anchoring the decay start point, it ensures that resource value decay is based solely on its idle time, and the decay rate is flexibly adjusted by a dynamic half-life, making resource value assessment more accurate and reasonable.

[0054] As a specific implementation method, suppose there is a scene resource A, and its space demand intensity snapshot value is obtained when a player leaves its vicinity and enters an idle state. It was recorded as 0.8. The system dynamically calculates its reuse half-life based on the currently available memory, I / O bandwidth, and the characteristics of resource A. The time limit is 60 seconds. If resource A remains idle... = 120 seconds, then its reuse residual value Will be through formula Perform the calculation. Here, 120 seconds is two half-lives, therefore the value decays to one-quarter of the initial value, i.e. This calculation result This will serve as an important basis for subsequent judgments on whether the resource needs to remain or be uninstalled.

[0055] By employing an isotopic decay model and using a snapshot of the spatial demand intensity at the start of the idle state of scene resources as the decay basis, this application effectively avoids the spatiotemporal double decay penalty on resource value caused by the synchronous expansion of spatial distance variables over time. Combined with dynamic reuse half-life, this method can more accurately and reasonably assess the remaining reuse value of scene resources that have not been directly invoked for a long time, thereby providing a more accurate basis for subsequent resource loading and unloading decisions, optimizing memory resource utilization efficiency and game experience smoothness.

[0056] Preferably, in the step of calculating the residency weight integral that introduces the capacity crowding penalty factor: The residency weight integral is configured to be positively correlated with the reuse residual value obtained from the aforementioned calculation; Furthermore, the capacity crowding penalty factor is dynamically generated based on the ratio of the scene resource's own data volume to the total physical memory limit; the capacity crowding penalty factor makes the resident weight integral negatively correlated with the ratio, thereby triggering priority downgrade constraints for scene resources that occupy too large a memory ratio. Specifically, the step of calculating the residency weight integral that introduces the capacity crowding penalty factor is calculated using the following formula:

[0057] in, For scene resources The residency weight score obtained from the assessment; To reuse surplus value; The size of the basic data volume; The maximum total physical memory allocated by the system to scene resources, in bytes; This constitutes a capacity crowding penalty factor, used to downgrade the priority of resources in scenarios that occupy too much memory.

[0058] Residency Weighting It is a comprehensive evaluation metric used to quantify scenario resources. At the present moment Priority of resources residing in physical memory. The concept is to prioritize scene resources. The potential reuse value is weighed against its actual memory footprint cost. This integral serves to provide a more comprehensive basis for memory scheduling decisions, avoiding unreasonable memory allocation due to a single-dimensional evaluation. Besides multiplying the remaining reuse value... In conjunction with a capacity crowding penalty factor, a weighted summation method can also be considered, for example... ,in and This is an adjustable weighting coefficient, or it can be dynamically adjusted according to the resource size using a piecewise function to correct the degree of residual value of reuse. The capacity crowding penalty factor is used to quantify the resources in a given scenario. Its own data volume Maximum physical memory limit of the system The negative impact coefficient of the occupancy ratio is used to downgrade resources that occupy too much physical memory, thus prompting the system to prioritize or retain resources with relatively small memory footprints but high reusability within limited memory resources. Besides using a linear decreasing function... This penalty factor can also be implemented using a nonlinear function, such as an exponential decay function. ,in A configurable decay factor is used to more severely penalize excessively large resources. Additionally, multiple memory usage thresholds can be set to apply different penalties depending on scene resource usage. Data volume When the threshold is exceeded, a fixed penalty coefficient is applied directly, or the penalty is applied to the weighted integral. It directly reduces to a preset minimum value.

[0059] The proposed solution calculates scene resources by introducing a capacity crowding penalty factor. Resident weight integral This optimizes the decision-making mechanism for dynamic loading and scheduling of game scene resources. Specifically, after calculating the scene resources... Reuse of residual value Based on this, the solution further considers the resources of this scenario. Its own basic data size Maximum physical memory limit of the system The occupancy status. This is determined by constructing a capacity crowding penalty factor. This factor can quantify scene resources. The "cost" of memory usage. When scene resources... Data volume The larger it is, the higher its limit in total physical memory. The higher the proportion of [the resource] in [the system], the smaller the penalty factor, thus reducing the impact on the reuse of surplus value. This will result in a greater reduction effect. Ultimately, the surplus value will be reused. Multiplying this by the capacity crowding penalty factor yields the residency weight integral. This calculation method makes the residency weight integral... Not only reflects scene resources The potential reuse value of a resource also inherently includes the cost of its memory usage. Therefore, even if a resource in a certain scenario... Reuse of residual value The data volume is relatively high, but if its own data volume is high... If it is too large, its resident weight integral This will also reduce the priority of memory resources, thus assigning them a lower priority in subsequent loading or unloading decisions. This effectively solves the problem of uneven memory resource allocation and inefficiency that may result from scheduling based solely on the reuse of residual value, ensuring that the system can more intelligently weigh the value and cost of resources under limited memory resources, achieving better memory utilization.

[0060] The following is a concrete example to illustrate this. Assume the system allocates a maximum of total physical memory to scene resources. It is 4GB.

[0061] Consider scenario resource A, and the size of its basic data. The current calculated residual value of reuse is 1GB. It is 0.8. According to the formula, its capacity occupancy penalty factor is... Therefore, the residency weight integral of scene resource A. .

[0062] Next, consider scenario resource B, and the size of its own basic data. The current calculated residual value of reuse is 200MB. It is 0.9. Its capacity crowding penalty factor is Therefore, the residency weight integral of scene resource B. .

[0063] The comparison shows that, although the reuse value of scenario resource A is... Relatively high, but due to its large memory footprint, its resident weight integral... Ultimately, it falls below scenario resource B, even if the reuse residual value of scenario resource B is lower. This is only slightly higher than scene resource A. This indicates that in actual scheduling, the system will prioritize loading or reserving scene resource B because it offers higher reuse value while being more economical in terms of memory usage. The system can utilize the Memory Management Unit (MMU) to precisely manage and monitor the total physical memory limit allocated by the system. And acquire resources for each scene in real time. Basic data size This is to ensure the accurate calculation of the penalty factor.

[0064] By introducing a capacity-occupying penalty factor to calculate the residency weight integral, this application's scheme effectively addresses the problem of large-scale scene resources potentially over-consuming physical memory when resource scheduling is based solely on the reuse residual value. This mechanism downgrades the priority of scene resources occupying an excessive proportion of memory, allowing the system to more precisely balance the potential value of resources with actual memory costs within limited physical memory resources. This not only optimizes the overall memory utilization efficiency, avoiding situations where a few large resources occupy too much memory, causing other important resources to fail to load or frequently unload, but also ensures the rationality of the memory allocation strategy, thereby providing players with a smoother and more stable gaming experience and significantly reducing stuttering and latency caused by improper resource loading and unloading.

[0065] Preferably, the step of performing discrete dynamic loading of the scene resources or instantaneous release of the physical memory handle adopts a hysteresis dual-threshold control mechanism, specifically including: Preset loading integration threshold in the scheduling system With the unloaded points threshold And satisfy ; When the scene resources It is not currently loaded into physical memory, and the calculated residency weight integral satisfies... At that time, the system pushes the loading request for the scenario resource into the asynchronous I / O loading queue. The asynchronous I / O loading queue is dynamically sorted from largest to smallest according to the residency weight of each resource. The underlying I / O thread then loads the resource based on the total read bandwidth. Perform a full data read sequentially; When the scene resources It already exists in physical memory, and its availability increases with continued idle time. The increase in leads to exponential decay, causing the calculated residency weight integral to satisfy ... When this happens, the system immediately releases the scene resources from physical memory. The memory handle occupied is then removed from the resource list.

[0066] Hysteresis dual-threshold control is a control strategy with hysteresis effect. Its core lies in introducing two different thresholds to determine the system's state transitions, rather than a single threshold. Its purpose is to avoid frequent state switching near the critical point, thereby improving system stability and efficiency. For example, a state machine-based implementation can be used, defining states such as "not loaded," "loading," and "loaded," and performing state transitions based on the comparison between the resident weight integral and the two thresholds. Another implementation method is an event-triggered mechanism, which triggers a corresponding loading or unloading event when the resident weight integral crosses a specific threshold. (Loading integral threshold) With the unloaded points threshold These are key parameters of the hysteresis dual-threshold control mechanism, defining the triggering conditions for a resource to transition from "unloaded" to "loaded" and from "loaded" to "unloaded," respectively. A preset difference exists between these two thresholds, i.e. This difference is the basis for achieving the hysteresis effect. These two thresholds can be empirically set based on factors such as game type, hardware configuration, and player experience goals, for example, by determining the optimal values ​​through performance testing and optimization. Alternatively, these thresholds can be dynamically adjusted based on the system's current memory pressure or I / O load. An asynchronous I / O loading queue is a non-blocking I / O operation mechanism that separates resource loading requests from the main thread, allowing independent I / O threads to execute them in the background. This avoids the main thread being blocked while waiting for I / O operations to complete, ensuring smooth operation of the game logic. This queue can use a first-in, first-out (FIFO) structure, but to achieve priority scheduling, it usually combines the characteristics of priority queues. For example, a queue structure based on a linked list or array can be used, along with a sorting algorithm for priority adjustment. Another implementation method is to utilize the asynchronous I / O interface provided by the operating system, submitting the loading request to the kernel, which schedules the I / O operation and notifies the application layer via a callback function upon completion. A mechanism that dynamically sorts resources based on their residency weight scores from largest to smallest is used to optimize the loading order of resources in the asynchronous I / O loading queue, ensuring that resources most important and urgent to the current player experience are loaded first. Through dynamic sorting, the system can flexibly adjust loading priorities based on real-time changes in resource importance. For example, heap sort or quicksort algorithms can be used to periodically or event-triggeredly reorder resources in the queue. Another implementation is to use a priority queue data structure, automatically maintaining the queue's order based on residency weight scores each time a new request is inserted. The underlying I / O thread then loads resources based on the total read bandwidth. Sequentially performing a full data read is the actual unit of work for executing data read operations. Its function is to load resource data from the asynchronous I / O load queue from memory into physical memory. This is done based on the total read bandwidth. Controlling I / O resource usage can effectively manage I / O resource consumption and prevent single or multiple resource loading operations from excessively consuming bandwidth, leading to slower system response. For example, one or more dedicated I / O thread pools can be set up, with each thread responsible for retrieving resources from the queue and performing read operations, and using flow control algorithms (such as the token bucket or leaky bucket algorithms) to limit the total read bandwidth. Another implementation method is to utilize the I / O scheduler provided by the operating system, passing bandwidth limit parameters to the system for unified scheduling at the system level. Instantaneous release of physical memory handles refers to the system immediately reclaiming the physical memory space occupied by scene resources when they are determined to no longer need to reside in memory. Its purpose is to promptly release valuable memory resources for use by other more important resources, thereby improving memory utilization. For example, the corresponding memory block can be released by calling the memory management APIs provided by the operating system (such as `free()` or `VirtualFree()`). Another implementation method is that if the game engine has its own memory pool management mechanism, the memory block can be returned to the memory pool for subsequent rapid allocation.

[0067] It should be noted that the loading integration threshold With the unloaded points threshold This embodiment further provides a method for obtaining benchmarks by combining offline benchmark calibration with runtime adaptive tuning. In the offline calibration phase, a benchmark level containing high-density scene resources is constructed, and an automated robot is used to scalarize the data at the maximum possible movement speed. (The text also mentions empirical settings based on game type, hardware configuration, and player experience goals, but this is not directly related to the previous sentence about benchmarks.) The system repeatedly traverses random paths, using a grid search method to traverse and satisfy... For different parameter pairs, find the optimal set of solutions that ensure peak memory usage is less than 85% and the number of frame drops due to I / O wait is 0, and select the difference. The smallest set of parameters (e.g., calibration) , The system uses these two thresholds as the default baseline threshold. During game execution, the system can also dynamically adjust these thresholds based on current memory pressure or I / O load: when it detects available free physical memory... When the memory usage falls below the safety threshold of 10% of total memory, the system synchronously increases the loading and unloading point thresholds (e.g., by raising the threshold). The load integral threshold is temporarily increased to 0.6 to forcibly release edge resources and reclaim memory; when the asynchronous I / O loading queue task backlog exceeds the thread throughput limit, the system only increases the load integral threshold unilaterally. To expand the hysteresis interval and prevent new loading requests from flooding in, thereby providing a pressure relief buffer for I / O bandwidth, the threshold will then smoothly fall back to the initial baseline value after the queue returns to normal levels.

[0068] This application's solution introduces a hysteresis dual-threshold control mechanism and combines it with asynchronous I / O queue management to intelligently decide on the calculated resident weight integral, thereby achieving discrete dynamic loading of scene resources and instantaneous release of physical memory handles. Specifically, a loading integral threshold is preset in the scheduling system. and unload points threshold ,and Strictly greater than When a scene resource has not yet been loaded into physical memory, but its resident weight integral... Exceeded the loading threshold When a resource is deemed critical to the player's current or upcoming experience, the system pushes its loading request into an asynchronous I / O loading queue. This queue is not a simple first-in, first-out process; instead, it dynamically sorts resources based on their residency weight scores from highest to lowest, ensuring that the highest priority resources receive I / O processing first. Subsequently, a dedicated low-level I / O thread loads the resource according to the total read bandwidth set by the system. Resources are retrieved from the queue in an orderly manner, and a full data read is performed, loading them into physical memory. On the other hand, when a scene resource is already residing in physical memory, but is idle for an extended period due to player viewpoint movement... The increase in its reuse surplus value The exponential decay subsequently leads to its resident weight integral. The value dropped below the unload points threshold. When this happens, the system immediately releases the memory handle occupied by the resource in that scenario from physical memory, completing the resource removal. This dual-threshold design, where loading requires a higher integral and unloading requires a lower integral, creates a "buffer" between the two thresholds, effectively avoiding the "jittering" phenomenon of frequent loading and unloading of resources in critical states. Through the above mechanism, the solution in this application closely integrates the aforementioned calculated quantitative indicators such as space demand intensity, dynamic reuse half-life, reuse residual value, and resident weight integral with the actual resource loading and unloading operations. Resident weight integral The system comprehensively considers the spatial importance of resources, their future reuse potential, and their memory consumption, providing a scientific basis for resource scheduling. The hysteresis dual-threshold control mechanism, based on this, offers a stable and efficient decision-making strategy, ensuring the smoothness of resource scheduling and the stability of system performance. The introduction of asynchronous I / O queues further optimizes the loading process, avoids main thread blocking, and rationally allocates I / O bandwidth according to resource priority, resulting in a smoother gaming experience.

[0069] As a specific implementation, suppose in an open-world game, the player is driving a vehicle at high speed. The system continuously calculates the dwell weight integral of scene resources near the player's viewpoint (such as distant towns, valleys to be passed, and forests already left). Preset loading score threshold The unloading points threshold is 0.7. The value is 0.3. When a player rapidly approaches a town area that has not yet been loaded, the retention weight score of that town scene resource A is... It rose rapidly, for example, reaching 0.8. Due to... The system will immediately push the loading request for resource A into the asynchronous I / O loading queue. If other resource loading requests exist in the queue simultaneously, resource A will be dynamically moved to the front of the queue due to its higher residency weight. Subsequently, the underlying I / O thread will load the resource based on the total read bandwidth. Prioritize and efficiently load the full data of town resource A from storage into physical memory. Meanwhile, the player has already left a forest area, where forest scene resource B has been residing in physical memory for some time and has been idle for an extended period. Gradually increasing. Its reuse surplus value The exponential decay subsequently leads to its resident weight integral. It gradually decreases, for example, from 0.6 to 0.2. Because... The system will immediately release the memory handle occupied by resource B from physical memory, thereby reclaiming memory space. For a village scene resource C located at the edge of the player's current line of sight, its residency weight score... It may remain around 0.4, between and If resource C has already been loaded, it will remain in memory and will not be frequently unloaded due to point fluctuations. If resource C has not been loaded before, it will not be loaded immediately unless its points increase by more than [a certain amount]. This mechanism ensures the stability of resource scheduling and avoids unnecessary I / O operations and memory thrashing.

[0070] Through the above technical solution, this application effectively solves the problem of frequent resource loading and unloading (i.e., "jitter") caused by simple threshold judgment in the dynamic loading and scheduling of game scene resources, as well as the resulting waste of I / O bandwidth and memory bandwidth. This is achieved by introducing a hysteresis dual-threshold control mechanism, namely, setting a loading integral threshold. and unload points threshold and This provides a clear and delayed basis for resource loading and unloading decisions. This allows scene resources to be integrated based on their residency weight. When the value is between two thresholds, it can maintain its current state, avoiding repeated switching near the critical value and significantly reducing unnecessary I / O operations and memory allocation / release overhead. Furthermore, combined with an asynchronous I / O loading queue and a mechanism for dynamic sorting based on resident weights, it ensures that high-priority resources can be loaded promptly and non-blockingly, while the underlying I / O threads operate based on total read bandwidth. Orderly data reading effectively manages system I / O resources. The instantaneous release of physical memory handles when resources are no longer critical ensures timely reclamation of memory resources. This refined scheduling strategy not only improves system resource utilization efficiency but, more importantly, provides players with a smoother, more seamless gaming experience, avoiding stuttering caused by resource loading delays or memory jitter, thereby significantly improving overall game performance and user satisfaction.

[0071] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.

[0072] 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 dynamically loading and scheduling game scene resources, characterized in that, include: The system obtains the player's viewpoint position and movement speed in the game world, as well as the bounding box feature attributes of the scene resources. Based on the viewpoint position and the bounding box feature attributes, it determines the effective distance and calculates the spatial demand intensity of the scene resources at the current moment. The system obtains the amount of currently available free physical memory data and the total read bandwidth currently allocable to the memory. Combined with the intensity of space demand, the dynamic reuse half-life of the scene resources is dynamically determined. The continuous idle time of the scene resources after being deactivated is obtained. The snapshot value of the space demand intensity at the start of the idle state is used as a dynamic base. Combined with the dynamic reuse half-life, the remaining reuse value of the scene resources after decay is calculated through the time decay model. Based on the reused residual value, the data volume of the scene resources themselves, and the upper limit of the total physical memory allocated by the system, calculate the residency weight integral of the capacity crowding penalty factor. A preset loading integral threshold and unloading integral threshold with a difference are established. Based on the comparison result of the resident weight integral and the two thresholds, the discrete dynamic loading of the scene resources or the instantaneous release of the physical memory handle is performed in combination with the asynchronous I / O queue mechanism.

2. The game scene resource dynamic loading and scheduling processing method according to claim 1, characterized in that, The step of calculating the spatial demand intensity of the scene resources at the current moment specifically includes: The actual distance between the player's viewpoint and the center of the bounding box of the scene resource is determined. The actual distance is compared with the equivalent radius of the bounding box of the scene resource to obtain an effective distance that is not less than the equivalent radius of the bounding box, so as to prevent the player's viewpoint from entering the interior of the scene resource and causing the function to diverge without bounds. The spatial demand intensity is calculated based on the effective distance, the equivalent radius of the bounding box, and the angle projection between the player's movement speed direction and the direction of the scene resource. The spatial demand intensity is negatively correlated with the effective distance and positively correlated with the equivalent radius of the bounding box; and the spatial demand intensity dynamically increases as the player's movement speed direction approaches the scene resource.

3. The game scene resource dynamic loading and scheduling processing method according to claim 1, characterized in that, In the step of dynamically determining the dynamic reuse half-life of the scene resources: The dynamic reuse half-life is configured to be positively correlated with the amount of currently available free physical memory data and the intensity of space demand, and negatively correlated with the total read bandwidth.

4. The game scene resource dynamic loading and scheduling processing method according to claim 3, characterized in that, The calculation logic for the dynamic reuse half-life includes a basic minimum threshold. This basic minimum threshold is positively correlated with the amount of data in the scene resource itself and negatively correlated with the total read bandwidth, ensuring that the calculated dynamic reuse half-life is always no less than the theoretical time required to fully load the scene resource from the memory to the physical memory.

5. The method for dynamically loading and scheduling game scene resources according to claim 1, characterized in that, In the step of calculating the reused residual value of the scene resources after decay using the time decay model: The reuse residual value is initially anchored to the snapshot value of the spatial demand intensity, and after entering the idle state, it exhibits a monotonically decreasing trend as the continuous idle time increases; The monotonically decreasing decay rate is controlled by the dynamic reuse half-life, and the decay rate is negatively correlated with the dynamic reuse half-life to ensure a smooth extension of the cache lifecycle of scene resources when hardware resources are sufficient.

6. The method for dynamically loading and scheduling game scene resources according to claim 1, characterized in that, In the step of calculating the residency weight integral that incorporates the capacity crowding penalty factor: The residency weight integral is configured to be positively correlated with the reuse residual value obtained from the aforementioned calculation.

7. The method for dynamically loading and scheduling game scene resources according to claim 6, characterized in that, The capacity crowding penalty factor is dynamically generated based on the ratio of the scene resource's own data volume to the total physical memory limit; the capacity crowding penalty factor makes the resident weight integral negatively correlated with the ratio, thereby triggering priority downgrade constraints for scene resources that occupy too large a proportion of memory.

8. The method for dynamically loading and scheduling game scene resources according to claim 1, characterized in that, The step of performing discrete dynamic loading of the scene resources or instantaneous release of the physical memory handle specifically includes: Preset loading integration threshold in the scheduling system With the unloaded points threshold And satisfy ; When the scene resources It is not currently loaded into physical memory, and the calculated residency weight integral satisfies... At that time, the system pushes the loading request for the scenario resource into the asynchronous I / O loading queue. The asynchronous I / O loading queue is dynamically sorted from largest to smallest according to the residency weight of each resource. The underlying I / O thread then loads the resource based on the total read bandwidth. Perform full data reading sequentially; When the scene resources It already exists in physical memory, and its availability increases with continued idle time. The increase in leads to exponential decay, causing the calculated residency weight integral to satisfy ... When this happens, the system immediately releases the scene resources from physical memory. The memory handle occupied is then removed from the resource list.