Iron ore element classification method, device and equipment and storage medium

By acquiring and pre-processing the spectral data of iron ore elements and using a classification model trained based on the second spectral data for classification, the cost and time-consuming problems of traditional methods are solved, and fast and accurate classification of iron ore elements is achieved.

CN119740141AActive Publication Date: 2025-04-01GUANGDONG WATSON INFORMATION TECHNOLOGY CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411725209.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-01
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

Traditional iron ore element classification methods are expensive and time-consuming, making it difficult to achieve rapid on-site inspection.

Method used

By obtaining the first spectral data of the iron ore element, data preprocessing is performed, and the preprocessed data is input to the iron ore element classification model trained based on the second spectral data to achieve element classification.

Benefits of technology

It reduces the cost of iron ore element classification, realizes rapid detection, and improves detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740141A_ABST
    Figure CN119740141A_ABST
Patent Text Reader

Abstract

The invention discloses an iron ore element classification method, device and equipment and a storage medium, and relates to the technical field of data analysis, and the iron ore element classification method comprises the following steps: obtaining first spectral data corresponding to iron ore elements, and then carrying out data preprocessing on the first spectral data to obtain first spectral data; the first spectral data are preprocessed, the preprocessed first spectral data are input into an iron ore element classification model, an iron ore element classification result output by the iron ore element classification model is obtained, and the iron ore element classification model is obtained after feature extraction and model training are conducted on the basis of a plurality of sets of second spectral data. According to the method, large-model data analysis is performed on the first spectral data corresponding to the iron ore elements, so that the consumption cost of iron ore element classification is reduced, and rapid detection is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data analysis technology, and in particular to an iron ore element classification method, device, equipment and storage medium. Background Art

[0002] Traditional methods of iron ore element classification involve complex sample collection and sample pretreatment processes, and rely on professional laboratory equipment and technicians to perform manual qualitative and quantitative analysis. These steps are not only costly and time-consuming, but also difficult to achieve rapid on-site detection. Summary of the invention

[0003] The main purpose of the present application is to provide a method, device, equipment and storage medium for iron ore element classification, aiming to solve the problem of high cost and time-consuming iron ore element classification.

[0004] To achieve the above objectives, the present application proposes a method for classifying iron ore elements, the method comprising:

[0005] Acquire first spectrum data corresponding to the iron ore element;

[0006] performing data preprocessing on the first spectral data;

[0007] The preprocessed first spectral data is input into an iron ore element classification model to obtain an iron ore element classification result output by the iron ore element classification model, wherein the iron ore element classification model is obtained after feature extraction and model training based on several groups of second spectral data.

[0008] In one embodiment, the training process of the iron ore element classification model includes:

[0009] Acquiring several sets of second spectrum data;

[0010] Normalizing and preprocessing each of the second spectral data to obtain a plurality of groups of third spectral data;

[0011] Each of the third spectral data is input into an initial iron ore element classification model for iterative training to obtain the iron ore element classification model.

[0012] In one embodiment, the initial iron ore element classification model includes a feature extraction layer and a classification layer;

[0013] The step of inputting each of the third spectral data into an initial iron ore element classification model for iterative training to obtain the iron ore element classification model comprises:

[0014] Extracting the first data feature in each of the third spectral data through the feature extraction layer;

[0015] Inputting the first data feature into the classification layer for classification, and obtaining a first prediction value of each element category output by the classification layer;

[0016] Based on the first predicted value, the iron ore element classification model is obtained.

[0017] In one embodiment, extracting the first data feature in each of the third spectral data through the feature extraction layer includes:

[0018] Input each of the third spectral data into the first common difference module and the first special difference module in the feature extraction layer for convolution operation to obtain a second data feature;

[0019] The second data feature is input into the second common difference module and the second special difference module in the feature extraction layer for convolution operation to obtain the first data feature.

[0020] In one embodiment, inputting the first data feature into the classification layer for classification to obtain a first prediction value of each element category output by the classification layer includes:

[0021] Inputting the first data feature into the fully connected layer in the classification layer for classification to obtain a second prediction value;

[0022] Performing category mapping on the second predicted value to obtain a probability distribution value of each element category;

[0023] The probability distribution values ​​are integrated to generate the first prediction value.

[0024] In one embodiment, obtaining the iron ore element classification model based on the first predicted value includes:

[0025] Calculating the first predicted value and the preset sample label value to obtain an error value;

[0026] Comparing the error value with a preset expected range;

[0027] If the error value does not meet the preset expected range, the initial iron ore element classification model is iteratively trained based on the error value to obtain the iron ore element classification model.

[0028] In one embodiment, after comparing the error value with a preset expected range, the method further includes:

[0029] If the error value meets the preset expected range, the initial iron ore element classification model is used as the iron ore element classification model;

[0030] Obtaining the prediction accuracy and actual sample number corresponding to the iron ore element classification model;

[0031] Based on the prediction accuracy and the actual number of samples, a confusion matrix diagram is generated to optimize the iron ore element classification model.

[0032] In addition, to achieve the above purpose, the present application also proposes an iron ore element classification device, the iron ore element classification device comprising:

[0033] An acquisition module, used for acquiring first spectrum data corresponding to the iron ore element;

[0034] A preprocessing module, used for performing data preprocessing on the first spectral data;

[0035] The output module is used to input the preprocessed first spectral data into the iron ore element classification model to obtain the iron ore element classification result output by the iron ore element classification model, wherein the iron ore element classification model is obtained after feature extraction and model training based on several groups of second spectral data.

[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes an iron ore element classification device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the iron ore element classification method as described above.

[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the iron ore element classification method described above are implemented.

[0038] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the iron ore element classification method as described above are implemented.

[0039] The present application provides an iron ore element classification method, device, equipment and storage medium. The iron ore element classification method obtains first spectral data corresponding to the iron ore element, and then performs data preprocessing on the first spectral data, thereby inputting the preprocessed first spectral data into an iron ore element classification model to obtain an iron ore element classification result output by the iron ore element classification model, wherein the iron ore element classification model is obtained after feature extraction and model training based on several groups of second spectral data, thereby reducing the cost of iron ore element classification and realizing rapid detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0042] Figure 1 A schematic diagram of a process flow provided for Example 1 of the method for classifying elements of iron ore of the present application;

[0043] Figure 2 A schematic diagram of a process flow provided for Example 2 of the method for classifying elements of iron ore of the present application;

[0044] Figure 3 A schematic diagram of the execution logic of the feature extraction layer in an embodiment of the iron ore element classification method provided in the present application;

[0045] Figure 4 A simplified flow chart of the iron ore element classification method provided for this application;

[0046] Figure 5 This is a schematic diagram of the module structure of the iron ore element classification device according to an embodiment of the present application;

[0047] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the iron ore element classification method in the embodiment of the present application.

[0048] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0049] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0050] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0051] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a big data service platform, an iron ore element classification system, etc. The following takes the iron ore element classification system as an example to illustrate this embodiment and the following embodiments.

[0052] Based on this, the present application embodiment provides a method for classifying iron ore elements, referring to Figure 1 , Figure 1 A schematic diagram of the process flow provided for Example 1 of the iron ore element classification method of the present application.

[0053] In this embodiment, the iron ore element classification method includes steps S11 to S13:

[0054] Step S11, obtaining first spectrum data corresponding to the iron ore element;

[0055] It should be noted that the iron ore elements refer to the chemical elements contained in iron ore, such as iron (Fe), silicon (Si), aluminum (Al), calcium (Ca), magnesium (Mg), etc. The content and proportion of multiple elements have an important influence on the quality and use of iron ore. Therefore, it is necessary to analyze the specific element data of the iron ore elements in order to accurately classify the iron ore and put it into the corresponding use field.

[0056] It should be further explained that the first spectral data refers to near-infrared spectral data directly detected and acquired from the iron ore sample, thereby reflecting the specific absorption and emission characteristics of the elements in the iron ore and being used to identify and classify the elemental composition in the iron ore.

[0057] Step S12, performing data preprocessing on the first spectral data;

[0058] Specifically, data preprocessing is performed on the first spectral data, and the data preprocessing includes normalization, standardization, baseline correction (Baseline Correction) and endpoint alignment (Endpoint Alignment) and other processing, so as to make the model more accurate, improve the performance and accuracy of the model, and reduce the computational complexity.

[0059] Step S13, inputting the preprocessed first spectral data into an iron ore element classification model to obtain an iron ore element classification result output by the iron ore element classification model, wherein the iron ore element classification model is obtained after feature extraction and model training based on several groups of second spectral data.

[0060] It should be noted that the iron ore element classification model is used to train spectral data obtained from iron ore samples to identify and classify elements in iron ore, so that features can be extracted from the input spectral data and mapped to specific element categories.

[0061] It should be further explained that the iron ore element classification result refers to the predicted result output by the model, that is, the element composition information obtained after classifying the iron ore sample to which the input first spectral data belongs, including the iron ore element classification type, content ratio and quality rating (the quality of the iron ore is rated according to the element content and ratio), etc., which is not limited here.

[0062] Furthermore, the second spectral data is a set of spectral data used to train an iron ore element classification model, which is usually derived from known elemental compositions of different iron ore samples and is used to train the model to identify features and patterns of different elements.

