Dynamic rendering resource scheduling method and related equipment

By dynamically adjusting resource allocation and memory management strategies, combining the double buffering architecture and behavior prediction model, the timing mismatch and resource waste problems in dynamic rendering are solved, low-latency and efficient resource scheduling are achieved, and user experience and system stability are improved.

CN120295731APending Publication Date: 2025-07-11启朔(深圳)科技有限公司
View PDF 0 Cites 12 Cited by

Patent Information

Application Number
CN202510367380.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In traditional dynamic rendering technology, there are problems such as mismatch between touch events and rendering decisions, waste of resources and picture lag caused by improper video memory management, making it difficult to balance delay, energy efficiency and picture quality.

Method used

By obtaining the timing data of user touch events, using the behavior prediction model to predict resource demand levels, dynamically adjusting the resource allocation strategy and memory management strategy of the graphics processing unit, combining the double buffering architecture and dynamic downsampling filters, optimizing the rendering resolution and frame rate, and using a weighted polling algorithm and memory recovery threshold configuration to reduce latency and resource waste.

Benefits of technology

It significantly reduces touch response delay, memory fragmentation rate and Jank rate, improves GPU utilization and system stability, ensures picture smoothness and energy efficiency ratio, and adapts to different load scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120295731A_ABST
    Figure CN120295731A_ABST
Patent Text Reader

Abstract

The invention discloses a resource scheduling method for dynamic rendering and related equipment, and relates to the technical field of dynamic rendering, and the method comprises the following steps: obtaining time sequence data of a user touch event; based on the time sequence data, predicting a user behavior state through a behavior prediction model, and determining a current resource demand level; dynamically adjusting a resource allocation strategy and a video memory management strategy of the graphic processing unit according to the resource demand level; and executing a rendering task based on the adjusted resource allocation strategy, and performing picture output by adopting a double-buffer architecture so as to reduce delay caused by time sequence mismatch. According to the method and the device, by establishing closed-loop control of a user behavior-resource demand-supply strategy, accurate scheduling and efficient utilization of resources are realized, the problems of time sequence mismatch, resource waste and jamming in the traditional technology are solved, the rendering efficiency and the user experience are improved, and technical support is provided for high-concurrency and low-delay scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of dynamic rendering technology, and in particular, to a resource scheduling method for dynamic rendering and related devices. Background Art

[0002] In the field of dynamic rendering, traditional resource scheduling methods have significant technical bottlenecks. First, the problem of timing mismatch between touch events and rendering decisions is prominent. The average delay from user operation to screen response usually exceeds 80 ms, resulting in a sluggish interaction experience. Second, the video memory management uses a fixed allocation granularity and a static recycling strategy, which easily causes video memory fragmentation and a relatively high resource recycling failure rate, resulting in waste of video memory resources. In addition, the traditional solution uses a hard switching mode when switching rendering levels, directly jumping the resolution or frame rate, resulting in screen breaks and sudden changes in QoS, and the user-perceivable jank rate exceeding 5%. These problems stem from the disconnection between the resource allocation strategy and the dynamic needs of users, and it is difficult to achieve a balance among latency, energy efficiency, and image quality. Therefore, there is an urgent need for a resource scheduling method for dynamic rendering to solve the above-mentioned technical problems. Summary of the Invention

[0003] A series of simplified concepts are introduced in the Summary of the Invention section, which will be further described in detail in the Detailed Description section. The Summary of the Invention section of this application does not mean to attempt to define the key features and essential technical features of the claimed technical solution, nor does it mean to attempt to determine the protection scope of the claimed technical solution.

[0004] In a first aspect, this application provides a resource scheduling method for dynamic rendering. The method includes:

[0005] Obtain the timing data of the user's touch event, where the timing data includes touch coordinates, pressure values, and timestamps;

[0006] Based on the timing data, predict the user's behavior state through a behavior prediction model to determine the current resource demand level;

[0007] According to the resource demand level, dynamically adjust the resource allocation strategy and video memory management strategy of the graphics processing unit. The resource allocation strategy includes the dynamic adaptation of rendering resolution and frame rate, and the video memory management strategy includes the dynamic configuration of video memory allocation granularity and recycling threshold;

[0008] Execute the rendering task based on the adjusted resource allocation strategy and use a double-buffer architecture for screen output to reduce the latency caused by timing mismatch.

[0009] In some embodiments, the behavior prediction model includes:

[0010] Decouple and encode the spatial features and temporal features in the time series data, and enhance the regulatory effect of the pressure value on the historical state through a gating mechanism. Among them, the spatial features include the touch coordinates and the normalized data of the pressure value, and the temporal features include the time interval sequence of touch events;

[0011] The output end generates the probability distribution of the user behavior state and the predicted offset of the touch trajectory to trigger the rendering strategy switch and preload the rendering resources of the target area.

[0012] In some embodiments, dynamically adjust the video memory management strategy, including:

[0013] Set the video memory recycling threshold according to the current rendering level, where the video memory recycling threshold is negatively correlated with the current rendering level;

[0014] Use the weighted round-robin algorithm to select the video memory blocks to be recycled. The weight calculation is based on the ratio of the current frame rate to the target frame rate and the remaining video memory ratio. Among them, the weight = the first coefficient × (current frame rate / target frame rate) + the second coefficient × (remaining video memory / total video memory), and the sum of the first coefficient and the second coefficient is 1;

[0015] Merge the video memory exchange operations through the batch processing optimization mechanism, and merge multiple video memory blocks into fixed-granularity transfer units to reduce transaction overhead.

[0016] In some embodiments, the switching process of the double-buffer architecture satisfies:

[0017] The switching delay time ≤ 1 / current frame rate + preset compensation time, where the preset compensation time realizes atomic switching through the hardware semaphore synchronization mechanism;

[0018] Atomic switching includes:

[0019] Lock the current display frame of the front buffer through the hardware semaphore synchronization mechanism, and release the pre-rendered frame lock of the back buffer;

[0020] Pre-render the first frame of the target resource level in the back buffer, where the resolution of the first frame is smoothed through a dynamic downsampling filter. Among them, the dynamic downsampling filter uses a Lanczos kernel function with an adaptive window size, and the window size is dynamically adjusted according to the ratio of the target resolution to the source resolution, and the pixel blocks are processed in parallel through a compute shader, and the single processing delay is less than the first preset threshold;

[0021] After the pre-rendering is completed, switch the display roles of the front and back buffers to update the screen.

[0022] In some embodiments, dynamically adjust the resource allocation strategy, including:

[0023] When the GPU utilization rate continuously exceeds the second preset threshold, trigger the rendering level degradation operation and start the video memory fragmentation sorting task;

