Intelligent measurement method of Cd content in brown rice based on spectral analysis

Through spectral analysis, denoising and background deduction treatment, combined with particle size distribution, the problem of low measurement accuracy of Cd content in rice brown rice is solved, and the measurement accuracy and the accuracy of the standard curve are improved.

CN118706880BActive Publication Date: 2024-11-08INST OF AGRI RESOURCES & ENVIRONMENT GUANGDONG ACADEMY OF AGRI SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411193507.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-11-08
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

In the existing methods for measuring Cd content in brown rice, the noise and substance interaction of energy dispersive X-ray fluorescence spectrometers lead to a decrease in measurement accuracy, affecting the accurate acquisition of the fluorescence intensity of Cd elements.

Method used

The intelligent measurement method based on spectral analysis is adopted, through denoising and background subtraction processing, combined with the particle size distribution discretitude, the confidence of the fluorescence intensity of the Cd element is determined, and an accurate standard curve is established using the weighted least squares method.

Benefits of technology

It improves the accuracy of measurement of Cd content in rice brown rice, reduces the influence of noise, enhances the accuracy of fluorescence intensity, and improves the accuracy of the standard curve.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118706880B_ABST
    Figure CN118706880B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of measuring the Cd content of rice brown rice, and specifically to an intelligent measuring method of the Cd content of rice brown rice based on spectral analysis, the method comprising: collecting the X-ray fluorescence spectrum of each rice brown rice sample respectively; determining the overall retention degree of the characteristic peaks in each un-denoised X-ray fluorescence spectrum based on the similarity of the spectral line shape between each un-denoised X-ray fluorescence spectrum and its denoised X-ray fluorescence spectrum; determining the overall distortion degree of the characteristic peaks in each denoised X-ray fluorescence spectrum based on the similarity of the characteristic peaks between each denoised X-ray fluorescence spectrum and its background subtracted X-ray fluorescence spectrum; determining the confidence of the X-ray fluorescence intensity of the Cd element in each denoised and background subtracted X-ray fluorescence spectrum; and determining the Cd content in the rice brown rice to be measured. The present application aims to improve the accuracy of measuring the Cd content in the rice brown rice to be measured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of measuring the Cd content in brown rice, and in particular to an intelligent method for measuring the Cd content in brown rice based on spectral analysis. Background Art

[0002] Rice absorbs and accumulates Cd in the soil, which can easily lead to excessive Cd content in brown rice. Cd is a harmful heavy metal element. Long-term excessive intake of Cd can cause harm to human health, such as kidney failure, bone disease, etc. Therefore, it is necessary to measure the Cd content in brown rice to ensure that the Cd content in brown rice meets the standard and protect the health of consumers.

[0003] At present, X-ray fluorescence spectrometry is commonly used to determine the Cd content in rice and its products, such as the current "Energy Dispersive X-ray Fluorescence Spectrometry for Rapid Determination of Cadmium in Rice and Its Products". This method establishes a standard curve between the Cd content in rice brown rice and the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of rice brown rice, and quickly measures the Cd content in rice brown rice. However, the X-rays in the energy dispersive X-ray fluorescence spectrometer will interact with the substances in the rice brown rice sample, and noise is usually introduced into the collected X-ray fluorescence spectrum, which affects the accurate acquisition of the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of the rice brown rice sample, reduces the accuracy of the standard curve, and further reduces the accuracy of the measurement of the Cd content in the rice brown rice to be tested. Summary of the invention

[0004] In view of the above, it is necessary to provide an intelligent measurement method for Cd content in rice brown rice based on spectral analysis, which improves the accuracy of measuring Cd content in rice brown rice compared with the traditional measurement method for Cd content in rice brown rice.

[0005] The intelligent measurement method of Cd content in brown rice based on spectral analysis of the present application adopts the following technical solutions:

[0006] One embodiment of the present application provides an intelligent method for measuring the Cd content of brown rice based on spectral analysis, the method comprising the following steps:

[0007] The X-ray fluorescence spectrum of each brown rice sample is collected respectively, wherein the Cd content of the brown rice samples is known and different from each other;

[0008] Determining the overall retention degree of characteristic peaks in each non-denoised X-ray fluorescence spectrum based on the similarity of the spectral line shape between each non-denoised X-ray fluorescence spectrum and the denoised X-ray fluorescence spectrum;

