Method, device and equipment for predicting content of rare earth element components, medium and product

Through the combination of color features, grayscale symbiosis matrix and convolutional neural network, combined with transfer learning and residual network, the time delay problem of rare earth element component content detection is solved, and the rapid and accurate prediction of rare earth element component content is achieved, and the improvement of the improvement of the high-earth element component content is achieved. Detection efficiency and accuracy.

CN119068312APending Publication Date: 2024-12-03EAST CHINA JIAOTONG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411308144.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The prior art has a long time lag in the detection of rare earth element component content, and the extraction production process cannot be controlled in time and effectively, resulting in low detection efficiency.

Method used

The rare earth element component content prediction method based on color features, grayscale symbiosis matrix and convolutional neural network is used to predict the color features, spatial texture features and image recessive features by inputting them into the transfer learning-convolutional neural network model, combining with residual Poor network and attention mechanism to improve prediction accuracy.

Benefits of technology

It realizes rapid and accurate prediction of rare earth element component content, improves detection efficiency and accuracy, and is suitable for data scarcity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119068312A_ABST
    Figure CN119068312A_ABST
Patent Text Reader

Abstract

The invention discloses a rare earth element component content prediction method and device, equipment, a medium and a product, and relates to the technical field of rare earth element component content prediction.The method comprises the steps that a target rare earth solution image is obtained; based on a color feature extraction method, extracting color features in the target rare earth solution image; based on the gray level co-occurrence matrix, extracting spatial texture features in the target rare earth solution image to obtain image dominant features; based on a convolutional neural network, extracting image recessive features in the target rare earth solution image; and inputting the color features, the image dominant features and the image recessive features in the target rare earth solution image into the trained rare earth extraction process element component content prediction model, and predicting the rare earth element component content in the target rare earth solution image. The detection efficiency and prediction precision of rare earth element component content prediction under the condition of data scarcity can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of rare earth element component content prediction, and in particular to a method, device, equipment, medium and product for predicting the rare earth element component content. Background Art

[0002] As a strategic reserve resource, rare earths are widely used in electronics, optoelectronics, aerospace, and military fields. In the production control of rare earth cascade extraction and separation, observing the changes in the content of rare earth elements corresponding to the extraction process monitoring stages is a key link.

[0003] At present, offline chemical analysis methods are usually used at home and abroad to detect the content of rare earth element components, generally including ICP-AES, ICP-MS, XRF and UV-visible spectrophotometry, which have the characteristics of high precision and good reliability. However, the entire detection process is relatively long and has a large time lag, and it is impossible to effectively control the extraction production process in time. Summary of the invention

[0004] The purpose of this application is to provide a method, device, equipment, medium and product for predicting the content of rare earth element components, which can improve the detection efficiency of predicting the content of rare earth element components under conditions of data scarcity.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides a method for predicting the content of rare earth element components, the prediction method comprising:

[0007] Acquire the target rare earth solution image.

[0008] Based on a color feature extraction method, color features in the target rare earth solution image are extracted.

[0009] Based on the gray level co-occurrence matrix, the spatial texture features in the target rare earth solution image are extracted to obtain the image dominant features.

[0010] Based on a convolutional neural network, hidden image features in the target rare earth solution image are extracted.

[0011] The color features, image explicit features and image implicit features of the target rare earth solution image are input into the trained prediction model for elemental component content of the rare earth extraction process to predict the rare earth element component content in the target rare earth solution image; the prediction model for elemental component content of the rare earth extraction process is a prediction model based on transfer learning-convolutional neural network; the transfer learning-convolutional neural network is a neural network obtained by introducing a residual network structure, an attention mechanism and a transfer learning strategy on the basis of a one-dimensional convolutional network.

[0012] Optionally, the color features in the target rare earth solution image include HSI color features, RGB color features and YUV color features; the HSI color features include hue, saturation and brightness; the RGB color features include red, green and blue; and the YUV color features include chromaticity.

[0013] Optionally, the spatial texture features in the target rare earth solution image include energy, contrast, entropy, correlation, homogeneity, dissimilarity, mean, variance and inverse moment.

[0014] Optionally, based on a convolutional neural network, extracting implicit features of the target rare earth solution image specifically includes:

[0015] According to the formula Perform image latent feature extraction on the target rare earth solution image.

[0016] Among them, y l Represents the output vector y, c of the lth layer l-1 represents the cth channel in the l-1th layer, represents the convolution kernel parameter weight matrix of the lth layer, i represents the i-th channel in the lth layer, c represents the c-th channel in the l-1th layer, and the * symbol represents the convolution operation. represents the output vector x of the i-th channel of the l-1th layer, and It is also the input vector of this layer, b i l represents the bias term b of the i-th channel of the l-th layer.