[0024] When the user behavior state switches from the active state to the standby state, gradually reduce the rendering resolution and decrease the video memory allocation granularity until the lowest resource occupancy mode is reached.

[0025] In some embodiments, the method further includes: when the video memory recycling failure rate exceeds the third preset threshold, enable the priority interrupt service to forcibly release redundant video memory blocks and record the resource allocation exception log;

[0026] When the frame output delay exceeds the fourth preset threshold, automatically switch to the low-complexity rendering pipeline, while reducing the frame rate and compensating for the frame smoothness through the frame interpolation algorithm.

[0027] In some embodiments, the determination of the resource demand level is based on multi-dimensional metrics, including:

[0028] The multi-dimensional metrics include the spatio-temporal distribution density of user touch events, the degree of video memory fragmentation, and the fluctuation range of GPU utilization rate. Among them, the weights of each metric are dynamically configured based on the Lagrangian optimization algorithm.

[0029] In a second aspect, the present application provides a resource scheduling device for dynamic rendering. The device includes:

[0030] A touch data acquisition unit for acquiring the timing data of user touch events, where the timing data includes touch coordinates, pressure values, and timestamps;

[0031] A user behavior prediction unit for predicting the user behavior state based on the timing data through a behavior prediction model and determining the current resource demand level;

[0032] A resource allocation and scheduling unit for dynamically adjusting the resource allocation strategy of the graphics processing unit and the video memory management strategy according to the resource demand level. Among them, the resource allocation strategy includes the dynamic adaptation of the rendering resolution and the frame rate, and the video memory management strategy includes the dynamic configuration of the video memory allocation granularity and the recycling threshold;

[0033] A rendering task execution unit for executing the rendering task based on the adjusted resource allocation strategy and performing frame output using a double-buffer architecture to reduce the delay caused by timing mismatch.

[0034] In a third aspect, an electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program stored in the memory, it implements the steps of the resource scheduling method for dynamic rendering according to any one of the first aspects above.

[0035] In a fourth aspect, the present application proposes a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the resource scheduling method for dynamic rendering of any one of the first aspects is implemented.

[0036] In summary, this application obtains the timing data of user touch events in real time, dynamically determines the resource demand level in combination with the behavior prediction model, and adaptively adjusts the GPU resource allocation strategy and video memory management strategy, effectively solving the problems of timing mismatch, video memory fragmentation and QoS mutation in traditional technologies. The synergy mechanism of double buffer architecture and dynamic downsampling filter is adopted to reduce touch response delay, video memory fragmentation rate and Jank rate. At the same time, based on the dynamic configuration of weighted polling algorithm and video memory recycling threshold, resource utilization and system stability are improved, and energy consumption is reduced while ensuring the smoothness of the picture. This application realizes accurate scheduling and efficient utilization of resources by establishing a closed-loop control of user behavior-resource demand-supply strategy, fundamentally solving the problems of timing mismatch, resource waste and jamming in traditional technologies, and providing reliable technical support for high concurrency and low latency scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present specification. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0038] Figure 1 A schematic diagram of a resource scheduling method for dynamic rendering provided in an embodiment of the present application;

[0039] Figure 2 A schematic diagram of the structure of a resource scheduling device for dynamic rendering provided in an embodiment of the present application;

[0040] Figure 3 A structural diagram of a dynamically rendered resource scheduling electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] The terms "first", "second", "third", "fourth", etc. (if any) in the description, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily limit to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices. The technical solutions in the embodiments of this application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments.

[0042] Please refer to Figure 1 , which is a schematic flowchart of a resource scheduling method for dynamic rendering provided by an embodiment of this application, and specifically may include:

[0043] S110. Obtain the timing data of the user touch event, where the timing data includes touch coordinates, pressure values and timestamps;

[0044] Exemplarily, the acquisition of the timing data of the touch event is the basic input link of dynamic resource scheduling, and its core is to capture the spatio-temporal characteristics of the user interaction behavior. The touch coordinates (x, y) map the absolute position of the user operation through the screen coordinate system, and the pressure value is obtained in real time by combining the pressure sensor of the capacitive touch screen. The two jointly represent the user's operation intention (such as click, long press or heavy press). The timestamp records the timing information of the touch event with millisecond-level accuracy, constructs a time interval sequence of continuous events, and provides a time reference for subsequent calculation of derivative characteristics such as touch speed and acceleration. The touch coordinates are converted into relative coordinates in the range of [0,1] through normalization processing to eliminate the interference of device resolution differences on the model input; the pressure value is quantified into scalar data from 0 (no pressure) to 1 (maximum pressure threshold) for distinguishing operation intentions such as click and long press; after these data are normalized, a standardized input vector is formed to provide structured features for the behavior prediction model.

[0045] The spatio-temporal distribution density of touch coordinates reflects the user operation hot zone, the change in pressure value reveals the interaction intensity, and the time stamp sequence quantifies the operation frequency and coherence. The combination of the three can dynamically infer the user behavior state (such as active state or standby state) and predict the future touch trajectory. For example, high pressure values accompanied by high-frequency touch events usually characterize intense operations in game scenarios, and high-precision rendering resources need to be pre-loaded in advance; low pressure values and sparse time stamps may trigger the standby strategy. The multi-dimensional correlation of time series data provides a quantitative basis for subsequent resource demand level determination and dynamic scheduling strategies, ensuring that the rendering decision matches the user's actual needs in real time.

[0046] S120. Based on the time series data, predict the user behavior state through the behavior prediction model and determine the current resource demand level;

[0047] Exemplarily, the behavior prediction model analyzes the spatio-temporal characteristics and time series patterns of touch events to establish a probabilistic mapping relationship of the user behavior state. The distribution density of touch coordinates reflects the operation space preference, the change in pressure value represents the interaction intensity, and the time stamp sequence quantifies the operation frequency and coherence. After the three are fused, a multi-dimensional feature vector is formed. The model is based on LSTM (Long Short-Term Memory Network). Through spatio-temporal feature decoupling encoding and pressure value gating mechanism, it dynamically captures the short-term intention and long-term behavior pattern of the user operation, outputs the probability distribution of the active state and the standby state, predicts the touch trajectory offset, and provides a directional guidance for resource pre-loading.

[0048] The determination of the resource demand level is based on the dynamic matching of the predicted behavior state and the system resource state. When the user is in the active state (such as high-frequency touch), a high-level resource allocation strategy (such as full-scale rendering mode) is triggered; when the behavior state switches to the standby state or the system load exceeds the standard, it degrades to a low-resource occupancy mode. The level determination comprehensively considers indicators such as touch density, video memory fragmentation degree, and GPU utilization rate fluctuation, and dynamically balances performance and energy efficiency through the weight optimization model to ensure that the resource allocation strategy accurately adapts to the user's actual needs.