[0009] Determining the overall distortion degree of the characteristic peaks in each denoised X-ray fluorescence spectrum based on the similarity between the characteristic peaks of each denoised X-ray fluorescence spectrum and the X-ray fluorescence spectrum after background subtraction;

[0010] Determining the confidence of the X-ray fluorescence intensity of the Cd element in each X-ray fluorescence spectrum after denoising and background subtraction based on the overall retention degree, the overall distortion degree and the discreteness of the particle size distribution in each brown rice sample;

[0011] Based on the Cd content in all the brown rice samples, the X-ray fluorescence intensity and the confidence level, the Cd content in the brown rice to be tested is determined.

[0012] In one embodiment, the overall retention degree is determined by:

[0013] Each X-ray fluorescence spectrum that has not been subjected to denoising is recorded as each original X-ray fluorescence spectrum;

[0014] Each X-ray fluorescence spectrum that has been subjected to denoising is recorded as each denoised X-ray fluorescence spectrum;

[0015] Obtain the characteristic peak with the smallest peak position difference between each denoised X-ray fluorescence spectrum and any characteristic peak in the corresponding original X-ray fluorescence spectrum, and record it as the denoised characteristic peak;

[0016] Determining a relative change degree of the peak area of ​​any characteristic peak based on the peak area of ​​any characteristic peak and the denoised characteristic peak;

[0017] Calculating the spectral angle between each original X-ray fluorescence spectrum and the corresponding denoised X-ray fluorescence spectrum, and calculating the average of the relative changes in the peak areas of all characteristic peaks in each original X-ray fluorescence spectrum;

[0018] Based on the spectral angle and the mean value, the overall retention degree of the characteristic peaks in each original X-ray fluorescence spectrum is determined.

[0019] In one embodiment, the relative change degree is a calculation result of the difference in peak area between any characteristic peak and the denoised characteristic peak divided by the peak area of ​​any characteristic peak.

[0020] In one embodiment, a fusion result of the spectral angle and the mean is calculated, and the reciprocal of the sum of the fusion result and a preset value greater than 0 is used as the overall retention degree of the characteristic peaks in each original X-ray fluorescence spectrum.

[0021] In one embodiment, the process of determining the overall distortion degree is:

[0022] Each denoised X-ray fluorescence spectrum that has been subjected to background subtraction processing is recorded as each background-subtracted X-ray fluorescence spectrum;

[0023] Obtain the characteristic peak with the smallest peak position difference between each background-subtracted X-ray fluorescence spectrum and any characteristic peak in the corresponding denoised X-ray fluorescence spectrum, and record it as the background-subtracted characteristic peak;

[0024] Calculate the difference in peak area between any one characteristic peak and the background-subtracted characteristic peak, and record it as the area difference;

[0025] The ratio of the area difference to the peak area of ​​any one of the characteristic peaks is taken as the relative change value of the peak area of ​​any one of the characteristic peaks;

[0026] Determine the degree of distortion of any one characteristic peak based on the peak position difference, peak width difference, and relative change value between any one characteristic peak and the background-subtracted characteristic peak;

[0027] The average value of the distortion degree of all characteristic peaks in each denoised X-ray fluorescence spectrum is taken as the overall distortion degree of the characteristic peaks in each denoised X-ray fluorescence spectrum.

[0028] In one embodiment, the distortion degree is the product of the peak position difference, the peak width difference and the relative change value.

[0029] In one embodiment, the confidence level is determined as follows:

[0030] The overall distortion degree of the characteristic peaks in each denoised X-ray fluorescence spectrum is fused with the corresponding discreteness, and the sum of the fusion result and a preset value greater than 0 is calculated;

[0031] Based on the overall retention degree of the characteristic peaks in each original X-ray fluorescence spectrum and the corresponding sum value, the confidence of the X-ray fluorescence intensity of the Cd element in each background-subtracted X-ray fluorescence spectrum is determined.

[0032] In one embodiment, the confidence level is a normalized value of the ratio of the overall retention degree of the characteristic peaks in each original X-ray fluorescence spectrum to the corresponding sum value.

[0033] In one embodiment, the process of determining the Cd content in the brown rice to be tested is:

[0034] The Cd content in any brown rice sample and the X-ray fluorescence intensity of the Cd element in the background-subtracted X-ray fluorescence spectrum of any brown rice sample are used to form two-dimensional data points;

