A method for automatic shimming of a magnetic resonance multi-channel coil

By employing an automatic shimming method with multi-channel coils in magnetic resonance imaging (MRI), and utilizing the Transformer automatic shimming control model to process free-induction attenuation signals and generate compensation current, the problem of traditional shimming techniques being unable to quickly compensate for main magnetic field distortion is solved, thereby improving the imaging accuracy and diagnostic precision of the MRI system.

CN122194026APending Publication Date: 2026-06-12INST OF ELECTRICAL ENG CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INST OF ELECTRICAL ENG CHINESE ACAD OF SCI
Filing Date
2026-03-13
Publication Date
2026-06-12

Smart Images

  • Figure CN122194026A_ABST
    Figure CN122194026A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of magnetic resonance imaging, in particular to a magnetic resonance multi-channel coil automatic shimming method, which aims to solve the problem of how to quickly, stably and flexibly realize main magnetic field distortion compensation. The method comprises the following steps: constructing a multi-channel coil according to a target field of a non-uniform main magnetic field, wherein the multi-channel coil comprises a plurality of coil units; acquiring a free induction decay signal of the non-uniform main magnetic field; inputting the free induction decay signal into a pre-trained Transformer automatic shimming regulation model after the free induction decay signal is converted into a frequency domain, so as to obtain a multi-channel coil compensation current; and the Transformer automatic shimming regulation model comprises a signal serialization unit, a global feature extraction encoder and a parallel regression prediction network which are sequentially cascaded. The magnetic resonance multi-channel coil automatic shimming method provided by the application forms a complete shimming solution and can meet the high-performance requirement of magnetic field fast compensation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of magnetic resonance imaging technology, and in particular to an automatic shimming method for a multi-channel magnetic resonance coil. Background Technology

[0002] Magnetic Resonance Imaging (MRI) systems have extremely stringent requirements for the homogeneity of the main magnetic field. Magnetic Resonance Spectroscopy (MRS) systems have even stricter requirements, demanding a homogeneity on the order of ppm. Non-uniform main magnetic fields can cause artifacts, distortions, blurring, and other problems in MRI images, severely reducing the signal-to-noise ratio (SNR) and affecting the accuracy of MRI and spectral detection results, thus hindering subsequent clinical diagnosis and technical analysis. With the development of MRI technology, the strength of the main magnetic field has continuously increased, making the distortion caused by differences in magnetic susceptibility between different tissues within the subject increasingly prominent. This distortion is particularly noticeable at the tissue-air interface, such as in the frontal lobe, sinuses, oral cavity, and ear canal. Furthermore, individual differences among subjects and variations in the physiological structure of different scanned areas further exacerbate the degree of main magnetic field distortion and the difficulty of shimming, leading to a significant decrease in the diagnostic accuracy and reliability of MRI and spectral detection, thus limiting the application of MRI technology in precise clinical diagnosis.

[0003] In clinical applications, rapid and robust shimming techniques are crucial for the widespread adoption of magnetic resonance imaging (MRI) technologies. Functional MRI, spectroscopic imaging, and spectroscopic detection are all highly sensitive to the homogeneity of the main magnetic field, and efficient shimming techniques can effectively improve the detection accuracy of these technologies. Furthermore, shimming techniques provide core technical support for the practical application of more technically challenging MRI techniques such as interventional MRI and ultra-high field MRI, which is of great significance for expanding the clinical application scope of MRI technology and improving diagnostic capabilities.

[0004] Currently, traditional shimming techniques use the magnetic field map as an evaluation index of the homogeneity of the main magnetic field. The core shimming process involves acquiring the main magnetic field map through a specific imaging sequence, then adjusting a set of spherical harmonic (SH) coils based on this map to generate an orthogonal magnetic field, thereby compensating for the distorted magnetic field. However, this traditional compensation method has significant limitations. Its shimming flexibility and speed are severely restricted. When addressing the main magnetic field distortion caused by differences in magnetic susceptibility, it fails to meet the high-performance requirements of rapid and automatic compensation for the required compensation area in clinical applications, and cannot adapt to the requirements of high-field MRI systems and complex clinical scanning scenarios. Therefore, addressing the shortcomings of existing shimming techniques and researching a shimming method that can quickly, robustly, and flexibly achieve main magnetic field distortion compensation has become an urgent technical problem to be solved in the field of magnetic resonance imaging. Summary of the Invention

[0005] To address the aforementioned technical problems in the prior art, namely how to quickly, robustly, and flexibly achieve main magnetic field distortion compensation, this application provides an automatic shimming method for a multi-channel magnetic resonance coil.

[0006] In a first aspect of this application, an automatic shimming method for a magnetic resonance multichannel coil is provided, comprising:

[0007] Based on the target field of the non-uniform main magnetic field, a multi-channel coil is constructed, wherein the multi-channel coil includes multiple coil units;

[0008] The free induction attenuation signal of the non-uniform main magnetic field is obtained by the radio frequency receiving coil. The free induction attenuation signal is converted to the frequency domain to obtain the free induction attenuation spectrum signal. The free induction attenuation spectrum signal is input into the pre-trained Transformer automatic shimming control model to obtain the multi-channel coil compensation current. The multi-channel coil compensation current is applied to the multi-channel coil, and the multi-channel coil generates a magnetic field to compensate for the non-uniform main magnetic field.

[0009] The Transformer automatic shimming model comprises a cascaded signal serialization unit, a global feature extraction encoder, and a parallel regression prediction network.

