Cross-platform parallel sorting method and system for Web three-dimensional Gaussian sputtering rendering

By adopting a "sorting controller-sorting calculator" collaborative mechanism and a radix sorting method with multiple passes and blocks in the Web environment, the cross-platform parallel sorting problem of 3D Gaussian sputtering rendering on the Web side was solved, achieving an efficient and stable sorting process and overcoming performance bottlenecks and compatibility challenges.

CN121482265APending Publication Date: 2026-02-06PEKING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511628330.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve efficient and stable cross-platform parallel sorting of 3D Gaussian sputtering rendering in web environments, especially in heterogeneous and platform-diverse web environments, leading to performance bottlenecks and compatibility issues.

Method used

By adopting a "sorting controller-sorting calculator" collaborative mechanism, the array of key-value pairs to be sorted is interpreted bit by bit as unsigned integer keys, and radix sorting is performed on the GPU in a pass-by-pass, block-by-block manner. This leverages the parallel computing capabilities of WebGPU and avoids risky synchronization mechanisms, thus achieving stable sorting across platforms.

Benefits of technology

High-speed and stable sorting of millions of Gaussian primitive depth data was achieved on diverse web platforms, solving performance bottlenecks and compatibility issues, ensuring the orderliness and controllability of the sorting process, and improving robustness and success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121482265A_ABST
    Figure CN121482265A_ABST
Patent Text Reader

Abstract

The invention provides a cross-platform parallel sorting method and system for Web three-dimensional Gaussian sputtering rendering, and relates to the technical field of computers. The method comprises the following steps: explaining each depth key in a to-be-sorted key-value pair array into an N-bit unsigned integer key bit by bit through a sorting controller, and dividing each N-bit unsigned integer key into N / M times according to M data bits; the cardinality of each to-be-sorted data is sorted as a sorting task, and the sorting task is sent to a sorting calculator; dividing to-be-sorted data corresponding to the sorting task into P data blocks through a sorting calculator, and starting P working groups on the GPU to carry out cardinal number sorting on the P data blocks; after each sorting task is completed, the sorting controller takes the sorting result of the sorting task as a sorting reference of the next sorting task and sends the next sorting task to the sorting calculator until N / M sorting tasks are completed, and a completely sorted key-value pair array is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a cross-platform parallel sorting method and system for Web-based 3D Gaussian sputtering rendering. Background Technology

[0002] With the rapid development of internet technology and hardware performance, web browsers have gradually become an important platform for carrying rich interactive 3D content. Against this backdrop, 3D Gaussian sputtering technology has emerged. Because it can simultaneously achieve photorealistic rendering fidelity and unprecedented real-time rendering performance, it has quickly become a mainstream technology in the fields of new perspective compositing and 3D reconstruction, and is widely used in the generative 3D modeling ecosystem.

[0003] In the rendering pipeline of 3D Gaussian sputtering technology, a core and indispensable step is to ensure the correctness of color mixing. All visible Gaussian primitives in the scene must be completely sorted from back to front according to their depth relative to the camera before each frame is rendered. This sorting task is computationally intensive, and its computational load is directly related to the scene complexity. When the scene contains millions of Gaussian primitives, dozens of sorting operations on millions of data points need to be performed per second, becoming a key bottleneck determining rendering performance.

[0004] Currently, deploying this critical sorting task efficiently and reliably to the Web environment still faces significant challenges. Due to the heterogeneity and platform diversity of the Web environment, related technologies struggle to provide a general solution capable of stably and efficiently performing large-scale parallel sorting, resulting in significant technical limitations in achieving high-performance 3D Gaussian sputtering rendering on the Web. Summary of the Invention

[0005] In view of the above problems, embodiments of this application provide a cross-platform parallel sorting method and system for Web 3D Gaussian sputtering rendering, so as to overcome the above problems or at least partially solve the above problems.

[0006] A first aspect of this application discloses a cross-platform parallel sorting method for Web-based 3D Gaussian sputtering rendering, the method comprising: The sorting controller interprets each depth key in the key-value pair array to be sorted as an N-bit unsigned integer key, and divides each N-bit unsigned integer key into N / M passes according to M data bits. Each key-value pair in the key-value pair array to be sorted includes a depth key and a corresponding Gaussian primitive index value. Each pass of radix sorting of the data to be sorted is treated as a sorting task, and this sorting task is sent to the sorting calculator. Each pass of data to be sorted includes M bits of data for all N-bit unsigned integer keys. The sorting calculator divides the data to be sorted in this sorting task into P data blocks, and starts P working groups on the GPU to perform radix sorting on the P data blocks to obtain the sorting result of this pass. After each sorting pass is completed, the sorting controller uses the sorting result of the current pass as a sorting reference for the next pass and sends the next pass to the sorting calculator until N / M passes are completed, resulting in a fully sorted array of key-value pairs.

[0007] Optionally, the sorting task includes a first subtask, a second subtask, and a third subtask. The sorting calculator includes a local histogram calculation module, a global offset calculation module, and a data scattering and writing module. The sorting calculator divides the data to be sorted in this sorting pass into P data blocks, and P working groups are started on the GPU to perform radix sorting on the P data blocks, obtaining the sorting result for this pass, including: In response to the first subtask, the local histogram calculation module divides the data to be sorted into P data blocks and starts P workgroups on the GPU to calculate the numerical frequency of M bits in the P data blocks in parallel, thereby obtaining a global histogram buffer; wherein, the global histogram buffer includes the histogram calculation values ​​of each workgroup, and the histogram calculation value is the number of elements with the same value in the workgroup. In response to the second subtask, the global offset calculation module performs hierarchical parallel global prefix sum calculation on the global histogram buffer to obtain a first offset buffer and a second offset buffer. The first offset buffer includes the prefix sum value of each workgroup, and the prefix sum value is the number of elements with the same value in all workgroups with a value less than the current workgroup index. The global offset value in the second offset buffer is the number of elements with a value less than the current value. In response to the third subtask, the data scattering and writing module writes each key-value pair to the final sorting position in the output buffer based on the first offset buffer and the second offset buffer, thus obtaining the sorting result for this pass.