[0017] Optionally, the construction process of the element component content prediction model of the rare earth extraction process is specifically as follows:

[0018] On the basis of the one-dimensional convolutional network, the residual network structure and the attention mechanism are introduced to obtain a one-dimensional convolutional network model based on the residual attention block; the one-dimensional convolutional network model is used to adaptively assign weights to the features according to their contributions.

[0019] On the basis of the one-dimensional convolutional network model based on the residual attention block, a transfer learning strategy is introduced to obtain a prediction model for the element component content in the rare earth extraction process; the transfer learning strategy measures the distance between the feature distributions of the source domain and the target domain data in each convolutional layer and the fully connected layer by calculating the maximum mean difference, and then determines the necessity of migration.

[0020] Optionally, the training process of the element component content prediction model of the rare earth extraction process specifically includes:

[0021] Step 201: Input the input data in the training set to the prediction model of element component content in the rare earth extraction process, forward propagate the prediction model of element component content in the rare earth extraction process, obtain the predicted output corresponding to the input data, and calculate the loss function value between the predicted output corresponding to the input data and the actual output; the training set includes multiple standard rare earth solution images with known rare earth element component content and their corresponding component content data.

[0022] Step 202: Based on the calculated loss function value, a back propagation algorithm is used to update the weight matrix and bias matrix in the element component content prediction model of the rare earth extraction process.

[0023] Step 203: Repeat step 201 and step 202 until a preset number of iterations is reached or the element component content prediction model for the rare earth extraction process converges.

[0024] In a second aspect, the present application provides a device for predicting the content of rare earth elements, the device comprising:

[0025] The image acquisition module is used to acquire the target rare earth solution image.

[0026] The color feature extraction module is used to extract the color features in the target rare earth solution image based on a color feature extraction method.

[0027] The dominant feature extraction module is used to extract the spatial texture features in the target rare earth solution image based on the gray level co-occurrence matrix to obtain the dominant features of the image.

[0028] The implicit feature extraction module is used to extract the implicit features of the image in the target rare earth solution image based on a convolutional neural network.

[0029] A prediction module is used to input the color features, image explicit features and image implicit features of the target rare earth solution image into a trained prediction model for the element component content of the rare earth extraction process, and predict the rare earth element component content in the target rare earth solution image; the prediction model for the element component content of the rare earth extraction process is a prediction model based on transfer learning-convolutional neural network; the transfer learning-convolutional neural network is a neural network obtained by introducing a residual network structure, an attention mechanism and a transfer learning strategy on the basis of a one-dimensional convolutional network.

[0030] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method for predicting the content of a rare earth element component as described above.

[0031] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned methods for predicting the content of a rare earth element component.

[0032] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any one of the above-mentioned methods for predicting the content of a rare earth element component.

[0033] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0034] The present application provides a method, device, equipment, medium and product for predicting the content of rare earth element components, obtaining rare earth solution images; extracting color features and spatial texture features of grayscale co-occurrence matrix to obtain explicit features of the image; extracting implicit features of the image through a convolutional neural network; inputting color, explicit and implicit features into the prediction model of element component content in the rare earth extraction process to predict the content of rare earth element components; the model is based on transfer learning-convolutional neural network, introducing residual network, attention mechanism and transfer learning strategy. The present application realizes the establishment of a one-dimensional convolutional neural network model with multiple residual attention blocks, effectively improving the problem of gradient vanishing or gradient explosion of the model network, so that the model can adaptively assign weights to features according to feature contribution and improve the prediction accuracy of the model; at the same time, in order to overcome the limited number of samples, a transfer learning strategy is added to accumulate model knowledge in the source task, significantly enhancing the training effect of the target network. Through this method, rapid and accurate prediction of the content of rare earth element components can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] 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 will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 A flow chart of a method for predicting the content of rare earth element components based on transfer learning-convolutional neural network provided in one embodiment of the present application.

[0037] Figure 2 A one-dimensional convolutional neural network framework structure diagram based on transfer learning provided in one embodiment of the present application.

[0038] Figure 3 A residual attention block composition is provided for an embodiment of the present application.

[0039] Figure 4A schematic diagram of texture feature extraction of a 20th-level rare earth solution image provided in an embodiment of the present application.

[0040] Figure 5 A schematic diagram of texture feature extraction of a 21st level rare earth solution image provided in one embodiment of the present application.