[0063] Specifically, the preprocessed first spectrum data is input into the iron ore element classification model to obtain the iron ore element classification result output by the iron ore element classification model, thereby realizing the rapid classification of iron ore on site.

[0064] This embodiment obtains first spectral data corresponding to the iron ore element, and then performs data preprocessing on the first spectral data, thereby inputting the preprocessed first spectral data into the iron ore element classification model to obtain the iron ore element classification result output by the iron ore element classification model, wherein the iron ore element classification model is obtained after feature extraction and model training based on several groups of second spectral data, thereby improving the efficiency and accuracy of detection, reducing the cost of manual detection, and enhancing the practicality and environmental friendliness of the model. In addition, through model training, the large model learns the common characteristics of different iron ore samples, enhances the generalization ability of the model on diversified data, and thus improves the accuracy of classification.

[0065] In a feasible implementation manner, the training process of the iron ore element classification model includes:

[0066] Step S21, obtaining several sets of second spectrum data;

[0067] Specifically, several groups of second spectral data are obtained. In one embodiment, each of the second spectral data is 7 types of near-infrared spectral data, each type of data has 117 spectra. Thus, by using multiple groups of second spectral data for training, the model can learn the common features between different samples and improve its generalization ability on unknown data.

[0068] Step S22, normalizing and preprocessing each of the second spectral data to obtain a plurality of groups of third spectral data;

[0069] It should be noted that the third spectral data refers to the spectral data after normalization and preprocessing steps, which can be directly used to train the machine learning model to improve the accuracy and efficiency of the model in classifying iron ore elements.

[0070] Specifically, in order to eliminate the numerical differences between different samples, each of the second spectral data is normalized and preprocessed, such as normalization, smoothing, baseline correction, missing value processing, etc., so that each of the second spectral data is scaled to a specific range, so that the data values ​​between different spectra can be compared and analyzed on the same scale, thereby making the model more accurate.

[0071] Additionally, each of the third spectral data can be divided into a training set and a validation set in a ratio of 8:2, that is, 80% of the data is used to train the model so that it can learn and identify the characteristics of the spectrum, and the remaining 20% ​​of the data is used to verify the performance of the model to ensure that the model has good generalization ability.

[0072] Step S23, inputting each of the third spectral data into an initial iron ore element classification model for iterative training to obtain the iron ore element classification model.

[0073] It should be noted that the initial iron ore element classification model refers to the iron ore element classification model used at the beginning of the training process, which is usually not trained or only preliminarily trained with a small amount of data. In one embodiment, the initial iron ore element classification model is a one-dimensional staggered convolutional network model, in which the feature extraction module includes 10 staggered network modules, and the classification layer is 2 fully connected layers, and then by selecting appropriate convolution kernel size, optimizing activation function and loss function and other parameters, the spectral features are extracted to the greatest extent and the classification ability is enhanced.

[0074] Specifically, the first data feature in each of the third spectral data is extracted through the feature extraction layer, and then the first data feature is input into the classification layer for classification to obtain the first prediction value of each element category output by the classification layer, thereby obtaining the iron ore element classification model based on the first prediction value.

[0075] In this embodiment, several groups of second spectral data are obtained, and then each of the second spectral data is normalized and preprocessed to obtain several groups of third spectral data, and then each of the third spectral data is input into the initial iron ore element classification model for iterative training to obtain the iron ore element classification model, and then the convergence speed of gradient descent is accelerated through normalization and other processing, which accelerates model training and enhances the robustness of the model, thereby improving prediction accuracy, and helping the model to learn more general features and reduce overfitting.

[0076] Based on this, the present application embodiment provides a method for classifying iron ore elements, referring to Figure 2 , Figure 2 A schematic diagram of the process flow provided for Example 2 of the iron ore element classification method of the present application.

[0077] In a feasible implementation manner, the initial iron ore element classification model includes a feature extraction layer and a classification layer; the inputting each of the third spectral data into the initial iron ore element classification model for iterative training to obtain the iron ore element classification model includes:

[0078] Step S31, extracting the first data feature in each of the third spectral data through the feature extraction layer;

[0079] It should be noted that the feature extraction layer refers to the part of the model responsible for extracting useful features from the input data, which can be achieved through convolutional layers, pooling layers or other types of network layers, thereby identifying patterns and features in the input data (such as images, spectral data, etc.).

[0080] It should be further explained that the classification layer refers to the part of the model responsible for mapping the extracted features to the final output categories. In a typical classification task, the classification layer can be composed of a fully connected layer (also called a dense layer) and an output layer, wherein the output layer usually uses a softmax function or other activation function to generate a category probability distribution. The first data feature refers to the feature extracted from each third spectral data.

