Magnetic resonance training data generation method and system based on GPU acceleration Bloch simulation and combined with modal transformation

By using GPU-accelerated Bloch simulation and modal transformation to generate MRI training data, the problems of limited MRI training data acquisition and low simulation efficiency are solved. This enables efficient and traceable training data generation, meeting the needs of deep learning in tasks such as MRI reconstruction and artifact suppression.

CN121962347APending Publication Date: 2026-05-01XIAMEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAMEN UNIV
Filing Date
2026-01-22
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, the acquisition of MRI training data is limited, traditional Bloch simulation is inefficient, non-ideal factors are coupled inaccurately, the data generation process is fragmented, and the sample diversity and traceability are insufficient, making it difficult to meet the needs of deep learning in tasks such as MRI reconstruction, artifact suppression, and quantitative imaging.

Method used

We employ a GPU-accelerated Bloch simulation combined with modal transformation. By constructing a multi-parameter virtual object library, configuring magnetic resonance sequence parameters and non-ideal factors, and using the CUDA architecture to solve the Bloch equation in parallel, we output k-space and image domain data. We also generate cross-organ, multi-contrast training samples through rule-driven or data-driven modal transformation and record metadata to ensure traceability.

Benefits of technology

It achieves efficient, physically consistent and traceable magnetic resonance training data generation, improves data generation efficiency, expands sample diversity, and meets the training needs of deep learning in downstream tasks such as MRI reconstruction, artifact suppression, and quantitative imaging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962347A_ABST
    Figure CN121962347A_ABST
Patent Text Reader

Abstract

The invention discloses a magnetic resonance training data generation method and system based on GPU acceleration Bloch simulation and combined with modal transformation, and relates to medical imaging. The method comprises the following steps: establishing a multi-parameter virtual object library, and defining voxel-level T1, T2, PD and B0 / B1 distribution and coil sensitivity; according to an input sequence and acquisition parameters, time domain simulation is carried out by adopting GPU parallel Bloch solution, and non-ideal factors are injected as required; reconstructing to obtain k space and image domain data and generating paired labels; target comparison, organs and scenes are expanded through rule-driven or data-driven modal transformation; samples and metadata are packed to support traceability and verification. The system is composed of a parameter configuration module, a virtual object library module, a GPU simulation module, a reconstruction module, a modal transformation module and a data set management module. On the premise that physical consistency is guaranteed, data generation efficiency and diversity are remarkably improved, and the method is suitable for downstream tasks such as reconstruction, artifact suppression and quantitative imaging.
Need to check novelty before this filing date? Find Prior Art

Description

A method and system for generating magnetic resonance training data based on GPU-accelerated Bloch simulation and combined with modal transformation. Technical Field

[0001] This invention relates to the fields of medical imaging and computer simulation technology, and in particular to a method and system for generating magnetic resonance training data based on GPU-accelerated Bloch simulation combined with modal transformation. Background Technology

[0002] Deep learning has made significant progress in MRI reconstruction, artifact removal, and quantitative imaging, but its performance is highly dependent on large-scale and diverse labeled datasets. However, real-world data acquisition is constrained by ethical and cost limitations, and consistency across different machine models, sequences, and populations is difficult to guarantee. Physical simulations can fill the data gaps, but traditional simulations are inefficient in complex tissue models, parallel multi-coil scenarios, and long time-series scenarios, making it difficult to support the generation of large amounts of data and rapid iteration.

[0003] In MRI (with quantitative imaging as the primary example below), rapid T2 quantification methods based on single acquisitions and their deep learning-based reconstruction / mapping methods have validated the feasibility of "physical modeling + data-driven" approaches. However, these methods are primarily geared towards specific sequences and scenarios, limiting their generalization scope. Other works have embedded physical priors into learning frameworks (learning model constraints), improving reconstruction / mapping accuracy while reducing reliance on large-scale real-world labels. For example, in multiple overlapping echo separation imaging (MOLED), multiple parameters can be jointly estimated in a single acquisition, reducing training inconsistencies caused by registration / temporal differences between different parameters. However, this is not the only approach, and "multiple parameters" does not equate to covering all parameters of interest; design and expansion still require consideration of specific tasks and organ scenarios. Meanwhile, "limited coverage of real-world data" refers to the insufficient distribution of real-world data across organs, machine types, and protocols, which restricts cross-domain evaluation and transfer of models. It is not necessary to rely solely on real-world data for methodological research.

[0004] While some existing technologies attempt to embed physical priors into learning frameworks or achieve joint estimation of multiple parameters through specific sequences, these approaches are largely geared towards specific sequences and scenarios, have limited generalization capabilities, and fail to address the core contradiction between simulation efficiency and data diversity. Therefore, a universal training data generation scheme that can achieve a balance between physical consistency and data scale / diversity is urgently needed. Summary of the Invention

[0005] The purpose of this invention is to address the problems in existing technologies, such as limited access to real MRI training data, low efficiency of traditional Bloch simulation, inaccurate coupling of non-ideal factors, fragmented data generation processes, and insufficient sample diversity and traceability. This invention provides a method and system for generating magnetic resonance training data based on GPU-accelerated Bloch simulation combined with modal transformation, which achieves efficient, high-quality, physically consistent, and traceable magnetic resonance training data generation, meeting the training needs of deep learning in downstream tasks such as MRI reconstruction, artifact suppression, and quantitative imaging.

[0006] This invention efficiently performs Bloch physics simulation and reconstruction on parallel hardware (such as GPUs); and through rule-driven or data-driven (such as deep learning) modal transformation, it expands imaging contrast and imaging appearance style (differences in noise, texture and brightness distribution caused by different devices / sequence parameters) while maintaining physical rationality, thereby providing sufficient and more controllable training and validation samples for downstream tasks such as motion correction and rapid quantification; and achieves efficient, high-quality and traceable training data generation.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] This invention provides a method for generating magnetic resonance training data based on GPU-accelerated Bloch simulation combined with modal transformation, comprising the following steps:

[0009] 1) Construct a multi-parameter virtual object library: The virtual object library contains voxel-level parameter maps of at least two types of organs, and the parameter maps at least cover longitudinal relaxation time (T1), lateral relaxation time (T2), and effective lateral relaxation time (T2). The virtual object library is generated by parameter mapping from medical image segmentation maps, clinical parameter maps, or analytical phantoms, and supports organ template instantiation and parameterized sampling.

[0010] 2) Parameter Configuration: Input magnetic resonance sequence parameters, acquisition trajectory parameters, and non-ideal factor parameters, generate a configuration snapshot, and record a random seed; wherein, the magnetic resonance sequence parameters include echo time (TE), repetition time (TR), and flip angle; the acquisition trajectory parameters include relevant parameters of Cartesian trajectory, radial trajectory, or helical trajectory; the non-ideal factor parameters include at least... Field inhomogeneity parameters Field offset parameters and motion field parameters, the non-ideal factors may also include at least one of gradient nonlinearity, eddy current, phase drift, thermal noise and subject motion; radio frequency (RF) pulses, gradient waveforms and echo time series are input in a parameterized manner and recorded in metadata to ensure reproducibility;

[0011] 3) GPU-accelerated Bloch simulation: A voxel-parallel solver is built based on the CUDA architecture. The virtual object parameters from step 1) and the sequence parameters and non-ideal factor parameters from step 2) are input into the solver. The non-ideal factors are coupled in time slices and the Bloch equations are solved in parallel, outputting the original MR signal and the corresponding k-space data. The GPU-accelerated Bloch simulation adopts a time-series block and multi-coil parallel strategy, supports multi-threaded accumulation and vectorized operation, and can obtain multiple echo data in a single acquisition and perform joint fitting, while simultaneously estimating T2 and T2. Or parameters such as M0; the voxel parallel solver adopts a "time-sequence block + multi-threaded accumulation" strategy, which divides the time evolution process of the Bloch equation into sequential time slices, and allocates the relaxation and precession calculations of each voxel to an independent GPU thread to achieve voxel-level parallel computing; non-ideal factors are coupled with radio frequency pulses and gradient pulses according to time slices, specifically: within each time slice, synchronous updates Field strength, B0 field offset and motion field displacement, and the magnetization vector evolution equation of the corrected voxel;

[0012] 4) Image reconstruction: Perform inverse Fourier transform (IFFT) or non-uniform fast Fourier transform (NUFFT) on the k-space data output from step 3) to obtain image domain data, and generate paired labels for "with / without non-ideal factors".

[0013] 5) Modality Transformation: A rule-driven or data-driven modality transformation strategy is used to transform the image domain data obtained in step 4) to generate target samples with cross-organ and multi-contrast characteristics. The modality transformation process introduces physical consistency constraints. The rule-driven modality transformation strategy is based on the physical principle of magnetic resonance and generates images with different contrasts (such as T1-weighted, T2-weighted, and proton density (PD)-weighted) by adjusting the weights of T1 and T2 and the noise distribution. The data-driven modality transformation strategy uses one of the following: generative adversarial network, conditional diffusion model, or recurrent consistency network. A loss function is introduced during the training process to ensure the physical rationality of the transformed data.

[0014] 6) Dataset output: Pack and output k-space data, image domain data, paired labels and metadata. The metadata includes configuration snapshot, configuration snapshot check value, data version number, random seed, non-ideal factor parameters, sequence parameters and running log summary to ensure the traceability of the generation process and the reproducibility of experimental results.