[0049] S130. Dynamically adjust the resource allocation strategy and video memory management strategy of the graphics processing unit according to the resource demand level, where the resource allocation strategy includes the dynamic adaptation of the rendering resolution and frame rate, and the video memory management strategy includes the dynamic configuration of the video memory allocation granularity and recycling threshold;

[0050] Exemplarily, the resource allocation strategy balances performance and energy efficiency by dynamically adjusting the rendering resolution and frame rate based on the current resource demand level. For example, when the user is in the active state (such as high-frequency touch operations), the system triggers the full rendering mode (Level0) to maintain a high resolution (such as 1080P) and frame rate (such as 60fps) to ensure smooth interaction; while when it is detected that the GPU utilization rate is continuously too high or there is video memory pressure, it automatically degrades to the balanced mode (Level1) or the energy-saving mode (Level2), reduces the resolution (such as 720P) and the frame rate, and at the same time realizes a smooth transition through a dynamic downsampling filter to avoid picture breaks. This adaptation logic ensures controllable latency during the switching process by preloading the resources of the target area and using a double-buffer architecture.

[0051] The video memory allocation granularity and recycling threshold are dynamically adjusted according to the resource demand level. In the high-level mode, a 128MB elastic allocation unit is adopted to reduce video memory fragmentation; in the low-level mode, it switches to a smaller granularity to optimize resource occupancy. The recycling threshold is dynamically set according to the current level to ensure that redundant video memory is released in advance under high load, and a margin is reserved under low load to cope with sudden demands. Combining with the weighted round-robin algorithm (WRR), the recycling object is selected according to the frame rate compliance rate and the proportion of video memory margin to improve the recycling efficiency and avoid performance jitters, forming a closed-loop optimization system for video memory resources.

[0052] S140. Execute the rendering task based on the adjusted resource allocation strategy, and use a double-buffer architecture for picture output to reduce the latency caused by timing mismatch.

[0053] Exemplarily, the double-buffer architecture effectively eliminates the timing mismatch problem in the rendering pipeline through the physical isolation and atomic switching mechanism of the front-end and back-end buffers. The front-end buffer locks the current display frame to maintain the picture stability, and the back-end buffer pre-renders the first frame of the next resource level in parallel. Combining with the hardware semaphore synchronization technology to ensure the atomicity of frame switching and avoid picture tearing. The dynamic downsampling filter processes the resolution transition in real time in the back-end buffer, smooths the scaled image through the Lanczos kernel function, reduces the visual stutter caused by the resolution jump, thereby compressing the overall switching latency within the frame period and reducing the perceivable operation lag of the user.

[0054] The adjusted resource allocation strategy drives the execution of the rendering task, and the double-buffer architecture serves as the output layer to convert the strategy effect into an actual picture. When the resource demand level changes, the back-end buffer pre-renders the target frame based on the new strategy, and the front-end buffer maintains the current frame until the switching is completed, ensuring strict synchronization between the rendering decision and the picture update. This mechanism reduces the end-to-end latency from touch events to picture response from ≥80ms in the traditional solution to 28ms, and at the same time maintains the frame rate stability through dynamic resolution adaptation, achieving an optimal balance between reducing GPU load and improving interaction smoothness.

[0055] In summary, this application improves the rendering efficiency and user experience by dynamically adjusting the resource allocation strategy and video memory management strategy. Specifically, it includes: predicting user behavior in advance through a behavior prediction model, realizing rapid switching of the rendering strategy in combination with a double-buffer architecture, reducing the latency from touch events to rendering responses from over 80 ms in the traditional solution to 28 ms, and improving the real-time performance of interaction. Dynamically adapting the rendering resolution and frame rate based on the resource demand level, and combining the video memory recycling threshold with the weighted round-robin algorithm, increasing the GPU utilization rate from 61% to 89% and reducing the video memory fragmentation rate from 18% to 3.2%, effectively reducing resource waste. Using the Lanczos dynamic downsampling filter and smooth switching mechanism, reducing the Jank rate from 5% to 1.1%, and through the haptic feedback compensation technology, maintaining the perceived smoothness of the user during resource degradation. Dynamically configuring the resource demand level through multi-dimensional metrics, and combining the exception handling mechanism, the system can still remain stable under high load or sudden traffic, with the MOS value maintained above 4.0, which is better than the traditional solution, solving the problems of timing mismatch, resource waste, and stuttering in traditional technologies, and providing reliable technical support for high-concurrency and low-latency scenarios.

[0056] In some examples, the behavior prediction model includes:

[0057] Decoupling and encoding the spatial features and temporal features in the time series data, and enhancing the regulatory effect of the pressure value on the historical state through a gating mechanism, where the spatial features include the normalized data of the touch coordinates and the pressure value, and the temporal features include the time interval sequence of touch events;

[0058] The output end generates the probability distribution of the user behavior state and the predicted offset of the touch trajectory to trigger the switching of the rendering strategy and preload the rendering resources of the target area.

[0059] Exemplarily, the behavior prediction model uses LSTM to independently analyze and fuse the multi-dimensional features of touch events through a spatio-temporal feature decoupling and encoding mechanism. The input time series data includes touch coordinates, pressure values, and timestamps, where the touch coordinates and pressure values are normalized to form a spatial feature vector, representing the absolute position and interaction intensity of the user operation; the timestamps are constructed as a time interval sequence of consecutive events to generate a temporal feature vector, quantifying the frequency and coherence of the operations. The spatial features are captured by a one-dimensional convolutional layer (Conv1D) to eliminate the influence of device resolution differences on the input; the temporal features are composed of the time interval sequence of touch events, encoded by long short-term memory units, and then spliced into a unified representation through a feature fusion layer, so as to realize the discriminative modeling of the spatial distribution and temporal evolution law of user behavior, and improve the model's ability to capture complex operation patterns.

[0060] Introduce a pressure value gating mechanism into the forget gate of the LSTM, and dynamically adjust the retention rate of the historical state through the pressure value. Specifically, after the output of the forget gate is activated by the Sigmoid function, it is element-wise multiplied by the pressure value gating signal σ(W p ·p t ), expressed as:

[0061] f′ t =σ(W f ·[h t-1 ,x t +b f )⊙σ(W p ·p t )

[0062] Among them, f′ t is the output value of the forget gate adjusted by the pressure value, which controls the degree of forgetting of the historical state by the LSTM unit; σ is the Sigmoid activation function, which maps the result of the linear transformation to the interval [0,1] to generate the gating signal; W f is the learnable weight matrix of the forget gate, with dimensions d×(d + m), where d is the dimension of the hidden layer and m is the dimension of the input; [h t-1 ,x t is the concatenated vector of the hidden state h t-1 (dimension d()) at the previous time step and the current input x t (dimension m()); b f is the bias term of the forget gate, which is used to adjust the reference value of the linear transformation; ⊙ is the Hadamard product, that is, element-wise multiplication; W p is the learnable weight matrix of the pressure value gating, with dimensions d×1; p t is the pressure value of the current touch event, which quantifies the user operation intensity (such as light touch, heavy press) and directly affects the forgetting rate. When a high-pressure operation (such as a heavy touch) is detected, σ(W p ·p t )→1, reducing the forgetting rate to retain more historical states, so as to more accurately capture the long-sequence operation dependency; at low pressure values, redundant information is forgotten more quickly. This mechanism enables the model to adaptively adjust the memory weight according to the operation intensity, enhancing the prediction robustness to sudden changes in user intentions (such as quickly swiping to a long press).

[0063] In some instances, dynamically adjust the video memory management strategy, including:

[0064] Set the video memory recycling threshold according to the current rendering level, where the video memory recycling threshold is negatively correlated with the current rendering level;

[0065] The weighted round-robin algorithm is used to select the video memory blocks to be recycled. The weight calculation is determined based on the ratio of the current frame rate to the target frame rate and the remaining video memory ratio. Specifically, the weight = the first coefficient × (current frame rate / target frame rate) + the second coefficient × (remaining video memory / total video memory), and the sum of the first coefficient and the second coefficient is 1;

[0066] The video memory swap operations are merged through a batch processing optimization mechanism, and multiple video memory blocks are merged into fixed-granularity transfer units to reduce transaction overhead.

[0067] Exemplarily, the dynamic configuration of the video memory recycling threshold is closely related to the current rendering level and is adjusted dynamically according to the current rendering level. The specific formula is Q threshold = 0.8 - 0.1 × Level, where the current level is mapped as: Level0 → 0 (full-scale rendering), Level1 → 1 (balanced mode), Level2 → 2 (energy-saving mode). This formula is optimized and verified by the Lagrange multiplier method, with the goal of minimizing the sum of the resource waste rate and the service quality violation rate. In the high-level mode (such as Level0), the threshold is set to 80%, ensuring that recycling is triggered before the video memory usage rate approaches full load, avoiding resource exhaustion, and reserving 20% of the video memory margin to handle sudden loads; in the low-level mode (such as Level2), the threshold is reduced to 60%, reserving more video memory margin to handle sudden loads. This negatively correlated design achieves a dynamic balance between video memory occupancy and system stability. It is measured that the number of video memory overflow events has dropped from 23 times per hour to 0.7 times per hour, a decrease of 96.9%, while ensuring the rendering stability in the high-level mode.

[0068] The weighted round-robin algorithm (WRR) selects the video memory blocks to be recycled through multi-dimensional weight calculation. The weight formula is:

[0069]

[0070] Among them, the first coefficient of 0.6 focuses on the frame rate compliance rate to ensure that high-frame-rate tasks preferentially retain resources; the second coefficient of 0.4 reflects the remaining video memory to avoid resource exhaustion. The design with a constant sum of weights of 1 is optimized and verified by the KKT conditions to balance performance and resource utilization. When the algorithm is executed, the video memory blocks are sorted by weight, and the low-weight blocks (such as the video memory of background applications) are preferentially recycled. At the same time, a red-black tree is used to maintain the real-time weight queue, and the time consumption of a single recycling operation is reduced from 48 ms to 22 ms (a decrease of 54.2%). Combining with a 128MB elastic allocation granularity, the fragmentation rate is reduced from 18% of the traditional scheme to 3.2%, and the recycling success rate is increased to 99.3%.

[0071] The batch mechanism combines multiple 128MB memory blocks into a 4MB fixed-granularity transmission unit, and transmits them in parallel through dual-channel DMA, reducing the transaction overhead of the PCIe bus. Traditional page-by-page transmission (1MB granularity) requires multiple transaction interactions, while 4MB batch processing can transmit 4 times the amount of data at a time. The measured memory exchange bandwidth is increased from 11.5GB / s to 15.75GB / s, and the efficiency is improved by 37%. At the same time, the zero-copy technology is adopted, and the VkDeviceMemory and VkBuffer of the Vulkan (API are shared and bound to avoid CPU intervention in data copying, further reducing latency. For example, in the hot data exchange scenario, the latency is reduced from 18.2ms to 11.5ms, and the cold data loading latency is optimized from 142ms to 89ms. This mechanism works in conjunction with the WRR algorithm to form a "recycling-allocation-transmission" closed loop, which shortens the burst load recovery time from 8.2s to 2.1s and improves the system response speed by 74.4%.

[0072] In some examples, the switching process of the double buffer architecture satisfies:

[0073] Switching delay time ≤ 1 / current frame rate + preset compensation time, where the preset compensation time realizes atomic switching through the hardware semaphore synchronization mechanism;

[0074] Atomic switching, including:

[0075] The current display frame of the front-end buffer is locked through the hardware semaphore synchronization mechanism, and the pre-rendered frame of the back-end buffer is unlocked;

[0076] Pre-rendering a first frame of the target resource level in a backend buffer, wherein the resolution of the first frame is smoothly transitioned through a dynamic downsampling filter, wherein the dynamic downsampling filter uses a Lanczos kernel function with adaptive window size, the window size is dynamically adjusted according to a ratio of the target resolution to the source resolution, and pixel blocks are processed in parallel through a compute shader, and a single processing delay is less than a first preset threshold;

[0077] After pre-rendering is completed, the display roles of the front and back buffers are switched to achieve screen updates.

[0078] For example, the switching delay of the double buffer architecture needs to meet

[0079]

[0080] Among them, T 补偿is the preset compensation time (usually ≤2ms); this constraint uses a hardware semaphore synchronization mechanism (such as Vulkan (Timeline(Semaphore)) to achieve atomic switching, ensuring that the state switch of the front-end and back-end buffers is completed within a single GPU instruction cycle. For example, when the frame rate is 60fps, the frame period is 16.7ms, and the switching delay is limited to 16.7ms + 2ms = 18.7ms. In actual tests, the average delay is 15.2ms, significantly lower than more than 30ms of traditional solutions. The hardware semaphore locks the current display frame of the front-end buffer through an atomic operation and releases the pre-rendered frame lock of the back-end buffer, ensuring that no intermediate state is exposed during the switching process and completely eliminating the screen tearing phenomenon.

[0081] The specific steps of the atomic switching process are as follows:

[0082] Front-end buffer locking and back-end buffer release: Lock the display permission of the front-end buffer through a hardware semaphore, and at the same time release the write permission of the back-end buffer to avoid rendering pipeline conflicts.

[0083] Back-end buffer pre-rendering and resolution transition: Pre-render the first frame of the target resource level in the back-end buffer. When the resolution needs to be downgraded (such as 1080P → 720P), the dynamic downsampling filter uses a window size adaptive Lanczos3 kernel function, and the window size For example, when downgrading from 1080P (1920×1080) to 720P (1280×720), the horizontal scaling ratio is 0.666, and the window size is Ensure that the filtering range covers 6 pixels (-3 to +3) to suppress high-frequency aliasing distortion.

[0084] Display role switching and semaphore synchronization: After pre-rendering is completed, submit an instruction containing the semaphore increment value through vkQueueSubmit, and use GPU hardware-level synchronization primitives (such as memory barriers and pipeline stage dependencies) to ensure the indivisibility of operations, avoiding screen tearing or data inconsistency caused by interrupts or concurrent operations. The measured switching time is stably within 2ms.

[0085] The dynamic downsampling filter realizes pixel-level parallel processing through a compute shader. Each workgroup processes an 8×8 pixel block, and uses the SIMD architecture of the GPU to accelerate the operation. The mathematical expression of the Lanczos3 kernel function is:

[0086]

[0087] Among them, a = 3 is the anti-ringing parameter (window size parameter); x is the normalized coordinate offset; the filter retains more details in the frequency domain. It is measured that the PSNR (Peak Signal-to-Noise Ratio) of the downsampled image reaches 42 dB, which is better than 32 dB of bilinear interpolation. The compute shader caches neighborhood pixel data through local shared memory (Shared Memory), reducing the number of global memory accesses. The single-process latency is controlled within the first preset threshold of 3 ms (under the target resolution of 720P), meeting the real-time requirement.

[0088] After pre-rendering is completed, the display role switch is triggered by the increment value of the Vulkan timeline semaphore (Timeline Semaphore). The front buffer is unlocked and converted into the back buffer, and the new pre-rendered frame becomes the front display content. This process strictly follows the timing logic of "pre-rendering completed → semaphore triggered → atomic switch" to ensure no break in the screen update. For example, in a 60 fps scenario, a complete switch cycle is completed every 16.7 ms. Combining the smooth transition of dynamic downsampling, the Jank rate is reduced from 5% of the traditional solution to 1.1%. At the same time, the parallel rendering mechanism of the double-buffer architecture increases the GPU utilization rate from 61% to 89%, significantly reducing power consumption while ensuring the smoothness of the screen. At the same time, the user perception smoothness of the downgrade operation is enhanced through haptic feedback compensation (0.5 ms delayed vibration).

[0089] In some instances, the resource allocation strategy is dynamically adjusted, including:

[0090] When the GPU utilization rate continuously exceeds the second preset threshold, a rendering level downgrade operation is triggered, and a video memory fragmentation cleanup task is started;

[0091] When the user behavior state switches from the active state to the standby state, the rendering resolution is gradually reduced and the video memory allocation granularity is decreased until the lowest resource occupancy mode is reached.

[0092] Exemplarily, when the GPU utilization rate continuously exceeds the second preset threshold (e.g., 85%) for 200 ms, the system automatically triggers the rendering level downgrading operation. This mechanism monitors the GPU load fluctuations in real time (sampling period 10 ms) and combines a PID controller (proportional coefficient Kp = 0.8) to quickly respond to resource overrun. For example, it downgrades from Level0 (full-scale rendering, 1080P / 60fps) to Level2 (energy-saving mode, 720P / 30fps), and the video memory allocation granularity is synchronously adjusted from 128MB to 64MB to reduce the resource occupancy per frame. During the downgrading process, the double-buffer architecture pre-renders the first frame of the target level and realizes a smooth resolution transition (PSNR > 42dB) through the Lanczos3 dynamic downsampling filter to avoid picture breakage. Actual measurements show that this mechanism reduces the GPU utilization rate from 89% to 51%, increases the single-frame rendering time from 14.2 ms to 31.8 ms, and significantly reduces the power consumption (from 78W to 45W) while ensuring basic smoothness.

[0093] When the rendering level is downgraded, the system starts the video memory fragmentation reorganization task, adopts the weighted round-robin algorithm (WRR) to recycle redundant video memory blocks, and preferentially recycles the video memory occupied by low-frame-rate tasks. For example, when the current FPS is 40 (target 60) and the remaining video memory occupancy ratio is 20%, the weight calculation is 0.6×(40 / 60)+0.4×0.2 = 0.48, and the video memory blocks with low weights are preferentially released. The fragmentation reorganization merges adjacent free video memory blocks, further reduces the fragmentation rate from 3.2% to 1.5%, and improves the video memory utilization rate. The dual-channel DMA transmission exchanges data in 4MB batch processing granularity, with a bandwidth of 15.75GB / s, and the fragmentation reorganization time is shortened from 48 ms to 22 ms, with an efficiency improvement of 54.2%.

[0094] When the user behavior state switches from the active state (P(active state) < 0.15) to the standby state, the system starts the resolution progressive downgrading process. For example, it gradually downgrades from 1080P to 720P (one level per 500 ms), and the reduction amplitude of each level is smoothed by the dynamic downsampling filter. Specifically, it uses a Lanczos kernel function with an adaptive window size (window size ) to parallel-process pixel blocks (8×8 thread groups) in the Compute (Shader), and the single processing delay < 3 ms. During the resolution adjustment, the video memory allocation granularity is gradually reduced from 128MB to 32MB to reduce the resource occupancy per frame. Actual measurements show that in the standby mode, the video memory usage is reduced from 512MB / user to 256MB / user, the GPU power consumption is reduced by 40% (from 62W to 37W), and at the same time, the picture PSNR > 38dB is maintained to avoid a sudden drop in visual quality.

[0095] The video memory allocation granularity is dynamically adjusted according to the resource demand level. In the active state, a large granularity of 128MB is used for allocation, reducing the number of allocations and metadata overhead. In the standby state, it switches to a small granularity of 32MB to improve resource utilization. For example, when 512MB of video memory is required for video rendering, the traditional fixed granularity of 256MB requires 2 allocations and generates 256MB of fragmentation, while this solution directly allocates 4 blocks of 128MB with a fragmentation amount of 0. Combining with the dynamic recycling threshold, the video memory recycling threshold in the standby state is reduced to 60%, reserving 40% of the margin to handle sudden operations. This strategy reduces the video memory fragmentation rate from 18% to 3.2%, with a recycling success rate > 99%. At the same time, the GPU utilization rate is increased from 61% to 89%. By synchronously adjusting the GPU voltage and frequency through the DVFS mechanism (the core frequency is reduced by 40% during standby), the overall energy efficiency ratio is increased by 41% (Level0 → Level2), achieving the maximization of resource efficiency while ensuring QoS. This application increases the number of concurrent users per single node from 180 to 265 in the cloud gaming scenario, and reduces the energy consumption cost per user by 34.8%, verifying the technical advantages of dynamic resource scheduling.

[0096] In some instances, the method further includes:

[0097] When the video memory recycling failure rate exceeds the third preset threshold, enable the priority interrupt service to forcibly release redundant video memory blocks and record the resource allocation exception log;

[0098] When the picture output delay exceeds the fourth preset threshold, automatically switch to the low-complexity rendering pipeline, while reducing the frame rate and compensating for the picture smoothness through the frame interpolation algorithm.

[0099] Exemplarily, when the video memory recycling failure rate exceeds the third preset threshold (such as 18%), the system enables the priority interrupt service to forcibly release redundant video memory blocks, specifically including:

[0100] Interrupt trigger condition: Based on the real-time monitoring module to detect the video memory recycling failure rate, when the failure rate exceeds the threshold, trigger the interrupt service request, and the priority is set to the real-time task level;

[0101] Forced release strategy: Scan the video memory allocation table through the memory management unit, identify and mark low-priority video memory blocks (such as background application caches, inactive texture resources), and directly release them using atomic operations, with a single release time ≤ 2ms;

[0102] Exception log record: After the release operation is completed, write the exception events (including the failure rate, released block size, associated process ID) into the resource allocation exception log. The log format is in JSON structure, containing key metrics such as timestamp, GPU utilization rate, and video memory fragmentation rate for offline analysis and policy optimization. This mechanism reduces the video memory recycling failure rate from 18% to 0.7 times per hour, and improves the system stability by 96.9%.

[0103] When the screen output latency exceeds the fourth preset threshold (e.g., 50 ms for 3 consecutive frames), the system performs the following operations:

[0104] Rendering pipeline switch: Automatically switch to the low-complexity rendering pipeline (Low-Complexity Rendering (Pipeline, LCRP)), turn off non-essential effects (such as dynamic shadows and global illumination), downgrade the shader complexity from SM6.6 to SM5.0, and compress the single-frame rendering time from 31.8 ms to 18.2 ms;

[0105] Dynamic frame rate adjustment: Gradually reduce the target frame rate from 60 fps to 30 fps, and smoothly transition through a PID controller to avoid visual stuttering caused by frame rate jumps;

[0106] Interpolation algorithm compensation: Adopt an interpolation algorithm that combines motion vector estimation (Motion (Estimation)) and optical flow method (Optical (Flow)) to generate intermediate frames to fill the dropped frame gaps. The algorithm is executed in parallel by the shader, with a single-frame interpolation latency ≤ 3 ms. The effective frame rate after interpolation is maintained at 45 fps (native 30 fps + interpolated 15 fps), and PSNR > 38 dB. This solution reduces the perceivable jank rate of users from 5.3% to 0.7%, and optimizes the burst latency recovery time from 8.2 s to 2.7 s. This strategy ensures an acceptable user experience under extreme loads through the dynamic trade-off between resource consumption and picture quality.

[0107] In some instances, the determination of the resource demand level is based on multi-dimensional metrics, including:

[0108] The multi-dimensional metrics include the spatio-temporal distribution density of user touch events, the degree of video memory fragmentation, and the fluctuation range of GPU utilization. Among them, the weights of each metric are dynamically configured based on the Lagrangian optimization algorithm.

[0109] Exemplarily, the determination of the resource demand level is based on three core metrics: the spatial distribution characteristics of user touch behavior, the fragmentation state of video memory resources, and the volatility of GPU load. The adaptive adjustment of the resource allocation strategy is achieved through a dynamic weight optimization algorithm.

[0110] The system analyzes the aggregation degree of touch events through the kernel density estimation algorithm, uses 10% of the screen size as the bandwidth parameter, and calculates the operation density around each touch point. High-density areas (such as the hot zone of game control) represent the high-frequency interaction behavior of users, and high-precision rendering resources need to be preferentially allocated; low-density areas trigger energy-saving strategies. For example, after the touch points collected by the capacitive screen are smoothed, a heat map is generated to guide the direction of resource preloading, ensuring that the rendering latency in high-density areas is less than 28 ms.

[0111] Video memory fragmentation is defined as the percentage of free video memory blocks that cannot be continuously allocated in the total video memory capacity. When the fragmentation level exceeds 5%, the system determines that the video memory management efficiency is low and needs to increase the priority of the defragmentation task. For example, at a fixed allocation granularity of 256MB, when the video rendering requires 512MB, 256MB of fragments will be generated, while the proposed solution uses an elastic granularity of 128MB to achieve zero-fragment allocation. The fragmentation rate is monitored in real time to trigger the weighted round-robin recycling mechanism, which preferentially releases the video memory blocks occupied by low-frame-rate tasks, and the defragmentation efficiency is increased by 82%.

[0112] The fluctuation of GPU utilization is statistically analyzed through a 500ms sliding window, and its variance is calculated to quantify the load instability. When the fluctuation amplitude exceeds 15% (such as sudden special effect rendering in a game scene), the system determines that the resource supply is unbalanced and needs to dynamically downgrade the rendering level or adjust the video memory recycling threshold. For example, when the GPU utilization suddenly increases from 75% to 90%, the Level2 energy-saving mode is triggered, and the video memory recycling threshold is reduced from 70% to 60% to avoid stuttering caused by video memory bandwidth jitter.

[0113] The dynamic adjustment of weights is based on the Lagrangian optimization algorithm, with the goal of balancing performance (such as frame smoothness) and resource efficiency (such as video memory utilization). The specific process includes:

[0114] Define the optimization objective: Minimize the combined cost of the Quality of Service (QoS) violation rate (such as stuttering events) and the resource waste rate (such as video memory idle rate), while satisfying the constraint that the sum of weights is 1;

[0115] Construct the cost function: Introduce penalty factors, assign different weights to QoS violations and resource waste respectively, and incorporate the constraint conditions into the optimization model through Lagrange multipliers;

[0116] Solve for the optimal weights in real time: Update the metric data every 500 milliseconds, and combine the historical statistical values within the sliding window (such as touch density trend, fragmentation change rate) to calculate the current optimal weight combination. For example, in a sudden high-load scenario, the algorithm automatically increases the weight of the GPU utilization fluctuation metric to give priority to ensuring system stability; in a low-load situation, it focuses on video memory fragmentation optimization to improve resource utilization.

[0117] This dynamic configuration mechanism enables the system to adapt to different scenarios. In actual measurements, the GPU utilization fluctuation is reduced by 63%, the video memory fragments are reduced by 82%, and the user operation response latency is optimized to 28 milliseconds, significantly improving the accuracy and robustness of resource scheduling.

[0118] In some instances, the above method is deployed on a cloud gaming platform, including:

[0119] Deploy the behavior prediction model on the terminal device, and collect touch events in real time and compress and transmit them to the edge computing node;

[0120] Transmit the rendered video through the Real-time Streaming Protocol (RTSP), and dynamically adjust the video memory batch processing granularity and compression algorithm level according to network jitter conditions.

[0121] Exemplarily, in a cloud gaming platform, the behavior prediction model is deployed on user terminal devices (such as mobile phones and tablets). The improved LSTM network is used to analyze touch events in real time (sampling rate of 120 Hz), generating the probability of the user's behavior state and the trajectory prediction offset. After the touch data is compressed by differential encoding (compression rate ≥ 60%), it is transmitted to the edge computing node through the gRPC protocol, with a transmission delay < 5 ms (measured RTT ≤ 30 ms). After receiving the data, the edge node dynamically schedules the GPU cluster based on the resource demand level. For example, active users are allocated NVIDIA T4 GPUs to perform 1080P rendering, and standby users reuse shared GPU resources to perform 720P rendering. The data format between the terminal and the edge is defined by Protocol Buffers to ensure cross-platform compatibility and reduce bandwidth occupancy (the single-user transmission traffic is reduced from 1.2 Mbps to 0.5 Mbps).

[0122] In a cloud gaming platform, the edge node uses the SRT (Secure Reliable Transport) real-time streaming protocol combined with UDP to transmit the rendered video, and dynamically adjusts the resource scheduling strategy according to the network jitter index (such as RTT > 100 ms or Jitter > 20 ms) and bandwidth status to achieve network-adaptive rendering and transmission optimization. The specific mechanisms include:

[0123] When the network is stable, a 4MB video memory swap granularity is adopted, combined with the LZ4HC high compression rate algorithm (compression level 9, compression rate 65%), and the bandwidth utilization rate reaches 15.75 GB / s, with the video PSNR > 42 dB. When network jitter is detected or the bandwidth is lower than 50 Mbps, it switches to 2MB or 8MB batch processing granularity (for high-latency and high-packet-loss scenarios respectively), sacrificing some compression rate (such as the LZ4 fast compression rate dropping to 45% or switching to Zstandard loss-resistant compression) to reduce the processing delay (from 11.5 ms to 15 ms), while reducing the transmission frequency, and the bandwidth utilization rate is increased by 41%.

[0124] When the packet loss rate is low (< 5%), LZ4HC compression is preferentially used to ensure the image quality; when the packet loss rate is high (≥ 5%), Zstandard compression (compression rate 52%) is enabled and forward error correction (FEC) redundant packets are superimposed, and the packet loss resistance rate is increased to 30% to ensure the integrity of the video.

[0125] When the network bandwidth is limited, the offset of the user's touch trajectory is predicted, and the 8K texture resources in the high-frequency area are cached in advance (hit rate > 92%), and the resolution dynamic degradation is triggered (such as 1080P → 720P). The frame interpolation algorithm is executed in parallel by the compute shader to generate intermediate frames to fill the dropped frame gap (delay ≤ 3ms), maintaining an effective frame rate ≥ 45fps and PSNR > 38dB.

[0126] The embodiments of this application significantly optimize the performance in complex network environments. The screen transmission delay is compressed from 68ms to 39ms, the QoS violation rate under burst traffic is reduced from 11.3% to 0.9%, and the MOS score remains stable > 4.0 when RTT > 100ms. At the same time, the number of concurrent users per single GPU node is increased from 180 / 200 to 265, and the utilization rate of video memory resources is increased by 37%, verifying the efficiency and robustness of dynamic resource scheduling in the distributed cloud game architecture.

[0127] Please refer to Figure 2 , which is a schematic structural diagram of a resource scheduling device for dynamic rendering provided by the embodiments of this application, including:

[0128] A touch data acquisition unit 21, configured to obtain the timing data of the user's touch event, where the timing data includes touch coordinates, pressure values, and timestamps;

[0129] A user behavior prediction unit 22, based on the timing data, predicts the user's behavior state through a behavior prediction model to determine the current resource demand level;

[0130] A resource allocation and scheduling unit 23, configured to dynamically adjust the resource allocation strategy and video memory management strategy of the graphics processing unit according to the resource demand level, where the resource allocation strategy includes the dynamic adaptation of the rendering resolution and frame rate, and the video memory management strategy includes the dynamic configuration of the video memory allocation granularity and recycling threshold;

[0131] A rendering task execution unit 24, executes the rendering task based on the adjusted resource allocation strategy, and uses a double-buffer architecture for screen output to reduce the delay caused by timing mismatch.

[0132] Please refer to Figure 3 , the embodiments of this application also provide an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor. When the processor 320 executes the computer program 311, it implements the steps of any method for resource scheduling of dynamic rendering.

[0133] Since the electronic device introduced in this embodiment is the device adopted by a resource scheduling device for dynamic rendering in the embodiments of the present application, based on the method introduced in the embodiments of the present application, those skilled in the art can understand the specific implementation manners and various variations of the electronic device in this embodiment. Therefore, the specific implementation of how this electronic device implements the method in the embodiments of the present application will not be described in detail here. As long as the device adopted by those skilled in the art to implement the method in the embodiments of the present application falls within the scope of protection of the present application.

[0134] In the specific implementation process, when the computer program 311 is executed by the processor, it can implement any implementation manner in the corresponding embodiments of the first aspect.

[0135] It should be noted that in the above embodiments, the descriptions of each embodiment have their own focuses. For the parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0136] Those skilled in the art should understand that the embodiments of the present application can provide a method, a system or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-readable storage media containing computer-readable program code.

[0137] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams can be implemented by computer program instructions, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded computer or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0138] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the specified functions in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0139] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 steps for the functions specified in one block or multiple blocks.

[0140] An embodiment of the present application also provides a computer program product, which includes computer software instructions. When the computer software instructions run on a processing device, the processing device is caused to execute Figure 1 the process of a resource scheduling method for dynamic rendering in the corresponding embodiment.

[0141] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. 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 from one website, computer, server, or data center to another website, computer, server, or data center in a wired or wireless manner. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium, an optical medium, or a semiconductor medium, etc.

[0142] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0143] In several embodiments provided by the present application, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces, and the indirect coupling or communication connection of devices or units can be in an electrical, mechanical, or other form.

