Method and system for predicting praseodymium / neodymium element content in rare earth extraction and separation process
By designing a one-dimensional convolution model based on multiple residual attention blocks, combined with image processing and feature selection technology, the problem of measuring the content of praseodymium/negative element during rare earth element extraction and separation is solved, and high-precision and low-cost prediction effect is achieved.
Patent Information
- Application Number
- CN202310880187.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-18
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2043-07-18
AI Technical Summary
During the extraction and separation of rare earth elements, it is difficult to accurately measure the component content of praseodymium/neodymium elements. Traditional machine learning methods have the disadvantages of complex feature engineering, insufficient feature extraction capabilities, and poor generalization capabilities.
A one-dimensional convolutional praseodymium/negative element component content prediction model is designed based on multiple residual attention blocks, color features and texture features are extracted through image processing, feature selection is performed in combination with the recursive feature elimination method of random forests, and network structure parameters are optimized to achieve high-precision prediction.
It realizes low-cost and high-precision prediction of the content of praseodymium/neodymium element components, has strong generalization capabilities, and is suitable for automatic control of rare earth extraction and separation processes.
Smart Images

Figure CN116912581B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of rare earth component content prediction, and in particular to a method and system for predicting the praseodymium / neodymium element component content in a rare earth extraction and separation process. Background Art
[0002] As an important strategic resource in the future development of science and technology, rare earth plays an indispensable role in defense industry, metallurgy, petrochemical industry, glass ceramics, aerospace and other fields due to its excellent physical, chemical and electromagnetic properties. Since the extraction and separation process of rare earth elements is very complicated, accompanied by the characteristics of nonlinearity, strong coupling and severe hysteresis, it is difficult to describe the extraction and separation process of rare earth elements with a simple mechanism model. And due to the harsh strong acid and strong alkali environment during the extraction of rare earth elements, it is difficult to find a long-term stable and efficient sensor to measure the component content of rare earth elements. At present, most scholars use traditional machine learning methods to perform soft measurement of the component content of rare earths in actual production processes. However, traditional machine learning models have the disadvantages of complex feature engineering, insufficient feature extraction capabilities, and poor generalization capabilities. Summary of the invention
[0003] The purpose of the present invention is to provide a method and system for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process. By designing a one-dimensional convolutional praseodymium / neodymium element component content prediction model based on multiple residual attention blocks, the model has the characteristics of low cost, high accuracy, and strong generalization ability. It has very important practical significance for realizing automatic control of the rare earth extraction and separation process.
[0004] To achieve the above object, the present invention provides the following solutions:
[0005] The present invention provides a method for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process, comprising:
[0006] Acquire multiple rare earth element solution images and the on-site extraction level and component content of praseodymium / neodymium elements corresponding to each rare earth element solution image;
[0007] Performing image processing on the rare earth element solution images to obtain color features and texture features corresponding to each rare earth element solution image; the color features include HSV color space features and YUV color space features;
[0008] Using a recursive feature elimination method based on random forest, feature selection is performed on the color feature, the texture feature and the on-site extraction level on the basis of cross-validation to obtain a mixed feature corresponding to each rare earth element solution image;
[0009] A plurality of mathematical models are used to compare data sets on an HSV color space feature data set, a color feature data set and a mixed feature data set to determine an optimal data set; the color feature data set is a data set including HSV color space features and YUV color space features;
[0010] Taking the best data set as input and the component content of praseodymium / neodymium elements as output, the network structure parameters of a one-dimensional convolution soft measurement model based on multiple residual attention blocks are optimized to obtain a praseodymium / neodymium component content prediction model, and the praseodymium / neodymium component content prediction model is used to determine the praseodymium / neodymium component content of a rare earth element solution image to be measured; the praseodymium / neodymium component content prediction model is the optimal one-dimensional convolution soft measurement model based on multiple residual attention blocks.
[0011] Optionally, obtaining a plurality of rare earth element solution images and the on-site extraction level and the component content of praseodymium / neodymium elements corresponding to each rare earth element solution image specifically includes:
[0012] Machine vision technology is used to obtain image data of praseodymium / neodymium mixed solutions with color space characteristics at different on-site extraction levels and different component contents, and then obtain multiple rare earth element solution images and the on-site extraction level and praseodymium / neodymium component content corresponding to each rare earth element solution image.
[0013] Optionally, performing image processing on the rare earth element solution images to obtain color features and texture features corresponding to each rare earth element solution image specifically includes:
[0014] Using the Opencv library, extracting the RGB color space of the rare earth element solution image;
[0015] The RGB color space is converted into HSV color space features and YUV color space features by using a color feature conversion formula, thereby obtaining color features corresponding to each image of the rare earth element solution;
[0016] The texture features of each rare earth element solution image are extracted using a gray level co-occurrence matrix; the texture features include energy, contrast, entropy, homogeneity, autocorrelation, mean value, variance and correlation.
[0017] Optionally, multiple mathematical models are used to compare data sets on the HSV color space feature data set, the color feature data set and the mixed feature data set to determine the best data set, specifically including:
[0018] The BP neural network model, SVM support vector machine prediction model, gradient boosting regression tree and extreme learning machine model were used to compare the HSV color space feature data set, color feature data set and mixed feature data set to determine the optimal data set.
[0019] Optionally, the one-dimensional convolution soft sensor model based on multiple residual attention blocks includes: an input layer, a feature extraction layer, a feature fusion layer, a fusion attention layer, multiple residual attention units, a global average pooling layer, a fully connected layer and an output layer; wherein the multiple residual attention units are connected in series, and any of the residual attention units includes a convolution layer and a residual attention block;
[0020] The input layer is connected to the input end of the feature extraction layer, and the output end of the feature extraction layer is connected to the input end of the feature fusion layer; the output end of the feature fusion layer is connected to the input end of the fusion attention layer, the first output end of the fusion attention layer is connected to the input end of the first residual attention unit, and the output end of the last residual attention unit is connected to the input end of the global average pooling layer; the output end of the global average pooling layer and the second output end of the fusion attention layer are both connected to the input end of the fully connected layer, and the output end of the fully connected layer is connected to the output layer.
[0021] Optionally, one of the residual attention blocks includes three branches, namely a residual connection branch, a convolution branch and an attention branch; wherein the residual connection branch is used to add jump connections to the network, the convolution branch is used to perform convolution operations on the input data, and the attention branch is used to change the weight ratio between feature maps to give more important features more weight.
[0022] Optionally, taking the best data set as input and the component content of praseodymium / neodymium elements as output, the network structure parameters of the one-dimensional convolution soft sensor model based on multiple residual attention blocks are optimized to obtain a praseodymium / neodymium element component content prediction model, specifically including:
[0023] Divide the best data set into training set and test set, and standardize the training set and test set uniformly;
[0024] According to the standardized training set and test set, a one-dimensional convolutional soft sensor model based on multiple residual attention blocks with different numbers of residual attention units is used for training, and the optimal number of residual attention units is determined based on the model performance according to the actual and predicted component contents of praseodymium and neodymium elements.
[0025] The optimal one-dimensional convolution soft sensing model based on multiple residual attention blocks is determined by the optimal number of residual attention units.
[0026] The present invention also provides a system for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process, comprising:
[0027] A data acquisition module, used to acquire multiple rare earth element solution images and the on-site extraction level and the component content of praseodymium / neodymium elements corresponding to each rare earth element solution image;
[0028] A color feature and texture feature extraction module, used for performing image processing on the rare earth element solution image to obtain color features and texture features corresponding to each rare earth element solution image; the color features include HSV color space features and YUV color space features;
[0029] A mixed feature determination module, for performing feature selection on the color feature, the texture feature and the on-site extraction level based on cross-validation by using a recursive feature elimination method based on random forests, to obtain a mixed feature corresponding to each rare earth element solution image;
[0030] The best data set determination module is used to use multiple mathematical models to perform data set comparison on the HSV color space feature data set, the color feature data set and the mixed feature data set to determine the best data set; the color feature data set is a data set including HSV color space features and YUV color space features;
[0031] The model training and model prediction module is used to optimize the network structure parameters of the one-dimensional convolution soft measurement model based on multiple residual attention blocks with the best data set as input and the component content of praseodymium / neodymium elements as output, so as to obtain a praseodymium / neodymium element component content prediction model, and use the praseodymium / neodymium element component content prediction model to determine the praseodymium / neodymium element component content of the rare earth element solution image to be measured; the praseodymium / neodymium element component content prediction model is the optimal one-dimensional convolution soft measurement model based on multiple residual attention blocks.
[0032] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0033] The present invention adopts a one-dimensional convolution soft measurement model based on multiple residual attention blocks. The residual structure enables the model to reduce the weight of noise through the attention mechanism while extracting deep features, thereby producing a rapid convergence effect. It has the characteristics of low cost, high accuracy, and strong generalization ability. It has very important practical significance for realizing automatic control of rare earth extraction and separation processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0035] Figure 1 A schematic flow chart of a method for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process provided by an embodiment of the present invention;
[0036] Figure 2 A schematic diagram of the structure of a random forest model provided by an embodiment of the present invention;
[0037] Figure 3 A flow chart of obtaining mixed features based on cross-validation using a recursive feature elimination method based on random forests provided in an embodiment of the present invention;
[0038] Figure 4 A feature dimension selection diagram based on cross validation of the recursive feature elimination method based on random forest provided in an embodiment of the present invention;
[0039] Figure 5 A feature importance score map based on original features provided by an embodiment of the present invention;
[0040] FIG6 is a feature set comparison diagram based on the HSV feature set, HSV+YUV feature set and mixed feature set under the same model and evaluation index provided by an embodiment of the present invention; FIG6(a) is a feature set comparison diagram based on the HSV feature set, HSV+YUV feature set and mixed feature set under the BP neural network model; FIG6(b) is a feature set comparison diagram based on the HSV feature set, HSV+YUV feature set and mixed feature set under the SVM support vector machine prediction model; FIG6(c) is a feature set comparison diagram based on the HSV feature set, HSV+YUV feature set and mixed feature set under the gradient boosting regression tree; FIG6(d) is a feature set comparison diagram based on the HSV feature set, HSV+YUV feature set and mixed feature set under the extreme learning machine (ELM) model;
[0041] Figure 7 A schematic diagram of the structure of a one-dimensional convolution soft-sensing model based on multiple residual attention blocks provided in an embodiment of the present invention;
[0042] Figure 8 A schematic diagram of the structure of the residual attention block provided in an embodiment of the present invention;
[0043] Fig. 9A comparison diagram of the optimal number of residual attention units for screening the one-dimensional convolution soft-sensing model based on multiple residual attention blocks provided in an embodiment of the present invention;
[0044] Fig.10 A schematic diagram of a training loss curve of an optimal one-dimensional convolution soft-sensing model based on multiple residual attention blocks provided in an embodiment of the present invention;
[0045] Fig.11 A comparison chart of relative errors of prediction values of different models provided in an embodiment of the present invention;
[0046] Fig.12 A schematic diagram of the structure of a system for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] The purpose of the present invention is to provide a method and system for predicting the component content of praseodymium / neodymium elements in a rare earth extraction and separation process, so as to obtain the component content of praseodymium / neodymium elements in the rare earth extraction and separation process to meet the on-site online detection needs of rare earth extraction and separation enterprises.
[0049] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0050] Embodiment 1
[0051] The present embodiment provides a method for predicting the content of praseodymium / neodymium elements in the process of rare earth extraction and separation, including: first, using an image acquisition device to collect images and extract their HSV and YUV color space features, then using a grayscale co-occurrence matrix to extract the spatial texture features of the image, and selecting the field extraction level corresponding to the image as its key feature. Then, the recursive feature elimination method based on random forest is used to screen the above features on the basis of cross-validation to obtain mixed features. After verifying the effectiveness of the mixed features, a one-dimensional convolution soft measurement model based on multiple residual attention blocks is proposed on this basis. The model adopts a residual attention block structure, which enables the model to reduce the weight of noise through the attention mechanism while extracting deep features, thereby producing a rapid convergence effect. This embodiment uses a one-dimensional convolution soft measurement model based on multiple residual attention blocks to experimentally verify the field data based on the mixed features, and the verification results show that the method provided in this embodiment can predict the content of rare earth elements with high accuracy at low cost and in a short time.
[0052] like Figure 1 As shown, this embodiment provides a method for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process, comprising:
[0053] Step 101: Acquire multiple rare earth element solution images and the on-site extraction level and the component content of praseodymium / neodymium elements corresponding to each rare earth element solution image. The on-site extraction level corresponding to the rare earth element solution image is the key feature.
[0054] Step 102: performing image processing on the rare earth element solution images to obtain color features and texture features corresponding to each rare earth element solution image; the color features include HSV color space features and YUV color space features.
[0055] Step 103: using a recursive feature elimination method based on random forest, on the basis of cross-validation, feature selection is performed on the color feature, the texture feature and the on-site extraction level to obtain a mixed feature corresponding to each rare earth element solution image.
[0056] Step 104: using multiple mathematical models to compare the HSV color space feature data set, the color feature data set and the mixed feature data set to determine the best data set, wherein the color feature data set is a data set including the HSV color space feature and the YUV color space feature.
[0057] Step 105: Taking the best data set as input and the component content of praseodymium / neodymium elements as output, the network structure parameters of the one-dimensional convolution soft sensor model based on multiple residual attention blocks are optimized to obtain a praseodymium / neodymium component content prediction model, and the praseodymium / neodymium component content prediction model is used to determine the praseodymium / neodymium component content of the rare earth element solution image to be tested. Among them, the praseodymium / neodymium component content prediction model is the optimal one-dimensional convolution soft sensor model based on multiple residual attention blocks.
[0058] In this embodiment, step 101 specifically includes:
[0059] Machine vision technology is used to obtain image data of praseodymium / neodymium mixed solutions with color space characteristics at different on-site extraction levels and different component contents, and then obtain multiple rare earth element solution images and the on-site extraction level and praseodymium / neodymium component content corresponding to each rare earth element solution image.
[0060] An example is: firstly, the image data of the mixed solution of praseodymium / neodymium with color space characteristics under different on-site extraction levels and different component contents are obtained by using an image acquisition device, and then background segmentation, image filtering and other operations are performed on the image data. Then, the image in the central area is selected for cropping to obtain a 128×128 sample image, i.e., a rare earth element solution image, and then the on-site extraction level and the component content of praseodymium / neodymium elements corresponding to each rare earth element solution image are determined.
[0061] In this embodiment, step 102 specifically includes:
[0062] (1) Using the Opencv library, the RGB color space of the rare earth element solution image is extracted.
[0063] (2) Using a color feature conversion formula, the RGB color space is converted into HSV color space features and YUV color space features, thereby obtaining the color features corresponding to each of the rare earth element solution images.
[0064] (3) Using a gray level co-occurrence matrix to extract texture features of each rare earth element solution image; the texture features include energy, contrast, entropy, homogeneity, autocorrelation, mean, variance, correlation, etc.
[0065] Considering that the content and concentration of different elements in the rare earth solution may cause changes in the color and brightness of the solution image, these changes appear in the image as visual features such as texture and spots. The specific method for extracting texture features described in this embodiment is as follows:
[0066] First, the rare earth element solution image is converted into a grayscale image, and then the gray level co-occurrence matrix (GLCM) is used to extract the spatial texture features of the image. The distance d of the gray level co-occurrence matrix is set to 1, the gray level is 256, and the angle is the mean of each feature in the directions of 0, 45, 90, and 135 to balance the influence of different directions on the eigenvalue. In this way, the 8 features of the gray level co-occurrence matrix are extracted as the spatial texture features of the image. The corresponding specific features include energy, contrast, entropy, homogeneity, autocorrelation, mean, variance, and correlation.
[0067] An example is: first extract the RGB first-order components of the rare earth element solution image. Secondly, the HSV color space mainly describes the brightness, saturation and hue of the color, while the YUV color space describes the brightness and color difference (chromaticity). Both are based on the nonlinear transformation of the RGB color space. The combination of the two can more comprehensively describe the color information.
[0068] The formula for converting RGB to HSV is:
[0069] Max = max(R, G, B);
[0070] Min = min(R, G, B);
[0071]
[0072]
[0073] V=max(R, G, B).
[0074] In the above formula, the values of R, G, and B are real numbers between 0 and 1. Max is the maximum value among RGB, and Min is the minimum value among RGB.
[0075] Scale (R, G, B) to (0, 255) units, and the formula for converting RGB to YUV is:
[0076]
[0077] Next, the texture feature is expressed as: for a given direction θ and distance d, on a straight line with direction θ, the number of occurrences of a point pair with a pixel grayscale i and another pixel grayscale j at a distance of d from it is the value of the (i, j)th point of the gray level co-occurrence matrix. In order to reduce the complexity of calculation while retaining more information, this embodiment selects 8 statistical values as the original texture features, which are:
[0078] Energy: energy = ∑ i ∑ j p(i, j);
[0079] Contrast: contrast = ∑ i ∑ j (ij) 2 p(i, j);
[0080] Entropy: entropy = -∑ i ∑ j p(i, j)log(p(i, j));
[0081] Homogeneity:
[0082] Autocorrelation: autocorrelatio = ∑ i ∑ j ijp(i, j);
[0083] Average value: mean = ∑ i ∑ j ip(i, j); variance: var = ∑ i ∑ j (i-Mean) 2 p(i, j);
[0084] Relevance:
[0085] Where p(i, j) represents the value of the gray level co-occurrence matrix at the (i, j)th point under the given θ, d parameters. In the above feature extraction process, the distance d of the gray level co-occurrence matrix is set to 1, and the angle θ is taken as the mean of each feature in the directions of 0, 45, 90, and 135 to balance the influence of different directions on the feature value. In this way, the 8 features of the gray level co-occurrence matrix are extracted as the spatial texture features of the image.
[0086] In this embodiment, step 103 specifically includes:
[0087] The three features of the color feature, texture feature and on-site extraction level corresponding to the rare earth component content are extracted, and these three features are called original features.
[0088] Step 103 mainly includes three steps: (1) training the random forest model according to the training data set and obtaining the corresponding weight of each original feature; (2) performing cross-validation calculations using evaluation indicators determined in advance and obtaining the evaluation scores of all original features; (3) removing the feature with the lowest evaluation score in the current training data set. This cycle will continue until only the last original feature remains in the training data set.
[0089] Through the recursive feature elimination method, a list sorted by feature importance is finally obtained. The feature importance list after cross-validation is judged, and the features with lower scores are filtered out. The optimal feature set after filtering is called the mixed feature set.
[0090] in, Figure 2 This is a schematic diagram of the structure of the random forest model. It uses the Bootstrap resampling method to extract multiple samples from the original sample, builds a decision tree model for each feature subset, and then combines the prediction results of multiple decision trees to obtain the final prediction result by calculating the arithmetic mean of these decision trees. Figure 3 To obtain the flow chart of the mixed feature set, first obtain the rare earth image data set, then use machine vision technology to extract the RGB color features of the image, and convert them into HSV and YUV color features through the color space conversion formula. Secondly, the gray level co-occurrence matrix is used to extract the image spatial texture features. Then, the feature recursive elimination method based on random forest is used to screen the color features, spatial texture features and key features on the basis of cross validation to finally obtain the mixed feature set.
[0091] Figure 4 This is a feature dimension selection diagram based on cross validation of the recursive feature elimination method based on random forest. The algorithm is used to screen features of the training data set. The length of recursive feature elimination in each iteration is set to 1, and the number of cross validations is set to 3, 5, 7, and 9. The optimal feature dimension is determined based on the average value of the feature dimensions corresponding to the results of multiple cross validations, such as Figure 4 As shown, the optimal feature dimension is 11.
[0092] Figure 5 is a feature importance score graph based on the original features, compared with Figure 4 It can be seen that when the feature dimension is 11, the average score of the evaluation index is the highest. Figure 5 The top 11 features are ranked in the order of their feature importance from high to low: field extraction level, h, U, gray level co-occurrence matrix average, Y, autocorrelation, v, V, contrast s and homogeneity. These 11 features are selected as mixed features.
[0093] In this embodiment, step 104 specifically includes:
[0094] The BP neural network model, SVM support vector machine prediction model, gradient boosting regression tree (GBDT) and extreme learning machine (ELM) model were used to compare the HSV color space feature data set, color feature data set and mixed feature data set to determine the best data set.
[0095] Among them, Figure 6 is a feature set comparison chart based on the HSV feature set, HSV+YUV feature set and mixed feature set under the same model and evaluation indicators. It uses the root mean square error (RMSE), mean relative error (MEANRE), maximum relative error (MAXRE), and determination coefficient (R2) as evaluation indicators, and sets multiple models for verification. Comparing the four prediction models, in most cases, the comprehensive performance of using mixed features is better than that of using HSV or HSV+YUV features alone. It shows that the overall performance of the features screened by the feature recursive elimination method based on random forest is better than that of a single color feature, indicating that mixed features can provide more comprehensive and richer feature information.
[0096] In this embodiment, a one-dimensional convolution soft sensing model based on multiple residual attention blocks is used, such as Figure 7 As shown, it includes an input layer, a feature extraction layer, a feature fusion layer, a fusion attention layer, multiple residual attention units, a global average pooling layer, a fully connected layer and an output layer; wherein multiple residual attention units are connected in series.
[0097] The input layer is connected to the input of the feature extraction layer, and the output of the feature extraction layer is connected to the input of the feature fusion layer; the output of the feature fusion layer is connected to the input of the fusion attention layer, the first output of the fusion attention layer is connected to the input of the first residual attention unit, and the output of the last residual attention unit is connected to the input of the global average pooling layer; the output of the global average pooling layer and the second output of the fusion attention layer are both connected to the input of the fully connected layer, and the output of the fully connected layer is connected to the output layer.
[0098] Among them, with the best data set as input, the feature extraction layer uses two convolutional layers of 1×1 and 3×1 for feature extraction; the feature fusion layer fuses the extracted features and then connects to the fusion attention layer, and then connects to multiple residual attention units. The last residual attention unit is globally averaged and then connected to the fully connected layer. At the same time, the fusion attention layer is also connected to the fully connected layer to form a residual structure covering the whole world, and finally the model is output. Among them, a residual attention unit consists of a convolutional layer and a residual attention block. This residual structure can change the weight ratio between feature maps through the attention mechanism while retaining the residual, giving more important features more weight, and producing a fast convergence effect.
[0099] like Figure 8As shown in the figure, the basic structure of the residual attention block is mainly composed of two convolutional layers, a global average pooling layer and a fully connected layer. A residual attention block contains three branches, the residual connection branch, the convolution branch and the attention branch. Among them, the residual connection branch is used to add skip connections to the network, the convolution branch is used to perform convolution operations on the input data, and the attention branch is used to change the weight ratio between feature maps and give more important features more weight.
[0100] The operation flow of the residual attention block is as follows:
[0101] First, the input features are convolved to obtain the output of the convolution branch. Then, the channel information of the previous layer is globally averaged pooled to obtain the compressed global information, which is expressed as follows.
[0102]
[0103] Where: h(x) is the output of the second convolutional layer, k represents the number of channels in the convolutional layer, and g(x) is the compressed global information.
[0104] Through the fully connected layer, the global channel information is converted into its corresponding weight ratio through the softmax activation function to obtain the output of the attention branch. The formula is as follows.
[0105] z(x) = δ(F(g(x), W));
[0106] Where: δ is the softmax activation function, F(g(x),W) is the corresponding function of the fully connected layer when the global channel information is input.
[0107] The output of the convolution branch is multiplied by the output of the attention mechanism branch, and the output of the product is weighted fused with the output of the residual branch to obtain the overall output of the residual attention block. The formula is as follows.
[0108] y=f(h(x)z(x)+x);
[0109] Where y is the output of the residual attention block, f is the activation function, h(x) is the output of the convolution branch, z(x) is the output of the attention branch, and x is the output of the residual connection branch.
[0110] In this embodiment, the optimal data set is used as input and the component content of praseodymium / neodymium elements is used as output, and the network structure parameters of the one-dimensional convolution soft sensor model based on multiple residual attention blocks are optimized to obtain a praseodymium / neodymium element component content prediction model, which specifically includes:
[0111] Firstly, the best data set is divided into training set and test set, and then the training set and the test set are standardized uniformly; secondly, according to the standardized training set and test set, a one-dimensional convolutional soft measurement model based on multiple residual attention blocks with different numbers of residual attention units is trained, and according to the actual component content of praseodymium / neodymium elements and the predicted component content of praseodymium / neodymium elements, the optimal number of residual attention units is determined according to the model performance; finally, the optimal one-dimensional convolutional soft measurement model based on multiple residual attention blocks is determined through the optimal number of residual attention units.
[0112] The optimal network structure of the one-dimensional convolution soft-sensing model based on multiple residual attention blocks is as follows: the number of convolution kernels in the first layer is set to 8, and the first layer is the mixed features after screening. After that, the feature fusion layer is obtained by convolution with two convolution kernels of 1×1 and 3×1 and fusion. Then, the attention mechanism is added to the feature fusion layer to obtain the fusion attention layer (Attention 1). Then three residual attention units are connected. The number of channels is 16, 32, and 64 respectively. The last layer of the residual attention unit is globally averaged pooled and connected to a fully connected layer with 256 neuron nodes. At the same time, the fusion attention layer is connected to the fully connected layer with a residual structure covering the whole world. Finally, the model prediction is performed.
[0113] Fig. 9 This is a comparison chart of residual attention units. After determining the model network structure framework, the model parameters are designed. Assuming that the number of convolution kernels of the residual attention unit in the first layer is 16, the number of convolution kernels in the nth layer is 16×2n-1. The model performance of the residual attention unit number ranges from 1 to 6. The horizontal axis is the number of residual attention units, and the vertical axis is the value of each evaluation index. Fig. 9 It can be seen that when the number of residual attention units is 3 and 5, the three evaluation indicators of mean relative error, maximum relative error and root mean square error are significantly smaller than other values. Therefore, the number of residual attention units should be 3 or 5. A careful observation shows that when the number of residual attention units is 3, the values of MeanRE and RMSE are smaller than when the number of residual attention units is 5. At the same time, when the performance of the models is not much different, considering the model size and the physical memory occupied, the model with smaller occupancy is preferred, that is, 3 is selected as the optimal value.
[0114] Fig.10 Figure 10 shows the change of the model training loss curve. As shown in Figure 10, the one-dimensional convolution soft sensor model based on multiple residual attention blocks has achieved the convergence effect of the DNN model in 200 rounds when the number of training rounds is 20. Fig.10The convergence of each model is judged. The one-dimensional convolution soft sensor model based on multiple residual attention blocks can reach convergence within a limited number of training times and can be applied to the prediction of element component content in the rare earth extraction process.
[0115] Fig.11 This is a comparison chart of the relative errors of the model prediction values, where the corresponding parameters of the model are:
[0116] (1) Genetic algorithm optimized extreme learning machine model (GA-ELM). The population size of the genetic algorithm is 20, the number of iterations is 100, the crossover probability is 0.01, the mutation probability is 0.7, and the number of nodes of the extreme learning machine is set to 25.
[0117] (2) Least squares support vector machine (LSSVM), the kernel function is radial basis kernel function (rbf), the penalty factor C is 70, and the coefficient gamma of the kernel function is 0.11.
[0118] (3) Xgboost model, the number of decision trees (n_estimators is 84), the learning rate (learning_rate is 0.205), the maximum depth of each decision tree (max_depth is 15), the minimum sample weight of the child node (min_child_weight is 8), and the parameter of the L2 regularization term (lambda is 3.31).
[0119] (4) A one-dimensional convolutional soft sensing model based on multiple residual attention blocks (RAB-DNN), with 8 channels in the attention layer, 3 residual attention units, 16, 32, and 64 channels respectively, and 256 neurons in the fully connected layer.
[0120] Depend on Fig.11 It can be seen that the one-dimensional convolution soft measurement model based on multiple residual attention blocks is superior to other models in terms of the four evaluation indicators of average relative error, maximum relative error, root mean square error and determination coefficient, and the relative error percentage curve of the model fluctuates less. At the same time, the one-dimensional convolution soft measurement model based on multiple residual attention blocks is compared with the optimal values of other models. The average relative error of the one-dimensional convolution soft measurement model based on multiple residual attention blocks is reduced by 0.4465% compared with GA-ELM, the maximum relative error is reduced by 1.3741 compared with the Xgboost model, the root mean square error is reduced by 0.2882 compared with RAB-CNN, and the determination coefficient is improved by 0.00041 compared with RAB-CNN. And the maximum relative error is less than the requirements of rare earth extraction and separation enterprises for component content detection error, which meets their detection requirements.
[0121] The experimental results show that the average relative error of the model is only 0.7089%, and the maximum error is within ±3%, which meets the requirements of rare earth extraction and separation companies for component content detection errors within ±5%. This solves the problem of insufficient extraction of representative features of rare earth element images in the process of rare earth component content prediction, resulting in poor prediction results of soft measurement models.
[0122] Embodiment 2
[0123] In order to execute the method corresponding to the above-mentioned embodiment 1 and achieve the corresponding functions and technical effects, a system for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process is provided below.
[0124] like Fig.12 As shown, this embodiment provides a system for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process, comprising:
[0125] The data acquisition module 1 is used to acquire a plurality of rare earth element solution images and the on-site extraction level and the component content of praseodymium / neodymium elements corresponding to each rare earth element solution image.
[0126] The color feature and texture feature extraction module 2 is used to perform image processing on the rare earth element solution image to obtain the color feature and texture feature corresponding to each rare earth element solution image; the color feature includes HSV color space feature and YUV color space feature.
[0127] The mixed feature determination module 3 is used to adopt a recursive feature elimination method based on random forest to perform feature selection on the color feature, the texture feature and the on-site extraction level on the basis of cross-validation to obtain the mixed feature corresponding to each rare earth element solution image.
[0128] The optimal data set determination module 4 is used to use multiple mathematical models to perform data set comparison on the HSV color space feature data set, the color feature data set and the mixed feature data set to determine the optimal data set; the color feature data set is a data set including HSV color space features and YUV color space features.
[0129] The model training and model prediction module 5 is used to optimize the network structure parameters of the one-dimensional convolution soft measurement model based on multiple residual attention blocks with the best data set as input and the component content of praseodymium / neodymium elements as output, obtain a praseodymium / neodymium element component content prediction model, and use the praseodymium / neodymium element component content prediction model to determine the praseodymium / neodymium element component content of the rare earth element solution image to be tested; the praseodymium / neodymium element component content prediction model is the optimal one-dimensional convolution soft measurement model based on multiple residual attention blocks.
[0130] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0131] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process, characterized in that: include: Acquire multiple rare earth element solution images and the on-site extraction level and component content of praseodymium / neodymium elements corresponding to each rare earth element solution image; Performing image processing on the rare earth element solution images to obtain color features and texture features corresponding to each rare earth element solution image; the color features include HSV color space features and YUV color space features; Using a recursive feature elimination method based on random forest, feature selection is performed on the color feature, the texture feature and the on-site extraction level on the basis of cross-validation to obtain a mixed feature corresponding to each rare earth element solution image; A plurality of mathematical models are used to compare data sets on an HSV color space feature data set, a color feature data set and a mixed feature data set to determine an optimal data set; the color feature data set is a data set including HSV color space features and YUV color space features; Taking the best data set as input and the component content of praseodymium / neodymium elements as output, the network structure parameters of the one-dimensional convolution soft sensor model based on multiple residual attention blocks are optimized to obtain a praseodymium / neodymium component content prediction model, and the praseodymium / neodymium component content prediction model is used to determine the praseodymium / neodymium component content of the rare earth element solution image to be tested; the praseodymium / neodymium component content prediction model is the optimal one-dimensional convolution soft sensor model based on multiple residual attention blocks; The one-dimensional convolution soft-sensing model based on multiple residual attention blocks includes: an input layer, a feature extraction layer, a feature fusion layer, a fusion attention layer, multiple residual attention units, a global average pooling layer, a fully connected layer and an output layer; wherein the multiple residual attention units are connected in series, and any of the residual attention units includes a convolution layer and a residual attention block; The input layer is connected to the input end of the feature extraction layer, and the output end of the feature extraction layer is connected to the input end of the feature fusion layer; the output end of the feature fusion layer is connected to the input end of the fusion attention layer, the first output end of the fusion attention layer is connected to the input end of the first residual attention unit, and the output end of the last residual attention unit is connected to the input end of the global average pooling layer; the output end of the global average pooling layer and the second output end of the fusion attention layer are both connected to the input end of the fully connected layer, and the output end of the fully connected layer is connected to the output layer.
2. The method for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process according to claim 1, characterized in that: Obtain multiple rare earth element solution images and the on-site extraction level and praseodymium / neodymium element component content corresponding to each rare earth element solution image, specifically including: Machine vision technology is used to obtain image data of praseodymium / neodymium mixed solutions with color space characteristics at different on-site extraction levels and different component contents, and then obtain multiple rare earth element solution images and the on-site extraction level and praseodymium / neodymium component content corresponding to each rare earth element solution image.
3. The method for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process according to claim 1, characterized in that: Performing image processing on the rare earth element solution images to obtain color features and texture features corresponding to each rare earth element solution image specifically includes: Using the Opencv library, extracting the RGB color space of the rare earth element solution image; The RGB color space is converted into HSV color space features and YUV color space features by using a color feature conversion formula, thereby obtaining color features corresponding to each image of the rare earth element solution; The texture features of each rare earth element solution image are extracted using a gray level co-occurrence matrix; the texture features include energy, contrast, entropy, homogeneity, autocorrelation, mean value, variance and correlation.
4. The method for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process according to claim 1, characterized in that: Multiple mathematical models are used to compare the HSV color space feature data set, color feature data set and mixed feature data set to determine the best data set, including: The BP neural network model, SVM support vector machine prediction model, gradient boosting regression tree and extreme learning machine model were used to compare the HSV color space feature data set, color feature data set and mixed feature data set to determine the optimal data set.
5. The method for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process according to claim 1, characterized in that: A residual attention block includes three branches, namely a residual connection branch, a convolution branch and an attention branch; wherein the residual connection branch is used to add jump connections to the network, the convolution branch is used to perform convolution operations on the input data, and the attention branch is used to change the weight ratio between feature maps to give more important features more weight.
6. The method for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process according to claim 1, characterized in that: Taking the best data set as input and the component content of praseodymium / neodymium as output, the network structure parameters of the one-dimensional convolution soft sensor model based on multiple residual attention blocks are optimized to obtain the praseodymium / neodymium component content prediction model, which specifically includes: Divide the best data set into training set and test set, and standardize the training set and test set uniformly; According to the standardized training set and test set, a one-dimensional convolutional soft sensor model based on multiple residual attention blocks with different numbers of residual attention units is used for training, and the optimal number of residual attention units is determined based on the model performance according to the actual and predicted component contents of praseodymium and neodymium elements. The optimal one-dimensional convolution soft sensing model based on multiple residual attention blocks is determined by the optimal number of residual attention units.
7. A system for predicting the content of praseodymium / neodymium elements in a rare earth extraction and separation process, characterized in that: include: A data acquisition module, used to acquire multiple rare earth element solution images and the on-site extraction level and the component content of praseodymium / neodymium elements corresponding to each rare earth element solution image; A color feature and texture feature extraction module, used for performing image processing on the rare earth element solution image to obtain color features and texture features corresponding to each rare earth element solution image; the color features include HSV color space features and YUV color space features; A mixed feature determination module, for performing feature selection on the color feature, the texture feature and the on-site extraction level based on cross-validation by using a recursive feature elimination method based on random forests, to obtain a mixed feature corresponding to each rare earth element solution image; The best data set determination module is used to use multiple mathematical models to perform data set comparison on the HSV color space feature data set, the color feature data set and the mixed feature data set to determine the best data set; the color feature data set is a data set including HSV color space features and YUV color space features; The model training and model prediction module is used to optimize the network structure parameters of the one-dimensional convolution soft measurement model based on multiple residual attention blocks with the best data set as input and the component content of praseodymium / neodymium elements as output, so as to obtain the prediction model of the component content of praseodymium / neodymium elements, and use the prediction model of the component content of praseodymium / neodymium elements to determine the component content of praseodymium / neodymium elements in the rare earth element solution image to be tested; the prediction model of the component content of praseodymium / neodymium elements is the optimal one-dimensional convolution soft measurement model based on multiple residual attention blocks; the one-dimensional convolution soft measurement model based on multiple residual attention blocks includes: an input layer, a feature extraction layer, a feature fusion layer, a fusion attention layer, multiple residual attention units, a global average pooling layer, and a fully connected layer. and an output layer; wherein, a plurality of residual attention units are connected in series, and any of the residual attention units includes a convolutional layer and a residual attention block; the input layer is connected to the input end of the feature extraction layer, and the output end of the feature extraction layer is connected to the input end of the feature fusion layer; the output end of the feature fusion layer is connected to the input end of the fusion attention layer, the first output end of the fusion attention layer is connected to the input end of the first residual attention unit, and the output end of the last residual attention unit is connected to the input end of the global average pooling layer; the output end of the global average pooling layer and the second output end of the fusion attention layer are both connected to the input end of the fully connected layer, and the output end of the fully connected layer is connected to the output layer.
Citation Information
Patent Citations
Rare earth element component content prediction method and system based on deep neural network
CN115206455A