Search

CN-122019123-A - XR webpage rendering method based on heterogeneous computation

CN122019123ACN 122019123 ACN122019123 ACN 122019123ACN-122019123-A

Abstract

The invention relates to an XR webpage rendering method based on heterogeneous computation; the method comprises the following steps: automatically identifying the hardware capability of the terminal and judging whether the terminal supports GPU rendering; if not, starting a CPU mode to load the simplified model, and if so, loading a CPU and GPU hybrid rendering strategy; distributing rendering tasks according to NAGPUR heterogeneous task scheduling methods; LOD level management is implemented, and a model is asynchronously loaded; according to network bandwidth perception and rendering quality adjustment, the invention allows the advantages of different computing units such as a CPU (Central processing Unit), a GPU (graphics processing Unit) and the like to be utilized simultaneously through heterogeneous computing, so that the rendering speed is greatly improved, and simultaneously, the smoothness of real-time rendering also enables a user to obtain more natural and comfortable experience in the interaction process, and discomfort caused by picture jamming or delay is reduced.

Inventors

  • YAO JIAN
  • LIAO YONGBIN
  • MA BO
  • WEN JIANMIN

Assignees

  • 南昌云虫科技有限公司

Dates

Publication Date
20260512
Application Date
20251201

Claims (8)

  1. 1. An XR webpage rendering method based on heterogeneous computation is characterized by comprising the following steps: S1, automatically identifying the hardware capability of a terminal and judging whether the terminal supports GPU rendering; s2, if not, starting a CPU mode to load a simplified model, and if so, loading a CPU and GPU hybrid rendering strategy; S3, distributing rendering tasks according to a CPU-GPU heterogeneous task scheduling method; S4, LOD level management is implemented, and a model is asynchronously loaded; And S5, adjusting according to network bandwidth perception and rendering quality.
  2. 2. The XR webpage rendering method based on heterogeneous computing according to claim 1, wherein the automatically identifying the terminal hardware capability and judging whether the terminal supports GPU rendering comprises: Acquiring related information of terminal hardware through an API provided by an operating system, wherein the related information comprises, but is not limited to, the core number, the main frequency, the capacity of a memory, the size of a video memory of a GPU and the computing capacity of the GPU; it is checked whether there is a GPU device available in the system and whether the terminal supports GPU-accelerated rendering.
  3. 3. The XR webpage rendering method based on heterogeneous computing according to claim 1, wherein the starting the CPU mode loading simplification model comprises that when the terminal does not support GPU rendering, in order to reduce the computational burden of the CPU, simplification of the model is required, the simplification mode comprises reducing the number of patches of the model and reducing the resolution of textures: Model simplification degree calculation: Assuming that the number of patches of the original model is n_ { original }, the number of patches of the simplified model is n_ { simplified }, and the simplified ratio is r, there are: r=\frac{N_{simplified}}{N_{original}}; wherein the reduction ratio r can be dynamically adjusted according to the computational power of the CPU and the complexity of the rendering task.
  4. 4. The XR webpage rendering method based on heterogeneous computation according to claim 1, wherein the assigning rendering tasks according to the CPU-GPU heterogeneous task scheduling method comprises: Analyzing the rendering task, namely analyzing the rendering task into a plurality of subtasks, and evaluating the calculation complexity and the data dependency relationship of each subtask; c = \text { number of operations } \times\text { complexity of operations }; Wherein the operation number refers to the number of basic operations contained in the subtasks, and the operation complexity refers to the calculation complexity of each basic operation; And (3) task allocation, namely allocating subtasks to the CPU or the GPU for processing according to the computing capacity of the CPU and the GPU and the characteristics of the tasks.
  5. 5. The XR webpage rendering method based on heterogeneous computing according to claim 1, wherein the task allocation further comprises a task allocation algorithm: Let L_ { CPU } and L_ { GPU } be the current loads of CPU and GPU, the load range is [0,1], for each rendering task t_ in { total }, let its computational complexity be C_t, memory access frequency be M_t, the task allocation rule is as follows: \text{if}\frac{C_t}{M_t}>\alpha\times\frac{L_{GPU}}{L_{CPU}}\text{then}t\inT_{GPU}\text{else}t\inT_{CPU}; Where α is an adjustment factor for balancing load distribution of the CPU and GPU.
  6. 6. The XR webpage rendering method based on heterogeneous computation according to claim 1, wherein the implementing LOD level management, wherein the asynchronously loading the model comprises dividing the model into different LOD levels according to the distance between the model and the viewpoint and the importance of the model in the scene, and using a model with a lower LOD level as the distance from the viewpoint is farther and the importance is lower; assuming that the distance between the model and the viewpoint is d and the importance weight of the model is w, the LOD level of the model can be calculated using the following formula: L=f(d,w) where f is a custom function, determined according to actual requirements.
  7. 7. The XR webpage rendering method based on heterogeneous computing according to claim 1, wherein the network bandwidth sensing comprises: The method comprises the steps of adopting a multithread parallel downloading test file mode, simultaneously monitoring the fluctuation condition of network flow to obtain the current network bandwidth more accurately, and utilizing a Kalman filter to filter the network bandwidth data to remove noise interference; The Kalman filtering network bandwidth estimation is that x_k is set as the real network bandwidth at the kth moment, z_k is the measured value at the kth moment, and the prediction and update equation of the Kalman filtering is as follows: prediction p_ { k|k-1} = p_ { k-1|k-1} +q; Update \hat { x } - { k|k } = \hat { x } - { k|k-1} +k_k (z_k- { x } - { k|k-1 }); P_{k|k}=(1-K_k)P_{k|k-1}; where Q is the process noise covariance and R is the measurement noise covariance.
  8. 8. The XR webpage rendering method based on heterogeneous computing according to claim 1, wherein the adjusting of the rendering quality comprises: And using a regression model, taking network bandwidth and user preferences of different rendering qualities as inputs, and outputting optimal rendering quality parameters.

