Element detection method and device based on model fusion migration, medium and equipment
By training multiple machine learning models in laboratory and simulated application scenarios and constructing a fusion weight matrix, the problem of insufficient detection accuracy in laser-induced breakdown spectroscopy analysis was solved, and high-precision online detection of multi-element content in complex minerals was achieved.
Patent Information
- Application Number
- CN202510983905.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-07-17
AI Technical Summary
Existing technologies for analyzing mineral element content using laser-induced breakdown spectroscopy are affected by chemical and physical matrix effects, resulting in insufficient accuracy to meet the requirements for in-situ, online, and multi-element detection and analysis of complex minerals.
A model fusion transfer learning approach is adopted, which trains multiple machine learning models in laboratory and simulated application scenarios, constructs a fusion weight matrix, and optimizes the fusion weight matrix by combining external test data from real application scenarios. This enables the combined prediction of multiple regression models and improves detection accuracy.
It effectively overcomes the shortcomings of single models in generalization optimization, improves the detection accuracy of multiple element contents in complex minerals, and meets the requirements of in-situ and online detection and analysis of complex minerals.
Smart Images

Figure CN120609806B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of analyzing mineral element content using laser-induced breakdown spectral data, and particularly to an element detection method, apparatus, medium, and equipment based on model fusion transfer. Background Technology
[0002] In-situ online detection and analysis of complex substances (including substances with complex chemical compositions and complex physical forms, such as mineral fragments) is of great significance to many fields, such as mineral mining and processing, customs inspection of imported minerals, and industrial process optimization and control. Generally, it is necessary to perform multi-element and multi-index detection and analysis on minerals to provide in-situ, online, real-time, and accurate analytical data.
[0003] In related technologies, a single machine learning algorithm is typically used to analyze laser-induced breakdown spectroscopy (LIBS) data to detect the content of various elements in minerals in real time. However, in practical applications, the spectral data of minerals from different sources may be significantly affected by chemical matrix effects; the spectral data may also be significantly affected by physical matrix effects, such as the particle size distribution and surface morphology variations of mineral fragments; the spectral data may also be affected by a combination of matrix effects, which cannot be accurately described and corrected by physical models. These factors affect the accuracy of the final mineral element content detection. Specifically, a single model trained in the laboratory may not be able to optimize its generalization performance for practical applications due to problems with model algorithm selection or model adaptation preferences for the spectral characteristics of various elements.
[0004] Therefore, there is a need for a new method for detecting mineral element content to improve the accuracy of mineral element content detection and meet the requirements for in-situ, online, and multi-element detection and analysis of complex minerals. Summary of the Invention
[0005] To address the problems existing in the prior art, this application provides a method, apparatus, medium, and device for element detection based on model fusion transfer, in order to solve or partially solve the technical problem in the prior art where the detection accuracy cannot be guaranteed when analyzing mineral spectral data to detect the content of complex mineral elements.
[0006] A first aspect of this application provides an element detection method based on model fusion transfer, the method comprising:
[0007] Laser-induced breakdown spectra of training mineral samples are collected in a laboratory setting to obtain a training spectral dataset; laser-induced breakdown spectra of internal test mineral samples are collected in the same laboratory setting to obtain an internal test spectral dataset; the training spectral dataset and the internal test spectral dataset are used to train and test various machine learning models to obtain corresponding regression models.
[0008] Laser-induced breakdown spectra of external test mineral samples from various real-world application scenarios are collected in simulated application scenarios to obtain external test spectrum datasets. The pre-constructed fusion weight matrix is then optimized using the external test spectrum datasets from each real-world application scenario and the various regression models to obtain the optimized fusion weight matrix for each real-world application scenario.
[0009] In the target actual application scenario, the spectrum of the mineral to be tested is collected to obtain the spectral dataset of the mineral to be tested. The spectral dataset of the mineral to be tested is preprocessed to obtain the preprocessed spectral dataset of the mineral to be tested.
[0010] The preprocessed spectral dataset of the mineral to be tested is input into the various regression models respectively to obtain the current predicted content of several elements corresponding to the preprocessed spectral dataset of the mineral to be tested for each regression model;
[0011] By optimizing the fusion weight matrix of the target actual application scenario, the current predicted contents of several elements corresponding to the preprocessed mineral spectral dataset of the various regression models are combined to obtain the fusion predicted contents of several elements in the mineral to be tested.
[0012] In the above scheme, the step of using the training spectral dataset and the internal test spectral dataset to train and test multiple machine learning models respectively, to obtain corresponding multiple regression models, includes:
[0013] The actual content of several elements in the training mineral sample is obtained as the label element content of the training mineral sample set; the actual content of the internal test mineral sample is obtained as the label element content of the internal test mineral sample set.
[0014] The training spectral dataset is preprocessed to obtain a preprocessed training spectral dataset; the internal test spectral dataset is preprocessed to obtain a preprocessed internal test spectral dataset.
[0015] Using the preprocessed training spectral dataset as input variables, various machine learning models are trained under the supervision of the labeled element content of the training mineral samples. Cross-validation and model iteration are performed during the training process until the training termination condition is met, resulting in multiple regression models.
[0016] For each regression model, and for the labeled element content of the internal test mineral sample, the performance of the regression model is tested using the preprocessed internal test spectral dataset. If the performance of the regression model does not meet the requirements, the regression model is retrained according to the adjusted training strategy until the performance of the regression model meets the requirements.
[0017] In the above scheme, the optimization of the pre-constructed fusion weight matrix using the external test spectral dataset and the multiple regression models includes:
[0018] The external test spectrum dataset is preprocessed to obtain a preprocessed external test spectrum dataset;
[0019] The actual content of several elements in the external test mineral sample is obtained and used as the labeled element content of the external test mineral sample;
[0020] Based on a preset optimization algorithm, the predicted content of several elements in an external test mineral sample by the various regression models is used as the input variable, and the content of the labeled elements in the external test mineral sample is used as the target. The fusion weight matrix is iteratively optimized until the preset requirements are met, and the optimized fusion weight matrix is output.
[0021] The predicted content of several elements in the externally tested mineral samples by the various regression models is obtained by performing calculations on the preprocessed externally tested spectral dataset by the various regression models respectively.
[0022] In the above scheme, before optimizing the pre-constructed fusion weight matrix using the external test spectral dataset and the multiple regression models, the method further includes:
[0023] The dimension of the fusion weight matrix is determined based on the number of the aforementioned elements and the number of regression models; the dimension of the fusion weight matrix is... The fusion weight matrix includes the weight and prediction bias of each regression model when predicting each element, in calculating the fusion prediction content of each element; M The quantity of the aforementioned elements, the N The number of regression models;
[0024] In the fusion weight matrix, for each element, a preset initial value is assigned to the weight contributed by each regression model when predicting each element and the prediction bias, respectively.
[0025] In the above scheme, the optimization algorithm based on a preset method uses the predicted content of several elements in the external test mineral sample by multiple regression models as input variables, and the content of the labeled elements in the external test mineral sample as the target, to iteratively optimize the fusion weight matrix, including:
[0026] Based on the fusion weight matrix corresponding to each iteration, the predicted contents of the several elements are combined and the prediction deviation of the corresponding elements in the fusion weight matrix is added to obtain the fusion predicted contents of several elements in the external test mineral sample.
[0027] With the goal of reducing the residual value between the fusion predicted content and the labeled element content of several elements in the external test mineral sample, the matrix elements of the fusion weight matrix are used as the parameters to be optimized, and the optimization algorithm is used to iteratively optimize the fusion weight matrix until the optimization termination condition is reached.
[0028] The residual value is calculated using a pre-constructed residual function and is used to characterize the error between the fusion predicted content of several elements in an externally tested mineral sample and the content of their respective labeled elements.
[0029] In the above scheme, the step of combining the current predicted contents of several elements corresponding to the preprocessed spectral dataset of the mineral to be tested by the multiple regression models with the optimized fusion weight matrix of the target actual application scenario to obtain the fused predicted contents of several elements in the mineral to be tested includes:
[0030] For each element, the weights contributed by each regression model in the optimized fusion weight matrix when predicting each element, and the current prediction content of each regression model for each element are weighted and combined to obtain the weighted combined prediction content of each element.
[0031] The weighted combined prediction content of each element is added to the prediction deviation of the corresponding element in the optimized fusion weight matrix to obtain the fusion prediction content of each element.
[0032] A second aspect of this application provides an element detection device based on model fusion transfer, the device comprising:
[0033] The training unit is used to collect laser-induced breakdown spectra of training mineral samples in a laboratory setting to obtain a training spectral dataset; to collect laser-induced breakdown spectra of internal test mineral samples in the same laboratory setting to obtain an internal test spectral dataset; and to train and test various machine learning models using the training spectral dataset and the internal test spectral dataset to obtain various corresponding regression models.
[0034] The optimization unit is used to collect the laser-induced breakdown spectra of external test mineral samples in each actual application scenario in the simulated application scenario, obtain the external test spectrum dataset, and use the external test spectrum dataset of each actual application scenario and the multiple regression models to optimize the pre-constructed fusion weight matrix to obtain the optimized fusion weight matrix for each actual application scenario.
[0035] The acquisition unit is used to acquire the spectrum of the mineral to be tested in the target actual application scenario, obtain the spectral dataset of the mineral to be tested, and preprocess the spectral dataset of the mineral to be tested to obtain the preprocessed spectral dataset of the mineral to be tested.
[0036] The prediction unit is used to input the preprocessed spectral dataset of the mineral to be tested into the various regression models respectively, and obtain the current predicted content of several elements corresponding to the preprocessed spectral dataset of the mineral to be tested for each regression model;
[0037] The fusion unit is used to combine the current predicted contents of several elements corresponding to the preprocessed mineral spectral dataset of the target actual application scenario through the optimized fusion weight matrix to obtain the fused predicted contents of several elements in the mineral to be tested.
[0038] In the above scheme, the training unit is specifically used for:
[0039] The actual content of several elements in the training mineral sample is obtained as the label element content of the training mineral sample set; the actual content of the internal test mineral sample is obtained as the label element content of the internal test mineral sample set.
[0040] The training spectral dataset is preprocessed to obtain a preprocessed training spectral dataset; the internal test spectral dataset is preprocessed to obtain a preprocessed internal test spectral dataset.
[0041] Using the preprocessed training spectral dataset as input variables, various machine learning models are trained under the supervision of the labeled element content of the training mineral samples. Cross-validation and model iteration are performed during the training process until the training termination condition is met, resulting in multiple regression models.
[0042] For each regression model, and for the labeled element content of the internal test mineral sample, the performance of the regression model is tested using the preprocessed internal test spectral dataset. If the performance of the regression model does not meet the requirements, the regression model is retrained according to the adjusted training strategy until the performance of the regression model meets the requirements.
[0043] A third aspect of this application provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method described in any of the first aspects.
[0044] A fourth aspect of this application provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods in the first aspect.
[0045] This application provides a method, apparatus, and device for element detection based on model fusion transfer. The method includes: acquiring laser-induced breakdown spectra of training mineral samples in a laboratory setting to obtain a training spectral dataset; acquiring laser-induced breakdown spectra of internal test mineral samples in the laboratory setting to obtain an internal test spectral dataset; training and testing multiple machine learning models using the training spectral dataset and the internal test spectral dataset to obtain corresponding multiple regression models; acquiring laser-induced breakdown spectra of external test mineral samples from various actual application scenarios in a simulated application scenario to obtain an external test spectral dataset; optimizing a pre-constructed fusion weight matrix using the external test spectral datasets from each actual application scenario and the multiple regression models to obtain an optimized fusion weight matrix for each actual application scenario; acquiring the spectra of the mineral to be tested in the target actual application scenario to obtain a mineral to be tested spectral dataset; and optimizing the spectra of the mineral to be tested... The dataset is preprocessed to obtain a preprocessed spectral dataset of the mineral to be tested. This preprocessed dataset is then input into various regression models to obtain the current predicted content of several elements corresponding to the preprocessed dataset for each model. Using an optimized fusion weight matrix based on the target application scenario, the current predicted content of several elements corresponding to the preprocessed dataset is combined to obtain the fused predicted content of several elements in the mineral to be tested. Thus, since different types of regression models have different preferences for different elements, different regression models are used to calculate the spectra, and the predicted content of each model is combined. This achieves optimized adaptation of different types of regression models in the laboratory to the minerals to be tested in the application field, effectively overcoming the limitation of a single model's inability to optimize generalization, improving the accuracy of detecting multiple element contents in complex minerals, and meeting the requirements for in-situ and online detection and analysis of complex minerals. Attached Figure Description
[0046] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0047] Figure 1 A schematic flowchart of a mineral element content detection method based on model fusion transfer according to an embodiment of this application is shown;
[0048] Figure 2 A schematic diagram illustrating the optimization of the fusion weight matrix and the final optimized fusion prediction content generation process according to an embodiment of this application is shown.
[0049] Figure 3 A comparison chart showing the element content predicted by model fusion and independent regression models according to an embodiment of this application and the labeled element content of external bauxite crushed stone samples is shown.
[0050] Figure 4 A graph comparing the element content predicted by model fusion and independent regression models according to an embodiment of this application with the labeled element content of the bauxite crushed sample under test;
[0051] Figure 5 A schematic diagram of a mineral element content detection device based on model fusion transfer according to an embodiment of this application is shown. Detailed Implementation
[0052] This application provides an element detection method based on model fusion transfer, such as... Figure 1 As shown, the method mainly includes the following steps:
[0053] S110, laser-induced breakdown spectra of training mineral samples are collected in a laboratory setting to obtain a training spectral dataset; laser-induced breakdown spectra of internal test mineral samples are collected in the laboratory setting to obtain an internal test spectral dataset; the training spectral dataset and the internal test spectral dataset are used to train and test various machine learning models to obtain corresponding regression models.
[0054] In this application, the regression model refers to the model obtained by training and testing a pre-built machine learning model in a laboratory setting. The machine learning model may include: shallow neural networks, XGBoost, convolutional neural networks, etc.
[0055] Laser-induced breakdown spectral data of training mineral samples can be collected in a laboratory setting to obtain a training spectral dataset; laser-induced breakdown spectral data of internal test mineral samples can be collected in a laboratory setting to obtain an internal test spectral dataset; and various machine learning models can be trained and tested using the training spectral dataset and the internal test spectral dataset to obtain various corresponding regression models.
[0056] It should be noted that, for the convenience of training, multiple training mineral samples (pre-collected or pre-prepared) are usually prepared in the laboratory setting. Each training mineral sample can weigh about 5 kg. Therefore, the laser-induced breakdown spectral data of multiple training mineral samples can be directly collected in the laboratory setting to obtain the training spectral dataset.
[0057] To prevent overfitting during training and thus improve the accuracy of the regression model, the internal test mineral samples in this application are separated from laboratory-prepared samples simultaneously with the training mineral samples. The separation ratio can be 8:2 (training mineral samples: internal test mineral samples).
[0058] Then, the laser-induced breakdown spectrum of the internal test mineral sample can be collected in a laboratory setting to obtain the internal test spectrum dataset.
[0059] In one implementation, multiple machine learning models are trained and tested using a training spectral dataset and an internal test spectral dataset, respectively, to obtain various corresponding regression models, including:
[0060] The actual content of several elements in the training mineral samples is obtained as the labeled element content of the training mineral sample set; the actual content of the internal test mineral samples is obtained as the labeled element content of the internal test mineral sample set.
[0061] The training spectral dataset is preprocessed to obtain the preprocessed training spectral dataset; the internal test spectral dataset is preprocessed to obtain the preprocessed internal test spectral dataset.
[0062] Using the preprocessed training spectral dataset as input variables, various machine learning models are trained under the supervision of the element content of labeled mineral samples. Cross-validation and model iteration are performed during the training process until the training termination condition is met, resulting in multiple regression models.
[0063] For each regression model, the performance of the regression model is tested using the preprocessed internal test spectral dataset based on the labeled element content of the internal test mineral samples. If the performance of the regression model does not meet the requirements, the regression model is retrained according to the adjusted training strategy until the performance of the regression model meets the requirements.
[0064] Specifically, you can refer to Figure 2 First, multiple training mineral samples are collected or prepared in a laboratory setting. Then, multiple internal test mineral samples are collected or prepared in the same laboratory setting. The number of samples in the training mineral sample set... Larger than the number of samples in the internal test mineral sample set Generally, a training mineral sample set can contain hundreds of mineral samples, while an internal testing mineral sample set can contain dozens of mineral samples.
[0065] Assign corresponding label element content to several elements in the training mineral samples in the training mineral sample set. , Assign corresponding element content labels to several elements of the internally tested mineral samples in the internal testing mineral sample set. , ;in, m It can be any one of several elements. m =1…… M , M The quantity of a number of elements.
[0066] For each training mineral sample, under laboratory conditions and configuration, laser-induced breakdown spectral data were collected from both the training mineral sample and the internal test mineral sample. For each training mineral sample, under statistically equivalent experimental conditions, several repeated laser-induced breakdown spectral data were collected to form an independent training spectral dataset. The number of repeated spectra ranged from tens to thousands.
[0067] Similarly, for each internal test mineral sample, under statistically equivalent experimental conditions, several repeated laser-induced breakdown spectral data of each internal test mineral sample are collected to form an independent internal test spectral dataset; the number of repeated spectra ranges from tens to thousands.
[0068] Then, the spectral data in the training spectral dataset and the internal test spectral dataset need to be preprocessed. For example, common preprocessing can be performed on the dataset first, and then individual preprocessing can be performed on the dataset according to the category of the machine learning model to match the algorithm.
[0069] Common preprocessing refers to processing methods shared by different types of machine learning models, which may include processes such as removing abnormal spectral data and baseline removal.
[0070] Personalized preprocessing can include normalization (normalizing the total spectral intensity, unit vector, and internal standard elements), averaging, regularization, and other processing.
[0071] The training spectral dataset is then used to train various machine learning models independently. During training, the preprocessed training spectral dataset is used as an input variable. Under the supervision of the elemental content of the labeled mineral samples, various machine learning models are trained separately. Cross-validation and model iteration are performed during training until the training termination condition is met (e.g., the number of training iterations is reached), resulting in multiple regression models.
[0072] To evaluate the generalization performance of various regression models, it is also necessary to test each type of regression model separately using the internal test spectrum dataset. For any regression model, if the test results determine that the generalization performance meets the requirements, then the regression model can be used directly.
[0073] If it is determined that the generalization performance of the regression model cannot meet the requirements (e.g., overfitting occurs), the training strategy needs to be adjusted (e.g., by adjusting the model complexity, hyperparameters, optimizer type, etc.) and the regression model needs to be retrained until the performance of the regression model meets the requirements.
[0074] S111, In the simulated application scenario, the laser-induced breakdown spectra of external test mineral samples of each actual application scenario are collected to obtain the external test spectrum dataset. The external test spectrum datasets of each actual application scenario and the multiple regression models are used to optimize the pre-constructed fusion weight matrix to obtain the optimized fusion weight matrix for each actual application scenario.
[0075] In order to improve the generalization performance of various models trained and tested in the laboratory in practical applications, the external test mineral samples of this application are collected from various practical application scenarios. That is, the external test mineral samples are transported from various practical application scenarios (such as alumina plants) to the laboratory. Each practical application scenario can correspond to multiple external test mineral samples, and each external test mineral sample is approximately 50 kg.
[0076] Then, the laser-induced breakdown spectrum of external test mineral samples can be collected in simulated application scenarios to obtain an external test spectrum dataset.
[0077] Once the external test mineral samples are transported to the laboratory, laser-induced breakdown spectral data for each sample can be collected in a simulated application scenario, thus obtaining an external test spectral dataset. The simulated application scenario can be a dynamic scene in the laboratory where the external test mineral samples move on a conveyor belt, simulating an on-site application.
[0078] This application takes into account the differences in characteristics of different types of regression models, which have biases in fitting efficiency to different elements in minerals and cannot be optimized simultaneously for data characteristics. For example, some regression models are more suitable for predicting aluminum oxide (Al₂O₃), some for predicting silicon dioxide (SiO₂), and some for predicting ferric oxide (Fe₂O₃). Different types of regression models have biases in fitting efficiency to elements in minerals. In order to improve the prediction accuracy of each element in the mineral to be tested and make the final predicted content of each element closer to the actual content, this application needs to optimize the pre-constructed fusion weight matrix. Finally, when predicting the content of each element, the predicted content of each regression model is weighted and combined using the optimized fusion weight matrix.
[0079] Since minerals in different practical application scenarios have their own unique mineral characteristics, it is necessary to collect laser-induced breakdown spectral data of external test mineral samples in simulated application scenarios to obtain external test spectral datasets corresponding to each practical application scenario. Using these datasets and various regression models, the pre-constructed fusion weight matrix is optimized to obtain the optimized fusion weight matrix for each practical application scenario. There is a certain correspondence between each practical application scenario and its corresponding optimized fusion weight matrix, facilitating the subsequent fusion process by finding the appropriate optimized fusion weight matrix based on the specific application scenario.
[0080] The pre-constructed fusion weight matrix includes the weights and prediction biases of each regression model when predicting the current element. The initial values of each element in the fusion weight matrix are preset, but these initial values are not necessarily optimal; therefore, the fusion weight matrix still needs to be optimized.
[0081] In one implementation, before optimizing the pre-built fusion weight matrix using external test spectral datasets from various practical application scenarios and multiple regression models to obtain the optimized fusion weight matrix for each practical application scenario, it is necessary to pre-construct the fusion weight matrix, including:
[0082] The dimension of the fusion weight matrix is determined based on the number of elements and the number of regression models; the dimension of the fusion weight matrix is... The fusion weight matrix includes the weight and prediction bias of each regression model when predicting each element, in calculating the fusion prediction content of each element. M The quantity of a number of elements, N The number of regression models;
[0083] In the fusion weight matrix, for each element, a preset initial value is assigned to the weight contributed by each regression model when predicting each element and the prediction bias, thus completing the construction of the fusion weight matrix.
[0084] In one implementation, the pre-built fusion weight matrix is optimized using external test spectral datasets from various real-world application scenarios and multiple regression models, including:
[0085] The external test spectrum dataset is preprocessed to obtain the preprocessed external test spectrum dataset.
[0086] Obtain the actual content of several elements in the externally tested mineral sample, and use it as the labeled element content of the externally tested mineral sample;
[0087] Based on a pre-defined optimization algorithm, the predicted content of several elements in an externally tested mineral sample using multiple regression models is used as input variables, and the content of labeled elements in the externally tested mineral sample is used as the objective. The fusion weight matrix is iteratively optimized until the pre-defined requirements are met, and the optimized fusion weight matrix is output.
[0088] The predicted contents of several elements in externally tested mineral samples by multiple regression models are obtained by performing calculations on the preprocessed external test spectral dataset by multiple regression models respectively.
[0089] In one implementation, based on a preset optimization algorithm, using the predicted content of several elements in an externally tested mineral sample by multiple regression models as input variables and the labeled element content of the externally tested mineral sample as the objective, the fusion weight matrix is iteratively optimized, including:
[0090] Based on the fusion weight matrix corresponding to each iteration, the predicted contents of several elements are combined and the prediction deviation of the corresponding elements in the fusion weight matrix is added to obtain the fusion predicted contents of several elements in the external test mineral sample.
[0091] With the goal of reducing the residual between the fusion predicted content of several elements and the content of labeled elements in external test mineral samples, the matrix elements of the fusion weight matrix are used as the parameters to be optimized. The optimization algorithm is used to iteratively optimize the fusion weight matrix until the optimization termination condition is reached.
[0092] The residual value is calculated using a pre-constructed residual function. The residual value is used to characterize the error between the fusion prediction content of several elements in the externally tested mineral sample and the content of their respective labeled elements.
[0093] Specifically, the first step is to obtain an external test spectrum dataset. The method for obtaining an external test spectrum dataset is as follows:
[0094] To improve the optimization accuracy of the fusion weight matrix, the external test mineral samples in this application are transported from various application sites to the laboratory. Multiple external test mineral samples are used for each actual application scenario, and each external test mineral sample weighs approximately 50 kg.
[0095] Multiple external test mineral samples form an external test mineral sample set, and the number of samples in the external test mineral sample set is... To better align with real-world application scenarios and improve the fusion accuracy of the fusion weight matrix in practical applications, the spectral acquisition of external test mineral samples in simulated application scenarios is performed under dynamic conditions (such as simulating mineral transportation via conveyor belt), resulting in an external test spectral dataset.
[0096] Specifically, for each external test mineral sample in the external test mineral sample set, several repeated spectra are collected; the number of repeated spectra ranges from tens to thousands, resulting in an external test spectral dataset. The spectral data in the external test spectral dataset undergoes preprocessing. First, common preprocessing is performed on the external test spectral dataset, and then individual preprocessing is performed based on the type of machine learning model to obtain a preprocessed external test spectral dataset. The methods for common and individual preprocessing are described above and will not be repeated here. Furthermore, the content of corresponding label elements for several elements in the external test mineral samples needs to be pre-determined. , .
[0097] Then, it is necessary to construct the fusion weight matrix. The dimension is , m It can be any one of the several elements. m =1…… M ; n For any type of regression model, n =1…… N , i This represents the number of iterations.
[0098] Suppose there are three regression models, A, B, and C (model A is the first type of regression model, model B is the second type of regression model, and model C is the third type of regression model), and the number of elements to be predicted includes three: Al2O3, SiO2, and Fe2O3 (Al2O3 is the first type of element, SiO2 is the second type of element, and Fe2O3 is the third type of element). Then the fusion weight matrix has a dimension of 12, as shown in Table 1.
[0099] Table 1
[0100]
[0101] As can be seen from Table 1, the fusion weight matrix contains the weight parameters for the contribution of the current prediction content of each regression model to the fusion prediction content for each element, as well as the prediction bias corresponding to each element.
[0102] Taking Al2O3 as an example, the weight parameter for the contribution of the current predicted content of model A to the fusion predicted content is a1, the weight parameter for the contribution of the current predicted content of model B to the fusion predicted content is b1, the weight parameter for the contribution of the current predicted content of model C to the fusion predicted content is c1, and the prediction bias is d1.
[0103] Taking SiO2 as an example, the weight parameter for the contribution of the current predicted content of model A to the fusion predicted content is a2, the weight parameter for the contribution of the current predicted content of model B to the fusion predicted content is b2, the weight parameter for the contribution of the current predicted content of model C to the fusion predicted content is c2, and the prediction bias is d2.
[0104] Taking Fe2O3 as an example, the weight parameter for the contribution of the current predicted content of model A to the fusion predicted content is a3, the weight parameter for the contribution of the current predicted content of model B to the fusion predicted content is b3, the weight parameter for the contribution of the current predicted content of model C to the fusion predicted content is c3, and the prediction bias is d3.
[0105] Since the initial values of each parameter in the fusion weight matrix are preset, generally speaking, , In other words, when i When the initial value is 0, the weight of each regression model contributing to the prediction of the current element is 0.3333, and this is the initial value of the prediction bias. All are 0.0000.
[0106] However, the initial values in the fusion weight matrix are not necessarily optimal. Therefore, it is necessary to use a preset optimization algorithm, with the predicted content of several elements in the external test mineral sample by multiple regression models as input variables and the content of the labeled elements in the external test mineral sample as the target, to iteratively optimize the initial fusion weight matrix until the preset requirements are met, and output the optimized fusion weight matrix.
[0107] Among them, the optimization algorithm can be a genetic algorithm. In the optimization process of the genetic algorithm, it is necessary to first determine the objective function, population size, mutation rate, and number of iterations. The objective function in this application is the error function between the fusion prediction content of several elements contained in the external test mineral sample and the content of several element labels in the preprocessed external test spectral dataset. RMSE is used to characterize the residual, and the residual function is shown in formula (1):
[0108] (1)
[0109] In formula (1), For the first i During the nth iteration m The fusion prediction content of the first element and the second element m The residual between the content of the tag elements of each element; This refers to the number of samples in the externally tested mineral samples. For any one of the externally tested mineral samples, For the first i During the nth iteration m The fusion prediction content of each element, For the first The first external test mineral sample m The content of tag elements in each element. When i When =0, When the initial state is... m The fusion prediction content of the first element and the second element m The residual between the content of the tag elements of each element.
[0110] Among them, the i During the nth iteration, the 1st The first external test mineral sample m The fusion prediction content of each element It can be determined according to formula (2):
[0111] (2)
[0112] In formula (2), n For any regression model, N This represents the number of regression models. For the first i During the nth iteration, the 1st n The regression model for the first m The weight of each element's contribution when making predictions. For the first n The regression model for the first m The current predicted content of each element output. For the first i In the fusion weight matrix during the nth iteration m Prediction bias of each element.
[0113] Finally, with the objective of reducing the residual between the fused predicted content and the labeled element content of several elements in all externally tested mineral samples, the matrix elements of the fusion weight matrix are used as the parameters to be optimized. An optimization algorithm is used to iteratively optimize the fusion weight matrix until the optimization termination condition is met, and the optimized fusion weight matrix is finally output. , I This represents the maximum number of iterations. The optimization termination condition can be either reaching the preset maximum number of iterations or the residual value meeting the expected requirements.
[0114] In this way, the optimization weight matrix corresponding to each application scenario can be determined according to the above method.
[0115] S112, Collect spectral data of the mineral to be tested in the actual application scenario of the target, obtain the spectral dataset of the mineral to be tested, and preprocess the spectral dataset of the mineral to be tested to obtain the preprocessed spectral dataset of the mineral to be tested.
[0116] The spectral data described in this application is laser-induced breakdown spectroscopy (LIBS) data. In practical applications, a LIBS instrument can be used to emit high-energy laser pulses to the mineral to be tested in a real-world application scenario, generating plasma. The emitted light during the plasma cooling process is then collected to obtain the spectral data of the mineral. The target practical application scenario can be any one of all practical application scenarios.
[0117] After collecting spectral data for all the minerals to be tested, a spectral dataset of the minerals to be tested is obtained. This dataset is then preprocessed to obtain a preprocessed spectral dataset of the minerals to be tested. The preprocessing method for the spectral dataset of the minerals to be tested can be referenced from the preprocessing method for the training spectral dataset described above, and therefore will not be repeated here.
[0118] S113, input the preprocessed mineral spectral dataset to the various regression models respectively to obtain the current predicted content of several elements corresponding to the preprocessed mineral spectral dataset for each regression model.
[0119] As mentioned above, this application takes into account the differences in characteristics of different types of regression models, which may have biases in fitting efficiency to different elements in minerals and may not be able to simultaneously optimize data characteristics. For example, some regression models are more suitable for predicting Al2O3, some are more suitable for predicting SiO2, and some are more suitable for predicting Fe2O3. If a single regression model is used to predict the content of multiple elements in the mineral to be tested, the prediction accuracy cannot achieve optimized generalization performance.
[0120] Based on this, after obtaining multiple trained regression models, this application inputs the pre-processed spectral dataset of the mineral to be tested into each of the multiple regression models. The pre-trained regression models are then used to perform calculations on the pre-processed spectral dataset to obtain the current predicted content of several elements corresponding to each regression model within the pre-processed spectral dataset. Finally, the current predicted contents of these elements are fused to improve the accuracy of multi-element content prediction. These elements include, but are not limited to, Al2O3, SiO2, and Fe2O3.
[0121] Each regression model outputs a set of current predicted contents for several elements.
[0122] S114, by using the optimized fusion weight matrix of the target actual application scenario, the current predicted contents of several elements corresponding to the preprocessed mineral spectral dataset of the various regression models are combined to obtain the fused predicted contents of several elements in the mineral to be tested.
[0123] As mentioned above, different types of regression models have a bias in fitting efficiency to elements in minerals. In order to improve the prediction accuracy of each element in the mineral to be tested and make the final predicted content closer to the true content, this application also needs to combine the current predicted content of several elements corresponding to the spectral data of multiple regression models based on the optimized fusion weight matrix, so as to obtain the fusion predicted content of several elements in the mineral to be tested.
[0124] Since each practical application scenario has a corresponding optimized fusion weight matrix, it is also necessary to first determine the corresponding optimized fusion weight matrix based on the target practical application scenario to which the mineral to be tested belongs. Specifically, this includes:
[0125] Obtain the scene identifier of the target application scenario;
[0126] Based on the scenario identifier of the target application scenario, the corresponding optimized fusion weight matrix is found in the correspondence between the actual application scenario and the optimized fusion weight matrix.
[0127] After finding the optimized fusion weight matrix, the current predicted contents of several elements corresponding to the preprocessed spectral dataset of the mineral to be tested can be combined using the optimized fusion weight matrix of the target actual application scenario to obtain the fused predicted contents of several elements in the mineral to be tested, including:
[0128] For each element, the weights of each regression model's contribution to each element's prediction in the optimized fusion weight matrix, as well as the current prediction content of each regression model for each element, are weighted together to obtain the weighted combined prediction content of each element.
[0129] The weighted combined predicted content of each element is added to the predicted deviation of the corresponding element in the optimized fusion weight matrix to obtain the fusion predicted content of each element.
[0130] Specifically, multiple regression models are used to calculate the spectral data in the preprocessed mineral spectral dataset. Each regression model outputs a set of current predicted contents for several elements. To improve the prediction accuracy of each element's contents, the fused predicted contents of each element need to be determined by combining the optimized fusion weight matrix and the current predicted contents of several elements output by each regression model.
[0131] Continuing with the example of Al2O3 in Table 1 above, assuming Table 1 is the optimized fusion weight matrix, and model A predicts the Al2O3 content as f1, model B predicts the Al2O3 content as f2, and model C predicts the Al2O3 content as f3, then the fusion predicted content of Al2O3 is: .
[0132] In this way, since different types of regression models have different preferences for different elements, regression models with different characteristics are used to calculate the spectrum, and the predicted contents of each model are combined to achieve optimized adaptation of different types of regression models in the laboratory to the minerals to be tested in the application field. This effectively overcomes the defect that a single model cannot optimize generalization, improves the accuracy of detecting the content of multiple elements in complex minerals, and meets the requirements of in-situ and online detection and analysis of complex minerals.
[0133] Furthermore, to verify the predictive effect of analyzing spectral data using regression models with different characteristics and fusing the predicted content of elements by each model, this application also conducted laser-induced breakdown spectral data acquisition on 70 bauxite gravel samples in a laboratory setting to obtain a training spectral dataset; laser-induced breakdown spectral data acquisition on another 20 bauxite gravel samples to obtain an internal test spectral dataset; and laser-induced breakdown spectral data acquisition on 4 independent bauxite gravel samples to obtain an external test spectral dataset. Three machine learning algorithms were selected: backpropagation shallow neural network, XGBoost, and convolutional neural network. Models were created using these three algorithms to obtain machine learning model 1, machine learning model 2, and machine learning model 3.
[0134] The machine learning model 1, machine learning model 2, and machine learning model 3 were trained according to the training strategy mentioned above, resulting in regression model 1, regression model 2, and regression model 3.
[0135] The optimization strategy mentioned above is then used to optimize the fusion weight matrix, resulting in the optimized fusion weight matrix. The optimized fusion weight matrix is shown in Table 2.
[0136] Table 2
[0137]
[0138] Regression models 1, 2, and 3 were used to predict the Al2O3, SiO2, and Fe2O3 contents of external bauxite crushed stone samples in a simulated application scenario. The contents predicted by each model individually were then fused using the fusion weight matrix in Table 2. The contents predicted by the three regression models for the three elements, the fused predicted contents of the three elements, and the contents of the labeled elements for the three elements are shown below. Figure 3 As shown in Table 2. "wt" in Table 2 refers to weight, and wt% refers to mass percentage.
[0139] Figure 3 The content of each element is predicted by three regression models. Figure 3 middle," "This refers to the content of each element's tag element." "This represents the predicted content of Model 1." "This represents the predicted content of Model 2." "This represents the predicted content of Model 3." "To predict the content of the fusion."
[0140] from Figure 3 As can be seen, the content predicted by the fusion model is closer to the content of the label element as a whole than the content predicted by each model individually, indicating that the content predicted by the fusion model is more globally optimized.
[0141] Furthermore, the performance indicators of the independent regression models 1, 2, and 3 were analyzed, and the performance indicators of the fusion prediction content were analyzed. The results are shown in Table 3.
[0142] Table 3
[0143]
[0144] In Table 3, RE represents the relative error and RMSE represents the root mean square error. It can be seen that for the three elements Al2O3, SiO2, and Fe2O3, the relative errors of the fusion predictions obtained in this application are all less than the relative errors of the predictions of the independent regression models. The root mean square errors of the fusion predictions obtained in this application are all less than or equal to the root mean square errors of the predictions of the independent regression models, indicating that the generalization prediction accuracy of this application can be ensured.
[0145] Furthermore, this application also utilizes regression models 1, 2, and 3 to predict the Al2O3, SiO2, and Fe2O3 contents of bauxite crushed stone samples in a practical application scenario (the bauxite crushed stone samples to be tested and the externally tested bauxite crushed stone samples came from the same alumina plant). The optimized fusion weight matrix in Table 2 is used to fuse the contents predicted individually by each model. The contents predicted by the three regression models for the three elements, the fused predicted contents of the three elements, and the contents of the labeled elements for the three elements are shown below. Figure 4 As shown. Figure 4 The content of each element is predicted by three regression models.
[0146] exist Figure 4 middle," "This refers to the content of each element's tag element." "This represents the predicted content of Model 1." "This represents the predicted content of Model 2." "This represents the predicted content of Model 3." "To predict the content of the fusion."
[0147] from Figure 4 It can be seen that the fusion prediction content of each element is closer to the label element content as a whole than the content predicted by each model individually, indicating that the fusion prediction content is more globally optimized.
[0148] Furthermore, the performance indicators of the independent regression models 1, 2, and 3 were analyzed, and the performance indicators of the fusion prediction content were analyzed. The results are shown in Table 4.
[0149] Table 4
[0150]
[0151] In Table 4, RE represents relative error and RMSE represents root mean square error. It can be seen that for the three elements Al2O3, SiO2, and Fe2O3, the relative errors of the fusion predictions obtained in this application are all smaller than the relative errors of the predictions of the independent regression models. The root mean square errors of the fusion predictions obtained in this application are also smaller than the root mean square errors of the predictions of the independent regression models, indicating that the generalization prediction accuracy of this application can be ensured.
[0152] Based on the same inventive concept as in the foregoing embodiments, this application also provides an element detection device for model fusion transfer, such as... Figure 5 As shown, the device includes:
[0153] Training unit 51 is used to collect laser-induced breakdown spectra of training mineral samples in a laboratory setting to obtain a training spectral dataset; to collect laser-induced breakdown spectra of internal test mineral samples in the laboratory setting to obtain an internal test spectral dataset; and to train and test various machine learning models using the training spectral dataset and the internal test spectral dataset to obtain various corresponding regression models.
[0154] The optimization unit 52 is used to collect the laser-induced breakdown spectra of external test mineral samples in each actual application scenario in the simulated application scenario, obtain the external test spectrum dataset, and use the external test spectrum dataset of each actual application scenario and the multiple regression models to optimize the pre-constructed fusion weight matrix to obtain the optimized fusion weight matrix for each actual application scenario.
[0155] The acquisition unit 53 is used to acquire the spectrum of the mineral to be tested in the target actual application scenario, obtain the spectral dataset of the mineral to be tested, and preprocess the spectral dataset of the mineral to be tested to obtain a preprocessed spectral dataset of the mineral to be tested.
[0156] The prediction unit 54 is used to input the preprocessed mineral spectral dataset to the various regression models respectively, and obtain the current predicted content of several elements corresponding to the preprocessed mineral spectral dataset for each regression model.
[0157] The fusion unit 55 is used to combine the current predicted contents of several elements corresponding to the preprocessed mineral spectral dataset of the various regression models through the optimized fusion weight matrix of the target actual application scenario, so as to obtain the fused predicted contents of several elements in the mineral to be tested.
[0158] The training unit 51 is specifically used for:
[0159] The actual content of several elements in the training mineral sample is obtained as the label element content of the training mineral sample set; the actual content of the internal test mineral sample is obtained as the label element content of the internal test mineral sample set.
[0160] The training spectral dataset is preprocessed to obtain a preprocessed training spectral dataset; the internal test spectral dataset is preprocessed to obtain a preprocessed internal test spectral dataset.
[0161] Using the preprocessed training spectral dataset as input variables, various machine learning models are trained under the supervision of the labeled element content of the training mineral samples. Cross-validation and model iteration are performed during the training process until the training termination condition is met, resulting in multiple regression models.
[0162] For each regression model, and for the labeled element content of the internal test mineral sample, the performance of the regression model is tested using the preprocessed internal test spectral dataset. If the performance of the regression model does not meet the requirements, the regression model is retrained according to the adjusted training strategy until the performance of the regression model meets the requirements.
[0163] The optimization unit 52 is specifically used for:
[0164] The external test spectrum dataset is preprocessed to obtain a preprocessed external test spectrum dataset;
[0165] The actual content of several elements in the external test mineral sample is obtained and used as the labeled element content of the external test mineral sample;
[0166] Based on a preset optimization algorithm, the predicted content of several elements in an external test mineral sample by the various regression models is used as the input variable, and the content of the labeled elements in the external test mineral sample is used as the target. The fusion weight matrix is iteratively optimized until the preset requirements are met, and the optimized fusion weight matrix is output.
[0167] The predicted content of several elements in the externally tested mineral samples by the various regression models is obtained by performing calculations on the preprocessed externally tested spectral dataset by the various regression models respectively.
[0168] The optimization unit 52 is also used for:
[0169] The dimension of the fusion weight matrix is determined based on the number of the aforementioned elements and the number of regression models; the dimension of the fusion weight matrix is... The fusion weight matrix includes the weight and prediction bias of each regression model when predicting each element, in calculating the fusion prediction content of each element; M The quantity of the aforementioned elements, the N The number of regression models;
[0170] In the fusion weight matrix, for each element, a preset initial value is assigned to the weight contributed by each regression model when predicting each element and the prediction bias, respectively.
[0171] The optimization unit 52 is specifically used for:
[0172] Based on the fusion weight matrix corresponding to each iteration, the predicted contents of the several elements are combined and the prediction deviation of the corresponding elements in the fusion weight matrix is added to obtain the fusion predicted contents of several elements in the external test mineral sample.
[0173] With the goal of reducing the residual value between the fusion predicted content and the labeled element content of several elements in the external test mineral sample, the matrix elements of the fusion weight matrix are used as the parameters to be optimized, and the optimization algorithm is used to iteratively optimize the fusion weight matrix until the optimization termination condition is reached.
[0174] The residual value is calculated using a pre-constructed residual function and is used to characterize the error between the fusion predicted content of several elements in an externally tested mineral sample and the content of their respective labeled elements.
[0175] The fusion unit 55 is specifically used for:
[0176] For each element, the weights contributed by each regression model in the optimized fusion weight matrix when predicting each element, and the current prediction content of each regression model for each element are weighted and combined to obtain the weighted combined prediction content of each element.
[0177] The weighted combined prediction content of each element is added to the prediction deviation of the corresponding element in the optimized fusion weight matrix to obtain the fusion prediction content of each element.
[0178] Since the element detection apparatus based on model fusion transfer described in the embodiments of this application is the apparatus used to implement the element detection method based on model fusion transfer of the embodiments of this application, those skilled in the art can understand the specific structure and variations of the apparatus based on the method described in the embodiments of this application, and therefore will not be described in detail here. All apparatuses used in the methods of the embodiments of this application fall within the scope of protection of this application.
[0179] Based on the same inventive concept, this application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any step of the method described above.
[0180] Based on the same inventive concept, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0181] Through one or more embodiments of this application, this application has the following beneficial effects or advantages:
[0182] This application provides a method, apparatus, medium, and device for element detection based on model fusion transfer, the method including:
[0183] Laser-induced breakdown spectra of training mineral samples are collected in a laboratory setting to obtain a training spectral dataset. Laser-induced breakdown spectra of internal test mineral samples are also collected in the same laboratory setting to obtain an internal test spectral dataset. Multiple machine learning models are trained and tested using both the training and internal test spectral datasets to obtain corresponding regression models. Laser-induced breakdown spectra of external test mineral samples from various real-world application scenarios are collected in a simulated application scenario to obtain an external test spectral dataset. The external test spectral datasets from each real-world application scenario and the multiple regression models are used to optimize a pre-constructed fusion weight matrix to obtain an optimized fusion weight matrix for each real-world application scenario. The spectra of the mineral to be tested are collected in the target real-world application scenario to obtain a mineral to be tested spectral dataset. This dataset is then preprocessed to obtain a preprocessed mineral to be tested. The spectral dataset is preprocessed and input into the various regression models to obtain the current predicted content of several elements corresponding to the preprocessed mineral spectral dataset for each regression model. The current predicted content of several elements corresponding to the preprocessed mineral spectral dataset is combined using the optimized fusion weight matrix of the target application scenario to obtain the fused predicted content of several elements in the mineral. Thus, since different types of regression models have different preferences for different elements, different regression models are used to calculate the spectra, and the predicted content of each model is combined to achieve optimized adaptation of different types of regression models in the laboratory to the mineral to be tested in the application field. This effectively overcomes the deficiency of a single model in generalizing and improves the accuracy of detecting the content of multiple elements in complex minerals, meeting the requirements for in-situ and online detection and analysis of complex minerals.
[0184] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0185] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. An element detection method based on model fusion transfer, characterized in that, The method includes: Laser-induced breakdown spectra of training mineral samples are collected in a laboratory setting to obtain a training spectral dataset; laser-induced breakdown spectra of internal test mineral samples are collected in the same laboratory setting to obtain an internal test spectral dataset; the training spectral dataset and the internal test spectral dataset are used to train and test various machine learning models to obtain corresponding regression models. In the simulated application scenario, laser-induced breakdown spectra of external test mineral samples are collected under dynamic conditions for each actual application scenario, resulting in an external test spectrum dataset. The pre-constructed fusion weight matrix is then optimized using the external test spectrum datasets from each actual application scenario and the various regression models to obtain an optimized fusion weight matrix for each actual application scenario. The external test mineral samples are transported from each actual application scenario to the laboratory, and there is a corresponding relationship between each actual application scenario and its corresponding optimized fusion weight matrix. The simulated application scenario is a dynamic scene in the laboratory where external test mineral samples simulate the movement of minerals on a conveyor belt at the application site. In the target actual application scenario, the spectrum of the mineral to be tested is collected to obtain the spectral dataset of the mineral to be tested. The spectral dataset of the mineral to be tested is preprocessed to obtain the preprocessed spectral dataset of the mineral to be tested. The preprocessed spectral dataset of the mineral to be tested is input into the various regression models respectively to obtain the current predicted content of several elements corresponding to the preprocessed spectral dataset of the mineral to be tested for each regression model; By optimizing the fusion weight matrix based on the target practical application scenario, the current predicted contents of several elements corresponding to the preprocessed spectral dataset of the mineral to be tested are combined using the multiple regression models, resulting in the fused predicted contents of several elements in the mineral to be tested; wherein, Before optimizing the pre-constructed fusion weight matrix using the external test spectral dataset and the various regression models, the method further includes: The dimension of the fusion weight matrix is determined based on the number of the aforementioned elements and the number of regression models; the dimension of the fusion weight matrix is... The fusion weight matrix includes the weight and prediction bias of each regression model when predicting each element, in calculating the fusion prediction content of each element; M The quantity of the aforementioned elements, the N The number of regression models; In the fusion weight matrix, for each element, a preset initial value is assigned to the weight contributed by each regression model when predicting each element and the prediction bias, respectively. Before combining the current predicted contents of several elements corresponding to the preprocessed mineral spectral dataset using the optimized fusion weight matrix of the target practical application scenario, the process further includes: Obtain the scene identifier of the target application scenario; Based on the scenario identifier of the target application scenario, the corresponding optimized fusion weight matrix is found in the correspondence between the actual application scenario and the optimized fusion weight matrix.
2. The method as described in claim 1, characterized in that, The training spectral dataset and the internal test spectral dataset are used to train and test various machine learning models respectively, resulting in various corresponding regression models, including: The actual content of several elements in the training mineral sample is obtained as the label element content of the training mineral sample set; the actual content of the internal test mineral sample is obtained as the label element content of the internal test mineral sample set. The training spectral dataset is preprocessed to obtain a preprocessed training spectral dataset; the internal test spectral dataset is preprocessed to obtain a preprocessed internal test spectral dataset. Using the preprocessed training spectral dataset as input variables, various machine learning models are trained under the supervision of the labeled element content of the training mineral sample set. Cross-validation and model iteration are performed during the training process until the training termination condition is met, resulting in multiple regression models. For each regression model, and for the label element content of the internal test mineral sample set, the performance of the regression model is tested using the preprocessed internal test spectral dataset. If the performance of the regression model does not meet the requirements, the regression model is retrained according to the adjusted training strategy until the performance of the regression model meets the requirements.
3. The method as described in claim 1, characterized in that, The optimization of the pre-constructed fusion weight matrix using the external test spectral dataset and the various regression models includes: The external test spectrum dataset is preprocessed to obtain a preprocessed external test spectrum dataset; The actual content of several elements in the external test mineral sample is obtained and used as the labeled element content of the external test mineral sample; Based on a preset optimization algorithm, the predicted content of several elements in an external test mineral sample by the various regression models is used as the input variable, and the content of the labeled elements in the external test mineral sample is used as the target. The fusion weight matrix is iteratively optimized until the preset requirements are met, and the optimized fusion weight matrix is output. The predicted content of several elements in the externally tested mineral samples by the various regression models is obtained by performing calculations on the preprocessed externally tested spectral dataset by the various regression models respectively.
4. The method as described in claim 3, characterized in that, The preset optimization algorithm uses the predicted content of several elements in the external test mineral sample by multiple regression models as input variables and the content of the labeled elements in the external test mineral sample as the target, to iteratively optimize the fusion weight matrix, including: Based on the fusion weight matrix corresponding to each iteration, the predicted contents of the several elements are combined and the prediction deviation of the corresponding elements in the fusion weight matrix is added to obtain the fusion predicted contents of several elements in the external test mineral sample. With the goal of reducing the residual value between the fusion predicted content and the labeled element content of several elements in the external test mineral sample, the matrix elements of the fusion weight matrix are used as the parameters to be optimized, and the optimization algorithm is used to iteratively optimize the fusion weight matrix until the optimization termination condition is reached. The residual value is calculated using a pre-constructed residual function and is used to characterize the error between the fusion predicted content of several elements in an externally tested mineral sample and the content of their respective labeled elements.
5. The method as described in claim 1, characterized in that, The optimized fusion weight matrix of the target actual application scenario is used to combine the current predicted contents of several elements corresponding to the preprocessed spectral dataset of the mineral to be tested by the multiple regression models, so as to obtain the fused predicted contents of several elements in the mineral to be tested, including: For each element, the weights contributed by each regression model in the optimized fusion weight matrix when predicting each element, and the current prediction content of each regression model for each element are weighted and combined to obtain the weighted combined prediction content of each element. The weighted combined prediction content of each element is added to the prediction deviation of the corresponding element in the optimized fusion weight matrix to obtain the fusion prediction content of each element.
6. An element detection device based on model fusion transfer, characterized in that, The device includes: The training unit is used to collect laser-induced breakdown spectra of training mineral samples in a laboratory setting to obtain a training spectral dataset; to collect laser-induced breakdown spectra of internal test mineral samples in the same laboratory setting to obtain an internal test spectral dataset; and to train and test various machine learning models using the training spectral dataset and the internal test spectral dataset to obtain various corresponding regression models. The optimization unit is used to collect laser-induced breakdown spectra of external test mineral samples in various actual application scenarios under dynamic conditions, in simulated application scenarios, to obtain an external test spectrum dataset. Using the external test spectrum datasets of each actual application scenario and the various regression models, the pre-constructed fusion weight matrix is optimized to obtain an optimized fusion weight matrix for each actual application scenario. The external test mineral samples are transported to the laboratory from each actual application scenario, and there is a correspondence between each actual application scenario and its corresponding optimized fusion weight matrix. The acquisition unit is used to acquire the spectrum of the mineral to be tested in the target actual application scenario, obtain the spectral dataset of the mineral to be tested, and preprocess the spectral dataset of the mineral to be tested to obtain the preprocessed spectral dataset of the mineral to be tested. The prediction unit is used to input the preprocessed spectral dataset of the mineral to be tested into the various regression models respectively, and obtain the current predicted content of several elements corresponding to the preprocessed spectral dataset of the mineral to be tested for each regression model; The fusion unit is used to combine the current predicted contents of several elements corresponding to the preprocessed spectral dataset of the mineral under test by the multiple regression models through an optimized fusion weight matrix based on the actual application scenario of the target, to obtain the fused predicted contents of several elements in the mineral under test; wherein, Before optimizing the pre-constructed fusion weight matrix using the external test spectral dataset and the various regression models, the process also includes: The dimension of the fusion weight matrix is determined based on the number of the aforementioned elements and the number of regression models; the dimension of the fusion weight matrix is... The fusion weight matrix includes the weight and prediction bias of each regression model when predicting each element, in calculating the fusion prediction content of each element; M The quantity of the aforementioned elements, the N The number of regression models; In the fusion weight matrix, for each element, a preset initial value is assigned to the weight contributed by each regression model when predicting each element and the prediction bias, respectively. Before combining the current predicted contents of several elements corresponding to the preprocessed mineral spectral dataset using the optimized fusion weight matrix of the target practical application scenario, the process further includes: Obtain the scene identifier of the target application scenario; Based on the scenario identifier of the target application scenario, the corresponding optimized fusion weight matrix is found in the correspondence between the actual application scenario and the optimized fusion weight matrix.
7. The apparatus as claimed in claim 6, characterized in that, The training unit is specifically used for: The actual content of several elements in the training mineral sample is obtained as the label element content of the training mineral sample set; the actual content of the internal test mineral sample is obtained as the label element content of the internal test mineral sample set. The training spectral dataset is preprocessed to obtain a preprocessed training spectral dataset; the internal test spectral dataset is preprocessed to obtain a preprocessed internal test spectral dataset. Using the preprocessed training spectral dataset as input variables, various machine learning models are trained under the supervision of the labeled element content of the training mineral sample set. Cross-validation and model iteration are performed during the training process until the training termination condition is met, resulting in multiple regression models. For each regression model, and for the label element content of the internal test mineral sample set, the performance of the regression model is tested using the preprocessed internal test spectral dataset. If the performance of the regression model does not meet the requirements, the regression model is retrained according to the adjusted training strategy until the performance of the regression model meets the requirements.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1-5.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1-5.
Citation Information
Patent Citations
Multi-element analysis method and system for laser-induced breakdown spectroscopy
CN117291251A
Relational data regression value prediction method based on composite ensemble learning
CN120257230A