Nuclear magnetic resonance spectrum peak position detection method, device and readable medium
By processing spin echo pulse sequences using the SEcho-Net neural network, the problems of spectral peak overlap and noise interference were solved, enabling accurate detection and identification of spectral peak positions and improving the resolution and identification accuracy of nuclear magnetic resonance spectra.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAMEN UNIV
- Filing Date
- 2023-07-27
- Publication Date
- 2026-06-02
AI Technical Summary
In existing nuclear magnetic resonance (NMR) techniques, the J-coupling between hydrogen nuclei leads to peak overlap and reduced spectral resolution, making it difficult to accurately identify and assign peaks. Furthermore, existing pure chemical shift techniques are complex and susceptible to noise and spurious peak interference.
The SEcho-Net neural network is used to process spin echo pulse sequences. Through a combination of encoding and decoding layers, including indirect dimension downsampling, direct dimension downsampling, and stepwise dimension reduction modules, the pure chemical shift position information of the spectral peaks is extracted and recovered, avoiding complex experimental operations and noise interference.
It achieves accurate detection of spectral peak positions, improves the accuracy and resolution of spectral peak identification, simplifies experimental operations, overcomes noise interference, and enables rapid location of spectral peak positions.
Smart Images

Figure CN117008028B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of nuclear magnetic resonance (NMR) technology, specifically to a method, apparatus, and readable medium for detecting the position of NMR spectral peaks. Background Technology
[0002] Nuclear magnetic resonance (NMR) technology is a powerful and versatile analytical technique, excelling in detecting material structure and acquiring spatial information, and has wide applications in various fields such as biology, chemistry, and physics. Among these, one-dimensional nuclear magnetic resonance hydrogen spectroscopy (1D) is particularly valuable. 1 H-NMR is one of the most important research methods in nuclear magnetic resonance spectroscopy. However, due to J-coupling between hydrogen nuclei, peaks split, causing severe peak overlap and reduced spectral resolution, making peak identification and assignment difficult. To eliminate J-coupling, many pure chemical shift techniques have been proposed.
[0003] Pure chemical shift techniques provide accurate chemical shift information, which is crucial for determining the structure and composition of organic molecules. By eliminating the influence of J-coupling, pure chemical shift techniques result in clearer and more accurate signals, aiding in the determination of molecular chemical structure, the number and type of bonds, and the chemical environment of functional groups. Furthermore, pure chemical shift techniques can improve the signal-to-noise ratio, thereby enhancing the sensitivity of NMR spectra, which is particularly useful for the analysis of compounds with low concentrations and complex mixtures.
[0004] Among pure chemical shift techniques, representative experimental methods such as the PSYCHE method and the real-time ZS method are relatively complex and susceptible to interference from noise and spurious peaks. Summary of the Invention
[0005] In view of the aforementioned technical problems, the purpose of the embodiments of this application is to provide a method, apparatus, and readable medium for detecting the position of nuclear magnetic resonance spectral peaks, thereby solving the technical problems mentioned in the background section.
[0006] In a first aspect, the present invention provides a method for detecting the position of nuclear magnetic resonance spectral peaks, comprising the following steps:
[0007] A spin echo pulse sequence is obtained, and the spin echo pulse sequence is processed to obtain a two-dimensional spectrum based on the spin echo phase change spectrum.
[0008] A SEcho-Net neural network was constructed and trained to obtain a nuclear magnetic resonance spectral peak position detection model. The SEcho-Net neural network includes an encoding layer and a decoding layer. The encoding layer includes an indirect dimension downsampling module and a direct dimension downsampling module. The indirect dimension downsampling module is used to compress the two-dimensional spectrum based on the spin echo phase change spectrum to obtain the first feature vector. The first feature vector is input into the direct dimension downsampling module to extract key information related to the spectral peak position to obtain key features. The decoding layer includes a direct dimension upsampling module and a step-by-step dimension reduction module. The direct dimension upsampling module is used to recover the spectral information from the key features to obtain the second feature vector. The second feature vector is input into the step-by-step dimension reduction module for feature extraction to obtain the pure chemical shift position information of the spectral peak.
[0009] The two-dimensional spectrum based on the spin echo phase change spectrum is input into the nuclear magnetic resonance peak position detection model, and the pure chemical shift position information of the peak is output.
[0010] Preferably, the indirect dimension downsampling module includes a first convolutional layer, a first batch normalization (BN) layer, a first sigmoid function layer, a first downsampling layer, and two first residual layers connected in sequence. The first residual layer includes two residual blocks and a first downsampling layer connected in sequence, and the first downsampling layer is a convolutional layer. The direct dimension downsampling module includes several second residual layers connected in sequence. The second residual layer includes two residual blocks and a second downsampling layer connected in sequence, and the second downsampling layer is a max pooling layer.
[0011] Preferably, the direct dimension upsampling module includes several third residual layers connected in sequence. Each third residual layer includes two residual blocks connected in sequence and a first upsampling layer. The first upsampling layer uses the nearest neighbor interpolation algorithm. The stepwise dimension reduction module includes several fourth residual layers connected in sequence. Each fourth residual layer includes two residual blocks connected in sequence, a Softmax activation function layer, and a second convolutional layer.
[0012] Preferably, the residual block includes a third convolutional layer, a second BN layer, a second sigmoid function layer, a fourth convolutional layer, a third BN layer, and a third sigmoid function layer connected in sequence. The input of the residual block is added to the output of the third sigmoid function layer to obtain the output of the residual block.
[0013] Preferably, the spin echo pulse sequence is processed to obtain a two-dimensional spectrum based on the spin echo phase change spectrum, specifically including:
[0014] The expression for the single-peak FID signal of NMR in each spin echo is derived using a spin echo pulse sequence:
[0015]
[0016] Where i is an imaginary number, A, f, T2, J, and pow represent amplitude, frequency, transverse relaxation time, J coupling intensity, and coupling spin number, respectively, and t1, t2, and t3 are the evolution times of chemical shift, transverse relaxation, and J coupling, respectively. The time range of t1 is 0 to (np-1) / SW, and the time ranges of t2 and t3 are 2τ to 2τ+(np-1) / SW, where SW is the spectral width and np is the number of sampling points of the FID signal.
[0017] Multiple single-peak free-induction attenuation signals are summed to obtain a multi-peak spin echo signal FID0. Several multi-peak spin echo signals FID0 are Fourier transformed into spectra of 4096 complex points with a fixed number of points. The real part of the spectrum is then taken, and normalized relative to the maximum value of all spectra. Finally, they are stitched together to form a 4098×8 two-dimensional spectrum based on the spin echo phase change spectrum.
[0018] Preferably, the training data for the SEcho-Net neural network includes input data and its corresponding label data. The process for obtaining the input data is as follows:
[0019] Spin echo pulse sequences are obtained, and the single-peak FID signal of each spin echo is derived from the spin echo pulse sequences. The free induction decay signals of multiple single peaks are added together to obtain multi-peak spin echo signals FID0. Fourier transforms and relative maximum value normalization are performed on several multi-peak spin echo signals FID0 at the same position peak in the spin echo phase change spectrum at different evolution times, and then inverse Fourier transforms are performed to obtain several FID1 signals. Gaussian white noise of the same intensity is added to the real and imaginary parts of several FID1 signals, and then Fourier transforms and relative maximum value normalization are performed on them. Finally, they are spliced into two-dimensional data to obtain the input data.
[0020] The tag data is a one-dimensional matrix generated by setting the position of the peak to 1 and the other positions to 0, which corresponds to the pure chemical shift position information of the spectral peak.
[0021] Preferably, several multi-peak spin echo signals FID0 correspond to eight multi-peak spin echo signals FID0 with different evolution times for the same set of spectral peak parameters 2τ.
[0022] Secondly, the present invention provides a nuclear magnetic resonance spectral peak position detection device, comprising:
[0023] The data acquisition module is configured to acquire a spin echo pulse sequence, process the spin echo pulse sequence, and obtain a two-dimensional spectrum based on the spin echo phase change spectrum.
[0024] The model building module is configured to build and train a SEcho-Net neural network to obtain a nuclear magnetic resonance spectral peak position detection model. The SEcho-Net neural network includes an encoding layer and a decoding layer. The encoding layer includes an indirect dimension downsampling module and a direct dimension downsampling module. The indirect dimension downsampling module is used to compress the two-dimensional spectrum based on the spin echo phase change spectrum to obtain a first feature vector. The first feature vector is input into the direct dimension downsampling module to extract key information related to the spectral peak position to obtain key features. The decoding layer includes a direct dimension upsampling module and a step-by-step dimension reduction module. The direct dimension upsampling module is used to recover spectral information from the key features to obtain a second feature vector. The second feature vector is input into the step-by-step dimension reduction module for feature extraction to obtain the pure chemical shift position information of the spectral peak.
[0025] The execution module is configured to input a two-dimensional spectrum based on the spin echo phase change spectrum into the nuclear magnetic resonance peak position detection model and output pure chemical shift position information of the peak.
[0026] Thirdly, the present invention provides an electronic device including one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any implementation of the first aspect.
[0027] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the implementations of the first aspect.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] (1) The nuclear magnetic resonance spectrum peak position detection method proposed in this invention utilizes a simple experimental method and processes spin echo spectrum data through a nuclear magnetic resonance spectrum peak position detection model based on SEcho-Net neural network, avoiding complex experimental operations and interference from spurious peaks. Moreover, this nuclear magnetic resonance spectrum peak position detection method can overcome noise interference and accurately detect the pure chemical shift position information of the spectrum peak.
[0030] (2) The SEcho-Net neural network designed by the nuclear magnetic resonance spectrum peak position detection method proposed in this invention can both retain the indirect dimension correlation and extract the key information of the direct dimension. The use of the step-by-step dimension reduction module improves the accuracy of spectrum peak identification.
[0031] (3) The SEcho-Net neural network designed by the nuclear magnetic resonance spectrum peak position detection method proposed in this invention can obtain a nuclear magnetic resonance spectrum peak position detection model after training, which can accurately locate the spectrum peak position, thereby achieving the purpose of quickly detecting nuclear magnetic resonance spectrum peak position information. Attached Figure Description
[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is an exemplary device architecture diagram in which an embodiment of this application can be applied;
[0034] Figure 2 This is a schematic flowchart of the nuclear magnetic resonance spectrum peak position detection method according to an embodiment of this application;
[0035] Figure 3 This is a schematic diagram of the spin echo sequence of the nuclear magnetic resonance spectrum peak position detection method according to an embodiment of this application, wherein RF1 is a non-selective 90° pulse, RF2 is a non-selective 180° pulse, 2τ is the evolution time, and sampling is performed after the 2τ time ends;
[0036] Figure 4 This is a schematic diagram of the SEcho-Net neural network used in the nuclear magnetic resonance spectrum peak position detection method according to an embodiment of this application;
[0037] Figure 5 The diagrams are schematic diagrams of the various modules in the SEcho-Net neural network of the nuclear magnetic resonance spectrum peak position detection method according to the embodiments of this application, wherein (a) is a schematic diagram of the indirect dimension downsampling module, (b) is a schematic diagram of the direct dimension downsampling module, (c) is a schematic diagram of the direct dimension upsampling module, (d) is a schematic diagram of the step-by-step dimension reduction module, and (e) is a schematic diagram of the residual block.
[0038] Figure 6 This is a comparison chart showing the results of processing simulated data using a step-by-step dimension reduction module and without using a step-by-step dimension reduction module in the nuclear magnetic resonance spectrum peak position detection method of this application. (a) shows the results of simulating a conventional single pulse. 1 (a) H NMR spectrum, i.e., the first spectrum in the input data; (b) the prediction result of the network model with a 1×1 convolutional kernel as the output module; (c) the prediction result of the network model with a step-by-step dimensionality reduction module as the output module.
[0039] Figure 7 The NMR spectra of the ibuprofen and inosine mixture sample, with dimethyl sulfoxide-d6 (DMSO-d6) as the solvent, are used for the NMR peak position detection method in the embodiments and comparative examples of this application. In (a), (b), and (c), the ibuprofen concentration is 0.003 M and the inosine concentration is 0.002 M. (a) is a conventional single-pulse NMR spectrum with 128 scans.1 (a) H NMR spectrum; (b) Conventional single-pulse spectrum after one scan. 1 (c) is the 1H NMR spectrum of the spin echo phase change spectrum with an echo time of 0s after one scan; (d) is the PSYCHE spectrum of the ibuprofen concentration of 0.06M, the inosine concentration of 0.04M, and after one scan; (e) is the peak position of the spin echo phase change spectrum predicted by the SEcho-Net neural network. The arrows indicate representative peaks. The heights of the water peak and the solvent peak are omitted. The representative region is magnified. The asterisk indicates a strongly coupled pseudo-peak.
[0040] Figure 8 This is a schematic diagram of a nuclear magnetic resonance peak position detection device according to an embodiment of this application;
[0041] Figure 9 This is a schematic diagram of the structure of a computer device suitable for implementing the electronic device of the present application. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0043] Figure 1 An exemplary device architecture 100 is shown that can be applied to the nuclear magnetic resonance spectrum peak position detection method or nuclear magnetic resonance spectrum peak position detection device according to the embodiments of this application.
[0044] like Figure 1 As shown, the device architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0045] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various applications, such as data processing applications and file processing applications, can be installed on terminal devices 101, 102, and 103.
[0046] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices, including but not limited to smartphones, tablets, laptops, and desktop computers. When terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software programs or software modules (e.g., software programs or software modules used to provide distributed services) or as a single software program or software module. No specific limitations are imposed here.
[0047] Server 105 can be a server that provides various services, such as a background data processing server that processes files or data uploaded by terminal devices 101, 102, and 103. The background data processing server can process the acquired files or data and generate processing results.
[0048] It should be noted that the nuclear magnetic resonance peak position detection method provided in this application embodiment can be executed by server 105 or by terminal devices 101, 102, and 103. Correspondingly, the nuclear magnetic resonance peak position detection device can be set in server 105 or in terminal devices 101, 102, and 103.
[0049] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Any number of terminal devices, networks, and servers can be included depending on implementation needs. If the data being processed does not need to be retrieved remotely, the above architecture may not include a network, requiring only servers or terminal devices.
[0050] Figure 2 An embodiment of this application provides a method for detecting the position of nuclear magnetic resonance (NMR) spectral peaks, comprising the following steps:
[0051] S1. Obtain the spin echo pulse sequence, process the spin echo pulse sequence, and obtain a two-dimensional spectrum based on the spin echo phase change spectrum.
[0052] In a specific embodiment, the spin echo pulse sequence is processed to obtain a two-dimensional spectrum based on the spin echo phase change spectrum, specifically including:
[0053] The expression for the single-peak FID signal of NMR in each spin echo is derived using a spin echo pulse sequence:
[0054]
[0055] Where i is an imaginary number, A, f, T2, J, and pow represent amplitude, frequency, transverse relaxation time, J coupling intensity, and coupling spin number, respectively, and t1, t2, and t3 are the evolution times of chemical shift, transverse relaxation, and J coupling, respectively. The time range of t1 is 0 to (np-1) / SW, and the time ranges of t2 and t3 are 2τ to 2τ+(np-1) / SW, where SW is the spectral width and np is the number of sampling points of the FID signal.
[0056] Multiple single-peak free induction attenuation signals are summed to obtain a multi-peak spin echo signal FID0. Several multi-peak spin echo signals FID0 are Fourier transformed into a spectrum of 4096 complex points. The real part of the spectrum is then taken and normalized relative to the maximum value of all spectra. Finally, they are stitched together to form a 4098×8 two-dimensional spectrum based on the spin echo phase change spectrum.
[0057] In a specific embodiment, several multi-peak spin echo signals FID0 correspond to eight multi-peak spin echo signals FID0 with different evolution times for the same set of spectral peak parameters 2τ.
[0058] Specifically, the evolution formulas for relaxation, chemical shift, and J-coupling of spin echo signals are derived using spin echo pulse sequences. These evolution formulas are then used to derive the corresponding time-domain algorithm formulas for the FID signal. The spin echo pulse sequence is as follows: Figure 3 As shown. After non-selective 90° pulse RF1 excitation of the spin nucleus, transverse relaxation and J coupling evolve normally. However, due to magnetization vector refocusing, the chemical shift restarts its evolution at the end of the second τ (at the start of sampling). In one embodiment, the number of FID signal sampling points can be fixed at 4096 complex points in the expression for the single-peak FID signal of nuclear magnetic resonance. To simulate multiple spin echo phase change spectra, eight different times are needed for 2τ corresponding to the same set of peak parameters: 0 s, 0.0125 s, 0.025 s, 0.0375 s, 0.05 s, 0.0625 s, 0.075 s, and 0.0875 s. J modulation during the spin echo process causes a conversion between the in-phase and out-of-phase terms of the echo signal. Changes in echo time lead to changes in the in-phase and out-of-phase magnetization, thus different echo times 2τ can yield different phases.
[0059] S2. Construct and train the SEcho-Net neural network to obtain the NMR spectral peak position detection model. The SEcho-Net neural network includes an encoding layer and a decoding layer. The encoding layer includes an indirect dimension downsampling module and a direct dimension downsampling module. The indirect dimension downsampling module is used to compress the two-dimensional spectrum based on the spin echo phase change spectrum to obtain the first feature vector. The first feature vector is input into the direct dimension downsampling module to extract key information related to the spectral peak position to obtain key features. The decoding layer includes a direct dimension upsampling module and a step-by-step dimension reduction module. The direct dimension upsampling module is used to recover the spectral information from the key features to obtain the second feature vector. The second feature vector is input into the step-by-step dimension reduction module for feature extraction to obtain the pure chemical shift position information of the spectral peak.
[0060] In a specific embodiment, the indirect dimension downsampling module includes a first convolutional layer, a first batch normalization (BN) layer, a first sigmoid function layer, a first downsampling layer, and two first residual layers connected in sequence. The first residual layer includes two residual blocks and a first downsampling layer connected in sequence, and the first downsampling layer is a convolutional layer. The direct dimension downsampling module includes several second residual layers connected in sequence. The second residual layer includes two residual blocks and a second downsampling layer connected in sequence, and the second downsampling layer is a max pooling layer.
[0061] In a specific embodiment, the direct dimension upsampling module includes several third residual layers connected in sequence. Each third residual layer includes two residual blocks and a first upsampling layer connected in sequence. The first upsampling layer uses the nearest neighbor interpolation algorithm. The stepwise dimension reduction module includes several fourth residual layers connected in sequence. Each fourth residual layer includes two residual blocks, a Softmax activation function layer, and a second convolutional layer connected in sequence.
[0062] In a specific embodiment, the residual block includes a third convolutional layer, a second BN layer, a second sigmoid function layer, a fourth convolutional layer, a third BN layer, and a third sigmoid function layer connected in sequence. The input of the residual block is added to the output of the third sigmoid function layer to obtain the output of the residual block.
[0063] For details, please refer to Figure 4 The main process of the SEcho-Net neural network can be summarized into two stages: encoding and decoding. During encoding, the network input is a single-channel two-dimensional spectrum (1×4096×8) based on the spin echo phase change spectrum. This spectrum is then passed through an indirect dimension downsampling module and a direct dimension downsampling module to obtain a 128-channel first feature vector (128×128×1). During decoding, the first feature vector is passed through a direct dimension upsampling module and a step-by-step dimension reduction module to obtain a single-channel one-dimensional output (1×4096×1). The structure of each module in the SEcho-Net neural network is as follows: Figure 5 As shown.
[0064] The specific encoding and decoding process of the SEcho-Net neural network is as follows:
[0065] (1) Input the two-dimensional spectrum (1×4096×8) based on the spin echo phase change spectrum of the single channel into the indirect dimension downsampling module. The structure of the indirect dimension downsampling module is as follows: Figure 5 As shown in Figure a, the purpose of this indirect dimension downsampling module is to compress a two-dimensional spectrum into a one-dimensional feature vector to correlate information from different spin echo spectra (indirect dimension). In the indirect dimension downsampling module, the first convolutional layer is used to upsample the input channels to increase feature information. Two residual blocks are used for feature extraction, followed by convolutional layers as downsampling1 to progressively downsample the indirect dimension, ensuring the correlation between different spectra. Simultaneously, the number of channels is doubled to ensure no loss of feature information. This indirect dimension downsampling module can transform a 1×4096×8 single-channel two-dimensional spectrum into a 128×4096×1 multi-channel one-dimensional first feature vector.
[0066] (2) Input the first feature vector into the direct dimension downsampling module. The structure of the direct dimension downsampling module is as follows: Figure 5 As shown in b, the purpose of this direct-dimensional downsampling module is to further extract features from the key feature vector, specifically key information related to the spectral peak position. In the direct-dimensional downsampling module, two residual blocks are also used for feature extraction. A max-pooling layer is used as Down-sampling2 to progressively downsample the direct dimension to obtain key features related to the highest point of the peak in the feature map. This direct-dimensional downsampling module can transform the 128×4096×1 first feature vector into 128×128×1 key features.
[0067] (3) Input the key features (128×128×1) into the direct dimension upsampling module. The structure of the direct dimension upsampling module is as follows: Figure 5 As shown in c. The purpose of this direct dimension upsampling module is to restore the compressed key features to the original digital resolution, that is, to recover the spectral information from the compressed key features. In the direct dimension upsampling module, two residual blocks are used to extract features, and the nearest neighbor interpolation algorithm is used as up-sampling to progressively upsample the direct dimension, thereby recovering the spectral information from the compressed features. Through this direct dimension upsampling module, the 128×128×1 key feature can be transformed into a 128×4096×1 second feature vector;
[0068] (4) Input the second feature vector into the stepwise dimensionality reduction module. The structure of the stepwise dimensionality reduction module is as follows: Figure 5 As shown in diagram d, the purpose is to progressively extract features to improve network accuracy. In the step-by-step dimensionality reduction module, two residual blocks are used for feature extraction. After each dimensionality reduction, a Softmax activation function is added. The repeated use of the Softmax activation function is key to the step-by-step dimensionality reduction module; it helps obtain sparse solutions, suppresses the network's confidence in low-probability classes, and increases the network's confidence in high-probability classes, thus polarizing the confidence and improving network accuracy. Then, a convolutional layer with a 1×1 kernel is used to perform step-by-step dimensionality reduction on the channels, reducing the channel size to half of its original size each time. The structure of the residual block is as follows: Figure 5 As shown in e. Figure 6 The results of processing simulated data using the stepwise dimensionality reduction module and without it were compared. The stepwise dimensionality reduction module can transform a 128×4096×1 single-channel one-dimensional feature vector into a 1×4096×1 single-channel one-dimensional spectrum.
[0069] In a specific embodiment, the training data for the SEcho-Net neural network includes input data and its corresponding label data. The process of obtaining the input data is as follows:
[0070] Spin echo pulse sequences are obtained, and the single-peak FID signal of each spin echo is derived from the spin echo pulse sequences. The free induction decay signals of multiple single peaks are added together to obtain multi-peak spin echo signals FID0. Fourier transforms and relative maximum value normalization are performed on several multi-peak spin echo signals FID0 at the same position peak in the spin echo phase change spectrum at different evolution times, and then inverse Fourier transforms are performed to obtain several FID1 signals. Gaussian white noise of the same intensity is added to the real and imaginary parts of several FID1 signals, and then Fourier transforms and relative maximum value normalization are performed on them. Finally, they are spliced into two-dimensional data to obtain the input data.
[0071] The tag data is a one-dimensional matrix generated by setting the position of the peak to 1 and the other positions to 0, which corresponds to the pure chemical shift position information of the spectral peak.
[0072] Specifically, eight FID0 signals are generated according to the settings. Each signal is then subjected to a Fourier transform, relative maximum normalization, and inverse Fourier transform to obtain eight FID1 signals. Gaussian white noise of the same intensity is added to the real and imaginary parts of each of the eight FID1 signals. The noise intensity coefficient for the high-concentration dataset is 0–1 × 10⁻⁶. -5 The noise intensity coefficient of the low-concentration dataset ranges from 0 to 3.5 × 10⁻⁶. -4Then, Fourier transform and relative maximum normalization are performed on the data, and finally, the data is concatenated into two-dimensional data to obtain the network input data, with a size of 4096×8, where 4096 is the number of points in the direct dimension and 8 is the number of points in the indirect dimension. The label data is generated according to the rule of "setting the position where a peak exists to 1, and setting all other positions to 0". It is a one-dimensional signal matrix with a size of 4096×1. The parameter range of the simulated spectrum is shown in Table 1, where N is the number of peaks:
[0073] Table 1. Parameter range of simulated spectra
[0074]
[0075] The SEcho-Net neural network was trained using the collected training data. The loss function used during training was MAE (Mean Absolute Error), the initial learning rate was set to 0.01, and the learning rate strategy was to reduce the learning rate to 0.1 times its original value when the loss value remained constant. The activation function was the Softmax function, and the optimization algorithm was the Adam algorithm. The training epochs were 50, and the batch size was 200. The training data contained 40,000 simulated spectra, of which 32,000 were randomly selected as the training set, and the remaining 8,000 were used as the validation set. The trained NMR spectral peak position detection model was tested and validated using the test set, and the accuracy of peak identification was calculated. Experimental test data was used to test and validate the NMR spectral peak position detection model, and the accuracy of peak identification was calculated.
[0076] S3 inputs a two-dimensional spectrum based on the spin echo phase change spectrum into the nuclear magnetic resonance peak position detection model and outputs pure chemical shift position information of the peak.
[0077] Specifically, by inputting the two-dimensional spectrum of the target object based on the spin echo phase change spectrum, which is collected in real time, into the nuclear magnetic resonance peak position detection model, the pure chemical shift position information of the peak can be obtained.
[0078] The steps S1-S3 above do not represent the order of the steps, but are merely symbolic representations of the steps.
[0079] The following explanation uses specific examples and comparative models.
[0080] The example sample was a mixture of ibuprofen and inosine, using dimethyl sulfoxide-d6 (DMSO-d6) as the solvent. The ibuprofen concentration was 0.003 M and the inosine concentration was 0.002 M. The experimental instrument was a Varian 500 MHz NMR spectrometer (VArian, PalpAlto, CA), and no changes were made to the instrument hardware during the entire experiment. After the sample was prepared, it was stirred thoroughly and placed in the NMR spectrometer for the experiment. During the experiment, the duration of the π / 2 nonselective pulse was set to 8.7 μs, and the transmitter power was set to 60 dB. The sample was sampled using the instrument's standard one-dimensional 1H NMR spectroscopy sequence with 128 and 1 scans, respectively. The obtained one-dimensional 1H NMR spectra are shown below. Figure 7 a and Figure 7 As shown in b, the sampling time is 1.61s, the spectral width is 5KHz, and the transmitter frequency is -506.3Hz.
[0081] Then, an experimental region was selected, and the standard HOMO2DJ sequence from the instrument was imported. This sequence was used to acquire the spin echo phase change spectrum. During the experiment, the duration of the π / 2 nonselective pulse, transmitter power, sampling time, spectral width, and transmitter frequency were set consistently as in the one-dimensional proton spectrum experiment. Next, the echo time 2τ was set to eight different values using the array function: 0s, 0.0125s, 0.025s, 0.0375s, 0.05s, 0.0625s, 0.075s, and 0.0875s. In the experiment, parameter d2 was used for setting. After setting these parameters, the sample was sampled once, resulting in eight spectra with different echo times. The spectrum with an echo time 2τ of 0 is shown below. Figure 7 As shown in c.
[0082] The experimental data was preprocessed as follows: the eight FID signals were Fourier transformed into a spectrum of 4096 complex points, the real part of the spectrum was taken, and then normalized relative to the maximum value of all spectra. Finally, the spectrum was spliced into a 4098×8 two-dimensional spin echo phase change spectrum, which was used as the input data of the SEcho-Net neural network.
[0083] The noise intensity coefficient of Gaussian white noise is set to 0–3.5 × 10⁻⁶. -4 The parameter ranges for the remaining simulated spectra are set as shown in Table 1 above. The simulated dataset required for training is generated according to the method mentioned above. Then, a SEcho-Net neural network is built using the PyTorch framework and trained according to the training parameters mentioned above. The preprocessed experimental data is input into the trained SEcho-Net neural network, and the final results are shown below. Figure 7 As shown in e.
[0084] Based on the spectral peak position information obtained by this method, and... Figure 7 The sample spectrum of the ibuprofen (0.06 M) and inosine (0.04 M) mixture obtained by the PSYCHE method with one scan, shown in example d, is compared with the reference spectrum. The chemical shift values of the peaks are compared with... Figure 7 The values on the bottom scale line correspond one-to-one. Furthermore, in the PSYCHE spectrum of high-concentration mixture samples, the peak -b9 of ibuprofen overlaps with the strong coupling spurious peak of inosine, making it difficult to correctly distinguish peak -b9; in the spin-echo phase change spectrum of low-concentration mixture samples, the peak -b9 of ibuprofen overlaps with the peak -i11<'> in the strong coupling system of inosine, while the SEcho-Net neural network can distinguish overlapping peaks and identify peak -b9. Therefore, the detection method proposed in the embodiments of this application has higher identification accuracy.
[0085] Further reference Figure 8 As an implementation of the methods shown in the above figures, this application provides an embodiment of a nuclear magnetic resonance spectrum peak position detection device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0086] This application provides a nuclear magnetic resonance (NMR) spectrum peak position detection device, including:
[0087] Data acquisition module 1 is configured to acquire a spin echo pulse sequence, process the spin echo pulse sequence, and obtain a two-dimensional spectrum based on the spin echo phase change spectrum.
[0088] Model building module 2 is configured to build and train a SEcho-Net neural network to obtain a nuclear magnetic resonance spectral peak position detection model. The SEcho-Net neural network includes an encoding layer and a decoding layer. The encoding layer includes an indirect dimension downsampling module and a direct dimension downsampling module. The indirect dimension downsampling module is used to compress the two-dimensional spectrum based on the spin echo phase change spectrum to obtain a first feature vector. The first feature vector is input into the direct dimension downsampling module to extract key information related to the spectral peak position to obtain key features. The decoding layer includes a direct dimension upsampling module and a step-by-step dimension reduction module. The direct dimension upsampling module is used to recover spectral information from the key features to obtain a second feature vector. The second feature vector is input into the step-by-step dimension reduction module for feature extraction to obtain the pure chemical shift position information of the spectral peak.
[0089] Execution module 3 is configured to input a two-dimensional spectrum based on the spin echo phase change spectrum into the nuclear magnetic resonance peak position detection model and output pure chemical shift position information of the peak.
[0090] The following is for reference. Figure 9 It illustrates an electronic device suitable for implementing embodiments of this application (e.g., Figure 1 The diagram shows the structure of a computer device 900 (a server or terminal device). Figure 9 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0091] like Figure 9 As shown, the computer device 900 includes a central processing unit (CPU) 901 and a graphics processing unit (GPU) 902, which can perform various appropriate actions and processes according to programs stored in read-only memory (ROM) 903 or programs loaded from storage section 909 into random access memory (RAM) 904. The RAM 904 also stores various programs and data required for the operation of the device 900. The CPU 901, GPU 902, ROM 903, and RAM 904 are interconnected via a bus 905. An input / output (I / O) interface 906 is also connected to the bus 905.
[0092] The following components are connected to I / O interface 906: an input section 907 including a keyboard, mouse, etc.; an output section 908 including an LCD, speakers, etc.; a storage section 909 including a hard disk, etc.; and a communication section 910 including a network interface card, such as a LAN card or modem. The communication section 910 performs communication processing via a network such as the Internet. A drive 911 may also be connected to I / O interface 906 as needed. A removable medium 912, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 911 as needed so that computer programs read from it can be installed into storage section 909 as required.
[0093] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 910, and / or installed from removable medium 912. When the computer program is executed by central processing unit (CPU) 901 and graphics processing unit (GPU) 902, the functions defined in the methods of this application are performed.
[0094] It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium, a computer-readable medium, or any combination thereof. A computer-readable medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, or any combination thereof. More specific examples of a computer-readable medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution device, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than a computer-readable medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution device, apparatus, or apparatus. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0095] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0096] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, 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 module, 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 dedicated hardware-based means to perform the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0097] The modules described in the embodiments of this application can be implemented in software or hardware. These modules can also be located within a processor.
[0098] In another aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist alone and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs. When the aforementioned one or more programs are executed by the electronic device, the electronic device causes the following actions: to acquire a spin echo pulse sequence; to process the spin echo pulse sequence to obtain a two-dimensional spectrum based on the spin echo phase change spectrum; to construct and train a SEcho-Net neural network to obtain a nuclear magnetic resonance (NMR) peak position detection model. The SEcho-Net neural network includes an encoding layer and a decoding layer. The encoding layer includes an indirect dimension downsampling module and a direct dimension downsampling module. The indirect dimension downsampling module is used to compress the two-dimensional spectrum based on the spin echo phase change spectrum to obtain a first feature vector. The first feature vector is input into the direct dimension downsampling module to extract key information related to the peak position, obtaining key features. The decoding layer includes a direct dimension upsampling module and a step-by-step dimension reduction module. The direct dimension upsampling module is used to recover spectral information from the key features, obtaining a second feature vector. The second feature vector is input into the step-by-step dimension reduction module for feature extraction, obtaining pure chemical shift position information of the peak; and the two-dimensional spectrum based on the spin echo phase change spectrum is input into the NMR peak position detection model, outputting pure chemical shift position information of the peak.
[0099] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A method for detecting the position of nuclear magnetic resonance (NMR) spectral peaks, characterized in that, Includes the following steps: A spin echo pulse sequence is acquired, and the spin echo pulse sequence is processed to obtain a two-dimensional spectrum based on the spin echo phase change spectrum, specifically including: The expression for the single-peak FID signal of NMR in each spin echo is derived using a spin echo pulse sequence: ; Where i is an imaginary number, A, f, T2, J, and pow represent amplitude, frequency, transverse relaxation time, J coupling intensity, and coupling spin number, respectively, and t1, t2, and t3 are the evolution times of chemical shift, transverse relaxation, and J coupling, respectively. The time range of t1 is 0 ~ (np-1) / SW, and the time ranges of t2 and t3 are 2τ ~ 2τ+(np-1) / SW, where SW is the spectral width and np is the number of sampling points of the FID signal. Multiple single-peak free induction attenuation signals are added together to obtain a multi-peak spin echo signal FID0. Several multi-peak spin echo signals FID0 are Fourier transformed into a spectrum of 4096 complex points with a fixed number of points. The real part of the spectrum is then taken, and normalized relative to the maximum value of all spectra. Finally, they are stitched together to form a 4098×8 two-dimensional spectrum based on the spin echo phase change spectrum. A SEcho-Net neural network is constructed and trained to obtain a nuclear magnetic resonance (NMR) spectral peak position detection model. The SEcho-Net neural network includes an encoding layer and a decoding layer. The encoding layer includes an indirect dimension downsampling module and a direct dimension downsampling module. The indirect dimension downsampling module is used to compress the two-dimensional spectrum based on the spin echo phase change spectrum to obtain a first feature vector. The first feature vector is input into the direct dimension downsampling module to extract key information related to the spectral peak position to obtain key features. The decoding layer includes a direct dimension upsampling module and a step-by-step dimension reduction module. The direct dimension upsampling module is used to recover spectral information from the key features to obtain a second feature vector. The second feature vector is input into the step-by-step dimension reduction module for feature extraction to obtain the pure chemical shift position information of the spectral peak. The two-dimensional spectrum based on spin echo phase change spectrum is input into the nuclear magnetic resonance peak position detection model, and the pure chemical shift position information of the peak is output.
2. The method for detecting the position of nuclear magnetic resonance spectral peaks according to claim 1, characterized in that, The indirect dimension downsampling module includes a first convolutional layer, a first batch normalization (BN) layer, a first sigmoid function layer, a first downsampling layer, and two first residual layers connected in sequence. The first residual layer includes two residual blocks and a first downsampling layer connected in sequence, and the first downsampling layer is a convolutional layer. The direct dimension downsampling module includes several second residual layers connected in sequence. The second residual layer includes two residual blocks and a second downsampling layer connected in sequence, and the second downsampling layer is a max pooling layer.
3. The method for detecting the position of nuclear magnetic resonance spectral peaks according to claim 1, characterized in that, The direct dimension upsampling module includes several third residual layers connected in sequence. Each third residual layer includes two residual blocks and a first upsampling layer connected in sequence. The first upsampling layer uses the nearest neighbor interpolation algorithm. The stepwise dimension reduction module includes several fourth residual layers connected in sequence. Each fourth residual layer includes two residual blocks, a Softmax activation function layer, and a second convolutional layer connected in sequence.
4. The method for detecting the position of nuclear magnetic resonance spectral peaks according to claim 2 or 3, characterized in that, The residual block comprises a third convolutional layer, a second batch normalization (BN) layer, a second sigmoid function layer, a fourth convolutional layer, a third BN layer, and a third sigmoid function layer connected in sequence. The input of the residual block is added to the output of the third sigmoid function layer to obtain the output of the residual block.
5. The method for detecting the position of nuclear magnetic resonance spectral peaks according to claim 1, characterized in that, The training data for the SEcho-Net neural network includes input data and its corresponding label data. The process for obtaining the input data is as follows: A spin echo pulse sequence is obtained, and the single-peak FID signal of each spin echo is derived from the spin echo pulse sequence. The free induction decay signals of multiple single peaks are added together to obtain a multi-peak spin echo signal FID0. Several multi-peak spin echo signals FID0 at the same position in the phase change spectrum of spin echoes at different evolution times are subjected to Fourier transform, relative maximum value normalization, and then inverse Fourier transform to obtain several FID1. Gaussian white noise of the same intensity is added to the real and imaginary parts of several FID1, and then Fourier transform and relative maximum value normalization are performed on them. Finally, they are spliced into two-dimensional data to obtain the input data. The tag data is a one-dimensional matrix generated by setting the position of the peak to 1 and the other positions to 0, which corresponds to the pure chemical shift position information of the spectral peak.
6. The method for detecting the position of nuclear magnetic resonance spectral peaks according to claim 1, characterized in that, The aforementioned multi-peak spin echo signals FID0 correspond to eight different evolution times of multi-peak spin echo signals FID0 with the same set of spectral peak parameters and 2τ settings.
7. A nuclear magnetic resonance (NMR) spectral peak position detection device, characterized in that, include: The data acquisition module is configured to acquire a spin echo pulse sequence, process the spin echo pulse sequence to obtain a two-dimensional spectrum based on the spin echo phase change spectrum, specifically including: The expression for the single-peak FID signal of NMR in each spin echo is derived using a spin echo pulse sequence: ; Where i is an imaginary number, A, f, T2, J, and pow represent amplitude, frequency, transverse relaxation time, J coupling intensity, and coupling spin number, respectively, and t1, t2, and t3 are the evolution times of chemical shift, transverse relaxation, and J coupling, respectively. The time range of t1 is 0 ~ (np-1) / SW, and the time ranges of t2 and t3 are 2τ ~ 2τ+(np-1) / SW, where SW is the spectral width and np is the number of sampling points of the FID signal. Multiple single-peak free induction attenuation signals are added together to obtain a multi-peak spin echo signal FID0. Several multi-peak spin echo signals FID0 are Fourier transformed into a spectrum of 4096 complex points with a fixed number of points. The real part of the spectrum is then taken, and normalized relative to the maximum value of all spectra. Finally, they are stitched together to form a 4098×8 two-dimensional spectrum based on the spin echo phase change spectrum. The model building module is configured to build and train a SEcho-Net neural network to obtain a nuclear magnetic resonance spectral peak position detection model. The SEcho-Net neural network includes an encoding layer and a decoding layer. The encoding layer includes an indirect dimension downsampling module and a direct dimension downsampling module. The indirect dimension downsampling module is used to compress the two-dimensional spectrum based on the spin echo phase change spectrum to obtain a first feature vector. The first feature vector is input into the direct dimension downsampling module to extract key information related to the spectral peak position to obtain key features. The decoding layer includes a direct dimension upsampling module and a step-by-step dimension reduction module. The direct dimension upsampling module is used to recover spectral information from the key features to obtain a second feature vector. The second feature vector is input into the step-by-step dimension reduction module for feature extraction to obtain pure chemical shift position information of the spectral peak. The execution module is configured to input the two-dimensional spectrum based on the spin echo phase change spectrum into the nuclear magnetic resonance peak position detection model and output pure chemical shift position information of the peak.
8. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.