Data transmission optimization method and system for AERMOD receptor circulation
Patent Information
- Application Number
- CN202611176490.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-08-05
AI Technical Summary
[0006]为了解决上述问题,本发明提出了一种面向AERMOD受体循环的数据传输优化方法及系统,本发明旨在消除由频繁调用cudaMemcpy及同步等待引入的巨大固定通信开销,并同步剔除对最终结果影响较小的数据(如控制标记或中间状态)所造成的冗余传输体量;从而在严格确保降低精度的操作不破坏工程容许误差的前提下,解决系统加速效果无法随受体点规模稳定提升的技术难题
本发明通过数据流数据类别标定与内存SoA重构,构建主机端合并打包缓冲区。将具有同一更新数据类别的多数组变量,在物理内存层面无缝拼接为一整块连续内存,并采用单次异步下发替代多次离散下发。这种基于更新数据类别匹配的数据重组机制,使得总线调用次数实现了数量级级别的骤降,大幅消除了GPU计算单元因等待数据流而造成的闲置气泡。结合大气扩散物理计算特征,实施“基于误差敏感度分级的规则拦截”。将粗粒度分类标记、布尔型控制位与弱敏感权重参数,在进入传输管道前实时压缩量化为低精度格式(如FP16或INT8),与强敏感参数混精打包。传输至设备端后,再利用GPU强悍的片上算力与内建指令进行极速的精度扩展与位宽格式恢复。该机制使得Host-Device双向传输的总数据体量锐减。这不仅极大地缓解了昂贵的PCIe带宽压力,更使通信整体耗时大幅缩减,真正实现了用廉价GPU片上算力换取高价值总线带宽的核心优化目的。
Smart Images