[0010] The signal serialization unit includes a cascaded maximum-minimum normalization module, an equal-length non-overlapping sliding module, a linear projection module, and a position representation module. The maximum-minimum normalization module maps the multi-channel free-induction attenuation spectrum signal to the [0, 1] interval. The equal-length non-overlapping sliding module divides the output of the maximum-minimum normalization module into S continuous and non-overlapping signal segments, where S = the total number of sampling points of the free-induction attenuation spectrum signal / H, and H is the sliding window length equal to the sampling step size. The linear projection module converts the signal segments into D-dimensional high-dimensional feature vectors, where D is a preset feature dimension. The position representation module embeds a global class marker vector at the head of the high-dimensional feature vector to obtain a global marker vector, and then superimposes the global marker vector with an absolute position code based on a preset frequency sine and cosine function to obtain a position code vector.

[0011] The global feature extraction encoder includes multiple stacked encoding blocks for extracting global feature vectors based on the position encoding vectors. Each encoding block includes a multi-head self-attention layer, a first normalization layer, a feedforward neural network, and a second normalization layer, which are cascaded in sequence. The input of the multi-head self-attention layer is also used as the input of the first normalization layer, and the input of the feedforward neural network is also used as the input of the second normalization layer.

[0012] The parallel regression prediction network includes a first fully connected layer, a first ReLU activation function, a second fully connected layer, a second ReLU activation function, and a third fully connected layer, which are cascaded in sequence.

[0013] Optionally, the multi-head self-attention layer includes multiple stacked self-attention layers, each of which is specifically used for:

[0014] The location encoding vector is projected in parallel through three independent linear layers, mapping the location encoding vector into a query matrix Q, a key matrix K, and a value matrix V, respectively.

[0015] Calculate the self-attention feature vector ,in, is the dimension of the location encoding vector.

[0016] Optionally, the feedforward neural network includes cascaded 1×1 convolutional layers, a GELU activation function, and another 1×1 convolutional layer.

[0017] Optionally, the first fully connected layer is used to linearly map the global feature vector to a preset intermediate dimension, and the first ReLU activation function is used to perform nonlinear feature transformation on the output of the first fully connected layer; the second fully connected layer is used to perform dimensionality reduction and compression on the output of the first ReLU activation function through linear mapping, and the second ReLU activation function is used to perform nonlinear filtering on the output of the second fully connected layer; the third fully connected layer is a linear output layer, used to linearly map the output of the second ReLU activation function to a multi-channel coil compensation current vector, and the dimension of the multi-channel coil compensation current vector is equal to the number of coil units.

[0018] Optionally, the automatic shimming method for multi-channel magnetic resonance coils further includes training the Transformer automatic shimming control model, wherein training the Transformer automatic shimming control model includes:

[0019] Uniform sampling is performed in the current space of each coil unit of the multi-channel coil to obtain the sampling current of each coil unit, and the free induction decay signal of the corresponding non-uniform main magnetic field is collected simultaneously to construct a mapping dataset of the sampling current of the coil unit and the free induction decay signal.

[0020] Using the aforementioned mapping dataset as training data and minimizing the Huber loss function as the optimization objective, the Transformer automatic shimming model is trained.

[0021] Wherein, the Huber loss function , The deviation between any one of the multi-channel coil compensation current values ​​output by the Transformer automatic shimming control model and the corresponding standard true current value. This is a preset threshold parameter.

[0022] Optionally, in the aforementioned automatic shimming method for multi-channel magnetic resonance coils, the construction of the multi-channel coils based on the target field of the non-uniform main magnetic field includes:

[0023] The original main magnetic field field map signal is acquired, and the target field is calculated based on the original main magnetic field field map signal and the ideal main magnetic field field map signal. ;

[0024] The regular structure of the multi-channel coil is set according to historical experience, and the regular structure is to arrange the coil units of regular shape in a regular manner;

[0025] Calculate the unit magnetic field strength matrix corresponding to the multi-channel coil. And based on the objective optimization equation and Solving for the current vector of the coil element The objective optimization equation is: ,in, It is a second-order norm, and the unit magnetic field strength matrix is... Indicates the first When a unit current is applied to the first coil unit, the... The magnetic field strength generated at a target field point is: One, the coil unit is indivual, The current vector of the coil element is represented as , Represented as ;

[0026] Determine the current vector of the coil unit Whether the preset conditions are met, if so, then the current rule structure is used as the coil structure of the multi-channel coil;

[0027] If the conditions are not met, return to the steps of setting the regular structure of the multi-channel coil based on historical experience to obtain a new regular structure, until the coil unit current vector is obtained. The preset conditions are met.

[0028] Optionally, in the aforementioned automatic shimming method for multi-channel magnetic resonance coils, the step of constructing the multi-channel coil based on the target field of the non-uniform main magnetic field includes:

[0029] The original main magnetic field field map signal is acquired, and the target field is calculated based on the original main magnetic field field map signal and the ideal main magnetic field field map signal. ;

[0030] The coil structure of the multi-channel coil is set according to the obtained structural parameters, including the shape, size and position distribution of the coil units;

[0031] Calculate the unit magnetic field strength matrix corresponding to the multi-channel coil. And based on the objective optimization equation and Solving for the current vector of the coil element The objective optimization equation is: ,in, It is a second-order norm, and the unit magnetic field strength matrix is... Indicates the first When a unit current is applied to the first coil unit, the... The magnetic field strength generated at a target field point is: One, the coil unit is indivual, The current vector of the coil element is represented as , Represented as ;

[0032] Determine the current vector of the coil unit If the preset conditions are met, then the current coil structure is used as the coil structure of the multi-channel coil.

[0033] If the conditions are not met, an optimization algorithm is used to inversely optimize the structural parameters of the coil structure based on the target field, and the steps of setting the coil structure of the multi-channel coil according to the obtained structural parameters are returned until the coil unit current vector is obtained. Meets the preset conditions.