[0041] Figure 6 A schematic diagram of the corresponding values ​​of various characteristics at different extraction levels provided in an embodiment of the present application.

[0042] Figure 7 A comparison chart of model predictions under different migration strategies provided in one embodiment of the present application.

[0043] Figure 8 A comparison chart of the MeanRE evaluation index under different numbers of samples provided in an embodiment of the present application.

[0044] Fig. 9 A comparison chart of the MaxRE evaluation index under different numbers of samples provided in an embodiment of the present application.

[0045] Fig.10 A comparison chart of RMSE evaluation indicators under different numbers of samples provided in an embodiment of the present application.

[0046] Fig.11 R under different number of samples provided in an embodiment of the present application 2 Comparison chart of evaluation indicators.

[0047] Fig.12 A schematic diagram of the functional modules of a device for predicting the content of rare earth elements provided in one embodiment of the present application. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] At present, the soft measurement method is a data-driven modeling technology that can use actual process data to make fast and effective predictions. This method is applied to the online detection of rare earth element component content, which reflects the actual working conditions in real time, and has gradually developed into a trend for rapid detection of rare earth element component content. With the development of artificial intelligence, deep learning has become an important direction of machine learning. Convolutional neural networks and transfer learning ideas have gradually shown significant advantages in image processing, speech recognition, and text classification, especially in the case of small data volumes or diverse data distribution. Therefore, introducing transfer learning into the prediction of rare earth element component content can make full use of limited laboratory data, analyze the characteristics of solution images under different environments, and achieve rapid and accurate prediction of rare earth element component content.

[0050] The purpose of this application is to provide a method, device, equipment, medium and product for predicting the content of rare earth element components, which can improve the detection efficiency and prediction accuracy of the prediction of the content of rare earth element components under data scarcity conditions.

[0051] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0052] In an exemplary embodiment, Figure 1 As shown, a method for predicting the content of rare earth element components is provided, and the method is executed by a computer device, and specifically can be executed by a computer device such as a terminal or a server alone, or can be executed by a terminal and a server together. In the embodiment of the present application, the method includes the following steps 101 to 105. Among them:

[0053] Step 101: Acquire a target rare earth solution image.

[0054] Step 102: extracting color features from the target rare earth solution image based on a color feature extraction method.

[0055] Step 103: extracting spatial texture features in the target rare earth solution image based on the gray level co-occurrence matrix to obtain image dominant features.

[0056] Step 104: extracting implicit image features in the target rare earth solution image based on a convolutional neural network.

[0057] Step 105: Input the color features, image explicit features and image implicit features of the target rare earth solution image into the trained rare earth extraction process element component content prediction model to predict the rare earth element component content in the target rare earth solution image; the rare earth extraction process element component content prediction model is a prediction model based on transfer learning-convolutional neural network; the transfer learning-convolutional neural network is a neural network obtained by introducing a residual network structure, an attention mechanism and a transfer learning strategy on the basis of a one-dimensional convolutional network.

[0058] When executing step 101, the specific steps may be as follows:

[0059] The acquired target rare earth solution image may be a Pr / Nd solution image.

[0060] When executing step 102, the specific steps may be as follows:

[0061] Based on the color feature extraction method, the color features in the target rare earth solution image are extracted; the color features include RGB color features, HSI color features and YUV color features. Specifically, the image data with color features is obtained, and the color transparency, saturation and hue, brightness, color difference (chroma) and other features are described through color space conversion.

[0062] Among them, RGB, HSI and YUV represent different color modes, which are all used to describe the color information in the image.

[0063] Specifically, R in RGB stands for red, G stands for green, and B stands for blue. These three colors are the most commonly used color spaces in computer graphics. Application in rare earth solution image feature extraction: RGB color feature extraction usually involves extracting information from the red channel, green channel, and blue channel of the image. By analyzing these three channels, different color components in the rare earth solution can be identified, such as detecting iron oxides through the red channel. The RGB color model contains approximately 16.7 million different colors and is one of the most widely used color systems.

[0064] HSI is an abbreviation of Hue, S Saturation, and I Intensity (sometimes also expressed as Brightness). It is an intuitive way to describe color. Application in rare earth solution image feature extraction: HSI color feature extraction focuses more on the psychological feeling of color. By analyzing hue, saturation and brightness, it can extract information such as the distribution, vividness and light and dark changes of colors in rare earth solutions.