[0015] Furthermore, in step 1), the virtual object library is generated by parameter mapping from medical image segmentation maps, clinical parameter atlases, or analytical phantoms, supporting organ template instantiation and parameterized sampling.

[0016] Further, in step 2), the magnetic resonance sequence parameters include echo time (TE), repetition time (TR), and flip angle, and the acquisition trajectory parameters include parameters of Cartesian trajectory, radial trajectory, or helical trajectory.

[0017] Further, in step 2), the non-ideal factors include at least one of B0 non-uniformity, B1 non-uniformity, gradient nonlinearity, eddy current, phase drift, thermal noise, and subject motion; radio frequency (RF) pulses, gradient waveforms, and echo time series are parameterized and recorded in metadata to achieve reproducibility.

[0018] Furthermore, in step 3), the GPU-accelerated Bloch simulation employs a timing-blocking and multi-coil parallel strategy, and supports multi-threaded accumulation and vectorized operations. The parallel simulation supports acquiring multiple echo data in a single acquisition and performing joint fitting to simultaneously estimate T2 and T2. Or parameters such as PD.

[0019] Furthermore, in step 3), the voxel-parallel solver adopts a "time-sequence block + multi-threaded accumulation" strategy, dividing the time evolution process of the Bloch equation into sequential time slices. The relaxation and precession calculations of each voxel are allocated to independent GPU threads to achieve voxel-level parallel computation. Non-ideal factors are coupled with radio frequency pulses and gradient pulses according to time slices. Specifically, within each time slice, synchronous updates are performed. Field strength, B0 field offset, and motion field displacement are used to correct the magnetization vector evolution equation of the voxel.

[0020] Further, in step 5), the modality transformation strategy includes at least one of rule-driven or data-driven approaches; the rule-driven modality transformation strategy is: based on the physical principle of magnetic resonance, images with different contrasts (such as T1-weighted, T2-weighted, and PD-weighted) are generated by adjusting the weights of T1 and T2 and the noise distribution; the data-driven modality transformation strategy adopts one of generative adversarial networks, conditional diffusion models, or recurrent consistency networks, and a loss function is introduced during training.

[0021] Furthermore, in step 6), the metadata includes configuration snapshot, configuration snapshot verification value, data version number, random seed, non-ideal factor parameters, sequence parameters, and operation log summary, which are used to ensure cross-platform experiment reproducibility and data traceability.

[0022] This invention provides a magnetic resonance training data generation system based on GPU-accelerated Bloch simulation combined with modal transformation, including a parameter configuration module, a virtual object library module, a parallel simulation module, a dual-domain reconstruction module, a modal transformation module, and a dataset management module. The functions and interface relationships of each module are as follows:

[0023] The parameter configuration module takes as input user-defined sequence parameters, acquisition trajectory parameters, and non-ideal factor parameters; the output is a standardized configuration file and configuration snapshot, while performing parameter consistency verification and outputting the verification results; its core function is to achieve unified parameter configuration, verification, and snapshot retention, providing a foundation for experimental reproduction.

[0024] Virtual Object Library Module: Inputs include organ segmentation maps, clinical parameter atlases, or parsed phantom data; outputs a standardized collection of multi-organ voxel-level parameter maps, supporting organ template instantiation, parameter perturbation, and cross-organ transfer; its core function is to provide virtual imaging objects covering multiple organs and parameters, supporting the generation of diverse samples;

[0025] Parallel Simulation Module: Inputs include parameter graphs output from the Virtual Object Library module and configuration files output from the Parameter Configuration module; it implements voxel-parallel Bloch equation solving based on the CUDA architecture, performs multi-threaded parallel solving of the Bloch equation on the graphics processor, and injects non-ideal factors; outputs the original k-space signal and the coupled record of non-ideal factors; the core function is to achieve efficient and physically consistent magnetic resonance signal simulation.

[0026] Dual-domain reconstruction module: The input is the k-space signal output by the GPU parallel simulation module; it performs IFFT or NUFFT reconstruction and outputs image domain data and "with / without non-ideal factors" paired labels; the core function is to simultaneously acquire k-space and image domain dual-domain data to adapt to different downstream task requirements.

[0027] Modality transformation module: The input is the original dual-domain samples output by the dual-domain reconstruction module; it supports switching between rule-driven and data-driven modes and is compatible with both batch offline inference and online enhancement modes; it outputs target samples across organs and with multiple contrasts using either rule-driven or data-driven methods, and the output results meet physical consistency constraints; its core function is to expand the organ coverage and contrast diversity of the samples.

[0028] Dataset Management Module: The inputs are the dual-domain samples and paired labels output by the dual-domain reconstruction module, the target samples output by the modality transformation module, and the metadata output by the parameter configuration module; it records non-ideal factor parameters, noise levels, operation logs and version information, and outputs a structured dataset; its core function is to realize data archiving, traceability and replay, and ensure the standardization and reusability of the dataset.

[0029] The present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described method for generating magnetic resonance training data based on GPU-accelerated Bloch simulation and combined with modal transformation.

[0030] The present invention provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the program to implement the above-mentioned method for generating magnetic resonance training data based on GPU-accelerated Bloch simulation and combined with modal transformation.

[0031] This invention proposes a basic framework for generating magnetic resonance imaging (MRI) training datasets, providing interfaces for time-slice injection and coupling to adapt to different pulse sequences and acquisition trajectories; simultaneously outputting k-space and image domain results for easy integration with pipelines for tasks such as reconstruction, segmentation, and artifact suppression; exporting data and metadata in a structured format for traceability and verification; and combining a virtual object library and modality transformation to support expanding training samples by organ and contrast. The framework employs a mechanism of "voxel parallel GPU-Bloch + time-slice coupling for non-ideal factors + dual-domain traceable output," specifically including but not limited to the following key points:

[0032] (1) Voxel parallel solution of Bloch equations, and provide an interface for time-slice injection and coupling of independent components such as B0 / B1, motion and noise;

[0033] (2) Sample and record the k-space over time slices, and reconstruct the image domain results simultaneously;

[0034] (3) Export k-space / image domain data and metadata (including configuration snapshot, random seed, version number, environment path and runtime log summary) in structured format for traceability and verification;

[0035] (4) Perform rule / learning-driven modal transformation on virtual objects or output results to generate cross-organ, multi-contrast samples and "with / without non-ideal conditions" paired labels.

[0036] Compared with existing technologies, this invention achieves joint improvements in four dimensions: coupling granularity, output domain, traceable metadata, and scalable sample generation. It proposes a joint mechanism of "voxel parallel GPU-Bloch + non-ideal factor time-slice coupling + dual-domain traceable output," which has the following outstanding technical effects and advantages:

[0037] 1. Under non-ideal factors ( , In cases involving motion, etc., time-slice coupling is employed, and updates are performed time-slice by time during Bloch evolution. and This ensures that non-ideal effects are strictly synchronized with sequential events, guaranteeing physical consistency.

[0038] 2. Simulates k-space and image domain results simultaneously, avoiding repeated simulations for different tasks (such as reconstruction / segmentation / artifact removal), reducing at least one redundant run, and significantly improving data generation efficiency.

[0039] 3. Structured export of metadata such as configuration snapshots, random seeds, and version information ensures consistent output results under the same configuration and random seed conditions, thereby guaranteeing the reproducibility of experiments and providing reliable support for cross-platform experimental verification and algorithm iteration.

[0040] 4. Through the decoupled design of the virtual object library and the modality transformation module, it is possible to extend to cross-organ and multi-contrast sample generation simply by changing the virtual object file and sequence configuration.

[0041] 5. The system integrates path configuration, online editing, operation control, log viewing, and parameter verification functions into a single interface, forming a complete closed loop of "configuration—run—verification—export," reducing operational complexity and improving the efficiency of engineering applications. Experiments show that on an NVIDIA RTX3060 GPU, using the SE sequence, this invention can achieve single-image simulation in seconds, with a total time of approximately 2-3 seconds per image, and reproducible output can be achieved through random seeds. Attached Figure Description

[0042] Figure 1 shows the main interface for parameter configuration and operation control of this system.

[0043] Figure 2 shows the sequence file selection interface of this system.

[0044] Figure 3 shows the sequence drawing interface of this system.

[0045] Figure 4 shows the GPU-accelerated Bloch simulation process.

[0046] Figure 5 illustrates the network / data flow.

[0047] Figure 6 is a schematic diagram of virtual objects and non-ideal conditions according to an embodiment of the present invention. The left side shows parameter diagrams of two types of virtual objects (brain and abdomen), and the right side shows non-ideal conditions (…). , Example of a sports field; each parameter graph is shown as an example cross-section (the same parameter usually includes a combination of axial / sagittal / coronal views, etc.), the horizontal / vertical position corresponds to the spatial position (pixel coordinates) in the image plane, and the color / grayscale bar (color scale) represents the magnitude and unit of the corresponding physical quantity; the upper part shows a multi-parameter quantitative graph of a virtual brain object, including T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T21, T22, T10 ... M0, phase and magnetic susceptibility ( The middle section displays multi-parameter quantitative graphs of the virtual abdominal object, including T1, T2, and M0; the right side displays example graphs of non-ideal conditions, including... Field distribution, ΔB0 field distribution, and motion field (used to characterize non-rigid displacement / velocity information caused by free breathing, etc.).

[0048] Figure 7 is a performance comparison diagram of an embodiment of the present invention. (a) shows a comparison of simulation time between this platform (SMRI) and representative methods SPROM and MRiLab. The horizontal axis represents different methods, and the bars correspond to three types of sequences: GRE, ssGRE-EPI, and msGRE-EPI. This group of experiments used a unified simulation setting of 512×512 spins and generating 128×128 voxels to compare the overall running time under the same task and parameters. (b) shows a comparison of simulation time on different GPUs with varying computing power. The horizontal axis represents models such as GTX 1080Ti, RTX 2080 Ti, and RTX 3080 Ti, and the bars represent the simulation time of GRE, ssGRE-EPI, and msGRE-EPI, illustrating the change in running time due to increased hardware computing power.

[0049] Figure 8 is a schematic diagram of the parallel architecture of GPU parallel Bloch simulation of the present invention.

[0050] Figure 9 is a system module architecture diagram of the present invention.

[0051] Figure 10 is a schematic diagram of the method flow of the present invention. Detailed Implementation

[0052] To make the technical solution of the present invention clearer, the embodiments of the present invention will be further described below with reference to the accompanying drawings. The description is only used to illustrate the workflow and module relationships of the present invention and does not limit the scope of protection. This embodiment takes the generation of a training dataset suitable for multi-parameter quantitative MRI tasks as an example to specifically illustrate the implementation process of a method and system for generating magnetic resonance training data based on GPU-accelerated Bloch simulation combined with modal transformation.

[0053] Example 1: System Example

[0054] Figure 9 illustrates the connection relationships and data transmission paths between the functional modules of the system of the present invention. As shown in Figure 9, the system of the present invention is logically organized according to the sequence of "data preparation → input aggregation → simulation engine → output and archiving → data collection library". Each module is progressive and the data flow is closed-loop. Specifically, it includes the following core modules and interface relationships:

[0055] 1. Extension and Plug-in Module: This module provides flexible extension capabilities for the system, including three sub-modules: "Sequence Extension," "Model Extension," and "Export Extension." It adopts a plug-in design, allowing adaptation to different application requirements without modifying the core simulation engine.

[0056] Sequence Extension Submodule: Used to add new pulse sequence types (such as GRE, SE, EPI, etc.) or sequence event organization methods (timing logic for RF pulses, gradient signals, and ADC sampling).

[0057] Model extension submodule: used to add non-ideal condition models (such as adding gradient nonlinear models), coil models (such as multi-channel phased array coil sensitivity models) or mode transformation network structures (such as replacing the backbone network of a generative adversarial network).

[0058] Export extension submodule: Used to add new output formats, such as adjusting the storage encoding of k-space data, the format of image domain data (such as DICOM, NIfTI), and the organization of metadata indexes (such as XML, JSON).

[0059] The extension and plug-in modules provide standard call entry points to the data service module and the output archiving module, enabling the system to be extended according to application needs without modifying the core simulation engine, achieving plug-and-play functionality.

[0060] 2. Interaction and Configuration Module: Serving as the user's interaction entry point with the system, this module includes two sub-modules: parameter editing and verification, and task control and monitoring. It is used to complete parameter configuration editing, legality verification, and start / stop and status monitoring of the task execution process. It also interacts with the "control interface" to control the simulation process.

[0061] The parameter editing and validation submodule is used to edit and validate parameters such as sequences, objects, non-ideal conditions, and coils. It supports users in editing sequence parameters (such as TE and TR), virtual object selection parameters, non-ideal condition parameters, and coil parameters, while performing legality checks (such as numerical range checks, field integrity checks, and path accessibility checks) to avoid invalid configurations.

[0062] The Task Control and Monitoring submodule is used to start, stop, and monitor simulation tasks and display logs. It provides control functions for starting, stopping, and pausing simulation tasks, and displays running logs in real time (such as configuration verification results, simulation progress, and error messages) to facilitate users in tracking task status.

[0063] The control commands of the interaction and configuration module are transmitted to the simulation engine through the "control interface" shown in Figure 9 to realize the operation control; an example of the interface is shown in Figure 1.

[0064] 3. Data Service Module: This is the core data processing module of the system, responsible for data preparation and preprocessing. The data service module includes four sub-modules: "Sequence and Sampling Configuration," "Virtual Object Management," "Non-ideal Condition Generation," and "Coil Model Management." Information such as sequence configurations, virtual object parameters, non-ideal condition parameters, and coil model parameters generated by all sub-modules are output to the "Input Merging" module.

[0065] The sequence and sampling configuration submodule is used to read or generate sequence files (such as ".SEQ" format, JSON format), discretize the continuous pulse sequence into an array of time slices, each time slice contains RF control quantity, gradient control quantity, time interval Δt, ADC sampling flag, and calculate the k-space trajectory k(t) through gradient discrete integration to determine the coordinates of the sampling points.

[0066] Virtual Object Management Submodule: Used to load the multi-parameter graph of virtual objects, containing at least T1, T2, and M0 parameter graphs, with T2 optional. Parameters such as phase and magnetic susceptibility are shown in Figure 6 (see the left side for an example).

[0067] Non-ideal condition generation submodule: used to generate or read field, The spatial distribution data of the field and motion field also supports the configuration of error terms such as noise (e.g. Gaussian noise), bias field, and phase difference (see Figure 6 right and Figure 4 for examples) to simulate non-ideal scenes in real imaging.

[0068] Coil Model Management Submodule: Used to generate or read the sensitivity distribution of multiple receiving coils. (c is the coil index), providing a weighting basis for multi-coil signal synthesis, corresponding to "coil sensitivity" in Figure 8. Input item.

[0069] 4. Input aggregation + data interface: This is used to organize the above multi-source inputs into a unified data structure and pass it to the simulation engine through the "data interface".

[0070] Input aggregation module: This module aggregates and standardizes multiple inputs (sequence time slice control quantities, voxel parameters, non-ideal conditions, coil sensitivity) from the data service module to form a unified data structure, avoiding simulation anomalies caused by inconsistent data formats; and provides a unified input data structure to the simulation engine through the "data interface".

[0071] Data Interface: An interface channel used to provide input data to the simulation engine. Serving as a communication channel between the input concentrator and the simulation engine, it provides a stable data transmission interface, ensuring efficient and accurate data transfer to the simulation engine.

[0072] Typical inputs for input merging include:

[0073] Sequence time-slice control variables: RF(t), G(t), Δt, ADC, k(t);

[0074] Voxel parameters: T1, T2, (T2 optional) M0, proton density ρ, voxel coordinates r;

[0075] Non-ideal conditions: Field shift, Field inhomogeneity, motion parameters, noise parameters, etc.;

[0076] Coil sensitivity: (Multi-coil scenario).

[0077] 5. Control Interface: Used to receive control commands issued by the interaction and configuration module and establish a control channel with the backend simulation engine.

[0078] 6. Simulation Engine: As the core computing unit of the system, it consists of two parts: the Cpp scheduling module and the CUDA Bloch Kernel. It is used to call the CUDA Bloch Kernel to perform GPU-accelerated Bloch simulation calculations under the control of Cpp scheduling. The simulation engine receives input from the "data interface" and outputs simulation results through the "output interface".

[0079] The Cpp scheduling module is responsible for copying / binding the data from the input merging module to the GPU, configuring the CUDA Grid and Block structures according to the voxel scale, and calling the CUDA Bloch Kernel to perform "time-slice iterative Bloch evolution + sampling gating + multi-coil parallel aggregation", outputting multi-coil k-space and optional Raw MR signal / image domain results.

[0080] CUDA Bloch Kernel: The core computing unit performs "Bloch evolution iteratively over time slices + sampling gating + multi-coil parallel aggregation" calculations at the voxel parallel granularity, and finally outputs multi-coil k-space data. It can optionally output the raw MR signal or preliminary image domain results.

[0081] The input to this module comes from the data interface, and the output is passed to the output and archiving module through the output interface, corresponding to the GPU-accelerated Bloch simulation process in Figure 4 and the parallel architecture logic in Figure 8.

[0082] 7. Output interface + output and archiving module:

[0083] The output interface serves as a communication channel between the simulation engine and the output and archiving module. It receives k-space data, raw MR signals, and other results output by the simulation engine to ensure the stability of data transmission; it outputs the result data calculated by the simulation engine and transmits the results to the "output and archiving module".

[0084] The output and archiving module includes three sub-modules: "Result Visualization," "Dataset Export," and "Log and Traceability," which are used to complete result processing, data archiving, and traceability support.

[0085] Results visualization: Used to display the output waveform or reconstructed image (corresponding to the PlotOUT / PlotSEQ usage scenario in Figure 1), allowing users to intuitively verify the consistency between the configuration and the results;

[0086] Dataset Export: The k-space data, image domain data, "with / without non-ideal conditions" pair labels, virtual object parameter graphs, non-ideal condition parameters, etc. are structured and packaged to generate a training dataset that meets the requirements of downstream tasks.

[0087] Logs and traceability: Record configuration snapshots (including sequence parameters, non-ideal condition switches, number of coils, etc.), random seed, software and hardware version information, and runtime logs (including time consumption and error information at each stage) to support reproduction and traceability.

[0088] Finally, the module writes the structured dataset and related metadata into the "data collection library" to achieve long-term data storage and reuse.

[0089] 8. Data Collection Library: Used to store structured datasets, metadata, operation logs, and other information written by the output and archiving modules. It supports data indexing, querying, and retrieval, providing data support for subsequent repeated experiments and model training, and ensuring the manageability of data assets.

[0090] Example 2: Implementation steps from virtual object construction to dataset export

[0091] This embodiment takes the generation of multi-parameter quantitative MRI training data as an example. The data flow is consistent with the data service → input aggregation → simulation engine → output archiving shown in Figure 9. The parallel computing logic follows the architecture design shown in Figure 8, specifically including two parts: "GUI interaction logic" and "core process steps".

[0092] (a) Implementable programming logic and backend call flow of the GUI

[0093] The GUI is implemented using MATLAB's GUI framework (based on the UIControl interface construction method). Its core is a closed loop of "control—callback function—configuration file—external executable program—output file—visual verification" to ensure consistency between user operations and backend calculations.

[0094] 1. Interface structure and control binding (Figure 1)

[0095] The GUI has a clear layout and well-defined functional areas, including at least the following controls and display areas, with each control bound to a callback function to implement operation responses:

[0096] Path configuration area: Contains three text boxes: CMakePath, CUDAPath, and LDLibraryPath, as well as a "SavePath" button, used to configure the environment paths that the system depends on;

[0097] The Seq Configuration table contains three columns: Parameter, Value, and Path. It is used to display and edit sequence configuration items (such as TE, TR, flip angle, etc.) and provides three operation buttons: "Load File / Update File / Save File", which are used to load the configuration file, update the parameter values, and save the configuration file, respectively.

[0098] The operation control area includes a "Run" button (used to start the simulation task) and a log display window (used to display verification information, running status, and error messages, etc.).

[0099] The plotting tools section includes a "PlotSEQ" button (for plotting sequence waveforms) and a "PlotOUT" button (for plotting output signals or images), with a waveform / image display window at the bottom.

[0100] 2. Path configuration and environment verification logic (“Save Path” callback function)

[0101] This step ensures that the backend simulation engine (C++ scheduler and CUDA Kernel) has the necessary dependencies for operation; when the user clicks the "Save Path" button, the GUI executes the following logic:

[0102] 2.1 Read the CMakePath, CUDAPath, and LDLibraryPath paths entered in the three text boxes;

[0103] 2.2 Execution path verification: Verify the existence and accessibility of the path (e.g., the directory exists, the critical executable file exists, the dynamic library directory exists, etc.);

[0104] 2.3 After successful verification, the path information is written to the main configuration file mainCfg.json (or an equivalent structured configuration file, such as XML);

[0105] 2.4 Print the verification results in the log display window: success / failure reason. If the verification is successful, it will prompt "Environment path configuration is effective". If the verification fails, it will clearly prompt the reason for the failure (such as "CMakePath directory does not exist" or "Dynamic library is missing").

[0106] 3. Sequence configuration loading, editing, and saving logic ("Load File / Update File / Save File" callback functions)

[0107] (1) "Load File" callback logic

[0108] A file selection window pops up, allowing users to select or enter the path to the sequence configuration file (supporting ".SEQ" files or "seq.json" files).

[0109] Parse the configuration file content, extract key parameters (such as TE, TR, RF amplitude / phase, gradient waveform parameters, ADC sampling settings, etc.), and automatically fill them into the corresponding rows of the parameter table (the Parameter column matches the parameter name, the Value column is filled with the parameter value, and the Path column is filled with the file path).

[0110] During the parsing process, format and range checks are performed. If there are missing fields (such as undefined TE values) or parameters that exceed the reasonable range (such as a flip angle greater than 360°), a clear message will be given in the log window (such as "Missing TE parameter" or "Flip angle range is abnormal (reasonable range 0-360°)"), and the configuration file will be prevented from loading.

[0111] (2) "Update File" callback logic

[0112] Read the parameter value modified by the user in the "Value" column of the parameter table and update it synchronously to the internal parameter object in memory;

[0113] Perform constraint validation on the modified items: check the parameter type (e.g., whether the numeric parameter is a valid number), parameter range (e.g., the TE value must be greater than 0), and the existence of the file for path parameters. If the validation fails, prompt in the log window and refuse to update.

[0114] (3) "Save File" callback logic

[0115] Export the updated internal parameter object in memory as a structured sequence configuration file (such as "seq.json" or ".SEQ") in the format selected by the user.

[0116] While saving the configuration file, a configuration snapshot is automatically generated. The snapshot content includes key information such as sequence parameters, virtual object selection identifier, non-ideal condition switch state, number of coils Nc, and random seed, which is used for subsequent experimental traceability and reproduction.

[0117] After successful saving, the log window will display a message: "Configuration file saved successfully, configuration snapshot generated".

[0118] 4. Simulation task startup and process monitoring logic (“Run” callback function, corresponding to Figure 9 “Task Control and Monitoring → Control Interface → Simulation Engine”)

[0119] When the "Run" button is clicked, the GUI performs the following operations in sequence: starts the backend simulation and monitors the running status:

[0120] 4.1 Read the main configuration file mainCfg.json and the sequence configuration file seq.json (or ".SEQ"), and merge them to form a unified runtime configuration;

[0121] 4.2 Call input validation to ensure that all resources required for simulation are available, including:

[0122] Verify that the virtual object parameter graph exists (e.g., the file paths of parameter graphs T1 and T2 are valid).

[0123] Verify whether non-ideal configuration conditions are valid (e.g., whether they are generated / read). field, Field data);

[0124] Verify coil sensitivity Does the data exist?

[0125] Verify that the output directory is writable (to ensure that simulation results can be saved normally);

[0126] 4.3 Start the backend simulation executable program via system call interfaces (MATLAB's system() function, process function, or calllib function), passing the following key parameters at startup:

[0127] Configuration file path: The full path to mainCfg.json, seq.json (or ".SEQ");

[0128] Virtual object information: The file path and object number of the virtual object (a parameter diagram used to locate the target organ);

[0129] Non-ideal condition configuration: The on / off state (enabled / disabled) of non-ideal conditions and the corresponding file path;

[0130] Output and random seed: Output directory path, random seed (used to ensure reproducibility of results);

[0131] 4.4 GUI enters monitoring loop: periodically reads the stdout / stderr output or log file of the backend program, and displays the running progress (such as "30% of the time slice simulation has been completed") and error messages (such as "parameter plot format error") in the log window in real time;

[0132] 4.5 After the simulation task is completed (successfully or unsuccessfully), the GUI automatically locates the output file (k-space data file, Raw MR signal file, ".out" log file, etc.) in the output directory and updates the interface status to "Completed / Failed".

[0133] The above process is the implementable software logic shown in Figure 9: "Interaction and Configuration Module → Control Interface → Simulation Engine → Output Interface → Output and Archiving Module".

[0134] 5. Implementable logic for PlotSEQ and PlotOUT (corresponding to windows in Figures 2 and 3)

[0135] 5.1 The "PlotSEQ" callback function: used to visualize the sequence waveform and assist users in verifying the correctness of the sequence configuration.

[0136] Input: Sequence file (.SEQ) or discrete array of time slices (containing RF(t), G(t), ADC flags, and time axis information);

[0137] Analysis: Extract the time axis (sequence time t or time slice index n), RF pulse amplitude / phase, amplitude of the three gradient channels Gx / Gy / Gz, and ADC sampling flag;

[0138] Output: Plot the multi-track timing waveform, with the horizontal axis representing the sequence time. or time slice index The vertical axis represents the RF amplitude, gradient amplitude (which can be displayed as Gx / Gy / Gz respectively) or sampling markers (track-style display).

[0139] 5.2 The "PlotOUT" callback function: used to visualize simulation output results and assist users in verifying the validity of the simulation.

[0140] Input: Output log file (.out), containing Raw MR signal (complex sequence), sampling point information, and image domain data (optional);

[0141] Analysis: Extract the raw MR signal (complex sequence) or the sequence of sample points;

[0142] Output: Plot the output curve. The horizontal axis represents the sampling point index. (or sampling time) The vertical axis represents the signal amplitude. (or real part / imaginary part).

[0143] (II) Implementation Steps of Core Processes

[0144] A method for generating magnetic resonance training data based on GPU-accelerated Bloch simulation combined with modal transformation includes the following steps:

[0145] S1: Environment and File Configuration

[0146] This step prepares for the simulation task, ensuring that the environment, parameters, and resources meet the requirements: Deploy the front-end control program and the back-end simulation executable program in the magnetic resonance training data generation system of this invention (hereinafter referred to as "this system"), and configure the GPU driver, CUDA runtime environment, and dynamic library search path; specifically: Read the main configuration mainCfg.json and sequence configuration seq.json in the configuration module (or equivalent configuration file) shown in Figure 1 to obtain parameters such as the project directory, sequence directory, virtual object directory, CMakePath / CUDAPath / LDLibraryPath, and GPU selection strategy; validate the format and range of the JSON fields and output logs.

[0147] 1.1 Set the runtime environment and path (CMakePath, CUDAPath, LDLibraryPath, etc.) in the interface shown in Figure 1 and save;

[0148] 1.2 Load or generate sequence configuration and data generation configuration (including output path, random seed, whether to enable non-ideal conditions, number of coils Nc, etc.);

[0149] 1.3 System execution parameter validity verification: including field integrity verification (such as whether TR and TE parameters are missing), parameter range verification (such as flip angle 0~360°, TE>0), and file existence verification (such as whether virtual object files and coil sensitivity files are accessible);

[0150] 1.4 After the verification is successful, the verification result is written to the log, and the system enters the task ready state, waiting for the user to start the simulation.

[0151] S2: Virtual Object Loading

[0152] This step provides the physical basis for the simulation (virtual organ model), ensuring the accuracy and spatial consistency of voxel parameters: It reads the parameter maps (T1, T2, T3) of the target organ from the virtual object library. (M0 / ρ, phase, magnetic susceptibility, and optional B0loc, etc.) A voxel coordinate grid is established according to the resolution and FOV, and resampling / alignment is performed; the magnetization vector of each voxel is initialized. When using a multi-spin model, based on T2 and T2... Generate a spin frequency offset set for each voxel. And record the random seed to ensure reproducibility.

[0153] 2.1 Read multi-parameter maps of target organs from the virtual object library, supporting at least two organs such as the brain and abdomen, with the parameter maps covering core physical parameters:

[0154] Brain: T1 mapping, T2 mapping, M0 mapping, T2 mapping is optional mapping, phasemapping, surceptibility mapping (magnetic susceptibility map).

[0155] Abdomen: T1 mapping, T2 mapping, M0 mapping;

[0156] Example formats for each parameter diagram are shown on the left side of Figure 6. The units for T1, T2, and T2 are ms, the unit for M0 is au (any unit), the phase diagram has no unit, and the unit for the magnetic susceptibility diagram is ppm.

[0157] 2.2 Voxel Mesh Unification: Resample all parametric maps to a unified voxel mesh. (e.g., 128×128×64), establish global voxel coordinates (Unit: mm) Ensure that the same coordinate on different parameter maps corresponds to the same anatomical location;

[0158] 2.3 Magnetization Vector Initialization: Initialize the magnetization vector for each voxel, with the initial state as follows: ,in The value of this voxel in the M0 mapping represents the longitudinal magnetization in equilibrium (the unit in Figure 6 is au).

[0159] 2.4 Optional: If T2 is enabled Multi-spin modeling allows for the construction of multiple frequency offset components for each voxel. (s is the spin index), used for subsequent precession term superposition to achieve T2. Expanded feasible computational paths.

[0160] S3: Sequence and Sampling Settings:

[0161] This step converts the pulse sequence into a simulation-recognizable time-slice sequence, defining the k-space sampling trajectory: It loads the ".SEQ" or equivalent JSON sequence parameters (TE, ESP, flip angle, RF amplitude / phase / frequency, gradient waveform, and ADC flags, etc.) and discretizes the sequence into time-slice sequences. ;Depend on Calculate the k-space trajectory and sample point list, and generate the output buffer layout; optional output RF / gradient / sample point timing waveforms are available for pre-checking.

[0162] 3.1 Sequence Discretization: Read the sequence file and discretize it into time-slice sequences. Where n is the time slice index ( =1,2,…,Ntime, where Ntime is the total number of time slices). For the first Duration of each time slice (unit: μs);

[0163] 3.2 k-space trajectory calculation: The k-space coordinates (sampling point coordinates) of each time slice are calculated according to the gradient discrete integral formula. The formula is as follows:

[0164]

[0165] in, For the first A time slice Spatial coordinates The gyromagnetic ratio (for protons, =42.58 MHz / T), =[ ] is the first Gradient magnitude of each time slice (unit: mT / m). For the first The duration of a time slice;

[0166] 3.3 Sampling point marking: When When the time slice is recorded, it indicates that the time slice is a sampling time slice, and the k-space coordinates at this time are recorded. This generates a list of sampling points and simultaneously produces an output buffer layout (such as a buffer array organized by coil index and sampling point index).

[0167] 3.4 Optional: Sequence waveform pre-check. Users can click the "PlotSEQ" button to plot the timing relationship between RF pulses, gradient waveforms, and sampling points, and check whether the sequence configuration meets expectations to avoid sampling mismatch.

[0168] S4: Non-ideal conditions

[0169] This step simulates non-ideal factors in real imaging to ensure the physical realism of the simulation, while generating paired tags: generate or read. , Establish the coupling rules between the spatial field and motion parameters (translation / rotation varying with time slices): , ,in Updated by motion; simultaneously outputs "with / without non-ideal conditions" or intensity rating labels for forming paired or stratified samples.

[0170] 4.1 Loading / generating data under non-ideal conditions: generating or reading Field (spatial distribution of transmitted radio frequency field) Spatial distribution data of the field (non-uniform main magnetic field / frequency deviation field) and motion field are shown in Figure 6 on the right:

[0171] 4.2 Coupling of Non-ideal Conditions and Time Slices: Establish a synchronous correlation between non-ideal factors and sequence time slices to ensure that non-ideal effects change dynamically over time. The specific coupling rules are as follows:

[0172] RF effective scaling ( Field coupling):

[0173]

[0174] in For the first The first time slice, the first Effective RF control of individual factors reflects Modulation of radio frequency pulse intensity by the field;

[0175] Precession frequency term ( (with gradient term):

[0176]

[0177] in For the first The voxel coordinates updated per time slice The precession angular frequency of voxels reflects The combined effect of the field and the gradient field;

[0178] Motion update (motion field coupling): For example, a motion model of "translation + rotation" can be used to update voxel coordinates:

[0179]

[0180] in For the first Translation amount per time slice (unit: mm). Let be a rotation matrix. The rotation angle;

[0181] 4.3 Error Term Overlay and Label Generation: Overlay error terms such as Gaussian noise, bias field, and phase differences (corresponding to the "Add" box in Figure 4), and generate labels for the samples: if non-ideal conditions are enabled, they are marked as "1", and if not enabled, they are marked as "0", or they are marked according to the intensity of non-ideal factors (e.g., level 0-3, with increasing intensity) to form paired samples or stratified samples.

[0182] S5 GPU emulation:

[0183] This step is the core simulation stage, achieving efficient solution of the Bloch equation based on GPU parallel computing and outputting multi-coil k-space data: Virtual objects of S2–S4, sequential time slices, and non-ideal fields are input into the GPU simulation engine, and the Bloch evolution (RF rotation, gradient / frequency offset precession, T1 / T2 relaxation) is iteratively solved in the CUDA kernel at a voxel-level parallel granularity; when When sampling time slices, the transverse magnetization is reduced and summed to obtain a complex signal, which is then written into a k-space sequence. For multi-spin sequences, different... Approximate T2 by batch accumulation. Broaden the output; inject noise / bias at the output and record the corresponding parameters when necessary.

[0184] 5.1 Voxel-Thread Mapping (Figure 8 "Parallel Mapping"):

[0185] Establish a one-to-one correspondence between voxel meshes and GPU threads: based on voxel mesh size Configure the CUDA Grid and Block structure (e.g., set the Block size to 16×16×1, and the Grid size to be adaptively calculated based on the total number of voxels).

[0186] Thread index calculation: Calculate the voxel number corresponding to the thread using the thread block index (blockIdx) and the thread index within the thread block (threadIdx). ;

[0187] Thread state preservation: Each thread independently maintains the state variables of its corresponding voxel, including at least the magnetization vector. voxel coordinates Phase T1, T2, (T2 is optional) ), This ensures the independence of parallel computing.

[0188] 5.2 Solving the Bloch evolution by time-slice iteration (Figure 8 "Bloch time-slice iteration (Kernel)", Figure 4 equation):

[0189] For each time slice n, read RF / G / Δt and combine it with the data from step 4. and Update the effective field, proceeding according to the Bloch equations:

[0190]

[0191] in: The effective magnetic field is determined jointly by the RF pulse, the gradient field, and the non-ideal field; “ represents the cross product term, corresponding to the precession process of the magnetization vector (labeled as Precession in Figure 4); The relaxation term describes the relaxation decay of the magnetization vector;

[0192] The relaxation process is updated using a discrete exponential form, as shown in the following formula example:

[0193]

[0194]

[0195] in, This is the transverse magnetization component. The longitudinal magnetization component. The duration of the time slice.

[0196] 5.3 Sampling Gating and Parallel Summarization of Multiple Coils (Figure 8 "Voxel Contribution → Intra-Block Reduction → Global Accumulation → K(c,k)"):

[0197] Sampling trigger: if and only if During the (sampling time slice), signal sampling and summarization are performed; assuming the number of coils is... The coil sensitivity is Then the voxel pair at the c-th coil at the sampling point The contributions are as follows:

[0198]

[0199] in, , For the first The transverse magnetization component of each time slice For k-space phase factor;

[0200] Summing over all voxels yields the multi-coil k-space:

[0201]

[0202] in, For coil index, For sampling point index;

[0203] In the parallel implementation, first perform intra-block reduction (shared memory), then perform global accumulation (atomic addition or hierarchical / two-stage reduction), and write to the k-space buffer. The final output is k-space (Figure 8 "Output k-space")

[0204] S6 Reconstruction and Visualization:

[0205] This step transforms the k-space data obtained from the simulation into image domain data and provides a visual verification method: performing an inverse Fourier transform (IFFT) on the k-space data to obtain a synthetic image, and performing normalization and consistency correction when necessary; saving result files such as ".out" (containing signal, configuration and label summaries), and providing waveform / image visualization for verification.

[0206] 6.1 Basic Output: Outputs multi-coil k-space data Optional output: Raw MR signal (original complex signal sequence);

[0207] 6.2 Image Reconstruction: Perform Inverse Fast Fourier Transform (IFFT) on the k-space data. If the sampling trajectory is not Cartesian (such as radial trajectory or spiral trajectory), perform Non-Uniform Fast Fourier Transform (NUFFT) to obtain image domain data (Synthetic MRI data). Normalization and consistency correction (such as coil sensitivity correction) are performed as necessary.

[0208] 6.3 Result Saving and Visualization: On the main interface (Figure 1), output records can be displayed via PlotOUT, and sequence waveforms can be displayed via PlotSEQ to complete consistency verification and debugging. Specifically: an output record file in ".out" format is generated, containing signal data, configuration information summary, and label information; users can click the "PlotOUT" button to view the output signal waveform or reconstruct the image, and compare it with the sequence waveform drawn by "PlotSEQ" to verify the consistency of "configuration-sequence-output", which is convenient for debugging and problem localization.

[0209] S7 Export Archive:

[0210] This step archives the simulation results in a structured format to ensure data traceability and experimental reproducibility: Dataset entries are exported in a structured format, including k-space, synthetic images, virtual object parameter maps, sequence configurations, etc. The system outputs a reproducible runtime summary, supporting replay of the generation process with the same configuration, including information on the sports field and its tags, random seeds, software version, and hardware.

[0211] 7.1 Structured Derivation of Sample Entries: Each training sample entry contains the following core content:

[0212] k-space: (Multi-coil);

[0213] Image domain data (optional): Image reconstructed by IFFT / NUFFT;

[0214] Virtual object parameter diagram: T1 / T2 / M0 (and optional T2) / Phase / Susceptibility parameter diagram);

[0215] Non-ideal condition data: field, Spatial distribution data of the field and sports field, and error parameters such as noise / bias / phase difference;

[0216] Tags: Non-ideal item activation status tag and intensity rating tag;

[0217] 7.2 Trace Metadata Archiving: Archive all metadata related to this simulation, including: configuration snapshots (including sequence configuration), random seed, runtime logs, software and hardware version information, etc.

[0218] 7.3 Data Import: The exported results are written into the data collection library to achieve reproducible and traceable data generation.

[0219] Example 3: Modal Transformation Module Example

[0220] Figure 5 illustrates the framework for virtual object synthesis: the input includes seed modality parameter maps from N source datasets and a seed modality parameter map from the target dataset; CNNs are used for mapping and iterative updates to generate parameters T1, T2, and M0; the synthesized result is constrained with the Real maps (T1, T2, M0) through a loss constraint; the final output is synthetic multi-parametric maps (T1, T2, M0), forming virtual objects for subsequent simulations. The modality transformation module expands the coverage of the virtual object library, generating cross-organ, multi-contrast virtual object parameter maps. Its input, output, and training constraints are clearly defined, and the specific implementation logic is as follows:

[0221] (a) Module Input

[0222] The modality transformation module takes two types of seed modal parameter maps as input to ensure that the generated virtual objects possess realistic anatomical and physical characteristics.

[0223] Seed modality parameter maps from N source datasets: such as T1 mapping, T2 mapping, and M0 mapping for the brain, provide basic anatomical structure and physical parameter distribution characteristics;

[0224] Seed modal parameter maps from the target dataset, such as T1 mapping and T2 mapping for the abdomen, provide anatomical references for the target organs.

[0225] (II) Network Mapping and Training Constraints

[0226] The module uses convolutional neural networks (CNNs) to implement modality mapping, and ensures the physical plausibility of the generated results through iterative updates and supervised constraints.

[0227] Feature extraction and mapping: CNNs perform multi-scale feature extraction on the input seed modality parameter map, and learn the anatomical structure mapping relationship and physical parameter distribution law between the source organ and the target organ;

[0228] Iterative update: The network parameters are iteratively updated using the backpropagation algorithm to optimize the accuracy of feature mapping;

[0229] Supervision and constraints: Real maps (such as clinically acquired abdominal T1 / T2 / M0 parameter maps) are used as supervision to calculate the loss between the generated maps and the real maps. Commonly used loss functions include mean squared error (MSE) and structural similarity loss (SSIM) to ensure that the physical parameter range and anatomical details of the generated parameter maps are consistent with the real data.

[0230] (III) Module Output

[0231] The module ultimately outputs Synthetic multi-parametric maps, which include core parameter maps such as T1, T2, and M0. These synthetic maps can be directly used as input for step 2 (virtual object loading) and combined with subsequent GPU-accelerated Bloch simulations to achieve rapid expansion of cross-organ, multi-contrast training samples.

[0232] Example 4: Simulation Verification Example

[0233] To verify that the present invention can indeed achieve the stated technical effects, this embodiment uses the SE sequence and performs targeted verification on an NVIDIA RTX3060 GPU. All verification results are presented quantitatively to ensure credibility.

[0234] (I) Simulation efficiency verification

[0235] Hardware: NVIDIA RTX3060 GPU (8GB VRAM), Intel Core i7-12700H CPU, 32GB RAM;

[0236] Simulation configuration: The virtual object is a 128×128×64 voxel mesh of the brain, using a 512×512 spin model, with the sequence being an SE sequence (TE=20ms, TR=500ms, flip angle 90°), enabled. field, Field and sports field, number of coils Nc=8;

[0237] Statistical metric: Total time taken from “input pooling → GPU Bloch Kernel → output k-space + IFFT reconstruction”.

[0238] Experimental results show that the present invention can achieve single-image simulation in seconds, with a total generation time of about 2–3 seconds for a single image. Compared with existing technologies (SPROM, MRiLab), the time consumption is reduced by more than 60% under the same simulation settings, which fully meets the needs of rapid generation of large batches of training samples.

[0239] (ii) Reproducibility verification (configuration snapshot + random seed)

[0240] Fixed configuration: Uses the same virtual objects, sequence parameters, and non-ideal condition configurations as the efficiency verification.

[0241] Fixed random seed: seed=123456;

[0242] Verification method: Run the simulation three times, compare the output k-space data (complex values) point by point, and calculate the maximum absolute error.

[0243] The results show that, under the same configuration and seed conditions, the three outputs are consistent within the numerical precision range (e.g., the maximum absolute error does not exceed the floating-point numerical precision threshold). This invention can achieve accurate reproduction of experimental results by "structured export of configuration snapshots and random seeds".

[0244] (III) Parallel Structure and Multi-Coil Summary Verification (Figure 8)

[0245] Enable multi-coil sensitivity according to the procedure shown in Figure 8. With k-space buffer Verify sampling gating Reduce and write are triggered only during the sampling time slice; and it is verified that intra-block reduction (shared) and global accumulation (atomic / hierarchical) can correctly generate multi-coil k-space output. The results show that the parallel logic of "voxel-thread mapping, time slice iteration and multi-coil signal summarization" described in this invention can be implemented and run.

[0246] Confirmed through log records, only The time slice triggers shared memory reduction and global accumulation, and there is no signal write operation during non-sampling time slices; after reconstructing the k-space data of multiple coils, the image signal distribution of each coil conforms to the sensitivity modulation law, and there is no signal superposition error; the reconstructed images of different coils have reasonable differences in edge regions and signal intensity, which are consistent with the coil sensitivity distribution, indicating that the parallel logic can be implemented and runs stably.

[0247] Example 5

[0248] The platform of this invention completes an integrated closed loop of "environment configuration → object loading → sequence verification (PlotSEQ) → non-ideal condition coupling → GPU simulation → reconstruction and output verification (PlotOUT) → export and archive".

[0249] Applicable to any scenario corresponding to Figures 1 to 7; does not depend on specific hardware models or fixed values.

[0250] The following interfaces and files are involved: Figure 1 shows the main interface controls (CMake / Make, CMakePath, CUDAPath, LDLibraryPath, Save Path, Run, PlotOUT, PlotSEQ, log box, Seq Configuration, Load / Update / Save File, etc.); ".SEQ" sequence files; project JSON configuration; ".out" output records; virtual object parameter diagrams (T1, T2, T2...). M0, phase, magnetic susceptibility); non-ideal condition field ( , ,playground).