[0034] The initial values ​​of the structural parameters are determined based on the carrier size and the preset number of channels.

[0035] In a second aspect of this application, an electronic device is provided, the electronic device comprising:

[0036] At least one processor; and

[0037] A memory communicatively connected to at least one of the processors; wherein,

[0038] The memory stores instructions that can be executed by the processor to implement the above-described automatic shimming method for multi-channel magnetic resonance coils.

[0039] In a third aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being executed by the computer to implement the above-described automatic shimming method for a multi-channel magnetic resonance coil.

[0040] In a fourth aspect of this application, a computer program product containing instructions is provided, which, when executed by a computer device, causes the computer device to perform the above-described automatic shimming method for a multi-channel magnetic resonance coil.

[0041] The magnetic resonance multi-channel coil automatic shimming method provided in this application, by designing a highly flexible multi-channel coil, can provide a high-degree-of-freedom non-orthogonal compensation magnetic field for shimming work. This effectively overcomes the limitations of traditional spherical harmonic (SH) coil orthogonal magnetic field compensation, improving the flexibility and speed of shimming work. It can better adapt to complex main magnetic field distortion scenarios caused by differences in magnetic susceptibility in different test objects and scanning areas, improving compensation adaptability. Furthermore, it combines multi-channel coils with free induction attenuation... This solution leverages the application characteristics of Decay (FID) signals and incorporates artificial intelligence technology to specifically address the mapping relationship between multi-channel coil unit currents and FID signals. This effectively reduces the complexity of coil unit current calculation and control during FID signal correction and main magnetic field distortion compensation, thereby reducing debugging time and improving shimming efficiency. It better meets the high-performance requirements for rapid magnetic field compensation in clinical applications. Based on the synergistic effect of the aforementioned hardware design and software algorithms, a complete shimming solution is formed. By effectively improving FID signal characteristics (such as FID spectrum bandwidth and waveform distortion), it provides a stable and uniform main magnetic field environment for the magnetic resonance imaging system, enhancing the signal-to-noise ratio and accuracy of magnetic resonance imaging and spectral detection. This provides reliable support for advanced technologies highly sensitive to magnetic field homogeneity, such as functional MRI, interventional MRI, and ultra-high field MRI, contributing to improved accuracy and reliability in clinical diagnosis. Attached Figure Description

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

[0043] Figure 1(a) is a schematic diagram of the automatic shimming method for multi-channel magnetic resonance coils provided in the embodiment of this application. In the figure, 101 is the FID spectrum signal corresponding to the distorted main magnetic field, 102 is the Transformer automatic shimming control model, 103 is the multi-channel coil compensation current output by 102, 104 is the multi-channel coil system, 105 is the compensation magnetic field output by 104, and 106 is the FID spectrum signal corresponding to the main magnetic field after shimming.

[0044] Figure 1(b) is a flowchart illustrating the automatic shimming method for multi-channel magnetic resonance coils provided in the embodiments of this application;

[0045] Figure 2This is a schematic diagram of the shimming region in magnetic resonance imaging, taking human head imaging as an example. In the figure, 201 is the multi-channel coil carrier, 202 is the imaging region, and 203 is the location of the tissue-air interface.

[0046] Figure 3 This is a schematic diagram of a multi-channel coil system. In the diagram, 301 is a multi-channel coil based on the multi-channel coil carrier 201, 302 is a coil unit that makes up the multi-channel coil, 303 is a power amplifier that drives the coil unit, and 304 is an integrated drive device for the multi-channel coil.

[0047] Figure 4 The following is an example of a regular structure for the empirical design of multi-channel coils provided in the embodiments of this application. In the figure, 401 is a circular coil unit, 402 is a rectangular coil unit, 403 is a matrix distribution of coil units, 404 is a cross-shaped distribution of coil units, and 405 is a multi-layer distribution of coil units.

[0048] Figure 5 The figure shows a typical coil structure example for the reverse design of a multi-channel coil provided in the embodiments of this application. In the figure, 501 is a polygonal irregular geometric structure and 502 is a geometric structure based on the stream function design.

[0049] Figure 6 A schematic diagram of the framework of the global feature encoder provided in the embodiments of this application;

[0050] Figure 7 This is a schematic diagram of the structure of a multi-head self-attention layer provided in an embodiment of the present invention;

[0051] Figure 8 This is a schematic diagram of the structure of a parallel regression network provided in an embodiment of the present invention. Detailed Implementation