[0144] The unit described as a separation component may or may not be physically separated. The component displayed as a unit may or may not be a physical unit, that is, it may be located in one place or distributed over multiple network units. Some or all of these units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0145] In addition, each functional unit in various embodiments of the present application may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above-mentioned integrated unit may be implemented in the form of a hardware and / or software functional unit.

[0146] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device to execute all or part of the steps of the methods in various embodiments of the present application.

[0147] The above embodiments are only used to illustrate the technical solutions of the present application, not to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of various embodiments of the present application.

[0148] Although the preferred embodiments of this specification have been described, those skilled in the art can make additional changes and modifications once they know the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications falling within the scope of this specification.

[0149] Obviously, those skilled in the art can make various changes and deformations to this specification without departing from the spirit and scope of this specification. Thus, if these modifications and deformations of this specification fall within the scope of the claims of this specification and their equivalent technologies, this specification also intends to include these changes and deformations.

Claims

1. A resource scheduling method for dynamic rendering, characterized in that, The method includes: Obtaining the timing data of the user touch event, where the timing data includes touch coordinates, pressure values, and timestamps; Based on the timing data, predicting the user behavior state through a behavior prediction model to determine the current resource demand level; According to the resource demand level, dynamically adjusting the resource allocation strategy and video memory management strategy of the graphics processing unit, where the resource allocation strategy includes the dynamic adaptation of the rendering resolution and frame rate, and the video memory management strategy includes the dynamic configuration of the video memory allocation granularity and recycling threshold; Performing a rendering task based on the adjusted resource allocation strategy and using a double-buffer architecture for frame output to reduce the latency caused by timing mismatch.