[0081] Specifically, each of the third spectral data is input into the first common difference module and the first special difference module in the feature extraction layer for convolution operation to obtain the second data feature, and then the second data feature is input into the second common difference module and the second special difference module in the feature extraction layer for convolution operation to obtain the first data feature.

[0082] Step S32, inputting the first data feature into the classification layer for classification, and obtaining a first prediction value of each element category output by the classification layer;

[0083] It should be noted that the element category refers to different elements or categories that the model needs to identify and classify, which can be different chemical elements or mineral types in iron ore. There is no limitation here and it can be set according to actual conditions. The first prediction value refers to the preliminary prediction result given by the model based on the input data and the extracted features. In one embodiment, the first prediction value is a category probability or score, which indicates the confidence of the model that each input sample belongs to each category.

[0084] Specifically, the first data feature is input into the fully connected layer in the classification layer for classification to obtain a second prediction value, and then the second prediction value is category mapped to obtain a probability distribution value of each element category, so that each probability distribution value is integrated to generate the first prediction value.

[0085] Step S33: obtaining the iron ore element classification model based on the first prediction value.

[0086] Specifically, the first prediction value and the preset sample label value are calculated to obtain an error value, and then the error value is compared with a preset expected range. If the error value does not meet the preset expected range, the initial iron ore element classification model is iteratively trained based on the error value to obtain the iron ore element classification model.

[0087] In this embodiment, the first data feature in each of the third spectral data is extracted by the feature extraction layer, and the first data feature is then input into the classification layer for classification to obtain a first prediction value of each element category output by the classification layer, thereby obtaining the iron ore element classification model based on the first prediction value, and then the classification accuracy is improved through the key features extracted from the spectral data, and at the same time, the model is enabled to more accurately predict the element category in the iron ore, thereby improving the generalization ability of the model and improving the robustness, so that the model gradually learns the patterns and laws in the data and improves the prediction accuracy of the iron ore element category.

[0088] In a feasible implementation manner, extracting the first data feature in each of the third spectral data through the feature extraction layer includes:

[0089] Step S41, inputting each of the third spectral data into the first common difference module and the first special difference module in the feature extraction layer to perform a convolution operation to obtain a second data feature;

[0090] Step S42: input the second data feature into the second common difference module and the second special difference module in the feature extraction layer for convolution operation to obtain the first data feature.

[0091] It should be noted that the first ordinary difference module and the second ordinary difference module refer to an ordinary difference module in the feature extraction layer, which is used to perform standard convolution operations. The ordinary difference module usually includes one or more convolution layers, and also includes a Batch Normalization layer and an activation function (such as ReLU) for extracting primary features of input data (such as spectral data).

[0092] It should be further explained that the first special variance module and the second special variance module refer to modules in the feature extraction layer designed to perform special convolution operations, which have convolution kernel sizes, steps or structures different from those of ordinary variance modules, so that the modules can capture specific features or patterns that ordinary variance modules may not be able to capture. The second data feature refers to the intermediate feature representation obtained after processing by the first ordinary variance module and the first special variance module.

[0093] Specifically, in one embodiment, each of the third spectrum data is input into the feature extraction layer, and reference may be made to Figure 3 , Figure 3 A schematic diagram of the execution logic of the feature extraction layer in an embodiment of the iron ore element classification method provided in the present application, wherein the feature extraction layer is composed of 8 ordinary difference modules and 2 special difference modules, and the execution logic of each module is: each of the third spectral data is input into ordinary difference module 1 and special difference module 1, and is output through ordinary difference module 2, ordinary difference module 3, ordinary difference module 4, ordinary difference module 5, ordinary difference module 6, ordinary difference module 7, and ordinary difference module 8, wherein the input of ordinary difference module 4 is the output of ordinary difference module 3 plus the output of special difference module 1, the input of ordinary difference module 8 is the output of ordinary difference module 7 plus the output of special difference module 2, and the input of special difference module 2 is the output of ordinary difference module 4.

[0094] Furthermore, the ordinary staggered module 1, ordinary staggered module 3, ordinary staggered module 5, and ordinary staggered module 7 are composed of two parts: the first part of the input data first passes through a convolution operation with a convolution kernel size of 3×3 and a stride (step length) of 3, and then passes through a Batch Normalization layer to normalize the output, which helps to accelerate model convergence and reduce overfitting, and then passes through a ReLU activation function to effectively alleviate the problem of neuron death, and then passes through a dropout method to reduce overfitting, and then passes through a second convolution operation with a convolution kernel size of 3×3 and a stride of 1, and then performs a second Batch Normalization to ensure output stability. The second part of the input data passes through a convolution operation with a convolution kernel size of 1×1 and a stride of 3 to adjust the number of input channels so that it matches the output, and a Batch Normalization layer is connected after the convolution layer. The data is input into these two parts, and the outputs of these two parts are added together, and then the ReLU activation function is performed.