Figure CN122691994B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data processing technology, specifically relating to a data transmission optimization method and system for the AERMOD receptor cycle. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] AERMOD is an atmospheric pollution diffusion simulation model based on boundary layer meteorological theory, widely used in environmental impact assessment and air quality management. Its core computational flow consists of multiple deeply nested loops: the outermost layer is a time-step loop, the middle layer is a pollution source loop, and the innermost layer is a concentration calculation loop that traverses a large number of receptor points. In practical engineering, to meet the high-resolution simulation requirements of complex terrain or key monitoring areas, the number of receptor points often reaches thousands to tens of thousands, leading to a non-linear increase in the model's computational scale. The innermost receptor loop requires intensive physical operations such as three-dimensional geometric relationship derivation, diffusion parameter estimation, stability determination, and downwashing correction, typically accounting for over 90% of the overall runtime and becoming the core performance bottleneck.
[0004] The existing AERMOD business system is mainly based on a serial CPU architecture. Even with multi-core parallel optimizations such as MPI or OpenMP, it is still limited by the number of physical cores, memory bandwidth, and branch prediction penalties. In scenarios with tens of thousands of recipient points and thousands of hours of simulation, the end-to-end runtime can take several days to several weeks, which cannot meet the timeliness requirements.
[0005] In recent years, Graphics Processing Units (GPUs) have been introduced into AERMOD acceleration due to their massively parallel computing capabilities. Conventional CPU-GPU heterogeneous solutions employ a "loop splitting and computation offloading" strategy, mapping the recipient to GPU threads for parallel execution. However, this simple migration approach encounters severe system-level performance inversions in practical applications: after the recipient's computation time is compressed, the bottleneck quickly shifts to the communication interaction between the host and the device. Specifically: First, the original code uses a structure array data layout oriented towards the CPU cache, resulting in non-contiguous memory access within thread bundles on the GPU, leading to extremely low memory bandwidth utilization; second, during dynamic iterations with multiple time steps and multiple pollution sources, the host frequently initiates high-frequency, small-granularity data copies (such as repeated calls to cudaMemcpy), and the fixed overhead of the PCI-e bus and synchronization blocking cause communication overhead to dominate, severely limiting the scalability of the acceleration effect. Summary of the Invention
[0006] To address the aforementioned issues, this invention proposes a data transmission optimization method and system for the AERMOD receptor cycle. This invention aims to eliminate the significant fixed communication overhead introduced by frequent calls to cudaMemcpy and synchronous waiting, and to simultaneously eliminate redundant transmission volumes caused by data with minimal impact on the final result (such as control flags or intermediate states). Thus, under the premise of strictly ensuring that operations that reduce precision do not compromise engineering tolerances, this invention solves the technical problem that the system acceleration effect cannot be stably improved with the scale of receptor points.
[0007] According to some embodiments, the first aspect of the present invention provides a data transmission optimization method for the AERMOD receptor cycle, employing the following technical solution: Data transfer optimization methods for the AERMOD receptor cycle include: The multi-dimensional data required for the receptor cycle of the atmospheric pollution diffusion simulation model are preprocessed and classified to obtain a static resident array, a time-step meteorological field array, a pollution source dynamic array, and a corresponding data routing configuration table. Based on the static resident array and the corresponding data routing configuration table, flattening and packaging are performed to obtain static contiguous array blocks, which are then sent to the device. If the pollution source or meteorological data in each time step changes, the updated data corresponding to the pollution source dynamic array and the time step-level meteorological field array will be mixed, compressed, merged and packaged to obtain the mixed time step-level array block and the mixed pollution array block and sent to the device. Based on the preset multi-threaded parallel execution rules, the device performs slicing and precision restoration on the mixed sperm time step array block and the mixed sperm contamination array block respectively, to obtain the restored continuous contamination source array block and the restored continuous time step array block; Based on static continuous array blocks, restored continuous pollution source array blocks, and restored continuous time step array blocks, receptor cyclic parallel computation is performed. After reaching the preset output cycle, the computation result array is sent back to the host in batches.
[0008] Furthermore, the multi-dimensional data required for obtaining the receptor cycle of the atmospheric pollution diffusion simulation model are preprocessed and classified to obtain a static resident array, a time-step meteorological field array, a pollution source dynamic array, and a corresponding data routing configuration table, including: The multi-dimensional data required for the receptor cycle of the atmospheric pollution diffusion simulation model are obtained and preprocessed to obtain the preprocessed multi-dimensional data. Based on the physical update frequency in the receptor cycle, the preprocessed multidimensional data are classified to obtain a static resident array, a time-step meteorological field array, and a pollution source dynamic array. Based on the preset routing configuration rules, routing configuration is performed on the static resident array, the time-step meteorological field array, and the pollution source dynamic array, generating a static routing configuration table, a time-step routing configuration table, and a pollution source routing configuration table.
[0009] Furthermore, the step of flattening and packaging based on the static resident array and the corresponding data routing configuration table to obtain a static contiguous array block and sending it to the device includes: The static resident array organized according to the receptor object is flattened and packaged according to the layout of continuous static resident data of all receptor points corresponding to each physical attribute, to obtain the static attribute subarray of each physical attribute. Based on the field order in the static data routing configuration table of the static resident array, all static attribute subarrays of physical attributes are combined to obtain a static contiguous array block, which is then sent to the device.
[0010] Furthermore, if the pollution source or meteorological data changes in each time step, the updated data corresponding to the pollution source dynamic array and the time step-level meteorological field array are mixed, compressed, merged, and packaged to obtain a mixed time step-level array block and a mixed pollution array block, which are then sent to the device. This includes: If the meteorological data changes within the current time step, the changed meteorological data is replaced in the time step-level meteorological field array to obtain a continuous time step-level array block. If the pollution source loop is entered, the transformed pollution source data in the current time step will be replaced in the pollution source dynamic array to obtain a continuous pollution source array block. Based on the transmission precision label in the time step routing configuration table, the data that allows low bit width transmission in the continuous time step array block is compressed and combined with the data that does not allow low bit width transmission to obtain a mixed precision time step array block. Based on the transmission precision label in the pollution source routing configuration table, the data in the continuous pollution source array block that allows low bit width transmission is compressed and combined with the data that does not allow low bit width transmission to obtain the mixed precision pollution array block. Send the mixed sperm time step array block and the mixed sperm contamination array block to the device.
[0011] Furthermore, based on preset multi-threaded parallel execution rules, the device performs slicing and precision restoration on the mixed sperm time step array block and the mixed sperm contamination array block respectively, to obtain the restored continuous contamination source array block and the restored continuous time step array block, including: According to the preset number of single-threaded execution arrays, the device divides the mixed sperm time step array block and the mixed sperm pollution array block into multiple mixed sperm time sub-array blocks and multiple mixed sperm pollution sub-array blocks. The device performs parallel unpacking and precision recovery on each mixed sperm time subarray block and each mixed sperm contamination subarray block to obtain the recovered continuous time subarray block and the recovered continuous contamination subarray block; Combine all the recovered continuous time subarray blocks to obtain the recovered continuous time step array block, and combine all the recovered continuous pollution subarray blocks to obtain the recovered continuous pollution source array block.
[0012] Furthermore, each data routing configuration table includes at least: Data field identifier, data category, lifecycle label, original data type, transmitted data type, device-side calculated data type, data length, target device buffer, transmission precision label, whether to participate in control flow determination, and update trigger conditions.
[0013] According to some embodiments, a second aspect of the present invention provides a data transmission optimization system for the AERMOD receptor cycle, employing the following technical solution: A data transmission optimization system for the AERMOD receptor cycle includes: The data processing module is used to acquire multi-dimensional data required by the receptor cycle of the atmospheric pollution diffusion simulation model, preprocess and classify it to obtain a static resident array, a time-step meteorological field array, a pollution source dynamic array and the corresponding data routing configuration table; The static packaging module is used to flatten and package static continuous arrays based on static resident arrays and corresponding data routing configuration tables, and send them to the device. The dynamic compression module is used to compress and package the updated data corresponding to the pollution source dynamic array and the time step meteorological field array when the pollution source or meteorological data in each time step changes, so as to obtain the mixed and refined time step array block and the mixed and refined pollution array block and send them to the device. The dynamic recovery module is used to slice and restore the precision of the mixed sperm time step array block and the mixed sperm contamination array block on the device side based on the preset multi-threaded parallel execution rules, so as to obtain the restored continuous contamination source array block and the restored continuous time step array block. The receptor cyclic calculation module is used to perform parallel cyclic calculations of receptors based on static continuous array blocks, restored continuous pollution source array blocks, and restored continuous time step array blocks. After reaching the preset output cycle, the calculation result array is sent back to the host in batches.
[0014] According to some embodiments, a third aspect of the present invention provides a computer-readable storage medium.
[0015] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the data transmission optimization method for the AERMOD receptor cycle as described in the first embodiment above.
[0016] According to some embodiments, a fourth aspect of the present invention provides a computer device.
[0017] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the data transmission optimization method for the AERMOD receptor cycle as described in the first embodiment above.
[0018] According to some embodiments, a fifth aspect of the present invention provides a computer program product or computer program.
[0019] A computer program product or computer program includes computer instructions stored in a computer-readable storage medium, wherein a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the data transmission optimization method for the AERMOD receptor cycle as described in the first embodiment above.
[0020] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention constructs a host-side merged and packaged buffer through data stream data category labeling and memory SoA reconstruction. Multiple arrays of variables with the same updated data category are seamlessly concatenated into a single contiguous block of memory at the physical memory level, and a single asynchronous delivery replaces multiple discrete deliveries. This data reorganization mechanism based on updated data category matching results in an order-of-magnitude reduction in the number of bus calls, significantly eliminating idle bubbles caused by GPU computing units waiting for data streams. Combining atmospheric diffusion physics calculation characteristics, a "rule-based interception based on error sensitivity grading" is implemented. Coarse-grained classification tags, Boolean control bits, and weakly sensitive weight parameters are compressed and quantized into low-precision formats (such as FP16 or INT8) in real time before entering the transmission pipeline, and then mixed and packaged with strongly sensitive parameters. After transmission to the device, the powerful on-chip computing power and built-in instructions of the GPU are used for rapid precision expansion and bit-width format restoration. This mechanism drastically reduces the total data volume of bidirectional Host-Device transmission. This not only greatly alleviates the pressure of expensive PCIe bandwidth, but also significantly reduces the overall communication time, truly achieving the core optimization goal of exchanging cheap GPU on-chip computing power for high-value bus bandwidth.
[0021] This invention achieves a dual breakthrough in both extreme computing performance and engineering-acceptable precision, exhibiting excellent scalability. Based on the aforementioned comprehensive system-level reconstruction from the outside in (from bus communication to memory layout, and then to the computation instruction flow), this invention achieves a qualitative leap in heterogeneous performance while ensuring high precision in core computation and strict engineering consistency between the final output and the original serial code. As the scale of the analog acceptor points continues to increase, the acceleration effect of this invention does not experience the plateauing and decline seen in traditional solutions; instead, it exhibits near-linear high scalability due to the complete masking of communication latency. Attached Figure Description
[0022] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0023] Figure 1 This is a flowchart of the data transmission optimization method for the AERMOD receptor cycle in an embodiment of the present invention. Detailed Implementation
[0024] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0025] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0026] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0027] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0028] Terminology Explanation: 1. AERMOD model: A high-precision atmospheric pollution diffusion simulation model based on boundary layer meteorological theory, combined with Gaussian plume model, terrain correction model, etc., to simulate the spatiotemporal diffusion process of pollutants under different meteorological and topographic conditions.
[0029] 2. Receptors: These are the spatial sampling points used by the model to calculate pollutant concentrations. In engineering applications, a large number of receptors are often deployed to obtain high spatial resolution concentration distribution results.
[0030] 3. CPU-GPU Heterogeneous Architecture (Host-Device Collaborative Architecture): This refers to a system architecture in which the host (usually CPU) and the device (usually GPU) jointly participate in computation. In this invention, the CPU is responsible for complex logic control and resource scheduling, while the GPU is responsible for high-density parallel physical computation.
[0031] 4. SIMT (Single Instruction Multithreading) and Warp (Thread Bundle): SIMT is the core parallel computing architecture of the GPU; Warp is the basic hardware logic unit for GPU scheduling and execution. Adjacent threads within the same Warp typically execute the same instructions in parallel.
[0032] 5. AoS and SoA: AoS (Array of Structures): refers to a memory layout in which multiple physical attributes of the same object are stored together in an overlapping manner. It is commonly used in traditional CPU-based object-oriented programming.
[0033] SoA (Structure of Arrays): refers to a memory layout that extracts and aggregates arrays with the same physical properties into a continuous one-dimensional array. This format can significantly improve the utilization of video memory bandwidth when GPU Warp accesses memory.
[0034] 6. Mixed-precision data transmission: refers to the technical means of dynamically using different bit widths (such as truncating or quantizing high-precision floating-point numbers into half-precision floating-point numbers or integers) for packet transmission during the data interaction process between the host and the device, based on the error sensitivity of physical parameters, and then performing bit width format alignment and restoration at the device end.
[0035] Example 1 This embodiment provides a data transmission optimization method for the AERMOD receptor cycle. This embodiment uses the application of this method to a server as an example for illustration. It is understood that this method can also be applied to terminals, and can also be applied to systems including terminals, servers, and other components, and can be implemented through interaction between the terminal and the server. The server can be a standalone physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network servers, cloud communication, middleware services, domain name services, CDN security services, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein.
[0036] like Figure 1 As shown, this embodiment generally adopts a heterogeneous execution architecture with efficient CPU-GPU collaboration: On the CPU host side, the control logic of the AERMOD model, including time step loop, pollution source loop, input file parsing, meteorological data reading, terrain parameter reading, result summarization, and IO output, is retained. At the same time, according to the preset data routing configuration table, the data fields required for receptor loop calculation are classified, packaged, transmitted, and updated and scheduled.
[0037] On the GPU device, the task of calculating concentration contributions within the receptor loop is computationally intensive and relatively independent between receptors. For a given time step and a given pollution source, the device employs a one-dimensional thread mapping method, where each GPU thread corresponds to a receptor point. Based on the static attributes of that receptor point, the meteorological parameters of the current time step, and the parameters of the current pollution source, the pollutant concentration corresponding to that receptor point is calculated.
[0038] It should be noted that the data classification, lifecycle labeling, and transmission accuracy labeling in this embodiment are not automatically identified by the program during runtime without any basis. Instead, they are predetermined by the implementer based on the variable call relationships, loop levels, update locations, data physical meanings, and error sensitivity in the original AERMOD program, and are solidified in the form of a data routing configuration table. During program runtime, packaging, transmission, device-side slicing, and format conversion operations are performed according to this data routing configuration table.
[0039] To reduce the host-device data interaction overhead after the receiver is GPU-enabled, this embodiment proposes a data communication optimization mechanism based on data update cycle and transmission precision level. This mechanism mainly includes: lifecycle-based data field classification, host-side continuous packet buffer construction, device-side persistent buffer mapping, low-sensitivity field low-width transmission, device-side logical slicing and format conversion, and GPU parallel computing oriented towards the receiver. The specific steps are as follows.
[0040] Step S1: Obtain the multi-dimensional data required for the receptor cycle of the atmospheric pollution diffusion simulation model, preprocess and classify it to obtain a static resident array, a time-step meteorological field array, a pollution source dynamic array, and the corresponding data routing configuration table, including: On the host side (CPU side), input parsing and data flow data category labeling are based on the physical dependencies of the computation graph. During the model startup phase, the CPU side does not directly issue computation tasks, but first performs global parsing and dependency topology sorting on all data structures required by the Atmospheric Pollution Diffusion Simulation Model (AERMOD) to establish a unique routing criterion for subsequent communication optimization.
[0041] Step S1.1: Obtain the multi-dimensional data required for the receptor cycle of the atmospheric pollution diffusion simulation model and preprocess it to obtain the preprocessed multi-dimensional data; First, acquire the multi-dimensional data required for receptor cycle calculation in the atmospheric pollution diffusion simulation model (AERMOD model) to be transmitted between the host and device ends, and provide a unified basis for subsequent data packaging, transmission, device access and format conversion.
[0042] The host unit scans and reads multi-dimensional data from AERMOD, including terrain input files, meteorological field input files, and control parameter sets, and preprocesses the multi-dimensional data. Multi-dimensional data preprocessing on the host side is a crucial step in ensuring that the model input file conforms to the stringent format requirements of AERMOD. Data transmission for AERMOD model-based loop calculations requires the host side to fully prepare three categories of multi-dimensional data: terrain, meteorology, and control parameters. The core of data preprocessing involves using two official preprocessors, AERMET (meteorology) and AERMAP (terrain), to perform quality control, parameter calculation, and format conversion on the raw data, ultimately generating a standardized input file that conforms to the strict AERMOD specifications. Clearly defining these data and preprocessing steps is fundamental for subsequent efficient data packaging, transmission, and device access.
[0043] Step S1.2: Classify the preprocessed multidimensional data based on the physical update frequency in the receptor cycle to obtain a static resident array, a time-step meteorological field array, and a pollution source dynamic array; Specifically, the CPU traverses all the preprocessed multi-dimensional data involved in the receptor loop and divides it into the following three core categories according to its physical update frequency in the nested loops: Category A - Static resident array of receptor points, including spatial coordinates, terrain elevation, receptor height, terrain correction parameters, and fixed flags associated with the receptor point location. This type of data typically varies with receptor number but does not change with time steps or contaminant sources throughout a complete simulation mission. This data field remains static and absolutely unchanged throughout the entire lifecycle of a long-duration, complete simulation mission. This type of data is marked as a one-time, unidirectional cross-bus transfer level.
[0044] Category B - Time-step meteorological field arrays include pollution source spatial location, source height, emission rate, source type, chimney outlet parameters, downwashing related parameters, and pollution source control indicators. This type of data is typically updated with pollution source cycle switching, controlled by the outer time cycle, and numerical updates occur between adjacent time steps, but data fields remain globally consistent across all intermediate pollution sources within the same time step. This type of data is marked as a step-by-step batch update level.
[0045] Category C – Dynamic array of pollution sources, including spatial location, height, emission rate, type, chimney outlet parameters, downwashing related parameters, and pollution source control indicators. This type of data is typically updated with the cyclical switching of pollution sources. It means that its lifecycle is controlled by the pollution source-level cycle; that is, within the same time step, the data field is updated numerically as pollution sources are traversed and switched. Specific parameters include, but are not limited to: real-time emission intensity of the pollution source, effective source height, geometric characteristic parameters of the source emission outlet, and the downwashing control switch marker matrix for a specific pollution source. This type of data is marked as locally updated. The update frequency of Category C data is objectively determined by its position in the inner nested cycle within the model.
[0046] Step S1.3: According to the preset routing configuration rules, configure the routing for the static resident array, the time step meteorological field array, and the pollution source dynamic array, and generate the static routing configuration table, the time step routing configuration table, and the pollution source routing configuration table.
[0047] The data routing configuration table includes at least the following: data field identifier, data category, lifecycle label, original data type, transmission data type, device-side calculated data type, data length, target device buffer, transmission precision label, whether to participate in control flow determination, and update trigger conditions.
[0048] Lifecycle tags are used to determine when the data field is transmitted or updated. These include initialization persistent tags, time-step level tags, and pollution source level tags, corresponding to the static persistent array, the time-step meteorological field array, and the pollution source dynamic array, respectively, as detailed below: Initialize persistent tags to mark data fields in a static persistent array. For this type of data, the host sends it to the device during the initialization phase and reuses it on the device in subsequent time step loops and pollution source loops.
[0049] Time step level labels are used to mark data fields in the time step level meteorological field array. For this type of data, the host updates the corresponding fields when the time step changes and sends the updated data to the device; within the same time step, this type of data is not repeatedly transmitted due to pollution source switching.
[0050] Pollution source-level tags are used to mark data fields in the dynamic array of pollution sources. For this type of data, whenever a pollution source changes within the current time step, the host selects the pollution source-level fields that need to be updated according to the data routing configuration table and sends them to the device.
[0051] The transmission precision label is used to determine whether data fields are transmitted with their original bit width or a low bit width during the Host Device transmission phase. For highly sensitive fields involved in core distance calculation, effective source height calculation, Gaussian exponent term, diffusion parameter calculation, and concentration accumulation, the original precision or a preset high precision format is maintained during transmission. For Boolean switches, enumeration categories, classification indexes, source type flags, and auxiliary fields that have a low impact on the final result, low bit width encoding or compressed format can be used for transmission.
[0052] In summary, this step ultimately outputs two results: first, data entities, namely the arrays after preprocessing and classification; and second, control metadata, namely the data routing configuration table, which records information such as the data identifier, lifecycle category, bit width dimension, and logical precision of each array. It serves as an operational guide for subsequent steps to execute different packaging strategies (such as static packaging in S2 or mixed-precision packaging in S3). In actual operation, the program will read this list to determine which arrays should go into the static buffer and which should go into the mixed-precision buffer.
[0053] This invention constructs a device-side global persistent memory pool mapping architecture. To avoid implicitly or explicitly triggering repeated allocation (cudaMalloc) and release (cudaFree) of device-side video memory during tens of thousands of iterations with multiple time steps and multiple pollution sources, this invention establishes a minimalist zero-jitter persistent memory management mechanism. This mechanism is a pre-configured rule on the device side (GPU side), rather than a real-time transformation process. Its logic is as follows: During the initialization phase, the CPU calculates the peak capacity that all arrays may reach throughout the entire runtime based on the routing configuration table generated in S1, and allocates the corresponding contiguous buffer (persistent memory pool) in the GPU video memory in one go. The "packaging" action in S2 and S3 occurs on the host side (CPU side), referring to the process of concatenating discrete data into continuous large blocks. After concatenation, the data is directly "overwritten" into the pre-allocated, fixed-address persistent memory pool on the GPU side via a single transmission instruction. This method eliminates the performance jitter caused by repeated allocation / release of video memory (cudaMalloc / Free) during runtime.
[0054] This embodiment eliminates device-side memory management overhead and performance jitter, establishing high stability for long-cycle simulation tasks. To address the severe synchronization blocking, memory fragmentation, and potential model crashes caused by frequent executions of cudaMalloc / cudaFree within loops, this embodiment constructs a persistent device-side memory pool with a full lifecycle. Peak global memory space detection and one-time top-level allocation are performed during model initialization. In subsequent millions of dynamic iterations, all allocations and releases are replaced by overwrite operations based on fixed pointer offsets. This "zero allocation, zero jitter" underlying resource scheduling strategy significantly improves the system robustness and execution smoothness of the model under large-scale computational examples and long-term simulations spanning the entire year.
[0055] Step S2: Flatten and package the static resident array and the corresponding data routing configuration table to obtain a static contiguous array block and send it to the device. Based on the lifecycle isomorphism of receptor data, SoA reconstruction and first-stage merging and packaging are performed. Addressing GPU memory access crashes caused by traditional object-oriented programming or struct organization methods, this invention implements a spatial reorganization mechanism for static receptor data. This step operates only on static resident arrays.
[0056] Step S2.1: Flatten the static resident array organized according to the receptor object, and pack it according to the layout of continuous static resident data of all receptor points corresponding to each physical attribute to obtain the static attribute subarray of each physical attribute; Specifically, the SoA (array structure) memory layout is inverted and flattened: intercepting the traditional CPU-side read-in receptor structure data stream. The original scattered layout of "multiple physical attributes for the same receptor number" (AoS, array of structures) is reconstructed and decoupled into a layout pattern where "each physical attribute corresponds to an independent one-dimensional contiguous array" (SoA, array structure) through a forced data relocation algorithm. This memory rearrangement ensures that during subsequent parallel execution, when 32 adjacent threads within the same warp of the GPU access data such as "all receptor elevations" in parallel, their underlying hardware memory access requests can be merged into one or a very small number of contiguous memory transactions, greatly increasing the actual bandwidth utilization of GPU memory. The flattening logic refers to reconstructing the traditional AoS (array of structures) into a SoA (array structure). For example, the scattered receptor 1 (x,y,z) and receptor 2 (x,y,z) layouts are reconstructed into independent one-dimensional contiguous subarrays such as all receptor x-coordinate arrays and all receptor y-coordinate arrays to improve GPU memory access efficiency.
[0057] Host-side static merge buffer construction: For multiple independent SoA arrays marked as "Category A (initialized resident data)" (assuming they contain k arrays such as x-coordinates, y-coordinates, elevation, and terrain markers), if transmitted in the traditional way, even if only transmitted once, the bus copy API still needs to be called k times. To further squeeze communication efficiency, the CPU allocates a very large contiguous array block named packed_h in the system page-locked memory area, whose total byte length is strictly equal to k*numrec*sizeof(Data_Type).
[0058] Step S2.2: Based on the field order in the static data routing configuration table of the static resident array, combine the static attribute subarrays of all physical attributes to obtain a static contiguous array block and send it to the device.
[0059] Specifically, the static attribute subarrays of each physical attribute are continuously written into the contiguous array block buffer on the host side to obtain a static contiguous array block, which is then sent to the device side across the bus in one go. The packing logic refers to filling the multiple one-dimensional subarrays of SoA (such as x, y, z coordinates and elevation) in the contiguous buffer packed_h on the host side according to the offset address, forming a physically seamless giant static array block, i.e., a static contiguous array block. By sending the assembled static contiguous array block in a single go, instead of transmitting multiple scattered small arrays, the overhead of PCIe bus calls is significantly reduced.
[0060] It should be noted that SoA reorganization is mainly used to improve memory access continuity during parallel access on the GPU device side, enabling adjacent threads within the same warp to access the same attribute of adjacent recipient points in a more continuous memory access manner. This operation itself belongs to device-side memory access organization optimization; the communication call optimization effect is only reflected when multiple SoA subarrays are further merged into contiguous blocks and the number of Host Device transfer calls is reduced.
[0061] The host writes multiple initial resident fields sequentially into the static data packing buffer, forming a static contiguous array block, based on the field order, data length, and alignment requirements in the data routing configuration table. For fields of different data types, necessary padding bytes are inserted according to preset alignment rules during writing, and the starting offset address of each field in the static contiguous array block is recorded in the static data routing configuration table.
[0062] For example, the receptor x-coordinate array, receptor y-coordinate array, receptor elevation array, and receptor flag array can be organized into the following contiguous data blocks: packed_static_h = [x_array | y_array | elev_array | flag_array] Among them, x_array, y_array, elev_array and flag_array correspond to the continuous storage range of each field, and their starting positions are determined by the offset address in the data routing configuration table.
[0063] Subsequently, following the step-memory copy instruction, each SoA subarray is continuously and compactly packed into the corresponding physical region of the packed_h buffer, forming a static contiguous array block without physical gaps.
[0064] After constructing the static contiguous array block, the host sends it to the device's static data buffer. This transmission can be completed in one or a few asynchronous transmissions, the specific number of transmissions determined by the field type, buffer size, alignment requirements, and hardware transmission strategy. After the static data transmission is complete, the device reuses the static data buffer in subsequent time step loops and pollution source loops, without repeatedly transmitting this type of field.
[0065] The device-side performs logical slicing of the static data buffer based on the offset addresses in the static data routing configuration table, generating device-side access views corresponding to each field. For example, based on offset addresses such as off_x, off_y, off_elev, and off_flag, it obtains device-side access pointers for the receptor's x-coordinate, y-coordinate, elevation, and flag. During calculation, the receptor loop kernel reads the static attribute data of the corresponding receptor point through the aforementioned device-side access views. One-time cross-bus transfer and device-side slice view mapping: The massive buffer block packed_h is pushed into the device-side pre-allocated persistent memory pool packed_d via a single (and only) full-bandwidth Host-Device asynchronous transfer.
[0066] In the kernel control logic on the GPU device side, device-side pointer arithmetic operations are used to logically unpack and slice `packed_d` according to a pre-defined offset table. For example, a device-side view pointer `elev_d_ptr = packed_d + off_elev` is generated. This slice mapping mode makes the innermost computation kernel appear to be accessing independent attribute arrays in terms of code readability, while enjoying the benefits of minimal communication overhead from "one-time overall delivery" in the underlying physical execution. Furthermore, it is reused on the device side in subsequent nested loops without generating any further communication actions regarding this type of data.
[0067] Step S3: If the pollution source or the meteorological data in each time step changes, the updated data corresponding to the pollution source dynamic array and the time step-level meteorological field array are mixed, compressed, merged, and packaged to obtain a mixed time step-level array block and a mixed pollution array block, which are then sent to the device. Based on precision sensitivity grading, dynamic data mixing, merging, and packaging, along with device-side bit-width format restoration, are implemented. After addressing the communication overhead of static resident data, the AERMOD model enters the outer time loop and the intermediate contamination source loop. At this point, the data arrays of categories B and C require frequent dynamic updates to the device. To completely eliminate bus bandwidth exhaustion and fixed call overhead caused by frequent updates, this invention introduces a joint optimization mechanism for communication reconstruction and mixed-data transmission based on data lifecycle-driven principles at this stage.
[0068] Step S3.1: If the meteorological data changes within the current time step, the changed meteorological data is replaced in the time step-level meteorological field array to obtain a continuous time step-level array block; After entering the time step loop, when the time step changes, the host selects the data field with the lifecycle label as the time step level according to the data routing configuration table, and writes the meteorological parameters and control parameters corresponding to the current time step into the time step level packing buffer. The time step level data fields may include wind speed, wind direction, atmospheric stability, boundary layer height, and other fields that are updated with the time step.
[0069] The host end, following the field order, data type, and offset address in the data routing configuration table, merges multiple time-step level fields into one or more consecutive time-step level array blocks, and then sends these consecutive time-step level array blocks to the device-side time-step level buffer. Within the same time step, even if the pollution source changes, the time-step level data is not transmitted repeatedly, and the device-side receptor loop kernel directly reuses the data in the current time-step level buffer.
[0070] Step S3.2: If the pollution source loop is entered, replace the transformed pollution source data in the current time step with the pollution source dynamic array to obtain a continuous pollution source array block; Upon entering the pollution source cycle, when the current pollution source changes, the host selects the data fields with the lifecycle label as pollution source level according to the data routing configuration table, and writes the source coordinates, source height, emission parameters, source type, downwash parameters, and control flags corresponding to the current pollution source into the pollution source-level packaging buffer. The host merges multiple pollution source-level fields into one or more consecutive pollution source-level array blocks and sends them to the device-side pollution source-level buffer.
[0071] In this embodiment, the data transmission triggering condition is consistent with the actual data update cycle, thus avoiding the repeated transmission of time-step data in the inner loop of the pollution source and the repeated transmission of initialization resident data in the dynamic loop, thereby reducing the transmission frequency of the Host Device.
[0072] Step S3.3: Based on the transmission precision label corresponding to the time step-level routing configuration table, compress the data that allows low bit width transmission in the continuous time step-level array block and combine it with the data that does not allow low bit width transmission to obtain a mixed precision time step-level array block. The host further uses different transmission formats for data fields with different sensitivities based on the transmission precision labels in the data routing configuration table.
[0073] For highly sensitive fields in the transmission precision label that are not allowed to be transmitted with low bit width, the host side retains their original data type or a preset high-precision transmission type and writes them to the packing buffer. Highly sensitive fields include continuous numerical fields involved in distance calculation, diffusion parameter calculation, effective source height calculation, Gaussian exponent term calculation, concentration contribution calculation, and result accumulation. These fields maintain high precision to reduce the risk of error accumulation.
[0074] For weakly sensitive fields in the transmission precision label that allow low-bit-width transmission, the host uses low-bit-width encoding, quantization, or type compression before writing them to the packing buffer. Weakly sensitive fields include Boolean switches, enumerated categories, classification indices, source type flags, some control bits, and auxiliary variables that are allowed low-bit-width transmission after verification with a preset error threshold. For Boolean, enumerated, and classification index fields, low-bit-width encoding maintains semantic losslessness; for continuous auxiliary fields that allow lossy compression, their low-bit-width transmission error should meet a preset engineering error threshold.
[0075] For example, Boolean flags or enumeration category fields can be encoded as 8-bit integers, some non-core integer fields can be encoded as 16-bit integers, and error-verified weakly sensitive floating-point fields can be converted from 64-bit or 32-bit floating-point formats to 32-bit or 16-bit transmission formats.
[0076] It should be noted that the low-bit-width transmission in this step does not mean that the core physical formulas on the device side must be calculated using low precision. After receiving the low-bit-width field, the device performs format expansion, dequantization, or type conversion on the field according to the transmission data type and calculation data type in the data routing configuration table, converting it into the data format required by the recipient loop computation kernel before participating in the calculation. For fields that have undergone lossy compression, the converted value is not equivalent to a complete recovery of the original high-precision value, but is used for subsequent calculations under the constraint of a preset error threshold.
[0077] In this way, this embodiment reduces the number of data bytes occupied by low-sensitivity fields during the HostDevice transmission stage without changing the core computing process, thereby reducing the transmission volume.
[0078] Step S3.4: Based on the transmission precision label corresponding to the pollution source routing configuration table, compress the data that allows low bit width transmission in the continuous pollution source array block and combine it with the data that does not allow low bit width transmission to obtain the mixed precision pollution array block; It is understandable that the process of mixing, compressing, and packaging continuous pollution source array blocks is the same as the processing logic for continuous time step-level array blocks, and will not be elaborated here.
[0079] Step S3.5: Send the mixed sperm time step array block and the mixed sperm contamination array block to the device; It is understood here that the transmission method for sending the mixed-series array blocks to the device includes, but is not limited to, a single asynchronous PCIe transmission.
[0080] Step S4: Based on the preset multi-threaded parallel execution rules, the device performs slicing and precision restoration on the mixed sperm time step array block and the mixed sperm contamination array block respectively, to obtain the restored continuous contamination source array block and the restored continuous time step array block.
[0081] Step S4.1: According to the preset number of single-threaded execution arrays, the device side divides the mixed sperm time step array block and the mixed sperm pollution array block to obtain multiple mixed sperm time subarray blocks and multiple mixed sperm pollution subarray blocks; For high-concurrency unpacking and precision bit-width format recovery on the device side, after the GPU receives the mixed-precision block, it does not directly participate in the core physics formula calculation with low precision (this would lead to serious and uncontrollable engineering errors). Instead, within the initial extremely short period of the receptor loop kernel startup, the number of threads that the GPU needs to execute is determined using a preset single-threaded execution array number. The preset single-threaded execution array number mentioned here refers to the total number of arrays that each thread can process. Dividing the total number of arrays in the mixed-precision time step array block by the single-threaded execution array number yields the number of parallel threads. It can be understood that the number of parallel threads here must be within the range of the total number of threads that the GPU can process.
[0082] Step S4.2: The device performs parallel unpacking and precision recovery on each mixed-series time subarray block and each mixed-series contamination subarray block to obtain the recovered continuous time subarray block and the recovered continuous contamination subarray block; On the GPU side, each thread reads the low-precision fields from the mixed-precision time subarray block and the mixed-precision contamination subarray block, and then uses hardware-level built-in type conversion assembly instructions (such as PTX instructions cvt.f64.f16, etc.) to dequantize or expand them to restore them to the original computational precision (such as FP64 / FP32). This design cleverly utilizes the GPU's extremely high data throughput, type conversion computing power, and ultra-low on-chip latency to replace the extremely expensive cross-motherboard PCIe bus bandwidth, achieving a coordinated unity of significantly reduced communication and high-fidelity computational engineering.
[0083] Step S4.3: Combine all the recovered continuous time subarray blocks to obtain the recovered continuous time step array block, and combine all the recovered continuous pollution subarray blocks to obtain the recovered continuous pollution source array block.
[0084] Step S5: Based on the static continuous array block, the restored continuous pollution source array block, and the restored continuous time step array block, perform receptor cyclic parallel calculation. After reaching the preset output cycle, the calculation result array is sent back to the host in batches.
[0085] Specifically, based on static contiguous array blocks, recovered contiguous source array blocks, and recovered contiguous time step array blocks, the device performs cyclic parallel computation of receptors. The host calculates the grid dimension based on the total number of receptor points (numrec) and the thread block size (blockDim.x). gridDim.x = (numrec + blockDim.x - 1) / blockDim.x Internally within the kernel, each thread calculates its own corresponding receptor number, irec, based on its thread index. When irec exceeds the total number of receptor points, nucrec, the thread returns immediately to avoid out-of-bounds access.
[0086] For a valid thread, the device reads the receptor point coordinates, elevation, and terrain attributes from the static data buffer, reads the current meteorological parameters from the time step buffer, reads the current pollution source parameters from the pollution source buffer, and calculates the concentration contribution of the current time step and the current pollution source to the receptor point based on the AERMOD receptor concentration calculation logic.
[0087] In one alternative implementation, to reduce unnecessary calculations on the device side, the low-computation-overhead invalid receptor determination conditions can be moved forward without changing the original physical determination logic of AERMOD. For example, the relative distance between the receptor and the pollution source, wind direction relationship, or other non-contribution determination conditions already existing in the original model can be calculated first; when it is determined that the current receptor does not produce an effective concentration contribution under the current time step and the current pollution source, subsequent high-overhead diffusion parameter calculations, terrain correction calculations, or concentration formula calculations are skipped. This forward shift of conditions only changes the order of judgments and does not change the physical determination basis and semantics of the calculation results in the original model.
[0088] When a single kernel call corresponds to one time step and one contaminant source, each GPU thread only calculates and writes the concentration contribution storage location corresponding to its receptor number. Therefore, there are no write conflicts to the output array between different threads within the same kernel, and atomic addition operations are unnecessary. For the accumulation of contributions from multiple contaminants, the outer contaminant source can reuse the device-side result buffer, temporarily store the results by contaminant source dimension, and then reduce the result. Alternatively, a reduction method can be used on the device side to complete the total concentration accumulation.
[0089] After the device completes the concentration contribution calculation for the current time step and all receptor points under the current pollution source, it writes the calculation results to the device's result buffer. Depending on the model output requirements, the device can accumulate the contributions of multiple pollution sources within the pollution source cycle or time step cycle, or it can send the result array back to the host in batches after reaching the preset output period.
[0090] For concentration results that require long-term accumulation, it is preferable to accumulate intermediate results in the device-side result accumulation buffer to avoid immediately transmitting complete receptor results back to the host terminal after each pollution source or time step. The host terminal only triggers the device-to-host result transmission when output conditions, statistical conditions, or simulation termination conditions are met, thereby reducing unnecessary DtoH transmissions.
[0091] After receiving the results, the host computer summarizes, statistically analyzes, and outputs the concentration results according to the original AERMOD output format or the preset post-processing format.
[0092] This embodiment significantly suppresses GPU branch divergence through condition forwarding and early exit mechanisms, precisely focusing massive computing power on the effective computation domain. The dense if-else control flow in models like AERMOD easily leads to severe warp divergence in the GPU's SIMT architecture, dragging down overall computing power utilization. This invention reconstructs the kernel's internal instruction topology, moving the low-ALU overhead geometric screening judgment forward (condition forwarding). Once the receptor is identified as having no contamination contribution, early exit is triggered immediately. This mechanism allows a large number of thread bundles far from contamination sources to complete instantly and release SM resources, not only eliminating massive, ineffective, and expensive Gaussian integral derivation calculations but also maintaining high device-side concurrency activity, greatly improving the conversion efficiency of effective computing power.
[0093] Example 2 This embodiment provides a data transmission optimization system for the AERMOD receptor cycle, including: The data processing module is used to acquire multi-dimensional data required by the receptor cycle of the atmospheric pollution diffusion simulation model, preprocess and classify it to obtain a static resident array, a time-step meteorological field array, a pollution source dynamic array and the corresponding data routing configuration table; The static packaging module is used to flatten and package static continuous arrays based on static resident arrays and corresponding data routing configuration tables, and send them to the device. The dynamic compression module is used to compress and package the updated data corresponding to the pollution source dynamic array and the time step meteorological field array when the pollution source or meteorological data in each time step changes, so as to obtain the mixed and refined time step array block and the mixed and refined pollution array block and send them to the device. The dynamic recovery module is used to slice and restore the precision of the mixed sperm time step array block and the mixed sperm contamination array block on the device side based on the preset multi-threaded parallel execution rules, so as to obtain the restored continuous contamination source array block and the restored continuous time step array block. The receptor cyclic calculation module is used to perform parallel cyclic calculations of receptors based on static continuous array blocks, restored continuous pollution source array blocks, and restored continuous time step array blocks. After reaching the preset output cycle, the calculation result array is sent back to the host in batches.
[0094] The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1 above. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer-executable instructions.
[0095] The descriptions of each embodiment in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0096] The proposed system can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and the division of modules described above is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed.
[0097] Example 3 This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the data transmission optimization method for the AERMOD receptor cycle as described in Embodiment 1 above.
[0098] Example 4 This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the data transmission optimization method for the AERMOD receptor cycle as described in Embodiment 1 above.
[0099] Example 5 This embodiment provides a computer program product or computer program, including computer instructions stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the data transmission optimization method for the AERMOD receptor cycle described in Embodiment 1 above.
[0100] Those skilled in the art will understand that embodiments of the present invention can provide methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0101] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as 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 apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0102] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function 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.
[0103] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable 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.
[0104] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0105] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A data transmission optimization method for the AERMOD receptor cycle, characterized in that, include: The multi-dimensional data required for the receptor cycle of the atmospheric pollution diffusion simulation model are preprocessed and classified to obtain a static resident array, a time-step meteorological field array, a pollution source dynamic array, and a corresponding data routing configuration table. Based on the static resident array and the corresponding data routing configuration table, the array is flattened and packaged to obtain a static contiguous array block, which is then sent to the device, including: The static resident array organized according to the receptor object is flattened and packaged according to the layout of continuous static resident data of all receptor points corresponding to each physical attribute, to obtain the static attribute subarray of each physical attribute. Based on the field order in the static data routing configuration table of the static resident array, the static attribute subarrays of all physical attributes are combined to obtain a static contiguous array block and sent to the device. If the pollution source or meteorological data at each time step changes, the updated data corresponding to the pollution source dynamic array and the time step-level meteorological field array are mixed, compressed, merged, and packaged to obtain a mixed time step-level array block and a mixed pollution array block, which are then sent to the device. This includes: If the meteorological data changes within the current time step, the changed meteorological data is replaced in the time step-level meteorological field array to obtain a continuous time step-level array block. If the pollution source loop is entered, the transformed pollution source data in the current time step will be replaced in the pollution source dynamic array to obtain a continuous pollution source array block. Based on the transmission precision label in the time step routing configuration table, the data that allows low bit width transmission in the continuous time step array block is compressed and combined with the data that does not allow low bit width transmission to obtain a mixed precision time step array block. Based on the transmission precision label in the pollution source routing configuration table, the data in the continuous pollution source array block that allows low bit width transmission is compressed and combined with the data that does not allow low bit width transmission to obtain the mixed precision pollution array block. Send the mixed sperm time step array block and the mixed sperm contamination array block to the device; Based on the preset multi-threaded parallel execution rules, the device performs slicing and precision restoration on the mixed sperm time step array block and the mixed sperm contamination array block respectively, to obtain the restored continuous contamination source array block and the restored continuous time step array block; Based on static continuous array blocks, restored continuous pollution source array blocks, and restored continuous time step array blocks, receptor cyclic parallel computation is performed. After reaching the preset output cycle, the computation result array is sent back to the host in batches.
2. The data transmission optimization method for the AERMOD receptor cycle as described in claim 1, characterized in that, The multi-dimensional data required for obtaining the receptor cycle of the atmospheric pollution diffusion simulation model are preprocessed and classified to obtain a static resident array, a time-step meteorological field array, a pollution source dynamic array, and a corresponding data routing configuration table, including: The multi-dimensional data required for the receptor cycle of the atmospheric pollution diffusion simulation model are obtained and preprocessed to obtain the preprocessed multi-dimensional data. Based on the physical update frequency in the receptor cycle, the preprocessed multidimensional data are classified to obtain a static resident array, a time-step meteorological field array, and a pollution source dynamic array. Based on the preset routing configuration rules, routing configuration is performed on the static resident array, the time-step meteorological field array, and the pollution source dynamic array, generating a static routing configuration table, a time-step routing configuration table, and a pollution source routing configuration table.
3. The data transmission optimization method for the AERMOD receptor cycle as described in claim 1, characterized in that, Based on the preset multi-threaded parallel execution rules, the device performs slicing and precision restoration on the mixed sperm time step array block and the mixed sperm contamination array block, respectively, to obtain the restored continuous contamination source array block and the restored continuous time step array block, including: According to the preset number of single-threaded execution arrays, the device divides the mixed sperm time step array block and the mixed sperm pollution array block into multiple mixed sperm time sub-array blocks and multiple mixed sperm pollution sub-array blocks. The device performs parallel unpacking and precision recovery on each mixed sperm time subarray block and each mixed sperm contamination subarray block to obtain the recovered continuous time subarray block and the recovered continuous contamination subarray block; Combine all the recovered continuous time subarray blocks to obtain the recovered continuous time step array block, and combine all the recovered continuous pollution subarray blocks to obtain the recovered continuous pollution source array block.
4. The data transmission optimization method for the AERMOD receptor cycle as described in claim 1, characterized in that, Each data routing configuration table should include at least: Data field identifier, data category, lifecycle label, original data type, transmitted data type, device-side calculated data type, data length, target device buffer, transmission precision label, whether to participate in control flow determination, and update trigger conditions.
5. A data transmission optimization system for the AERMOD receptor cycle, characterized in that, include: The data processing module is used to acquire multi-dimensional data required by the receptor cycle of the atmospheric pollution diffusion simulation model, preprocess and classify it to obtain a static resident array, a time-step meteorological field array, a pollution source dynamic array and the corresponding data routing configuration table; The static packaging module is used to flatten and package static resident arrays and their corresponding data routing configuration tables to obtain static contiguous array blocks and send them to the device. This includes: The static resident array organized according to the receptor object is flattened and packaged according to the layout of continuous static resident data of all receptor points corresponding to each physical attribute, to obtain the static attribute subarray of each physical attribute. Based on the field order in the static data routing configuration table of the static resident array, the static attribute subarrays of all physical attributes are combined to obtain a static contiguous array block and sent to the device. The dynamic compression module is used to perform mixed compression and merging of the updated data corresponding to the pollution source dynamic array and the time step-level meteorological field array when the pollution source or meteorological data changes in each time step. This results in a mixed time step-level array block and a mixed pollution array block, which are then sent to the device. The module includes: If the meteorological data changes within the current time step, the changed meteorological data is replaced in the time step-level meteorological field array to obtain a continuous time step-level array block. If the pollution source loop is entered, the transformed pollution source data in the current time step will be replaced in the pollution source dynamic array to obtain a continuous pollution source array block. Based on the transmission precision label in the time step routing configuration table, the data that allows low bit width transmission in the continuous time step array block is compressed and combined with the data that does not allow low bit width transmission to obtain a mixed precision time step array block. Based on the transmission precision label in the pollution source routing configuration table, the data in the continuous pollution source array block that allows low bit width transmission is compressed and combined with the data that does not allow low bit width transmission to obtain the mixed precision pollution array block. Send the mixed sperm time step array block and the mixed sperm contamination array block to the device; The dynamic recovery module is used to slice and restore the precision of the mixed sperm time step array block and the mixed sperm contamination array block on the device side based on the preset multi-threaded parallel execution rules, so as to obtain the restored continuous contamination source array block and the restored continuous time step array block. The receptor cyclic calculation module is used to perform parallel cyclic calculations of receptors based on static continuous array blocks, restored continuous pollution source array blocks, and restored continuous time step array blocks. After reaching the preset output cycle, the calculation result array is sent back to the host in batches.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the data transmission optimization method for AERMOD receptor cycle as described in any one of claims 1-4.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the data transmission optimization method for AERMOD receptor cycle as described in any one of claims 1-4.
8. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps in the data transmission optimization method for AERMOD receptor cycles as described in any one of claims 1-4.
Citation Information
Patent Citations
Water quality detection method, device and equipment and storage medium
CN121113903A
Dynamic wind field forecast driven atmospheric pollution contribution assessment method and device
CN121860503A