[0251] I. Purpose and Principles of Implementation

[0252] A closed loop from environment and file configuration to simulation and visualization acceptance is achieved within a single interface, ensuring consistency, traceability, and replayability of the four stages: (1) sequence setting, (2) injection of non-ideal conditions, (3) physical solution, and (4) data export. This embodiment only describes the process and interface and does not introduce unprovided performance values ​​or external information.

[0253] II. Input Implementation

[0254] 1. Environment and dependency paths: CMakePath, CUDAPath, LDLibraryPath.

[0255] 2. Configuration / Sequence Files: Project JSON and " .SEQ".

[0256] 3. Virtual objects: T1, T2, T2 The graph includes parameters such as M0, phase, and magnetic susceptibility, along with metadata such as resolution, field of view (FOV), and slice orientation.

[0257] 4. Non-ideal conditions: field, Field, sports field.

[0258] 5. Platform controls: Run, PlotSEQ, PlotOUT, log box, Load File, Update File, Save File, etc.

[0259] III. Implementation Steps (as shown in Figure 10)

[0260] S1 Environment and Path

[0261] (1) In the “Environment Path” area, enter CMakePath, CUDAPath, and LDLibraryPath in sequence, and click SavePath to make it effective. The interface log box will output the path validity and prompt information in real time.