2. The resource scheduling method for dynamic rendering according to claim 1, wherein The behavior prediction model includes: Decoupling and encoding the spatial features and time features in the timing data, and enhancing the regulatory effect of the pressure value on the historical state through a gating mechanism, where the spatial features include the normalized data of touch coordinates and pressure values, and the time features include the time interval sequence of touch events; The output end generates the probability distribution of the user behavior state and the predicted offset of the touch trajectory to trigger the switching of the rendering strategy and preload the rendering resources of the target area.

3. The dynamic rendering resource scheduling method according to claim 1, characterized in that, The dynamic adjustment of the video memory management strategy includes: Setting the video memory recycling threshold according to the current rendering level, where the video memory recycling threshold is negatively correlated with the current rendering level; Using a weighted round-robin algorithm to select the video memory block to be recycled, and the weight calculation is based on the ratio of the current frame rate to the target frame rate and the remaining video memory ratio. Where the weight = the first coefficient × (current frame rate / target frame rate) + the second coefficient × (remaining video memory / total video memory), and the sum of the first coefficient and the second coefficient is 1; Merging the video memory swap operations through a batch processing optimization mechanism, and merging multiple video memory blocks into a fixed-granularity transmission unit to reduce transaction overhead.

4. The dynamic rendering resource scheduling method according to claim 1, wherein The switching process of the double-buffer architecture satisfies: The switching delay time ≤ 1 / current frame rate + preset compensation time, where the preset compensation time realizes atomic switching through a hardware semaphore synchronization mechanism; The atomic switching includes: Locking the current display frame of the front buffer through the hardware semaphore synchronization mechanism and releasing the pre-rendered frame lock of the back buffer; Pre-rendering the first frame of the target resource level in the back buffer, where the resolution of the first frame is smoothed through a dynamic downsampling filter. The dynamic downsampling filter uses a Lanczos kernel function with an adaptive window size, and the window size is dynamically adjusted according to the ratio of the target resolution to the source resolution, and pixel blocks are processed in parallel through a compute shader, and the single processing delay is less than the first preset threshold; After the pre-rendering is completed, switch the display roles of the front and back buffers to update the screen.