[0052] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0053] To facilitate understanding of this application, the principle of the automatic shimming method for multi-channel magnetic resonance coils provided in the embodiments of this application is first introduced. In a magnetic resonance imaging system, an ideal FID signal under an ideal main magnetic field exhibits an extremely sharp, symmetrical single peak in the frequency domain. However, an inhomogeneous main magnetic field causes spectral broadening (such as increased FWHM and distortion) in the FID frequency domain signal. This relationship forms the physical basis for evaluating magnetic field homogeneity and optimizing shimming based on the FID signal. Since acquiring the main magnetic field FID signal is faster than acquiring the field map signal, using the FID signal as a reference index for evaluating the homogeneity of the main magnetic field will significantly improve the shimming speed. The FID spectrum signal corresponding to a distorted main magnetic field is shown as 101 in Figure 1(a), while under a uniform main magnetic field environment, the FID spectrum signal is a narrow-bandwidth and symmetrical sharp pulse waveform. The FID spectrum signal corresponding to the main magnetic field after shimming is shown as 106 in Figure 1(a). Figure 2 The diagram illustrates the shimming region in magnetic resonance imaging, using human head imaging as an example. First, a multi-channel coil needs to be designed on the carrier 201 to ensure the global shimming quality in the imaging region 202. Second, when different subjects are scanned using MRI, the different positions of the tissue-air interface 203 can cause severe magnetic field changes in local areas (i.e., at 203). Therefore, local personalized shimming can be performed as needed to specifically address areas with severe magnetic field distortion. The local shimming function is achieved by flexibly adjusting the coil current on the established multi-channel coil system to compensate for local magnetic field distortion. Figure 3 The diagram illustrates the configuration of a multi-channel imaging system, which includes: a multi-channel coil 301 disposed on a carrier 201; multiple coil units 302, which together form the multi-channel coil 301; multiple power amplifiers 303 for driving the coil units, with each power amplifier 303 independently driving one coil unit 302; and a multi-channel coil integrated drive device 304 for integrating the multiple power amplifiers 303. The acquisition speed of FID spectrum signals is much higher than that of sequence imaging magnetic field signals. Therefore, by modulating the magnetic field to transform the distorted FID frequency signal into the ideal shape corresponding to the uniform field environment, the uniform field operation of the main magnetic field can be quickly achieved. The FID spectrum signal 101 generated by the main magnetic field to be uniformed is input into the Transformer automatic uniform field control model 102 in the magnetic resonance multi-channel coil automatic uniform field method provided in this application embodiment. The Transformer automatic uniform field control model 102 controls the signal 101 and outputs the multi-channel coil compensation current 103. The current 103 is used to drive the multi-channel coil system 104 to generate the required compensation magnetic field 105 for uniforming the main magnetic field. The FID spectrum signal 106 corresponding to the uniform field is acquired. At this time, the full width at half maximum (FWHM) and waveform of the signal 106 will become the more ideal FID spectrum signal corresponding to the improved uniformity.

[0054] The following is a detailed description with reference to the accompanying drawings. A first aspect of this application provides an automatic shimming method for a multi-channel magnetic resonance coil. Figure 1(b) is a schematic flowchart of the automatic shimming method for a multi-channel magnetic resonance coil provided in this application. As shown in Figure 1(b), the automatic shimming method for a multi-channel magnetic resonance coil according to the first embodiment of this application includes:

[0055] Step S101: Based on the target field of the non-uniform main magnetic field, construct a multi-channel coil, wherein the multi-channel coil includes multiple coil units;

[0056] Step S102: The free induction attenuation signal of the non-uniform main magnetic field is obtained through the radio frequency receiving coil. The free induction attenuation signal is converted to the frequency domain to obtain the free induction attenuation spectrum signal. The free induction attenuation spectrum signal is input into the pre-trained Transformer automatic shimming control model to obtain the multi-channel coil compensation current. The multi-channel coil compensation current is applied to the multi-channel coil, and the multi-channel coil generates a magnetic field to compensate for the non-uniform main magnetic field.

[0057] Specifically, in step S101, a multi-channel coil is constructed based on the shimming requirements of the non-uniform main magnetic field, i.e., the target field. The multi-channel coil can be constructed using an empirical design method or a reverse design method. In one possible implementation, the multi-channel coil is constructed using an empirical design method, and step S101 may include:

[0058] Step a: Acquire the original main magnetic field field map signal, and obtain the target field magnetic field strength by calculating the difference between the original main magnetic field field map signal and the ideal main magnetic field field map signal. The original main magnetic field field map signal and the ideal main magnetic field field map signal can be obtained indirectly through direct measurement or phase information after echo sequence imaging. The target field is the magnetic field that needs to be compensated for in the entire imaging area, that is, the magnetic field that needs to be compensated for in the global shimming of the main magnetic field.

[0059] Step b: Based on historical experience, set the regular structure of the multi-channel coil. The regular structure is to arrange coil units of regular shapes in a regular manner, for example... Figure 4 As shown, the regular-shaped coil unit can be a circle as shown in Figure 401, a rectangle as shown in Figure 402, or other regular shapes. The regular arrangement of the coil units can be an array as shown in Figure 403, a cross arrangement as shown in Figure 404, or a multi-layer arrangement as shown in Figure 405. The coil units can also be arranged in other regular ways. This application does not limit the specific regular shape and specific regular arrangement of the coil units. In addition, after the regular arrangement and corresponding number of coil units are set, the size of the coil unit can be determined according to the size of the carrier.

[0060] Step c: Calculate the unit magnetic field strength matrix corresponding to the multi-channel coil with the established regular structure. And based on the objective optimization equation and Solving for the current vector of the coil element The objective optimization equation is: ,in, It is a second-order norm, and the unit magnetic field strength matrix is... Indicates the first When a unit current (i.e., 1A) is applied to each coil unit, the number of coils in the first coil unit is... The magnetic field strength generated at a target field point is: One, the coil unit is indivual, Integers greater than 0 The current vector of the coil element is represented as , Represented as , The calculation can be performed using the Biot-Savart formula based on the regular structure of the multi-channel coil, so it will not be elaborated here.

[0061] Step d: Determine the current vector of the coil unit. Does it meet the preset conditions, such as the requirement for uniformity of the main magnetic field?

[0062] If step e is satisfied, the empirical design of the multi-channel coil ends, and the current rule structure is used as the coil structure of the multi-channel coil.

[0063] If step f is not satisfied, return to step b, that is, return to the step of setting the regular structure of the multi-channel coil based on historical experience, obtain a new regular structure, and continue to execute subsequent steps. This cycle continues until the coil unit current vector is obtained. The preset conditions are met.

[0064] In another possible implementation, using a reverse design method to construct a multi-channel coil, step S101 may include:

[0065] Step A: Acquire the original main magnetic field field map signal, and calculate the target field magnetic field strength based on the original main magnetic field field map signal and the ideal main magnetic field field map signal. ;

[0066] Step B: Set the coil structure of the multi-channel coil according to the obtained structural parameters. The structural parameters include the shape, size and position distribution of the coil units. The initial values ​​of the structural parameters can be set according to the carrier size and the preset number of channels.

[0067] Step C: Calculate the unit magnetic field strength matrix corresponding to the multi-channel coil. And based on the objective optimization equation and Solving for the current vector of the coil element The objective optimization equation is: ;

[0068] Step D: Determine the current vector of the coil unit. Does it meet the preset conditions?

[0069] Step E: If satisfied, the reverse design of the multi-channel coil ends. The current coil structure is used as the coil structure of the multi-channel coil. A typical coil structure obtained through reverse design is, for example... Figure 5 As shown, it can be a polygonal irregular geometric structure as shown in Figure 501, or a geometric structure based on stream function design as shown in Figure 502;

[0070] If step F is not satisfied, then an optimization algorithm is used to inversely optimize the structural parameters of the coil structure based on the target field. The optimization algorithm includes, but is not limited to, least squares method, particle swarm optimization, genetic algorithm, etc., and then the process returns to step B, that is, to return to the step of setting the coil structure of the multi-channel coil based on the obtained structural parameters, to obtain a new coil structure, and then continues to execute subsequent steps. This process is repeated until the coil unit current vector is obtained. The preset conditions are met.

[0071] The above method is used to design a highly flexible multi-channel coil, which provides a flexible magnetic field compensation hardware basis for ensuring the overall uniformity of the imaging area and for addressing local distortions caused by different areas.

[0072] Specifically, in step S102, a pre-designed multi-channel coil is used to acquire the free-sensor attenuation signal of the non-uniform main magnetic field through the RF receiving coil. Specifically, when the RF pulse is turned off, the macroscopic transverse magnetization vector induces a time-decreasing sinusoidal signal in the RF receiving coil. After amplification, down-conversion, and digitization, a processable FID signal (at this time, a time-domain signal) is obtained. Then, through a fast Fourier transform, the FID signal is converted to the frequency domain (obtaining the free-sensor attenuation spectrum signal, i.e., the FID spectrum signal). The method of acquiring the FID signal can refer to existing conventional techniques, so it will not be elaborated here. The obtained FID spectrum signal is input into a pre-trained Transformer automatic shimming control model to obtain the multi-channel coil compensation current. After obtaining the multi-channel coil compensation current, it can be used in an actual magnetic resonance imaging system. Specifically, the multi-channel coil compensation current is applied to the multi-channel coil to drive the multi-channel coil system, so that it generates the required compensation magnetic field to compensate for the non-uniform main magnetic field, thereby homogenizing the main magnetic field and realizing rapid automatic shimming of the multi-channel magnetic resonance coil. The FID spectrum signal or field map signal corresponding to the main magnetic field after shimming can be collected to verify the shimming effect.

[0073] It should be noted that the combination of multi-channel coil design and Transformer automatic shimming control model can regulate both the global and local uniformity of the main magnetic field. For different scanning objects and different scanning regions with varying shimming requirements (i.e., local shimming requirements), the Transformer automatic shimming control model can quickly achieve personalized compensation for locally distorted magnetic fields.

[0074] Specifically, in step S102, the Transformer automatic shimming model is pre-built and pre-trained. The Transformer automatic shimming model includes a signal serialization unit, a global feature extraction encoder, and a parallel regression prediction network cascaded in sequence.