[0262] (2) Click Load File to load the project JSON; view the key entries in the Seq Configuration table (such as sequence type, readout method, TE / ESP, flip angle, sampling strategy, data export strategy, etc.). If adjustments are needed, edit the table directly and then Update File / Save File.

[0263] (3) After this step is completed, a configuration snapshot (including environment path, configuration file version and key field summary) is generated for archiving during subsequent export to ensure reproducibility.

[0264] Prerequisites: The path exists and is accessible; the configuration file can be parsed.

[0265] Post-project artifacts: effective environment paths; available project configurations and their snapshots; log entries.

[0266] S2 Virtual Object Loading

[0267] (1) Select the target organ region (brain / abdomen, etc.) and the required set of parameter maps (T1, T2, T3). Check metadata such as M0, phase, and magnetic susceptibility, as well as resolution, FOV, coordinate system / slice orientation, etc.

[0268] (2) Establish the mapping relationship between the parameter map and the sequence sampling coordinates; if necessary, process the boundary and mask so that the virtual object and the subsequent sequence sampling are in the same reference system.

[0269] (3) The platform organizes the above parameter graphs into a set of voxel-level attributes for the simulation engine to read directly.

[0270] Prerequisites: Complete parameter graph and available metadata.

[0271] Post-output: voxel attribute set and spatial mapping record; log generation of "object loading complete" message.