5. The dynamic rendering resource scheduling method according to claim 1, characterized in that, The dynamic adjustment of the resource allocation strategy includes: When the GPU utilization rate continuously exceeds the second preset threshold, trigger the rendering level downgrading operation and start the video memory fragmentation sorting task; When the user behavior state switches from the active state to the standby state, gradually reduce the rendering resolution and the video memory allocation granularity until the lowest resource occupancy mode is reached.

6. The dynamic rendering resource scheduling method according to claim 1, characterized in that The method further includes: When the video memory recycling failure rate exceeds the third preset threshold, enable the priority interrupt service to forcibly release redundant video memory blocks and record the resource allocation exception log; When the screen output delay exceeds the fourth preset threshold, automatically switch to the low-complexity rendering pipeline, while reducing the frame rate and compensating for the smoothness of the screen through the frame interpolation algorithm.

7. The resource scheduling method for dynamic rendering according to claim 1, wherein The determination of the resource requirement level is determined based on multi-dimensional metrics, including: The multi-dimensional metrics include the spatio-temporal distribution density of user touch events, the degree of video memory fragmentation, and the fluctuation range of GPU utilization. Among them, the weights of each metric are dynamically configured based on the Lagrangian optimization algorithm.

8. A resource scheduling device for dynamic rendering, characterized in that, The device includes: A touch data acquisition unit for acquiring the timing data of user touch events, where the timing data includes touch coordinates, pressure values, and timestamps; A user behavior prediction unit that predicts the user behavior state based on the timing data and determines the current resource requirement level through a behavior prediction model; A resource allocation and scheduling unit for dynamically adjusting the resource allocation strategy and video memory management strategy of the graphics processing unit according to the resource requirement level. Among them, the resource allocation strategy includes the dynamic adaptation of the rendering resolution and frame rate, and the video memory management strategy includes the dynamic configuration of the video memory allocation granularity and recycling threshold; A rendering task execution unit that executes the rendering task based on the adjusted resource allocation strategy and uses a double-buffer architecture for screen output to reduce the delay caused by timing mismatch.

9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is used to implement the steps of the resource scheduling method for dynamic rendering according to any one of claims 1 to 7 when executing the computer program stored in the memory.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program, when executed by the processor, implements the resource scheduling method for dynamic rendering according to any one of claims 1 to 7.

Citation Information

Cited By

  • Cloud mobile phone multi-mode interaction method and related equipment

    CN120785890A

  • Particle management method and system in PIC / MCC simulation based on GPU architecture

    CN121302838A

  • A particle management method and system in PIC / MCC simulation based on GPU architecture

    CN121302838B

  • Data processing method and device

    CN121349738A

  • Video generation method and device for Android operating system and medium

    CN121442171A