[0035] A rectangular coordinate system was established with the Cd content of the brown rice sample as the abscissa and the X-ray fluorescence intensity of the Cd element in the background-subtracted X-ray fluorescence spectrum as the ordinate;

[0036] Obtaining a fitted straight line for all data points in the rectangular coordinate system, wherein the confidence level is used as a weight of the corresponding data point in the fitting process;

[0037] The Cd content in the brown rice to be tested is determined based on the fitting straight line.

[0038] In one embodiment, the X-ray fluorescence intensity of the Cd element in the background-subtracted X-ray fluorescence spectrum of the brown rice to be tested is obtained and recorded as the fluorescence intensity to be tested; and the abscissa of the data point corresponding to the fluorescence intensity to be tested on the fitting straight line is obtained as the Cd content in the brown rice to be tested.

[0039] This application has at least the following beneficial effects:

[0040] The present application analyzes the X-ray fluorescence spectrum of the rice brown rice sample, determines the overall retention degree based on the X-ray fluorescence spectrum before and after denoising, determines the overall distortion degree based on the X-ray fluorescence spectrum before and after background subtraction, and combines the overall retention degree, the overall distortion degree with the discreteness of the particle size distribution of the substance in the rice brown rice sample to determine the confidence level. The present application considers that the X-rays in the energy dispersive X-ray fluorescence spectrometer will interact with the substances in the rice brown rice sample, the noise introduced in the collected X-ray fluorescence spectrum, and the unevenness of the particle size distribution of the substances in the rice brown rice sample, all of which will affect the accuracy of obtaining the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of the rice brown rice sample, thereby improving the degree of differentiation of the accuracy of the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectra of different rice brown rice samples.

[0041] Furthermore, the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of the rice brown rice sample was weighted based on the confidence level, and the weighted least squares method was used to obtain a standard curve for measuring the Cd content in rice brown rice. When establishing a standard curve for measuring the Cd content in rice brown rice, the X-ray fluorescence intensity with higher accuracy was assigned a higher weight, which improved the accuracy of the standard curve, and thereby improved the accuracy of the measurement of the Cd content in the rice brown rice to be tested. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 A flowchart of the steps of the intelligent measurement method of Cd content in brown rice based on spectral analysis provided in this application;

[0044] Figure 2 A schematic diagram of the process for determining the overall retention level;

[0045] Figure 3 A schematic diagram of the process of determining the overall distortion degree;

[0046] Figure 4 Schematic diagram of the confidence determination process. DETAILED DESCRIPTION

[0047] In the description of the embodiments of the present application, words such as "exemplary", "or", "for example" and the like are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "or", "for example" and the like is intended to present related concepts in a concrete manner.