[0065] YUV is a color encoding method, mainly used in television systems and analog video fields. Y represents the luminance component, and U and V are chrominance components, which describe the color and saturation of the image. Application in rare earth solution image feature extraction: Although YUV is mainly used for audio and video encoding and decoding, in some cases, the YUV mode can also be used for image feature extraction. By analyzing the Y (luminance) component, the brightness information of the rare earth solution can be obtained; while the U and V components can provide additional information about the color of the rare earth solution.

[0066] When executing step 103, the specific steps may be as follows:

[0067] The image texture features extracted using the gray level co-occurrence matrix method include energy, contrast, entropy, correlation, homogeneity, dissimilarity, mean, variance and inverse moment. Figure 4 and Figure 5 As shown, by applying the gray level co-occurrence matrix to extract the texture features of the praseodymium / neodymium extraction solution images, the differences in the mean, contrast, dissimilarity, entropy and energy of these images can be clearly observed.

[0068] Specifically, the color information of the image is extracted, and at the same time, the corresponding mathematical model of using the gray-level co-occurrence matrix to further mine the texture features of the image is as follows:

[0069] Max = max(R, G, B) (1).

[0070] Min = min(R, G, B) (2).

[0071]

[0072] In the formula, the values ​​of R, G, and B are real numbers between 0 and 1, and the values ​​of R, G, and B represent the pixel values ​​of the red channel, green channel, and blue channel respectively; Max is the maximum of the RGB color features. Min is the minimum of the RGB color features; H is the hue, and I is the brightness. The calculation formula for the direction θ between pixels is:

[0073]

[0074] Scale (R, G, B) to (0, 255) units, and the formula for converting RGB to YUV is as follows:

[0075]

[0076] Where Y represents the brightness component, and U and V are the chrominance components.

[0077] Specifically, the gray-level co-occurrence matrix (GLCM) is used to capture the co-occurrence characteristics of pixel gray values ​​in different directions and distances, thereby revealing the spatial texture information in the image. The gray-level co-occurrence matrix can reflect the gray-level relationship between two pixels in space, such as energy reflects the uniformity of gray-level distribution, and contrast reflects the intensity of gray-level differences in the image. Entropy reflects the uncertainty of the image. The larger the entropy, the more complex the image spatial texture. Homogeneity reflects the distribution of image texture. Autocorrelation reflects the degree of correlation between the gray-level value in the image and the gray-level value of the surrounding pixels. The larger the autocorrelation, the smoother the image texture. The mean and variance describe the mean of the gray-level co-occurrence matrix and the degree of deviation from the mean, respectively. Correlation reflects the changing pattern of the gray-level value of the image. The higher the correlation, the more regular the image.

[0078] Specifically, the distance d of the gray-level co-occurrence matrix is ​​set to 1, and the inter-pixel direction θ takes the mean of each feature in the directions of 0, 45, 90, and 135 to balance the influence of different directions on the eigenvalues. In this way, the 9 features of the gray-level co-occurrence matrix are extracted as the spatial texture features of the image. They are:

[0079] energy:

[0080] Contrast ratio:

[0081] entropy:

[0082] Relevance:

[0083]

[0084] Homogeneity:

[0085] Dissimilarity:

[0086] Mean:

[0087] variance:

[0088] Inverse moment difference:

[0089] Where p(i, j) represents the value of the (i, j)th point in the gray level co-occurrence matrix under the given inter-pixel direction θ and distance d parameters.

[0090] like Figure 6As shown in the figure, the corresponding values ​​of color features and mixed features under different extraction levels, with the increase of extraction level, the content of rare earth elements also shows an increasing trend. At the same time, it can be clearly observed that U and V in color features, as well as homogeneity and inverse moment in texture features are positively correlated with the extraction level. On the contrary, Y, H, I in color features, and contrast, dissimilarity and mean features in texture features are negatively correlated with the extraction level. Figure 6 The horizontal axis of each curve graph in is the series, and the vertical axis is the eigenvalue.

[0091] When executing step 104, the details are as follows:

[0092] In a convolutional neural network, the input feature map is convolved with the convolution kernel to obtain an output feature map, which is then transformed nonlinearly through an activation function. The calculation method of this process can be expressed by the following formula:

[0093]

[0094] Among them, y l Represents the output vector y, c of the lth layer l-1 represents the cth channel in the l-1th layer, represents the convolution kernel parameter weight matrix of the lth layer, i represents the i-th channel in the lth layer, c represents the c-th channel in the l-1th layer, and the * symbol represents the convolution operation. represents the output vector x of the i-th channel of the l-1th layer, and It is also the input vector of this layer, b i l represents the bias term b of the i-th channel of the l-th layer.