[0272] S3 Sequence Configuration and PlotSEQ Verification

[0273] (1) Check the key fields related to the sequence in Seq Configuration item by item (e.g., TE, ESP, ETL, readout mode, bandwidth, flip angle related fields, configuration items related to RF / gradient / sampling).

[0274] (2) Click PlotSEQ, the platform parses " The .SEQ tool plots the timing waveforms of the RF pulse, Gx / Gy / Gz gradients, and sampling points; it can also display commonly used annotations such as echo positions and sampling windows.

[0275] (3) Compare the waveform with the parameter table item by item to confirm that the "Settings - Presentation" are consistent. If any field is missing or the format is abnormal, PlotSEQ will display a prompt on the interface and record the field name and location information in the log box for repair.

[0276] (4) After verifying that everything is correct, close the PlotSEQ panel and return to the main interface.

[0277] Prerequisites: .SEQ files can be parsed.

[0278] Post-output: Sequence timing waveform; consistency check results and log entries.

[0279] S4 Non-ideal coupling

[0280] (1) Loading or generating , The coordinates of the sports field and the virtual object are mapped (spatial resolution and orientation are consistent).

[0281] (2) Select time-slice coupling mode: The platform injects the three types of field components into the magnetization evolution according to the sequence time slices (RF / gradient / readout); the motion field can be updated at fixed intervals or interpolated by key frames (which is a choice of implementation method).