[0008] Optionally, the data to be sorted is divided into P data blocks, including: Based on the number of key-value pairs in the array of key-value pairs to be sorted and the size of the workgroup, the data to be sorted is divided into P data blocks; Where P is K / L, K is the number of key-value pairs in the array of key-value pairs to be sorted, and L is the number of threads in the workgroup.

[0009] Optionally, P workgroups are launched on the GPU to compute the digital frequency of M bits of data within the P data blocks in parallel, resulting in a global histogram buffer, including: The working group creates and initializes a local histogram in shared memory, the size of which is... ; Each thread within the workgroup reads the corresponding depth key, extracts the value of the M bits of data for this sorting task, and uses atomic operations to update the local histogram based on the value. The value ranges from 0 to... Integers; The updated local histogram is synchronized using barriers within the workgroup, and then written to the global histogram buffer after synchronization. The histogram value in the updated local histogram represents the number of elements with the same value within the workgroup. The size of the global histogram buffer is [size missing]. .

[0010] Optionally, the global histogram buffer is subjected to hierarchical parallel global prefix sum calculation to obtain a first offset buffer and a second offset buffer, including: Based on the global histogram buffer, a hierarchical parallel prefix sum calculation is performed on each value to obtain the first offset buffer, the size of which is the same as the size of the global histogram buffer; Based on the global histogram buffer and the first offset buffer, the global total for each value is calculated to obtain a temporary array of global totals. A prefix sum is then performed on this temporary array to obtain a second offset buffer. Here, the global total represents the number of elements with the same value across all workgroups, and the size of the second offset buffer is [size missing]. .

[0011] Optionally, based on the global histogram buffer and the first offset buffer, the global total for each value is calculated to obtain a temporary array of global totals, including: Obtain the histogram calculation value of the value in the last working group from the global histogram buffer, and obtain the prefix sum value of the value in the last working group from the first offset buffer; The total number of values ​​is obtained by adding the calculated histogram value and the prefix sum value. By iterating through all the values, a temporary array of the total global count is obtained.

[0012] Optionally, the working group writes each key-value pair to the final sorting position in the output buffer based on the first offset buffer and the second offset buffer to obtain the sorting result for this pass, including: Each thread in the workgroup reads the corresponding depth key, extracts the value of the M bits of data in this sorting task, and calculates the local offset value based on the extracted value. The local offset value represents the number of elements with the same value in the data block before the current thread. Each thread within the workgroup determines the prefix sum value from the first offset buffer and the global offset value from the second offset buffer based on the extracted values. The local offset value, the prefix sum value, and the global offset value are added together to obtain the final sorting position, and each key-value pair is written into the final sorting position to obtain the sorting result for this pass.

[0013] Optionally, sending this sorting task to the sorting calculator includes: The sorting controller sequentially sends the first subtask, the second subtask, and the third subtask to the sorting calculator; wherein the second subtask is sent after the first subtask is completed, and the second subtask is sent after the third subtask is completed.

[0014] Optionally, sending this sorting task to the sorting calculator includes: The sorting controller sends the sorting task to the sorting calculator in order from least significant bit to most significant bit.

[0015] A second aspect of this application discloses a parallel sorting system, comprising: a sorting controller deployed on a CPU and a sorting calculator deployed on a GPU, wherein the steps of the cross-platform parallel sorting method for Web 3D Gaussian sputtering rendering described in the first aspect of this application are executed through the parallel sorting system.

[0016] The embodiments of this application have the following advantages: In this embodiment, the sorting of the key-value pair array to be sorted is decomposed into multiple passes of radix sorting based on M-bit data. Utilizing the parallel computing capabilities of the GPU, an independent workgroup is launched for each data block to perform parallel sorting, greatly optimizing the utilization of computing resources. Therefore, this method is suitable for the heterogeneous computing architecture of WebGPUs, fully leveraging the parallel advantages of graphics processors to achieve high-speed and stable sorting of millions of Gaussian primitive depth data in a Web environment, effectively overcoming the performance bottleneck of 3D Gaussian sputtering technology in Web applications.

[0017] Furthermore, this method employs a collaborative mechanism of "sorting controller-sorting calculator" and meticulous management of sorting tasks through multiple passes and blocks, ensuring the orderliness and controllability of the sorting process. By interpreting the depth keys bit-by-bit and processing them in multiple passes, it resolves the performance inconsistency issue of related solutions when deployed across platforms, significantly improving the robustness and success rate of the algorithm on diverse and heterogeneous Web platforms. Thus, it achieves an efficient and stable parallel sorting solution specifically designed for the Web environment, fundamentally solving the performance, stability, and compatibility challenges of deploying 3D Gaussian sputtering technology on the Web. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of a parallel sorting system provided in an embodiment of this application; Figure 2 This is a flowchart illustrating the steps of a cross-platform parallel sorting method for Web-based 3D Gaussian sputtering rendering, as provided in an embodiment of this application. Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] To better understand the technical solution of this application, the technical concepts involved in this application will be explained first.

[0022] Web Graphics Processing Unit (WebGPU): A graphics and computing application programming interface (API) for modern web applications. Designed to provide access to lower-level hardware capabilities of graphics processing units (GPUs), it natively supports general-purpose computing and is the next-generation standard for Web Graphics Interface (WebGL).

[0023] 3D Gaussian Splatting (3DGS): A computer graphics technique that uses a massive 3D Gaussian distribution as basic primitives to represent 3D scenes. To achieve correct transparency rendering, these primitives must be depth-sorted.

[0024] Graphics Processing Unit (GPU): A microprocessor specifically designed to perform image and graphics-related computations. Its massively parallel architecture makes it well-suited for performing general-purpose, parallelizable computational tasks, such as large-scale data sorting.

[0025] Central Processing Unit (CPU): The main processing unit of a computer system, responsible for interpreting and executing most computer program instructions.