[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art in the present application. The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. It should be understood that, unless otherwise specified, " / " means or.

[0049] It should also be noted that the terms "first" and "second" in the present application are used to distinguish similar objects rather than to describe a specific order or sequence.

[0050] The specific scheme of the intelligent measurement method of Cd content in brown rice based on spectral analysis provided by the present application is described in detail below with reference to the accompanying drawings.

[0051] An embodiment of the present application provides an intelligent method for measuring the Cd content of brown rice based on spectral analysis. Specifically, the following intelligent method for measuring the Cd content of brown rice based on spectral analysis is provided. Figure 1 , the method comprises the following steps:

[0052] Step 1, collecting the X-ray fluorescence spectrum of each brown rice sample respectively.

[0053] A plurality of brown rice samples were obtained after the Cd content was calibrated by using Agilent ICP-MS, wherein the Cd content in the brown rice samples was different, and an energy dispersive X-ray fluorescence spectrometer was used to collect the X-ray fluorescence spectrum of each brown rice sample.

[0054] In this embodiment, the number of brown rice samples is 5, and the Cd contents in the brown rice samples are 0.079 mg / Kg, 0.13 mg / Kg, 0.227 mg / Kg, 0.55 mg / Kg, and 0.894 mg / Kg, respectively. The number of brown rice samples and the Cd content in the brown rice samples can be selected by the implementer at his / her own discretion, and this application does not impose any special restrictions.

[0055] Step 2: determining the overall retention degree of the characteristic peaks in each non-denoised X-ray fluorescence spectrum based on the similarity of the spectral line shapes between each non-denoised X-ray fluorescence spectrum and the denoised X-ray fluorescence spectrum.

[0056] Since noise is introduced in the process of X-ray generation, photon conversion and transmission into electrical signals in an energy dispersive X-ray fluorescence spectrometer, there is a lot of noise data in the collected X-ray fluorescence spectrum, which affects the accuracy of the subsequent acquisition of the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of the brown rice sample. Therefore, it is usually necessary to denoise the collected X-ray fluorescence spectrum to remove or suppress the noise data in the X-ray fluorescence spectrum. However, when denoising the X-ray fluorescence spectrum, the data in the X-ray fluorescence spectrum may be over-smoothed and lose useful information. Therefore, the denoised X-ray fluorescence spectrum should try to retain the shape and area of ​​the characteristic peaks in the original X-ray fluorescence spectrum.

[0057] Each X-ray fluorescence spectrum that has not been subjected to denoising is recorded as each original X-ray fluorescence spectrum; each X-ray fluorescence spectrum that has been subjected to denoising is recorded as each denoised X-ray fluorescence spectrum.

[0058] In this embodiment, a Savitzky-Golay filter is used to denoise the original X-ray fluorescence spectrum. As other implementations, on the basis of being able to denoise the original X-ray fluorescence spectrum, the implementer may use other existing technologies to denoise the original X-ray fluorescence spectrum, such as Russian roulette optimized wavelet algorithm, etc., and this application does not impose any special restrictions.

[0059] Taking the original X-ray fluorescence spectrum Ai of the i-th rice brown rice sample Si as an example, the denoised X-ray fluorescence spectrum Bi after the original X-ray fluorescence spectrum Ai is denoised is calculated. The spectral angle between the original X-ray fluorescence spectrum Ai and the denoised X-ray fluorescence spectrum Bi is calculated. The smaller the spectral angle, the more similar the spectral line shapes of the two spectra are. After the original X-ray fluorescence spectrum Ai is denoised, the smaller the degree of shape change of the characteristic peak in the original X-ray fluorescence spectrum Ai is, the smaller the degree of loss of the spectral information of the Cd element in the original X-ray fluorescence spectrum of the rice brown rice sample Si is. Among them, the calculation of the spectral angle is a well-known technology and will not be repeated in this application.

[0060] The symmetric zero area transformation method is used to extract all characteristic peaks in the original X-ray fluorescence spectrum Ai and the denoised X-ray fluorescence spectrum Bi, and the peak position and peak area of ​​each characteristic peak in the original X-ray fluorescence spectrum Ai and the denoised X-ray fluorescence spectrum Bi are obtained respectively. The symmetric zero area transformation method is a well-known technology and will not be described in detail in this application.

[0061] Taking the j-th characteristic peak Aij in the original X-ray fluorescence spectrum Ai as an example, the characteristic peak Bij with the smallest peak position difference with the characteristic peak Aij in the denoised X-ray fluorescence spectrum Bi is obtained. The smaller the peak position difference between the characteristic peak Aij and the characteristic peak Bij, the more suspected the characteristic peak Bij is to be the characteristic peak corresponding to the characteristic peak Aij in the denoised X-ray fluorescence spectrum Bi after the original X-ray fluorescence spectrum Ai is denoised.

[0062] The difference in peak area between characteristic peak Aij and characteristic peak Bij is divided by the calculated result of the peak area of ​​characteristic peak Aij to be taken as the relative change degree ADij of the peak area of ​​characteristic peak Aij.

[0063] In this embodiment, the difference between the peak positions of characteristic peak Aij and characteristic peak Bij is the absolute value of the difference. As other implementation methods, on the basis of the measurable difference between the peak positions, the implementer may use other calculation methods to measure the difference between the peak positions, such as ratio, square of the difference, etc., and this application does not impose any special restrictions.

[0064] In this embodiment, the difference between the peak areas is the absolute value of the difference. As other implementation methods, based on the measurable difference between the peak areas, the implementer can use other calculation methods to measure the difference between the peak areas, such as ratio, square of the difference, etc. This application does not impose any special restrictions.

[0065] Furthermore, the overall retention degree of the characteristic peaks in each original X-ray fluorescence spectrum is obtained. The specific process is as follows:

[0066] The mean of the relative change degree of the peak area of ​​all characteristic peaks in the original X-ray fluorescence spectrum Ai is calculated, the fusion result of the spectral angle and the mean is calculated, and the reciprocal of the sum of the fusion result and the preset value greater than 0 is used as the overall retention degree of the characteristic peaks in the original X-ray fluorescence spectrum Ai. The purpose of the preset value greater than 0 is to avoid the denominator being 0. The value of the preset value greater than 0 is preset manually and can be set by the implementer. In this embodiment, the value of the preset value greater than 0 is 1.

[0067] It should be understood that fusion refers to combining multiple independent variables in a way that enhances the overall effect, such as multiplication relationship, addition relationship, etc., and implementers can limit it according to actual conditions.

[0068] In this embodiment, the fusion is the product of the spectral angle and the mean value.

[0069] In another embodiment, the fusion is the cumulative value of the spectral angle and the mean value.

[0070] It should be noted that: after the original X-ray fluorescence spectrum Ai is denoised, the smaller the degree of shape change of the characteristic peaks in the original X-ray fluorescence spectrum Ai, that is, the smaller the ADi, and the smaller the overall relative change of the peak area of ​​all characteristic peaks in the original X-ray fluorescence spectrum Ai, that is, the smaller the ADi, the greater the overall retention degree Li of the characteristic peaks in the original X-ray fluorescence spectrum Ai, the smaller the loss of spectral information about the Cd element in the original X-ray fluorescence spectrum of the rice brown rice sample Si, and the more accurately the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of the rice brown rice sample can be obtained. The schematic diagram of the overall retention degree determination process is shown in the figure. Figure 2 shown.

[0071] Step 3: based on the similarity of the characteristic peaks between each denoised X-ray fluorescence spectrum and the X-ray fluorescence spectrum after background subtraction, determine the overall distortion degree of the characteristic peaks in each denoised X-ray fluorescence spectrum.

[0072] The X-rays in the energy dispersive X-ray fluorescence spectrometer will interact with the substances in the rice brown rice sample, such as coherent scattering, incoherent scattering, Compton scattering, etc., resulting in a low-frequency background in the collected X-ray fluorescence spectrum, and the low-frequency background will affect the calculation of the peak area and the judgment of the peak position in the X-ray fluorescence spectrum, thereby affecting the accuracy of obtaining the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of the rice brown rice sample. Therefore, before obtaining the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of the rice brown rice sample, it is necessary to perform background subtraction processing on the denoised X-ray fluorescence spectrum. However, after the background subtraction processing is performed on the denoised X-ray fluorescence spectrum, although the background in the denoised X-ray fluorescence spectrum can be effectively suppressed, it may also cause serious distortion of the characteristic peaks in the denoised X-ray fluorescence spectrum, thereby affecting the accuracy of obtaining the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of the rice brown rice sample.

[0073] Based on the above analysis, the present application uses a Top-hat filter to perform background subtraction processing on the denoised X-ray fluorescence spectrum Bi to obtain a background-subtracted X-ray fluorescence spectrum Ci, and uses a symmetric zero-area transformation method to extract all characteristic peaks in the background-subtracted X-ray fluorescence spectrum Ci, and simultaneously obtains the peak position and peak area of ​​each characteristic peak in the background-subtracted X-ray fluorescence spectrum Ci, wherein the Top-hat filter and the symmetric zero-area transformation method are well-known technologies and will not be described in detail in the present application.

[0074] Taking the characteristic peak Bij in the denoised X-ray fluorescence spectrum Bi as an example, the characteristic peak Cij with the smallest peak position difference between the characteristic peak Bij and the background-subtracted X-ray fluorescence spectrum Ci is taken as the characteristic peak corresponding to the characteristic peak Bij in the background-subtracted X-ray fluorescence spectrum Ci, and the peak widths of the characteristic peak Bij and the characteristic peak Cij are obtained respectively.

[0075] The difference in peak area between the characteristic peak Bij and the characteristic peak Cij is divided by the calculated result of the peak area of ​​the characteristic peak Bij, which is taken as the relative change degree BDij of the peak area of ​​the characteristic peak Bij.

[0076] Further, the distortion degree of the characteristic peak Bij is obtained;

[0077] In this embodiment, the difference between the peak positions of characteristic peak Bij and characteristic peak Cij is the absolute value of the difference. As other implementation methods, on the basis of the measurable difference between the peak positions, the implementer may use other calculation methods to measure the difference between the peak positions, such as ratio, square of the difference, etc., and this application does not impose any special restrictions.

[0078] In this embodiment, the difference between the peak widths is the absolute value of the difference. As other implementation methods, based on the measurable difference between the peak widths, the implementer can use other calculation methods to measure the difference between the peak widths, such as ratio, square of the difference, etc. This application does not impose any special restrictions.

[0079] It should be noted that: after the denoised X-ray fluorescence spectrum Bi is processed by background subtraction, the greater the relative change degree BDij of the peak area of ​​the characteristic peak Bij, and the greater the peak position difference and peak width difference between the characteristic peak Bij and the characteristic peak Cij, that is, the larger Wij and Kij are, the greater the degree of distortion of the characteristic peak Bij, that is, the greater the distortion degree Gij, the greater the degree of interference to the spectral information of the Cd element in the rice brown rice sample Si at the characteristic peak Bij, and the less likely it is to accurately obtain the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of the rice brown rice sample.

[0080] The average value of the distortion degree of all characteristic peaks in the denoised X-ray fluorescence spectrum Bi is taken as the overall distortion degree of the characteristic peaks in the denoised X-ray fluorescence spectrum Bi. The flow chart of determining the overall distortion degree is as follows: Figure 3 shown.

[0081] Step 4: Determine the confidence of the X-ray fluorescence intensity of the Cd element in each X-ray fluorescence spectrum after denoising and background subtraction based on the overall retention degree, the overall distortion degree and the discreteness of the particle size distribution in each brown rice sample.

[0082] The uneven particle size of the material in the rice brown rice sample may lead to inconsistent penetration depth of X-rays in the rice brown rice sample, affecting the absorption and scattering of X-rays, thereby affecting the accuracy of obtaining the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of the rice brown rice sample. Taking the rice brown rice sample Si as an example, a particle size analyzer is used to obtain the particle size distribution of the material in the rice brown rice sample Si, and the discreteness of the particle size distribution is calculated. The smaller the value of the discreteness, the greater the uniformity of the particle size distribution of the material in the rice brown rice sample Si, and the higher the accuracy of the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of the rice brown rice sample Si obtained, wherein the discreteness of the particle size distribution is a known technology and will not be repeated in this application.

[0083] The confidence level of the X-ray fluorescence intensity of the Cd element in the background-subtracted X-ray fluorescence spectrum Ci is calculated as follows:

[0084] The overall distortion degree and the discreteness of the characteristic peak in the denoised X-ray fluorescence spectrum Bi are fused, and the sum of the fusion result and the preset value greater than 0 is calculated; the normalized value of the ratio of the overall retention degree of the characteristic peak in the original X-ray fluorescence spectrum Ai to the sum is used as the confidence of the X-ray fluorescence intensity of the Cd element in the background-subtracted X-ray fluorescence spectrum Ci. The purpose of presetting a value greater than 0 is to avoid the denominator being 0. The value of the preset value greater than 0 is manually preset and can be set by the implementer. In this embodiment, the value of the preset value greater than 0 is 1.

[0085] In this embodiment, the fusion is the product of the overall distortion degree and the discreteness of the characteristic peak in the denoised X-ray fluorescence spectrum Bi.

[0086] In another embodiment, the fusion is the sum of the overall distortion degree and the discreteness of the characteristic peaks in the denoised X-ray fluorescence spectrum Bi.

[0087] It should be noted that: after denoising the original X-ray fluorescence spectrum Ai, the greater the degree of retention of the shape and area of ​​the characteristic peak in the original X-ray fluorescence spectrum Ai, that is, the larger it is, and after background subtraction of the denoised X-ray fluorescence spectrum Bi, the smaller the degree of distortion of the characteristic peak in the denoised X-ray fluorescence spectrum Bi, that is, the smaller Gi is, the higher the accuracy of the X-ray fluorescence intensity of the Cd element obtained by background subtraction of the X-ray fluorescence spectrum Ci; at the same time, the greater the uniformity of the particle size distribution of the substance in the rice brown rice sample Si, that is, the smaller Gi is, the higher the accuracy of the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of the rice brown rice sample Si is, and the greater the confidence Ui is. The schematic diagram of the confidence determination process is shown as follows. Figure 4 shown.

[0088] The confidence of the X-ray fluorescence intensity of the Cd element in the background-subtracted X-ray fluorescence spectrum of each brown rice sample is obtained by using the same acquisition method as the confidence Ui.

[0089] Step 5: determining the Cd content in the brown rice to be tested based on the Cd content in all the brown rice samples, the X-ray fluorescence intensity and the confidence level.

[0090] The Cd content in any brown rice sample and the X-ray fluorescence intensity of the Cd element in the background-subtracted X-ray fluorescence spectrum of any brown rice sample are used to form two-dimensional data points, and a rectangular coordinate system is established with the Cd content of the brown rice sample as the horizontal coordinate and the X-ray fluorescence intensity of the Cd element in the background-subtracted X-ray fluorescence spectrum as the vertical coordinate, and a weighted least square method is used to obtain a fitting straight line for all data points in the rectangular coordinate system, wherein the confidence is used as the weight of the corresponding data point in the fitting process, and the fitting straight line is used as a standard curve for measuring the Cd content in brown rice. The weighted least square method is a well-known technology and will not be described in detail in this application.

[0091] It should be noted that: if the accuracy of the X-ray fluorescence intensity of the Cd element in a certain background-subtracted X-ray fluorescence spectrum is higher, that is, the confidence is greater, then when a straight line is fitted to the data points in the rectangular coordinate system, the weight of the data point corresponding to the confidence should be greater.

[0092] The X-ray fluorescence intensity of the Cd element in the background-subtracted X-ray fluorescence spectrum of the brown rice to be detected is obtained, and recorded as the fluorescence intensity to be detected; the abscissa of the data point corresponding to the fluorescence intensity to be detected on the standard curve is obtained, and is used as the Cd content in the brown rice to be detected.

[0093] In summary, the present application analyzes the X-ray fluorescence spectrum of the rice brown rice sample, determines the overall retention degree based on the X-ray fluorescence spectrum before and after denoising, determines the overall distortion degree based on the X-ray fluorescence spectrum before and after background subtraction, and combines the overall retention degree, the overall distortion degree with the discreteness of the particle size distribution of the substance in the rice brown rice sample to determine the confidence level. It takes into account that the X-rays in the energy dispersive X-ray fluorescence spectrometer will interact with the substances in the rice brown rice sample, the noise introduced in the collected X-ray fluorescence spectrum, and the unevenness of the particle size distribution of the substance in the rice brown rice sample, all of which will affect the accuracy of obtaining the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of the rice brown rice sample, thereby improving the degree of distinction of the accuracy of the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectra of different rice brown rice samples.

[0094] Furthermore, the X-ray fluorescence intensity of the Cd element in the X-ray fluorescence spectrum of the rice brown rice sample was weighted based on the confidence level, and the weighted least squares method was used to obtain a standard curve for measuring the Cd content in rice brown rice. When establishing a standard curve for measuring the Cd content in rice brown rice, the X-ray fluorescence intensity with higher accuracy was assigned a higher weight, which improved the accuracy of the standard curve, and thereby improved the accuracy of the measurement of the Cd content in the rice brown rice to be tested.

[0095] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order 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, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.

[0096] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the basic features of the present application. Therefore, no matter from which point of view, the above embodiments of the present application should be regarded as exemplary and non-restrictive.

Claims

1. An intelligent method for measuring Cd content in brown rice based on spectral analysis, characterized in that: The method comprises the following steps: The X-ray fluorescence spectrum of each brown rice sample is collected respectively, wherein the Cd content of the brown rice samples is known and different from each other; Determining the overall retention degree of characteristic peaks in each non-denoised X-ray fluorescence spectrum based on the similarity of the spectral line shape between each non-denoised X-ray fluorescence spectrum and the denoised X-ray fluorescence spectrum; Determining the overall distortion degree of the characteristic peaks in each denoised X-ray fluorescence spectrum based on the similarity between the characteristic peaks of each denoised X-ray fluorescence spectrum and the X-ray fluorescence spectrum after background subtraction; Determining the confidence of the X-ray fluorescence intensity of the Cd element in each X-ray fluorescence spectrum after denoising and background subtraction based on the overall retention degree, the overall distortion degree and the discreteness of the particle size distribution of the substance in each brown rice sample; Based on the Cd content in all the brown rice samples, the X-ray fluorescence intensity and the confidence level, determining the Cd content in the brown rice to be tested; The overall retention degree is determined as follows: Each X-ray fluorescence spectrum that has not been subjected to denoising is recorded as each original X-ray fluorescence spectrum; Each X-ray fluorescence spectrum that has been subjected to denoising is recorded as each denoised X-ray fluorescence spectrum; Obtain the characteristic peak with the smallest peak position difference between each denoised X-ray fluorescence spectrum and any characteristic peak in the corresponding original X-ray fluorescence spectrum, and record it as the denoised characteristic peak; Based on the peak areas of any one of the characteristic peaks and the denoised characteristic peaks, determining the relative change degree of the peak area of ​​any one of the characteristic peaks; the relative change degree is the calculation result of the difference in peak area between any one of the characteristic peaks and the denoised characteristic peak over the peak area of ​​any one of the characteristic peaks; Calculating the spectral angle between each original X-ray fluorescence spectrum and the corresponding denoised X-ray fluorescence spectrum, and calculating the average of the relative changes in the peak areas of all characteristic peaks in each original X-ray fluorescence spectrum; Based on the spectral angle and the mean, the overall retention degree of the characteristic peaks in each original X-ray fluorescence spectrum is determined; the specific process is: Calculating a fusion result of the spectral angle and the mean, taking the reciprocal of the sum of the fusion result and a value of 1 as the overall retention degree of the characteristic peaks in each original X-ray fluorescence spectrum, and fusing it into the product of the spectral angle and the mean or the cumulative value of the spectral angle and the mean; The process of determining the overall distortion degree is as follows: Each denoised X-ray fluorescence spectrum that has been subjected to background subtraction processing is recorded as each background-subtracted X-ray fluorescence spectrum; Obtain the characteristic peak with the smallest peak position difference between each background-subtracted X-ray fluorescence spectrum and any characteristic peak in the corresponding denoised X-ray fluorescence spectrum, and record it as the background-subtracted characteristic peak; Calculate the difference in peak area between any one characteristic peak and the background-subtracted characteristic peak, and record it as the area difference; The ratio of the area difference to the peak area of ​​any one of the characteristic peaks is taken as the relative change value of the peak area of ​​any one of the characteristic peaks; Determine the degree of distortion of any one characteristic peak based on the peak position difference, peak width difference, and relative change value between any one characteristic peak and the background-subtracted characteristic peak; the degree of distortion is the product of the peak position difference, the peak width difference, and the relative change value; The average of the distortion degrees of all characteristic peaks in each denoised X-ray fluorescence spectrum is taken as the overall distortion degree of the characteristic peaks in each denoised X-ray fluorescence spectrum; The confidence determination process is: The overall distortion degree of the characteristic peaks in each denoised X-ray fluorescence spectrum is fused with the corresponding discreteness, and the sum of the fusion result and a numerical value of 1 is calculated; the fusion is the product of the overall distortion degree of the characteristic peaks in the denoised X-ray fluorescence spectrum and the discreteness or the sum of the overall distortion degree of the characteristic peaks in the denoised X-ray fluorescence spectrum and the discreteness; Determining the confidence of the X-ray fluorescence intensity of the Cd element in each background-subtracted X-ray fluorescence spectrum based on the overall retention degree of the characteristic peaks in each original X-ray fluorescence spectrum and the corresponding sum value; The confidence level is a normalized value of the ratio of the overall retention degree of the characteristic peaks in each original X-ray fluorescence spectrum to the corresponding sum value; The process for determining the Cd content in the brown rice to be tested is as follows: The Cd content in any brown rice sample and the X-ray fluorescence intensity of the Cd element in the background-subtracted X-ray fluorescence spectrum of any brown rice sample are used to form two-dimensional data points; A rectangular coordinate system was established with the Cd content of the brown rice sample as the abscissa and the X-ray fluorescence intensity of the Cd element in the background-subtracted X-ray fluorescence spectrum as the ordinate; A weighted least square method is used to obtain a fitting straight line for all data points in the rectangular coordinate system, wherein the confidence level is used as a weight of the corresponding data point in the fitting process; The X-ray fluorescence intensity of the Cd element in the background-subtracted X-ray fluorescence spectrum of the brown rice to be detected is obtained, and recorded as the fluorescence intensity to be detected; the abscissa of the data point corresponding to the fluorescence intensity to be detected on the fitting straight line is obtained, and is taken as the Cd content in the brown rice to be detected.