A method, apparatus, device, and storage medium for parallel processing of Cartesian grid data for aircraft based on reordering and self-scheduling.

By reordering and self-scheduling the Cartesian grid, the grid cell processing task is transformed into a cell face processing task using the breadth-first search algorithm and the transformation algorithm. Through GPU thread self-scheduling, the problem of low efficiency of GPU parallel strategies in the prior art is solved, and efficient parallel processing and accuracy improvement are achieved.

CN121300959BActive Publication Date: 2026-03-06CALCULATION AERODYNAMICS INST CHINA AERODYNAMICS RES & DEV CENT
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing GPU parallel strategies are inefficient in Cartesian grid data processing, making it difficult to fully utilize the computing potential of GPUs. Furthermore, grid coloring methods weaken the implicit properties of the algorithm, leading to a decrease in residual convergence accuracy.

Method used

The method employs reordering and self-scheduling. It uses a preset breadth-first search algorithm to reorder the Cartesian grid, and a preset transformation algorithm to convert grid cell processing tasks into cell face processing tasks. It also performs hierarchical partitioning based on the dependencies between cell faces and uses GPU threads for self-scheduling to ensure that tasks are processed only when the number of dependent cell faces reaches a preset number; otherwise, it releases computing resources and enters a sleep state.

Benefits of technology

It improves the parallel processing efficiency of Cartesian grid data, ensures data dependencies while avoiding global synchronization, and enhances computational efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121300959B_ABST
    Figure CN121300959B_ABST
Patent Text Reader

Abstract

This application discloses a parallel processing method, apparatus, device, and storage medium for Cartesian grid data of aircraft based on reordering and self-scheduling, relating to the field of aircraft parallel technology. The method includes: traversing each cell in the initial Cartesian grid of the aircraft using a preset breadth-first search algorithm to obtain a traversal sequence; numbering each cell to obtain a reordered Cartesian grid; converting the processing tasks of each grid cell in the reordered Cartesian grid into cell surface processing tasks; performing hierarchical partitioning based on the dependencies of each cell surface to obtain a hierarchical partitioning result; allocating each cell surface processing task to independent GPU threads based on the corresponding scheduling order; performing self-scheduling of each cell surface based on the calling order; using GPU threads to determine whether the number of dependent cell surfaces corresponding to a cell surface is a preset number; if so, calling GPU threads to process the cell surface processing task to obtain the corresponding processing result, thereby improving the parallel efficiency of processing Cartesian grid data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of aircraft technology, and in particular to a method, apparatus, device, and storage medium for parallel processing of Cartesian grid data for aircraft based on reordering and self-scheduling. Background Technology

[0002] Currently, Cartesian meshes are widely used in computational fluid dynamics (CFD) due to their advantages such as high automation in mesh generation, strong adaptability to complex shapes, and low discretization difficulty of governing equations. In recent years, with the continuous improvement of graphics processing unit (GPU) performance, efficiently porting CFD algorithms to GPU architectures has become particularly important. The implicit lower-upper symmetric Gauss-Seidel (LU-SGS) algorithm, with its high accuracy, high efficiency, low computational complexity, and moderate memory requirements, has become a widely adopted solution method in CFD engineering software, and it also performs excellently on Cartesian meshes.

[0003] However, the inherent serial nature of the LU-SGS (Lower-Upper Symmetric Gauss-Seidel) algorithm severely limits its efficient parallel computation on GPUs. Existing GPU parallel strategies mainly achieve parallel computation by decoupling or coloring the mesh data. Mesh data decoupling methods are generally inefficient and fail to fully utilize the computational potential of GPUs; while mesh coloring methods, by altering the dependencies of the original data, weaken the implicit characteristics of the algorithm, leading to a decrease in residual convergence accuracy.

[0004] As can be seen from the above, how to improve the efficiency of parallel processing of Cartesian grid data of aircraft based on reordering and self-scheduling is an urgent problem to be solved. Summary of the Invention

[0005] In view of this, the purpose of this invention is to provide a method, apparatus, device, and storage medium for parallel processing of aircraft Cartesian grid data based on reordering and self-scheduling, which can improve the efficiency of parallel processing of aircraft Cartesian grid data in the process of parallel processing of aircraft Cartesian grid data based on reordering and self-scheduling. The specific solution is as follows:

[0006] Firstly, this application provides a parallel processing method for Cartesian grid data of aircraft based on reordering and self-scheduling, including:

[0007] A pre-defined breadth-first search algorithm is used to traverse each cell in each initial Cartesian grid corresponding to the aircraft to obtain a traversal sequence. Based on the traversal sequence and the physical location of each cell, the faces of each cell in the initial Cartesian grid are clustered and numbered to obtain a reordered Cartesian grid. The numbers of adjacent cells in the reordered Cartesian grid in physical space are consecutive.

[0008] A preset conversion algorithm is used to convert the processing tasks of each grid cell in the reordered Cartesian grid into corresponding cell surface processing tasks. Based on the dependencies between each cell surface, the reordered Cartesian grid is hierarchically partitioned to obtain a hierarchical partitioning result. The cell surface processing tasks corresponding to each cell surface are then allocated to independent GPU threads based on the scheduling order corresponding to the hierarchical partitioning result. The hierarchical value corresponding to the hierarchical partitioning result is negatively correlated with the degree of independence corresponding to the cell surface. The cell surface is a cell surface generated based on each cell in the reordered Cartesian grid.

[0009] Based on the calling order, the unit surface processing tasks are self-scheduled for each unit surface. Then, the GPU thread is used to determine whether the number of dependent unit surfaces corresponding to the unit surface is a preset number. If so, the GPU thread is called to process the unit surface processing task, and the subsequent dependent threads corresponding to the GPU thread are woken up. If not, the computing resources are actively released and the system enters a sleep state to obtain the processing result corresponding to the spacecraft. The number of dependent unit surfaces is the number of unit surfaces that each preceding unit surface corresponding to the unit surface completes its respective unit surface processing task.

[0010] Optionally, the step of traversing each cell face in each initial Cartesian grid corresponding to the aircraft using a preset breadth-first search algorithm to obtain a traversal sequence, and then clustering and numbering each cell face in the initial Cartesian grid based on the traversal sequence and the physical position of each cell face to obtain a reordered Cartesian grid, includes:

[0011] Traverse all cells in the initial Cartesian grid and determine the connection relationships between each cell. Then, based on each connection relationship, construct an adjacency table to represent the adjacency relationship between each cell and a neighbor count array to record the number of neighbor cells of each cell.