[0026] Compute Shader: A programmable shader stage that allows programs to perform general-purpose parallel computation tasks on the GPU that are not directly related to the graphics rendering pipeline. The sorting computation in this application is mainly implemented through a series of compute shaders.

[0027] Workgroup: In the WebGPU computing model, GPU threads are organized into basic execution units. Threads within a workgroup can communicate and synchronize efficiently through shared memory and barriers.

[0028] Wait-Free Algorithm: An algorithm design paradigm in parallel computing. It requires each thread to complete its operation within a finite number of steps, unaffected by the execution speed, suspension, or failure of other threads. Therefore, threads do not need to wait for other threads to release resources or complete critical sections, thus avoiding overall performance inconsistencies due to scheduling or blocking. This property is stronger than ordinary lock-free algorithms because it provides a deterministic progress guarantee for each thread.

[0029] Spin-Wait: A thread synchronization technique in which one thread enters a loop (spinning) and repeatedly checks whether a certain condition is met (e.g., querying a global flag) while waiting for other threads to complete a task. This approach is risky in environments where hardware scheduling behavior is unpredictable.

[0030] Radix Sort: A non-comparative integer sorting algorithm. Its principle is to divide the integer into distinct digits and then sort each digit stably from the least significant digit to the most significant digit. This algorithm is particularly suitable for large-scale parallel implementation on GPUs.

[0031] Stable sorting is a sorting algorithm in which the relative order of equal elements remains unchanged before and after the sorting process.

[0032] Prefix Sum / Scan: A fundamental operation in parallel computing that, given an input array, computes an output array where each element is the sum of all preceding elements in the input array. It is a key component of many parallel algorithms, including radix sort.

[0033] In related technologies, web-based implementations mainly explore two technical routes. The first route is based on the traditional WebGL API. WebGL's design follows a traditional fixed rendering pipeline centered around triangle meshes. Because the WebGL standard itself lacks general-purpose parallel computing capabilities (i.e., it doesn't support compute shaders), developers had to move this crucial sequencing task from high-performance GPUs to the central processing unit (CPU) and execute it via JavaScript or WebAssembly (WASM). This compromise resulted in disastrous performance bottlenecks.

[0034] First, it introduces massive, bidirectional CPU-GPU data transfer overhead: in each frame, the depth information of millions of Gaussian primitives needs to be read back from GPU memory to CPU memory for sorting, and the sorted index list needs to be sent back to the GPU. Second, the parallel computing power of the CPU is far inferior to that of the GPU, making it inefficient when sorting millions of data points. These two factors together result in extremely poor scalability of WebGL-based solutions; once the scene complexity increases slightly, the frame rate drops sharply, making it completely impossible to achieve the "real-time" standard.

[0035] The second technical approach is based on the WebGPU API. WebGPU introduces computational shaders, allowing developers to leverage the powerful parallel computing capabilities of GPUs within a browser environment. Theoretically, this makes it possible to place sorting tasks entirely on the GPU. However, current practices generally suffer from a fundamental design flaw: they mostly simply and directly port high-performance parallel sorting algorithms designed for specific native environments (such as CUDA on NVIDIA platforms or DirectX 12 on Windows platforms) to the WebGPU environment. This approach ignores a crucial characteristic of the Web environment: hardware heterogeneity. Users' terminal devices vary widely, from desktops with high-end discrete graphics cards to MacBooks using M-series chips, to laptops and mobile smartphones with various integrated graphics cards. These native algorithms often make implicit assumptions about the underlying hardware scheduling behavior in their design.

[0036] A typical example is that many efficient GPU parallel sorting algorithms rely on a "spin wait" mechanism for synchronization between workgroups. This mechanism, after one workgroup completes its local task, waits for other workgroups to complete by repeatedly querying a global atomic variable. This synchronization method may be efficient on some GPU architectures (such as some NVIDIA GPUs) due to its deterministic scheduling order, but on other GPU architectures lacking such guarantees, it degenerates into endless "busy waiting," wasting GPU computation cycles and memory bandwidth, leading to drastic performance degradation, and even causing thread deadlocks, ultimately resulting in browser page crashes.

[0037] In summary, neither the related technologies based on WebGL nor WebGPU provide a solution for the large-scale parallel sorting necessary for stable and efficient execution of 3D Gaussian sputtering rendering in diverse and heterogeneous web environments. Therefore, a novel technical solution is urgently needed, specifically designed for the cross-platform nature of WebGPU, to fundamentally address the performance bottlenecks, stability issues, and compatibility problems of the related technologies.

[0038] To overcome the limitations of related technologies, this application provides a cross-platform parallel sorting method and system for Web-based 3D Gaussian sputtering rendering. This solution employs a "sorting controller-sorting calculator" collaborative mechanism, along with fine-grained management of sorting tasks in passes and blocks. The parallel sorting algorithm, implemented on the GPU using WebGPU computing shaders, avoids risky synchronization mechanisms and cleverly utilizes the WebGPU execution model, achieving stable and efficient parallel sorting of large-scale data in web browsers across various terminal devices.

[0039] This application provides a parallel sorting system, referring to... Figure 1 As shown, Figure 1 This is a schematic diagram of a parallel sorting system provided in an embodiment of this application. Specifically, the parallel sorting system includes a sorting controller deployed on a CPU and a sorting calculator deployed on a GPU. The steps of the cross-platform parallel sorting method for Web 3D Gaussian sputtering rendering provided in this application are executed through the parallel sorting system.

[0040] The parallel sorting system can be applied to any computing device that supports the WebGPU standard, including but not limited to desktop computers, laptops, smartphones, or tablets. This device includes at least one CPU, one GPU, and memory. The memory stores computer program instructions, which, when executed by the CPU and GPU, constitute the parallel sorting system. Specifically, the parallel sorting system receives an unsorted GPU data buffer (i.e., an array of key-value pairs to be sorted) as input and outputs a sorted GPU data buffer (i.e., a fully sorted array of key-value pairs).