[0075] Specifically, the signal serialization unit is used to slice and map multiple one-dimensional FID spectrum signals into a sequence of feature vectors, while introducing position encoding to convert the physical information of the frequency domain distribution into an input format that the model can process. For example... Figure 6 As shown, the signal serialization unit includes a cascaded maximum-minimum normalization module, an equal-length non-overlapping sliding module, a linear projection module, and a position representation module (the modular diagram of the position representation module is not shown). The maximum-minimum normalization module is used to map the acquired multi-channel FID spectrum signals to the [0, 1] interval, and its specific mathematical formula can be represented as follows: ,in, The output of the max-min normalization module, The induced amplitude of the FID spectrum signal at a certain frequency point. and These represent the minimum and maximum amplitude values ​​of the signal across the entire spectrum. The equal-length non-overlapping sliding module divides the output of the maximum-minimum normalization module into S continuous and non-overlapping signal segments. Specifically, the sliding window length and step size of the equal-length non-overlapping sliding module can be set to H, ensuring that there are no gaps or overlaps between adjacent segments when the window slides from the beginning to the end of the signal sequence, thereby achieving a complete and non-redundant logical division of the full-spectrum signal. Each divided signal segment contains H sampling points, and each signal segment represents the local magnetic field distortion characteristics within a specific frequency range. S = the total number of sampling points of the free-induction attenuated spectrum signal / H. The linear projection module is a fully connected linear projection used to convert the signal segment into a D-dimensional high-dimensional feature vector. D is a preset feature dimension, a hyperparameter set according to computational resources and performance requirements. For example, D can be selected as 256, realizing the mapping of the signal from a low-dimensional time-frequency space to a high-dimensional feature space. The position representation module first embeds a global class marker vector into the header of the high-dimensional feature vector output by the linear projection module to obtain a global marker vector. At this time, the length of the input vector is expanded from R to R+1. Then, an absolute position code based on a sine and cosine function of a preset frequency is superimposed on the global marker vector to establish the physical frequency index of each signal segment in the spectrum, thereby obtaining a position code vector. The absolute position code calculation formula is as follows: , ,in, Position index in the global tag vector ( Corresponding to global class markers, (corresponding signal segment) PE represents the absolute positional encoding, which is the index of the feature dimension.

[0076] Specifically, the global feature extraction encoder is used to extract a global feature vector, such as... Figure 6 As shown, the global feature extraction encoder includes N stacked coding blocks, where N is an integer greater than or equal to 1. Performance is significantly improved within the range of N=2 to N=5, with N=3 being the optimal implementation. Each coding block includes a multi-head self-attention layer, a first normalization layer, a feedforward neural network, and a second normalization layer, all cascaded sequentially. The input of the multi-head self-attention layer also serves as the input of the first normalization layer, and the input of the feedforward neural network also serves as the input of the second normalization layer, achieving residual connections. For example... Figure 7As shown, the multi-head self-attention layer includes multiple stacked self-attention layers (e.g., h layers). Each self-attention layer is specifically used for: projecting the position encoding vector output by the signal serialization unit in parallel through three independent linear layers (linear transformation matrices), mapping the position encoding vector to a query matrix Q, a key matrix K, and a value matrix V, respectively; and calculating the self-attention feature vector. ,in, The dimension of the location encoding vector. The scaling factor is used to prevent the gradient from vanishing due to excessively large dot product values. Specifically, the feedforward neural network includes cascaded 1×1 convolutional layers, a GELU activation function, and another 1×1 convolutional layer to enhance the model's ability to fit higher-order nonlinear distortions of the magnetic field. After iterative processing by multiple stacked encoder blocks in the global feature extraction encoder, the global class label vector in the head has fully absorbed the key features of magnetic field inhomogeneity in the entire spectrum through continuous attention interactions. Finally, the global feature extraction encoder extracts the hidden state output corresponding to the global class label vector and feeds it as the global feature vector of the full spectrum information into the subsequent parallel regression prediction network to deduce the current compensation values ​​of each coil. The global feature extraction encoder uses a multi-head self-attention mechanism to extract feature correlations in parallel across the entire spectrum, which is used to identify the independent contributions of different shimming coils to the spectral profile transformation, deeply mine the nonlinear correlations within the spectral feature vectors, and transform discrete spectral block information into higher-order physical representations.

[0077] Specifically, the parallel regression prediction network is used to map the global feature vector extracted by the encoder to specific physical compensation parameters, such as... Figure 8 As shown, the parallel regression prediction network may include a first fully connected layer, a first ReLU activation function, a second fully connected layer, a second ReLU activation function, and a third fully connected layer cascaded in sequence. The first fully connected layer linearly maps the global feature vector to a preset intermediate dimension. The first ReLU activation function performs a nonlinear feature transformation on the output of the first fully connected layer to enhance the modeling ability for complex electromagnetic environments. The second fully connected layer performs dimensionality reduction and compression on the output of the first ReLU activation function through linear mapping, i.e., linearly mapping to a lower-dimensional compressed feature. The second ReLU activation function performs nonlinear filtering on the output of the second fully connected layer, thereby completing the dimensionality reduction and compression of the features. The third fully connected layer is a linear output layer without activation functions, used to linearly map the output of the second ReLU activation function to a multi-channel coil compensation current vector, the dimension of which is equal to the number of coil units.

[0078] After the Transformer automatic shimming control model is constructed, it is trained to obtain the optimal Transformer automatic shimming control model parameters, thereby achieving the optimal Transformer automatic shimming control model. In one possible implementation, the automatic shimming method for multi-channel magnetic resonance coils provided in this application further includes training the Transformer automatic shimming control model, which may include:

[0079] Step 1: Uniformly sample the current space of each coil unit in the multi-channel coil to obtain the sampled current of each coil unit, and simultaneously acquire the FID signal of the corresponding non-uniform main magnetic field to construct a mapping dataset of the sampled current of the coil unit and the FID signal.

[0080] Step II: Using the mapped dataset as training data and minimizing the Huber loss function as the optimization objective, train the Transformer automatic shimming model, wherein the Huber loss function... , The deviation between any one of the multi-channel coil compensation current values ​​output by the Transformer automatic shimming control model and the corresponding standard true current value. This is a preset threshold parameter.

[0081] Specifically, in step I, an automated script can be used in the multi-channel coil. Uniform sampling is performed within the current space of each coil unit, and the FID signal of the non-uniform main magnetic field is acquired synchronously. Specifically, for Composed of coil units In the current space, the current variation range of each coil unit is set as follows: And determine the total number of samples as Using the Latin hypercube sampling algorithm, the current range in each dimension is divided into equal parts. Disjoint sub-intervals are used to ensure that the projections of sample points on each axis are equal and non-overlapping, thereby achieving efficient coverage of magnetic field combinations generated by different coil units; In the dimensional current space, the first The coil unit in the first... The sampling current value of the coil unit at each sampling point ,in, For from set Randomly selected independent permutations Let be a random term that follows a uniform distribution in the interval [0, 1].

[0082] Specifically, in step I, the measured FID signal group consists of a reference spectrum of the current state and... Each bar corresponds to a perturbation spectrum formed after the step offset of each coil unit. The step offset is achieved by... Each coil unit is subjected to an independent, minute current disturbance. This allows us to obtain the contribution characteristics of each coil unit to the magnetic field transformation. Based on the sampled current of each coil unit and the FID signal of the corresponding non-uniform main magnetic field simultaneously acquired, a mapping dataset (i.e., a physical representation library) containing multiple FID signals and corresponding currents (and further, the corresponding current deviation vectors) is formed. It should be noted that when training the Transformer automatic shimming control model, the FID signals in the mapping dataset are converted to the frequency domain to obtain the FID spectrum signal. This FID spectrum signal is then used as the input to the Transformer automatic shimming control model for training. This transforms the physical information distributed in the frequency domain into features that the Transformer automatic shimming control model can process, providing data support for training the model.

[0083] Specifically, in step II, the Huber loss function can be used as the objective criterion for model optimization, with minimizing the Huber loss function as the optimization goal, balancing prediction accuracy and robustness to spectral noise during training. The Huber loss function is achieved by setting a threshold parameter. When the error is small, mean squared error is used to achieve accurate regression, while mean absolute error is switched to reduce the impact of outlier noise on model parameter updates when the error is large.

[0084] During the model training phase, iterative optimization is performed using the mapping dataset constructed in step I. Through the backpropagation mechanism of the error, the gradient signal generated by the Huber loss passes sequentially through the parallel regression prediction network, the global feature extraction encoder, and the linear projection layer, continuously adjusting the weights of the fully connected layers. Self-attention matrix With learnable position encoding parameters, the trained Transformer automatic shimming control model can ultimately output ideal compensation current values ​​for all coil units in parallel during a single forward propagation for any input measured FID spectrum signal, thereby achieving end-to-end rapid correction of magnetic field inhomogeneity. After the Transformer automatic shimming model is built and trained, it is used as part of the shimming method software to implement global shimming or personalized shimming in local areas.

[0085] The automatic shimming method for multi-channel coils in magnetic resonance imaging provided in this application, through the design of highly flexible multi-channel coils, provides a high-degree-of-freedom non-orthogonal compensation magnetic field, breaking through the limitations of orthogonal magnetic field compensation in traditional SH coils, improving shimming flexibility and compensation adaptability, and adapting to complex main magnetic field distortion scenarios in different subjects and scanning areas; combining the characteristics of multi-channel coils, a Transformer automatic shimming control model is introduced to solve the mapping relationship between coil unit current and FID signal, reducing the complexity of coil unit current calculation and shimming control, improving shimming efficiency, and meeting the needs of rapid clinical compensation; the hardware and software design work together to form a complete shimming solution, which improves the FID signal, provides a uniform main magnetic field for the MRI system, improves the signal-to-noise ratio and accuracy of imaging and spectral detection, supports various advanced MRI technologies sensitive to magnetic field homogeneity, and effectively helps to improve the accuracy and reliability of clinical diagnosis.

[0086] A second aspect of this application also provides an electronic device, the electronic device comprising:

[0087] At least one processor; and,

[0088] A memory communicatively connected to at least one of the processors; wherein,

[0089] The memory stores instructions that can be executed by the processor to implement the above-described automatic shimming method for multi-channel magnetic resonance coils.

[0090] A third aspect of this application also provides a computer-readable storage medium storing computer instructions for execution by a computer to implement the above-described automatic shimming method for a multi-channel magnetic resonance coil.

[0091] A fourth aspect of this application also provides a computer program product containing instructions that, when executed by a computer device, cause the computer device to perform the above-described automatic shimming method for a multi-channel magnetic resonance coil.

[0092] It should be noted that the Transformer automatic shimming control model provided in the above embodiments is only an example of the division of the above functional units or modules. In practical applications, the above functions can be assigned to different functional units or modules as needed, that is, the units / modules or steps in the embodiments of this application can be further decomposed or combined. For example, the units or modules in the above embodiments can be merged into one unit or module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the units, modules, and steps involved in the embodiments of this application are only for distinguishing the various units, modules, or steps, and are not considered as an improper limitation of this application.

[0093] Those skilled in the art will recognize that the units, modules, and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. The program corresponding to the software unit or module or method step can be placed in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. To clearly illustrate the interchangeability of electronic hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0094] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a unit (or module), program segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0095] The terms “first”, “second”, etc., are used to distinguish similar objects, not to describe or indicate a specific order or sequence.