[0095] Furthermore, the normal staggered module 2, the normal staggered module 4, the normal staggered module 6, and the normal staggered module 8 are as follows: the data first passes through a first convolution operation with a convolution kernel size of 3×3 and a stride of 1, and then passes through a BatchNormalization layer, and then passes through a ReLU activation function, and then passes through a dropout method, and then passes through a second convolution operation with a convolution kernel size of 3×3 and a stride of 1, and then performs a second Batch Normalization, and then performs a ReLU activation function.

[0096] Furthermore, special staggered module 1: the first part of the input first passes through a first convolution operation with a convolution kernel size of 3×3, stride of 9, input channel 1, and output channel 32, then passes through a Batch Normalization layer, and then passes through a ReLU activation function. After the dropout method, it passes through a second convolution operation with a convolution kernel size of 3×3, stride of 1, input channel 32, and output channel 32, and then undergoes a second Batch Normalization, and then undergoes a ReLU activation function. The second part of the data passes through a convolution operation with a convolution kernel size of 1×1, stride of 3, input channel 1, and output channel 32. The data is operated in two parts and the two parts of the output are added together, and the ReLU activation function is performed.

[0097] In addition, special staggered module 2: the first part first passes through a first convolution operation with a convolution kernel size of 3×3, stride of 9, input channels of 32, and output channels of 128, and then the input passes through the Batch Normalization layer, and then passes through the ReLU activation function. After the dropout method, it passes through a second convolution operation with a convolution kernel size of 3×3, stride of 1, input channels of 128, and output channels of 128, and then performs a second Batch Normalization. The second part of the input passes through a convolution operation with a convolution kernel size of 1×1, stride of 3, input channels of 32, and output channels of 128, and the data is operated in two parts and the two parts of the output are added, and the ReLU activation function is performed.

[0098] In this embodiment, each of the third spectral data is input into the first common difference module and the first special difference module in the feature extraction layer for convolution operation to obtain the second data feature, and then the second data feature is input into the second common difference module and the second special difference module in the feature extraction layer for convolution operation to obtain the first data feature, so that the common difference module and the special difference module have different convolution kernel sizes or step sizes, so that the model can capture features of different scales, thereby improving the accuracy of the model's understanding and classification of data, and realizing multi-scale feature capture. At the same time, through the stacked convolution of multiple modules, the model can learn deeper feature representation, accelerate the training process of the model and improve the convergence speed.

[0099] In a feasible implementation manner, inputting the first data feature into the classification layer for classification to obtain a first prediction value of each element category output by the classification layer includes:

[0100] Step S51, inputting the first data feature into the fully connected layer in the classification layer for classification to obtain a second prediction value;

[0101] It should be noted that the fully connected layer (FCL) refers to a layer in a neural network in which each neuron is connected to all neurons in the previous layer. In a convolutional neural network (CNN), the fully connected layer is usually located at the end of the network and is used to map the learned high-level features to the final output categories. In addition, in the fully connected layer, each input feature is considered independently, and the contribution of each input feature to each output node is weighted.

[0102] It should be further explained that the second prediction value refers to the original prediction result directly output by the fully connected layer.

[0103] Specifically, the first data feature is input into a classification layer, and the classification layer adopts two fully connected layers and adds a dropout method to reduce overfitting, thereby obtaining a second prediction value.

[0104] Step S52, performing category mapping on the second predicted value to obtain a probability distribution value of each element category;

[0105] It should be noted that the probability distribution values ​​refer to normalized prediction values, which represent the model's estimate of the probability that the input data belongs to each category.

[0106] Specifically, the second prediction value is mapped to the category space, such as the output category is 7 categories, and then the output of the fully connected layer is normalized using the Softmax function to obtain the probability distribution value of each category, and the probability distribution value is directly used as the confidence, wherein the normalization is usually implemented through the softmax function, which converts the second prediction value (logits) into a probability value so that the sum of the probabilities of all categories is 1.

[0107] Step S53: Integrate the probability distribution values ​​to generate the first prediction value.

[0108] This embodiment obtains a second prediction value by inputting the first data feature into the fully connected layer in the classification layer for classification, and then classifies the second prediction value, and then classifies the second prediction value to obtain a probability distribution value of each element category, so as to integrate each probability distribution value to generate the first prediction value, and then learns the complex relationship between features through the fully connected layer to improve classification accuracy, ensure that the output values ​​are on the same scale, contribute to the stability and convergence of the model, and help decision makers understand the confidence of the model for each category, so as to make better decisions.