[0095] The role of the pooling layer is to reduce the size and number of parameters of the feature map, while retaining important features and reducing the risk of overfitting. The calculation process of the pooling layer is as follows:

[0096]

[0097] In the formula, y l(i,j) represents the output value of the jth neuron of the ith channel of the ith layer, W represents the width of the pooling kernel, and X l (i,t) represents the input value of the jth neuron of the ith channel of the ith layer, x l(i,t) Represents the input value of the tth neuron in the ith channel of the lth layer.

[0098] The fully connected layer is used to classify or regress the output of the convolutional layer and the pooling layer. Its output is:

[0099] δ i =f(wi p i +b i ) (19).

[0100] Where i = 1, 2, ..., k; there are k outputs in total, δ i is the i-th output; w i and b i are the weight and threshold of the i-th neuron respectively; f is the activation function, p i Input nodes for the fully connected layer.

[0101] Before executing step 105, the method further includes:

[0102] The element component content prediction model of the rare earth extraction process is constructed, and the construction process is as follows:

[0103] On the basis of the one-dimensional convolutional network, the residual network structure and the attention mechanism are introduced to obtain a one-dimensional convolutional network model based on the residual attention block; the one-dimensional convolutional network model is used to adaptively assign weights to the features according to their contributions.

[0104] On the basis of the one-dimensional convolutional network model based on the residual attention block, a transfer learning strategy is introduced to obtain a prediction model for the element component content in the rare earth extraction process; the transfer learning strategy measures the distance between the feature distributions of the source domain and the target domain data in each convolutional layer and the fully connected layer by calculating the maximum mean difference, and then determines the necessity of migration.

[0105] Specifically, Figure 2 This is a one-dimensional convolutional neural network framework diagram based on transfer learning in this embodiment. On the basis of this network framework, the integration of transfer learning strategy can effectively improve the accuracy and reliability of rare earth element component content prediction under data scarce conditions.

[0106] Specifically, by introducing an attention mechanism module based on the residual network structure and utilizing the gradient preservation characteristics of the residual connection and the information screening function of the attention mechanism, effective feature extraction and transmission can be achieved in deep convolutional neural networks.

[0107] In the residual branch, the network learns the residual between the input and the expected output, rather than directly learning the output. The residual block is implemented as follows:

[0108] y = f(H(x, W) + h(x)) (20).

[0109] In the formula, y represents the output of the residual block, f is the activation function, W is the weight parameter, x is the input, H(x, W) is the residual mapping to be learned, and h(x) is the identity mapping. In neural networks, residual mapping is often easier to optimize than the original mapping. For example, in a neural network, a certain identity mapping is its optimal solution. It is more difficult to fit the identity mapping by stacking multiple layers of nonlinear networks than to directly change the residual to zero.

[0110] If the input is represented as x and the underlying mapping is represented as H(x), then the residual mapping is defined as:

[0111] F(x)=H(x)-x(21).

[0112] like Figure 3 As shown in the figure, the residual structure can be used to extract deep information of network data, and the attention mechanism can be used to suppress the weight ratio of noise generated by the network being too deep. Specifically, the residual attention block (RAB) is mainly composed of the following parts:

[0113] (1) Initial stage: The input features are first processed by the convolution branch to extract feature information and obtain the convolution output F conv (x).

[0114] (2) Feature compression: Global average pooling is performed on the channel information of the convolution output to obtain the global feature representation. The formula is expressed as:

[0115]

[0116] In the formula, F gap represents the output of global average pooling, F conv represents the convolution operation, x represents the input feature of RAB, x i represents the i-th channel in the input feature, and C represents the number of channels in the convolutional layer.

[0117] (3) Attention weight calculation: The compressed global information is processed through the fully connected layer and converted into weight proportion using the Softmax activation function to obtain the output of the attention branch. The formula is as follows:

[0118] F att (F gap (x)) = δ(F(g(F gap (x)), W)) (23).

[0119] In the formula, F att represents the operation of the attention mechanism; F represents the operation of the fully connected layer; g(F gap(x)) represents the input of the fully connected layer, that is, the output of the global average pooling; W represents the weight parameter in the fully connected layer; this formula processes the output of the global average pooling through the fully connected layer and converts it into the weight proportion of the feature using the Softmax activation function, thereby obtaining the output of the attention mechanism, and δ is the output.

[0120] (4) Output fusion: Multiply the output of the convolution branch and the output of the attention branch, and perform weighted fusion on the result with the output of the residual connection branch to finally output the RAB result. The formula is as follows:

[0121] y=δ(F conv (x)·F att (F gap (x))+x) (24).

[0122] Where y represents the output of RAB, F att (F gap (x)) represents the output of the attention branch after being processed by the attention mechanism.

[0123] In the traditional machine learning field, learning systems rely on large and specific data sets. In contrast, transfer learning demonstrates its unique advantages. Given a source domain and source task, a target domain and target task, the knowledge gained from training in the source domain and source task can be used to help the target domain learn, thereby improving the performance of learning tasks in the new domain. During the transfer process, the maximum mean discrepancy (MMD) can be used for judgment.

[0124] Specifically, MMD is used to evaluate and reduce the distribution difference between the source domain and the target domain. This method is particularly suitable for situations where the source domain and the target domain are similar but have some statistical differences. The formula of MMD is as follows:

[0125] Assume that there are two sets of data X={x1, x2, ..., x n} and Y = {y1, y2, ..., y m}, then the MMD square distance calculation formula of X and Y is shown in formula (25).

[0126]

[0127] Where, ||·||H represents the Reproducing Kernel Hilbert Space (RKHS); Represents the mapping function, which is used to map the original variable to RKHS. By expanding the square of formula (25), the inner product in RKHS can be converted into a kernel function, as shown in formula (26).

[0128]

[0129] In the formula, n represents the number of source domain samples; m represents the number of target domain samples; k(x i ,y i ) represents a vector x i The sum vector is the input y i , and outputs a scalar-valued kernel function.

[0130] Specifically, the core idea of ​​transfer learning is to construct the target task network model with the aid of source task data to solve the problem of increased difficulty in predicting the target domain component content due to the small amount of target domain data. This application is based on the designed MRAB-CNN model (prediction model of element component content in rare earth extraction process) and adds transfer learning. The specific steps of the implementation process of this method are as follows:

[0131] 1) Model structure design: Determine the optimal number of residual attention units. Construct the MRAB-CNN model structure, including the required convolutional layers, residual attention blocks (RABs), and other necessary network layers.

[0132] 2) Model initialization: Initialize the model parameters, including the weights (W) and biases (b) of the convolutional layers. This usually uses a random initialization method such as Xavier initialization or He initialization.

[0133] 3) Pre-training MRAB-CNN model with source domain data: Load the training set of the source domain dataset. Repeat the following steps until the training stop condition is met (such as the loss value is less than the threshold or the maximum number of iterations is reached): Input the training set to the MRAB-CNN model and perform forward propagation to calculate the model output.

[0134] The mean square error (MSE) is used as the loss function to calculate the error between the model output and the true label. The model weights are updated through the back-propagation algorithm to minimize the loss function value.

[0135] 4) Parameter migration: Input the source domain data and a small amount of target domain data into the pre-trained model. Use formula (26) or other measurement methods to calculate the MMD square distance between the source domain and target domain feature distributions. For each layer in the MRAB-CNN model, decide whether to migrate the layer parameters based on the MMD value: if the MMD value is less than a certain threshold (such as 0.06), migrate the layer parameters. Otherwise, randomly initialize the layer parameters.

[0136] 5) Update MRAB-CNN model with target domain dataset: Continue training the MRAB-CNN model using the target domain dataset (some standard rare earth solution images have labeled data. Repeat the same sub-steps as the source domain data pre-training), but this time use the target domain dataset.

[0137] 6) Model testing: Use 20% of the labeled target domain data as the test set. Input the test set data into the trained MRAB-CNN model to evaluate the performance of the model. The performance of the model can be measured by various performance indicators (such as accuracy, mean square error, etc.). Note: In practical applications, it may be necessary to perform hyperparameter tuning and regularization on the model to prevent overfitting. In addition, the specific implementation of transfer learning (such as fine-tuning, fixing some layers, etc.) can be adjusted according to the specific task and dataset.

[0138] in, Figure 7 In this embodiment, a variety of transfer learning strategies are used for comparison, and the results of component content prediction of different transfer strategy models are shown in Table 1.

[0139] Each transfer learning strategy is described as follows:

[0140] Strategy 1 (no transfer learning): directly use the target domain data to train the model from scratch.

[0141] Strategy 2 (Fully Fixed Parameter Migration): Migrate the parameters of all convolutional layers and fully connected layers of the source domain model.

[0142] Strategy 3 (full parameter transfer): The source domain model is transferred, but the model parameters are trained using the target domain dataset to achieve parameter fine-tuning.

[0143] Strategy 4 (residual block parameter migration): migrate the source domain model, fix the parameters on each residual block, and train the parameters of other layers using data in the target domain.