[0096] The term "comprising" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent in such process, method, article, or apparatus / device.

[0097] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.

[0098] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for automatic shimming of a multi-channel magnetic resonance coil, characterized in that, include: Based on the target field of the non-uniform main magnetic field, a multi-channel coil is constructed, wherein the multi-channel coil includes multiple coil units; The free induction attenuation signal of the non-uniform main magnetic field is obtained by the radio frequency receiving coil. The free induction attenuation signal is converted to the frequency domain to obtain the free induction attenuation spectrum signal. The free induction attenuation spectrum signal is input into the pre-trained Transformer automatic shimming control model to obtain the multi-channel coil compensation current. The multi-channel coil compensation current is applied to the multi-channel coil, and the multi-channel coil generates a magnetic field to compensate for the non-uniform main magnetic field. The Transformer automatic shimming model comprises a cascaded signal serialization unit, a global feature extraction encoder, and a parallel regression prediction network. The signal serialization unit includes a cascaded maximum-minimum normalization module, an equal-length non-overlapping sliding module, a linear projection module, and a position representation module. The maximum-minimum normalization module maps the multi-channel free-induction attenuation spectrum signal to the [0, 1] interval. The equal-length non-overlapping sliding module divides the output of the maximum-minimum normalization module into S continuous and non-overlapping signal segments, where S = the total number of sampling points of the free-induction attenuation spectrum signal / H, and H is the sliding window length equal to the step size. The linear projection module converts the signal segments into D-dimensional high-dimensional feature vectors, where D is a preset feature dimension. The position representation module embeds a global class marker vector at the head of the high-dimensional feature vector to obtain a global marker vector, and then superimposes the global marker vector with an absolute position code based on a preset frequency sine and cosine function to obtain a position code vector. The global feature extraction encoder includes multiple stacked encoding blocks for extracting global feature vectors based on the position encoding vectors. Each encoding block includes a multi-head self-attention layer, a first normalization layer, a feedforward neural network, and a second normalization layer, which are cascaded in sequence. The input of the multi-head self-attention layer is also used as the input of the first normalization layer, and the input of the feedforward neural network is also used as the input of the second normalization layer. The parallel regression prediction network includes a first fully connected layer, a first ReLU activation function, a second fully connected layer, a second ReLU activation function, and a third fully connected layer, which are cascaded in sequence.