[0012] The starting cell for traversal is determined based on the adjacency list and the neighbor count array. Then, a preset breadth-first search algorithm is used to traverse each cell in the initial Cartesian grid based on the starting cell to obtain a traversal sequence. The starting cell is the cell with the smallest number of neighboring cells among all the cells. The number of neighboring faces corresponding to each cell in the traversal sequence increases sequentially.

[0013] The physical location corresponding to each cell in the initial Cartesian grid is determined, and the cells in the traversal sequence are clustered and numbered using the physical location and the number of each neighbor cell to obtain a reordered Cartesian grid.

[0014] The physical location corresponding to each cell face in the initial Cartesian grid is determined, and the cell faces in the traversal sequence are clustered and numbered using the physical location and the number of each neighbor cell to obtain a reordered Cartesian grid.

[0015] Optionally, the step of converting the processing task of each grid cell in the reordered Cartesian grid into a corresponding cell surface processing task using a preset conversion algorithm includes:

[0016] The LU-SGS algorithm is equivalently transformed using a preset equivalent transformation rule to obtain the transformed algorithm. The processing tasks of each grid cell in the reordered Cartesian grid are determined. Then, the processing tasks of each grid cell are transformed using the transformed algorithm and a preset transformation algorithm to obtain the corresponding cell surface processing tasks. The calculation methods corresponding to the grid cell processing tasks are upper triangular calculation method and lower triangular calculation method.

[0017] Optionally, the step of hierarchically partitioning the reordered Cartesian mesh based on the dependencies of each unit face to obtain a hierarchical partitioning result, and allocating the unit face processing tasks corresponding to each unit face to each independent GPU thread according to the scheduling order corresponding to the hierarchical partitioning result, includes:

[0018] Determine the mesh cells associated with each of the cell faces in the reordered Cartesian mesh, so as to identify the dependency information between each of the cell faces in the reordered Cartesian mesh based on each of the mesh cells;

[0019] Based on the dependency information, determine the current level cell face that does not depend on the other cell faces that have not completed the computation task, and set the level corresponding to each current level cell face as the current level. Then, based on the dependency information, determine new current level cell faces that only have a dependency relationship with each current level cell face in the current level, and update the current level to set the level corresponding to each current level cell face as the current level. This process continues until each cell face in the reordered Cartesian grid is divided, and the level division result is obtained.

[0020] In the hierarchical division result, the data processing of each subsequent level of the unit surface of the first level depends only on the data processing result of the unit surface of the previous level or even earlier level.

[0021] Each of the aforementioned unit surfaces is set as a parallel unit, and the unit surface processing tasks corresponding to each of the aforementioned unit surfaces are allocated to each independent GPU thread based on the scheduling order corresponding to the hierarchical partitioning results. Then, the unit surface number corresponding to the GPU thread is determined based on the unit surface processing tasks.

[0022] Optionally, the self-scheduling of cell surface processing tasks based on the calling order includes:

[0023] The invocation order is determined based on the processing stages; the processing stages include a pre-scan processing stage and a post-scan processing stage.

[0024] If the processing stage is characterized as the pre-scanning processing stage, then the unit surface processing tasks corresponding to the hierarchical division result are self-scheduled according to the hierarchical values ​​from smallest to largest to obtain the first scheduling result.

[0025] If the processing stage is characterized as the post-scanning processing stage, then the unit surface processing tasks corresponding to the level division result are self-scheduled and processed in descending order of the level values ​​to obtain a second scheduling result. Based on the first scheduling result and the second scheduling result, a target scheduling result is determined so as to process the unit surface processing tasks corresponding to each unit surface based on the scheduling result.

[0026] Optionally, the step of using the GPU thread to determine whether the number of dependent unit faces corresponding to the unit face is a preset number, if yes, then calling the GPU thread to process the unit face processing task and waking up the subsequent dependent threads corresponding to the GPU thread; if no, then actively releasing computing resources and entering a sleep state, obtaining the processing result corresponding to the spacecraft, including:

[0027] Configure a corresponding dependency counter for each of the aforementioned unit surfaces; wherein, the dependency counter is used to record the number of preceding unit surfaces whose data processing is not completed for the unit surface; the preceding unit surface is a unit surface that has a dependency relationship with the unit surface, and the level value corresponding to the preceding unit surface is less than the level value corresponding to the unit surface.

[0028] The GPU thread is used to obtain the current number of dependent cell faces stored in the dependency counter corresponding to the corresponding cell face, and it is determined whether the current number of dependent cell faces is greater than a preset number. If the current number of dependent cell faces is not greater than the preset number, the GPU thread is called to process the cell face processing task, and the subsequent dependent threads corresponding to the GPU thread are woken up.

[0029] If the current number of dependent cell faces is greater than a preset number, it indicates that there are cell faces in the preceding cell faces corresponding to the cell face that have not completed the corresponding cell face processing task. The state of the GPU thread is set to busy waiting state, and then the corresponding computing resources are actively released and the GPU thread enters a sleep state. The corresponding dependency counter is checked repeatedly until the current number of dependent cell faces is not greater than the preset number. The GPU thread is then called to process the cell face processing task and obtain the processing result corresponding to the Cartesian grid of the aircraft.

[0030] Whenever data processing corresponding to a preceding cell face is completed, the number of current dependent cell faces stored in the dependency counter is decremented by one.

[0031] Optionally, after invoking the GPU thread to process the unit surface processing task and waking up the subsequent dependent threads corresponding to the GPU thread; otherwise, actively releasing computing resources and entering a sleep state, and obtaining the processing result corresponding to the spacecraft, the method further includes:

[0032] Based on the dependency relationship, each subsequent unit surface corresponding to the unit surface is determined; wherein, each subsequent unit surface is a unit surface that has a dependency relationship with the unit surface, and the level value corresponding to the subsequent unit surface is greater than the level value corresponding to the unit surface;

[0033] An atomic subtraction operation is performed on the current number of dependent cell surfaces stored in the dependency counter corresponding to each of the aforementioned post-cell surfaces to obtain the atomic subtraction operation result. The GPU thread is then invoked to process the preset memory barrier primitive to ensure that each of the aforementioned post-cell surfaces obtains the atomic subtraction operation result.

[0034] Secondly, this application provides a parallel processing device for aircraft Cartesian grid data based on reordering and self-scheduling, comprising:

[0035] The traversal sequence determination module is used to traverse each cell in each initial Cartesian grid corresponding to the aircraft using a preset breadth-first search algorithm to obtain a traversal sequence, and to cluster and number each cell face in the initial Cartesian grid based on the traversal sequence and the physical position of each cell to obtain a reordered Cartesian grid; the numbers of adjacent cells in the reordered Cartesian grid in physical space are consecutive.

