Knowledge and data-driven mineral flotation process operating condition identification method and device
By employing a knowledge- and data-driven method for identifying the working conditions of the mineral flotation process, and utilizing morphological, statistical, textural features, and supervised contrastive learning models, this method addresses the subjective differences and low precision issues inherent in traditional manual inspections, achieving efficient and accurate working condition identification and automated monitoring.
Patent Information
- Application Number
- CN202410912077.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-07-09
AI Technical Summary
Traditional mineral flotation process monitoring relies on manual inspection, which suffers from significant subjective differences, high labor intensity, and low observation accuracy, making it difficult to meet the needs of modern mining for efficient and automated monitoring.
A knowledge- and data-driven method for identifying the working conditions of mineral flotation processes is proposed. By acquiring flotation foam images, morphological, statistical, and textural features are extracted using a knowledge transfer model. In addition, a supervised contrastive learning model is used to construct positive and negative feature samples, thereby improving the accuracy of working condition identification.
It improves the accuracy and automation level of mineral flotation process condition identification, and optimizes mineral processing efficiency and resource utilization.
Smart Images

Figure CN118887450B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of mining engineering and resource processing engineering technology, and in particular to a method and apparatus for identifying the working conditions of mineral flotation processes driven by knowledge and data. Background Technology
[0002] Mineral resources are the material foundation for economic and social development and an important guarantee for the healthy development of the national economy. Data on mineral resource reserves are a crucial component of basic national conditions and strength, and improving the utilization rate of mineral resources is of great significance to my country's modernization. With the increasing global demand for mineral resources, the continuous depletion of high-quality resource reserves, and the increasingly deteriorating mining conditions, how to efficiently and accurately utilize mineral resources has become a crucial issue in the mining industry today.
[0003] Foam flotation, a widely used separation technology in mineral processing, plays a crucial role in improving the comprehensive utilization rate of mineral resources. During flotation, the visual characteristics of the foam layer surface are closely related to the flotation production process; the degree of foam accumulation and the texture of the foam surface directly reflect the flotation production conditions and further reflect the physicochemical properties of the flotation reagents added and the mineral particles carried by the foam layer. However, traditional flotation process monitoring mainly relies on manual inspection, judging the operating conditions by observing the visual characteristics of the foam. This method suffers from significant subjective differences, high labor intensity, and low observation accuracy, making it difficult to meet the demands of modern mining for efficient and automated monitoring. Therefore, how to better identify the operating conditions of the mineral flotation process has been a long-standing concern. Summary of the Invention
[0004] In view of this, this application provides a method and apparatus for identifying the working conditions of a mineral flotation process driven by a combination of knowledge and data, so as to better identify the working conditions of the mineral flotation process.
[0005] To achieve the above objectives, the following solution is proposed:
[0006] A knowledge- and data-driven method for identifying the operating conditions of a mineral flotation process includes:
[0007] Obtain flotation foam images;
[0008] The flotation foam image is input into a pre-trained mineral flotation process condition recognition model to obtain the condition category;
[0009] The mineral flotation process condition identification model includes: a knowledge transfer model, a master classification model, and a supervised contrastive learning model.
[0010] The training process of the mineral flotation process condition identification model includes:
[0011] Acquire training images of flotation foam;
[0012] The knowledge transfer model processes the flotation foam training image, extracts the morphological features, statistical features, texture features and physical features of the flotation foam training image, and obtains the knowledge cross-entropy loss and soft target value based on the morphological features, the statistical features, the texture features and the physical features.
[0013] The nonlinear classification head of the knowledge transfer model is updated based on the knowledge cross-entropy loss.
[0014] The main classification model processes the flotation foam training images to obtain working condition category prediction, flotation foam training anchor point image features, and main classification cross-entropy loss.
[0015] Based on the soft target value and the predicted value of the working condition category, the KL divergence is obtained;
[0016] The supervised contrastive learning model constructs several positive and negative samples based on the flotation foam training anchor image, and obtains feature positive samples and feature negative samples based on the positive and negative samples. The positive samples are the enhanced samples of the flotation foam training anchor image and the samples with the same label as them. The negative samples are the samples with different labels from the flotation foam training anchor image.
[0017] Based on the features of the flotation foam training anchor point image, the positive feature samples, and the negative feature samples, a contrastive loss is obtained;
[0018] Based on the main classification cross-entropy loss, the KL divergence, and the contrast loss, the knowledge and data joint-driven loss is obtained;
[0019] Based on the knowledge and data jointly driving the loss, it is determined whether the mineral flotation process condition identification model has been trained successfully.
[0020] If not, then based on the knowledge and data jointly driving the loss, update the parameters of the mineral flotation process condition identification model, and return to the step of obtaining flotation foam training images;
[0021] If so, the training ends, and the trained mineral flotation process condition identification model is obtained.
[0022] Optionally, the step of obtaining the contrastive loss based on the features of the flotation foam training anchor point image, the positive feature samples, and the negative feature samples includes:
[0023] Obtain the working condition category labels for the training anchor point images of flotation foam;
[0024] Select negative samples of features adjacent to the working condition category and the features of the flotation foam training anchor point image, and combine them in pairs linearly to obtain hard negative samples of features.
[0025] The feature hard negative sample is obtained by linearly combining the features of the feature hard negative sample and the features of the float foam training anchor image;
[0026] Based on the features of the flotation foam training anchor image, the positive feature samples, and the difficult negative feature samples, a contrastive loss is obtained.
[0027] Optionally, obtaining the knowledge cross-entropy loss and soft target value based on the morphological features, the statistical features, the texture features, and the physical features includes:
[0028] Based on the morphological features, statistical features, texture features, and physical features, the initial cross-entropy loss and category output are obtained;
[0029] Adding a constraint term to the initial cross-entropy loss yields the knowledge cross-entropy loss;
[0030] The soft target value is calculated based on the category output.
[0031] Optionally, acquiring the flotation foam image includes:
[0032] Obtain flotation foam video;
[0033] The flotation foam video is divided into several video segments, each video segment containing an image with a preset number of frames;
[0034] The image is downsampled to obtain a downsampled flotation foam image.
[0035] Optional, also includes:
[0036] The main classification model uses a stochastic gradient descent algorithm to minimize the joint knowledge and data-driven loss and update the model parameters.
[0037] The supervised contrastive learning model uses the updated parameters from the main classification model to update its own parameters using an exponential moving average.
[0038] Optionally, after acquiring the flotation foam image, the method further includes:
[0039] The flotation foam image is standardized to obtain a standard flotation foam image;
[0040] The step of inputting the flotation foam image into a pre-trained mineral flotation process condition recognition model to obtain the condition category includes:
[0041] The standard flotation foam image is input into a pre-trained mineral flotation process condition recognition model to obtain the condition category.
[0042] A knowledge- and data-driven mineral flotation process condition identification device includes:
[0043] The image acquisition module is used to acquire images of the flotation foam.
[0044] The working condition category identification module is used to input the flotation foam image into a pre-trained mineral flotation process working condition identification model to obtain the working condition category.
[0045] The model training module is used to train the mineral flotation process condition identification model, wherein the mineral flotation process condition identification model includes: a knowledge transfer model, a master classification model, and a supervised contrastive learning model;
[0046] The training process of the mineral flotation process condition identification model includes:
[0047] Acquire training images of flotation foam;
[0048] The knowledge transfer model processes the flotation foam training image, extracts the morphological features, statistical features, texture features and physical features of the flotation foam training image, and obtains the knowledge cross-entropy loss and soft target value based on the morphological features, the statistical features, the texture features and the physical features.
[0049] The nonlinear classification head of the knowledge transfer model is updated based on the knowledge cross-entropy loss.
[0050] The main classification model processes the flotation foam training images to obtain working condition category prediction, flotation foam training anchor point image features, and main classification cross-entropy loss.
[0051] Based on the soft target value and the predicted value of the working condition category, the KL divergence is obtained;
[0052] The supervised contrastive learning model constructs several positive and negative samples based on the flotation foam training anchor image, and obtains feature positive samples and feature negative samples based on the positive and negative samples. The positive samples are the enhanced samples of the flotation foam training anchor image and the samples with the same label as them. The negative samples are the samples with different labels from the flotation foam training anchor image.
[0053] Based on the features of the flotation foam training anchor point image, the positive feature samples, and the negative feature samples, a contrastive loss is obtained;
[0054] Based on the main classification cross-entropy loss, the KL divergence, and the contrast loss, the knowledge and data joint-driven loss is obtained;
[0055] Based on the knowledge and data jointly driving the loss, it is determined whether the mineral flotation process condition identification model has been trained successfully.
[0056] If not, then based on the knowledge and data jointly driving the loss, update the parameters of the mineral flotation process condition identification model, and return to the step of obtaining flotation foam training images;
[0057] If so, the training ends, and the trained mineral flotation process condition identification model is obtained.
[0058] Optionally, the image acquisition module includes:
[0059] The video acquisition unit is used to acquire videos of flotation foam.
[0060] A video segmentation unit is used to segment the flotation foam video into several video segments, each video segment containing an image with a preset number of frames;
[0061] The downsampling unit is used to downsample the image to obtain a downsampled flotation foam image.
[0062] Optionally, the process by which the model training module obtains the knowledge cross-entropy loss and soft target value based on the morphological features, the statistical features, the texture features, and the physical features includes:
[0063] Based on the morphological features, statistical features, texture features, and physical features, the initial cross-entropy loss and category output are obtained;
[0064] Adding a constraint term to the initial cross-entropy loss yields the knowledge cross-entropy loss;
[0065] The soft target value is calculated based on the category output.
[0066] Optionally, the process by which the model training module obtains the contrastive loss based on the features of the flotation foam training anchor image, the positive feature samples, and the negative feature samples includes:
[0067] Obtain the working condition category labels for the training anchor point images of flotation foam;
[0068] Select negative samples of features adjacent to the working condition category and the features of the flotation foam training anchor point image, and combine them in pairs linearly to obtain hard negative samples of features.
[0069] The feature hard negative sample is obtained by linearly combining the features of the feature hard negative sample and the features of the float foam training anchor image;
[0070] Based on the features of the flotation foam training anchor image, the positive feature samples, and the difficult negative feature samples, a contrastive loss is obtained.
[0071] As can be seen from the above technical solutions, the knowledge- and data-driven mineral flotation process condition identification method and apparatus provided in this application embodiment includes: acquiring flotation foam images; inputting the flotation foam images into a pre-trained mineral flotation process condition identification model to obtain a condition category; wherein the mineral flotation process condition identification model includes: a knowledge transfer model, a main classification model, and a supervised contrastive learning model; the training process of the mineral flotation process condition identification model includes: acquiring flotation foam training images; the knowledge transfer model processing the flotation foam training images to extract morphological features, statistical features, texture features, and physical features of the flotation foam training images; and obtaining a knowledge cross-entropy loss and a soft target value based on the morphological features, statistical features, texture features, and physical features; updating the nonlinear classification head of the knowledge transfer model based on the knowledge cross-entropy loss; and the main classification model processing the flotation foam training images to obtain a condition category prediction, flotation foam training anchor point image features, and main classification cross-entropy loss. The training loss is calculated as follows: Based on the soft target value and the predicted value of the working condition category, the KL divergence is obtained. The supervised contrastive learning model constructs several positive and negative samples based on the flotation foam training anchor image, and obtains feature positive samples and feature negative samples based on the positive and negative samples. The positive samples are the enhanced samples of the flotation foam training anchor image and samples with the same label as them. The negative samples are samples with different labels from the flotation foam training anchor image. Based on the features of the flotation foam training anchor image, the feature positive samples, and the feature negative samples, the contrastive loss is obtained. Based on the main classification cross-entropy loss, the KL divergence, and the contrastive loss, the knowledge and data joint driving loss is obtained. Based on the knowledge and data joint driving loss, it is determined whether the mineral flotation process working condition identification model has been trained. If not, the parameters of the mineral flotation process working condition identification model are updated based on the knowledge and data joint driving loss, and the step of obtaining the flotation foam training image is returned. If yes, the training ends, and the trained mineral flotation process working condition identification model is obtained. In this application, the mineral flotation process condition identification model improves the accuracy of condition identification from a knowledge level by utilizing the morphological features, statistical features, texture features, and physical features through a knowledge transfer model during training. By constructing positive and negative feature samples through a supervised contrastive learning model and comparing them with the features of the flotation foam training anchor point image, the accuracy of condition identification is improved from a data level, making the condition identification more accurate to a certain extent. Attached Figure Description
[0072] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0073] Figure 1 A schematic diagram of a foam flotation principle provided in an embodiment of this application;
[0074] Figure 2 A flowchart of a knowledge- and data-driven method for identifying the working conditions of a mineral flotation process is provided in an embodiment of this application.
[0075] Figure 3 A diagram illustrating the architecture of a mineral flotation process condition identification model provided in this application embodiment;
[0076] Figure 4 A ResNet50 model architecture diagram provided for embodiments of this application;
[0077] Figure 5 A basic architecture diagram of a knowledge transfer model-assisted training of a main classification model provided in this application embodiment;
[0078] Figure 6 A basic architecture diagram of a supervised contrastive learning model assisted in training a main classification model is provided in the embodiments of this application;
[0079] Figure 7 This is a schematic diagram of a knowledge- and data-driven mineral flotation process condition identification device provided in an embodiment of this application. Detailed Implementation
[0080] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0081] Mineral resources are vital natural resources, playing a crucial role in people's production and daily lives, and profoundly impacting national economic stability and sustainable social development. However, with the gradual depletion of high-quality resource reserves and increasingly severe mining conditions, optimizing the utilization of mineral resources has become particularly urgent. Foam flotation technology, as a widely used separation technology in mineral processing, requires optimization of its monitoring methods to improve the comprehensive utilization rate of mineral resources.
[0082] Foam flotation technology separates minerals based on differences in the physicochemical properties of their surfaces. The specific process is as follows: Figure 1 As shown, Figure 1 This embodiment of the application provides a schematic diagram of a froth flotation principle. The ore is first ground into appropriately sized particles using a ball mill, and then an appropriate amount of water is added to prepare a slurry. To achieve effective flotation, flotation reagents such as collectors, frothers, and modifiers are added to the slurry. The collector alters the hydrophobicity of the mineral surface, making it easier for mineral particles to adhere to air bubbles. The frother acts on the water-air interface, dispersing air into small bubbles in the slurry and enhancing the mineralization degree and stability of the bubbles during the flotation process. The modifier adjusts the interaction between the reagents and the mineral surface, as well as the properties of the slurry, thereby improving the selectivity for the target mineral. After being thoroughly stirred in a mixing tank, the slurry, after being mixed with flotation reagents, flows into the flotation cell through the feed inlet. In the flotation cell, the motor drives the rotor to rotate at high speed, which in turn drives the impeller to stir the slurry, cutting the intake air into a large number of tiny bubbles. As bubbles rise, they collide with suspended mineral particles in the slurry. Hydrophobic mineral particles adhere firmly to the surface of the bubbles and are carried to the surface of the slurry, forming a flotation foam layer for collecting concentrate. Hydrophilic mineral particles, unable to adhere to the bubbles, remain in the slurry and are eventually discharged from the flotation cell as tailings.
[0083] In the process of froth flotation, the visual characteristics of the froth layer surface are closely related to the flotation production process. That is, the degree of froth accumulation and the texture of the froth surface directly reflect the flotation production conditions, and further reflect the physicochemical properties of the flotation reagents added in the process and the mineral particles carried by the froth layer.
[0084] Currently, domestic flotation plants generally rely on manual inspections to monitor the flotation process, judging the operating conditions by visually observing the characteristics of flotation foam, and then adjusting the flotation process accordingly. However, manual inspections have the following problems: (1) large subjective differences, making it impossible to make an objective evaluation of the foam state; (2) high labor intensity, making it difficult to achieve continuous and long-term observation; (3) low observation accuracy, making it impossible to quantify the visual characteristics of foam, relying only on personal experience to make a rough judgment. Therefore, people have begun to combine machine vision technology and artificial intelligence methods to build an automatic monitoring system for the flotation process to replace manual observation. Among them, the automatic monitoring system uses a camera installed above the flotation cell to collect foam images in real time. After the images are transmitted to the computer via optical fiber, image processing technology is used to analyze the characteristic parameters of the foam images, and then a flotation process monitoring model is constructed based on these parameters to describe the flotation performance under different operating conditions, enhance the accuracy of operating condition identification, and lay the foundation for improving the automation level of the flotation process and optimizing mineral processing efficiency and resource utilization.
[0085] Deep learning uses multi-layered neural networks to extract deep, abstract features from input images, offering significant advantages in handling complex nonlinear relationships. Therefore, many researchers have attempted to apply it to foam image-based monitoring tasks. However, existing methods rely on feature embedding from deep neural networks, making them susceptible to noise and limited labeled training samples. This often results in unsatisfactory performance when applied to industrial process monitoring. On one hand, existing methods use an end-to-end learning approach for feature embedding, neglecting the rich and diverse semantic information related to worker observation experience contained in flotation foam images, such as foam color, size, and breakage rate. On the other hand, existing methods ignore potential inter-sample correlations during the learning process, limiting the discriminative power of the extracted features.
[0086] To leverage the experience accumulated by concentrator workers during production to provide rich prior knowledge for deep neural networks, and to enhance the deep neural network's understanding of the intrinsic structure, similarities, and differences of data at the data-driven level through contrastive learning, thereby improving the accuracy of operating condition identification, this application provides a knowledge- and data-driven method for identifying operating conditions in mineral flotation processes. Figure 2 As shown, Figure 2 A flowchart of a knowledge- and data-driven method for identifying the operating conditions of a mineral flotation process is provided in this application embodiment. The method may include the following steps:
[0087] Step S100: Obtain the flotation foam image.
[0088] Specifically, images of the flotation foam can be acquired using an industrial camera mounted above the flotation cell, along with a light source. The industrial camera can be a dome camera, spherical camera, bullet camera, or webcam, among other imaging devices. The type, number, and resolution of the industrial camera can be selected based on the installation scenario and specific requirements. The video data acquired by the industrial camera can be transmitted via fiber optic cable to an industrial server. This industrial computer can be a single server or a server cluster consisting of multiple servers.
[0089] The large number of collected flotation foam images can be labeled into several typical categories based on the operating conditions. After obtaining the labeled dataset, it can be divided into training, validation, and test sets, with the training set accounting for 60%, the validation set accounting for 20%, and the test set accounting for 20%.
[0090] Step S101: Input the flotation foam image into the pre-trained mineral flotation process condition recognition model to obtain the condition category.
[0091] Specifically, such as Figure 3 As shown, Figure 3This application provides an embodiment of a mineral flotation process condition identification model architecture diagram, which may include: a knowledge transfer model, a master classification model, and a supervised comparison learning model.
[0092] The main classification model uses ResNet50 as the encoder ε of the backbone network. Q Deep learning features were extracted from the flotation foam images, and a nonlinear classification head C was used. d and mapping header P Q The system generates both the working condition category prediction output and the anchor point feature mapping output.
[0093] The knowledge transfer model first extracts morphological, statistical, textural, and physical features from the flotation foam image using a manual feature extraction module. Then, the condition category probability output of the Softmax layer of the knowledge transfer model is used as the soft target value. Knowledge transfer is achieved by minimizing the Kullback-Leibler (KL) divergence between the soft target and the condition category prediction output of the main classification model. KL divergence is a method for measuring the difference between two probability distributions. The KL divergence between the soft target and the main classification model's condition category prediction output is calculated and used as part of the loss function. During the training of the main classification model, in addition to the cross-entropy loss, the addition of KL divergence loss allows the main classification model to not only optimize its own prediction ability during the learning process but also attempt to match the output of the knowledge transfer model, thereby absorbing domain knowledge and ultimately transferring the domain knowledge contained in the manual features to the main classification model.
[0094] The supervised contrastive learning model constructs several positive and negative samples for each flotation foam training anchor image. Positive samples are augmented versions of the flotation foam training anchor image and samples with the same label, while negative samples are samples with different labels from the flotation foam training anchor image. ResNet50 is used as the encoder ε of the supervised contrastive learning model. K encoder ε K and mapping header P K Positive and negative samples are processed to obtain their feature representations. Supervised contrastive learning is then performed in the embedding space using the feature mappings of the flotation foam training anchor images. By minimizing the contrast loss between the features of the flotation foam training anchor images and the positive and negative samples, the feature similarity between the flotation foam training anchor images and positive samples is increased, while the feature similarity between the flotation foam training anchor images and negative samples is decreased.
[0095] This application pre-trains the model on the public dataset ImageNet. The weights of all layers of ResNet50 are initialized using random orthogonal matrices, and the bias vectors are initialized to zero. The loss function is calculated through forward propagation, and then the gradient is calculated and the model parameters are updated through backpropagation. The cross-entropy loss used for pre-training can be defined as follows:
[0096]
[0097] in, This is the probability predicted by ResNet50 that sample n belongs to class i. `n` is an indicator variable; it is 1 if sample `n` belongs to class `i`, and 0 otherwise. `C` is the number of sample classes, and `N` is the number of training samples. The ResNet50 model parameters are optimized using momentum stochastic gradient descent to minimize the loss. Once the validation set is saturated, the learning rate is reduced by a factor of 10 and training continues.
[0098] The training process of the mineral flotation process condition identification model is described below, which may include the following steps:
[0099] Obtain training images of flotation foam.
[0100] The knowledge transfer model processes the flotation foam training images, extracts morphological, statistical, textural, and physical features from the flotation foam training images, and obtains the knowledge cross entropy loss and soft target value based on the morphological, statistical, textural, and physical features.
[0101] Specifically, the knowledge transfer model consists of a manual feature extraction module and a nonlinear classification head C. h It consists of two parts. The manual feature extraction module is used to extract morphological, statistical, textural, and physical features from the foam image. Morphological features typically involve bubble size, number of bubbles, and average inscribed circle diameter, which can be extracted using edge detection and morphological manipulation algorithms. Statistical features can include the mean and median of bubble size, skewness and kurtosis of bubble size distribution, etc. Texture features can be extracted using methods such as gray-level co-occurrence matrix, Fourier transform, and wavelet transform to extract foam texture information, such as foam surface roughness, contrast, and viscosity. Physical features depend on the specific physical properties of the foam, such as foam flow rate and foam breakage rate.
[0102] A nonlinear classification head for updating the knowledge transfer model based on knowledge cross-entropy loss.
[0103] The main classification model processes the flotation foam training images to obtain the working condition category prediction, flotation foam training anchor point image features, and main classification cross-entropy loss.
[0104] Specifically, the main classification model is constructed using ResNet50. One ResNet50 architecture provided in this application is shown in Table 1. This model first performs shallow feature extraction through a convolutional layer and pooling layer with a stride of 2, reducing the input size from 224×224 to 56×56. Next, the 56×56 shallow feature map is sequentially passed through three bottleneck modules with 256 output channels, four bottleneck modules with 512 output channels, six bottleneck modules with 1024 output channels, and three bottleneck modules with 2048 output channels for feature abstraction, resulting in deep learning features of dimension 2048. Finally, a fully connected non-linear classification layer is used to generate the category output. This can be further combined with... Figure 4 As shown, Figure 4 A ResNet50 model architecture diagram is provided for an embodiment of this application.
[0105] Table 1
[0106]
[0107] The KL divergence is obtained based on the soft target value and the predicted value of the working condition category.
[0108] The supervised contrastive learning model constructs several positive and negative samples based on the flotation foam training anchor image, and obtains feature positive samples and feature negative samples based on the positive and negative samples. The positive samples are the enhanced samples of the flotation foam training anchor image and the samples with the same label, while the negative samples are the samples with different labels from the flotation foam training anchor image.
[0109] Specifically, supervised contrastive learning models can be constructed using a deep learning feature key encoder ε. K and mapping header P K Composition, Deep Learning Feature Key Encoder ε K Both the main classification model and the mapping head P use ResNet50. K Composed of two fully connected neural networks, it maps deep learning features into a low-dimensional embedding space. Supervised contrastive learning uses enhanced samples of the flotation foam training anchor image and samples with the same label as positive samples, and samples with different labels as negative samples. It then combines the feature mapping of the flotation foam training anchor image to perform feature pattern comparison in the low-dimensional embedding space, bringing the flotation foam training anchor image closer to the positive samples and widening the distance between the flotation foam training anchor image and the negative samples, thus obtaining similarity codes for data of the same working condition and distinguishable codes for data of different working conditions.
[0110] When constructing positive and negative sample pairs, the enhanced samples of the flotation foam training anchor point image and samples with the same label are used as positive samples, while samples with different labels are used as negative samples. These are input into a supervised contrastive learning model to obtain feature representations. Specifically, let x i This represents the training anchor point image of flotation foam, y i For its corresponding label, x′ i For x i The augmented samples, then for the flotation foam training anchor image x i Its own augmented sample x′ i and the remaining samples x′ with the same label. j(j≠i,y(j)=y(i)) This will be used as a positive sample, and compared with the training anchor image x of the floating foam. i Samples x′ with different labels o(o≠i,y(o)≠y(i)) This will be used as a negative sample. The flotation foam training anchor image is processed by the feature encoder and mapping head of the main classification model to obtain the feature mapping output z of the flotation foam training anchor image. i The positive and negative samples are processed by a supervised contrastive learning model to obtain the feature mapping output z′ of the positive and negative samples. j The feature mapping outputs of the flotation foam training anchor point images and the feature mapping outputs of positive and negative samples respectively form feature pairs of positive and negative samples in the low-dimensional embedding space. For easier differentiation, P = {z′} can be used. p,1 ,z′ p,2 ,...,z′ p,M} represents the set of all positive feature samples, N = {z′} n,1 ,,z′ n,2 ,...,z′ n,K} represents the set of all negative samples with features.
[0111] The contrastive loss is obtained based on the features of the flotation foam training anchor point image, positive feature samples, and negative feature samples.
[0112] Based on the main classification cross-entropy loss, KL divergence, and contrastive loss, a joint knowledge and data-driven loss is obtained.
[0113] Based on the combined knowledge and data-driven loss, it is determined whether the mineral flotation process condition identification model has been trained successfully.
[0114] Specifically, if not, the parameters of the mineral flotation process condition identification model are updated based on the loss jointly driven by knowledge and data, and the step of obtaining flotation foam training images is returned; if yes, the training ends and the trained mineral flotation process condition identification model is obtained.
[0115] As can be seen from the above technical solutions, the knowledge- and data-driven mineral flotation process condition identification method provided in this application includes: acquiring flotation foam images; inputting the flotation foam images into a pre-trained mineral flotation process condition identification model to obtain a condition category; wherein the mineral flotation process condition identification model includes: a knowledge transfer model, a main classification model, and a supervised contrastive learning model; the training process of the mineral flotation process condition identification model includes: acquiring flotation foam training images; the knowledge transfer model processing the flotation foam training images to extract morphological features, statistical features, texture features, and physical features of the flotation foam training images; and obtaining a knowledge cross-entropy loss and a soft target value based on the morphological features, statistical features, texture features, and physical features; updating the nonlinear classification head of the knowledge transfer model based on the knowledge cross-entropy loss; and the main classification model processing the flotation foam training images to obtain a condition category prediction, flotation foam training anchor point image features, and a main classification cross-entropy loss. Based on the soft target value and the predicted value of the working condition category, the KL divergence is obtained. The supervised contrastive learning model constructs several positive and negative samples based on the flotation foam training anchor image, and obtains feature positive samples and feature negative samples based on the positive and negative samples. The positive samples are the enhanced samples of the flotation foam training anchor image and samples with the same label as it. The negative samples are samples with different labels from the flotation foam training anchor image. Based on the features of the flotation foam training anchor image, the feature positive samples, and the feature negative samples, the contrastive loss is obtained. Based on the main classification cross-entropy loss, the KL divergence, and the contrastive loss, the knowledge and data joint driving loss is obtained. Based on the knowledge and data joint driving loss, it is determined whether the mineral flotation process working condition identification model has been trained. If not, the parameters of the mineral flotation process working condition identification model are updated based on the knowledge and data joint driving loss, and the step of obtaining the flotation foam training image is returned. If yes, the training ends, and the trained mineral flotation process working condition identification model is obtained. In this application, the mineral flotation process condition identification model improves the accuracy of condition identification from a knowledge level by utilizing the morphological features, statistical features, texture features, and physical features through a knowledge transfer model during training. By constructing positive and negative feature samples through a supervised contrastive learning model and comparing them with the features of the flotation foam training anchor point image, the accuracy of condition identification is improved from a data level, making the condition identification more accurate to a certain extent.
[0116] This application utilizes knowledge transfer technology to effectively transfer the domain expert knowledge contained in handcrafted features to ResNet50, thereby improving the accuracy of condition recognition from a knowledge perspective. Specifically, the design of the handcrafted features is based on the experience accumulated by the workers in the quarry from their cognitive understanding of the production process. These features not only contain rich semantic information from the features of flotation foam images, but this information is also interpretable, providing rich and meaningful prior knowledge for deep visual feature networks.
[0117] like Figure 5 As shown, Figure 5 This application provides a basic architecture diagram for training a main classification model using a knowledge transfer model. Starting from the knowledge level, this application first trains a handcrafted feature network using knowledge cross-entropy loss with added Top Score Difference (TSD) loss to generate soft targets with high information entropy. Then, it minimizes the KL divergence between the main classification model's predicted output and the soft targets, guiding the main classification model to learn the inter-class semantic relevance of the handcrafted feature model. This improves the accuracy of feature encoding, enhances the network's training performance under noisy data and limited labeled samples, and improves the accuracy of work condition classification.
[0118] like Figure 6 As shown, Figure 6 This application provides a basic architecture diagram for training a main classification model using a supervised contrastive learning model. Starting from the data level, this application constructs a supervised contrastive learning model to improve the accuracy of work condition identification. Supervised learning utilizes image label information to learn feature representations by maximizing the similarity between the features of the bubble training anchor image and positive feature samples, and minimizing the similarity between the features of the bubble training anchor image and negative feature samples, thereby improving the discriminative power of feature encoding. Using a supervised contrastive learning model to assist in training the main classification model can improve the discriminative power of feature encoding, thereby improving the accuracy of work condition classification.
[0119] In some embodiments of this application, to further enhance the contrast effect, a negative sample mixing strategy at the feature level can be used to generate feature-hard negative samples. The process of obtaining the contrast loss based on the features of the flotation foam training anchor point image, positive feature samples, and negative feature samples can include:
[0120] S10. Obtain the working condition category label of the flotation foam training anchor point image.
[0121] S11. Select the negative feature samples that are adjacent to the working condition category and the features of the flotation foam training anchor point image, and combine them in pairs linearly to obtain the hard negative feature samples.
[0122] Specifically, since the proximity of foam image categories represents the degree of similarity, the feature map output z of the selected working condition category and the flotation foam training anchor image is based on the category label. i The negative samples of the working condition category are selected by choosing S negative samples from the set N, where S < K and K is the total number of negative samples. The negative samples selected by pairwise convex combination generate z. i The characteristic hard negative samples are represented by V = {v1, v2, ..., v...} s} represents the set of hard negative samples, and the hard negative samples v are features. s ∈V will be given by the following formula:
[0123]
[0124] Where, z′ n,i , z′ n,j These are two randomly selected negative feature samples from the negative feature samples with the highest proximity between the working condition category and the working condition category of the flotation foam training anchor image. is the random mixing coefficient, and ||.||2 is the L2 norm.
[0125] S12. Linearly combine the features of the hard negative samples and the features of the flotation foam training anchor image to obtain the hard negative samples.
[0126] Specifically, the features of the training anchor point images of the flotation foam and the features from the set V = {v1, v2, ..., v} are used. s The feature hard negative samples randomly selected from} are mixed to synthesize feature hard negative samples for each float bubble training anchor point image feature. Using V′={v1′,v2′,...,v s '} represents the set of feature-hard negative samples, where v is the feature-hard negative sample. s ′∈V′ will be given by the following formula:
[0127]
[0128] Among them, z i It is the feature of the flotation foam training anchor point image, v s From the set V = {v1, v2, ..., v s The feature hard negative sample randomly selected from}, β k ∈[0,0.5] are randomly selected mixing coefficients, ||.||2 is the L2 norm, and β k ≤0.5 ensures that the contribution of the features of the flotation foam training anchor point image is always less than the contribution of the features of the hard negative samples.
[0129] S13. Based on the features of the flotation foam training anchor image, the positive feature samples, and the difficult negative feature samples, a contrast loss is obtained.
[0130] In the feature-level negative sample mixing strategy, based on the label of the feature sample, feature negative samples that are adjacent to the working condition category and the working condition category of the flotation foam training anchor image feature are selected, and they are linearly combined pairwise to obtain feature hard negative samples. The feature hard negative samples are then linearly combined with the flotation foam training anchor image features to further generate feature hard negative samples that are more difficult to distinguish from the flotation foam training anchor image features, thereby further enhancing the contrast effect.
[0131] In some embodiments of this application, the process of obtaining the knowledge cross-entropy loss and soft target value based on morphological features, statistical features, texture features, and physical features during the training of the mineral flotation process condition identification model may include:
[0132] S20. Based on morphological features, statistical features, texture features, and physical features, the initial cross-entropy loss and category output are obtained.
[0133] S21. Add a constraint term to the initial cross-entropy loss to obtain the knowledge cross-entropy loss.
[0134] Specifically, given that the similarity of flotation foam images under adjacent working conditions is higher than that under non-adjacent working conditions, the training loss of the knowledge transfer model is improved in order to generate a probability distribution with fewer peaks. That is, a TSD constraint term is added to the initial cross-entropy loss to obtain the knowledge cross-entropy loss, so that the main classification model can learn the inter-class similarity and prevent overfitting.
[0135] S22. Calculate the soft target value based on the category output.
[0136] Specifically, the Softmax function can be used to output z of the working condition categories of the knowledge transfer model. i Convert to probability p i As a soft objective for training the main classification model:
[0137]
[0138] The mineral flotation process condition identification model can be trained using collected flotation foam image data, after initialization, to identify the main classification model. In each training iteration, the loss function is calculated via forward propagation, and then the gradient is calculated and the model parameters are updated via backpropagation. Hyperparameters (such as learning rate, batch size, and number of network layers) are adjusted using a validation set to achieve better model performance. The knowledge and data jointly driven loss can be defined as follows:
[0139]
[0140]
[0141] in, Indicates weight, This represents the cross-entropy loss between the main classification model and the true sample labels. This represents the KL divergence between the main classification model and the knowledge transfer model. The contrastive loss between the main classification model and the supervised contrastive learning model is represented by C, where C represents the number of sample classes, N represents the number of samples, and z represents the number of samples. i It is a feature of the flotation foam training anchor image, z′ p,a and z′ p,o V represents a positive sample with features. j The number of feature-hard negative samples is represented by |P(m)|, the number of feature-positive samples is represented by |V′(s)|, and τ is a temperature parameter with a value between 0 and 1. It is the probability predicted by the main classification model that sample n belongs to class i. It is an indicator variable; it is 1 if sample n belongs to class i, and 0 otherwise.
[0142] Minimizing the KL divergence between the predicted output of the main classification network and the soft objective of the knowledge transfer model allows the domain knowledge embedded in handcrafted features to be transferred to the main classification model. By minimizing the contrast loss between the features of the bubble training anchor image and the positive and negative samples of the features, the feature similarity between the features of the bubble training anchor image and the positive samples can be increased while the feature similarity between the features of the bubble training anchor image and the negative samples can be decreased, thereby improving the semantic discriminativeness of deep learning features.
[0143] Model training is divided into three stages. The initial stage focuses on knowledge transfer to quickly acquire domain knowledge embedded in handcrafted features, with the loss weights emphasizing… In the medium term, the focus will be on supervised contrastive learning to refine feature encoding, with loss weights emphasizing... In the later stages, the focus will be on the classification of the main classification model, with the loss weights emphasizing...
[0144] In some embodiments of this application, to avoid memory overflow when processing batches of 600×800 flotation foam images, the acquired flotation foam images can be preprocessed.
[0145] S30. Obtain flotation foam video.
[0146] Specifically, when acquiring images of flotation foam, the frame rate can be set to 30fps to continuously capture flotation foam videos, the duration of each video segment can be set to 1 minute, and the size of the video frame can be set to 600×800.
[0147] S31. Divide the flotation foam video into several video segments, each video segment containing an image with a preset number of frames.
[0148] Specifically, each 1-minute video can be divided into multiple video segments, each of which can include 10 frames of 600×800 images.
[0149] S32. The image is downsampled to obtain the downsampled flotation foam image.
[0150] Specifically, downsampling these images can resize them to 224×224.
[0151] In some embodiments of this application, in order to improve the stability of contrastive learning, the supervised contrastive learning model can be iteratively updated by combining the update parameters generated by the main classification model. Specifically, this may include the following steps:
[0152] S40, the main classification model generates updated parameters for the supervised contrastive learning model.
[0153] Specifically, the stochastic gradient descent algorithm is used to minimize the joint knowledge and data-driven loss, resulting in the updated feature encoder ε of the main classification model. Q and mapping header P Q Parameter θ Q and θ Q Used to update supervised contrastive learning models.
[0154] S41. Supervised contrastive learning models utilize the parameters θ of the main classification model. Q It updates its own parameters.
[0155] Specifically, the update format can be referenced in the formula below:
[0156]
[0157] Where t represents the number of iterations, θ Q The feature encoder ε of the main classification model Q and mapping header P Q The update parameter, θ K This represents the parameters of the supervised contrastive learning model, where Φ is the weight coefficient, and its specific value depends on the training effect.
[0158] In some embodiments of this application, in order to accelerate the convergence speed of the model and improve the robustness of the training in the subsequent training process, after obtaining the flotation foam image, the flotation foam image can be standardized to obtain a standard flotation foam image, and then the standard flotation foam image can be input into a pre-trained mineral flotation process condition recognition model to obtain the condition category.
[0159] Specifically, the flotation foam image can be standardized using the following formula:
[0160]
[0161] Where output is the image pixel value output, input is the image pixel value input, and μ and σ are the mean and standard deviation of the pixel values, respectively.
[0162] The knowledge- and data-driven mineral flotation process condition identification device provided in the embodiments of this application will be described below. The knowledge- and data-driven mineral flotation process condition identification device described below can be referred to in correspondence with the knowledge- and data-driven mineral flotation process condition identification method described above.
[0163] See Figure 7 , Figure 7 This application provides a schematic diagram of a knowledge- and data-driven mineral flotation process condition identification device, which may include:
[0164] Image acquisition module 10 is used to acquire images of flotation foam;
[0165] The working condition category recognition module 20 is used to input the flotation foam image into a pre-trained mineral flotation process working condition recognition model to obtain the working condition category.
[0166] The model training module is used to train a mineral flotation process condition identification model, which includes: a knowledge transfer model, a master classification model, and a supervised contrastive learning model.
[0167] The training process for a mineral flotation process condition identification model may include:
[0168] Acquire training images of flotation foam;
[0169] The knowledge transfer model processes the flotation foam training images, extracts morphological features, statistical features, texture features and physical features of the flotation foam training images, and obtains the knowledge cross-entropy loss and soft target value based on the morphological features, statistical features, texture features and physical features.
[0170] A nonlinear classification head for updating a knowledge transfer model based on knowledge cross-entropy loss;
[0171] The main classification model processes the flotation foam training images to obtain the working condition category prediction, flotation foam training anchor point image features, and main classification cross-entropy loss;
[0172] The KL divergence is obtained based on the soft target value and the predicted value of the working condition category;
[0173] The supervised contrastive learning model constructs several positive and negative samples based on the flotation foam training anchor image, and obtains feature positive samples and feature negative samples based on the positive and negative samples. The positive samples are the enhanced samples of the flotation foam training anchor image and the samples with the same label as it, and the negative samples are the samples with different labels from the flotation foam training anchor image.
[0174] Based on the features of the training anchor point image of flotation foam, positive feature samples, and negative feature samples, a contrastive loss is obtained;
[0175] Based on the main classification cross-entropy loss, KL divergence, and contrastive loss, the knowledge and data joint driven loss is obtained;
[0176] Based on the joint knowledge and data-driven loss, it is determined whether the mineral flotation process condition identification model has been trained successfully.
[0177] If not, then based on the loss jointly driven by knowledge and data, update the parameters of the mineral flotation process condition identification model, and return to the step of obtaining flotation foam training images;
[0178] If so, the training ends, and the trained mineral flotation process condition identification model is obtained.
[0179] As can be seen from the above technical solutions, the knowledge- and data-driven mineral flotation process condition recognition device provided in this application includes: an image acquisition module 10 acquiring flotation foam images; a condition category recognition module 20 inputting the flotation foam images into a pre-trained mineral flotation process condition recognition model to obtain condition categories; and a model training module for training the mineral flotation process condition recognition model. The mineral flotation process condition recognition model includes: a knowledge transfer model, a master classification model, and a supervised contrastive learning model. The training process of the mineral flotation process condition recognition model includes: acquiring flotation foam training images; the knowledge transfer model processing the flotation foam training images, extracting morphological features, statistical features, texture features, and physical features of the flotation foam training images, and obtaining knowledge cross-entropy loss and soft target values based on the morphological features, statistical features, texture features, and physical features; updating the nonlinear classification head of the knowledge transfer model based on the knowledge cross-entropy loss; and the master classification model processing the flotation foam training images to obtain condition category prediction and flotation... The foam training anchor image features and main classification cross-entropy loss are used to obtain KL divergence based on the soft target value and the predicted value of the working condition category. The supervised contrastive learning model processes the flotation foam training anchor image to construct several positive and negative samples. Based on the positive and negative samples, feature positive samples and feature negative samples are obtained. The positive samples are the enhanced samples of the flotation foam training anchor image and samples with the same label as it. The negative samples are samples with different labels from the flotation foam training anchor image. Image features, positive and negative feature samples are used to obtain a contrastive loss. Based on the main classification cross-entropy loss, the KL divergence, and the contrastive loss, a knowledge-and-data joint-driven loss is obtained. Based on the knowledge-and-data joint-driven loss, it is determined whether the mineral flotation process condition recognition model has been trained. If not, the parameters of the mineral flotation process condition recognition model are updated based on the knowledge-and-data joint-driven loss, and the step of obtaining flotation foam training images is returned. If yes, the training ends, and the trained mineral flotation process condition recognition model is obtained. In this application, during the training process, the mineral flotation process condition recognition model improves the accuracy of condition recognition from a knowledge level by utilizing the morphological features, statistical features, texture features, and physical features through a knowledge transfer model. Through a supervised contrastive learning model, positive and negative feature samples are constructed and compared with the features of the flotation foam training anchor image to improve the accuracy of condition recognition from a data level, making the condition recognition more accurate to a certain extent.
[0180] Optionally, the image acquisition module 10 may include:
[0181] Video acquisition unit 101 is used to acquire flotation foam video;
[0182] The video segmentation unit 102 is used to segment the flotation foam video into several video segments, each video segment containing an image with a preset number of frames;
[0183] The downsampling unit 103 is used to downsample the image to obtain a downsampled flotation foam image.
[0184] Optionally, the model training module, based on morphological features, statistical features, texture features, and physical features, may include the following process for obtaining the knowledge cross-entropy loss and soft target value:
[0185] Based on morphological features, statistical features, texture features, and physical features, the initial cross-entropy loss and category output are obtained;
[0186] Adding a constraint term to the initial cross-entropy loss yields the knowledge cross-entropy loss;
[0187] The soft target value is calculated based on the category output.
[0188] Optionally, the model training module, based on the features of the flotation foam training anchor image, positive feature samples, and negative feature samples, to obtain the contrastive loss, may include:
[0189] Obtain the working condition category labels for the training anchor point images of flotation foam;
[0190] Select negative samples of features adjacent to the working condition category and the features of the flotation foam training anchor point image, and combine them in pairs linearly to obtain hard negative samples of features.
[0191] The feature hard negative sample is obtained by linearly combining the features of the feature hard negative sample and the features of the float foam training anchor image;
[0192] Based on the features of the flotation foam training anchor image, the positive feature samples, and the difficult negative feature samples, a contrastive loss is obtained.
[0193] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0194] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined with each other, and the same or similar parts can be referred to each other.
[0195] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for identifying the operating conditions of a mineral flotation process driven by both knowledge and data, characterized in that, include: Obtain flotation foam images; The flotation foam image is input into a pre-trained mineral flotation process condition recognition model to obtain the condition category; The mineral flotation process condition identification model includes: a knowledge transfer model, a master classification model, and a supervised contrastive learning model. The training process of the mineral flotation process condition identification model includes: Acquire training images of flotation foam; The knowledge transfer model processes the flotation foam training image, extracts the morphological features, statistical features, texture features and physical features of the flotation foam training image, and obtains the knowledge cross-entropy loss and soft target value based on the morphological features, the statistical features, the texture features and the physical features. The nonlinear classification head of the knowledge transfer model is updated based on the knowledge cross-entropy loss. The main classification model processes the flotation foam training images to obtain working condition category prediction, flotation foam training anchor point image features, and main classification cross-entropy loss. Based on the soft target value and the predicted value of the working condition category, the KL divergence is obtained; a handcrafted feature network is trained using knowledge cross-entropy loss with the highest score difference loss added to generate a soft target with high information entropy; then, the KL divergence between the predicted output of the main classification model and the soft target is minimized. The supervised contrastive learning model constructs several positive and negative samples based on the flotation foam training anchor image, and obtains feature positive samples and feature negative samples based on the positive and negative samples. The positive samples are the enhanced samples of the flotation foam training anchor image and the samples with the same label as them. The negative samples are the samples with different labels from the flotation foam training anchor image. Based on the features of the flotation foam training anchor point image, the positive feature samples, and the negative feature samples, a contrastive loss is obtained, including: Obtain the working condition category labels for the training anchor point images of flotation foam; Select negative samples of features adjacent to the working condition category and the features of the flotation foam training anchor point image, and combine them in pairs linearly to obtain hard negative samples of features. The feature hard negative sample is obtained by linearly combining the features of the feature hard negative sample and the features of the float foam training anchor image; Based on the features of the flotation foam training anchor point image, the positive feature samples, and the difficult negative feature samples, a contrastive loss is obtained; Based on the main classification cross-entropy loss, the KL divergence, and the contrast loss, the knowledge and data joint-driven loss is obtained; Based on the knowledge and data jointly driving the loss, it is determined whether the mineral flotation process condition identification model has been trained successfully. If not, then based on the knowledge and data jointly driving the loss, update the parameters of the mineral flotation process condition identification model, and return to the step of obtaining flotation foam training images; If so, the training ends, and the trained mineral flotation process condition identification model is obtained.
2. The method according to claim 1, characterized in that, The process of obtaining the knowledge cross-entropy loss and soft target value based on the morphological features, statistical features, texture features, and physical features includes: Based on the morphological features, statistical features, texture features, and physical features, the initial cross-entropy loss and category output are obtained; Adding a constraint term to the initial cross-entropy loss yields the knowledge cross-entropy loss; The soft target value is calculated based on the category output.
3. The method according to claim 1, characterized in that, The acquisition of flotation foam images includes: Obtain flotation foam video; The flotation foam video is divided into several video segments, each video segment containing an image with a preset number of frames; The image is downsampled to obtain a downsampled flotation foam image.
4. The method according to any one of claims 1-3, characterized in that, Also includes: The main classification model uses a stochastic gradient descent algorithm to minimize the joint knowledge and data-driven loss and update the model parameters. The supervised contrastive learning model uses the updated parameters from the main classification model to update its own parameters using an exponential moving average.
5. The method according to any one of claims 1-3, characterized in that, After acquiring the flotation foam image, the process further includes: The flotation foam image is standardized to obtain a standard flotation foam image; The step of inputting the flotation foam image into a pre-trained mineral flotation process condition recognition model to obtain the condition category includes: The standard flotation foam image is input into a pre-trained mineral flotation process condition recognition model to obtain the condition category.
6. A knowledge- and data-driven mineral flotation process condition identification device, characterized in that, include: The image acquisition module is used to acquire images of the flotation foam. The working condition category identification module is used to input the flotation foam image into a pre-trained mineral flotation process working condition identification model to obtain the working condition category. The model training module is used to train the mineral flotation process condition identification model, wherein the mineral flotation process condition identification model includes: a knowledge transfer model, a master classification model, and a supervised contrastive learning model; The training process of the mineral flotation process condition identification model includes: Acquire training images of flotation foam; The knowledge transfer model processes the flotation foam training image, extracts the morphological features, statistical features, texture features and physical features of the flotation foam training image, and obtains the knowledge cross-entropy loss and soft target value based on the morphological features, the statistical features, the texture features and the physical features. The nonlinear classification head of the knowledge transfer model is updated based on the knowledge cross-entropy loss. The main classification model processes the flotation foam training images to obtain working condition category prediction, flotation foam training anchor point image features, and main classification cross-entropy loss. Based on the soft target value and the predicted value of the working condition category, the KL divergence is obtained; a handcrafted feature network is trained using knowledge cross-entropy loss with the highest score difference loss added to generate a soft target with high information entropy; then, the KL divergence between the predicted output of the main classification model and the soft target is minimized. The supervised contrastive learning model constructs several positive and negative samples based on the flotation foam training anchor image, and obtains feature positive samples and feature negative samples based on the positive and negative samples. The positive samples are the enhanced samples of the flotation foam training anchor image and the samples with the same label as them. The negative samples are the samples with different labels from the flotation foam training anchor image. Based on the features of the flotation foam training anchor point image, the positive feature samples, and the negative feature samples, a contrastive loss is obtained, including: Obtain the working condition category labels for the training anchor point images of flotation foam; Select negative samples of features adjacent to the working condition category and the features of the flotation foam training anchor point image, and combine them in pairs linearly to obtain hard negative samples of features. The feature hard negative sample is obtained by linearly combining the features of the feature hard negative sample and the features of the float foam training anchor image; Based on the features of the flotation foam training anchor point image, the positive feature samples, and the difficult negative feature samples, a contrastive loss is obtained; Based on the main classification cross-entropy loss, the KL divergence, and the contrast loss, the knowledge and data joint-driven loss is obtained; Based on the knowledge and data jointly driving the loss, it is determined whether the mineral flotation process condition identification model has been trained successfully. If not, then based on the knowledge and data jointly driving the loss, update the parameters of the mineral flotation process condition identification model, and return to the step of obtaining flotation foam training images; If so, the training ends, and the trained mineral flotation process condition identification model is obtained.
7. The apparatus according to claim 6, characterized in that, The image acquisition module includes: The video acquisition unit is used to acquire videos of flotation foam. A video segmentation unit is used to segment the flotation foam video into several video segments, each video segment containing an image with a preset number of frames; The downsampling unit is used to downsample the image to obtain a downsampled flotation foam image.
8. The apparatus according to claim 6, characterized in that, The model training module, based on the morphological features, statistical features, texture features, and physical features, obtains the knowledge cross-entropy loss and soft target value through a process that includes: Based on the morphological features, statistical features, texture features, and physical features, the initial cross-entropy loss and category output are obtained; Adding a constraint term to the initial cross-entropy loss yields the knowledge cross-entropy loss; The soft target value is calculated based on the category output.
Citation Information
Patent Citations
Fish identification method, system and equipment based on knowledge distillation and medium
CN118212457A