Improved heavy metal ion adsorption capacity data prediction model
Through the improved SA-PSO-ANN model, the problem of low prediction accuracy of copper ion adsorption capacity of modified biomass materials is solved, and more efficient and reliable copper-containing wastewater treatment is achieved.
Patent Information
- Application Number
- CN202510029445.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-04-01
AI Technical Summary
The prior art has local optimal solution problems when predicting the adsorption capacity of modified biomass materials to copper ions, resulting in low prediction accuracy and difficulty in adapting to different data characteristics and complex adsorption processes.
The improved SA-PSO-ANN model is adopted, which includes submodules such as data collection and collation, data preprocessing, model architecture determination, PSO optimization and SA optimization. The weights and deviations of the ANN model are optimized through the PSO optimization algorithm, and the model performance is further optimized in combination with the simulation annealing algorithm to improve the model's adaptability and prediction accuracy.
The prediction accuracy of modified biomass materials to copper ion adsorption capacity is significantly improved, the model's adaptability to complex adsorption data is enhanced, the adsorption process parameters are achieved accurately optimized, and the efficiency and reliability of copper-containing wastewater treatment is improved.
Smart Images

Figure CN119742015A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of environmental science and engineering, and in particular focuses on the technology of adsorbing copper ions by modified biomass materials, and specifically is an innovative application of an improved SA-PSO-ANN-based data model in predicting the adsorption capacity of modified grapefruit peel for copper (II) ions. Background Art
[0002] In today's environmental science and engineering field, the treatment of heavy metal ion pollution, especially copper-containing wastewater, has become a challenging task. With the acceleration of the industrialization process and the rapid development of many industrial activities such as electroplating, electronics, metallurgy and other industries, the discharge of copper-containing wastewater is increasing day by day, posing a serious threat to the ecological environment and human health. If copper-containing wastewater is discharged directly without effective treatment, it will continue to accumulate in environmental media such as water bodies and soil, causing direct damage to the survival and reproduction of aquatic organisms, leading to an imbalance in the aquatic ecosystem; at the same time, through the transmission and enrichment of the food chain, it will eventually enter the human body, causing chronic toxic effects on important organs such as the human nervous system, liver, and kidneys, causing a variety of diseases, and seriously affecting human life, health and quality of life.
[0003] Traditional copper-containing wastewater treatment methods, such as chemical precipitation, ion exchange, membrane separation, etc., can achieve the removal of copper ions to a certain extent, but they all face their own drawbacks that are difficult to overcome. Chemical precipitation often requires the addition of a large amount of chemical agents, which not only significantly increases the treatment cost, but also the chemical agents used may cause secondary pollution and cause new harm to the environment; the ion exchange resin in the ion exchange method is expensive, and the regeneration process is complicated and costly, which limits its large-scale application; although the membrane separation method has a high separation efficiency, the preparation cost of the membrane component is high, it is easy to clog, and the service life is limited, which makes the operating cost high. Therefore, there is an urgent need to seek an efficient, economical and environmentally friendly copper-containing wastewater treatment technology.
[0004] As a rich biomass resource, agricultural and forestry waste has many advantages such as wide sources, low cost, and renewable. After modification, it has shown great potential for the treatment of copper-containing wastewater. Through various modification methods, a large number of active functional groups can be introduced on the surface of agricultural and forestry waste, thereby significantly improving its adsorption capacity for copper ions. However, in practical applications, accurately predicting the adsorption capacity of modified biomass materials for copper ions has become a key issue. Only by accurately mastering the adsorption capacity can the adsorption process be reasonably designed to improve treatment efficiency and reduce treatment costs.
[0005] At present, the traditional artificial neural network (ANN) is a commonly used method for adsorption capacity prediction. However, the traditional ANN model has a serious defect, that is, it is very easy to fall into the local optimal solution when optimizing the model parameters. This is because in the process of searching for the optimal parameters, once a local optimal solution is found, it is difficult to jump out of the area to explore a better solution space, resulting in a large deviation between the prediction results and the actual situation, and cannot meet the high-precision prediction needs.
[0006] When we searched for relevant technologies at home and abroad, we found that there were few technologies related to the data model for predicting the adsorption capacity of heavy metal ions using the SA-PSO-ANN model. Specific examples are as follows: Professor Xin Guorong's team at Sun Yat-sen University has made new progress in the study of the effects of heavy metal enrichment on soil organic carbon characteristics and microbial mechanisms, involving research on the dynamic changes in SOC content and structure with increasing heavy metal concentrations and microbial mechanisms, but did not directly mention the SA-PSO-ANN model.
[0007] A study has constructed a method and system for determining the residual adsorption amount of polluted adsorbent particles. By introducing the solid-liquid ratio into the LAN desorption kinetic model, an improved LAN desorption kinetic model was constructed, which can predict the residual adsorption amount of the adsorbate per unit mass of adsorbent, but it is not a SA-PSO-ANN model.
[0008] The paper "Insights into the estimation of heavy metals ions sorption from aqueous environment onto natural zeolite" used soft computing methods to study the adsorption performance of natural zeolite for heavy metal ions, including least squares support vector machine, genetic programming, particle swarm optimization-adaptive neuro-fuzzy inference system and artificial neural network models, but it is unclear whether the SA-PSO-ANN model was used.
[0009] In this context, the simulated annealing-particle swarm optimization-artificial neural network (SA-PSO-ANN) model came into being, trying to overcome the limitations of the traditional ANN model. However, the existing SA-PSO-ANN model still has room for improvement, such as the setting of model parameters is not accurately optimized, and it cannot fully adapt to different data characteristics and complex adsorption processes; when processing data, the feature mining and utilization of data are not sufficient, resulting in limited generalization ability of the model; in terms of optimization algorithm, its search strategy and convergence speed still need to be further improved to better balance global search and local search capabilities. Therefore, in order to more effectively treat copper-containing wastewater, it is still urgent to further improve the SA-PSO-ANN model to improve its prediction accuracy and performance; this study is of great significance to promote the widespread application of modified biomass materials in the field of copper-containing wastewater treatment. Summary of the invention
[0010] The technical problems to be solved by the present invention include: how to improve the accuracy of predicting the adsorption capacity of heavy metal ions by modified biomass materials under different working conditions, enhance the adaptability of the model to various complex adsorption data, and achieve accurate optimization of adsorption process parameters, thereby overcoming the problems of traditional methods such as unoptimized artificial neural networks that are prone to falling into local optimality, low prediction accuracy, poor adaptability of traditional models to different data, and difficulty in effectively determining the optimal adsorption process parameters, resulting in low adsorption efficiency and difficulty in reducing treatment costs, thereby providing more efficient and reliable technical support for the treatment of wastewater containing heavy metal ions.
[0011] An improved heavy metal ion adsorption capacity data prediction model includes the following submodules: a data collection and organization submodule, a data preprocessing submodule, a model architecture determination submodule, a PSO optimization submodule, and a SA optimization submodule.
[0012] As a preferred embodiment of the present invention, in the data collection and arrangement submodule, multiple groups of modified grapefruit peel adsorption copper ion experiments are constructed and multiple groups of data are collected, including but not limited to temperature, initial pH, adsorption time, initial copper concentration, and adsorption capacity; then the temperature, initial pH, adsorption time, initial copper concentration and other related data are used as input variables and the adsorption capacity is used as the output variable to construct a database; at the same time, the data sets in the above database are strictly reviewed to eliminate abnormal or erroneous data points and the processed data are randomly divided into training sets and test sets according to proportion.
[0013] As a preferred solution of the present invention, in the data preprocessing submodule, the training set and the test set data are normalized and each input variable is mapped to a selected data interval using a linear normalization method. The data process is as follows: =2× + (-1); where is the normalized value, is the original data value, and are the minimum and maximum values of the variable in the data set, respectively.
[0014] As a preferred solution of the present invention, in the model architecture determination submodule, a customized ANN model with a topological structure of 4:9:1 for input layer, hidden layer and output layer is constructed, wherein the four nodes of the input layer correspond to temperature, initial pH, adsorption time and initial copper ion concentration respectively; the activation function of the nine nodes of the hidden layer is determined through multiple tests and optimizations. Specifically, a new two-dimensional selection vector [S, K] is constructed, and the activation function is set to select data according to the parameters S and K of the two-dimensional selection vector [S, K], where S= , K = -3 ,in is the input data sample, is the data mean, n is the number of samples, is the standard deviation; when |S|>0.5 and K>3, construct a new function: given an input value x, first calculate 1 divided by (1+ ) is recorded as x), and then compare the input value x with x) is the output result for the input x; otherwise, construct another function for the input value x. If x is greater than or equal to 0, the output result is x itself, and if x is less than 0, the output result is 0; the output layer has 1 node output The predicted value and the activation function of the output layer adopt a linear function; the training function constructs such a function, first calculates the initialization parameters and the damping factor, then iteratively calculates the error vector and the Jacobian matrix to update the parameters, and adjusts the damping factor according to the error change until the termination condition is met to obtain the final parameters.
[0015] As a preferred solution of the present invention, in the PSO optimization submodule, a specific PSO algorithm is constructed to optimize the weights and biases of the ANN model. Specifically, the particle swarm size m=30 and the maximum number of iterations are set. =100, learning factor =1.8, = 1.2, for the inertia weight Calculation, build a new nonlinear decreasing algorithm, specifically: = - ; where k is set to the number of contemporary iterations, =0.9, = 0.4, the particle position constraint is set to [-15, 15], and the velocity constraint is set to [-3, 3]). Further, the new algorithm for velocity and position is constructed as follows: = + - + - ; = + ;in is the velocity of the i-th particle in the k+1-th iteration in the d-th dimension, For the corresponding position, and is a random number uniformly distributed in the interval [0, 1]. is the coordinate of the individual optimal position of the ith particle in the dth dimension, is the coordinate of the global optimal position in the dth dimension.
[0016] As a preferred solution of the present invention, in the SA optimization submodule, a new SA algorithm is further constructed based on the constructed PSO-ANN model, and the specific settings are as follows: the initial temperature is set to 100 degrees, the temperature attenuation coefficient is set to , and set a parameter P to decide whether to accept the new solution. For the specific setting of the parameter p, the following improved data rule is constructed: for a given system state change, calculate the energy difference between the new state and the current state. If the energy difference is less than or equal to 0, accept the new state; if the energy difference is greater than 0, accept the new state with a certain probability (P=exp(- )) accept the new state otherwise keep the current state. , is the energy difference between the new solution and the current solution, k is the Boltzmann constant, and T is the current temperature; at the same time, the temperature update formula is set to = ; is the temperature of the next iteration, T is the current temperature; in the temperature adjustment process, the acceptance rate of the current solution is For adaptive control, the specific data rules are set as follows: (1-0.1 ); (1+0.1 ) As a preferred solution of the present invention, in the model architecture determination submodule, when further optimizing and improving the number of hidden layer nodes, the following new data rule is constructed: a parameter index C associated with the input data is constructed. ;in, is the order selected according to the data distribution characteristics. When the data is evenly distributed =1, when there are outliers in the data =2; and based on the parameter index C and the pre-set threshold The relationship between the hidden layer nodes is dynamically adjusted. Specifically, the following data rules are constructed: When the number of hidden layer nodes is = +5; at this time is the ceiling function); C hour, = ;at this time .
[0017] As a preferred solution of the present invention, an improved algorithm is constructed to perform secondary optimization on the particle velocity update formula in the PSO algorithm. Specifically, a nonlinear acceleration factor is introduced. , then the speed update formula is improved to = + - + - ], which has been proven to significantly improve the acceleration capability of enhanced particles in the search process and the overall efficiency of the algorithm.
[0018] As a preferred embodiment of the present invention, a modified grapefruit peel adsorption capacity prediction data model with a DOUBLE-LAYER architecture is further constructed, and the above data model is marked as the LAYER-Ⅰ model layer; on the basis of the LAYER-Ⅰ model layer, a LAYER-Ⅱ model layer for slightly fine-tuning the LAYER-Ⅰ model layer is constructed; the construction of the LAYER-Ⅱ model layer revolves around the dynamic characteristics of the environment and the characteristics of the adsorption conditions.
[0019] As a preferred technical solution of the present invention, for the two model data sets of environmental dynamic characteristics and adsorption operating condition characteristics, the former covers various dynamic change factors in the external environment that can have a significant impact on the adsorption effect during the adsorption of heavy metal ions by modified grapefruit peel, including but not limited to fluctuations in water quality components, changes in ambient temperature, and changes in water flow rate; the latter encompasses various different operating condition combination scenarios related to the adsorption of heavy metal ions by modified grapefruit peel during actual adsorption operations, including but not limited to different pretreatment methods experienced by grapefruit peel adsorbents, different parameter settings adopted by the adsorption device during operation, and different influent concentrations and flow rates encountered during the adsorption process.
[0020] Beneficial effects of the present invention: In general, it can be said that this study has deeply reconstructed and greatly improved the existing model, introduced many new algorithms, and verified that it has good practical effects in predicting the adsorption capacity of modified grapefruit peel for copper (II) ions. More specific technical effects are described in detail in the following examples, which can be used for reference. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 Schematic diagram of the performance evaluation of artificial neural networks, PSO-ANN and SA-PSO-ANN.
[0022] Figure 2 Schematic diagram of the model parameters of PSO-ANN.
[0023] Figure 3 Schematic diagram of the model parameters of the neural network.
[0024] Figure 4 Schematic diagram of the topological structure of an artificial neural network.
[0025] Figure 5 Schematic diagram of the performance evaluation of artificial neural networks, PSO-ANN and SA-PSO-ANN. DETAILED DESCRIPTION
[0026] The following examples describe the present invention in detail. In the description of the following examples, specific details such as specific system structures, technologies, etc. are proposed for illustration rather than limitation, so as to provide a thorough understanding of the present application embodiments. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, the detailed description of well-known systems, devices and methods is omitted to prevent unnecessary details from hindering the description of the present application.
[0027] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements and components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components. It should also be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the items listed in association and all possible combinations, and includes these combinations. As used in the present specification and the appended claims, the term "if" can be interpreted as "when..." or "once" or "in response to determination" or "in response to detection" according to the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "once it is determined" or "in response to determination" or "once [described condition or event] is detected" or "in response to detection [described condition or event]" according to the context.
[0028] In addition, in the description of the present application specification and the attached claims, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance. The reference to "one embodiment" or "some embodiments" described in the present application specification means that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in the different parts of this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways. Example 1
[0029] The innovative data model of the present invention is specifically used to predict the adsorption capacity of heavy metal ions. It integrates multiple key sub-modules, namely, a sub-module specifically responsible for data collection and organization, a sub-module focusing on data preprocessing, a sub-module dedicated to model architecture determination, a sub-module for PSO optimization, and a sub-module for SA optimization. These sub-modules work together to achieve accurate prediction of the adsorption capacity of heavy metal ions.
[0030] Data collection and organization submodule: Carry out multiple sets of carefully designed and strictly controlled experiments on the adsorption of copper ions by modified grapefruit peel. During the experiment, comprehensively collect multiple sets of data covering different conditions, including but not limited to accurately measured temperature, initial pH value, adsorption time and initial copper concentration as input variables, and accurately measure the adsorption capacity as output variable, so as to build a rich and complete database; then implement a very strict review process for the original data set, carefully identify and resolutely eliminate abnormal or erroneous data points through a variety of advanced data analysis techniques and methods, and finally divide the processed data into training set and test set in a random manner according to a specific ratio that has been scientifically verified, so as to provide a reliable data basis for the training and verification of subsequent models.
[0031] The core operation of the data preprocessing submodule is to normalize the data of the training set and the test set. The linear normalization method, which is efficient and commonly used, is used strictly according to a specific formula (i.e. =2× +(-1) (where is the normalized value, is the original data value, and The minimum and maximum values of the variable in the entire data set are respectively obtained through precise statistics) to accurately map each input variable to a pre-set specific interval, thereby effectively unifying the data magnitude and eliminating the adverse effects that may be caused by differences in data magnitude.
[0032] The model architecture determines the submodule, whose main function is to build an artificial neural network (ANN) model with a specific topological structure (4:9:1), and carefully set 4 nodes in the input layer of the model, such as Figure 4 As shown in the figure, they correspond precisely to the input variables, which have a key influence on the adsorption process, such as temperature, initial pH, adsorption time and initial copper ion concentration, to ensure that the data can be accurately input into the model; the 9 nodes of the hidden layer (such as Figure 3 The activation function adopts an adaptive selection mechanism based on the complex characteristics of the input data, and the skewness S= is calculated accurately according to the input data. , kurtosis K = -3 ,(in is the input data sample, is the data mean, n is the number of samples, is the standard deviation), make intelligent judgment and selection, and build a new function when |S|>0.5 and K>3: given the input value x, first calculate 1 divided by (1+ ) is recorded as x), and then compare the input value x with x) is the output result for the input x; otherwise, construct another function for the input value x. If x is greater than or equal to 0, the output result is x itself, and if x is less than 0, the output result is 0; the output layer has 1 node output The predicted value and the activation function of the output layer adopt a linear function; the training function constructs such a function, first calculates the initialization parameters and the damping factor, then iteratively calculates the error vector and the Jacobian matrix to update the parameters, and adjusts the damping factor according to the error change until the termination condition is met to obtain the final parameters.
[0033] The PSO optimization submodule is mainly used to introduce the particle swarm optimization (PSO) algorithm to deeply optimize the weights and biases of the ANN model, such as Figure 2 The model parameters of PSO-ANN are shown in Figure 2. The specific operation is to reasonably set the particle swarm size to m=30 and set the maximum number of iterations to =100, carefully tune the learning factor =1.8, =1.2, and the inertia weight is determined by a nonlinear decreasing strategy. The formula is: = - (k is the number of contemporary iterations, =0.9, = 0.4), and at the same time, the particle position is strictly constrained to [-15, 15], and the velocity is constrained to [-3, 3]. The specific velocity update formula ( = + - + - ) and the position update formula ( = + ,in is the velocity of the k+1th iteration of the th particle in the dth dimension, For the corresponding position, and is a random number uniformly distributed in the interval [0, 1]. is the coordinate of the individual optimal position of the ith particle in the dth dimension, is the coordinate of the global optimal position in the dth dimension) to guide particles to efficiently explore and converge in the search space to achieve optimization of model parameters.
[0034] The SA optimization submodule is used to introduce the simulated annealing algorithm based on the PSO-ANN model to further optimize the model performance. The specific implementation method is to set the initial temperature to 100 degrees and the temperature attenuation coefficient ( 0.9), and set a parameter P to decide whether to accept the new solution. For the specific setting of the parameter p, the following improved data rule is constructed: for a given system state change, the energy difference between the new state and the current state is calculated. If the energy difference is less than or equal to 0, the new state is accepted; if the energy difference is greater than 0, the new state is accepted with a certain probability (P=exp(- )) accept the new state otherwise keep the current state. , is the energy difference between the new solution and the current solution, k is the Boltzmann constant, and T is the current temperature; at the same time, according to the temperature update formula = ( is the temperature of the next iteration, T is the current temperature) to update the temperature; during the temperature adjustment process, according to the acceptance rate of the current solution Perform adaptive control when the acceptance rate >0.8, according to the formula = (1-0.1 ) speed up the temperature drop; when According to the formula = (1+0.1 ))Slow down the rate of temperature drop. Example 2
[0035] When determining the number of hidden layer nodes, which has a significant impact on model performance, a new algorithm was built with the goal of being able to use a complexity index C unique to the input data (the complexity index C is given by a specific formula C= Calculated, among which is the order carefully selected according to the data distribution characteristics. When the data presents a relatively uniform distribution, The value is 1, and when there are many outliers in the data that deviate from the normal range, The value is 2) and the preset threshold (Scientifically verified and demonstrated in advance) to make flexible dynamic adjustments. When the complexity index C obtained by precise calculation is greater than the preset threshold When (here The value of needs to be determined based on a large number of experiments and data analysis to ensure the rationality and effectiveness of the adjustment), the number of hidden layer nodes will be set to +5 (including is an upward rounding function. This calculation method aims to appropriately increase the number of hidden layer nodes when the data complexity is high, so as to better process complex data information and improve the model's ability to capture complex relationships); and when the complexity index C is less than or equal to the preset threshold When the number of hidden layer nodes is is determined to be ( This is a rounding function. In this case, the data is relatively simple. Reducing the number of nodes can avoid overfitting of the model and improve the generalization ability of the model.
[0036] A carefully designed nonlinear acceleration factor can also be introduced into the particle velocity update formula (The nonlinear acceleration factor By specific formula Calculated, where k is the current number of iterations, is the maximum number of iterations set in advance. The design of this formula aims to dynamically adjust the value of the acceleration factor according to the iteration process, so that the particles can obtain greater acceleration ability in the early stage of the search and quickly explore the solution space. In the later stage of the iteration, the acceleration ability gradually stabilizes, which helps to accurately converge to the optimal solution. When the nonlinear acceleration factor is introduced, the speed update formula will change accordingly and become = + - + - ]. The new algorithm constructed here has been proven to significantly enhance the acceleration ability of particles during the search process and improve the efficiency of model optimization, thereby improving the accuracy and reliability of the entire data model in predicting the adsorption capacity of heavy metal ions. Example 3
[0037] In the model training phase, first, the carefully divided training set data is accurately input into the constructed improved SA-PSO-ANN model. During the input process, ensure that the input variables such as temperature, initial pH, adsorption time and initial copper ion concentration of each data sample can accurately correspond to the corresponding nodes of the model input layer. Then, through weighted calculations between the layers within the model based on pre-set weights and biases, and processing with carefully selected activation functions, the forward propagation of data from the input layer to the hidden layer and then to the output layer is realized, thereby calculating the model's adsorption capacity prediction value for each training sample. .
[0038] According to the mean square error (MSE) formula MSE= (n is the number of training samples, is the actual adsorption capacity value of the i-th sample, is the adsorption capacity value of the i-th sample predicted by the model), and the error between the model prediction value and the actual value is accurately calculated. After the calculation is completed, the error back propagation algorithm is used to propagate the error from the output layer to the input layer according to the connection relationship between the layers. During the back propagation process, the weights and biases between the layers are adjusted in turn to gradually reduce the error. The specific adjustment method is to update the weights and biases at a certain learning rate according to the partial derivatives of the error with respect to the weights and biases and the principle of the gradient descent method. At the same time, combined with the PSO and SA optimization algorithms, the PSO algorithm uses the individual optimal position and global optimal position information of the particles in the particle swarm to guide the weights and biases to adjust in a more optimal direction; the SA algorithm accepts new solutions that may temporarily increase the error but help to jump out of the local optimum with a certain probability according to the Metropolis criterion, and further optimizes the adjustment process. Repeat the above data input, forward propagation, error calculation, and back propagation adjustment process until the preset training stop condition is met. The preset training stop condition includes reaching the preset maximum number of training times, or when the calculated error is less than the set threshold. In addition, the early stopping method is used in the training process. That is, after each iteration, if it is found that the performance of the model on the validation set does not improve for 10 consecutive iterations, the training is terminated in advance to prevent the model from overfitting the training data.
[0039] After that, the test set data can be fully input into the trained model, and the model's predicted adsorption capacity value for the test set data can be obtained according to the same forward propagation calculation process as the training stage. Then, according to the root mean square error (RMSE) calculation formula RMSE = 、Mean absolute error (MAE) calculation formula MAE= and the coefficient of determination ( ) Calculation formula =1- (in is the average value of the actual adsorption capacity in the test set data), and RMSE, MAE and These three important error indicators evaluate the difference and fit between the model prediction value and the actual value from different perspectives. The closer it is to 1, the better the model fitting effect is; the closer RMSE and MAE are to 0, the smaller the model prediction error is.
[0040] Then according to the calculated , RMSE and MAE and other indicators comprehensively evaluate the model performance, such as Figure 1 The performance evaluation of artificial neural network, PSO-ANN and SA-PSO-ANN shows that if 0.99 or RMSE 0.005 or MAE 0.004, it indicates that the model performance has not met the expected requirements and the model needs to be adjusted and optimized. Adjustment and optimization methods include but are not limited to the following: readjusting model parameters, such as adjusting the particle swarm size, learning factor, inertia weight strategy, nonlinear acceleration factor in the PSO algorithm, and the initial temperature, temperature attenuation coefficient, and temperature adjustment strategy in the SA algorithm; increasing the amount of training data, through further experiments to obtain more data on the adsorption of copper ions by modified grapefruit peel under different conditions, enriching the information for model learning, and enabling the model to learn more comprehensive data features; using data enhancement technology to randomly transform, add noise, rotate, and other operations on the original data, expand the data set, and improve the generalization ability of the model, so that it can better adapt to different data distributions and working conditions.
[0041] Consider applying the rigorously verified and optimized model to the actual copper-containing wastewater treatment scenario. According to the prediction results of the model, a series of optimal adsorption process parameters are determined, including but not limited to adsorbent dosage, adsorption time, solution pH value, etc. In the actual copper-containing wastewater treatment process, the modified grapefruit peel adsorbent is added to the copper-containing wastewater in an appropriate amount according to the determined optimal process parameters, the solution pH value is adjusted to the optimal range, and then the adsorption treatment is carried out for a certain period of time to achieve the purpose of efficiently removing copper ions in the wastewater. New experimental data are collected regularly during the actual application process. These new data include adsorption experimental data under different water quality and working conditions in the actual treatment of copper-containing wastewater. The newly collected data are added to the original data set to form a new training set data, and then the new training set data is used to update and optimize the model online, repeating the process of the model training phase (including data input, forward propagation, error calculation, back propagation adjustment, etc.), and combining PSO and SA optimization algorithms to enable the model to continuously learn new data features and adapt to the treatment needs of copper-containing wastewater under different water quality and working conditions. Example 4
[0042] In the application scenario, that is, when our improved SA-PSO-ANN data model is used to predict the adsorption capacity of modified grapefruit peel for copper (II) ions, the model performance needs to be strictly evaluated in the following way to ensure that it meets the specific accuracy requirements.
[0043] On the training set, the training set data is first input into the model and the predicted adsorption capacity value is obtained through forward propagation calculation. Then, the coefficient of determination was used Calculation formula =1- (where n is the number of training samples, is the actual adsorption capacity value of the i-th sample, is the average value of the actual adsorption capacity in the training set data) . Requires the calculated The coefficient of determination must be greater than or equal to 0.9995. This high-precision coefficient of determination indicates that the model fits the data in the training set very well and can accurately capture the complex nonlinear relationship between the input variables (temperature, initial pH, adsorption time, initial copper ion concentration) and the adsorption capacity. At the same time, according to the mean square error (MSE) formula MSE= Calculate the MSE, the result must be less than or equal to 5.0 This strict mean square error limit ensures that the mean square error between the model prediction value and the actual value is at an extremely low level, reflecting the high-precision learning ability of the model during the training process. For the root mean square error (RMSE), according to the formula RMSE = Calculation requires RMSE to be less than or equal to 0.002. RMSE measures the size of the model prediction error from another perspective. A lower RMSE value further proves the prediction accuracy of the model on the training set. Finally, the mean absolute error (MAE) is calculated by the formula MAE= Calculate the MAE, which should be less than or equal to 0.0015.
[0044] On the test set, Figure 5 As shown, according to the above calculation , MSE, RMSE and MAE methods, calculated Must be greater than or equal to 0.995. This indicator requirement ensures that the model still has high fitting ability and generalization performance on data that have not participated in training, and can accurately predict the adsorption capacity of modified grapefruit peel for copper (II) ions under different working conditions. MSE must be less than or equal to 2.0 , this restriction ensures that the prediction error of the model on the test set is at a low level, indicating that the model can maintain good accuracy when facing new data. The RMSE requirement is less than or equal to 0.004, which further verifies the reliability of the model's prediction results on the test set. Its low value indicates that the deviation between the model's predicted value and the actual value is small. MAE is less than or equal to 0.003, which reflects that the average absolute deviation of the model's prediction on the test set is small, and the model has good stability and prediction accuracy. In the entire model evaluation process, high-precision calculation tools and strict comparison methods are required for each calculation step and performance indicator judgment to ensure that the model performance fully meets the above-mentioned accuracy requirements on the training set and test set.
[0045] When the prediction accuracy of the model decreases in actual application, automatic detection and early warning as well as model retraining and optimization should be implemented according to the following designed process to ensure that the prediction performance of the model can be restored or improved in time.
[0046] When the model is continuously running in the actual copper-containing wastewater treatment application scenario, the prediction results of the model for each new input data sample are monitored in real time. For each prediction, the prediction error is calculated, that is, the difference between the predicted value and the actual measured value of the adsorption capacity of modified grapefruit peel for copper (II) ions. When the prediction errors calculated for 5 consecutive times exceed the preset reasonable range (the range can be determined according to the performance of the model on the training set and the test set and the actual application requirements, for example, if the average prediction error on the training set and the test set is e, the preset range can be set to [ek, e+k], where k is the error tolerance determined according to the actual situation), the warning signal is automatically triggered. Once the warning signal is issued, the model retraining and optimization program is automatically started immediately. First, re-evaluate the existing data set to consider whether the training set and test set need to be re-divided. When re-dividing, a more reasonable ratio can be used for division according to the distribution characteristics and quantity of the newly collected data to ensure that the training set and the test set can better reflect the characteristics of the actual data and provide more effective data support for model retraining. Comprehensively adjust the key parameters in the PSO algorithm. The particle swarm size can be adjusted within a certain range. The appropriate number of particles can be selected according to the complexity of the data and the limitation of computing resources to balance the search capability and computing cost. and You can try different combinations between 1.0 and 2.0 to optimize the learning and exploration capabilities of particles between individual optimality and global optimality; in terms of inertia weight strategy, readjust and The value of makes the particles have a strong global search ability in the early stage of iteration, and can converge to the optimal solution more accurately in the later stage; at the same time, the nonlinear acceleration factor is optimized according to the convergence speed and stability of the model and the acceleration ability of the particles in the search process is enhanced. In addition, according to our observations, special attention should be paid to re-optimizing the initial temperature, temperature attenuation coefficient and temperature adjustment strategy in the SA algorithm.
[0047] After completing the above operations of re-dividing the data set and adjusting the algorithm parameters, the model is retrained using the new training set data. During the training process, the standard process of the model training phase is repeated, including data input, forward propagation calculation, error calculation, back propagation adjustment and other steps. At the same time, the optimized PSO and SA algorithms are combined to guide the model to converge in a better direction. During the retraining process, the performance of the model on the new test set is continuously monitored, and the coefficient of determination ( ), mean square error (MSE), root mean square error (RMSE), and mean absolute error (MAE) to evaluate whether the model prediction performance has been restored or improved. If the model performance still does not meet the expected requirements after multiple iterations of training, further analyze the data characteristics and model behavior to consider whether other measures are needed, such as increasing the amount of training data, using more complex data enhancement techniques, or fine-tuning the model architecture, until the model prediction performance is restored to an acceptable level. Example 5
[0048] As a further model optimization development, a modified grapefruit peel adsorption capacity prediction data model with a DOUBLE-LAYER architecture was constructed. Based on the SA-PSO-ANN data model trained and deployed above (marked as LAYER-Ⅰ model layer); on the basis of the LAYER-Ⅰ model layer, a LAYER-Ⅱ model layer for fine-tuning the LAYER-Ⅰ model layer was constructed; the construction of the LAYER-Ⅰ model layer revolved around the dynamic characteristics of the environment and the characteristics of the adsorption conditions. The former covers various dynamic change factors in the external environment that can have a significant impact on the adsorption effect during the adsorption of heavy metal ions by modified grapefruit peel, including but not limited to fluctuations in water quality components, changes in ambient temperature, and changes in water flow rate; the latter covers various different working condition combination scenarios related to the adsorption of heavy metal ions by modified grapefruit peel during the actual adsorption operation, including but not limited to different pretreatment methods experienced by grapefruit peel adsorbents, different parameter settings used by the adsorption device during operation, and different influent concentrations and flows faced during the adsorption process.
[0049] Among them, the environmental dynamic characteristics and the adsorption condition characteristics have the following data interaction relationship: the former affects the latter in a specific order based on the environmental dynamic characteristics; specifically, the environmental dynamic characteristics affect the adsorption condition characteristics under different conditions in a predetermined ordered order; accordingly, the LAYER-Ⅱ model layer performs a small-range parameter pre-adjustment on the LAYER-Ⅰ model layer that has been trained, optimized and deployed for application to generate a combined LAYER-Ⅰ model layer composed of different parameter combinations, and then each single model layer in the combined LAYER-Ⅰ model layer acts on each adsorption condition characteristic in the adsorption condition characteristics in turn. At this time, by observing the practical effects of different single model layers, one or several single model layers whose predicted effects are closest to the actual adsorption data are identified and used as the data basis for real-time dynamic adjustment of the LAYER-Ⅰ model layer; the algorithm implementation method of the small-range parameter pre-adjustment is: multiplying a coefficient range with the adjusted parameter as the center, and the coefficient range is not greater than (10%-1000%).
[0050] For this advanced multi-layer data model, we first consider the model optimization and prediction under the change of a single environmental factor. At this time, we consider preparing a series of copper-containing wastewater solutions with different initial copper ion concentrations and other water quality conditions strictly controlled and stable in an experimental environment equipped with high-precision monitoring equipment, precise flow control devices and standardized adsorption experimental devices. For each concentration solution, adsorption experiments are carried out at different adsorption times. At the same time, high-precision temperature sensors are used to record the temperature changes during the adsorption process to obtain a large amount of adsorption capacity data, which are used for subsequent model construction after strict data processing. About the LAYER-Ⅰ model layer: Data preprocessing: Use advanced linear normalization methods to process data to ensure that the input variables are suitable for model training; Construct ANN model: Construct an ANN model with a topological structure of 4:9:1. The input layer accurately corresponds to the key input variables. The hidden layer is optimized after multiple experiments. The output layer uses a linear function to output the predicted value, constructs an efficient training function algorithm, and combines PSO and SA algorithms to optimize weights and biases to improve model performance. Regarding the optimization process of the LAYER-Ⅱ model layer: Environmental dynamic feature representation: The temperature change of the adsorption process that is accurately monitored is used as the environmental dynamic feature. Based on the physical and chemical principles and control experiments, the order of its influence on the adsorption process is analyzed to construct an influence order model; Adsorption condition feature construction: The adsorption process under different initial copper ion concentrations and adsorption time combinations is defined as an ordered set of adsorption condition features. Each scene has different adsorption effects due to changes in concentration and time. LAYER-Ⅱ model layer optimization: The parameters of the LAYER-Ⅰ model layer are pre-adjusted to generate a combined LAYER-Ⅰ model layer, which is applied to the first few scenes of the adsorption condition feature. The mean square error between the predicted value and the actual value is calculated and sorted to select the components with small errors, and the parameter mean is extracted to update the LAYER-Ⅰ model layer; Then the optimized LAYER-Ⅰ model layer is used to predict the adsorption capacity of the remaining adsorption condition features and compare it with the actual value to calculate the root mean square error, determination coefficient and other indicators (after optimization, when predicting high concentration and long adsorption time scenes, the mean square error is significantly reduced and the determination coefficient is greatly improved, indicating that the model is more accurate in predicting the adsorption capacity under temperature changes).
[0051] Furthermore, for model optimization and prediction under changes in multiple environmental factors, complex adsorption experiments are designed in an experimental system that can controllably simulate complex wastewater environments. By adding different concentrations of calcium ions, magnesium ions and organic matter to wastewater to simulate various water qualities, different adsorption temperatures, multiple adsorbent pretreatment methods, different adsorption times and initial copper ion concentrations are set for each water quality to conduct experiments to obtain a large amount of data, which is strictly processed for model construction. At this time, the construction and training of the LAYER-Ⅰ model layer: repeat the above LAYER-Ⅰ model layer construction and training steps, but for more environmental factors and operating parameters, more transformation methods are used for data preprocessing, the number of hidden layer nodes and the combination of activation functions are optimized when constructing the ANN model, and the algorithm parameters are adjusted and the number of iterations is increased during training to adapt to complex data characteristics and improve predictability. As for the LAYER-Ⅱ model layer, its environmental dynamic characteristics mean that water quality and temperature changes can be taken together as environmental dynamic characteristics, and their changes can be measured by precise chemical analysis methods. Based on the theory and experiments of multiple factors affecting adsorption, the order model of their comprehensive influence on the adsorption process is determined. The adsorption process including a variety of water quality, temperature, adsorbent pretreatment, initial concentration and adsorption time combinations is defined as the adsorption condition characteristic. The following points should be noted in data construction: the differences in adsorption processes due to multiple factors in different scenarios should be obvious enough, otherwise the response data can be discarded.
[0052] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0053] In the above embodiments, the hardware implementation of the technology can directly adopt existing intelligent devices, including but not limited to industrial computers, PCs, smart phones, handheld stand-alone computers, floor-standing stand-alone computers, etc. Its input device preferably adopts a screen keyboard, its data storage and calculation module adopts existing memory, calculator, controller, its internal communication module adopts existing communication ports and protocols, and its remote communication adopts existing GPRS network, World Wide Internet, etc.
[0054] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0055] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0056] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. An improved heavy metal ion adsorption capacity data prediction model, characterized in that: The model is set up to include the following submodules: data collection and organization submodule, data preprocessing submodule, model architecture determination submodule, PSO optimization submodule, and SA optimization submodule.
2. The improved heavy metal ion adsorption capacity data prediction model according to claim 1, characterized in that: In the data collection and arrangement submodule, multiple groups of modified grapefruit peel adsorption copper ion experiments are constructed and multiple groups of data are collected, including but not limited to temperature, initial pH, adsorption time, initial copper concentration, and adsorption capacity; then the temperature, initial pH, adsorption time, initial copper concentration and other related data are used as input variables and the adsorption capacity is used as the output variable to construct a database; at the same time, the data sets in the above database are strictly reviewed to eliminate abnormal or erroneous data points and the processed data are randomly divided into training sets and test sets according to proportion.
3. The improved heavy metal ion adsorption capacity data prediction model according to claim 1, characterized in that: In the data preprocessing submodule, the training set and test set data are normalized and each input variable is mapped to the selected data interval using a linear normalization method. The data process is as follows: =2× + (-1); where is the normalized value, is the original data value, and are the minimum and maximum values of the variable in the data set, respectively.
4. The improved heavy metal ion adsorption capacity data prediction model according to claim 1, characterized in that: In the model architecture determination submodule, a customized ANN model with a topological structure of 4:9:1 for input layer, hidden layer, and output layer is constructed, wherein the four nodes of the input layer correspond to temperature, initial pH, adsorption time, and initial copper ion concentration, respectively; the activation function of the nine nodes of the hidden layer is determined through multiple tests and optimizations; specifically, a new two-dimensional selection vector [S, K] is constructed, and the activation function is set to select data according to the parameters S and K of the two-dimensional selection vector [S, K], and S= , K = -3 ,in is the input data sample, is the data mean, n is the sample size, is the standard deviation; when |S|>0.5 and K>3, construct a new function: given an input value x, first calculate 1 divided by (1+ ) is recorded as x), and then compare the input value x with x) is constructed as the output result for the input x; otherwise, another function is constructed: for the input value x, if x is greater than or equal to 0, the output result is x itself, if x is less than 0, the output result is 0; the output layer 1 node output The predicted value and the activation function of the output layer adopt a linear function. In addition, the training function constructs such a function, firstly calculates the initialization parameters and the damping factor, then iteratively calculates the error vector and the Jacobian matrix to update the parameters, and adjusts the damping factor according to the error change until the termination condition is met to obtain the final parameters.
5. The improved heavy metal ion adsorption capacity data prediction model according to claim 1, characterized in that: In the PSO optimization submodule, a specific PSO algorithm is constructed to optimize the weights and biases of the ANN model. Specifically, the particle swarm size m=30 and the maximum number of iterations are set. =100, learning factor =1.8, = 1.2, for inertia weight Calculation, build a new nonlinear decreasing algorithm, specifically: = - ; where k is set to the number of contemporary iterations, =0.9, = 0.4, the particle position constraint is set to [-15, 15], and the velocity constraint is set to [-3, 3]). Further, the new algorithm for velocity and position is constructed as follows: = + - + - ; = + ;in is the velocity of the i-th particle in the k+1-th iteration in the d-th dimension, For the corresponding position, and is a random number uniformly distributed in the interval [0, 1]. is the coordinate of the individual optimal position of the ith particle in the dth dimension, is the coordinate of the global optimal position in the dth dimension.
6. The improved heavy metal ion adsorption capacity data prediction model according to claim 1, characterized in that: In the SA optimization submodule, a new SA algorithm is further constructed based on the constructed PSO-ANN model. The specific settings are as follows: the initial temperature is set to 100 degrees, the temperature attenuation coefficient is set to , and set a parameter P to decide whether to accept the new solution. For the specific setting of the parameter p, the following improved data rule is constructed: for a given system state change, calculate the energy difference between the new state and the current state. If the energy difference is less than or equal to 0, accept the new state; if the energy difference is greater than 0, accept the new state with a certain probability p, otherwise keep the current state, where P=exp(- ), is the energy difference between the new solution and the current solution, k is the Boltzmann constant, and T is the current temperature; at the same time, the temperature update formula is set to = ; is the temperature of the next iteration, T is the current temperature; in the temperature adjustment process, the acceptance rate of the current solution is For adaptive control, the specific data rules are set as follows: = (1-0.1 ); = (1+0.1 )).
7. The improved heavy metal ion adsorption capacity data prediction model according to claim 4, characterized in that: When further optimizing and improving the number of hidden layer nodes in the model architecture determination submodule, the following new data rules are specifically constructed: a parameter index C= associated with the input data is constructed. ;in, is the order selected according to the data distribution characteristics. When the data is evenly distributed =1, when there are outliers in the data =2; and based on the parameter index C and the pre-set threshold The relationship between the hidden layer nodes is dynamically adjusted. Specifically, the following data rules are constructed: When the number of hidden layer nodes is = +5, now is the ceiling function); C hour, = ,at this time is the floor function.
8. The improved heavy metal ion adsorption capacity data prediction model according to claim 5, characterized in that: Construct an improved algorithm to perform secondary optimization on the particle velocity update formula in the PSO algorithm. Specifically, a nonlinear acceleration factor is introduced. , then the speed update formula is improved to = + - + - ], which has been proven to significantly improve the acceleration capability of enhanced particles in the search process and the overall efficiency of the algorithm.
9. An improved heavy metal ion adsorption capacity data prediction model according to any one of claims 1 to 8, characterized in that: A modified grapefruit peel adsorption capacity prediction data model with a DOUBLE-LAYER architecture is further constructed, and the data model involved in claims 1-8 is marked as the LAYER-Ⅰ model layer; a LAYER-Ⅱ model layer for slightly fine-tuning the LAYER-Ⅰ model layer is constructed on the basis of the LAYER-Ⅰ model layer; the construction of the LAYER-Ⅱ model layer revolves around the dynamic characteristics of the environment and the characteristics of the adsorption conditions.
10. The improved heavy metal ion adsorption capacity data prediction model according to claim 9, characterized in that: For the two model data sets, environmental dynamic characteristics and adsorption operating condition characteristics, the former covers various dynamic changing factors in the external environment that can have a significant impact on the adsorption effect during the adsorption of heavy metal ions by modified grapefruit peel, including but not limited to fluctuations in water quality composition, changes in ambient temperature, and changes in water flow rate; the latter covers various different operating condition combination scenarios related to the adsorption of heavy metal ions by modified grapefruit peel during actual adsorption operations, including but not limited to different pretreatment methods experienced by grapefruit peel adsorbents, different parameter settings used by the adsorption device during operation, and different influent concentrations and flow rates encountered during the adsorption process.
Citation Information
Cited By
Method for preparing high-purity cobalt by deeply purifying copper and nickel ions in cobalt solution
CN120082745A
A method for preparing high-purity cobalt by deeply purifying copper and nickel ions in a cobalt solution
CN120082745B
Adsorption-extraction combined heavy metal polluted water body remediation system and method
CN120698556A