[0036] The hierarchical partitioning result determination module is used to convert the processing tasks of each grid cell in the reordered Cartesian grid into corresponding cell surface processing tasks using a preset conversion algorithm, and to perform hierarchical partitioning of the reordered Cartesian grid based on the dependency relationship of each cell surface to obtain the hierarchical partitioning result. The cell surface processing tasks corresponding to each cell surface are then allocated to independent GPU threads based on the scheduling order corresponding to the hierarchical partitioning result. The hierarchical value corresponding to the hierarchical partitioning result is negatively correlated with the degree of independence corresponding to the cell surface. The cell surface is a cell surface generated based on each cell in the reordered Cartesian grid.

[0037] The processing result determination module is used to perform self-schedule of unit surface processing tasks for each of the unit surfaces based on the calling order. Then, it uses the GPU thread to determine whether the number of dependent unit surfaces corresponding to the unit surface is a preset number. If so, it calls the GPU thread to process the unit surface processing task and wakes up the subsequent dependent threads corresponding to the GPU thread. If not, it actively releases computing resources and enters a sleep state to obtain the processing result corresponding to the spacecraft. The number of dependent unit surfaces is the number of unit surfaces that each preceding unit surface corresponding to the unit surface completes its respective unit surface processing task.

[0038] Thirdly, this application provides an electronic device, comprising:

[0039] Memory, used to store computer programs;

[0040] A processor is used to process the computer program to implement the aforementioned parallel processing method for aircraft Cartesian grid data based on reordering and self-scheduling.

[0041] Fourthly, this application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when processed by a processor, implements the aforementioned parallel processing method for aircraft Cartesian grid data based on reordering and self-scheduling.

[0042] As can be seen from the above, before performing parallel processing of the Cartesian grid data of the aircraft based on reordering and self-scheduling, this application needs to use a preset breadth-first search algorithm to traverse each cell in each initial Cartesian grid corresponding to the aircraft to obtain a traversal sequence. Based on the traversal sequence and the physical location of each cell, the cells in the initial Cartesian grid are clustered and numbered to obtain a reordered Cartesian grid. A preset transformation algorithm is used to convert the processing tasks of each grid cell in the reordered Cartesian grid into corresponding cell surface processing tasks. Based on the dependency relationship of each cell surface, the reordered Cartesian grid is hierarchically partitioned to obtain a hierarchical partitioning result. The cell surface processing tasks corresponding to each cell surface are allocated to each independent GPU thread according to the scheduling order corresponding to the hierarchical partitioning result. The cell surface processing tasks are self-scheduled for each cell surface based on the calling order. Then, the GPU thread is used to determine whether the number of dependent cell surfaces corresponding to the cell surface is a preset number. If so, the GPU thread is called to process the cell surface processing task and wakes up the subsequent dependent threads corresponding to the GPU thread. If not, the computing resources are actively released and the system enters a sleep state to obtain the processing result corresponding to the aircraft.

[0043] Therefore, this application first uses a pre-defined breadth-first search algorithm to traverse each cell in the initial Cartesian grid corresponding to the aircraft, obtaining a traversal sequence. Based on the traversal sequence and the physical location of each cell, the cells in the initial Cartesian grid are clustered and numbered to obtain a reordered Cartesian grid. Second, a pre-defined transformation algorithm is used to convert the processing tasks of each grid cell in the reordered Cartesian grid into corresponding cell surface processing tasks. Based on the dependencies of each cell surface, the reordered Cartesian grid is hierarchically partitioned to obtain a hierarchical partitioning result. The cell surface processing tasks corresponding to each cell surface are allocated to each independent GPU thread according to the scheduling order corresponding to the hierarchical partitioning result. Then, the cell surface processing tasks are self-scheduled for each cell surface based on the calling order. The GPU thread then determines whether the number of dependent cell surfaces corresponding to the cell surface is a preset number. If so, the GPU thread is called to process the cell surface processing task and wakes up the subsequent dependent threads corresponding to the GPU thread. If not, the computing resources are actively released and the process enters a sleep state to obtain the processing result corresponding to the aircraft. In this way, the efficiency of parallel processing of aircraft Cartesian grid data based on reordering and self-scheduling is improved, thereby avoiding global synchronization while ensuring data dependencies. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0045] Figure 1 This is a flowchart of a parallel processing method for Cartesian grid data of an aircraft based on reordering and self-scheduling disclosed in this application;

[0046] Figure 2 This is a flowchart of a specific method for layering a Cartesian mesh using level set rules, as disclosed in this application.

[0047] Figure 3 This is a schematic diagram illustrating a specific example of thread decoupling based on cell plane scheduling disclosed in this application;

[0048] Figure 4 This application discloses a specific one Figure 4 This is a schematic diagram of the thread hierarchy before and after the reordering of the scheduling order in a cell plane. Figure 4 (a) is a schematic diagram of the thread hierarchy before reordering. Figure 4 (b) is a schematic diagram of the thread hierarchy after reordering;

[0049] Figure 5 This is a schematic diagram of the system matrix corresponding to the Cartesian grid before and after CMK grid reordering, as disclosed in this application; wherein, Figure 5 (a) is a schematic diagram of the system matrix corresponding to the Cartesian grid before CMK grid reordering. Figure 5 (b) is a schematic diagram of the system matrix corresponding to the Cartesian grid after the CMK grid is reordered;

[0050] Figure 6 This is a schematic diagram illustrating the result of data processing using the method disclosed in this application and other methods.

[0051] Figure 7 This is a schematic diagram of the structure of a parallel processing device for Cartesian grid data of an aircraft based on reordering and self-scheduling disclosed in this application;

[0052] Figure 8 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0054] Currently, Cartesian grids are widely used in computational fluid dynamics due to their advantages such as high automation in grid generation, strong adaptability to complex shapes, and low difficulty in discretizing governing equations. However, the inherent serial nature of the LU-SGS algorithm greatly limits its efficient parallel computation on GPUs. Existing GPU parallel strategies mainly achieve parallel computation by decoupling grid data or coloring the grid. Grid data decoupling methods are generally inefficient and fail to fully utilize the computational potential of GPUs; while grid coloring methods, by altering the dependencies of the original data, weaken the implicit characteristics of the algorithm, leading to a decrease in residual convergence accuracy. Therefore, this application provides a parallel processing method for aircraft Cartesian grid data based on reordering and self-scheduling, which can improve the efficiency of parallel processing of aircraft Cartesian grid data in the process of parallel processing based on reordering and self-scheduling.

[0055] See Figure 1 As shown, this invention discloses a parallel processing method for Cartesian grid data of aircraft based on reordering and self-scheduling, comprising:

[0056] Step S11: Use a preset breadth-first search algorithm to traverse each cell in each initial Cartesian grid corresponding to the aircraft to obtain a traversal sequence. Based on the traversal sequence and the physical position of each cell, cluster and number each cell face in the initial Cartesian grid to obtain a reordered Cartesian grid. The numbers of adjacent cells in the reordered Cartesian grid in physical space are consecutive.

[0057] In this embodiment, the Cuthill-McKee algorithm (i.e., the reduced bandwidth sorting algorithm) is used to reorder the Cartesian mesh, causing the cell numbers to cluster locally in physical space. Specifically, all computational cells are traversed first, and then an adjacency list c2c_tmp and a neighbor count array nCPC_tmp are constructed based on the cell face connectivity array CL. Internal faces record single-neighbor cells and are associated with four-neighbor cells, while boundary condition faces are ignored. Subsequently, the unvisited cell with the fewest neighbors is selected as the starting point for BFS traversal. Then, a layered BFS (Backward-Facing Step) is used to perform iterative operations on the current layer cell set ptr, extracting the unvisited neighbor cell set nbrs for each cell and sorting them in ascending order according to the number of neighbors (calling quicksort). Then, the sorted neighbor cells are stored in the next layer cache ptr_chird in order and the access status is marked. Zero-copy switching between layers is achieved through a two-pointer swapping mechanism (ptr ↔ ptr_chird). Finally, after the traversal is terminated, this embodiment can generate a new consecutive number starting from 0 based on the BFS sequence.

[0058] Specifically, a pre-defined breadth-first search algorithm is used to traverse each cell in the initial Cartesian grid corresponding to the aircraft, obtaining a traversal sequence. Based on the traversal sequence and the physical location of each cell, the cells in the initial Cartesian grid are clustered and numbered to obtain a reordered Cartesian grid. This process may include: traversing all cells in the initial Cartesian grid and determining the connection relationships between cells; then constructing an adjacency list to represent the adjacency relationships between cells and a neighbor count array to record the number of neighbor cells for each cell; determining the starting cell for traversal based on the adjacency list and the neighbor count array; then using the pre-defined breadth-first search algorithm and based on the starting cell to traverse each cell in the initial Cartesian grid, obtaining a traversal sequence; the starting cell is the cell with the smallest number of neighbor cells; determining the physical location corresponding to each cell in the initial Cartesian grid, and using the physical location and the number of neighbor cells to cluster and number the cells in the traversal sequence to obtain a reordered Cartesian grid.

[0059] Step S12: Using a preset conversion algorithm, the processing tasks of each grid cell in the reordered Cartesian grid are converted into corresponding cell surface processing tasks. Based on the dependency relationship of each cell surface, the reordered Cartesian grid is hierarchically divided to obtain a hierarchical division result. The cell surface processing tasks corresponding to each cell surface are allocated to each independent GPU thread according to the scheduling order corresponding to the hierarchical division result. The hierarchical value corresponding to the hierarchical division result is negatively correlated with the degree of independence corresponding to the cell surface. The cell surface is a cell surface generated based on each cell in the reordered Cartesian grid.

[0060] In this embodiment, after performing an equivalent transformation on the LU-SGS algorithm, this application embodiment needs to use the cell surface as the basic parallel unit and assign the computation task of each cell surface to an independent GPU thread for processing. Specifically, the LU-SGS algorithm is equivalently transformed, and the upper triangular or lower triangular computation is transformed from a grid cell processing task to a cell surface processing task (internal face) through division pre-processing and surface-level data recombination loop processing. Based on this, the cell surface is used as the basic parallel unit, and the computation task of each cell surface is assigned to an independent GPU thread for processing. Specifically, the processing tasks of each grid cell in the reordered Cartesian grid are transformed into corresponding cell surface processing tasks using a preset transformation algorithm. This can include: performing an equivalent transformation on the LU-SGS algorithm using a preset equivalent transformation rule to obtain the transformed algorithm, determining the processing tasks of each grid cell in the reordered Cartesian grid, and then using the transformed algorithm and the preset transformation algorithm to transform each grid cell processing task to obtain the corresponding cell surface processing task; the computation method corresponding to the grid cell processing task is the upper triangular computation method and the lower triangular computation method.

[0061] In this embodiment, the Cartesian mesh is first layered using the level set method. Each layer is traversed from low to high, and the successor face information of each mesh cell is recorded. The flowchart for layering the Cartesian mesh using the level set rule is shown below. Figure 2 As shown: In this embodiment of the application, the two-dimensional Cartesian mesh is divided into multiple levels (Level 0 to Level 6); during traversal, the successor faces of all cells in Level 0 are recorded first (black arrows in the figure), and then Level 1 to Level 6 are processed sequentially.

[0062] Specifically, the reordered Cartesian mesh is hierarchically partitioned based on the dependencies of each unit face, resulting in a hierarchical partitioning result. The unit face processing tasks corresponding to each unit face are then allocated to independent GPU threads based on the scheduling order corresponding to the hierarchical partitioning result. This process may include: determining the mesh cells associated with each unit face in the reordered Cartesian mesh, identifying the dependency information between unit faces in the reordered Cartesian mesh based on each mesh cell; determining the current-level unit faces that do not depend on other unfinished computation tasks based on the dependency information, setting the level corresponding to each current-level unit face as the current level, and then determining the unit faces that only depend on the current level based on the dependency information. New current-level cell surfaces with dependencies on previous-level cell surfaces are identified, and the current level is updated to set the level corresponding to each current-level cell surface as the current level. This process continues until all cell surfaces in the reordered Cartesian grid are partitioned, resulting in a hierarchical partitioning result. In this hierarchical partitioning result, the data processing of cell surfaces in subsequent levels of the first-level cell surface depends only on the data processing results of the cell surfaces in the previous or even earlier levels. Each cell surface is set as a parallel cell, and the cell surface processing tasks corresponding to each cell surface are allocated to independent GPU threads based on the scheduling order corresponding to the hierarchical partitioning result. Then, the cell surface number corresponding to the GPU thread is determined based on the cell surface processing tasks.

[0063] Step S13: Based on the calling order, perform self-scheduled unit surface processing tasks on the unit surfaces corresponding to the hierarchical division results. Then, use the GPU thread to determine whether the number of dependent unit surfaces corresponding to the unit surface is a preset number. If so, call the GPU thread to process the unit surface processing task and obtain the processing result corresponding to the aircraft. The number of dependent unit surfaces is the number of unit surfaces that each preceding unit surface corresponding to the unit surface completes its respective unit surface processing task.