Description

XR webpage rendering method based on heterogeneous computation Technical Field The invention relates to the technical field of augmented reality (XR) and three-dimensional visualization, in particular to an XR webpage rendering method based on heterogeneous computation. Background The XR rendering of the Web end is often limited by graphic performance, and particularly when loading a large scene or a high-precision model, the problems of clamping, frame loss and the like are easy to occur. The traditional Weblog scheme has insufficient performance on weak equipment and fails to realize heterogeneous parallel processing at a task level, and the existing Web end XR rendering technology has the following technical bottlenecks: The hardware performance limitation is that the traditional Weblog scheme has insufficient performance under weak hardware environments such as mobile equipment or low-end PC, and is difficult to maintain stable frame rate, and particularly, the phenomena such as clamping, frame loss and the like commonly exist when a large-scale scene or a high-precision model is loaded. The heterogeneous computing utilization rate is low, the heterogeneous computing capability (cooperation of CPU and GPU) of the terminal equipment cannot be fully utilized in the prior art, and most schemes only depend on a single processor for computing, so that the computing resource waste and the performance bottleneck are caused. The dynamic adaptation capability is insufficient, namely, a dynamic perception mechanism for terminal hardware configuration and network conditions is lacking, and rendering strategies and resource quality cannot be dynamically adjusted according to real-time performance indexes (such as frame rate and bandwidth). The problem of model loading efficiency is that the traditional scheme generally adopts a full-scale model loading mode, so that the first screen rendering delay is large, and a fine hierarchical loading mechanism is lacked, so that the user experience is influenced. The compatibility challenge is that different terminal devices support graphics APIs such as Weblog/Web GPU and the like to different degrees, and the existing scheme is difficult to provide consistent rendering experience on all devices. Aiming at the technical defects, the XR webpage rendering method based on heterogeneous computation is provided, and performance expression and compatibility of Weber application are remarkably improved through multi-dimensional optimization such as equipment capability detection, heterogeneous task scheduling, dynamic LOD management and the like. Disclosure of Invention Aiming at the technical problems in the prior art, the invention provides an XR webpage rendering method based on heterogeneous computation, which utilizes the joint computing capacity of heterogeneous terminal equipment (CPU+GPU) to realize real-time rendering of a high-performance low-delay three-dimensional model. The technical scheme for solving the technical problems is as follows, the XR webpage rendering method based on heterogeneous calculation comprises the following steps: S1, automatically identifying the hardware capability of a terminal and judging whether the terminal supports GPU rendering; s2, if not, starting a CPU mode to load a simplified model, and if so, loading a CPU and GPU hybrid rendering strategy; S3, distributing rendering tasks according to a CPU-GPU heterogeneous task scheduling method; S4, LOD level management is implemented, and a model is asynchronously loaded; And S5, adjusting according to network bandwidth perception and rendering quality. Further, in the XR webpage rendering method based on heterogeneous computation, the automatic identification of the terminal hardware capability and the judgment of whether the terminal supports GPU rendering comprise: Acquiring related information of terminal hardware through an API provided by an operating system, wherein the related information comprises, but is not limited to, the core number, the main frequency, the capacity of a memory, the size of a video memory of a GPU and the computing capacity of the GPU; it is checked whether there is a GPU device available in the system and whether the terminal supports GPU-accelerated rendering. Further, in the XR webpage rendering method based on heterogeneous computation, the starting of the CPU mode loading simplification model comprises the steps of simplifying the model in order to reduce the computation burden of a CPU when the terminal does not support GPU rendering, wherein the simplification mode comprises the steps of reducing the number of patches of the model and reducing the resolution of textures: Model simplification degree calculation: Assuming that the number of patches of the original model is n_ { original }, the number of patches of the simplified model is n_ { simplified }, and the simplified ratio is r, there are: r=\frac{N_{simplified}}{N_{original}}; wherein the reduction rat