2. The automatic shimming method for multi-channel magnetic resonance coils according to claim 1, characterized in that, The multi-head self-attention layer comprises multiple stacked self-attention layers, each self-attention layer being used for: The location encoding vector is projected in parallel through three independent linear layers, mapping the location encoding vector into a query matrix Q, a key matrix K, and a value matrix V, respectively. Calculate the self-attention feature vector ,in, Let be the dimension of the location encoding vector.

3. The automatic shimming method for multi-channel magnetic resonance coils according to claim 2, characterized in that, The feedforward neural network includes cascaded 1×1 convolutional layers, a GELU activation function, and another 1×1 convolutional layer.

4. The automatic shimming method for multi-channel magnetic resonance coils according to claim 1, characterized in that, The first fully connected layer is used to linearly map the global feature vector to a preset intermediate dimension, and the first ReLU activation function is used to perform nonlinear feature transformation on the output of the first fully connected layer; the second fully connected layer is used to perform dimensionality reduction compression on the output of the first ReLU activation function through linear mapping, and the second ReLU activation function is used to perform nonlinear filtering on the output of the second fully connected layer; the third fully connected layer is a linear output layer, used to linearly map the output of the second ReLU activation function to a multi-channel coil compensation current vector, and the dimension of the multi-channel coil compensation current vector is equal to the number of coil units.

5. The automatic shimming method for multi-channel magnetic resonance coils according to claim 1, characterized in that, It also includes training the Transformer automatic shimming control model, wherein training the Transformer automatic shimming control model includes: Uniform sampling is performed in the current space of each coil unit of the multi-channel coil to obtain the sampling current of each coil unit, and the free induction decay signal of the corresponding non-uniform main magnetic field is collected simultaneously to construct a mapping dataset of the sampling current of the coil unit and the free induction decay signal. Using the aforementioned mapping dataset as training data and minimizing the Huber loss function as the optimization objective, the Transformer automatic shimming model is trained. Wherein, the Huber loss function , The deviation between any one of the multi-channel coil compensation current values ​​output by the Transformer automatic shimming control model and the corresponding standard true current value. This is a preset threshold parameter.

6. The automatic shimming method for multi-channel magnetic resonance coils according to claim 1, characterized in that, The construction of a multi-channel coil based on the target field of the non-uniform main magnetic field includes: The original main magnetic field field map signal is acquired, and the magnetic field strength of the target field is calculated based on the original main magnetic field field map signal and the ideal main magnetic field field map signal. ; The regular structure of the multi-channel coil is set according to historical experience, and the regular structure is to arrange the coil units of regular shape in a regular manner; Calculate the unit magnetic field strength matrix corresponding to the multi-channel coil. And based on the objective optimization equation and Solving for the current vector of the coil element The objective optimization equation is: ,in, It is a second-order norm, and the unit magnetic field strength matrix is... Indicates the first When a unit current is applied to the first coil unit, the... The magnetic field strength generated at a target field point is: One, the coil unit is indivual, The current vector of the coil element is represented as , Represented as ; Determine the current vector of the coil unit Whether the preset conditions are met, if so, then the current rule structure is used as the coil structure of the multi-channel coil; If the conditions are not met, return to the steps of setting the regular structure of the multi-channel coil based on historical experience to obtain a new regular structure, until the coil unit current vector is obtained. The preset conditions are met.

7. The automatic shimming method for multi-channel magnetic resonance coils according to claim 1, characterized in that, The construction of a multi-channel coil based on the target field of the non-uniform main magnetic field includes: The original main magnetic field field map signal is acquired, and the magnetic field strength of the target field is calculated based on the original main magnetic field field map signal and the ideal main magnetic field field map signal. ; The coil structure of the multi-channel coil is set according to the obtained structural parameters, including the shape, size and position distribution of the coil units; Calculate the unit magnetic field strength matrix corresponding to the multi-channel coil. And based on the objective optimization equation and Solving for the current vector of the coil element The objective optimization equation is: ,in, It is a second-order norm, and the unit magnetic field strength matrix is... Indicates the first When a unit current is applied to the first coil unit, the... The magnetic field strength generated at a target field point is: One, the coil unit is indivual, The current vector of the coil element is represented as , Represented as ; Determine the current vector of the coil unit If the preset conditions are met, then the current coil structure is used as the coil structure of the multi-channel coil. If the conditions are not met, an optimization algorithm is used to inversely optimize the structural parameters of the coil structure based on the target field, and the steps of setting the coil structure of the multi-channel coil according to the obtained structural parameters are returned until the coil unit current vector is obtained. Meets the preset conditions. The initial values ​​of the structural parameters are determined based on the carrier size and the preset number of channels.

8. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that can be executed by the processor to implement the automatic shimming method for a multi-channel magnetic resonance coil as described in any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are executed by the computer to implement the automatic shimming method for a multi-channel magnetic resonance coil as described in any one of claims 1-7.

10. A computer program product containing instructions, characterized in that, When the instructions are executed by a computer device, the computer device performs the automatic shimming method for a magnetic resonance multichannel coil as described in any one of claims 1-7.