[0064] In this embodiment, Figure 3 This is a schematic diagram illustrating thread decoupling based on cell faces, where each thread processes one face. In addition, during the pre-scan and post-scan phases, this embodiment reorders the scheduling order of cell faces according to the recorded order of successor faces (forward order for pre-scan, reverse order for post-scan). This reordering operation essentially optimizes the mapping relationship between cell faces and GPU threads, thereby concentrating the mesh cells awaited by adjacent threads into the same or similar level sets and synchronizing the times when these threads "wait for dependencies to end," effectively improving the synchronization of thread execution. Figure 4 This refers to the thread hierarchy before and after the cell plane scheduling order reordering. Figure 4 (a) represents the thread hierarchy before reordering. Figure 4(b) represents the thread hierarchy after reordering, with the horizontal axis representing the thread number and the vertical axis representing the level set hierarchy of the unit the thread is waiting for. Figure 4 (b) Compared to Figure 4 (a) The high concentration of the levels that each thread is waiting for indicates excellent synchronization and greatly reduces "thread divergence".

[0065] Specifically, the self-scheduling of unit surface processing tasks based on the calling order can include: determining the calling order based on the processing stage; the processing stage includes a pre-scan processing stage and a post-scan processing stage; if the processing stage is characterized as a pre-scan processing stage, then the unit surface processing tasks corresponding to the hierarchical division result are self-scheduled according to the hierarchical values ​​from smallest to largest to obtain a first scheduling result; if the processing stage is characterized as a post-scan processing stage, then the unit surface processing tasks corresponding to the hierarchical division result are self-scheduled and processed according to the hierarchical values ​​from largest to smallest to obtain a second scheduling result, and a target scheduling result is determined based on the first scheduling result and the second scheduling result, so as to process the unit surface processing tasks corresponding to each unit surface based on the scheduling result.

[0066] It is worth mentioning that when the calling thread performs cell face computation, this embodiment of the application needs to identify its specific data dependencies based on the computation type of the face (such as upper triangle or lower triangle). The synchronization of dependencies is achieved through a busy-wait mechanism. Specifically, the synchronization of dependencies is achieved through a busy-wait mechanism. Subsequently, after the thread completes the computation of the current cell face, it updates the dependency count of subsequent cells that depend on this computation result (i.e., reduces their dependency count), and ensures the global visibility of the update through the memory barrier __syncwarp(). When the dependency count of a certain subsequent cell drops to zero due to the update, the thread waiting for that cell (ready[ncl] == 0 in the pre-scan phase, ready[ncr] == 0 in the post-scan phase) can be released and begin computation. Figure 5 As shown, Figure 5 (a) is the system matrix corresponding to the Cartesian grid before CMK grid reordering. Figure 5 (b) is the system matrix corresponding to the Cartesian grid after the CMK grid (i.e., Cuthill-Mckee) reordering, where, Figure 5 The connections (representing data dependencies) in (a) are disorganized; Figure 5 The lines in (b) are all concentrated near the diagonal, which is very neat and indicates that the data has good locality.

[0067] Specifically, the GPU thread is used to determine whether the number of dependent unit faces corresponding to a unit face is the preset number. If so, the GPU thread is invoked to process the unit face processing task and wakes up the subsequent dependent threads corresponding to the GPU thread. If not, computing resources are actively released and the system enters a sleep state to obtain the processing result corresponding to the spacecraft. This may include: configuring a corresponding dependency counter for each unit face; wherein, the dependency counter is used to record the number of preceding unit faces whose data processing is not completed for the unit face; the preceding unit face is a unit face that has a dependency relationship with the unit face, and the level value corresponding to the preceding unit face is less than the level value corresponding to the unit face; the GPU thread is used to obtain the current number of dependent unit faces stored in the dependency counter corresponding to the corresponding unit face, and to determine whether the current number of dependent unit faces is greater than the preset number. If the current number of dependent cell faces is not greater than the preset number, the GPU thread is invoked to process the cell face processing task, and the subsequent dependent threads corresponding to the GPU thread are woken up. If the current number of dependent cell faces is greater than the preset number, it indicates that there are cell faces in the preceding cell faces that have not completed the corresponding cell face processing task. The state of the GPU thread is set to busy waiting state, and then the corresponding computing resources are actively released and the thread enters a sleep state. The corresponding dependency counter is checked in a loop until the current number of dependent cell faces is not greater than the preset number. Then, the GPU thread is invoked to process the cell face processing task, and the processing result corresponding to the Cartesian grid of the aircraft is obtained. Whenever the data processing corresponding to a preceding cell face is detected to be completed, the current number of dependent cell faces stored in the dependency counter is decremented by one.

[0068] In this embodiment, Figure 6 This diagram illustrates the results of data processing using the method employed in this application embodiment and other methods, and is provided by... Figure 6 As can be seen, the computational efficiency of the methods used in the embodiments of this application is significantly better than that of traditional old methods (such as traditional level set methods).

[0069] Specifically, the process involves calling the GPU thread to handle the unit face processing task and waking up the subsequent dependent threads corresponding to the GPU thread; otherwise, it involves actively releasing computing resources and entering a sleep state. After obtaining the processing result corresponding to the spacecraft, the process may also include: determining each subsequent unit face corresponding to the unit face based on the dependency relationship; wherein each subsequent unit face is a unit face that has a dependency relationship with the unit face, and the level value corresponding to the subsequent unit face is greater than the level value corresponding to the unit face; performing an atomic subtraction operation on the number of current dependent unit faces stored in the dependency counter corresponding to each subsequent unit face to obtain the atomic subtraction operation result, and calling the GPU thread to process the preset memory barrier primitive to ensure that each subsequent unit face obtains the atomic subtraction operation result.

[0070] Therefore, the embodiments of this application first need to use a preset breadth-first search algorithm to traverse each cell in each initial Cartesian grid corresponding to the aircraft to obtain a traversal sequence. Based on the traversal sequence and the physical location of each cell, the cells in the initial Cartesian grid are clustered and numbered to obtain a reordered Cartesian grid. Second, a preset transformation algorithm is used to convert the processing tasks of each grid cell in the reordered Cartesian grid into corresponding cell surface processing tasks. Based on the dependency relationship of each cell surface, the reordered Cartesian grid is hierarchically partitioned to obtain a hierarchical partitioning result. The cell surface processing tasks corresponding to each cell surface are allocated to each independent GPU thread according to the scheduling order corresponding to the hierarchical partitioning result. Then, the cell surface processing tasks are self-scheduled for each cell surface based on the calling order. Then, the GPU thread is used to determine whether the number of dependent cell surfaces corresponding to the cell surface is a preset number. If so, the GPU thread is called to process the cell surface processing task and wakes up the subsequent dependent threads corresponding to the GPU thread. If not, the computing resources are actively released and the system enters a sleep state to obtain the processing result corresponding to the aircraft. In this way, the efficiency of parallel processing of aircraft Cartesian grid data based on reordering and self-scheduling is improved, thereby avoiding global synchronization while ensuring data dependencies.