[0144] Strategy 5 (convolutional layer parameter migration): Migrate the source domain model, fix only the parameters of the convolutional layer, and use the data in the target domain to train the fully connected layer of the model.

[0145] Strategy 6 (MMD-based migration): Migrate the layers whose MMD distance is less than the threshold and randomly initialize the parameters of other layers. Strategy 6 is also referred to as the strategy of this paper in the figure caption.

[0146] Table 1 Component content prediction results of different migration strategy models

[0147] Transfer learning strategy MeanRE MaxRE RMSE R2 Strategy 1 (no transfer learning) 0.8009 2.304 0.7011 0.99929 Strategy 2 (Fully Fixed Migration of Parameters) 1.8575 6.549 1.9234 0.99464 Strategy 3 (Full parameter migration) 0.5047 2.7161 0.4403 0.99972 Strategy 4 (Residual Block Parameter Migration) 0.6171 1.3897 0.5447 0.99957 Strategy 5 (convolutional layer parameter migration) 0.6973 4.6806 0.5139 0.99962 Strategy 6 (MMD-based migration) 0.3618 1.2179 0.4204 0.99974

[0148] The transfer learning strategy (Strategy 6) proposed in this example has good performance in terms of root mean square error (RMSE), maximum relative error (MaxRE), mean relative error (MeanRE), and determination coefficient (R 2 ) all performed well in the four evaluation indicators. And the prediction relative error of the method proposed in this embodiment on all samples was controlled within 4%.

[0149] in, Figure 8-Figure 11 By comparing the test results of different training data sets for the embodiments of this application, it can be clearly observed that with the increase in the number of training samples, the overall prediction error shows a downward trend. Compared with other models (based on genetic algorithm optimized extreme learning machine (GA-ELM), least squares support vector machine (LSSVM), extreme gradient boosting algorithm (Xgboost), residual attention convolutional neural network method (RAB-CNN), the network model with residual block learning has advantages in all four test indicators, and the relative error percentage curve of the model fluctuates less. The RAB-CNN model before improvement is also better than other machine learning models in overall performance. It shows that the one-dimensional convolution model based on multiple residual attention blocks proposed in this embodiment performs well and can be applied to the prediction of rare earth element component content. Figure 8-11 In the caption, GA-ELM is an extreme learning machine optimized based on genetic algorithm, LSSVM is a least squares support vector machine, Xgboost is an extreme gradient boosting algorithm, RAB-CNN is a residual attention convolutional neural network method, MRAB-CNN is a multi-residual attention convolutional neural network method, and Ours is a transfer learning-convolutional neural network method.

[0150] Based on the same inventive concept, the embodiment of the present application also provides a prediction device for implementing the above-mentioned prediction method of rare earth element component content. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more prediction device embodiments provided below can refer to the limitations of the prediction method of rare earth element component content in the above text, and will not be repeated here.

[0151] In an exemplary embodiment, Fig.12 As shown, a device for predicting the content of rare earth elements is provided, comprising:

[0152] The image acquisition module 1201 is used to acquire the target rare earth solution image.

[0153] The color feature extraction module 1202 is used to extract the color features in the target rare earth solution image based on a color feature extraction method.

[0154] The dominant feature extraction module 1203 is used to extract the spatial texture features in the target rare earth solution image based on the gray level co-occurrence matrix to obtain the image dominant features.

[0155] The implicit feature extraction module 1204 is used to extract implicit features of the target rare earth solution image based on a convolutional neural network.

[0156] Prediction module 1205 is used to input the color features, image explicit features and image implicit features of the target rare earth solution image into a trained prediction model for elemental component content of a rare earth extraction process, and predict the rare earth element component content in the target rare earth solution image; the prediction model for elemental component content of a rare earth extraction process is a prediction model based on transfer learning-convolutional neural network; the transfer learning-convolutional neural network is a neural network that introduces a residual network and an attention mechanism, as well as a transfer learning strategy, on the basis of a one-dimensional convolutional network.

[0157] In an exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and the above methods are implemented when the processor executes the computer program.

[0158] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and the computer program implements the above methods when executed by a processor.

[0159] In an exemplary embodiment, a computer program product is provided, including a computer program, and the computer program implements the above methods when executed by a processor.

[0160] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0161] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0162] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, 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 this application.

Claims

