Nuclear magnetic resonance spectrogram analysis method and system
By using Fourier transform and second-order derivative grouping techniques, combined with least squares fitting, the problem of manual dependence in nuclear magnetic resonance spectrum analysis has been solved, achieving high-precision automated analysis and improving the accuracy and speed of spectrum analysis.
Patent Information
- Application Number
- CN202511193383.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-12-16
AI Technical Summary
Current nuclear magnetic resonance spectrum analysis relies on human experience, and automated analysis is not very effective, especially in cases of low signal-to-noise ratio, severe overlapping signals, or non-standard spectra. There is a lack of effective quantitative evaluation methods, making it difficult to achieve high-precision automated analysis.
The frequency domain signal is obtained by Fourier transform, candidate peaks are detected by second derivative, abnormal peaks are filtered out by grouping adjacent peaks by distance, solvent and water peak positions are fitted by least squares method, phase correction is performed by Powell, L-BFGS algorithm or simplex method, and the entropy minimum region is optimized.
It improves the accuracy and efficiency of spectral analysis, reduces noise interference, ensures the accuracy of peak shape identification and calculation speed, and has strong adaptability.
Smart Images

Figure CN121141733A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of mass spectrometry analysis, and particularly relates to a nuclear magnetic resonance spectrum analysis method and system. BACKGROUND
[0002] Nuclear magnetic resonance (NMR) technology is a widely used structural analysis tool in the fields of organic chemistry, pharmaceutical chemistry and material science. By observing the behavior of nuclear spins in a magnetic field, NMR can provide key information such as molecular structure, configuration, conformation and intermolecular interaction. However, although modern NMR instruments have high sensitivity and high resolution, the analysis of NMR spectra still largely depends on human experience, especially in the aspects of phase correction, baseline correction, signal assignment and identification of the correspondence between the spectrum and the molecular structure. This not only consumes time and effort, but is also easily affected by human subjective factors, especially in high-throughput screening or complex system analysis.
[0003] Currently, some commercial software has automatic phase and baseline correction functions, but its performance is often not stable when dealing with low signal-to-noise ratio, severe overlapping signals or non-standard spectra, making it difficult to achieve truly high-precision automatic analysis. Moreover, the existing processing methods lack effective quantitative evaluation methods and intelligent analysis strategies, limiting their application potential in automatic structure analysis, database automatic annotation, high-throughput experiments and other scenarios. SUMMARY
[0004] In view of this, the present application provides a nuclear magnetic resonance spectrum analysis method and system.
[0005] The technical solution of the present application is as follows: The present application provides a nuclear magnetic resonance spectrum analysis method in the first aspect, comprising: obtaining an original FID signal of a solution to be detected, and performing Fourier transform on the original FID signal to obtain a corresponding frequency domain signal; After phase correction processing is performed on the frequency domain signal, the positions of a plurality of candidate peaks are determined from the frequency domain signal according to the second derivative of the frequency domain signal; the candidate peaks are grouped based on the distance parameters between adjacent candidate peaks to obtain a plurality of first candidate peak groups; For each first candidate peak group, if the difference between the maximum peak height and the minimum peak height of the candidate peaks is greater than a first preset threshold, part of the candidate peaks in the first candidate peak group are filtered out; for all the first candidate peak groups, if the difference between the maximum peak value of an abnormal candidate peak group and the maximum peak values of the first candidate peak groups on both sides is greater than a second preset threshold, the abnormal candidate peak group is filtered out to obtain a target candidate peak group; Parameter fitting is performed on the candidate peaks in the target candidate peak group by using a least square method, and a solvent peak position and a water peak position are determined according to a fitting result.
[0006] On the basis of the above technical solution, preferably, the phase correction processing on the frequency domain signal comprises: The zero-order phase parameter and the first-order phase parameter of the frequency domain signal are adjusted, non-convex optimization is performed in a plane corresponding to the zero-order phase parameter and the first-order phase parameter, and an entropy minimum value region is located. Powell, L-BFGS algorithm or simplex method is used to optimize the entropy minimum value region, and phase correction is completed.
[0007] On the basis of the above technical solution, preferably, the phase correction processing on the frequency domain signal comprises: The negative peak intensity of the frequency domain signal is minimized, and gradient descent method or simplex method is used for non-linear optimization, and phase correction is completed in combination with threshold processing.
[0008] On the basis of the above technical solution, preferably, the phase correction processing on the frequency domain signal comprises: Entropy minimization and baseline smoothness are used for phase correction processing on the frequency domain signal, ACME algorithm is used to optimize the phase parameter in the case of fixing the baseline parameter, least square method fitting is used to optimize the baseline parameter in the case of fixing the phase parameter, and phase correction is completed through iteration to convergence.
[0009] On the basis of the above technical solution, preferably, the position of a plurality of candidate peaks is determined from the frequency domain signal according to a second derivative of the frequency domain signal, comprising: The second derivative of the frequency domain signal is obtained by performing second-order difference processing on the frequency domain signal. The zero-crossing point of the second derivative is detected, the zero-crossing point of the second derivative is determined, and whether the frequency domain signal is a local maximum value in a preset range to which the zero-crossing point belongs is checked, if yes, the position corresponding to the zero-crossing point is determined as the position of the candidate peak.
[0010] On the basis of the above technical solution, preferably, the candidate peaks are grouped based on the distance parameter between adjacent candidate peaks to obtain a plurality of first candidate peak groups, comprising: If the distance parameter between adjacent candidate peaks is less than a third preset threshold, the two candidate peaks are divided into the same first candidate peak group, and if the distance parameter between adjacent candidate peaks is not less than the third preset threshold, the two candidate peaks are divided into different first candidate peak groups.
[0011] On the basis of the above technical solutions, preferably, the least square method is used to perform parameter fitting on the candidate peaks in the target candidate peak group, and positions of a solvent peak and a water peak are determined according to a fitting result, and the parameter fitting comprises: The least square method is used to perform Gaussian function fitting or Lorentz function fitting on the candidate peaks in the target candidate peak group, and a fitting result is obtained; the fitting result comprises a candidate peak height, a candidate peak width, a candidate peak full width at half maximum and a candidate peak position; Positions of a solvent peak and a water peak are determined according to the fitting result and a preset dose table; the preset dose table comprises positions of a water peak under different solvents.
[0012] Further preferably, the second aspect of the present application provides a nuclear magnetic resonance spectrum analysis system, comprising: a signal acquisition module, a position determination module, a signal filtering module and a parameter fitting module; wherein, The signal acquisition module is configured to acquire an original FID signal of a solution to be detected, and perform Fourier transform on the original FID signal to obtain a corresponding frequency domain signal; The position determination module is configured to determine positions of a plurality of candidate peaks from the frequency domain signal according to a second derivative of the frequency domain signal after phase correction processing of the frequency domain signal; and perform grouping processing on the candidate peaks based on a distance parameter between adjacent candidate peaks to obtain a plurality of first candidate peak groups. The signal filtering module is configured to, for each first candidate peak group, if a difference between a maximum peak height and a minimum peak height of the candidate peaks is greater than a first preset threshold, filter part of the candidate peaks in the first candidate peak group; and for all the first candidate peak groups, if a difference between a maximum peak value of an abnormal candidate peak group and maximum peak values of first candidate peak groups on both sides is greater than a second preset threshold, filter the abnormal candidate peak group to obtain a target candidate peak group. The parameter fitting module is configured to use the least square method to perform parameter fitting on the candidate peaks in the target candidate peak group, and determine positions of a solvent peak and a water peak according to a fitting result.
[0013] Further preferably, the third aspect of the present application provides an electronic device comprising a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the nuclear magnetic resonance spectrum analysis method of the first aspect.
[0014] Further preferably, the fourth aspect of the present application provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the nuclear magnetic resonance spectrum analysis method of the first aspect.
[0015] The nuclear magnetic resonance spectrum analysis method and system have the following beneficial effects relative to the prior art: 1. The second derivative zero-crossing point of the frequency domain signal is used to detect candidate peaks, and a negative second derivative threshold is used for screening, so as to accurately locate the vertex position of the candidate peak. On this basis, the distance parameter between adjacent candidate peaks is used for grouping, so as to effectively distinguish the real peak cluster from noise or pseudo-peak, and avoid misjudgment of isolated noise points as effective peaks. By comparing the maximum / minimum peak value height difference of the candidate peaks in the group, the candidate peaks with abnormal amplitude in the group are filtered out, and inter-group screening is performed, so as to identify and filter out abnormal candidate peak groups, greatly reduce the noise points of the spectrum, and ensure the overall analysis accuracy.
[0016] 2. The phase correction after Fourier transform eliminates the phase distortion in the spectrum signal, avoids the peak shape distortion caused by phase distortion, such as peak splitting and position deviation, so as to provide a more real frequency domain signal basis for subsequent second derivative peak detection, and reduce the false detection and missed detection caused by noise or baseline drift in the traditional threshold method.
[0017] 3. The real peak cluster is distinguished from noise and pseudo-peak by spatial correlation, the overlapping peaks are grouped into the same group by distance grouping, the peak splitting or loss caused by algorithm misjudgment is avoided, the peak shape is decomposed by subsequent multi-peak fitting, the final positioning accuracy is improved, and after grouping, the number of peaks in each group is reduced, the fitting parameter space dimension is reduced, the global optimal solution can be converged faster, and the accuracy, adaptability and calculation efficiency of the algorithm in complex spectrum analysis are significantly improved. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of these drawings.
[0019] Figure 1 A flowchart of a nuclear magnetic resonance spectrum analysis method provided by an embodiment of the present application is shown in the figure. Figure 2 A structural diagram of a nuclear magnetic resonance spectrum analysis system provided by an embodiment of the present application is shown in the figure. Figure 3 A structural diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0021] In some embodiments, as shown in Figure 1 Figure 1 A flowchart of a nuclear magnetic resonance spectrum analysis method provided by an embodiment of the present application; the nuclear magnetic resonance spectrum analysis method provided by the present application comprises: S110, obtaining an original FID signal of a solution to be detected, and performing Fourier transform on the original FID signal to obtain a corresponding frequency domain signal.
[0022] Here, the compressed package of the original file of the nuclear magnetic spectrum provided for the user to test is decompressed, the data type of the compressed package is judged, that is, the instrument manufacturer of the measured data is judged. According to the judgment result, different algorithms are selected to analyze the original file, that is, the original FID signal can be obtained. The original FID signal is a time domain signal superimposed by multiple different frequency oscillations. The original FID signal is decomposed into different frequency components by performing Fourier transform on the original FID signal, and a frequency domain signal is obtained. In the frequency domain signal, each peak corresponds to a nuclear spin in a chemical environment, and the peak area is proportional to the number of nuclear spins.
[0023] In some embodiments, S110, the phase correction processing of the frequency domain signal comprises: Adjusting the zero-order phase parameter and the first-order phase parameter of the frequency domain signal, performing non-convex optimization in the plane corresponding to the zero-order phase parameter and the first-order phase parameter, and locating the entropy minimum value region; Optimizing the entropy minimum value region by using the Powell, L-BFGS algorithm or simplex method to complete the phase correction.
[0024] In the present embodiment, the zero-order phase parameter represents a global phase offset, and the first-order phase parameter represents a linear phase slope, which can be caused by magnetic field inhomogeneity or frequency domain displacement. The spectrum entropy is taken as the optimization target, and the zero-order phase parameter and the first-order phase parameter of the frequency domain signal are adjusted, so that the corrected spectrum entropy is minimized. Among them, the Powell method does not need gradient, and is suitable for nonlinear problems through conjugate direction search. L-BFGS, that is, quasi-Newton method, needs gradient, and the convergence speed is relatively faster.
[0025] In some embodiments, S110, the phase correction processing of the frequency domain signal comprises: The negative peak intensity of the frequency domain signal is minimized, and a gradient descent method or a simplex method is used for nonlinear optimization, combined with threshold processing, to complete phase correction.
[0026] The frequency domain signal can have phase errors due to instrument response, magnetic field inhomogeneity, etc., resulting in asymmetric spectral peaks or negative peaks. The sum of the absolute values of the negative part of the imaginary part of the spectrum reflects the degree of phase distortion. By minimizing the negative peak intensity in the spectrum, the spectral peaks are symmetrical and all real positive signals, which can effectively eliminate noise in the spectral signal. Depending on the application scenario, the optimization algorithm can be selected, such as the gradient descent method when the objective function is smooth and the gradient is computable. The simplex method is suitable for problems where the gradient of the objective function is difficult to calculate or is non-smooth.
[0027] In some embodiments, S110, the phase correction processing of the frequency domain signal includes: The phase correction processing of the frequency domain signal is performed using entropy minimization and baseline smoothness. In the case of fixed baseline parameters, the ACME algorithm is used to optimize the phase parameters. In the case of fixed phase parameters, the least squares method is used to fit and optimize the baseline parameters, and the iteration is converged to complete the phase correction.
[0028] In this embodiment, the phase and baseline are alternately optimized until the phase and baseline parameters converge. It should be noted that the baseline correction method can also include polynomial fitting method, sliding window method, asymmetric least squares method, etc., which can be selected according to actual needs, and is not limited here.
[0029] S120, after the phase correction processing of the frequency domain signal, the positions of a plurality of candidate peaks are determined from the frequency domain signal according to the second derivative of the frequency domain signal; the candidate peaks are grouped based on the distance parameters between adjacent candidate peaks to obtain a plurality of first candidate peak groups.
[0030] At the spectral peak, the first derivative changes from positive to negative, and the second derivative is negative; at the spectral valley, the first derivative changes from negative to positive, and the second derivative is positive, so the minimum point of the second derivative corresponds to the maximum point of the spectrum. The frequency interval between adjacent candidate peaks is calculated, and a distance threshold is set to group peaks with a distance less than the threshold.
[0031] In some embodiments, the positions of a plurality of candidate peaks are determined from the frequency domain signal according to the second derivative of the frequency domain signal, including: The second derivative of the frequency domain signal is obtained by performing second-order difference processing on the frequency domain signal; The zero-crossing points of the second derivative are detected, and it is checked whether the frequency domain signal is a local maximum value in a preset range of the zero-crossing point. If so, the position corresponding to the zero-crossing point is determined as the position of the candidate peak.
[0032] The second derivative of the frequency domain signal describes the curvature variation thereof, and can be calculated by a discrete difference approximation. The second difference is sensitive to high-frequency noise, but false extreme values caused by noise can be filtered out through subsequent zero-crossing point detection and local maximum verification. A zero-crossing point is a point where the second derivative changes from positive to negative or from negative to positive, and the position of the zero-crossing point can be accurately calculated by linear interpolation. In combination with local maximum verification, false zero-crossing points caused by noise can be excluded, and the effectiveness of the frequency spectrum signal is improved.
[0033] In some embodiments, the candidate peaks are grouped based on a distance parameter between adjacent candidate peaks, to obtain a plurality of first candidate peak groups, including: If the distance parameter between adjacent candidate peaks is less than a third preset threshold, the two candidate peaks are divided into the same first candidate peak group; if the distance parameter between adjacent candidate peaks is not less than the third preset threshold, the two candidate peaks are respectively divided into different first candidate peak groups.
[0034] In this embodiment, a distance threshold is preset according to signal characteristics, for judging whether adjacent peaks belong to the same group. If the distance between the positions of two peaks is close, less than the third preset threshold, the two peaks are considered as peaks in the same group, otherwise, if the distance between the positions of two peaks is far, not less than the third preset threshold, the two peaks are considered as peaks in two independent groups.
[0035] S130, for each first candidate peak group, if the difference between the maximum peak height and the minimum peak height of the candidate peaks is greater than a first preset threshold, part of the candidate peaks in the first candidate peak group are filtered out; for all the first candidate peak groups, if the difference between the maximum peak value of an abnormal candidate peak group and the maximum peak values of the first candidate peak groups on both sides is greater than a second preset threshold, the abnormal candidate peak group is filtered out, to obtain a target candidate peak group.
[0036] The candidate peaks in the same first candidate peak group usually correspond to the same signal component. The abnormal peak can be a high-amplitude peak generated by high-frequency noise, multi-signal aliasing, and false peaks introduced by second derivative detection or local maximum verification. For each first candidate peak group, the range of the peak height set is calculated. If the difference between the peak heights in the group is too large, it is considered that there is an abnormal peak. The peaks in the group are arranged in descending order of amplitude, and the k smallest amplitude peaks are removed. Here, k can be determined by a threshold or a proportion, until the range of the remaining peaks is not greater than a first preset threshold. Alternatively, a curve is fitted to the frequency-amplitude relationship of the peaks in the group, such as a linear decrease or an exponential decay, and peaks deviating from the fitted curve by more than a threshold are removed. Different first candidate peak groups usually correspond to different signal components. The abnormal group can be residual noise or signal mutation. For all first candidate peak groups, the maximum peak value of each group is extracted to form a sequence. The sequence is traversed, and for each group, the difference between the maximum peak value and the maximum peak values of the adjacent groups is checked. If the difference between the maximum peak value of the abnormal candidate peak group and the maximum peak values of the first candidate peak groups on both sides is greater than a second preset threshold, it is considered that there is an abnormal candidate peak group. Through the filtering of the difference between the peak heights in the group and the global peak value difference between the groups, the abnormal components in the frequency domain candidate peaks can be effectively removed, and the signal peaks conforming to the physical law are retained to provide a high-quality candidate peak set for subsequent signal component analysis.
[0037] In S140, the candidate peaks in the target candidate peak group are fitted by using the least square method, and the solvent peak position and the water peak position are determined according to the fitting result.
[0038] The solvent peak usually has a symmetric Gaussian or Lorentz line shape and a narrow width, and the water peak can have a multi-peak structure due to quadrupole splitting or coupling, or be broadened due to relaxation effect. The line shape parameters of each candidate peak are fitted, and the characteristics such as frequency, line width, and amplitude can be used to effectively distinguish the solvent peak and the water peak.
[0039] In some embodiments, in S140, the candidate peaks in the target candidate peak group are fitted by using the least square method, and the solvent peak position and the water peak position are determined according to the fitting result, including: The candidate peaks in the target candidate peak group are fitted by using the least square method to obtain a Gaussian function or a Lorentz function, and a fitting result is obtained. The fitting result includes the candidate peak height, the candidate peak width, the candidate peak full width at half maximum, and the candidate peak position. The solvent peak position and the water peak position are determined according to the fitting result and a preset dose table. The preset dose table includes the positions of the water peak under different solvents.
[0040] In this embodiment, the candidate peaks are fitted by using Gaussian or Lorentz, and the peak height, position, FWHM, and other parameters are extracted. The solvent peak and the water peak are distinguished by frequency matching and line width verification. The water peak is determined first, and the repeated matching of the solvent peak is excluded.
[0041] The expression formula of the Gaussian function is: ; wherein, is the peak height, is the center position of the peak, is the full width at half maximum, is the frequency.
[0042] The expression formula of the Lorentz function is: ; In an example, taking the SMILES of molecule 1 as an example: OC(=O)c1cc(Cl)cc(Cl)c1Cl; after preprocessing of the molecule and peak identification, the following peak list 1 is obtained: Table 1 Wherein, the first row of Table 1 is respectively X axis, component ID, X axis line width, volume, millionth, flag bit, type, center position and peak height.
[0043] The prediction result of the molecule is Table 2: Table 2 The first row of Table 2 is respectively element identifier, element serial number, chemical shift and variance.
[0044] In some embodiments, referring to Figure 2 , Figure 2 is a structural schematic diagram of a nuclear magnetic resonance spectrum analysis system provided by an embodiment of the application. The application provides a nuclear magnetic resonance spectrum analysis system 200, comprising: a signal acquisition module 210, a position determination module 220, a signal filtering module 230 and a parameter fitting module 240; wherein, The signal acquisition module 210 is configured to acquire the original FID signal of the solution to be detected, and perform Fourier transform on the original FID signal to obtain the corresponding frequency domain signal; The position determination module 220 is configured to determine the positions of a plurality of candidate peaks from the frequency domain signal after phase correction processing of the frequency domain signal according to the second derivative of the frequency domain signal; and group the candidate peaks based on the distance parameters between adjacent candidate peaks to obtain a plurality of first candidate peak groups. The signal filtering module 230 is configured to, for each first candidate peak group, filter part of the candidate peaks in the first candidate peak group if the difference between the maximum peak height and the minimum peak height of the candidate peaks is greater than a first preset threshold; and for all the first candidate peak groups, filter an abnormal candidate peak group if the difference between the maximum peak value of the abnormal candidate peak group and the maximum peak values of the first candidate peak groups on both sides is greater than a second preset threshold, to obtain a target candidate peak group. The parameter fitting module 240 is configured to perform parameter fitting on the candidate peaks in the target candidate peak group by using a least square method, and determine the solvent peak position and the water peak position according to the fitting result.
[0045] In some embodiments, the nuclear magnetic resonance spectrum analysis system 200 further comprises a phase correction module, which is specifically configured to: adjust the zero-order phase parameter and the first-order phase parameter of the frequency domain signal, perform non-convex optimization in the plane corresponding to the zero-order phase parameter and the first-order phase parameter, and locate the entropy minimum value region; perform optimization on the entropy minimum value region by using a Powell, L-BFGS algorithm or simplex method, and complete phase correction.
[0046] In some embodiments, the phase correction module is specifically configured to: perform minimum processing on the negative peak intensity of the frequency domain signal, and perform non-linear optimization by using a gradient descent method or simplex method, and complete phase correction in combination with threshold processing.
[0047] In some embodiments, the phase correction module is specifically configured to: perform phase correction processing on the frequency domain signal by using entropy minimization and baseline smoothness, optimize the phase parameter by using an ACME algorithm in the case of fixing the baseline parameter, optimize the baseline parameter by using a least square method in the case of fixing the phase parameter, and iterate to convergence to complete phase correction.
[0048] In some embodiments, the position determination module 220 is specifically configured to: perform second-order difference processing on the frequency domain signal to obtain the second-order derivative of the frequency domain signal; perform zero-crossing point detection on the second-order derivative to determine the zero-crossing point of the second-order derivative, and check whether the frequency domain signal is a local maximum value in a preset range to which the zero-crossing point belongs, and if so, determine the position corresponding to the zero-crossing point as the position of the candidate peak.
[0049] In some embodiments, the position determination module 220 is specifically configured to: If the distance parameter between adjacent candidate peaks is less than a third preset threshold, the two candidate peaks are divided into a same first candidate peak group; if the distance parameter between adjacent candidate peaks is not less than the third preset threshold, the two candidate peaks are respectively divided into different first candidate peak groups.
[0050] In some embodiments, the parameter fitting module 240 is specifically configured to: perform Gaussian function fitting or Lorentz function fitting on the candidate peaks in the target candidate peak group by using the least square method, to obtain a fitting result; the fitting result includes a candidate peak height, a candidate peak width, a candidate peak full width at half maximum, and a candidate peak position; determine a solvent peak position and a water peak position according to the fitting result and a preset dose table; the preset dose table includes positions of the water peak under different solvents.
[0051] It should be noted that the nuclear magnetic resonance spectrum analysis system provided by the embodiments of the present application and the nuclear magnetic resonance spectrum analysis method provided by the embodiments of the present application are based on the same application concept, and therefore the specific implementation of this embodiment can be referred to the implementation of the aforementioned nuclear magnetic resonance spectrum analysis method, and the repeated parts will not be described herein.
[0052] In some embodiments, please refer to Figure 3 , Figure 3 A structural schematic diagram of an electronic device is provided for the embodiments of the present application. The electronic device 300 provided by the embodiments of the present application includes a processor 310 and a memory 320; the memory 320 stores a computer program, wherein the computer program is executed by the processor to implement the nuclear magnetic resonance spectrum analysis method described above.
[0053] Specifically, the processor 310 may, for example, include a general-purpose microprocessor, an instruction set processor, and / or a related chipset, and / or a special-purpose microprocessor (such as an application-specific integrated circuit (ASIC)), etc. The processor 310 can also include an on-board memory for cache use. The processor 310 can be a single processing unit or a plurality of processing units for performing different actions of the method process according to the embodiments of the present application.
[0054] The memory 320 may, for example, be any medium capable of containing, storing, communicating, propagating or transmitting instructions. For example, the memory 320 may, for example, include but is not limited to electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices, devices or propagation media. Specific examples of the memory 320 include magnetic storage devices such as magnetic tapes or hard disk drives (HDD); optical storage devices such as compact discs (CD-ROM); and also random access memory (RAM) or flash memory; and / or wired / wireless communication links.
[0055] The application further provides a computer readable medium, which stores a computer program, and the computer program is executed by a processor to implement the above-mentioned nuclear magnetic resonance spectrum analysis method. The computer readable medium can be included in the device / apparatus / system described in the above-mentioned embodiments, or can exist separately and not be assembled into the device / apparatus / system. The computer readable medium carries one or more programs, and the one or more programs are executed to implement the method according to the embodiments of the application.
[0056] According to the embodiments of the application, the computer readable medium can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus or device. In this application, the computer readable signal medium can include a data signal that propagates in a baseband or as a carrier wave in a propagated data signal, which carries computer readable program code. Such a propagated data signal can take many forms, including but not limited to, an electromagnetic signal, an optical signal or any suitable combination of the above. The computer readable signal medium can also be any computer readable medium that can send, propagate or transfer a program for use by or in connection with an instruction execution system, apparatus or device. The program code contained on the computer readable medium can be transmitted in any suitable medium, including but not limited to, wireless, wired, optical, radio frequency (RF), or any suitable combination of the above.
[0057] It will be appreciated by those skilled in the art that features of the various embodiments and / or claims of the present application can be combined and / or interchanged, even though such combinations and / or interchanges are not expressly disclosed in the present application. In particular, the features of the various embodiments and / or claims of the present application can be combined and / or interchanged, even though such combinations and / or interchanges are not expressly disclosed in the present application. All of these combinations and / or interchanges are within the scope of the present application. Accordingly, the scope of the present application should not be limited to the above-described embodiments, but should be determined by the appended claims and their equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the present application.
Claims
1. A method for nuclear magnetic resonance (NMR) spectral analysis, characterized in that, include: The original FID signal of the solution to be tested is acquired, and the original FID signal is subjected to Fourier transform to obtain the corresponding frequency domain signal; After performing phase correction processing on the frequency domain signal, the positions of multiple candidate peaks are determined from the frequency domain signal based on the second derivative of the frequency domain signal; the candidate peaks are grouped based on the distance parameter between adjacent candidate peaks to obtain multiple first candidate peak groups; For each first candidate peak group, if the difference between the maximum peak height and the minimum peak height of the candidate peak is greater than a first preset threshold, then some candidate peaks in the first candidate peak group are filtered out; for all first candidate peak groups, if the difference between the maximum peak of an abnormal candidate peak group and the maximum peak of the first candidate peak groups on both sides is greater than a second preset threshold, then the abnormal candidate peak group is filtered out to obtain the target candidate peak group. The parameters of the candidate peaks in the target candidate peak group are fitted using the least squares method, and the positions of the solvent peak and the water peak are determined based on the fitting results.
2. The nuclear magnetic resonance spectroscopy analysis method as described in claim 1, characterized in that, The phase correction processing of the frequency domain signal includes: The zero-order phase parameter and the first-order phase parameter of the frequency domain signal are adjusted, and non-convex optimization is performed in the plane corresponding to the zero-order phase parameter and the first-order phase parameter to locate the entropy minimum region. The entropy minima region is optimized using Powell, L-BFGS, or the simplex method to complete phase correction.
3. The nuclear magnetic resonance spectrum analysis method according to claim 1, characterized in that, The phase correction processing of the frequency domain signal includes: The negative peak intensity of the frequency domain signal is minimized, and nonlinear optimization is performed using gradient descent or simplex method, combined with threshold processing, to complete phase correction.
4. The nuclear magnetic resonance spectral analysis method as described in claim 1, characterized in that, The phase correction processing of the frequency domain signal includes: Phase correction is performed on the frequency domain signal using entropy minimization and baseline smoothness. With fixed baseline parameters, the phase parameters are optimized using the ACME algorithm. With fixed phase parameters, the baseline parameters are optimized by fitting using the least squares method. The process is iterated until convergence to complete the phase correction.
5. The nuclear magnetic resonance spectrum analysis method as described in claim 1, characterized in that, The step of determining the positions of multiple candidate peaks from the frequency domain signal based on the second derivative of the frequency domain signal includes: The frequency domain signal is subjected to second-order difference processing to obtain the second derivative of the frequency domain signal; Zero-crossing point detection is performed on the second derivative to determine the zero-crossing point of the second derivative. Then, within a preset range to which the zero-crossing point belongs, it is checked whether the frequency domain signal is a local maximum. If so, the position corresponding to the zero-crossing point is determined as the position of the candidate peak.
6. The nuclear magnetic resonance spectrum analysis method as described in claim 1, characterized in that, The candidate peaks are grouped based on the distance parameter between adjacent candidate peaks to obtain multiple first candidate peak groups, including: If the distance parameter between adjacent candidate peaks is less than a third preset threshold, the two candidate peaks are assigned to the same first candidate peak group; if the distance parameter between adjacent candidate peaks is not less than the third preset threshold, they are assigned to different first candidate peak groups.
7. The nuclear magnetic resonance spectrum analysis method as described in claim 1, characterized in that, The step of fitting parameters to the candidate peaks in the target candidate peak group using the least squares method, and determining the solvent peak position and water peak position based on the fitting result, includes: The candidate peaks in the target candidate peak group are fitted with Gaussian function or Lorentz function using the least squares method to obtain the fitting results; the fitting results include candidate peak height, candidate peak width, candidate peak full width at half maximum (FWHM), and candidate peak position. The solvent peak position and water peak position are determined based on the fitting results and the preset dosing table; the preset dosing table includes the position of the water peak in different solvents.
8. A nuclear magnetic resonance spectroscopy analysis system, characterized in that, include: The system includes a signal acquisition module, a location determination module, a signal filtering module, and a parameter fitting module; among which, The signal acquisition module is configured to acquire the original FID signal of the solution to be tested, and perform a Fourier transform on the original FID signal to obtain the corresponding frequency domain signal. The position determination module is configured to perform phase correction processing on the frequency domain signal, determine the positions of multiple candidate peaks from the frequency domain signal based on the second derivative of the frequency domain signal, and group the candidate peaks based on the distance parameter between adjacent candidate peaks to obtain multiple first candidate peak groups. The signal filtering module is configured to, for each first candidate peak group, if the difference between the maximum peak height and the minimum peak height of the candidate peak is greater than a first preset threshold, filter out some candidate peaks in the first candidate peak group; for all first candidate peak groups, if the difference between the maximum peak value of an abnormal candidate peak group and the maximum peak value of the first candidate peak groups on both sides is greater than a second preset threshold, filter out the abnormal candidate peak group to obtain the target candidate peak group. The parameter fitting module is configured to use the least squares method to fit the parameters of the candidate peaks in the target candidate peak group, and determine the positions of the solvent peak and the water peak based on the fitting results.
9. An electronic device comprising a processor and a memory; said memory having a storage for a computer program, wherein, When the computer program is executed by the processor, it implements the nuclear magnetic resonance spectrum analysis method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that, It stores a computer program, wherein the computer program, when executed by a processor, implements the nuclear magnetic resonance spectral analysis method as described in any one of claims 1 to 7.
Citation Information
Cited By
Peak signal fitting method, device, equipment and medium
CN121723154A