[0041] In some embodiments, the parallel sorting system further includes an input interface deployed on the CPU. The sorting calculator includes a local histogram calculation module, a global offset calculation module, and a data scattering and writing module. The local histogram calculation module is a WebGPU computation shader program responsible for dividing the data to be sorted into blocks and calculating the local frequency distribution of the depth keys within each data block in parallel to obtain a global histogram buffer. The global offset calculation module is one or more WebGPU computation shader programs responsible for performing hierarchical parallel global prefix sum calculations on all local frequency distributions to determine the starting offset position of each depth key value in the final output array. The data scattering and writing module is a WebGPU computation shader program responsible for writing each key-value pair to be sorted to the final sorting position in the output buffer based on the global and local offsets.

[0042] When sorting using a parallel sorting system, an array of key-value pairs to be sorted is received via an input interface. The sorting controller, based on the sorting algorithm logic, divides the sorting of the key-value pair array into multiple sorting tasks and submits these tasks sequentially to the sorting calculator. The sorting calculator executes the received sorting tasks through the three modules mentioned above (local histogram calculation module, global offset calculation module, and data scattering writing module). After completing all sorting tasks, a fully sorted array of key-value pairs is obtained. Thus, this parallel sorting system achieves efficient and stable parallel sorting in a web environment, fundamentally solving the performance, stability, and compatibility challenges of deploying 3D Gaussian sputtering technology on the web.

[0043] This application also provides a cross-platform parallel sorting method for Web-based 3D Gaussian sputtering rendering, referring to... Figure 2 As shown, Figure 2 This is a flowchart illustrating the steps of a cross-platform parallel sorting method for Web-based 3D Gaussian sputtering rendering, as provided in an embodiment of this application. Figure 1 As shown, the method may include steps S210 to S240: Step S210: The sorting controller interprets each depth key in the key-value pair array to be sorted as an N-bit unsigned integer key, and divides each N-bit unsigned integer key into N / M passes according to M data bits. Each key-value pair in the key-value pair array to be sorted includes a depth key and a corresponding Gaussian primitive index value.

[0044] The key-value pair array to be sorted can be the Gaussian primitives corresponding to a frame of an image rendered in a 3D Gaussian sputtering rendering scene. Specifically, the key-value pair array to be sorted is usually stored in the GPU's input buffer and contains K elements (e.g., K is the number of Gaussian primitives in the scene). Each element is a key-value pair. The depth key of the key-value pair is a floating-point number (e.g., a 32-bit floating-point number) representing the depth of the Gaussian primitive (i.e., the depth value of the Gaussian primitive from the camera's perspective). The Gaussian primitive index value of the key-value pair is an unsigned integer (e.g., a 32-bit unsigned integer) serving as a unique index to the corresponding Gaussian primitive.

[0045] Before sorting begins, the sorting controller deployed on the CPU executes step S210. First, the sorting controller can schedule a computation shader to traverse the array of key-value pairs to be sorted in the input buffer, bitcasting each depth key into an N-bit unsigned integer key (where N can be 32 or 64), so that it can be sorted using an integer radix sorting algorithm later. Understandably, the converted N-bit unsigned integer key can be retained in the original input buffer or written to an intermediate buffer dedicated to sorting.

[0046] Next, the sorting controller divides each N-bit unsigned integer key into N / M passes, processing M bits of data for each N-bit unsigned integer key in each pass. Here, M is an integer greater than 0. For example, if N is 32 and M is 8, the 32-bit unsigned integer key is divided into 4 passes; if N is 32 and M is 11, it is divided into 3 passes; if N is 32 and M is 16, it is divided into 2 passes; and if N is 64 and M is 8, it is divided into 8 passes.

[0047] Step S220: Treat each pass of the data to be sorted as a sorting task and send this sorting task to the sorting calculator. Each pass of the data to be sorted includes M bits of data for all N-bit unsigned integer keys.

[0048] After step S210, the sorting controller enters a loop that will execute N / M passes. For each pass, the sorting controller treats the radix sort of the data to be sorted in each pass as a sorting task and sends it to the sorting calculator (deployed on the GPU). Specifically, the sorting controller can submit compute shader scheduling instructions to the sorting calculator through the WebGPU's command queue, so that the shader scheduling instructions can complete the stable radix sort of the data to be sorted.

[0049] In some embodiments, sending the current sorting task to the sorting calculator includes: the sorting controller sending the current sorting task to the sorting calculator in order from least significant bit to most significant bit.

[0050] In this embodiment, the stable sorting process of the N-bit unsigned integer is performed in order from the least significant bit to the most significant bit. That is, the sorting controller sends the sorting task to the sorting calculator in order from the least significant bit to the most significant bit. For example, if N is 32 and M is 8, then the stable sorting is performed in order from the least significant bit (bits 0-7) to the most significant bit (bits 24-31).

[0051] Step S230: Divide the data to be sorted in this sorting task into P data blocks using a sorting calculator, and start P working groups on the GPU to perform radix sorting on the P data blocks to obtain the sorting result for this pass.

[0052] The data block consists of multiple M-bit data corresponding to depth keys. Each data block is processed by a workgroup. The number of threads in the workgroup is equal to the number of depth keys in the data block. Each thread is responsible for sorting the M-bit data corresponding to a depth key. In other words, there is a one-to-one correspondence between the threads in the workgroup and the depth keys in the data block.

[0053] In this embodiment, the parallel computing capability of the GPU is utilized to start an independent working group for each data block, and the radix sorting algorithm is used to perform parallel sorting to obtain the sorting result of this pass. The sorting result of this pass refers to the key-value pair array in the output buffer after sorting according to the M bits of data in this pass.

[0054] This approach significantly optimizes the utilization of GPU computing resources. By placing the sorting task entirely on the GPU and employing a highly parallelized radix sort algorithm, the execution efficiency of this method far surpasses that of traditional CPU or WASM sorting schemes. Furthermore, by avoiding the performance pitfalls of heterogeneous hardware, its performance is consistently high and efficient across all platforms. Therefore, in 3D Gaussian sputtering rendering applications, this method can stably maintain a high frame rate, achieving a smooth real-time interactive experience.

