Mineral trace element detection method
By using high-resolution spectrometer and Fourier transform infrared spectroscopy technology in mineral trace element detection, combined with support vector machine algorithm and cross-verification optimization model parameters, the slow detection speed, high cost and insufficient accuracy in the existing technology is solved. Problem, fast, accurate and reliable trace element detection is achieved.
Patent Information
- Application Number
- CN202411555957.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has problems such as complex operation, high cost and long-term operation in the detection of mineral trace elements, especially in the face of rapid screening of large numbers of samples, and how to effectively extract trace elements from complex spectral data. The information is also a challenge.
High-resolution spectrometer and Fourier transform infrared spectroscopy technology are used to collect and pre-process the spectral data and the content of trace elements through feature wavelength selection and support vector machine algorithm, and the regression model between spectral data and trace element content is constructed through 50% cross-verification and network Search to optimize model parameters.
It improves the speed and accuracy of the detection, ensures the accuracy and reliability of the results, enhances the applicability and efficiency of the detection method, and can effectively extract trace elements information from complex spectral data.
Smart Images

Figure CN119492701A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of mineral analysis, in particular to a method for detecting trace elements in minerals. Background Art
[0002] With the deepening of mineral resource development, the accurate determination of trace elements in minerals has become increasingly important. Although trace elements are low in content, they have an important impact on the properties, formation environment and subsequent applications of minerals. Traditional trace element detection methods such as atomic absorption spectroscopy and inductively coupled plasma mass spectrometry, although with high accuracy, generally have problems such as complex operation, high cost and long time consumption. Especially when faced with the rapid screening of a large number of samples, these traditional methods are often difficult to meet the needs.
[0003] In recent years, spectral technology has been widely used in the field of mineral analysis due to its rapid and non-destructive characteristics. In particular, the development of near-infrared spectroscopy and Fourier transform infrared spectroscopy has provided a new way to detect trace elements in minerals. However, how to effectively extract trace element information from complex spectral data remains a challenge. In addition, due to the diversity and complexity of mineral samples themselves, how to ensure the accuracy and reliability of the detection method is also an urgent problem to be solved. Therefore, we proposed a method for detecting trace elements in minerals. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] In view of the deficiencies in the prior art, the present invention provides a method for detecting trace elements in minerals, which has the advantages of being able to fully utilize useful information in spectral data, reduce unnecessary preprocessing steps, improve detection efficiency, and ensure the accuracy of results. It solves the problem that in recent years, spectral technology has been widely used in the field of mineral analysis due to its rapid and non-destructive characteristics, especially the development of near-infrared spectroscopy technology and Fourier transform infrared spectroscopy technology, which provides a new way to detect trace elements in minerals. However, how to effectively extract trace element information from complex spectral data remains a challenge. In addition, due to the diversity and complexity of mineral samples themselves, how to ensure the accuracy and reliability of the detection method is also a problem to be solved urgently.
[0006] (II) Technical solution
[0007] In order to achieve the above-mentioned purpose of making full use of the useful information in the spectral data, reducing unnecessary preprocessing steps, improving the detection efficiency, and ensuring the accuracy of the results, the present invention provides the following technical solution: a method for detecting trace elements in minerals, comprising the following steps:
[0008] S1. Sample preparation: Grind the mineral sample to be tested to a particle size of less than 10 microns;
[0009] S2, spectrum acquisition: Use a high-resolution spectrometer to collect the spectrum of the sample;
[0010] S3, spectral data processing: Fourier transform infrared spectroscopy technology is used to pre-process the collected spectral data, including baseline correction, noise filtering and spectral smoothing;
[0011] S4. Characteristic wavelength selection: Select specific characteristic wavelengths based on the spectral characteristics of trace elements in minerals;
[0012] S5. Spectral analysis model construction: Use support vector machine algorithm to construct a regression model between spectral data and trace element content;
[0013] S6, model training and validation: The model was trained and validated using the 5-fold cross validation method, and the model parameters were optimized through grid search;
[0014] S7. Trace element content prediction: input the spectral data of the sample to be tested into the model to predict its trace element content;
[0015] S8. Result output: The predicted results are output in the form of a report, including the type and content of trace elements, as well as test conditions, sample information and test date.
[0016] Preferably, the baseline correction is performed using a polynomial fitting method to remove nonspecific background signals in the spectrum; the spectrum expression after correction is:
[0017] S ′ (λ)=S(λ)―B(λ)
[0018] Among them, the original spectrum is S(λ), and the corrected spectrum is S ′ (λ), B(λ) is the background signal obtained by polynomial fitting.
[0019] Preferably, a Savitzky-Golay filter is used to filter noise to improve data quality; the spectral expression after filtering is:
[0020]
[0021] Among them, the filtered spectrum is S″(λ), w is the filter window size, c i are the filter coefficients obtained by polynomial regression.
[0022] Preferably, the moving average method is used to smooth the spectrum to reduce random noise; the spectrum expression after smoothing is:
[0023]
[0024] The smoothed spectrum is S″′(λ), and n is the window size of the moving average.
[0025] Preferably, the characteristic wavelength is selected based on that the characteristic wavelength of iron is 2.3 microns and the characteristic wavelength of copper is 1.52 microns.
[0026] Preferably, the support vector machine algorithm predicts the target value by constructing a hyperplane, given a training data set of where x i is the input feature, y i is the target value. The goal of SVM is to minimize the loss function and maximize the interval. The loss function usually adopts the ε-insensitive loss function, that is:
[0027]
[0028] Among them, w is the weight vector, C is the penalty coefficient, ξ i and is the slack variable, ∈ is the insensitive bandwidth in the loss function, and the parameters of the SVM model are obtained by solving the optimization problem.
[0029] Preferably, the support vector machine algorithm also maps the data to a high-dimensional space through a kernel function to process nonlinear relationships, and the model is expressed as:
[0030]
[0031] The kernel function is K(x,x i ), α i and is the Lagrange multiplier and b is the bias term.
[0032] Preferably, the five-fold cross-validation method randomly divides the data set into five subsets, takes turns using one of the subsets as a validation set and the remaining subsets as training sets, trains the SVM model, and evaluates the model performance through the validation set.
[0033] Preferably, during the training process of the SVM model, a grid search method is used to find the optimal parameter combination, that is, by defining a parameter space and finding the best parameter combination in the space; the value range of the penalty coefficient C is from 0.1 to 100, and the search is performed with a step size of 1; the value range of the kernel function parameter γ is from 0.01 to 1, and the search is performed with a step size of 0.01; then the grid search is expressed as:
[0034]
[0035] Here, the parameter space is P, and CV(C,γ) is the cross-validation error when using parameters C and γ.
[0036] Preferably, the spectral data of the sample to be tested is input into the trained model to predict its trace element content; the prediction process is based on the trained model, and the spectral data of the unknown sample is input to output the predicted trace element content.
[0037] (III) Beneficial effects
[0038] Compared with the prior art, the present invention provides a method for detecting trace elements in minerals, which has the following features:
[0039] Beneficial effects:
[0040] 1. This method for detecting trace elements in minerals adopts a high-resolution spectrometer and Fourier transform infrared spectroscopy technology. This technical solution can quickly collect a large amount of spectral data, and remove background noise and improve data quality through preprocessing steps. This method not only improves the detection speed, but also improves the accuracy of the detection results through precise characteristic wavelength selection and optimization of the support vector machine algorithm. In particular, the model parameters are optimized through 5-fold cross-validation and grid search to ensure the generalization ability and prediction accuracy of the model, thereby ensuring the accuracy and reliability of the detection method while also improving the detection efficiency.
[0041] 2. This mineral trace element detection method can effectively extract trace element information from complex spectral data through spectral data processing and characteristic wavelength selection. In particular, through the support vector machine algorithm, this method can handle nonlinear relationships and map data to high-dimensional space through kernel functions, which enables the model to adapt to the diversity and complexity of mineral samples. In addition, through parameter optimization during training and verification, this method can adapt to the characteristics of different samples, ensuring the applicability and accuracy of the detection method on different samples; this flexibility and adaptability are difficult to achieve with traditional detection methods, thereby providing a more effective and reliable detection method for the field of mineral analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a schematic diagram of the flow chart of the mineral trace element detection method of the present invention. DETAILED DESCRIPTION
[0043] The following will be combined with the embodiments of the present invention and the accompanying drawings to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] See also Figure 1 , a method for detecting trace elements in minerals, comprising the following steps:
[0045] S1. Sample preparation: Grind the mineral sample to be tested to a particle size of less than 10 microns;
[0046] S2, spectrum acquisition: Use a high-resolution spectrometer to collect the spectrum of the sample;
[0047] S3, spectral data processing: Fourier transform infrared spectroscopy technology is used to pre-process the collected spectral data, including baseline correction, noise filtering and spectral smoothing;
[0048] S4. Characteristic wavelength selection: Select specific characteristic wavelengths based on the spectral characteristics of trace elements in minerals;
[0049] S5. Spectral analysis model construction: Use support vector machine algorithm to construct a regression model between spectral data and trace element content;
[0050] S6, Model training and validation: Use the 5-fold cross validation method to train and validate the model, and optimize the model parameters through grid search;
[0051] S7. Trace element content prediction: input the spectral data of the sample to be tested into the model to predict its trace element content;
[0052] S8. Result output: The predicted results are output in the form of a report, including the type and content of trace elements, as well as test conditions, sample information and test date.
[0053] Specifically, the mineral sample is ground to a particle size of less than 10 microns by a planetary mill to ensure the uniformity and consistency of the sample particle size, and the sample should be ground in a vacuum environment to avoid the influence of oxidation or other chemical reactions;
[0054] When using a high-resolution spectrometer for spectral acquisition, an appropriate wavelength range and resolution should be selected to ensure that the characteristic spectra of trace elements can be captured. For example, for near-infrared spectroscopy, a wavelength range of 400-2500nm is selected, and the resolution is set to 1nm or higher;
[0055] When outputting the prediction results, in addition to the type and content of trace elements, it also includes detection conditions (such as spectral acquisition parameters, environmental conditions, etc.), sample information (such as sample number, acquisition date, etc.) and detection date; this information can be achieved through an automated report generation system to ensure the accuracy and traceability of the data.
[0056] Furthermore, the baseline correction was performed using a polynomial fitting method to remove nonspecific background signals in the spectrum; the spectrum expression after correction is:
[0057] S ′ (λ)=S(λ)―B(λ)
[0058] Among them, the original spectrum is S(λ), and the corrected spectrum is S ′ (λ), B(λ) is the background signal obtained by polynomial fitting.
[0059] Specifically, when performing baseline correction, the appropriate polynomial order should be selected according to the characteristics of the spectral data; generally, the order should be selected based on the complexity of the spectral data and the characteristics of the background signal. For example, for spectra with obvious linear or quadratic background, a second-order or third-order polynomial can be selected for fitting;
[0060] After completing the baseline correction, the correction effect is evaluated by visual inspection and statistical methods (such as residual analysis) to ensure that the background signal is effectively removed without affecting the characteristic information of trace elements in the spectral data.
[0061] Furthermore, the Savitzky-Golay filter is used to filter noise to improve data quality; the spectral expression after filtering is:
[0062]
[0063] Among them, the filtered spectrum is S″(λ), w is the filter window size, c i are the filter coefficients obtained by polynomial regression.
[0064] Specifically, the window size of the Savitzky-Golay filter has an important influence on the filtering effect; the window size should be selected according to the noise level and signal characteristics of the spectral data. Generally, the larger the window size, the smoother the filtering effect, but it may cause signal distortion. Therefore, it is necessary to find a balance between filtering effect and signal fidelity.
[0065] In the Savitzky-Golay filter, the order of the polynomial regression will also affect the filtering effect; the higher the order, the better the filter fits the signal, but it may also lead to excessive smoothing of the signal. Therefore, the appropriate order should be selected according to the characteristics of the spectral data.
[0066] Furthermore, the moving average method is used to smooth the spectrum to reduce random noise; the spectrum expression after smoothing is:
[0067]
[0068] The smoothed spectrum is S″′(λ), and n is the window size of the moving average.
[0069] Specifically, the size of the moving average window has a direct impact on the smoothing effect; if the window is too large, the important features of the signal may be over-smoothed, while if the window is too small, the noise may not be effectively removed; therefore, the appropriate window size should be determined based on the noise level of the spectral data and the frequency characteristics of the signal. Usually, the optimal window size can be determined through experiments or using statistical methods.
[0070] After spectral smoothing is completed, the smoothing effect can be evaluated by comparing the spectral data before and after smoothing; the smoothing effect can be evaluated by visual inspection and calculation of the signal-to-noise ratio (SNR) before and after smoothing to ensure that the smoothing process has both removed noise and retained important signal features.
[0071] Furthermore, the characteristic wavelength is selected based on that the characteristic wavelength of iron is 2.3 microns and the characteristic wavelength of copper is 1.52 microns.
[0072] Furthermore, the support vector machine algorithm predicts the target value by constructing a hyperplane. Given the training data set where x i is the input feature, y i is the target value. The goal of SVM is to minimize the loss function and maximize the interval. The loss function usually adopts the ε-insensitive loss function, that is:
[0073]
[0074] Among them, w is the weight vector, C is the penalty coefficient, ξ i and is the slack variable, ∈ is the insensitive bandwidth in the loss function, and the parameters of the SVM model are obtained by solving the optimization problem.
[0075] Specifically, the insensitive bandwidth (ε) in the ε-insensitive loss function is a key parameter that determines the model's tolerance to prediction errors. The appropriate ε value is determined through experiments and model verification to balance the model's complexity and prediction accuracy.
[0076] After the model training is completed, the prediction performance of the model can be verified by an independent test data set; the mean square error (MSE), determination coefficient (R 2 ) and other statistical indicators to evaluate the accuracy and reliability of the model; in addition, the stability and generalization ability of the model should also be evaluated to ensure that the model can maintain good performance under different samples and detection conditions.
[0077] Furthermore, the support vector machine algorithm also maps data to a high-dimensional space through a kernel function to handle nonlinear relationships. The model is expressed as:
[0078]
[0079] The kernel function is K(x, x i), α i and is the Lagrange multiplier and b is the bias term.
[0080] Specifically, the choice of kernel function is crucial for dealing with nonlinear relationships; commonly used kernel functions include linear kernel, polynomial kernel, radial basis function (RBF) kernel, etc. The choice of kernel function depends on the characteristics of the data and the complexity of the problem. For example, for data sets with complex decision boundaries, RBF kernels usually provide better performance;
[0081] In the SVM model, Lagrange multipliers and bias terms are key parameters that determine model performance. These parameters are usually determined by optimization algorithms (such as the sequential minimal optimization (SMO) algorithm). During the optimization process, it is necessary to ensure the convergence of the algorithm and the stability of the parameters.
[0082] Furthermore, the five-fold cross-validation method randomly divides the dataset into five subsets, takes one of the subsets as the validation set and the remaining subsets as the training set in turn, trains the SVM model, and evaluates the model performance through the validation set.
[0083] Specifically, in each fold of validation, one subset is used as the validation set, and the remaining four subsets are used as training sets. This process needs to be automated to ensure that the validation of each fold is independent and consistent.
[0084] After each fold validation, the performance of the model needs to be evaluated, such as accuracy, recall, F1 score, etc.; these indicators can help determine the performance of the model on different subsets and ultimately select the best model parameters.
[0085] Furthermore, during the training process of the SVM model, a grid search method is used to find the optimal parameter combination, that is, by defining a parameter space and finding the best parameter combination in the space; the value range of the penalty coefficient C is from 0.1 to 100, and the search is performed with a step size of 1; the value range of the kernel function parameter γ is from 0.01 to 1, and the search is performed with a step size of 0.01; the grid search is expressed as:
[0086]
[0087] Here, the parameter space is P, and CV(C,γ) is the cross-validation error when using parameters C and γ.
[0088] Specifically, before conducting a grid search, a parameter space needs to be defined, including the possible value ranges of the penalty coefficient and kernel function parameters; this space should be large enough to cover possible optimal parameter combinations;
[0089] Grid search can be implemented by traversing the defined parameter space, using cross-validation to evaluate the performance of the model under each set of parameters, and recording the optimal parameter combination.
[0090] Furthermore, the spectral data of the sample to be tested is input into the trained model to predict its trace element content; the prediction process is based on the trained model, and the spectral data of the unknown sample is input to output the predicted trace element content.
[0091] Specifically, before the spectral data of the sample to be tested is input into the model, the same preprocessing steps as the training data are required, including baseline correction, noise filtering, and spectral smoothing; this ensures the consistency and accuracy of the model input;
[0092] To ensure the accuracy of the prediction results, the prediction performance of the model can be evaluated by comparing with samples with known contents or using additional validation datasets; this helps to assess the reliability and effectiveness of the model in practical applications.
[0093] In summary, the mineral trace element detection method adopts a high-resolution spectrometer and Fourier transform infrared spectroscopy technology. This technical solution can quickly collect a large amount of spectral data, and remove background noise and improve data quality through preprocessing steps. This method not only improves the detection speed, but also improves the accuracy of the detection results through precise characteristic wavelength selection and optimization of the support vector machine algorithm. In particular, the model parameters are optimized through 5-fold cross-validation and grid search to ensure the generalization ability and prediction accuracy of the model, thereby ensuring the accuracy and reliability of the detection method while also improving the detection efficiency.
[0094] Specifically, the mineral trace element detection method can effectively extract trace element information from complex spectral data through spectral data processing and characteristic wavelength selection. In particular, through the support vector machine algorithm, the method can handle nonlinear relationships and map data to high-dimensional space through kernel functions, which enables the model to adapt to the diversity and complexity of mineral samples. In addition, through parameter optimization during training and verification, the method can adapt to the characteristics of different samples, ensuring the applicability and accuracy of the detection method on different samples; this flexibility and adaptability are difficult to achieve with traditional detection methods, thereby providing a more effective and reliable detection method for the field of mineral analysis, solving the problem that in recent years, spectral technology has been widely used in the field of mineral analysis due to its rapid and non-destructive characteristics, especially the development of near-infrared spectroscopy technology and Fourier transform infrared spectroscopy technology, which provides a new way for the detection of mineral trace elements. However, how to effectively extract trace element information from complex spectral data remains a challenge. In addition, due to the diversity and complexity of mineral samples themselves, how to ensure the accuracy and reliability of the detection method is also a problem to be solved urgently.
[0095] The relevant modules involved in this system are all hardware system modules or functional modules that combine computer software programs or protocols with hardware in the prior art. The computer software programs or protocols involved in the functional modules are themselves technologies that are well known to those skilled in the art and are not improvements of this system. The improvements of this system are the interaction or connection relationships between the modules, that is, improvements to the overall structure of the system to solve the corresponding technical problems to be solved by this system.
[0096] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for detecting trace elements in minerals, characterized in that: The following steps are involved: S1. Sample preparation: Grind the mineral sample to be tested to a particle size of less than 10 microns; S2, spectrum acquisition: Use a high-resolution spectrometer to collect the spectrum of the sample; S3, spectral data processing: Fourier transform infrared spectroscopy technology is used to pre-process the collected spectral data, including baseline correction, noise filtering and spectral smoothing; S4. Characteristic wavelength selection: Select specific characteristic wavelengths based on the spectral characteristics of trace elements in minerals; S5. Spectral analysis model construction: Use support vector machine algorithm to construct a regression model between spectral data and trace element content; S6, model training and validation: The model was trained and validated using the 5-fold cross validation method, and the model parameters were optimized through grid search; S7. Trace element content prediction: input the spectral data of the sample to be tested into the model to predict its trace element content; S8. Result output: The predicted results are output in the form of a report, including the type and content of trace elements, as well as test conditions, sample information and test date.
2. A method for detecting trace elements in minerals according to claim 1, characterized in that: The S3, baseline correction is performed using a polynomial fitting method to remove nonspecific background signals in the spectrum; the spectrum expression after correction is: S ′ (λ)=S(λ)―B(λ) Among them, the original spectrum is S(λ), and the corrected spectrum is S ′ (λ), B(λ) is the background signal obtained by polynomial fitting.
3. A method for detecting trace elements in minerals according to claim 1, characterized in that: S3 uses a Savitzky-Golay filter to filter noise to improve data quality; the spectral expression after filtering is: Where the filtered spectrum is s″(λ), w is the filter window size, c i are the filter coefficients obtained by polynomial regression.
4. A method for detecting trace elements in minerals according to claim 1, characterized in that: The S3 uses the moving average method to smooth the spectrum to reduce random noise; the spectrum expression after smoothing is: The smoothed spectrum is S″′(λ), and n is the window size of the moving average.
5. A method for detecting trace elements in minerals according to claim 1, characterized in that: The characteristic wavelength of S4 is selected based on the characteristic wavelength of iron element being 2.3 microns and the characteristic wavelength of copper element being 1.52 microns.
6. A method for detecting trace elements in minerals according to claim 1, characterized in that: In S5, the support vector machine algorithm predicts the target value by constructing a hyperplane. Given the training data set: where x i is the input feature, y i is the target value. The goal of SVM is to minimize the loss function and maximize the interval. The loss function usually adopts the ε-insensitive loss function, that is: Among them, w is the weight vector, C is the penalty coefficient, ξ i and is the slack variable, ∈ is the insensitive bandwidth in the loss function, and the parameters of the SVM model are obtained by solving the optimization problem.
7. A method for detecting trace elements in minerals according to claim 6, characterized in that: The support vector machine algorithm also maps data to a high-dimensional space through a kernel function to handle nonlinear relationships. The model is expressed as: The kernel function is K(x,x i ), α i and is the Lagrange multiplier and b is the bias term.
8. A method for detecting trace elements in minerals according to claim 1, characterized in that: The S6, five-fold cross-validation method randomly divides the data set into five subsets, takes one of the subsets as the validation set and the remaining subsets as the training set in turn, trains the SVM model, and evaluates the model performance through the validation set.
9. A method for detecting trace elements in minerals according to claim 8, characterized in that: During the training process of the SVM model, a grid search method is used to find the optimal parameter combination, that is, by defining a parameter space and finding the best parameter combination in the space; the penalty coefficient C ranges from 0.1 to 100, and the search is performed with a step size of 1; the kernel function parameter γ ranges from 0.01 to 1, and the search is performed with a step size of 0.01; the grid search is expressed as: Here, the parameter space is P, and CV(C,γ) is the cross-validation error when using parameters C and γ.
10. A method for detecting trace elements in minerals according to claim 1, characterized in that: In the step S7, the spectral data of the sample to be tested is input into the trained model to predict its trace element content; the prediction process is based on the trained model, and the spectral data of the unknown sample is input to output the predicted trace element content.
Citation Information
Cited By
Anoectochilus formosanus plant leaf authenticity identification and strain classification method and system
CN120213831A