[0282] (3) If you need to generate paired samples with / without non-ideal conditions, check "paired output". The platform will automatically generate and write the corresponding labels during the export stage.

[0283] Prerequisites: The three types of field components can be read and are consistent with the object coordinates.

[0284] Post-output: Field-time slice coupling relationship; Paired output strategy; Log message "Non-ideal conditions enabled / disabled".

[0285] S5 GPU accelerates Bloch simulation

[0286] (1) Click Run to start the simulation; the CUDA kernel advances in voxel parallel mode according to time slices, combining the precession of γB(t)×M(t) and the relaxation effect of R(M(t)) to output the original MR signal.

[0287] (2) If it is necessary to simulate the impact of the link, noise or bias can be injected before channel superposition (whether to inject and the intensity are determined by the configuration).

[0288] (3) Key information and anomalies in the simulation process are displayed in stages in the log box; if the process is interrupted, the interface will prompt the time slice index for location and review.

[0289] (4) After the simulation is completed, the platform generates " The ".out" output record is used for subsequent plotting and exporting.

[0290] Preconditions: The objects, sequences, and non-ideal conditions of S2, S3, and S4 are ready.

[0291] Post-processing output: Original signal sequence and " The ".out" output log; the log contains a summary of each stage.

[0292] S6 Image Reconstruction and PlotOUT Verification

[0293] (1) Perform inverse Fourier transform (IFFT) on the original MR signal to obtain the synthesized image.

[0294] (2) Click PlotOUT to read " The ".out" output record is used to plot the output time series / trajectory. Compare it with the timing waveform of PlotSEQ to check the consistency of "configuration-sequence-output" and locate potential sampling mismatches or abnormal timing.

[0295] (3) If S4 selects "paired output", the results of the two sets of results with and without non-ideal conditions can be compared and observed from the graph. , The effects of motion on time series and image appearance (only describing the phenomena, without introducing numerical values).

[0296] Prerequisites: S5 generates the original signal and " .out".

[0297] Post-processing outputs: composite image; PlotOUT verification chart; consistency check conclusion (visible in the interface and logs).

[0298] S7: Export and Archive

[0299] After the simulation and reconstruction are completed, the output of this run should be archived in a unified manner, including at least:

[0300] (1) Results data: original MR signal (k-space) and its corresponding reconstructed image;

[0301] (2) Tag and field parameters: Whether to inject paired tags under non-ideal conditions, and the type of tags used. , Record key parameters of the sports field (save them together when paired output is selected);

[0302] (3) Configuration snapshot: Summary of environment paths, configuration file versions and key fields (including random seeds, etc.) related to this run, used for result reproduction and auditing;

[0303] (4) Operation log: A summary of operation / error information by stage, which facilitates problem location and scenario replay.

[0304] The specific format and directory level of the archive are not limited, as long as the same result can be reproduced and audit / replay can be completed; after archiving is completed, a unique identifier for this run will be generated and a prompt will be returned.

[0305] IV. Implementation Output and Correspondence with Diagram

[0306] 1. Dual-domain results (signals / images): Corresponds to "Original MR signal → IFFT → Synthetic image" in the flowchart of Figure 4.

[0307] 2. Visualize the chain of evidence: Compare PlotSEQ (Figure 5) and PlotOUT (Figure 4) before and after to verify the consistency of "configuration-sequence-output".

[0308] 3. Paired samples: Two sets of data based on S4, "with / without non-ideal conditions" and their labels (Figure 6, right column shows the non-ideal condition elements).

[0309] 4. Metadata and Logs: Includes environment path, configuration version, random seed, and periodic summary, supporting reproduction and auditing.

[0310] 5. Relationship with Figure 7: If it is necessary to discuss the time consumption relationship or different GPU adaptation, the diagram in Figure 7 can be used for explanation; specific values ​​are not listed in this embodiment.

[0311] V. Implementation Precautions and Equivalent Explanation

[0312] Non-ideal conditions ( , (Motion) is used as a parameterized field component, coupled with the sequence time slice through a unified interface; if other parameterizable factors need to be extended, the same interface can be used.

[0313] Exporting archives must include four elements: "results + tags + snapshots + logs"; the directory hierarchy and file format can be adjusted according to project needs without changing the technical essence.

[0314] Figure 8 is a schematic diagram of the parallel architecture for GPU parallel Bloch simulation of this invention. It presents the overall process from inputs such as sequences / voxels / non-ideal conditions / coil sensitivity, to CUDA parallel mapping, time-slice iterative solution, and parallel aggregation of multi-coil signals and writing them into the k-space, specifically including:

[0315] Input section: includes "Sequence waveform RF / G / Δt readout", "Voxel parameters (T1 / T2 / M0, ρ, r)", and "Non-ideal ( / "Motion / Noise" and "Coil Sensitivity" After entering the text, you will enter the "Input Convergence" module.

[0316] Parallel mapping (voxel → thread): A voxel grid is established on the GPU side. Complete the CUDA configuration (Grid / Block) and calculate the voxel number using the thread index:

[0317]

[0318] This achieves "parallel mapping (voxel-thread)"; and stores the state of each voxel corresponding to each thread in the "thread state" (labeled in the figure). ).

[0319] The time-slice iteration part (Bloch time-slice iteration, Kernel): Executes in a time-slice loop within the kernel function, sequentially "reading in control variables RF / G / Δt" and combining them with... / Factors such as " / motion" are used to perform "update magnetization (precession + relaxation)" and the next time slice iteration is entered through the dashed arrow of "next time slice".

[0320] Sampling and k-space writing: The "voxel contribution" of each voxel is summarized in parallel, sequentially passing through "intra-block reduction (shared)" and "global accumulation (atomic / hierarchical)," and then written to the "k-space buffer." "(in For coil indexing, (For the sampling point index), the final "output k-space" is "k-space".

[0321] The meanings of the main symbols, variables, and abbreviations involved in this invention are as follows:

[0322] (1) : Voxel space coordinates; or Considering the time required for the sports field or the The voxel coordinates corresponding to each time slice.

[0323] (2) Voxel position place, time The magnetization vector; Discrete to the first The magnetization vector of each time slice; This is the transverse magnetization component. This represents the longitudinal magnetization component.

[0324] (3) , , These represent the longitudinal relaxation time, the lateral relaxation time, and the effective lateral relaxation time (corresponding to T1 mapping, T2 mapping, and T2 in Figure 6). mapping).

[0325] (4) Balanced magnetization / amplitude parameters (corresponding to M0 mapping in Figure 6, unit: au); : Proton density or amplitude scaling term (if used) It means that, then with (This can be a proportional relationship).