[0071] Accordingly, see Figure 7 As shown, this application also provides a parallel processing device for aircraft Cartesian grid data based on reordering and self-scheduling, comprising:

[0072] The traversal sequence determination module 11 is used to traverse each cell in each initial Cartesian grid corresponding to the aircraft using a preset breadth-first search algorithm to obtain a traversal sequence, and to cluster and number each cell face in the initial Cartesian grid based on the traversal sequence and the physical position of each cell to obtain a reordered Cartesian grid; the numbers corresponding to adjacent cells in the reordered Cartesian grid in physical space are continuous.

[0073] The hierarchical partitioning result determination module 12 is used to convert the processing tasks of each grid cell in the reordered Cartesian grid into corresponding cell surface processing tasks using a preset conversion algorithm, and to perform hierarchical partitioning of the reordered Cartesian grid based on the dependency relationship of each cell surface to obtain a hierarchical partitioning result. The cell surface processing tasks corresponding to each cell surface are then allocated to independent GPU threads based on the scheduling order corresponding to the hierarchical partitioning result. The hierarchical value corresponding to the hierarchical partitioning result is negatively correlated with the degree of independence corresponding to the cell surface. The cell surface is a cell surface generated based on each cell in the reordered Cartesian grid.

[0074] The processing result determination module 13 is used to perform self-schedule of unit surface processing tasks for each of the unit surfaces based on the calling order, and then use the GPU thread to determine whether the number of dependent unit surfaces corresponding to the unit surface is a preset number. If so, the GPU thread is called to process the unit surface processing task and wake up the subsequent dependent threads corresponding to the GPU thread. If not, the computing resources are actively released and the module enters a sleep state to obtain the processing result corresponding to the spacecraft. The number of dependent unit surfaces is the number of unit surfaces that each preceding unit surface corresponding to the unit surface has completed its respective unit surface processing task.

[0075] In some specific embodiments, the traversal sequence determination module 11 may specifically include:

[0076] A connection relationship determination unit is used to traverse all cells in the initial Cartesian grid and determine the connection relationship between each cell. Then, based on each connection relationship, an adjacency table is constructed to represent the adjacency relationship between each cell and a neighbor count array is constructed to record the number of neighbor cells of each cell.

[0077] The traversal sequence determines the sub-units, which is used to determine the traversal starting unit based on the adjacency list and the neighbor count array. Then, a preset breadth-first algorithm is used to traverse each unit in the initial Cartesian grid based on the traversal starting unit to obtain the traversal sequence. The traversal starting unit is the unit with the smallest number of neighboring units among all the units.

[0078] Cluster numbering units are used to determine the physical location corresponding to each of the units in the initial Cartesian grid, so as to use the physical location and the number of each of the neighboring units to cluster and number each of the units in the traversal sequence to obtain a reordered Cartesian grid.

[0079] In some specific embodiments, the hierarchy division result determination module 12 may specifically include:

[0080] The cell surface processing task determination unit is used to perform equivalent transformation on the LU-SGS algorithm using a preset equivalent transformation rule to obtain the transformed algorithm, and to determine the processing task of each grid cell in the reordered Cartesian grid. Then, the transformed algorithm and the preset transformation algorithm are used to transform each grid cell processing task to obtain the corresponding cell surface processing task. The calculation method corresponding to the grid cell processing task is the upper triangular calculation method and the lower triangular calculation method.

[0081] In some specific embodiments, the hierarchy division result determination module 12 may specifically include:

[0082] A dependency information determination unit is used to determine the mesh cells associated with each of the cell faces in the reordered Cartesian mesh, so as to identify the dependency information between each of the cell faces in the reordered Cartesian mesh based on each of the mesh cells;

[0083] The hierarchical partitioning result determines sub-units, which are used to determine the current level unit faces that do not depend on other unit faces that have not completed computation tasks, based on the dependency information, and set the level corresponding to each current level unit face as the current level. Then, based on the dependency information, new current level unit faces that only have dependencies on each current level unit face in the current level are determined, and the current level is updated to set the level corresponding to each current level unit face as the current level, until each unit face in the reordered Cartesian grid is partitioned, and the hierarchical partitioning result is obtained; wherein, the data processing of the unit faces of each subsequent level of the unit faces of the first level in the hierarchical partitioning result only depends on the data processing result of the unit faces of the previous level or even earlier level;

[0084] The task allocation unit is used to set each of the unit surfaces as a parallel unit, and allocate the unit surface processing tasks corresponding to each of the unit surfaces to each independent GPU thread based on the scheduling order corresponding to the hierarchical partitioning result, and then determine the unit surface number corresponding to the GPU thread based on the unit surface processing tasks.

[0085] In some specific embodiments, the processing result determination module 13 may specifically include:

[0086] The invocation order determination unit is used to determine the invocation order based on the processing stage; the processing stage includes a pre-scan processing stage and a post-scan processing stage.

[0087] The first scheduling result determination unit is used to perform self-scheduling of the unit surface processing task corresponding to the hierarchical division result in order of ascending hierarchical value if the processing stage is characterized as the pre-scanning processing stage, so as to obtain the first scheduling result.

[0088] The second scheduling result determination unit is used to perform self-scheduling and processing operations on the unit surfaces corresponding to the hierarchical division results in descending order of the hierarchical values ​​if the processing stage is characterized as the post-scanning processing stage, to obtain a second scheduling result, and to determine a target scheduling result based on the first scheduling result and the second scheduling result, so as to process the unit surface processing tasks corresponding to each unit surface based on the scheduling result.

[0089] In some specific embodiments, the processing result determination module 13 may specifically include:

[0090] A cell face number determination unit is used to configure a corresponding dependency counter for each cell face; wherein, the dependency counter is used to record the number of preceding cell faces whose data processing is not completed corresponding to the cell face; the preceding cell face is a cell face that has a dependency relationship with the cell face, and the level value corresponding to the preceding cell face is less than the level value corresponding to the cell face;

[0091] The current dependent cell face number determination unit is used to obtain the current dependent cell face number stored in the dependency counter corresponding to the corresponding cell face using the GPU thread, and determine whether the current dependent cell face number is greater than a preset number. If the current dependent cell face number is not greater than the preset number, the GPU thread is called to process the cell face processing task, and the subsequent dependent thread corresponding to the GPU thread is woken up.

