Method and device for detecting solvent in edible vegetable oil, terminal equipment and medium
Through low-field NMR analyzer and data processing technology, a quantitative detection model for solvent residues in edible vegetable oil was constructed, which solved the problem of difficult to quickly and accurately detect solvent residues in edible vegetable oil in the existing technology, and achieved the need for online testing of factories. Ensure food safety.
Patent Information
- Application Number
- CN202411484617.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is difficult to detect solvents remaining in edible vegetable oils quickly, accurately and in real time, especially in factory production, which makes solvent residue problems difficult to monitor and affect consumer health.
The edible vegetable oil samples were measured using a low-field nuclear magnetic resonance analyzer. By processing the echo attenuation curve data, lateral relaxation curve data and relaxation characteristic index data, a quantitative detection model was constructed to achieve accurate detection of solvent residues.
It realizes rapid, accurate and real-time detection of solvent residues in edible vegetable oil, is suitable for online testing of factories, has good detection accuracy, and reduces the risk of solvent residues to consumers' health.
Smart Images

Figure CN119470530A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of food analysis, and in particular to a method, a device, a terminal device and a medium for detecting a solvent in edible vegetable oil. Background Art
[0002] Edible vegetable oils are mainly produced by pressing, leaching and pre-pressing leaching. Compared with pressing, leaching and pre-pressing leaching produce vegetable oils with high oil yield, less residual oil in cakes and dregs, good cake and dregs quality, and high economic benefits, and are favored by domestic and foreign oil production companies.
[0003] The leaching solvent commonly used in the current domestic oil and fat processing industry is solvent No. 6 (the main component is n-hexane). In recent years, edible vegetable oils circulating on the market have repeatedly been exposed to excessive solvent residues. Among them, soybean oil, peanut oil, rapeseed oil and other common edible oils in life are facing the problem of solvent residues. If the residual solvent content of edible vegetable oil is too high, long-term contact will damage the central nervous system of the human body, cause imbalance of lipids in nerve cells, and cause harm to the health of consumers. Therefore, how to detect the residual solvent content in edible vegetable oil is of great practical significance to ensure the legitimate rights and interests and health of consumers.
[0004] At present, the detection methods of residual solvents in edible oil mainly include gas chromatography and spectroscopy. Gas chromatography is to put the vegetable oil sample into a sealed gasification bottle, and at a certain temperature, when the residual solvent is vaporized to reach equilibrium, take the gas above the liquid, and measure it with a gas chromatograph with a hydrogen flame ionization detector. The content of residual solvents in edible vegetable oil is obtained by drawing a standard curve. The method of gas chromatography for detecting residual solvents in edible oil has the characteristics of accurate results, but it also has the problems of cumbersome steps, long measurement cycle, and is not suitable for factory production and focuses on qualitative results. In addition, the use of spectroscopy for residual solvent detection has the advantages of being fast and simple, but it is still unable to achieve on-site detection due to factors such as the color of the oil sample and the external environment.
[0005] Therefore, there is an urgent need to develop a method for rapid, accurate and real-time detection of residual solvents in edible vegetable oils to facilitate real-time monitoring and large-scale testing in factories, thereby ensuring the quality and safety of edible vegetable oils and their products. Summary of the invention
[0006] In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a method for detecting solvents in edible vegetable oils. The method is simple, fast, and low-cost. It is suitable for real-time detection of solvent residues in factories, and also supports on-site applications of large-scale detection, while having good detection accuracy.
[0007] The present invention also aims to provide a detection device, terminal equipment and medium for detecting solvents in edible vegetable oils, which are suitable for on-site applications of real-time detection of residual solvents in factories.
[0008] In a first aspect, the present invention provides a method for detecting a solvent in an edible vegetable oil, comprising the following steps:
[0009] The edible vegetable oil samples were measured by low-field nuclear magnetic resonance analyzer to obtain the measurement results;
[0010] Processing the measurement results to obtain parameter data; the parameter data is one of echo attenuation curve data, transverse relaxation curve data, and relaxation characteristic index data;
[0011] Based on the parameter data, a quantitative detection model for solvents in edible vegetable oils is constructed;
[0012] The quantitative detection model is used to perform quantitative detection of the residual solvent in the edible vegetable oil to be tested.
[0013] In a preferred embodiment of the present invention, when the edible vegetable oil sample is measured by a low-field nuclear magnetic resonance analyzer, the measurement conditions of the edible vegetable oil sample include sample volume and measurement temperature; the sample volume is 3 to 5 mL; and the measurement temperature is 35 to 45°C.
[0014] In a preferred embodiment of the present invention, the relaxation characteristic index data include relaxation time, peak area and overall transverse relaxation characteristics.
[0015] In a preferred embodiment of the present invention, the process of acquiring the parameter data is as follows:
[0016] Performing outlier processing on the measurement result to obtain the echo attenuation curve data;
[0017] Performing inversion fitting processing on the echo attenuation curve data to obtain the transverse relaxation curve data;
[0018] Feature extraction is performed on the transverse relaxation curve data to obtain the relaxation time corresponding to each peak maximum and the peak area of each peak; based on the weight of each relaxation time, all relaxation times are calculated and processed to obtain the overall transverse relaxation feature.
[0019] In a preferred embodiment of the present invention, a quantitative detection model for solvents in edible vegetable oils is constructed based on the parameter data, comprising the following steps:
[0020] (1) According to the Kennard-Stone algorithm, the parameter data of edible vegetable oil samples were divided into a training set and a validation set;
[0021] (2) Based on a set algorithm, the training set and the validation set are processed to obtain the quantitative detection model; the set algorithm is one of partial least squares method, principal component regression, and support vector machine regression.
[0022] The present invention has been verified through experiments and found that using partial least squares as the setting algorithm can effectively improve the detection accuracy of the residual solvent content. Therefore, in a preferred embodiment of the present invention, the partial least squares method is used as the setting algorithm to process the training set and the verification set to obtain the quantitative detection model, which specifically includes the following steps:
[0023] (1) respectively decomposing and calculating the covariance matrix of the training set and the covariance matrix of the solvent content in the edible vegetable oil sample to obtain respective score matrices;
[0024] (2) determining the number of principal components according to the cumulative contribution rate of all score matrices; and updating the covariance matrix of the training set and the covariance matrix of the solvent content according to the number of principal components;
[0025] (3) constructing an initial model according to the updated score matrix of the training set and the covariance matrix of the solvent content;
[0026] (4) performing decomposition calculation on the validation set to obtain a score matrix of the validation set, and inputting the score matrix of the validation set into the initial model to calculate the residual sum of squares between the predicted solvent value output by the initial model and the true solvent value of the validation set;
[0027] When the residual square sum is less than or equal to a set value, the initial model is used as the quantitative detection model;
[0028] When the residual sum of squares is greater than a set value, steps (2)-(4) are iterated until the residual sum of squares is less than or equal to the set value, and the updated model corresponding to the residual sum of squares being less than or equal to the set value is used as the quantitative detection model.
[0029] In a preferred embodiment of the present invention, when a low-field nuclear magnetic analyzer is used for detection, the measurement results are obtained by collecting the CPMG pulse sequence; the parameter setting conditions of the CPMG pulse sequence include: sampling frequency 200kHz; repeated sampling times 8 times; cycle delay 2s; gain value 50dB; half echo time 0.5ms; 12000 sampling points, and magnet temperature 40°C.
[0030] In a second aspect, the present invention provides a detection device for solvents in edible vegetable oils, comprising a sample determination module, a data analysis module, a model building module and a quantitative detection module;
[0031] The sample determination module is used to determine the edible vegetable oil sample using a low-field nuclear magnetic resonance analyzer to obtain a determination result;
[0032] The data analysis module is used to process the measurement results to obtain parameter data; the parameter data is one of echo attenuation curve data, transverse relaxation curve data, and relaxation characteristic index data;
[0033] The model building module is used to build a quantitative detection model for solvents in edible vegetable oils based on the parameter data;
[0034] The quantitative detection module is used to perform quantitative detection on the residual solvent in the edible vegetable oil to be tested using the quantitative detection model.
[0035] In a third aspect, the present invention provides a terminal device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the above-mentioned method for detecting solvents in edible vegetable oils or the above-mentioned device for detecting solvents in edible vegetable oils.
[0036] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed on a processor, implements the above-mentioned method for detecting solvents in edible vegetable oils or the above-mentioned device for detecting solvents in edible vegetable oils.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] The present invention provides a detection method, device, terminal equipment and medium for solvents in edible vegetable oils. Wherein, the detection method for solvents in edible vegetable oils provided by the present invention first uses a low-field nuclear magnetic resonance analyzer to distinguish the content of solvents (normal hexane) in edible vegetable oils and edible vegetable oils, and then processes the measurement results obtained by using the low-field nuclear magnetic resonance analyzer to obtain different parameter data (echo attenuation curve data, transverse relaxation curve data, relaxation characteristic index data), and then models are performed based on different parameter data, and according to the quantitative detection model, the residual content of solvents in edible vegetable oils is accurately detected. The above-mentioned detection method provided by the present invention is simple in method, fast in detection, low in cost, easy to realize online analysis, convenient for on-site preliminary screening of samples, and detection of solvent residues has good detection accuracy, is very suitable for factory online detection of solvent residues in edible vegetable oils, and has a wide range of application prospects in the detection field of edible vegetable oil solvent residues. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. The following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For those skilled in the art, other relevant drawings can be obtained based on these drawings without creative work.
[0040] Figure 1 A schematic flow chart of a method for detecting solvents in edible vegetable oils according to an embodiment of the present invention is shown;
[0041] Figure 2 A schematic diagram of low-field nuclear magnetic resonance echo attenuation curves of different edible vegetable oils in an embodiment of the present invention is shown;
[0042] Figure 3 A schematic diagram of low-field nuclear magnetic resonance echo attenuation curves using solvents from different manufacturers in an embodiment of the present invention is shown;
[0043] Figure 4 A schematic diagram of low-field nuclear magnetic resonance echo attenuation curves of soybean oil doped with different contents of n-hexane in an embodiment of the present invention is shown;
[0044] Figure 5 A schematic diagram of low-field nuclear magnetic resonance transverse relaxation curves of different edible vegetable oils and n-hexane in an embodiment of the present invention is shown;
[0045] Figure 6 A schematic diagram of low-field nuclear magnetic resonance transverse relaxation curves of soybean oil doped with different contents of n-hexane in an embodiment of the present invention is shown;
[0046] Figure 7 A schematic diagram of relaxation characteristic index data of different vegetable oils and n-hexane in an embodiment of the present invention is shown;
[0047] Figure 8 A schematic diagram showing the change of the overall transverse relaxation characteristics of soybean oil added with different contents of n-hexane in an embodiment of the present invention is shown;
[0048] Fig. 9 A schematic diagram showing the results of low-field nuclear magnetic resonance signals of soybean oil at different measurement temperatures in an embodiment of the present invention is shown;
[0049] Fig.10 A schematic diagram of a low-field nuclear magnetic resonance echo attenuation curve under different sample volumes in an embodiment of the present invention is shown;
[0050] Fig.11 A flow chart of processing the measurement results to obtain relaxation characteristic index data in an embodiment of the present invention is shown;
[0051] Fig.12A flow chart of constructing a quantitative detection model for solvents in edible vegetable oils based on parameter data in an embodiment of the present invention is shown;
[0052] Fig.13 A flow chart showing the use of partial least squares method to process a training set and a validation set to obtain a quantitative detection model in an embodiment of the present invention is shown;
[0053] Fig.14 A schematic diagram showing the results of the prediction analysis of the PLS correction model built using three different types of data in an embodiment of the present invention is shown;
[0054] Fig.15 A schematic structural diagram of a device for detecting solvents in edible vegetable oil according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0055] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0056] The components of the embodiments of the present invention generally described and shown in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0057] Hereinafter, the terms "including", "having" and their cognates used in various embodiments of the present invention are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.
[0058] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present invention belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present invention.
[0059] In conjunction with the accompanying drawings, some embodiments of the present invention are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.
[0060] In order to ensure the quality and safety of edible vegetable oils and their products, it is urgent to develop a rapid, accurate and real-time online monitoring method for residual solvents in vegetable oils.
[0061] The schematic flow chart of the method for detecting solvents in edible vegetable oils provided by the present invention is as follows: Figure 1 As shown, it includes the following steps: using a low-field nuclear magnetic resonance analyzer to measure an edible vegetable oil sample to obtain a measurement result; processing the measurement result to obtain parameter data; the parameter data is one of echo attenuation curve data, transverse relaxation curve data, and relaxation characteristic index data; based on the parameter data, a quantitative detection model for solvents in edible vegetable oils is constructed; and using the quantitative detection model to quantitatively detect the residual solvent in the edible vegetable oil to be tested.
[0062] Specifically, the establishment process and basic concept of the detection method of the present invention are described below:
[0063] At the beginning of the method, the present invention first analyzed the residual solvents of edible vegetable oils: the currently commonly used leaching solvent in China is No. 6 solvent (the main component is n-hexane), and the United States, Japan and other countries generally use n-hexane. The present invention first analyzes the low-field nuclear magnetic resonance echo attenuation curves of n-hexane from different manufacturers and different contents, and the analysis shows that the low-field nuclear magnetic resonance echo attenuation curves of n-hexane from different manufacturers are basically the same. However, the content of n-hexane is different, and the attenuation speed of the low-field nuclear magnetic resonance echo of soybean oil is different. Therefore, the present invention verifies that low-field nuclear magnetic resonance technology can be used to detect the content of n-hexane, and there is no requirement for the manufacturer of n-hexane.
[0064] Based on the above analysis, the present invention uses low-field nuclear magnetic resonance technology to detect the residual solvent content in edible vegetable oil. Among them, low-field nuclear magnetic resonance technology is a new type of non-destructive testing technology based on the magnetism of atomic nuclei, which has the characteristics of rapidity, high efficiency and easy online analysis. The principle of low-field nuclear magnetic resonance technology is to excite the atomic nuclei with fixed magnetic moments in the sample through a specific pulse sequence to generate a series of intensity attenuation signals, and then process the signals to establish a quantitative detection model for the residual solvent content in edible vegetable oil.
[0065] Furthermore, the present invention takes rapeseed oil, soybean oil, peanut oil, sesame oil and other 7 common edible vegetable oils as examples to obtain low-field nuclear magnetic resonance echo attenuation curves of the 7 edible vegetable oils, such as Figure 2 As shown. Figure 2The analysis shows that the low-field NMR echo attenuation curves of the seven edible vegetable oils are basically the same, and the overall attenuation trend is consistent. Although there are certain differences in the attenuation rates between different types of vegetable oils, the signal amplitudes are not much different and there is no essential difference. Therefore, low-field NMR analysis technology is suitable for various common edible vegetable oils.
[0066] Furthermore, the present invention takes four different manufacturers' plant oil extraction solvents (n-hexane) as examples to obtain low-field nuclear magnetic resonance echo attenuation curves. The results are as follows: Figure 3 As shown. Figure 3 It can be seen that the low-field NMR echo attenuation curves of the four types of n-hexanes are basically the same, and their signal amplitudes are also basically the same, indicating that there is no obvious difference in the low-field NMR echo attenuation curves of n-hexanes from different manufacturers.
[0067] Furthermore, the present invention uses soybean oil doped with different contents of n-hexane as a sample to obtain low-field nuclear magnetic resonance echo attenuation curves of soybean oil doped with different contents of n-hexane. The results are as follows: Figure 4 As shown. Figure 4 It can be seen that with the increase of n-hexane content, the attenuation rate of low-field NMR echo of soybean oil gradually decreases, which indicates that the change of n-hexane content directly affects the change of low-field NMR echo attenuation curve of vegetable oil.
[0068] Furthermore, the present invention performs inversion fitting on the low-field nuclear magnetic resonance echo attenuation curve to obtain the low-field nuclear magnetic resonance transverse relaxation curves of 7 vegetable oils and 4 n-hexanes as shown in FIG. Figure 5 As shown. Figure 5 It can be seen that the transverse relaxation time spectra of the seven vegetable oils all have three relaxation peaks, which are T 21 、T 22 、T 23 , and the peak shape and peak position are very similar. This is because the triglyceride composition of the same oil is relatively similar, and the relaxation response law of the hydrogen protons contained in it in the magnetic field is basically the same. 21 、T 22 、T 23 The relaxation time ranges are 41-65ms, 87-185ms, and 335-451ms, respectively. The transverse relaxation curves of the four n-hexane species have only one relaxation peak (T 24 Peak), and its relaxation time range is 1727~2702ms. It can be seen that there is a big difference between the transverse relaxation curve spectrum of vegetable oil and solvent n-hexane. It shows that the present invention is feasible to analyze the solvent content in vegetable oil by using low-field nuclear magnetic resonance echo attenuation data.
[0069] like Figure 6The figure shows the transverse relaxation curve of low-field NMR of soybean oil doped with different contents of n-hexane. The transverse relaxation curve of low-field NMR of soybean oil changes greatly with the increase of n-hexane content. When the amount of n-hexane added is 0.5%, the intensities of the three relaxation peaks of the transverse relaxation curve of low-field NMR of soybean oil are reduced. When the amount of n-hexane added is 1% to 10%, a new peak appears at the relaxation time of 288ms in the transverse relaxation time spectrum of low-field NMR of soybean oil. As the amount of n-hexane added continues to increase, the relaxation time gradually shifts to the right, T 21 The relaxation peak gradually disappears, T 22 The peak intensity gradually decreases, T 23 The peak intensity increases first and then decreases, T 24 The peak intensity gradually increases. It can be seen that the change in the amount of n-hexane added has a great influence on the low-field NMR transverse relaxation curve of soybean oil.
[0070] like Figure 7 Schematic diagram of relaxation characteristic indicators of different vegetable oils and n-hexane. Overall transverse relaxation characteristics T of vegetable oil and n-hexane 2W The overall transverse relaxation characteristics of the seven vegetable oils are T 2W The values are between 175 and 239 ms, with little difference. Similarly, the overall transverse relaxation characteristics T 2W The difference is not big either, and the values are in the range of 2159 to 2203ms.
[0071] The overall transverse relaxation characteristic index T of soybean oil doped with different contents of n-hexane 2W Value changes as Figure 8 The n-hexane content in soybean oil and its overall transverse relaxation characteristic index T 2W The values have a good linear relationship, and the correlation coefficient R 2 It is 0.9977. This further shows that it is feasible to monitor the solvent (n-hexane) content in vegetable oil by low-field nuclear magnetic resonance technology, and that the relaxation characteristic index data can be used to analyze the solvent content in vegetable oil.
[0072] Based on the above analysis, Figure 2 , Figure 3 and Figure 4 Analysis shows that the solvents in edible vegetable oils can be detected and analyzed through low-field nuclear magnetic resonance echo attenuation curve data; Figure 5 and Figure 6 Analysis shows that the solvents in edible vegetable oils can be detected and analyzed through low-field NMR transverse relaxation curve data; Figure 7 and Figure 8 Analysis shows that the solvents in edible vegetable oils can be detected and analyzed through relaxation characteristic index data.
[0073] The method for detecting solvents in edible vegetable oils of the present invention is described below in conjunction with some specific embodiments.
[0074] Example 1
[0075] This embodiment provides a method for detecting solvents in edible vegetable oils. Figure 1 The flowchart of the method for detecting solvents in edible vegetable oils according to an embodiment of the present invention is shown. Exemplarily, the method for detecting solvents in edible vegetable oils comprises the following steps:
[0076] S100, using a low-field nuclear magnetic resonance analyzer to measure the edible vegetable oil sample and obtain the measurement results;
[0077] In this step, 138 soybean oil and solvent-containing soybean oil samples are used as examples for subsequent analysis and modeling. As another implementation, rapeseed oil and peanut oil can also be used as edible vegetable oil samples.
[0078] There are certain requirements for edible vegetable oil samples used in low-field nuclear magnetic resonance environments, namely, the measurement conditions of edible vegetable oil samples include sample volume and measurement temperature.
[0079] Under certain conditions of half-echo time and echo number, 3 mL of edible vegetable oil sample was measured and placed in a low-field nuclear magnetic resonance test tube. After being kept constant at 25, 30, 35, 40, and 45°C, it was placed in the detection pool of the low-field nuclear magnetic resonance instrument for signal acquisition. Each edible vegetable oil sample was sampled 5 times to study the effect of measurement temperature on the low-field nuclear magnetic resonance signal of soybean oil. The results are as follows Fig. 9 As shown. Fig. 9 It can be seen that as the measurement temperature increases, the average standard deviation of the soybean oil low-field nuclear magnetic resonance signal gradually decreases and tends to be flat. The signal has good stability in the temperature range of 35-45°C. Considering that solvents such as n-hexane have a low boiling point, according to the signal stability of the edible vegetable oil sample and the boiling point of the solvent, this embodiment determines that the measurement temperature of the edible vegetable oil sample is 40°C.
[0080] Under the same measurement conditions, the influence of sample volume (1, 2, 3, 4, 5 mL) on the low-field nuclear magnetic resonance CPMG echo attenuation curve was analyzed. The results are as follows: Fig.10 As shown. Fig.10It can be seen that the larger the sample volume, the larger the initial signal amplitude of soybean oil low-field nuclear magnetic resonance. When the sample volume is 1mL, the initial signal amplitude of soybean oil low-field nuclear magnetic resonance is only 45; as the sample volume increases, the initial signal amplitude also increases; when the sample volume is greater than 2mL and less than 5mL, the attenuation curve tends to be stable, and its initial signal amplitude stabilizes at about 80. Taking into account the sample consumption and signal stability, the sample volume of the edible vegetable oil sample measurement conditions of the present invention is 3-5mL, and the sample volume selected for use in this embodiment is specifically 3mL.
[0081] When using a low-field nuclear magnetic resonance analyzer to measure an edible vegetable oil sample, a certain volume (3 mL) of the edible vegetable oil sample (soybean oil + normal hexane) is measured and placed in a low-field nuclear magnetic resonance special test tube, and then placed in a container with a water bath temperature of 40° C. to control the temperature of the edible vegetable oil sample; after the edible vegetable oil sample (soybean oil + normal hexane) reaches a measurement temperature of 40° C., the low-field nuclear magnetic resonance special test tube is placed in a low-field nuclear magnetic resonance sample slot, and the low-field nuclear magnetic resonance analyzer is used for detection, and the signal is collected through a CPMG (Car-Purcell-Meiboom-Gill) pulse sequence to obtain an echo attenuation curve containing noise; wherein, the CPMG pulse sequence parameter setting conditions are: sampling frequency 200 kHz; repeated sampling times 8 times; cycle delay 2 s; gain value 50 decibels; half echo time 0.5 ms; sampling points 12000, and magnet temperature 40° C.
[0082] S200, preprocessing the measurement results to obtain parameter data; the parameter data is one of echo attenuation curve data, transverse relaxation curve data, and relaxation characteristic index data;
[0083] In this step, the measurement result collected by the low-field nuclear magnetic analyzer in the present invention is an echo attenuation curve containing noise. Therefore, the preprocessing of removing abnormal values can make the modeled parameter data more accurate.
[0084] In a specific embodiment, the measurement results are processed to obtain echo attenuation curve data, including: performing outlier processing on the measurement results to obtain echo attenuation curve data; that is, removing outliers in the echo attenuation curve data based on a set threshold to obtain echo attenuation curve data. Specifically, data in the measurement results with a data confidence less than 99% of the set threshold is removed, and the remaining data is used as the echo attenuation curve data.
[0085] In a specific embodiment, the measurement results are processed to obtain transverse relaxation curve data, including: firstly performing outlier processing on the measurement results to obtain echo attenuation curve data; and then performing inversion fitting processing on the echo attenuation curve data to obtain transverse relaxation curve data.
[0086] It can be understood that the inversion fitting process is performed on the echo attenuation curve data after removing the abnormal values. The inversion fitting process is actually to perform an inverse Laplace transform on the echo attenuation curve data, so as to obtain the transverse relaxation curve data.
[0087] In this embodiment, the echo attenuation curve is a superposition of echo signals of different components. The signal of the echo attenuation curve is subjected to an inverse Laplace transform by Matlab software to achieve inversion fitting of the echo attenuation curve, thereby obtaining a transverse relaxation curve, i.e., a transverse relaxation spectrum. The expression of the signal intensity I(t) of the transverse relaxation spectrum is shown in formula (1):
[0088]
[0089] Where I(t) is the signal strength at different times t, exp() is an exponential function with the natural constant e as the base, and T 2i is the relaxation time corresponding to the maximum value of the ith peak in the transverse relaxation curve, A i is the coefficient corresponding to the maximum value of the i-th peak in the transverse relaxation curve, and Σ is the sum.
[0090] In a specific embodiment, the measurement results are processed to obtain relaxation characteristic index data, such as Fig.11 As shown, including:
[0091] (1) Processing the measurement results for outliers to obtain echo attenuation curve data;
[0092] (2) performing inversion fitting processing on the echo attenuation curve data to obtain the transverse relaxation curve data;
[0093] (3) Feature extraction is performed on the transverse relaxation curve data to obtain the relaxation time corresponding to each peak maximum and the peak area of each peak; and based on the weight of each relaxation time, all relaxation times are calculated and processed to obtain the overall transverse relaxation characteristics.
[0094] It can be understood that the information corresponding to the peaks in the transverse relaxation curve data obtained by the inversion fitting process is extracted, and calculations are performed based on the extracted information to obtain the overall transverse relaxation characteristics.
[0095] In a specific embodiment, the relaxation time T corresponding to each peak maximum value is extracted from the transverse relaxation curve data. 2i and the peak area S of each peak 2i ; where i = 1, 2, ..., n. Specifically, each relaxation time is T 21 , T 22 , T 23 , T 24, represents the relaxation time corresponding to each peak maximum in the transverse relaxation spectrum, and is distributed from small to large according to the relaxation time; S 21 , S 22 , S 23 , S 24 Represents the peak area of each peak in the transverse relaxation spectrum.
[0096] In a specific embodiment, the overall transverse relaxation characteristic T of the edible vegetable oil sample is calculated by using a weighted average method. 2w ; The calculation formula is shown in formula (2):
[0097]
[0098] In the formula, w i is the weight of the ith relaxation time, T 2i is the relaxation time corresponding to the maximum value of the i-th peak.
[0099] S300, based on parameter data, builds a quantitative detection model for solvents in edible vegetable oils;
[0100] The present invention adopts partial least squares (PLS), principal component regression (PCR) or support vector machine regression (SVR) algorithm to construct a quantitative detection module for solvents in edible vegetable oils.
[0101] In one embodiment, PLS, PCR and SVR methods are used to model the low-field nuclear magnetic resonance echo attenuation curve data, and the verification results are shown in Table 1.
[0102] Table 1 Modeling results based on echo attenuation curve data
[0103] method RMSEC <![CDATA[R 2 c ]]> RMSECV <![CDATA[R 2 cv ]]> PLS 2.2434 0.9846 2.4724 0.9812 SVR 3.5828 0.9695 3.8047 0.9622 PCR 2.4586 0.9816 2.6584 0.9783
[0104] As shown in Table 1, among the three modeling methods, the prediction accuracy of the linear modeling method (PLS, PCR) is better than that of the nonlinear modeling method (SVR), and the correlation coefficient R 2 All of them are greater than 0.97. Among them, the PLS method has the best prediction effect for establishing a quantitative model, with an RMSECV of 0.9812, while the RMSECV of the SVR method is 0.9622, which is 54% lower than the prediction accuracy of the PLS method; the RMSECV of the linear model PCR is 0.9783, and the prediction accuracy is slightly lower than that of PLS. This may be because Fig.10 There is a good linear relationship between the n-hexane content and the low-field nuclear magnetic resonance echo attenuation curve data. Therefore, the present invention finally selects the PLS method as the modeling method for the n-hexane content, which will have a better effect.
[0105] In one embodiment, PLS, PCR and SVR methods are used to model the low-field NMR transverse relaxation curve data, and the verification results are shown in Table 2.
[0106] Table 2 Modeling results based on low-field NMR transverse relaxation curve data
[0107] method RMSEC <![CDATA[R 2 c ]]> RMSECV <![CDATA[R 2 cv ]]> PLS 2.4064 0.9823 2.7020 0.9783 SVR 3.4612 0.9831 4.0840 0.9702 PCR 2.7461 0.9770 3.0000 0.9735
[0108] As shown in Table 2, among the three modeling methods, the RMSECV value of PLS is the smallest, followed by PLR. The RMSECV value of the SVR model is relatively large, and its correlation coefficient R 2 All of them are greater than 0.97, indicating that there is a good linear relationship between the n-hexane content and the low-field NMR transverse relaxation curve data. Compared with the modeling results based on echo attenuation curve data, its prediction accuracy is reduced by more than 9%.
[0109] In some embodiments, the relaxation characteristic index data is used as the independent variable and the n-hexane content is used as the dependent variable, and a calibration model for the n-hexane content of soybean oil is established by PLS, PCR and SVR methods. The influence of the relaxation characteristic index data on the model is shown in Table 3.
[0110] Table 3 The impact of different numbers of independent variables on PLS modeling results
[0111]
[0112]
[0113] It can be seen from Table 3 that as the number of independent variables decreases, the prediction accuracy of the model changes. When the number of variables is 5, that is, T2w, T 21 , T 24 , S 21 , S 23 , the prediction accuracy of the model is the best, and its RMSECV is 1.9785, which is 12% higher than the model accuracy when the number of variables is 9. Therefore, this embodiment selects T 2w , T 21 , T 24 , S 21 , S 23 Model the independent variables.
[0114] Then, PLS, PCR and SVR methods were used to establish the calibration model of soybean oil adulteration with n-hexane content, and the results are shown in Table 4.
[0115] Table 4 Modeling results based on relaxation characteristic index data
[0116] method RMSEC <![CDATA[R 2 c ]]> RMSECV <![CDATA[R 2 cv ]]> PLS 1.9140 0.9888 1.9785 0.9881 SVR 3.7111 0.9736 3.8003 0.9714 PCR 1.9140 0.9888 1.9799 0.9878
[0117] As shown in Table 4, the RMSECV values of the linear models PLS and PCR are significantly lower than those of the nonlinear model SVR, and their correlation coefficients R 2 Therefore, compared with the model established based on the echo attenuation curve data and the model established based on the transverse relaxation curve data, the model established based on the relaxation characteristic index data can improve the prediction accuracy by 20% and 27% respectively, so this embodiment preferably uses the relaxation characteristic index data for modeling.
[0118] In summary, based on the above-mentioned use of different algorithms to model different parameter data, it is known that the modeling result of the relaxation characteristic index data using the PLS algorithm is the best. Therefore, in the embodiment of the present invention, the relaxation characteristic index data is specifically modeled using the PLS algorithm.
[0119] Among them, the process of constructing a quantitative detection model for solvents in edible vegetable oils based on parameter data, such as Fig.12 As shown, including:
[0120] (1) The parameter data of edible vegetable oil samples were divided into training set and validation set using the Kennard-Stone algorithm;
[0121] Since the modeling effect of using the relaxation characteristic index data in the parameter data is the best, the relaxation characteristic index data of 138 edible vegetable oil samples are divided according to the Kennard-Stone algorithm in this embodiment, and the relaxation characteristic index data of 103 edible vegetable oil samples are obtained as a training set, and the relaxation characteristic index data of 35 edible vegetable oil samples are obtained as a validation set;
[0122] (2) Based on the set algorithm, the training set and validation set are processed to obtain a quantitative detection model.
[0123] In an embodiment of the present invention, the setting algorithm includes partial least squares (PLS), and as other implementation methods, the setting algorithm also includes principal component regression (PCR) or support vector machine regression (SVR).
[0124] According to the analysis results of the three algorithms respectively modeled, the prediction accuracy of the partial least squares method (PLS) is the best. Therefore, in the embodiment of the present invention, the partial least squares method is used to process the training set and the validation set to obtain a quantitative detection model, such as Fig.13 As shown, the following steps are included:
[0125] (1) Decomposing and calculating the covariance matrix of the training set and the covariance matrix of the solvent content in the edible vegetable oil samples respectively to obtain their respective score matrices;
[0126] In the embodiment of the present invention, the solvent content Y of the edible vegetable oil samples in the training set is [y1, y2, ..., yn ]; Relaxation characteristic index data of edible vegetable oil samples X nm for:
[0127]
[0128] Where n is the number of edible vegetable oil samples, and m is the dimension of edible vegetable oil samples.
[0129] In the embodiment of the present invention, X and Y are decomposed:
[0130] X=TP T +E X =[t1,t2,…,t i ][p1,p2,…,p i ] T +E X
[0131] Y=UQ T +E Y =[u1,u2,…,u i ][q1,q2,…,q i ] T +E Y
[0132] Where, T = [t1, t2…, t i ] and U=[u1,u2…,u i ] are the score matrices of X and Y, P and Q are the loading matrices of X and Y, E X and E Y are the residual matrices of X and Y respectively.
[0133] Therefore, the score matrix of the training set obtained in the embodiment of the present invention is T = [t1, t2 ..., t i ]; the score matrix of the solvent content in edible vegetable oil samples is U = [u1,u2…,u i ].
[0134] (2) determining the number of principal components according to the cumulative contribution rate of all score matrices; and updating the covariance matrix of the training set and the covariance matrix of the solvent content according to the number of principal components;
[0135] In one embodiment, the covariance matrix of the training set and the covariance matrix of the solvent content in the edible vegetable oil sample are respectively calculated to obtain the score matrix; when the cumulative contribution rate of the first d principal components in each score matrix reaches 90%, the number of principal components is determined to be d. The score matrix A of the training set is updated according to the number of principal components = [t1, t2…, t d ] and the covariance matrix B of the solvent content = [u1,u2…,u d ].
[0136] (3) constructing an initial model based on the score matrix of the updated training set and the covariance matrix of the solvent content;
[0137] In one embodiment, the initial model constructed is B=KA;
[0138] Where B is the score matrix of the updated training set, A is the covariance matrix of the updated solvent content, K = (A T A`) -1 A T B.
[0139] (4) Decomposing the validation set to obtain a score matrix of the validation set, and inputting the score matrix of the validation set into the initial model to calculate the residual sum of squares between the predicted solvent value output by the initial model and the true solvent value of the validation set;
[0140] When the residual sum of squares is less than or equal to the set value, the initial model is used as the quantitative detection model;
[0141] When the residual sum of squares is greater than the set value, loop (2)-(4) is iterated until the residual sum of squares is less than or equal to the set value, and the updated model corresponding to the residual sum of squares less than or equal to the set value is used as the quantitative detection model.
[0142] It can be understood that by calculating the covariance matrix of the independent variables and dependent variables of the quantitative detection model, extracting and adjusting the number of principal components through an iterative algorithm, updating the independent variables according to the adjusted number of principal components, and finally performing linear regression modeling based on the updated independent variables, the quantitative detection module constructed can achieve the best prediction effect.
[0143] In order to verify the stability and accuracy of the quantitative detection model, the PLS correction model, i.e., the quantitative detection model, built using three different types of data was used to predict the n-hexane content of 35 unknown samples. The results are shown in Figure 2. Fig.14 As shown. Fig.14 It can be seen that the prediction effect of the n-hexane content PLS model established using relaxation characteristic index data is the best, that is, the RMSEP is 1.9736; the second is based on the low-field nuclear magnetic resonance echo attenuation curve data; and the prediction accuracy of the model established using the low-field nuclear magnetic resonance transverse relaxation curve data is relatively low.
[0144] S400 uses a quantitative detection model to perform quantitative detection of residual solvents in the edible vegetable oil to be tested.
[0145] In some embodiments, when analyzing and detecting the residual amount of solvent in various edible vegetable oils to be tested, the sample matrix of the edible vegetable oils to be tested is first decomposed and calculated to obtain a corresponding score matrix, and then the score matrix is input into a quantitative detection model, and the residual solvent in the edible vegetable oil to be tested can be obtained through the data results of the quantitative detection model. Thus, the present invention realizes the quantitative detection of the residual solvent in the edible vegetable oil to be tested.
[0146] Further, Fig.15 The schematic diagram of the structure of the detection device of the solvent in the edible vegetable oil of the embodiment of the present invention is shown. Exemplarily, the detection device of the solvent in the edible vegetable oil includes a sample determination module, a data analysis module, a model construction module and a quantitative detection module. With this detection device, the above-mentioned detection method of the solvent in the vegetable oil can be implemented. Specifically, the sample determination module is used to measure the edible vegetable oil sample using a low-field nuclear magnetic resonance analyzer to obtain the measurement result; the data analysis module is used to process the measurement result to obtain parameter data; the parameter data is one of the echo attenuation curve data, the transverse relaxation curve data, and the relaxation characteristic index data; the model construction module is used to construct a quantitative detection model of the solvent in the edible vegetable oil based on the parameter data; the quantitative detection module is used to use the quantitative detection model to perform quantitative detection on the residual solvent in the edible vegetable oil to be tested.
[0147] It can be understood that the device of this embodiment corresponds to the method for detecting solvents in edible vegetable oils in the above-mentioned embodiment, and the options in the above-mentioned embodiment are also applicable to this embodiment, so they will not be described repeatedly here.
[0148] The present invention also provides a terminal device. Exemplarily, the terminal device includes a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program to enable the terminal device to execute the functions of each module in the above-mentioned method for detecting solvents in edible vegetable oils or the above-mentioned device for detecting solvents in edible vegetable oils.
[0149] Among them, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU) and a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or at least one of other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present invention.
[0150] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory is used to store a computer program, and the processor may execute the computer program accordingly after receiving an execution instruction.
[0151] The present invention also provides a computer-readable storage medium for storing the computer program used in the above terminal device. For example, the computer-readable storage medium may include but is not limited to: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0152] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0153] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0154] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
[0155] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for detecting solvents in edible vegetable oils, characterized in that: The following steps are involved: The edible vegetable oil samples were measured by low-field nuclear magnetic resonance analyzer to obtain the measurement results; Processing the measurement results to obtain parameter data; The parameter data is one of echo attenuation curve data, transverse relaxation curve data, and relaxation characteristic index data; Based on the parameter data, a quantitative detection model for solvents in edible vegetable oils is constructed; The quantitative detection model is used to perform quantitative detection of the residual solvent in the edible vegetable oil to be tested.
2. The method for detecting solvents in edible vegetable oils according to claim 1, characterized in that: When the edible vegetable oil sample is measured by a low-field nuclear magnetic resonance analyzer, the measurement conditions of the edible vegetable oil sample include sample volume and measurement temperature; the sample volume is 3-5 mL; and the measurement temperature is 35-45°C.
3. The method for detecting solvents in edible vegetable oils according to claim 1, characterized in that: The relaxation characteristic index data include relaxation time, peak area and overall transverse relaxation characteristics.
4. The method for detecting solvents in edible vegetable oils according to claim 3, characterized in that: The process of obtaining the parameter data is as follows: Performing outlier processing on the measurement result to obtain the echo attenuation curve data; Performing inversion fitting processing on the echo attenuation curve data to obtain the transverse relaxation curve data; Performing feature extraction on the transverse relaxation curve data to obtain the relaxation time corresponding to each peak maximum and the peak area of each peak; Based on the weight of each relaxation time, all relaxation times are calculated and processed to obtain the overall transverse relaxation characteristics.
5. The method for detecting solvents in edible vegetable oils according to claim 1, characterized in that: Based on the parameter data, a quantitative detection model for solvents in edible vegetable oils is constructed, comprising the following steps: (1) According to the Kennard-Stone algorithm, the parameter data of edible vegetable oil samples were divided into a training set and a validation set; (2) Based on a set algorithm, the training set and the validation set are processed to obtain the quantitative detection model; the set algorithm is one of partial least squares method, principal component regression, and support vector machine regression.
6. The method for detecting solvents in edible vegetable oils according to claim 5, characterized in that: The partial least squares method is used as the setting algorithm to process the training set and the validation set to obtain the quantitative detection model, which specifically includes the following steps: (1) Decomposing and calculating the covariance matrix of the training set and the covariance matrix of the solvent content in the edible vegetable oil sample respectively to obtain respective score matrices; (2) Determine the number of principal components based on the cumulative contribution rate of all score matrices; update the covariance matrix of the training set and the covariance matrix of the solvent content based on the number of principal components; (3) constructing an initial model based on the updated score matrix of the training set and the covariance matrix of the solvent content; (4) performing decomposition calculation on the validation set to obtain a score matrix of the validation set, and inputting the score matrix of the validation set into the initial model to calculate the residual sum of squares between the predicted solvent value output by the initial model and the true solvent value of the validation set; When the residual square sum is less than or equal to a set value, the initial model is used as the quantitative detection model; When the residual sum of squares is greater than a set value, steps (2) to (4) are iterated until the residual sum of squares is less than or equal to the set value, and the updated model corresponding to the residual sum of squares being less than or equal to the set value is used as the quantitative detection model.
7. The method for detecting solvents in edible vegetable oils according to claim 1, characterized in that: When a low-field nuclear magnetic analyzer is used for detection, the measurement results are obtained by collecting the CPMG pulse sequence; the parameter setting conditions of the CPMG pulse sequence include: sampling frequency 200kHz; repeated sampling times 8 times; cycle delay 2s; gain value 50dB; half echo time 0.5ms; 12000 sampling points, and magnet temperature 40°C.
8. A device for detecting solvents in edible vegetable oils, characterized in that: It includes a sample determination module, a data analysis module, a model building module and a quantitative detection module; The sample determination module is used to determine the edible vegetable oil sample using a low-field nuclear magnetic resonance analyzer to obtain a determination result; The data analysis module is used to process the measurement results to obtain parameter data; the parameter data is one of echo attenuation curve data, transverse relaxation curve data, and relaxation characteristic index data; The model building module is used to build a quantitative detection model for solvents in edible vegetable oils based on the parameter data; The quantitative detection module is used to perform quantitative detection on the residual solvent in the edible vegetable oil to be tested using the quantitative detection model.
9. A terminal device, characterized in that: The terminal device includes a processor and a memory; the memory stores a computer program; the processor is used to execute the computer program to implement the method for detecting solvents in edible vegetable oils according to any one of claims 1 to 7 or the device for detecting solvents in edible vegetable oils according to claim 8.
10. A computer-readable storage medium, characterized in that: It stores a computer program; when the computer program is executed on a processor, it implements the method for detecting solvents in edible vegetable oils according to any one of claims 1 to 7 or the device for detecting solvents in edible vegetable oils according to claim 8.