[0109] In a feasible implementation manner, obtaining the iron ore element classification model based on the first predicted value includes:

[0110] Step S61, calculating the first prediction value and the preset sample label value to obtain an error value;

[0111] It should be noted that the preset sample label value refers to the true category or value corresponding to each sample when training and testing the machine learning model, so that the model's prediction results can be compared with the label value to evaluate its performance. The error value refers to the difference or gap between the model's prediction value and the true label value.

[0112] Specifically, the first prediction value and the preset sample label value are calculated according to the error value calculation formula to obtain the error value. In one embodiment, the error value calculation formula is as follows:

[0113]

[0114] Among them, H(p, q) is the cross entropy loss value between two probability distributions p and q, p and q represent the model prediction value and the actual label value respectively, p(x i ) is the true distribution (i.e., the true probability of each category. Usually in classification problems, the probability of the correct category is 1 and the probability of other categories is 0), q(x i ) is the predictive distribution, i.e. the probability of each class predicted by the model, and n is the total number of classes.

[0115] Step S62, comparing the error value with a preset expected range;

[0116] It should be noted that the preset expected range refers to an acceptable range or threshold set for the error value during the model training process, which is used to determine whether the performance of the model has reached the expected standard. If the error value meets the preset expected range, the model is good enough and training can be stopped or other adjustments can be made; if the error value does not meet the preset expected range, the model needs further training or adjustment of model parameters.

[0117] Step S63: if the error value does not meet the preset expected range, then based on the error value, iteratively train the initial iron ore element classification model to obtain the iron ore element classification model.

[0118] Specifically, if the error value does not meet the preset expected range, then based on the error value, the initial iron ore element classification model is iteratively trained to obtain the iron ore element classification model. In one embodiment, when the error value does not meet the preset expected range, the error value is transmitted back to the model, and the weight is updated according to the error value, and then through the continuous iterative training process, until the error value meets the preset expected range, the initial iron ore element classification model whose error value meets the preset expected range is used as the iron ore element classification model, so that the model gradually learns the patterns and laws in the data, and improves the prediction accuracy of solid waste elements. The weight update is carried out using the chain rule, that is, the partial derivative or deviation matrix of the weight is calculated, and the partial derivative value is added to the original weight to obtain a new weight matrix. In addition, the optimizer adopts an adaptive moment estimation method, which can estimate the step size of each parameter according to its historical gradient, so as to adaptively adjust the learning rate and update the model parameters.

[0119] In addition, after the iron ore element classification model is determined, the performance of the model can be evaluated through the validation set data, where the evaluation indicators include accuracy, recall rate, F1 score, etc.

[0120] This embodiment calculates the first predicted value and the preset sample label value to obtain an error value, and then compares the error value with a preset expected range. If the error value does not meet the preset expected range, the initial iron ore element classification model is iteratively trained based on the error value to obtain the iron ore element classification model, and then dynamically adjusted according to the actual error value to adapt to the specific characteristics or changes of the data, thereby achieving continuous iterative training, gradually reducing the error between the predicted value and the true label, and then improving the classification accuracy, while avoiding overfitting of the model on the training data, ensuring that the model has good generalization ability.

[0121] In a feasible implementation manner, after comparing the error value with a preset expected range, the method further includes:

[0122] Step S71, if the error value meets the preset expected range, the initial iron ore element classification model is used as the iron ore element classification model;

[0123] Step S72, obtaining the prediction accuracy and actual sample number corresponding to the iron ore element classification model;

[0124] It should be noted that the prediction accuracy refers to the ratio of the number of samples correctly predicted by the model to the total number of samples. The actual number of samples refers to the number of samples actually trained on the model.

[0125] Step S73, generating a confusion matrix diagram based on the prediction accuracy and the actual number of samples to optimize the iron ore element classification model.

[0126] It should be noted that the confusion matrix diagram is used to show the relationship between the model prediction results and the actual labels. It shows the correct and incorrect predictions of each category in the form of a matrix, where each cell of the confusion matrix diagram represents a combination of actual categories and predicted categories, such as true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN), which helps to identify which categories the model performs well on, which categories need improvement, and whether the model has specific deviations.

[0127] Specifically, the accuracy and actual sample number of the validation set are made into a confusion matrix diagram. In one embodiment, the X-axis of the confusion matrix diagram represents the actual category, the Y-axis represents the predicted category, and the diagonal line represents the correctly predicted category. The performance of the model is visualized by drawing the confusion matrix diagram to show the prediction accuracy of the model for each iron ore classification.