[0092] The processing result determination sub-unit is used to indicate that if the current number of dependent unit faces is greater than a preset number, there are unit faces in the preceding unit faces corresponding to the unit face that have not completed the corresponding unit face processing task. The state of the GPU thread is set to busy waiting state, and then the corresponding computing resources are actively released and the GPU thread enters a sleep state. The corresponding dependency counter is checked cyclically until the current number of dependent unit faces is not greater than the preset number. Then, the GPU thread is called to process the unit face processing task and obtain the processing result corresponding to the Cartesian grid of the aircraft. Whenever the data processing corresponding to a preceding unit face is detected to be completed, the current number of dependent unit faces stored in the dependency counter is decremented by one.

[0093] In some specific embodiments, the parallel processing device for aircraft Cartesian grid data based on reordering and self-scheduling may further include:

[0094] A post-unit surface determination unit is used to determine each post-unit surface corresponding to the unit surface based on the dependency relationship; wherein each post-unit surface is a unit surface that has a dependency relationship with the unit surface, and the level value corresponding to the post-unit surface is greater than the level value corresponding to the unit surface.

[0095] The atomic subtraction operation result determination unit is used to perform an atomic subtraction operation on the number of current dependent cell surfaces stored in the dependency counter corresponding to each of the following cell surfaces, obtain the atomic subtraction operation result, and call the GPU thread to process the preset memory barrier primitive to ensure that each of the following cell surfaces obtains the atomic subtraction operation result.

[0096] Furthermore, embodiments of this application also disclose an electronic device, Figure 8This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and processed by the processor 21 to implement the relevant steps in the parallel processing method for aircraft Cartesian grid data based on reordering and self-scheduling disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0097] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0098] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0099] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the parallel processing method for aircraft Cartesian grid data based on reordering and self-scheduling disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0100] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is processed by a processor, it implements the aforementioned disclosed parallel processing method for aircraft Cartesian grid data based on reordering and self-scheduling. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0101] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0102] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are handled in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0103] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly using hardware, a software module processed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0104] 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 apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. 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 apparatus that includes said element.

[0105] The technical solutions provided in this application have been described in detail above. 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 methods and core ideas of this application. 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 method for reordering and self-scheduling based Cartesian mesh data parallel processing of an aircraft, characterized in that, The method comprises the following steps: traversing each cell in each initial Cartesian grid corresponding to the aircraft by using a preset breadth-first algorithm to obtain a traversal sequence, and performing aggregated numbering on each cell in the initial Cartesian grid based on the traversal sequence and the physical position of each cell to obtain a reordered Cartesian grid; the numbers corresponding to each cell adjacent in the physical space in the reordered Cartesian grid are continuous; the preset breadth-first algorithm is a bandwidth reduction ordering algorithm; processing each grid cell task in the reordered Cartesian grid into a corresponding cell face processing task by using a preset conversion algorithm, performing hierarchical division on the reordered Cartesian grid based on the dependency relationship of each cell face to obtain a hierarchical division result, and distributing each cell face processing task corresponding to each cell face to each independent GPU thread based on the scheduling order corresponding to the hierarchical division result; the hierarchical value corresponding to the hierarchical division result and the independence degree corresponding to the cell face are in a negative correlation relationship, and the smaller the hierarchical value, the higher the independence degree corresponding to the cell face; the cell face is a cell face generated based on each cell in the reordered Cartesian grid; wherein, distributing each cell face processing task corresponding to each cell face to each independent GPU thread based on the scheduling order corresponding to the hierarchical division result comprises: setting each cell face as a parallel cell, distributing each cell face processing task corresponding to each cell face to each independent GPU thread based on the scheduling order corresponding to the hierarchical division result, and then determining the cell face number corresponding to the GPU thread based on the cell face processing task; processing each grid cell task in the reordered Cartesian grid into a corresponding cell face processing task by using a preset conversion algorithm comprises: deforming the LU-SGS algorithm by using a preset equivalent deformation rule to obtain a deformed algorithm, and determining each grid cell task in the reordered Cartesian grid, and then converting each grid cell task by using the deformed algorithm and a preset conversion algorithm to obtain a corresponding cell face processing task; the calculation mode corresponding to the grid cell task is an upper triangular calculation mode and a lower triangular calculation mode; performing cell face processing task self-scheduling on each cell face based on the calling order, and then using the GPU thread to determine whether the number of dependent cell faces corresponding to the cell face is a preset number, if yes, calling the GPU thread to process the cell face processing task, and waking up the subsequent dependent thread corresponding to the GPU thread; if not, actively releasing the computing resource and entering the dormant state to obtain a processing result corresponding to the aircraft; the number of dependent cell faces is the number of cell faces corresponding to each preceding cell face completing the corresponding cell face processing task.

2. The reordering and self-scheduling based Cartesian mesh data parallel processing method of claim 1, wherein, The method comprises the following steps: traversing all cells in the initial Cartesian grid, and determining connection relationships between the cells, and then constructing an adjacency list for representing adjacency relationships between the cells based on the connection relationships and a neighbor count array for recording the number of neighbor cells of each cell; determining a traversal starting cell based on the adjacency list and the neighbor count array, and then performing traversal on each cell in the initial Cartesian grid based on the traversal starting cell and a preset breadth-first algorithm to obtain a traversal sequence; the traversal starting cell is a cell with the smallest number of neighbor cells among the cells; determining the physical positions corresponding to the cells in the initial Cartesian grid, and then performing clustered numbering on each cell in the traversal sequence by using the physical positions and the number of neighbor cells to obtain a reordered Cartesian grid.

3. The reordering and self-scheduling based Cartesian mesh data parallel processing method of claim 1, wherein, performing hierarchical partitioning on the reordered Cartesian grid based on the dependency relationships between the cell surfaces to obtain a hierarchical partitioning result, including: determining grid cells associated with the cell surfaces in the reordered Cartesian grid, and then identifying dependency relationship information between the cell surfaces in the reordered Cartesian grid based on the grid cells; determining a current hierarchical cell surface of a cell surface that does not depend on other unfinished computing tasks based on the dependency relationship information, setting the level corresponding to each current hierarchical cell surface as the current level, and then determining new current hierarchical cell surfaces that only have dependency relationships with each current hierarchical cell surface in the current level number based on the dependency relationship information, and updating the current level to set the level corresponding to each current hierarchical cell surface as the current level, until the hierarchical partitioning of each cell surface in the reordered Cartesian grid is completed to obtain the hierarchical partitioning result; wherein the data processing of each subsequent hierarchical cell surface of the first hierarchical cell surface in the hierarchical partitioning result only depends on the data processing results of the cell surfaces in the previous level or the more previous level.

