Froth flotation condition recognition method based on multi-branch reinforcement learning feature selection
Through the multi-branch reinforcement learning feature selection method, a multi-branch neural network is constructed to identify froth flotation working conditions, which solves the problem of poor recognition effect in the existing technology and achieves more efficient and accurate working condition identification and resource utilization.
Patent Information
- Application Number
- CN202510062207.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-01-15
AI Technical Summary
The existing froth flotation working condition identification effect is poor, and manual observation is highly subjective and arbitrary, resulting in unstable flotation production process, serious waste of mineral raw materials, and excessive consumption of flotation reagents.
A feature selection method based on multi-branch reinforcement learning is adopted. By constructing a multi-branch neural network and using the maximum information coefficient indicator to cluster features, reinforcement learning training is performed to select the optimal feature subset for working condition identification.
It improves the accuracy and efficiency of froth flotation condition identification, reduces the impact of redundant features, reduces model complexity and training difficulty, and improves the stability of the production process and resource utilization.
Smart Images

Figure CN119850991B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data recognition technology, and in particular relates to a foam flotation condition recognition method based on multi-branch reinforcement learning feature selection. Background Art
[0002] Froth flotation is a critical process in the nonferrous metallurgical industry. Its purpose is to separate desired minerals from raw ore based on the varying hydrophobicity of the ore particles. During froth flotation, the visual characteristics of the froth surface are closely correlated with flotation production indicators, operating conditions, and operational variables. However, because the froth flotation process involves multiple cascades of flotation cells, it is characterized by a long process flow, complex reaction processes, and difficulties in online monitoring. Currently, production operations rely primarily on manual observation of the froth surface state. However, due to the high subjectivity and arbitrariness of manual methods, the flotation process is difficult to maintain stability, resulting in significant waste of mineral raw materials and excessive flotation reagent consumption.
[0003] In recent years, with the continuous development of industrial visual inspection technology and industrial big data technology, it has become possible to monitor the surface state of foam in the flotation process online, thereby realizing data-driven working condition identification and comprehensive optimization control of multiple production operation parameters. The accurate description of the foam surface characteristics is the premise of flotation production process monitoring based on machine vision. At present, through the existing feature extraction technology, a series of characteristics such as the color, size, texture, and speed of the flotation process foam can be obtained, realizing the quantitative description of the visual characteristics of the foam surface and the objective evaluation of the flotation production status. However, due to the lack of knowledge of the corresponding mechanism, these manually extracted visual features are likely to contain some redundant information. These redundant, irrelevant, and even noisy features will not only increase the complexity of the working condition identification model and the difficulty of training, but may also reduce the final working condition identification effect. Summary of the Invention
[0004] The embodiment of the present application provides a method for identifying froth flotation conditions based on multi-branch reinforcement learning feature selection, which can solve the problem of poor identification effect of froth flotation conditions.
[0005] The present application provides a method for identifying froth flotation conditions based on multi-branch reinforcement learning feature selection, including:
[0006] Step 1, for each froth flotation process in a plurality of froth flotation processes under different working conditions, extracting a plurality of froth image features from a froth image of the froth flotation process;
[0007] Step 2: clustering multiple foam image features based on the maximum information coefficient index to obtain multiple feature clusters;
[0008] Step 3: construct a multi-branch neural network, and perform reinforcement learning on the multi-branch neural network based on multiple foam image features to obtain an optimal feature subset; the optimal feature subset includes at least part of the multiple foam image features; the multi-branch neural network includes a shared module and multiple branch modules, the multiple branch modules correspond one-to-one to multiple feature clusters, the shared module is used to calculate the environmental state input to the multi-branch neural network and output an implicit representation, the environmental state is a binary code of a feature subset, the branch module is used to process the implicit representation output by the shared module and output the value of each action in the action space, each foam image feature in the feature cluster corresponding to the branch module and an empty action are an action in the action space of the branch module;
[0009] Step 4: Identify the operating conditions of the target froth flotation process that requires operating condition identification based on the optimal feature subset.
[0010] Optionally, step 2 includes:
[0011] Step 2.1, for each of the multiple foam image features, respectively, calculate the correlation between the foam image feature and the working condition label using the maximum information coefficient index;
[0012] Step 2.2, taking the foam image features whose correlation with the working condition labels is greater than a preset threshold as the cluster center of a feature cluster;
[0013] Step 2.3, for each foam image feature other than the cluster center among the multiple foam image features, calculate the maximum information coefficient between the other foam image features and each cluster center, and assign the other foam image features to the feature cluster corresponding to the maximum information coefficient with the largest value.
[0014] Optionally, the correlation between the foam image features and the working condition labels is calculated using the maximum information coefficient index, including:
[0015] The correlation MIC (f i ,y):
[0016]
[0017] Where n is the number of froth flotation processes, B(n) is the upper limit of the grid division a*b, MI(f i ,y) is the i-th foam image feature f i The maximum information coefficient between the working condition label y.
[0018] Optionally, reinforcement learning is performed on a multi-branch neural network based on multiple foam image features to obtain an optimal feature subset, including:
[0019] Step 3.1, use the constructed multi-branch neural network as the intelligent agent;
[0020] Step 3.2, controlling the agent to interact with the environment based on the multiple foam image features, and outputting a feature subset;
[0021] Step 3.3: Update the parameters of the multi-branch neural network based on the data used to train the multi-branch neural network during the interaction process, and use the multi-branch neural network with updated parameters as the agent in step 3.2. Return to step 3.2 and execute until the number of interactions between the agent and the environment reaches the preset maximum number of interactions.
[0022] In step 3.4, the feature subset with the highest recognition accuracy among all feature subsets output by the interaction between the agent and the environment is taken as the optimal feature subset.
[0023] Optionally, step 3.2 includes:
[0024] Step 3.21, set the feature subset to an empty set, generate a binary code of the feature subset, and use the binary code as the environment state s t ;
[0025] Step 3.22, the environment state s t Input the agent for processing and obtain the value Q output by all branch modules j (s t ,a t j ), j = 1, 2, ..., M, M is the number of branch modules;
[0026] Step 3.23: For each branch module, take the action corresponding to the largest value among the values output by the branch module as the execution action.
[0027] Step 3.24, add the foam image features corresponding to all the executed actions to the feature subset to obtain the updated feature subset, and use the binary code of the updated feature subset as the updated environment state s t+1 ;
[0028] Step 3.25, based on multiple foam image features, calculate the difference in recognition accuracy between the updated feature subset and the feature subset before the update, and use the difference as the reward signal r t+1 ;
[0029] Step 3.26, update the environment state s before t , all execution actions Reward signal r t+1 and the updated environment state s t+1Stored in memory as a piece of data for training a multi-branch neural network;
[0030] Step 3.27, update the environment state s t+1 As the environmental state s in step 3.22 t , and return to execute step 3.22 until the actions corresponding to the values with the largest values among the values output by all branch modules are all empty actions, and output the feature subset when the actions corresponding to the values with the largest values among the values output by all branch modules are all empty actions.
[0031] Optionally, updating parameters of the multi-branch neural network based on the data used to train the multi-branch neural network during the interaction process includes:
[0032] Step 3.31, extract b pieces of data from the data stored in the memory, denoted as B = {s t ,a t ,s t+1 ,r t+1} b ;
[0033] Step 3.32, by formula Q j eval =Q j (s t ,a t j ) Calculate the estimated Q value Q of the j-th branch module j eval , and using the formula Q j target =r t+1 +γ*max a Q j (s t+1 ,a) Calculate the target Q value Q of the j-th branch module j target , calculate the loss function of this branch Among them, γ is the attenuation factor, a is the variable of the max function, (s t ,a t ,s t+1 ,r t+1 )~B;
[0034] Step 3.33, using the formula Calculate the loss value loss of the multi-branch neural network, and update the parameters of the multi-branch neural network based on the loss value loss.
[0035] Optionally, both the shared module and the branch module are double-layer fully connected layers.
[0036] The above solution of the present application has the following beneficial effects:
[0037] In an embodiment of the present application, a multi-branch neural network with a shared module is established as a decision network for feature selection, wherein different branch modules are responsible for selecting representative features from their corresponding feature clusters. At the same time, the present application constructs a reinforcement learning environment based on a foam flotation process of known working conditions, and performs reinforcement learning training on the constructed multi-branch neural network to obtain the most important features for foam flotation condition identification and prediction, so that when foam flotation condition identification is performed based on these important features, the foam flotation condition identification effect can be improved.
[0038] Other beneficial effects of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. 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 any creative work.
[0040] Figure 1 A flowchart of a method for identifying froth flotation conditions based on multi-branch reinforcement learning feature selection provided in one embodiment of the present application;
[0041] Figure 2 A schematic diagram of the structure of a multi-branch neural network provided in one embodiment of the present application;
[0042] Figure 3 This is a performance evaluation result diagram of different feature selection methods in an example of this application. DETAILED DESCRIPTION
[0043] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0044] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0045] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0046] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0047] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0048] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0049] In response to the current problem of poor foam flotation condition identification effect, an embodiment of the present application provides a foam flotation condition identification method based on multi-branch reinforcement learning feature selection. The method establishes a multi-branch neural network with a shared module as a decision network for feature selection, wherein different branch modules are responsible for selecting representative features from their corresponding feature clusters. At the same time, the present application constructs a reinforcement learning environment based on the foam flotation process of known working conditions, and performs reinforcement learning training on the constructed multi-branch neural network to obtain the most important features for foam flotation condition identification and prediction, thereby improving the foam flotation condition identification effect when performing foam flotation condition identification based on these important features.
[0050] To facilitate understanding of the froth flotation condition identification method provided in this application, the relevant content of feature selection is first introduced here.
[0051] Feature selection is an important data analysis technique and an essential data preprocessing step in machine learning. By performing feature selection on the raw data feature set, we can remove a large number of irrelevant or redundant interfering features related to the target variable, effectively reducing the data dimensionality, improving the accuracy of target variable predictions, and lowering the subsequent processing costs of the raw data set. This also makes it easier for researchers to understand and analyze, thereby better revealing the useful information hidden in the raw data.
[0052] The essence of feature selection is to use a search scheme to find the optimal feature subset from the original feature space. This process is primarily influenced by the search strategy. Common search strategies can be divided into three categories: complete search, random search, and sequential search. Complete search searches all possible feature subsets within the original feature space. In theory, a complete search strategy can ensure the discovery of the feature subset with the highest discriminative power. However, when the number of features is large, complete search incurs a significant computational cost. Random search begins with a randomly generated candidate feature subset and uses an intelligent optimization algorithm to gradually approach the global optimal feature subset. Common search methods include genetic algorithms and particle swarm optimization. Although intelligent optimization algorithms demonstrate superior performance compared to other search strategies for feature selection, they often face challenges such as stagnation at local minima and high computational costs when tackling large-scale feature selection problems. Sequential search, based on well-founded heuristic rules, determines the number of features added or removed from the candidate set. Compared to complete and random search, sequential search effectively reduces the computational complexity of the feature selection process, but carries the risk of getting stuck in local optima. Furthermore, this method requires a monotonic fitness function and requires strong technical background knowledge.
[0053] Feature selection involves optimally selecting decision variables within a discrete feature decision space. It shares similarities with action selection in reinforcement learning. Furthermore, deep reinforcement learning's "offline training, online decision-making" approach makes it possible to solve feature selection problems online and in real time. Therefore, reinforcement learning is a promising approach for solving traditional feature selection problems. In reinforcement learning, two interacting entities exist: an agent and an environment. The agent selects appropriate actions based on feedback from the environment. The environment executes the agent's selected action and generates a reward signal based on the results of that action. The agent optimizes its strategy to maximize the total reward. Compared to traditional feature selection algorithms, reinforcement learning-based feature selection algorithms offer advantages such as faster solution speed and stronger generalization. However, current reinforcement learning-based feature selection algorithms ignore implicit prior information in the dataset when constructing decision networks, resulting in complex and lengthy decision-making processes and difficulties in training the decision networks.
[0054] The following is an illustrative description of the froth flotation condition identification method based on multi-branch reinforcement learning feature selection provided by the present application in conjunction with specific embodiments.
[0055] like Figure 1 As shown, the froth flotation condition identification method based on multi-branch reinforcement learning feature selection provided in the embodiment of the present application includes the following steps:
[0056] Step 1: for each froth flotation process in a plurality of froth flotation processes under different working conditions, extract a plurality of froth image features from a froth image of the froth flotation process.
[0057] The foam images can be acquired using visual acquisition equipment. After obtaining the foam images, feature extraction techniques can be used to extract the foam surface visual features (i.e., foam image features) from the foam images, which are then collected to form the raw data. It should be noted that to facilitate subsequent model training, the raw data also includes labels for the operating conditions of each foam flotation process, such as good, poor, or bad.
[0058] Specifically, multiple foam image features may include flotation foam color features (such as grayscale mean, red mean, etc.), flotation foam dynamic features (such as foam flow rate, etc.), flotation foam size features (such as foam size mean, aspect ratio, etc.), flotation foam statistical related features (such as foam size mean, variance, skewness, etc.), and flotation foam texture features (such as foam coarseness, etc.).
[0059] Because the industrial field environments in which data is collected are complex, such data inevitably contains some missing values and outliers. Therefore, data preprocessing is performed to address these missing and outlier conditions. First, invalid samples and feature variables containing duplicate information, as well as excessive missing or outlier values, are removed. Appropriate criteria are then used to fill in the small number of missing values in the data. Typically, continuous feature variables are filled with the mean or median, while categorical feature variables are filled with the mode. Furthermore, to facilitate subsequent model training, continuous numerical features are normalized, and categorical features are encoded.
[0060] Step 2: Cluster multiple foam image features based on the maximum information coefficient index to obtain multiple feature clusters.
[0061] In some embodiments of the present application, the specific implementation of step 2 above includes the following steps:
[0062] Step 2.1, for each of the multiple foam image features, respectively, calculate the correlation between the foam image feature and the working condition label using the maximum information coefficient index.
[0063] Specifically, the correlation MIC (f) between the i-th foam image feature and the working condition label can be calculated by the following formula: i ,y):
[0064]
[0065] Among them, the number of foam image features is 38, n is the number of foam flotation processes, B(n) is the upper limit of the grid division a*b, MI(f i ,y) is the i-th foam image feature f i The maximum information coefficient between the foam image feature f and the working condition label y. It should be noted that when calculating the maximum information coefficient, the foam image feature f i and the working condition label y are both considered as random variables.
[0066] In step 2.2, the foam image features whose correlation with the working condition labels is greater than a preset threshold are used as the cluster center of a feature cluster.
[0067] In some embodiments of the present application, the above-mentioned preset threshold can be 0.1*MIC max , where MIC max It represents the maximum value of the maximum information coefficient between all features and working condition labels.
[0068] Step 2.3, for each foam image feature other than the cluster center among the multiple foam image features, calculate the maximum information coefficient between the other foam image features and each cluster center, and assign the other foam image features to the feature cluster corresponding to the maximum information coefficient with the largest value.
[0069] That is, for the remaining foam image features in the data set, the maximum information coefficient between them and the features of each cluster center is calculated, and they are assigned to the feature cluster with the largest maximum information coefficient value.
[0070] Step 3: construct a multi-branch neural network and perform reinforcement learning on the multi-branch neural network based on multiple foam image features to obtain the optimal feature subset.
[0071] The reinforcement learning method is designed to select the most important features for identifying and predicting froth flotation conditions. Specifically, the optimal feature subset includes at least some of the most important features from multiple froth image features, such as flotation froth color, flotation froth dynamics, and flotation froth texture.
[0072] like Figure 2As shown, the multi-branch neural network includes a shared module (i.e., the shared layer in the figure) and multiple branch modules (i.e., branches 1, 2, through M in the figure, where M is the number of branch modules). The number of branch modules is consistent with the number of feature clusters, and the multiple branch modules correspond one-to-one to the multiple feature clusters. The input layer in the figure is the environment state input into the multi-branch neural network, and the output layer is the value of the action output by the branch module.
[0073] The shared module consists of two fully connected layers. It calculates the environment state fed into the multi-branch neural network and outputs an implicit representation. The environment state is a binary encoding of a feature subset (initially an empty set). Specifically, the environment state is represented by an n-bit binary code, where n equals the number of foam image features in the original data. A bit encoding 1 indicates that the corresponding foam image feature is included in the feature subset, while a bit encoding 0 indicates that it is not. When an environment state is provided as input, the shared module calculates an implicit representation.
[0074] Each branch module also consists of a two-layer fully connected layer. For each branch module, the branch module processes the implicit representation output by the shared module and outputs the value of each action in the action space (i.e., the action space of the molecular module). Each foam image feature and an empty action in the feature cluster corresponding to the branch module are considered an action in the action space of the branch module.
[0075] Specifically, each branch module takes the implicit representation output by the shared module as input and outputs the value of each action dimension. For each branch module, its action space includes all foam image features in its corresponding feature cluster and a null action, where a null action indicates that no foam image features in that feature cluster are selected. These decomposed action values are then used to generate a joint action tuple.
[0076] As a preferred example, the input dimension of the shared module is 38, which is consistent with the number of foam image features; the number of neurons in the first fully connected layer is 128, and the number of neurons in the second fully connected layer is 64. Each branch module takes the implicit representation output by the shared module as input to output the value of each action dimension. In this embodiment, the input dimension of each branch module is 64; the number of neurons in the first fully connected layer is 32, and the neurons in the second fully connected layer are consistent with the action dimension. For each branch module, its action space includes all foam image features in its corresponding feature cluster and an empty action, where an empty action means that no foam image feature in the feature cluster is selected.
[0077] Step 4: Identify the operating conditions of the target froth flotation process that requires operating condition identification based on the optimal feature subset.
[0078] During actual identification, the foam image of the target foam flotation process can be collected first, and then the numerical values of each foam image feature contained in the optimal feature subset can be extracted from the foam image. The numerical values of these foam image features are then input into a working condition identification model (such as a support vector machine or a neural network) for identification processing to obtain the working condition identification result of the target foam flotation process. The working condition identification result can be: the working condition of the target foam flotation process is good / poor / bad.
[0079] It is worth mentioning that this application establishes a multi-branch neural network with a shared module as a decision network for feature selection, in which different branch modules are responsible for selecting representative features from their corresponding feature clusters. At the same time, this application constructs a reinforcement learning environment based on the foam flotation process of known working conditions, and performs reinforcement learning training on the constructed multi-branch neural network to obtain the most important features for foam flotation condition identification and prediction, so that when foam flotation condition identification is performed based on these important features, the foam flotation condition identification effect can be improved.
[0080] The following is an exemplary description of the reinforcement learning process in step 3 above.
[0081] In some embodiments of the present application, the specific implementation method of performing reinforcement learning on a multi-branch neural network based on multiple foam image features to obtain the optimal feature subset in step 3 above includes the following steps:
[0082] In step 3.1, the constructed multi-branch neural network is used as the intelligent agent.
[0083] Step 3.2: Control the intelligent agent to interact with the environment based on multiple foam image features and output a feature subset.
[0084] In some embodiments of the present application, the specific implementation of step 3.2 above is as follows:
[0085] Step 3.21, set the feature subset to an empty set, generate a binary code of the feature subset, and use the binary code as the environment state s t .
[0086] Step 3.22, the environment state s t Input the agent for processing and obtain the value Q output by all branch modules j (s t ,a t j ), j = 1, 2, ..., M, M is the number of branch modules; Q j (s t ,a t j ) is the value output by the j-th branch module.
[0087] Step 3.23: For each branch module, take the action corresponding to the largest value among the values output by the branch module as the execution action. is the execution action of the j-th branch module.
[0088] Step 3.24, add the foam image features corresponding to all the executed actions to the feature subset to obtain the updated feature subset, and use the binary code of the updated feature subset as the updated environment state s t+1 .
[0089] Step 3.25, based on multiple foam image features, calculate the difference in recognition accuracy between the updated feature subset and the feature subset before the update, and use the difference as the reward signal r t+1 . Specifically, for each foam flotation process of the original data, the numerical value of each foam image feature in the updated feature subset can be retrieved from the original data (i.e., the multiple foam image features obtained above), and then the numerical value of these foam image features can be input into the working condition recognition model for recognition processing to obtain the working condition recognition result of the foam flotation process, and the recognition accuracy is obtained based on the degree of deviation between the working condition recognition result and the working condition label. Finally, the average recognition accuracy of each foam flotation process is used as the recognition accuracy of the updated feature subset. Similarly, the recognition accuracy of the feature subset before the update can also be obtained in the same way. It should be noted that if the feature subset before the update is an empty set, the recognition accuracy of the feature subset before the update is 0.
[0090] Step 3.26, update the environment state s before t , all execution actions Reward signal r t+1 and the updated environment state s t+1 As a piece of data for training a multi-branch neural network (s t , r t+1 , s t+1 ) is stored in memory.
[0091] Step 3.27, update the environment state s t+1 As the environmental state s in step 3.22 t , and return to execute step 3.22 until the actions corresponding to the values with the largest values among the values output by all branch modules are all empty actions, and output the feature subset when the actions corresponding to the values with the largest values among the values output by all branch modules are all empty actions.
[0092] Step 3.3, update the parameters of the multi-branch neural network based on the data used to train the multi-branch neural network during the interaction process, and use the multi-branch neural network after parameter update as the intelligent agent in step 3.2, and return to execute step 3.2 until the number of interactions between the intelligent agent and the environment reaches the preset maximum number of interactions.
[0093] In some embodiments of the present application, the process of updating the parameters of the multi-branch neural network based on the data used to train the multi-branch neural network during the interaction process is as follows:
[0094] Step 3.31, extract b pieces of data from the data stored in the memory, denoted as B = {s t ,a t ,s t+1 ,r t+1} b ; The value of b can be set according to actual conditions.
[0095] Step 3.32, by formula Q j eval =Q j (s t ,a t j ) Calculate the estimated Q value Q of the j-th branch module j eval , and using the formula Q j target =r t+1 +γ*max a Q j (s t+1 ,a) Calculate the target Q value Q of the j-th branch module j target , calculate the loss function of this branch Among them, γ is the attenuation factor, a is the variable of the max function, (s t ,a t ,s t+1 ,r t+1 )~B.
[0096] Step 3.33, using the formula Calculate the loss of a multi-branch neural network and update its parameters based on the loss. Specifically, take b pieces of data, calculate a loss for each piece, and the final loss function is the sum of all losses. Specifically, backpropagation can be used to update the network parameters using a gradient descent algorithm.
[0097] In step 3.4, the feature subset with the highest recognition accuracy among all feature subsets output by the interaction between the agent and the environment is selected as the optimal feature subset. In other words, the feature subset with the highest recognition accuracy among all feature subsets output by the interaction process is selected as the optimal feature subset.
[0098] The following is an example to illustrate the selection process of the optimal feature subset.
[0099] In this example, the froth flotation process is a gold-antimony flotation process. Accordingly, the feature selection process is as follows:
[0100] S1. Froth flotation data collection:
[0101] By collecting froth image data from a visual acquisition device during a gold-antimony flotation process, we used feature extraction techniques to extract visual features from the froth surface, generating raw data. This data includes froth color features, such as grayscale mean and redness mean; dynamic features, such as froth velocity; size features, such as froth size mean and aspect ratio; statistical features, such as froth size mean, variance, and skewness; and texture features, such as froth coarseness. This example ultimately collected 6,000 data samples under eight different operating conditions, encompassing 38 features.
[0102] S2. Data preprocessing:
[0103] During the data collection process of S1, the continuous numerical features are normalized and the categorical features are encoded according to the needs of subsequent model training. In this example, MinMaxScalar is used to normalize the continuous features, natural number encoding is performed for categorical features with size relationships, and One-Hot encoding is performed for categorical features without size relationships. The purpose of this step is to construct data that is convenient for model training. Under the premise of achieving the same purpose, other reasonable data preprocessing methods not specifically mentioned in this step of the application can also be adopted.
[0104] S3. Feature clustering:
[0105] This application first uses the maximum information coefficient (MIC) indicator based on information entropy theory to calculate the correlation between each feature and label (i.e., working condition label) in the data set, and sorts them from large to small according to the correlation. The calculation formula of MIC is as follows:
[0106]
[0107] In the formula, n is the data sample size, B(n) is the upper limit of the grid partition a*b, and MI(f,y) represents the maximum information coefficient between feature f and working condition label y. A threshold is also set, and features with correlation greater than the threshold are set as cluster centers. In this example, the threshold is 0.1*MIC max , where MIC max It represents the maximum information coefficient between all features and working condition labels. For the remaining features in the data set, the maximum information coefficient between them and each cluster center feature is calculated and assigned to the cluster center with the largest maximum information coefficient value.
[0108] S4. Build a multi-branch neural network architecture:
[0109] In this embodiment, the multi-branch neural network architecture is as follows Figure 2 As shown. The multi-branch decision neural network architecture includes a shared module and several branch modules, where the number of branch modules is consistent with the number of feature clusters. The shared decision module is composed of a neural network consisting of a double-layer fully connected layer. In this embodiment, the input dimension of the shared decision layer is 38, which is consistent with the number of features; the number of neurons in the first fully connected layer is 128, and the number of neurons in the second fully connected layer is 64. Each branch module is also composed of a neural network consisting of a double-layer fully connected layer. Each branch module takes the implicit representation output by the shared decision module as input to output the value of each action dimension. In this embodiment, the input dimension of each branch module is 64; the number of neurons in the first fully connected layer is 32, and the neurons in the output layer are consistent with the action dimension. For each branch module, its action space includes all features in its corresponding feature cluster and an empty action, where an empty action means that no feature in the feature cluster is selected.
[0110] S5. Reinforcement learning feature selection method:
[0111] In this embodiment, a 38-bit binary code is used as the environment state for reinforcement learning. This code represents the features included in the currently selected feature subset, initially an empty set. A bit coded as 1 indicates that the corresponding feature is included in the feature subset, while a bit coded as 0 indicates that it is not. The reinforcement learning feature selection process is as follows: 1) Initialize the neural network parameters and set the maximum number of interactions. 2) The agent interacts with the environment. 3) Train the neural network parameters. 4) Repeat steps 2) through 4) until the maximum number of interactions is reached. 5) The feature subset with the highest classification accuracy during the interaction process is selected as the final output.
[0112] The process of interaction between the agent and the environment is as follows: 1) Set the current feature subset to an empty set and generate the corresponding binary code as the initial state of the environment s t ; 2) The environmental state s tInput into the multi-branch neural network to obtain the action value output Q of all branch networks j (s t ,a t j ), j = 1, 2, ..., M, where M represents the number of branches; 3) Each branch module takes the action with the greatest value as the execution action Add the corresponding features to the feature subset and update the environment state s t+1 ; 4) Use the difference in classification accuracy between the feature subsets before and after the update as the reward signal r t+1 In this example, support vector machine (SVM) is used as the machine learning machine for classification; 5) s t 、 r t+1 and s t+1 The data is stored in memory and used to update the neural network parameters. 6) Repeat steps 2) to 5) until the feature subset is output, which satisfies the termination condition. The termination condition is that all branches select empty actions.
[0113] The neural network parameter training process is as follows: 1) Randomly extract b pieces of data from the memory, denoted as B = {s t ,a t ,s t+1 ,r t+1} b . 2) Use formula (1) to calculate the estimated Q value of each branch module, and use formula (2) to calculate the target Q value.
[0114] Q j eval =Q j (s t ,a t j ) (1)
[0115] Q j target =r t+1 +γ*max a Q j (s t+1 ,a) (2)
[0116] Where γ in the formula is the attenuation factor. 3) Use formulas (3) and (4) to construct the loss function. 4) Perform backpropagation on the reinforcement learning network and use the gradient descent algorithm to update the network parameters. The reinforcement learning parameters are shown in Table 1.
[0117]
[0118] Table 1 Parameters of reinforcement learning
[0119] Hyperparameters meaning Numerical Lr Gradient descent learning rate 0.001 Epoch Number of interaction rounds 1000 γ Attenuation Factor 0.95 pool_size Amount of data in memory 1024 b Amount of sample data updated at one time 32
[0120] S6. Feature selection result evaluation:
[0121] This example is based on the feature selection results obtained after step S5. Common feature selection methods include ReliefF, Fisher Score, mRMR, LASSO and Recursive Feature Elimination (RFE) for comparison. In the context of the problem of froth flotation condition identification, the performance of the above methods is evaluated using 5-fold cross validation as an evaluation strategy based on AUC and Accuracy as evaluation indicators. The performance evaluation results are shown in the figure below. Figure 3 As shown, Figure 3 The algorithm proposed in this paper is the feature selection method used in this application. It can be seen that the prediction results of the algorithm proposed in this application are better than those of the comparison method. Users can choose different evaluation indicators and evaluation strategies to evaluate the performance of the model based on the characteristics of the problem.
[0122] In summary, the feature selection process of this application has the following advantages:
[0123] First, by fully leveraging the visual features and predicted labels (i.e., working condition labels) in the froth flotation dataset, as well as the correlation between features, we cluster features using the maximum mutual information coefficient, grouping similar features into clusters. From each cluster, we select representative features to form a feature subset. Compared to existing froth flotation feature selection algorithms that make decisions based on the entire feature space, this method achieves higher efficiency in feature selection.
[0124] Second, deep reinforcement learning algorithms are used for foam flotation feature selection. Reinforcement learning does not rely solely on explicit supervision. Using a properly defined reward signal, an agent can learn from its own experience how to find the subset of features relevant to foam flotation through trial and error. It can also dynamically interact with the environment to automatically improve and optimize its feature selection strategy. Compared to existing foam flotation feature selection algorithms, this method has stronger global search capabilities and can generate feature subsets with better performance.
[0125] Third, a multi-branch neural network is constructed as the decision network for deep reinforcement learning: each branch module shares decision information through a shared module. This multi-branch neural network can select multiple features in a single decision. Compared to existing reinforcement learning-based feature selection algorithms, its decision-making efficiency is high and the speed is fast, thus reducing the computational complexity of neural network training.
[0126] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for identifying froth flotation conditions based on multi-branch reinforcement learning feature selection, characterized in that: include: Step 1: extracting a plurality of foam image features from a foam image of each froth flotation process in a plurality of froth flotation processes under different working conditions; Step 2: clustering the multiple foam image features based on the maximum information coefficient index to obtain multiple feature clusters; Step 3: construct a multi-branch neural network, and perform reinforcement learning on the multi-branch neural network based on the multiple foam image features to obtain an optimal feature subset; the optimal feature subset includes at least part of the multiple foam image features; the multi-branch neural network includes a shared module and multiple branch modules, the multiple branch modules correspond one-to-one to the multiple feature clusters, the shared module is used to calculate the environmental state input to the multi-branch neural network and output an implicit representation, the environmental state is a binary code of a feature subset, the branch module is used to process the implicit representation output by the shared module and output the value of each action in the action space, each foam image feature in the feature cluster corresponding to the branch module and an empty action are an action in the action space of the branch module; Step 4: Identify the operating condition of the target froth flotation process requiring operating condition identification based on the optimal feature subset.
2. The method for identifying froth flotation conditions according to claim 1, characterized in that: The step 2 includes: Step 2.1, for each of the plurality of foam image features, respectively calculating the correlation between the foam image feature and the working condition label using a maximum information coefficient index; Step 2.2, taking the foam image features whose correlation with the working condition label is greater than a preset threshold as the cluster center of a feature cluster; Step 2.3, for each foam image feature other than the cluster center among the multiple foam image features, calculate the maximum information coefficient between the other foam image features and each cluster center, and assign the other foam image features to the feature cluster corresponding to the maximum information coefficient with the largest value.
3. The method for identifying froth flotation conditions according to claim 2, characterized in that: The method of calculating the correlation between the foam image features and the working condition labels using the maximum information coefficient index includes: Calculate the first i The correlation MIC (f i , y): Where n is the number of froth flotation processes, B(n) is the upper limit of the grid division a*b, MI(f i , y) is the i-th foam image feature f i The maximum information coefficient between the working condition label y.
4. The method for identifying froth flotation conditions according to claim 1, wherein: The performing reinforcement learning on the multi-branch neural network based on the multiple foam image features to obtain an optimal feature subset includes: Step 3.1, use the constructed multi-branch neural network as the intelligent agent; Step 3.2, controlling the intelligent agent to interact with the environment based on the multiple foam image features, and outputting a feature subset; Step 3.3: Update the parameters of the multi-branch neural network based on the data used to train the multi-branch neural network during the interaction process, use the multi-branch neural network with updated parameters as the agent in step 3.2, and return to step 3.2 until the number of interactions between the agent and the environment reaches a preset maximum number of interactions; In step 3.4, the feature subset with the highest recognition accuracy among all feature subsets output by the interaction between the agent and the environment is taken as the optimal feature subset.
5. The method for identifying froth flotation conditions according to claim 4, characterized in that: The step 3.2 includes: Step 3.21, set the feature subset to an empty set, generate a binary code of the feature subset, and use the binary code as the environment state s t ; Step 3.22, the environmental state s t Input the agent for processing and obtain the value Q output by all branch modules j (s t , a t j ), j = 1, 2, ..., M, where M is the number of branch modules; Step 3.23: For each branch module, the action corresponding to the value with the largest value among the values output by the branch module is taken as the execution action. Step 3.24, add the foam image features corresponding to all the executed actions to the feature subset to obtain the updated feature subset, and use the binary code of the updated feature subset as the updated environment state s t+1 ; Step 3.25, based on the multiple foam image features, calculate the difference in recognition accuracy between the updated feature subset and the feature subset before the update, and use the difference as the reward signal r t+1 ; Step 3.26, update the environment state s before t , all execution actions Reward signal r t+1 and the updated environment state s t+1 Storing the data in the memory as a piece of data for training the multi-branch neural network; Step 3.27, update the environment state s t+1 As the environmental state s in step 3.22 t , and return to execute step 3.22 until the actions corresponding to the values with the largest values among the values output by all branch modules are all empty actions, and output the feature subset when the actions corresponding to the values with the largest values among the values output by all branch modules are all empty actions.
6. The method for identifying froth flotation conditions according to claim 5, characterized in that: The updating of the parameters of the multi-branch neural network based on the data used to train the multi-branch neural network during the interaction process includes: Step 3.31, extract b pieces of data from the data stored in the memory, denoted as B = {s t , a t , s t+1 , r t+1 } b ; Step 3.32, by formula Q j eval =Q j (s t , a t j ) Calculate the estimated Q value Q of the j-th branch module j eval , and using the formula Q j target =r t+1 +γ*max a Q j (s t+1 , a) Calculate the target Q value Q of the j-th branch module j target , calculate the loss function of this branch Among them, γ is the attenuation factor, a is the variable of the max function, (s t , a t , s t+1 , r t+1 )~B; Step 3.33, using the formula Calculate the loss value loss of the multi-branch neural network, and update the parameters of the multi-branch neural network based on the loss value loss.
7. The method for identifying froth flotation conditions according to claim 1, characterized in that: The shared module and the branch module are both double-layer fully connected layers.
Citation Information
Patent Citations
Mixed feature selection method and system for froth flotation working condition recognition process
CN110942104A
Improved deep active learning zinc flotation froth image classification algorithm and system
CN114627333A