[0055] Step S240: After each sorting task is completed, the sorting controller uses the sorting result of this pass as the sorting reference for the next sorting task and sends the next sorting task to the sorting calculator until N / M sorting tasks are completed, resulting in a fully sorted key-value pair array.

[0056] In this embodiment, the sorting result of each pass is obtained with the sorting result of the previous pass as a sorting reference. Therefore, after completing N / M passes of sorting, the array of key-value pairs to be sorted has been completely and stably sorted according to the size of an N-bit unsigned integer.

[0057] In practical applications, the sorting result of the current pass is used as the sorting reference for the next pass. Specifically, after completing a pass, the GPU's output buffer stores an array of key-value pairs sorted according to the M-bit data from the current pass (i.e., the sorting result of the current pass). The sorting controller then designates the output buffer as the input buffer for the next pass. The sorting controller then begins the next loop to process the radix sort of the next M-bit data.

[0058] Thus, after N / M passes of sorting, the array of key-value pairs to be sorted has been completely and stably sorted according to the size of the converted N-bit unsigned integer keys (equivalent to the original floating-point depth). The final output buffer contains the fully sorted array of key-value pairs, which can be directly used in the subsequent 3D Gaussian sputtering rendering process to ensure that primitives are drawn in the correct depth order.

[0059] The technical solution adopted in this application decomposes the sorting of the key-value pair array into multiple passes of radix sorting based on M-bit data, and utilizes the parallel computing capabilities of the GPU to start an independent working group for parallel sorting of each data block, greatly optimizing the utilization of computing resources. Therefore, this method is suitable for the heterogeneous computing architecture of WebGPU, and can fully leverage the parallel advantages of graphics processors, thereby achieving high-speed and stable sorting of millions of Gaussian primitive depth data in the Web environment, effectively breaking through the performance bottleneck of 3D Gaussian sputtering technology in Web applications.

[0060] Furthermore, this method employs a collaborative mechanism of "sorting controller-sorting calculator" and meticulous management of sorting tasks through multiple passes and blocks, ensuring the orderliness and controllability of the sorting process. By interpreting the depth keys bit-by-bit and processing them in multiple passes, it resolves the performance inconsistency issue of related solutions when deployed across platforms, significantly improving the robustness and success rate of the algorithm on diverse and heterogeneous Web platforms. Thus, it achieves an efficient and stable parallel sorting solution specifically designed for the Web environment, fundamentally solving the performance, stability, and compatibility challenges of deploying 3D Gaussian sputtering technology on the Web.

[0061] In one optional embodiment, the sorting task includes a first subtask, a second subtask, and a third subtask, and the sorting calculator includes a local histogram calculation module, a global offset calculation module, and a data scattering and writing module.

[0062] In this embodiment, each sorting task is decomposed into three sub-tasks, and these three sub-tasks are submitted to the sorting calculator for execution in sequence. Correspondingly, the sorting calculator includes three modules, each handling one sub-task: the partial histogram calculation module handles the first sub-task, the global offset calculation module handles the second sub-task, and the data scattering and writing module handles the third sub-task.

[0063] Specifically, step S220 above, "sending the current sorting task to the sorting calculator", may include: the sorting controller sequentially sending the first subtask, the second subtask, and the third subtask to the sorting calculator; wherein the second subtask is sent after the first subtask is completed, and the second subtask is sent after the third subtask is completed.

[0064] In this embodiment, the sorting controller sequentially sends the first subtask, the second subtask, and the third subtask to the sorting calculator. This can be achieved by submitting three independent compute shader scheduling instructions to the sorting calculator through the WebGPU's command queue. The sequential execution of the WebGPU's command queue ensures that the sorting controller executes these three subtasks in the order they are submitted, thus constituting an implicit, absolutely secure, and hardware-independent synchronization mechanism.

[0065] Furthermore, step S230 above, "dividing the data to be sorted in this sorting task into P data blocks using a sorting calculator, and starting P workgroups on the GPU to perform radix sorting on the P data blocks to obtain the sorting result for this pass," may include sub-steps S230-1 to S230-3: Step S230-1: In response to the first subtask, the local histogram calculation module divides the data to be sorted into P data blocks and starts P workgroups on the GPU to calculate the numerical frequency of M bits in the P data blocks in parallel, thereby obtaining a global histogram buffer; wherein, the global histogram buffer includes the histogram calculation values ​​of each workgroup, and the histogram calculation value is the number of elements with the same value in the workgroup.

[0066] In each loop, the sorting controller first sends (submits) the first subtask to the sorting calculator, and the local histogram calculation module of the sorting calculator responds to the first subtask by executing step S230-1.

[0067] Specifically, dividing the data to be sorted into P data blocks includes: dividing the data to be sorted into P data blocks according to the number of key-value pairs in the key-value pair array to be sorted and the size of the workgroup; wherein, P is K / L, K is the number of key-value pairs in the key-value pair array to be sorted, and L is the number of threads in the workgroup.

[0068] The size of the workgroup refers to the number of threads in the workgroup. For example, if the number of threads in the workgroup is 256 (L is 256) and the number of key-value pairs in the array of key-value pairs to be sorted is 32768 (K is 32768), then the data to be sorted can be divided into 128 (K / L=32768 / 256) data blocks, each containing 256 elements.

[0069] After dividing the data to be sorted into P data blocks, the local histogram calculation module starts P workgroups on the GPU. Each workgroup processes one data block, so as to calculate the numerical frequency of M bits of data in the P data blocks in parallel through the P workgroups.

[0070] Specifically, P workgroups are started on the GPU to calculate the numerical frequency of M bits of data within the P data blocks in parallel, and a global histogram buffer is obtained, including sub-steps S230-1-1 to S230-1-3: Step S230-1-1: The workgroup creates and initializes a local histogram in shared memory, the size of which is... .

[0071] The local histogram (local_histogram) is an array of integers. Initializing the local histogram involves setting the calculated values ​​of each histogram in the local histogram to 0. The size of the local histogram is... For example, if M is 8, the size of the local histogram is 256; if M is 16, the size of the local histogram is 65536.