4. The reordering and self-scheduling based Cartesian mesh data parallel method of claim 1, wherein, performing cell surface processing task self-scheduling on each cell surface based on the calling sequence, including: determining the calling sequence based on a processing stage; the processing stage includes a pre-scan processing stage and a post-scan processing stage; if the processing stage represents the pre-scan processing stage, performing cell surface processing task self-scheduling on the cell surfaces corresponding to the hierarchical partitioning result in the order of the level number from small to large to obtain a first scheduling result; if the processing stage represents the post-scan processing stage, performing cell surface processing task self-scheduling and processing operation on the cell surfaces corresponding to the hierarchical partitioning result in the order of the level number from large to small to obtain a second scheduling result, and determining a target scheduling result based on the first scheduling result and the second scheduling result to process the cell surface processing tasks of each cell surface based on the scheduling result.

5. The reordering and self-scheduling based aircraft Cartesian mesh data parallel processing method of claim 1, wherein, determining whether the number of dependent cell surfaces corresponding to the cell surface is a preset number by using the GPU thread, and if yes, invoking the GPU thread to process the cell surface processing task and waking up a subsequent dependent thread corresponding to the GPU thread; If not, the computing resource is released actively and the processing result corresponding to the aircraft is obtained, including: A corresponding dependency counter is configured for each unit surface; wherein the dependency counter is used to record the number of unit surfaces of the preceding unit surface whose data processing is not completed corresponding to the unit surface; the preceding unit surface is a unit surface having a dependency relationship with the unit surface, and the level value corresponding to the preceding unit surface is less than the level value corresponding to the unit surface; The GPU thread is used to obtain the current dependent unit surface number stored in the dependency counter corresponding to the corresponding unit surface, and determine whether the current dependent unit surface number is greater than a preset number. If the current dependent unit surface number is not greater than the preset number, the GPU thread is called to process the unit surface processing task, and the subsequent dependent thread corresponding to the GPU thread is awakened; If the current dependent unit surface number is greater than the preset number, it indicates that there is a unit surface in the preceding unit surface corresponding to the unit surface whose corresponding unit surface processing task is not completed, and the state corresponding to the GPU thread is set to a busy waiting state. Then, the corresponding computing resource is released actively and the sleep state is entered. The corresponding dependency counter is checked in a loop until the current dependent unit surface number is not greater than the preset number. The GPU thread is called to process the unit surface processing task, and the processing result corresponding to the Cartesian grid of the aircraft is obtained. Wherein, each time the data processing of a preceding unit surface corresponding to the preceding unit surface is monitored to be completed, the current dependent unit surface number stored in the dependency counter is decremented by one.

6. The reordering and self-scheduling based Cartesian mesh data parallel processing method of any one of claims 1 to 5, wherein, The GPU thread is called to process the unit surface processing task, and the subsequent dependent thread corresponding to the GPU thread is awakened; If not, the computing resource is released actively and the processing result corresponding to the aircraft is obtained, including: Each posterior unit surface corresponding to the unit surface is determined based on the dependency relationship; wherein each posterior unit surface is a unit surface having a dependency relationship with the unit surface, and the level value corresponding to the posterior unit surface is greater than the level value corresponding to the unit surface; An atomic decrement operation is performed on the current dependent unit surface number stored in the dependency counter corresponding to each posterior unit surface to obtain an atomic decrement operation result, and a preset memory barrier primitive is called to process the GPU thread to ensure that each posterior unit surface obtains the atomic decrement operation result.

7. A reordering and self-scheduling based Cartesian mesh data parallel processing apparatus for an aircraft, characterized by, Including: The traversal sequence determination module is used to traverse each unit in each initial Cartesian grid corresponding to the aircraft using a preset breadth-first algorithm to obtain a traversal sequence, and to aggregate and number each unit surface in the initial Cartesian grid based on the traversal sequence and the physical position of each unit to obtain a reordered Cartesian grid; the numbers corresponding to each unit adjacent in the physical space in the reordered Cartesian grid are continuous; the preset breadth-first algorithm is a bandwidth reduction ordering algorithm; The hierarchical partitioning result determination module is configured to convert each grid cell processing task in the reordered Cartesian grid into a corresponding cell face processing task by using a preset conversion algorithm, perform hierarchical partitioning on the reordered Cartesian grid based on the dependency relationship of each cell face, and obtain a hierarchical partitioning result, so as to allocate each cell face processing task of each cell face to each independent GPU thread based on a scheduling order corresponding to the hierarchical partitioning result; the hierarchical number corresponding to the hierarchical partitioning result and the independence degree of the cell face are in a negative correlation relationship, that is, the smaller the hierarchical number, the higher the independence degree of the cell face; the cell face is a cell face generated based on each cell in the reordered Cartesian grid; wherein, allocating each cell face processing task of each cell face to each independent GPU thread based on a scheduling order corresponding to the hierarchical partitioning result comprises: setting each cell face as a parallel cell, allocating each cell face processing task of each cell face to each independent GPU thread based on a scheduling order corresponding to the hierarchical partitioning result, and then determining a cell face number corresponding to the GPU thread based on the cell face processing task; the conversion of each grid cell processing task in the reordered Cartesian grid into a corresponding cell face processing task by using a preset conversion algorithm comprises: deforming an LU-SGS algorithm by using a preset equivalent deformation rule to obtain a deformed algorithm, determining each grid cell processing task in the reordered Cartesian grid, and then converting each grid cell processing task by using the deformed algorithm and a preset conversion algorithm to obtain a corresponding cell face processing task; the calculation mode corresponding to the grid cell processing task is an upper triangular calculation mode and a lower triangular calculation mode; The processing result determination module is configured to perform cell face processing task self-scheduling on each cell face based on a calling order, determine whether the number of dependent cell faces corresponding to the cell face is a preset number by using the GPU thread, call the GPU thread to process the cell face processing task and wake up a subsequent dependent thread corresponding to the GPU thread if the number of dependent cell faces is the preset number, and actively release a computing resource and enter a dormant state if the number of dependent cell faces is not the preset number, to obtain a processing result corresponding to the aircraft; the number of dependent cell faces is the number of cell faces in which each preceding cell face corresponding to the cell face completes a corresponding cell face processing task.

8. An electronic device, comprising: The memory is configured to save a computer program; The processor is configured to process the computer program to implement the aircraft Cartesian grid data parallel processing method based on reordering and self-scheduling according to any one of claims 1 to 6. The memory is configured to save a computer program; and the processor is configured to process the computer program to implement the aircraft Cartesian grid data parallel processing method based on reordering and self-scheduling according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, ​

Citation Information

Patent Citations

  • Block adaptive type Cartesian grid rapid graph mapping method and system

    CN113689556A

  • Surround scene awareness using multiple sensors for use in autonomous systems and applications

    CN118251705A