[0326] (5) Phase mapping (Figure 6); : Susceptibility map (Figure 6).

[0327] (6) Spatial distribution of the transmitted radio frequency field (in Figure 6) field); : Non-uniform main magnetic field / frequency deviation field (in Figure 6) field); Motion field: motion field (the Motion field in Figure 6 is illustrated using vector / velocity amplitude).

[0328] (7) : No. Radio frequency control quantities for each time slice (which may include amplitude, phase and frequency information); : No. Gradient control parameters for each time slice; : No. The duration of each time slice.

[0329] (8) : Sampling gate control sign; when The time indicates that sampling occurred and was written to the k-space during that time slice.

[0330] (9) : No. k-space coordinates of each sampling point (obtainable by gradient integration); k-space: k-space; IFFT: Inverse Fast Fourier Transform, used to obtain image domain data from k-space (IFFT in Figure 4).

[0331] (10) : No. Sensitivity distribution of each receiving coil (Figure 8, input "coil sensitivity") (”); For coil index, The number of coils.

[0332] (11) : Multi-coil k-space buffer, representing the first Each coil at the sampling point Complex k-space data (k-space buffer in Figure 8) Raw MR signal: The original complex MR signal sequence (Raw MRsignal in Figure 4).

[0333] (12) : Gyromagnetic ratio; Effective magnetic field; Relaxed term; Cross product term, corresponding to precession (in Figure 4) and relaxation process.

[0334] (13) CUDA: GPU parallel computing platform; Kernel: kernel function; Grid / Block: CUDA grid and thread block organization; shared: shared memory; atomic / atomicAdd: atomic addition operation, used for parallel accumulation (Figure 8 "intra-block reduction shared" "global accumulation atomic / hierarchy").

[0335] (14) C++ scheduling: refers to the scheduling process of input organization, GPU memory management and Kernel calls completed by C++ program; Eigen: linear algebra library, used for numerical computation acceleration on the CPU side / preprocessing side (C+++ Eigenacceleration in Figure 4).

[0336] (15) CNN: Convolutional Neural Network; Loss: Training loss function; Update: Network parameter update (CNNs / Loss / Update in Figure 5).

[0337] Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. Furthermore, those skilled in the art will recognize that, based on the ideas of this invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A method for generating magnetic resonance training data based on GPU-accelerated Bloch simulation combined with modal transformation, characterized in that, Includes the following steps: 1) Construct a multi-parameter virtual object library: The virtual object library contains voxel-level parameter maps of at least two types of organs, and the parameter maps at least cover longitudinal relaxation time T1, lateral relaxation time T2, and effective lateral relaxation time T2. The virtual object library is generated by parameter mapping from medical image segmentation maps, clinical parameter maps, or analytical phantoms, and supports organ template instantiation and parameterized sampling. 2) Parameter Configuration: Input the magnetic resonance sequence parameters, acquisition trajectory parameters, and non-ideal factor parameters, generate a configuration snapshot, and record the random seed; 3) GPU-Accelerated Bloch Simulation: Build a voxel parallel solver based on the CUDA architecture, input the virtual object parameters from step 1) and the sequence parameters and non-ideal factor parameters from step 2) into the solver, couple the non-ideal factors according to time slices, and solve the Bloch equation in parallel, outputting the original MR signal and the corresponding k-space data; 4) Image Reconstruction: Perform inverse Fourier transform or non-uniform fast Fourier transform on the k-space data output from step 3) to obtain image domain data, and generate paired labels "with / without non-ideal factors"; 5) Modal Transformation: Use rule-driven or data-driven modal transformation strategies to transform the image domain data obtained in step 4), generating cross-organ, multi-contrast target samples. The modal transformation process introduces physical consistency constraints; 6) Dataset Output: Package and output the k-space data, image domain data, paired labels, and metadata to ensure the traceability of the generation process and the reproducibility of the experimental results.

2. The method for generating magnetic resonance training data based on GPU-accelerated Bloch simulation combined with modal transformation as described in claim 1, characterized in that, In step 1), the virtual object library is generated by parameter mapping from medical image segmentation maps, clinical parameter atlases, or analytical phantoms, supporting organ template instantiation and parameterized sampling.

3. The method for generating magnetic resonance training data based on GPU-accelerated Bloch simulation combined with modal transformation as described in claim 1, characterized in that, In step 2), the magnetic resonance sequence parameters include echo time TE, repetition time TR, and flip angle; the acquisition trajectory parameters include parameters of Cartesian trajectory, radial trajectory, or spiral trajectory; the non-ideal factors include at least one of B0 non-uniformity, B1 non-uniformity, gradient nonlinearity, eddy current, phase drift, thermal noise, and subject motion; the radio frequency pulse, gradient waveform, and echo time sequence are parameterized and recorded in metadata to achieve reproducibility.

4. The method for generating magnetic resonance training data based on GPU-accelerated Bloch simulation combined with modal transformation as described in claim 1, characterized in that, In step 3), the GPU-accelerated Bloch simulation employs a timing block and multi-coil parallel strategy, and supports multi-threaded accumulation and vectorized operations. The parallel simulation supports acquiring multiple echo data in a single acquisition and performing joint fitting to simultaneously estimate T2 and T2. Or parameters such as PD.

5. The method for generating magnetic resonance training data based on GPU-accelerated Bloch simulation combined with modal transformation as described in claim 1, characterized in that, In step 3), the voxel-parallel solver adopts a "time-sequence block + multi-threaded accumulation" strategy, dividing the time evolution process of the Bloch equation into sequential time slices. The relaxation and precession calculations of each voxel are allocated to independent GPU threads to achieve voxel-level parallel computation. Non-ideal factors are coupled with radio frequency pulses and gradient pulses according to time slices. Specifically, within each time slice, synchronous updates are performed. Field strength, B0 field offset, and motion field displacement are used to correct the magnetization vector evolution equation of the voxel.

6. The method for generating magnetic resonance training data based on GPU-accelerated Bloch simulation combined with modal transformation as described in claim 1, characterized in that, In step 5), the modality transformation strategy includes at least one of rule-driven or data-driven approaches; the rule-driven modality transformation strategy is based on the physical principle of magnetic resonance, generating images with different contrasts by adjusting the weights of T1 and T2 and the noise distribution; the data-driven modality transformation strategy adopts one of generative adversarial networks, conditional diffusion models, or recurrent consistency networks, and introduces a loss function during training.

7. The method for generating magnetic resonance training data based on GPU-accelerated Bloch simulation combined with modal transformation as described in claim 1, characterized in that, In step 6), the metadata includes configuration snapshot, configuration snapshot verification value, data version number, random seed, non-ideal factor parameters, sequence parameters and running log summary, which are used to ensure cross-platform experiment reproduction and data traceability.

8. A magnetic resonance training data generation system based on GPU-accelerated Bloch simulation combined with modal transformation, characterized in that, The system includes a parameter configuration module, a virtual object library module, a parallel simulation module, a dual-domain reconstruction module, a modality transformation module, and a dataset management module. The functions and interface relationships of each module are as follows: Parameter Configuration Module: Inputs include user-defined sequence parameters, acquisition trajectory parameters, and non-ideal factor parameters; outputs a standardized configuration file and configuration snapshot, while simultaneously performing parameter consistency verification and outputting the verification results; its core function is to achieve unified parameter configuration, verification, and snapshot retention, providing a foundation for experimental reproduction. Virtual Object Library Module: Inputs include organ segmentation maps, clinical parameter atlases, or parsed phantom data; outputs a standardized multi-organ voxel-level parameter map set, supporting organ template instantiation, parameter perturbation, and cross-organ migration; its core function is... It can provide virtual imaging objects covering multiple organs and parameters, supporting the generation of diverse samples; Parallel simulation module: input is the parameter map output by the virtual object library module and the configuration file output by the parameter configuration module; it implements voxel parallel Bloch equation solving based on CUDA architecture, performs multi-threaded parallel solving of the Bloch equation on the graphics processor and injects non-ideal factors; output is the original k-space signal and the coupled record of non-ideal factors; the core function is to realize efficient and physically consistent magnetic resonance signal simulation; Dual domain reconstruction module: input is the k-space signal output by the GPU parallel simulation module; performs IFFT or NUFFT reconstruction, outputs image domain data and "with / without non-ideal factors" paired labels; The core function is to simultaneously acquire k-space and image domain data to adapt to different downstream task requirements; Modality Transformation Module: Input is the original dual-domain samples output by the dual-domain reconstruction module; supports switching between rule-driven and data-driven modes, and adapts to both batch offline inference and online enhancement modes; outputs target samples across organs and with multiple contrasts using either rule-driven or data-driven methods, with the output results satisfying physical consistency constraints; its core function is to expand the organ coverage and contrast diversity of the samples; Dataset Management Module: Input is the dual-domain samples and paired labels output by the dual-domain reconstruction module, the target samples output by the modality transformation module, and the metadata output by the parameter configuration module; Record non-ideal factor parameters, noise levels, operation logs and version information, and output a structured dataset; the core function is to realize data archiving, traceability and replay, and ensure the standardization and reusability of the dataset.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1-7.

10. An electronic device comprising a processor and a memory, characterized in that, The memory stores a computer program, and when the processor executes the program, it implements the method of any one of claims 1-7.