[0072] Step S230-1-2: Each thread within the workgroup reads the corresponding depth key, extracts the value of the M-bit data for this sorting task, and uses atomic operations to update the local histogram based on the value. The value ranges from 0 to... Integers.

[0073] The working group comprises multiple threads working in parallel, each responsible for extracting the value of the M bits of data for its current sorting task. In some embodiments, a thread can extract the value of the current M bits of data through bitwise operations. The value d ranges from 0 to... For example, if M is 8, then the value ranges from 0 to 255.

[0074] The specific process of updating the local histogram using atomic operations based on the value is as follows: For the extracted value, the local histogram is incremented by 1. After all threads have finished executing, the updated local histogram is obtained. For example, if the value is d, the thread uses atomic addition operations to increment the histogram calculation value (local_histogram[d]) corresponding to the value d in the local histogram by 1. This step ensures that the count can be correctly accumulated even when multiple threads update the same local histogram simultaneously. For example, when multiple workgroup threads extract the value 42, they will sequentially increment the value of local_histogram

[42] through atomic operations.

[0075] Step S230-1-3: Synchronize the updated local histogram through barriers within the workgroup, and write the updated local histogram to the global histogram buffer after synchronization. The histogram calculation value in the updated local histogram is the number of elements with the same value within the workgroup. The size of the global histogram buffer is [size missing]. .

[0076] In this embodiment, the updated local histogram is synchronized using barriers within the workgroup to ensure that the local histogram is completely updated. Finally, after synchronization, the updated local histogram is written as a whole to the corresponding position in the global histogram buffer, the size of which is [size missing]. That is, the global histogram buffer is for each value (0 to 1). (of) reserved counting space for P workgroups.

[0077] Understandably, the updated local histogram is written to the global histogram buffer in parallel, with multiple threads within the workgroup each responsible for writing a count value (histogram calculation value) from the local histogram to the corresponding position in the global histogram buffer (wg_histograms).

[0078] Each working group calculates the digital frequency of the M-bit data within the data block according to steps S230-1-1 to S230-1-3 above to obtain a global histogram buffer, in which the histogram information of each working group is stored.

[0079] The method described in this application leverages the shared memory and atomic operation features of the GPU working group to achieve efficient parallel histogram statistics. This provides accurate frequency distribution data for the subsequent radix sorting stage, ensuring the efficiency and stability of the entire sorting process. This makes the method particularly suitable for implementation on cross-platform graphics APIs such as WebGPU, providing a reliable sorting foundation for 3D Gaussian sputtering rendering.

[0080] Step S230-2: In response to the second subtask, the global offset calculation module performs hierarchical parallel global prefix sum calculation on the global histogram buffer to obtain a first offset buffer and a second offset buffer; wherein, the first offset buffer includes the prefix sum value of each workgroup, the prefix sum value is the number of elements with the same value in all workgroups that are less than the current workgroup index, and the global offset value in the second offset buffer is the number of elements that are less than the current value.

[0081] In each loop, after the first task is completed, the sorting controller sends (submits) the second subtask to the sorting calculator. The global offset calculation module of the sorting calculator responds to the second subtask by executing step S230-2, which is to perform hierarchical parallel global prefix sum calculation on the global histogram buffer obtained in step S230-1 above (including local prefix sum calculation within P workgroups and global merging of local prefix sum results) to generate two offset buffers.

[0082] Specifically, performing layered parallel global prefix sum calculations on the global histogram buffer to obtain a first offset buffer and a second offset buffer may include sub-steps S230-2-1 to S230-2-2: Step S230-2-1: Based on the global histogram buffer, perform hierarchical parallel prefix sum calculation for each value to obtain the first offset buffer, the size of the first offset buffer being the same as the size of the global histogram buffer.

[0083] Specifically, for each value d (0 to 1), A hierarchical parallel prefix sum (Blelloch) calculation is performed on the integer (d), which counts the value d across all workgroups and generates a first offset buffer (wg_prefixes) based on the calculation result. After the calculation is complete, the first offset buffer contains the prefix sum value of each workgroup. This prefix sum value is the number of elements with the same value in all workgroups with indices less than the current workgroup index; for example, the value of wg_prefixes[d][wg] is equal to the number of elements with the value d in all workgroups with indices less than wg. That is, the prefix sum value can be understood as the exclusive offset of the value d within workgroup wg.

[0084] Step S230-2-2: Based on the global histogram buffer and the first offset buffer, calculate the global total for each value to obtain a temporary global total array, and perform a prefix sum calculation on the temporary global total array to obtain a second offset buffer; wherein, the global total represents the number of elements with the same value in all workgroups, and the size of the second offset buffer is [missing information]. .

[0085] Specifically, based on the global histogram buffer and the first offset buffer, the global total number of each value is calculated to obtain a temporary array of global total numbers, including: obtaining the histogram calculation value of the value in the last working group from the global histogram buffer, and obtaining the prefix sum value of the value in the last working group from the first offset buffer; adding the histogram calculation value and the prefix sum value to obtain the global total number of values; and obtaining the temporary array of global total numbers by traversing all values.

[0086] Each workgroup corresponds to an index, and the last workgroup can be the workgroup that is last in the index sort. For example, the global total of the value d, total[d], can be represented as the sum of the histogram calculation value (wg_histograms[d][last_wg]) of the last workgroup and the prefix sum value (wg_prefixes[d][last_wg]) of the last workgroup, where last_wg represents the index of the last workgroup.

[0087] The size of the temporary array for the global total count is... The second offset buffer (global_offsets) is obtained by performing a prefix sum calculation on the temporary array of global totals. The global offset value in the second offset buffer is the number of all elements less than the current value. For example, the global offset value global_offsets[0] is 0, the global offset value global_offsets[1] is the number of all elements with a value of 0, and the global offset value global_offsets[2] is the sum of the number of all elements with values ​​of 0 and 1.