[0128] In this embodiment, if the error value meets the preset expected range, the initial iron ore element classification model is used as the iron ore element classification model, and then the prediction accuracy and the actual number of samples corresponding to the iron ore element classification model are obtained, so as to generate a confusion matrix diagram based on the prediction accuracy and the actual number of samples to optimize the iron ore element classification model, thereby ensuring that the performance of the model meets the expected standards, and intuitively displaying the performance of the model in each category through the confusion matrix diagram, including the number of correct classifications and incorrect classifications, helps to identify which categories the model performs poorly, thereby providing direction for model optimization. In addition, if it is found that the model performs poorly in certain categories, it can guide the collection of more data of related categories to improve the model.

[0129] For example, to help understand the implementation process of the iron ore element classification method, please refer to Figure 4 , Figure 4 A simplified flow chart showing the method for elemental classification of iron ore for this application.

[0130] It should be noted that the examples in the figure are only used to understand the present application and do not constitute a limitation on the iron ore element classification method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.

[0131] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0132] This application also provides an iron ore element classification device, please refer to Figure 5 , the iron ore element classification device comprises:

[0133] An acquisition module 51 is used to acquire first spectrum data corresponding to the iron ore element;

[0134] A preprocessing module 52, used for performing data preprocessing on the first spectral data;

[0135] The output module 53 is used to input the preprocessed first spectral data into the iron ore element classification model to obtain the iron ore element classification result output by the iron ore element classification model, wherein the iron ore element classification model is obtained after feature extraction and model training based on several groups of second spectral data.

[0136] The iron ore element classification device is also used for:

[0137] Acquiring several sets of second spectrum data;

[0138] Normalizing and preprocessing each of the second spectral data to obtain a plurality of groups of third spectral data;

[0139] Each of the third spectral data is input into an initial iron ore element classification model for iterative training to obtain the iron ore element classification model.

[0140] The iron ore element classification device is also used for:

[0141] Extracting the first data feature in each of the third spectral data through the feature extraction layer;

[0142] Inputting the first data feature into the classification layer for classification, and obtaining a first prediction value of each element category output by the classification layer;

[0143] Based on the first predicted value, the iron ore element classification model is obtained.

[0144] The iron ore element classification device is also used for:

[0145] Input each of the third spectral data into the first common difference module and the first special difference module in the feature extraction layer for convolution operation to obtain a second data feature;

[0146] The second data feature is input into the second common difference module and the second special difference module in the feature extraction layer for convolution operation to obtain the first data feature.

[0147] The iron ore element classification device is also used for:

[0148] Inputting the first data feature into the fully connected layer in the classification layer for classification to obtain a second prediction value;

[0149] Performing category mapping on the second predicted value to obtain a probability distribution value of each element category;

[0150] The probability distribution values ​​are integrated to generate the first prediction value.

[0151] The iron ore element classification device is also used for:

[0152] Calculating the first predicted value and the preset sample label value to obtain an error value;

[0153] Comparing the error value with a preset expected range;

[0154] If the error value does not meet the preset expected range, the initial iron ore element classification model is iteratively trained based on the error value to obtain the iron ore element classification model.

[0155] The iron ore element classification device is also used for:

[0156] If the error value meets the preset expected range, the initial iron ore element classification model is used as the iron ore element classification model;

[0157] Obtaining the prediction accuracy and actual sample number corresponding to the iron ore element classification model;

[0158] Based on the prediction accuracy and the actual number of samples, a confusion matrix diagram is generated to optimize the iron ore element classification model.

[0159] The iron ore element classification device provided in the present application adopts the iron ore element classification method in the above embodiment, which can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the iron ore element classification device provided in the present application are the same as the beneficial effects of the iron ore element classification method provided in the above embodiment, and the other technical features in the iron ore element classification device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0160] The present application provides an iron ore element classification device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the iron ore element classification method in the above-mentioned embodiment one.

[0161] Reference below Figure 6, which shows a schematic diagram of the structure of an iron ore element classification device suitable for implementing the embodiment of the present application. The iron ore element classification device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The iron ore element classification device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0162] like Figure 6 As shown, the iron ore element classification device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the iron ore element classification device are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the iron ore element classification device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows an iron ore element classification device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0163] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0164] The iron ore element classification device provided by the present application adopts the iron ore element classification method in the above embodiment, which can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the iron ore element classification device provided by the present application are the same as the beneficial effects of the iron ore element classification method provided by the above embodiment, and the other technical features in the iron ore element classification device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0165] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0166] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0167] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the iron ore element classification method in the above-mentioned embodiment.