1. A method for predicting the content of rare earth elements, characterized in that: The prediction method comprises: Acquire a target rare earth solution image; Extracting color features from the target rare earth solution image based on a color feature extraction method; Based on the gray level co-occurrence matrix, extracting the spatial texture features in the target rare earth solution image to obtain the image dominant features; Extracting hidden features of the target rare earth solution image based on a convolutional neural network; The color features, image explicit features and image implicit features of the target rare earth solution image are input into the trained prediction model for elemental component content of the rare earth extraction process to predict the rare earth element component content in the target rare earth solution image; the prediction model for elemental component content of the rare earth extraction process is a prediction model based on transfer learning-convolutional neural network; the transfer learning-convolutional neural network is a neural network obtained by introducing a residual network structure, an attention mechanism and a transfer learning strategy on the basis of a one-dimensional convolutional network.

2. The method for predicting the content of rare earth elements according to claim 1, characterized in that: The color features in the target rare earth solution image include HSI color features, RGB color features and YUV color features; the HSI color features include hue, saturation and brightness; the RGB color features include red, green and blue; and the YUV color features include chromaticity.

3. The method for predicting the content of rare earth elements according to claim 1, characterized in that: The spatial texture features in the target rare earth solution image include energy, contrast, entropy, correlation, homogeneity, dissimilarity, mean, variance and inverse moment.

4. The method for predicting the content of rare earth elements according to claim 1, characterized in that: Based on the convolutional neural network, the hidden features of the target rare earth solution image are extracted, specifically including: According to the formula Extracting hidden features of the target rare earth solution image; Among them, y l Represents the output vector y, c of the lth layer l-1 represents the cth channel in the l-1th layer, represents the convolution kernel parameter weight matrix of the lth layer, i represents the i-th channel in the lth layer, c represents the c-th channel in the l-1th layer, and the * symbol represents the convolution operation. represents the output vector x of the i-th channel of the l-1th layer, and It is also the input vector of this layer. represents the bias term b of the i-th channel of the l-th layer.

5. The method for predicting the content of rare earth elements according to claim 1, characterized in that: The construction process of the element component content prediction model of the rare earth extraction process is specifically as follows: On the basis of the one-dimensional convolutional network, a residual network structure and an attention mechanism are introduced to obtain a one-dimensional convolutional network model based on a residual attention block; the one-dimensional convolutional network model is used to adaptively assign weights to the features according to their contribution; On the basis of the one-dimensional convolutional network model based on residual attention block, a transfer learning strategy is introduced to obtain a prediction model of element component content in rare earth extraction process; The transfer learning strategy measures the distance between the feature distribution of source domain and target domain data in each convolutional layer and fully connected layer by calculating the maximum mean difference, and then determines the necessity of transfer.

6. The method for predicting the content of rare earth elements according to claim 1, characterized in that: The training process of the element component content prediction model of the rare earth extraction process specifically includes: Step 201: inputting the input data in the training set into the prediction model of the element component content in the rare earth extraction process, forward propagating the prediction model of the element component content in the rare earth extraction process, obtaining the predicted output corresponding to the input data, and calculating the loss function value between the predicted output corresponding to the input data and the actual output; the training set includes a plurality of standard rare earth solution images with known rare earth element component contents and their corresponding component content data; Step 202: According to the calculated loss function value, a back propagation algorithm is used to update the weight matrix and bias matrix in the element component content prediction model of the rare earth extraction process; Step 203: Repeat step 201 and step 202 until a preset number of iterations is reached or the element component content prediction model for the rare earth extraction process converges.

7. A device for predicting the content of rare earth elements, characterized in that: The prediction device comprises: An image acquisition module, used for acquiring an image of a target rare earth solution; A color feature extraction module, used to extract color features in the target rare earth solution image based on a color feature extraction method; An explicit feature extraction module is used to extract spatial texture features in the target rare earth solution image based on a gray level co-occurrence matrix to obtain image explicit features; An implicit feature extraction module, used for extracting implicit features of the image in the target rare earth solution image based on a convolutional neural network; A prediction module is used to input the color features, image explicit features and image implicit features of the target rare earth solution image into a trained prediction model for the element component content of the rare earth extraction process, and predict the rare earth element component content in the target rare earth solution image; the prediction model for the element component content of the rare earth extraction process is a prediction model based on transfer learning-convolutional neural network; the transfer learning-convolutional neural network is a neural network obtained by introducing a residual network structure, an attention mechanism and a transfer learning strategy on the basis of a one-dimensional convolutional network.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method for predicting the content of a rare earth element component as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a method for predicting the content of a rare earth element component according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, a method for predicting the content of a rare earth element component according to any one of claims 1 to 6 is implemented.