[0088] The method described in this application, utilizing a hierarchical parallel prefix sum computation architecture, effectively solves the global offset calculation problem in large-scale data sorting, that is, for Each value is calculated independently using prefix sums, fully utilizing the parallel processing capabilities of the GPU. By employing two-level scanning—both within the workgroup and globally—a balance is struck between computational efficiency and memory access patterns. This method provides accurate global location information for the subsequent data scattering and writing stage, ensuring the stability and high performance of large-scale primitive sorting in Gaussian sputtering rendering.

[0089] Step S230-3: In response to the third subtask, the data scattering and writing module writes each key-value pair to the final sorting position of the output buffer according to the first offset buffer and the second offset buffer, and obtains the sorting result of this pass.

[0090] In each loop, after the second task is completed, the sorting controller sends (submits) the third subtask to the sorting calculator. The data scattering and writing module of the sorting calculator responds to the third subtask by executing step S230-3, that is: restarting P workgroups, each workgroup processing the same data block as the first subtask, thereby writing each key-value pair to the final sorting position in the output buffer according to the first offset buffer and the second offset buffer.

[0091] Specifically, the working group writes each key-value pair to the final sorting position in the output buffer based on the first offset buffer and the second offset buffer, to obtain the sorting result for this pass, including sub-steps S230-3-1 to S230-3-3: Step S230-3-1: Each thread in the workgroup reads the corresponding depth key, extracts the value of the M-bit data of this sorting task, and calculates the local offset value based on the extracted value. The local offset value represents the number of elements with the same value in the data block before the current thread.

[0092] In some embodiments, a thread can extract the value of the current M bits of data through bit operations, where the value d ranges from 0 to... For example, if M is 8, then the value ranges from 0 to 255.

[0093] The local offset value represents the number of elements with the same value in the data block preceding the current thread. It can be understood as: how many other elements in the data block before the current thread also have the value 'd'. Specifically, calculating the local offset value based on the extracted values ​​can be done within the workgroup through traversal or a more efficient parallel method.

[0094] Step S230-3-2: Each thread in the workgroup determines the prefix sum value from the first offset buffer and the global offset value from the second offset buffer based on the extracted values.

[0095] Specifically, each thread can query the first offset buffer and the second offset buffer based on the extracted value to determine the prefix sum and global offset value corresponding to that value.

[0096] Step S230-3-3: Add the local offset value, the prefix sum value, and the global offset value to obtain the final sorting position, and write each key-value pair into the final sorting position to obtain the sorting result for this pass.

[0097] For example, the final sort position final_pos can be represented as: final_pos = global_offsets[d] + wg_prefixes[d][wg_id] + rank_in_digit, Where global_offsets[d] represents the global offset value corresponding to the value d; wg_prefixes[d][wg_id] represents the prefix sum value corresponding to the value d in the work group wg_id, where wg_id is the ID of the current work group; and rank_in_digit represents the local offset value.

[0098] Finally, the thread writes the corresponding key-value pairs to the output buffer according to the final sorting position, thus obtaining the sorting result for this pass.

[0099] Thus, by combining the local offset value, the prefix sum value, and the global offset value, it is ensured that each element is written to a unique and correct position; and by introducing the local offset value, it is guaranteed that elements with the same value within the same workgroup maintain their original relative order, achieving stable sorting.

[0100] The technical solution adopted in this application clearly divides each sorting task into three ordered subtasks, which are then processed separately by dedicated modules, achieving efficient task parallelism and data parallelism. Furthermore, each subtask is submitted to the sorting calculator in a specific order by the sorting controller, ensuring that the sorting calculator executes these tasks sequentially according to the submission order. This constitutes an implicit, absolutely secure, and hardware-independent synchronization mechanism. This method is particularly suitable for cross-platform deployment on modern graphics APIs such as WebGPU, providing reliable sorting performance guarantees for real-time rendering.

[0101] In summary, the cross-platform parallel sorting method for 3D Gaussian sputtering rendering described in this application has the following significant advantages compared to related technologies: 1) Excellent cross-platform compatibility and operational stability: This method employs a "sorting controller-sorting calculator" collaborative mechanism to perform fine-grained management of sorting tasks in passes and blocks. Therefore, it does not rely on the hardware scheduling behavior of any specific vendor's GPU, fundamentally solving the "spin wait" synchronization problem commonly encountered when directly porting native algorithms. This ensures that the sorting algorithm can run stably and efficiently on diverse hardware platforms, including various mobile chips, without deadlocks. This addresses the core pain point of inconsistent performance or even crashes in existing WebGPU solutions when deployed across platforms.

[0102] 2) Extremely high sorting performance and efficiency: By placing the sorting task entirely on the GPU and employing a highly parallelized radix sort algorithm, this method's execution efficiency far surpasses traditional CPU or WASM sorting schemes. Furthermore, by avoiding the performance pitfalls of heterogeneous hardware, its performance is consistently high and efficient across all platforms. In 3D Gaussian sputtering rendering applications, this translates to the ability to stably maintain high frame rates and achieve a smooth, real-time interactive experience.

[0103] 3) A clear and maintainable modular design decomposes the complex parallel sorting process into a series of logically independent computation shader modules, driven by the WebGPU command queue. This design not only ensures synchronization safety but also makes the algorithm's logic very clear, easy to understand, implement, and debug, lowering the barrier to developing complex GPU computing applications in a Web environment.

[0104] This application also provides an electronic device, see embodiments thereof. Figure 3 , Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of this application. For example... Figure 3 As shown, the electronic device 300 includes a memory 310 and a processor 320. The memory 310 and the processor 320 are connected via a bus for communication. The memory 310 stores a computer program that can run on the processor 320 to implement the steps of the cross-platform parallel sorting method for Web-oriented 3D Gaussian sputtering rendering described in the embodiments of this application.

[0105] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the cross-platform parallel sorting method for Web-oriented 3D Gaussian sputtering rendering described in this application.

[0106] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the cross-platform parallel sorting method for Web-oriented 3D Gaussian sputtering rendering described in this application.