[0168] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0169] The computer-readable storage medium may be included in the iron ore element classification device; or may exist independently without being assembled into the iron ore element classification device.

[0170] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the iron ore element classification device, the iron ore element classification device:

[0171] Acquire first spectrum data corresponding to the iron ore element;

[0172] performing data preprocessing on the first spectral data;

[0173] The preprocessed first spectral data is input into an iron ore element classification model to obtain an iron ore element classification result output by the iron ore element classification model, wherein the iron ore element classification model is obtained after feature extraction and model training based on several groups of second spectral data.

[0174] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0175] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0176] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0177] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned iron ore element classification method, and can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the iron ore element classification method provided in the above-mentioned embodiment, and will not be repeated here.

[0178] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the above-mentioned iron ore element classification method when executed by a processor.

[0179] The computer program product provided in this application can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of this application are the same as the beneficial effects of the iron ore element classification method provided in the above embodiment, which will not be repeated here.

[0180] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for classifying iron ore elements, characterized in that: include: Acquire first spectrum data corresponding to the iron ore element; performing data preprocessing on the first spectral data; The preprocessed first spectral data is input into an iron ore element classification model to obtain an iron ore element classification result output by the iron ore element classification model, wherein the iron ore element classification model is obtained after feature extraction and model training based on several groups of second spectral data.

2. The method for classifying iron ore elements according to claim 1, characterized in that: The training process of the iron ore element classification model includes: Acquiring several sets of second spectrum data; Normalizing and preprocessing each of the second spectral data to obtain a plurality of groups of third spectral data; Each of the third spectral data is input into an initial iron ore element classification model for iterative training to obtain the iron ore element classification model.

3. The method for classifying iron ore elements according to claim 2, characterized in that: The initial iron ore element classification model includes a feature extraction layer and a classification layer; The step of inputting each of the third spectral data into an initial iron ore element classification model for iterative training to obtain the iron ore element classification model comprises: Extracting the first data feature in each of the third spectral data through the feature extraction layer; Inputting the first data feature into the classification layer for classification, and obtaining a first prediction value of each element category output by the classification layer; Based on the first predicted value, the iron ore element classification model is obtained.

4. The method for classifying iron ore elements according to claim 3, characterized in that: The extracting the first data feature in each of the third spectral data by the feature extraction layer includes: Input each of the third spectral data into the first common difference module and the first special difference module in the feature extraction layer for convolution operation to obtain a second data feature; The second data feature is input into the second common difference module and the second special difference module in the feature extraction layer for convolution operation to obtain the first data feature.

5. The method for classifying iron ore elements according to claim 3, characterized in that: The step of inputting the first data feature into the classification layer for classification to obtain a first prediction value of each element category output by the classification layer includes: Inputting the first data feature into the fully connected layer in the classification layer for classification to obtain a second prediction value; Performing category mapping on the second predicted value to obtain a probability distribution value of each element category; The probability distribution values ​​are integrated to generate the first prediction value.

6. The method for classifying iron ore elements according to claim 3, characterized in that: The step of obtaining the iron ore element classification model based on the first predicted value comprises: Calculating the first predicted value and the preset sample label value to obtain an error value; Comparing the error value with a preset expected range; If the error value does not meet the preset expected range, the initial iron ore element classification model is iteratively trained based on the error value to obtain the iron ore element classification model.

7. The method for classifying iron ore elements according to claim 6, characterized in that: After comparing the error value with the preset expected range, the method further includes: If the error value meets the preset expected range, the initial iron ore element classification model is used as the iron ore element classification model; Obtaining the prediction accuracy and actual sample number corresponding to the iron ore element classification model; Based on the prediction accuracy and the actual number of samples, a confusion matrix diagram is generated to optimize the iron ore element classification model.

8. An iron ore element classification device, characterized in that: include: An acquisition module, used for acquiring first spectrum data corresponding to the iron ore element; A preprocessing module, used for performing data preprocessing on the first spectral data; The output module is used to input the preprocessed first spectral data into the iron ore element classification model to obtain the iron ore element classification result output by the iron ore element classification model, wherein the iron ore element classification model is obtained after feature extraction and model training based on several groups of second spectral data.

9. An iron ore element classification device, characterized in that: The iron ore element classification device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the iron ore element classification method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the iron ore element classification method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Newborn pain expression recognition method and system based on deep 3D residual network

    CN108596069A

  • CNN-based LIBS ore spectral data classification method and device

    CN110689088A

  • Method for identifying brands of imported iron ores

    CN113138178A

  • Rock identification method, system and apparatus, terminal, and readable storage medium

    US20240054766A1

  • A method and system for logging data for a mineral sample

    WO2022261712A1