[0107] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0108] This application describes embodiments of methods and apparatus according to flowchart illustrations and / or block diagrams. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0109] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0110] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0111] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0112] Finally, 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 terminal device 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 terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0113] The foregoing has provided a detailed description of a cross-platform parallel sorting method and system for Web-based 3D Gaussian sputtering rendering. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and its core ideas. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A cross-platform parallel sorting method for Web-based 3D Gaussian sputtering rendering, characterized in that, include: The sorting controller interprets each depth key in the key-value pair array to be sorted as an N-bit unsigned integer key, and divides each N-bit unsigned integer key into N / M passes according to M data bits. Each key-value pair in the key-value pair array to be sorted includes a depth key and a corresponding Gaussian primitive index value. Each pass of radix sorting of the data to be sorted is treated as a sorting task, and this sorting task is sent to the sorting calculator. Each pass of data to be sorted includes M bits of data for all N-bit unsigned integer keys. The sorting calculator divides the data to be sorted in this sorting task into P data blocks, and starts P working groups on the GPU to perform radix sorting on the P data blocks to obtain the sorting result of this pass. After each sorting pass is completed, the sorting controller uses the sorting result of the current pass as a sorting reference for the next pass and sends the next pass to the sorting calculator until N / M passes are completed, resulting in a fully sorted array of key-value pairs.

2. The method according to claim 1, characterized in that, The sorting task includes a first subtask, a second subtask, and a third subtask. The sorting calculator includes a local histogram calculation module, a global offset calculation module, and a data scattering and writing module. The sorting calculator divides the data to be sorted in this pass into P data blocks, and P working groups are started on the GPU to perform radix sorting on the P data blocks, obtaining the sorting result for this pass, including: In response to the first subtask, the local histogram calculation module divides the data to be sorted into P data blocks and starts P workgroups on the GPU to calculate the numerical frequency of M bits in the P data blocks in parallel, thereby obtaining a global histogram buffer; wherein, the global histogram buffer includes the histogram calculation values ​​of each workgroup, and the histogram calculation value is the number of elements with the same value in the workgroup. In response to the second subtask, the global offset calculation module performs hierarchical parallel global prefix sum calculation on the global histogram buffer to obtain a first offset buffer and a second offset buffer. The first offset buffer includes the prefix sum value of each workgroup, and the prefix sum value is the number of elements with the same value in all workgroups with a value less than the current workgroup index. The global offset value in the second offset buffer is the number of elements with a value less than the current value. In response to the third subtask, the data scattering and writing module writes each key-value pair to the final sorting position in the output buffer based on the first offset buffer and the second offset buffer, thus obtaining the sorting result for this pass.

3. The method according to claim 2, characterized in that, The data to be sorted is divided into P data blocks, including: Based on the number of key-value pairs in the array of key-value pairs to be sorted and the size of the workgroup, the data to be sorted is divided into P data blocks; Where P is K / L, K is the number of key-value pairs in the array of key-value pairs to be sorted, and L is the number of threads in the workgroup.

4. The method according to claim 2, characterized in that, On the GPU, P workgroups are launched to compute the digital frequency of M bits of data within the P data blocks in parallel, resulting in a global histogram buffer, including: The working group creates and initializes a local histogram in shared memory, the size of which is... ; Each thread within the workgroup reads the corresponding depth key, extracts the value of the M bits of data for this sorting task, and uses atomic operations to update the local histogram based on the value. The value ranges from 0 to... Integers; The updated local histogram is synchronized using barriers within the workgroup, and then written to the global histogram buffer after synchronization. The histogram value in the updated local histogram represents the number of elements with the same value within the workgroup. The size of the global histogram buffer is [size missing]. .

5. The method according to claim 2, characterized in that, The global histogram buffer is subjected to hierarchical parallel global prefix sum calculation to obtain a first offset buffer and a second offset buffer, including: Based on the global histogram buffer, a hierarchical parallel prefix sum calculation is performed on each value to obtain the first offset buffer, the size of which is the same as the size of the global histogram buffer; Based on the global histogram buffer and the first offset buffer, the global total for each value is calculated to obtain a temporary array of global totals. A prefix sum is then performed on this temporary array to obtain a second offset buffer. Here, the global total represents the number of elements with the same value across all workgroups, and the size of the second offset buffer is [size missing]. .

6. The method according to claim 5, characterized in that, Based on the global histogram buffer and the first offset buffer, the global total for each value is calculated, resulting in a temporary array of global totals, including: Obtain the histogram calculation value of the value in the last working group from the global histogram buffer, and obtain the prefix sum value of the value in the last working group from the first offset buffer; The total number of values ​​is obtained by adding the calculated histogram value and the prefix sum value. By iterating through all the values, a temporary array of the total global count is obtained.

7. The method according to claim 2, characterized in that, The working group writes each key-value pair to its final sorting position in the output buffer based on the first offset buffer and the second offset buffer, obtaining the sorting result for this pass, including: Each thread in the workgroup reads the corresponding depth key, extracts the value of the M bits of data in this sorting task, and calculates the local offset value based on the extracted value. The local offset value represents the number of elements with the same value in the data block before the current thread. Each thread within the workgroup determines the prefix sum value from the first offset buffer and the global offset value from the second offset buffer based on the extracted values. The local offset value, the prefix sum value, and the global offset value are added together to obtain the final sorting position, and each key-value pair is written into the final sorting position to obtain the sorting result for this pass.

8. The method according to any one of claims 2-7, characterized in that, Sending this sorting task to the sorting calculator includes: The sorting controller sequentially sends the first subtask, the second subtask, and the third subtask to the sorting calculator; wherein the second subtask is sent after the first subtask is completed, and the second subtask is sent after the third subtask is completed.

9. The method according to any one of claims 1-7, characterized in that, Sending this sorting task to the sorting calculator includes: The sorting controller sends the sorting task to the sorting calculator in order from least significant bit to most significant bit.

10. A parallel sorting system, characterized in that, include: A sorting controller deployed on a CPU and a sorting calculator deployed on a GPU perform the steps of the cross-platform parallel sorting method for Web 3D Gaussian sputtering rendering as described in any of claims 1-9 through the parallel sorting system.