Gold plating solution gold ion concentration spectral detection method and system

CN122689692APending Publication Date: 2026-09-04SANMENXIA ZHAOYANG SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611009641.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-08
Publication Date
2026-09-04

AI Technical Summary

Technical Problem

然而在实际应用中,氰化亚金钾溶液中的氰根离子总量受物料平衡约束,金离子浓度变化会引起自由氰根离子浓度的反向变化,进而导致溶液中铜、镍等杂质金属的氰化物络合物配位数发生改变,不同配位数的杂质络合物在紫外区的吸收特征存在差异

Benefits of technology

本发明首先获取镀金液紫外可见光谱和温度数据,通过预先建立温度参数化的光谱响应模型计算温度贡献光谱,并对原始光谱进行校正,从而消除了温度波动对络合平衡的影响,获得仅反映浓度变化的校正光谱;之后,采用基于络合平衡约束的偏最小二乘回归算法对校正光谱进行分析,在载荷向量优化中引入氰根离子物料平衡约束,使提取的潜变量不仅满足统计相关性,还符合化学组成守恒规律,从而解耦了金浓度变化与杂质络合物配位数变化的干扰,同时输出络合一致性指标。随后,通过计算校正光谱与重构光谱的光谱残差,并从基态光谱库获取与预测值对应的理论光谱计算偏差光谱及基态偏离指标,实现了对光谱异常、基质偏离的多维度评估。最后,综合络合一致性指标、光谱残差和基态偏离指标进行置信度判断后输出预测值,从而有效解决了传统偏最小二乘回归模型因无法区分金浓度与杂质光谱贡献而导致的预测误差增大问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122689692A_ABST
    Figure CN122689692A_ABST
Patent Text Reader

Abstract

The application discloses a gold plating solution gold ion concentration spectral detection method and system, and belongs to the technical field of analysis and detection. The method comprises the following steps: in order to solve the problem that the traditional partial least squares regression cannot decouple the change of gold concentration and impurity coordination number, resulting in a large prediction error, the method comprises the following steps: obtaining the ultraviolet-visible spectrum and temperature of the gold plating solution, correcting the corrected spectrum through a temperature parameterized spectrum response model; adopting a partial least squares regression algorithm based on complexation equilibrium constraint analysis to obtain a gold ion concentration prediction value and a complexation consistency index; calculating a spectral residual; obtaining a theoretical spectrum from a ground state spectrum library by the prediction value, and calculating a deviation spectrum and a ground state deviation index; and outputting the prediction value or giving a warning by comprehensively considering the three indexes. The application realizes online continuous and accurate detection of the gold ion concentration of the gold plating solution by introducing a cyanide ion material balance constraint and dynamically updating the ground state spectrum library.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of analytical testing technology, specifically relating to a method and system for spectroscopic detection of gold ion concentration in gold plating solution. Background Technology

[0002] Monitoring the concentration of gold ions in gold plating solutions mainly relies on chemical titration. Chemical titration involves titrating gold ions in a sample with a standard sodium thiosulfate solution and calculating the gold content based on the amount consumed in the titration. This method is simple to operate and low in cost, but it requires manual operation to complete sample pretreatment, titration process and endpoint determination. A single test takes about 20 to 30 minutes, which cannot meet the needs of online continuous monitoring of gold plating solutions.

[0003] To achieve rapid and non-destructive testing, some studies have proposed a method combining UV-Vis spectroscopy with partial least squares regression (PLR) to establish a calibration model. This method utilizes the characteristic absorption peaks of potassium gold cyanide complexes in the UV region. By acquiring full-spectral data in the 200-400 nm wavelength range, PLR is applied to extract latent variables related to gold concentration in the spectrum, establishing a quantitative calibration relationship between spectral characteristics and gold concentration. This method achieves non-contact measurement, is fast, and does not consume samples, making it suitable for online monitoring applications. However, in practical applications, the total amount of cyanide ions in the potassium gold cyanide solution is constrained by material balance. Changes in gold ion concentration cause inverse changes in the concentration of free cyanide ions, which in turn alters the coordination number of cyanide complexes of impurity metals such as copper and nickel in the solution. Impurity complexes with different coordination numbers exhibit different absorption characteristics in the UV region. Traditional PLR models, during training, treat changes in gold concentration and spectral changes of impurity complexes as a statistical correlation. When the impurity composition in the test sample differs from that in the training sample, the model cannot correctly decouple the contribution of gold concentration changes and impurity interference, leading to increased prediction errors. Summary of the Invention

[0004] To address the aforementioned problems, this invention provides a method and system for spectral detection of gold ion concentration in gold plating solution, thereby resolving the issues present in the background art.

[0005] To achieve the aforementioned objective, this invention proposes a method for spectroscopic detection of gold ion concentration in gold plating solution, comprising: Obtain the ultraviolet-visible spectral data and current temperature data of the gold plating solution, input the current temperature data into the pre-established temperature parameterized spectral response model, and calculate the temperature contribution spectrum corresponding to the current temperature data; The UV-Vis spectral data were corrected based on the temperature contribution spectrum to obtain the corrected spectrum. The partial least squares regression algorithm based on complexation equilibrium constraint was used to analyze the corrected spectrum to obtain the predicted value of gold ion concentration and complexation consistency index. The theoretical spectrum is obtained from a pre-established ground-state spectral library based on the predicted gold ion concentration, and the difference between the corrected spectrum and the theoretical spectrum at each wavelength is calculated to obtain the deviation spectrum. The reconstructed spectrum is obtained by reconstructing the latent variable scores and corresponding loading vectors in the partial least squares regression algorithm. The spectral residual is calculated based on the corrected spectrum and the reconstructed spectrum. The predicted value of gold ion concentration is output based on the complexation consistency index, spectral residual and ground state deviation index. The ground state deviation index is the ratio of the norm of the current deviation spectrum to the norm of the deviation spectrum recorded in the most recent ground state spectrum library.

[0006] The present invention also provides a gold ion concentration spectral detection system for gold plating solution, which is used to implement the above method. The system includes: The temperature correction module acquires the ultraviolet-visible spectral data and current temperature data of the gold plating solution, inputs the current temperature data into a pre-established temperature parameterized spectral response model, and calculates the temperature contribution spectrum corresponding to the current temperature data. The complexation prediction module corrects the UV-Vis spectral data based on the temperature contribution spectrum, obtains the corrected spectrum, and uses a partial least squares regression algorithm based on complexation equilibrium constraints to analyze the corrected spectrum and obtain the predicted gold ion concentration and complexation consistency index. The residual analysis module obtains the theoretical spectrum from the pre-established ground-state spectral library based on the predicted gold ion concentration, and calculates the difference between the corrected spectrum and the theoretical spectrum at each wavelength point to obtain the deviation spectrum. The results output module reconstructs the spectrum based on the latent variable scores and corresponding loading vectors in the partial least squares regression algorithm, calculates the spectral residuals based on the corrected spectrum and the reconstructed spectrum, and outputs the predicted gold ion concentration based on the complexation consistency index, spectral residuals and ground state deviation index. The ground state deviation index is the ratio of the norm of the current deviation spectrum to the norm of the deviation spectrum recorded in the most recent ground state spectrum library.

[0007] The beneficial effects of this invention are as follows: This invention first acquires the UV-Vis spectrum and temperature data of the gold plating solution. A temperature-parameterized spectral response model is pre-established to calculate the temperature contribution spectrum, and the original spectrum is corrected to eliminate the influence of temperature fluctuations on the complexation equilibrium, obtaining a corrected spectrum that reflects only concentration changes. Then, a partial least squares regression algorithm based on complexation equilibrium constraints is used to analyze the corrected spectrum. A cyanide ion material balance constraint is introduced in the load vector optimization, ensuring that the extracted latent variables not only satisfy statistical correlation but also conform to the law of chemical composition conservation. This decouples the interference between changes in gold concentration and changes in the coordination number of impurity complexes, while simultaneously outputting a complexation consistency index. Subsequently, the spectral residuals between the corrected and reconstructed spectra are calculated, and the theoretical spectral calculation deviation spectrum and ground-state deviation index corresponding to the predicted value are obtained from the ground-state spectral library, enabling a multi-dimensional assessment of spectral anomalies and matrix deviations. Finally, the predicted value is output after a confidence judgment based on the comprehensive complexation consistency index, spectral residuals, and ground-state deviation index. This effectively solves the problem of increased prediction error caused by the inability of traditional partial least squares regression models to distinguish between gold concentration and impurity spectral contributions. Attached Figure Description

[0008] Figure 1 This is a flowchart of the steps of a method for detecting gold ion concentration in a gold plating solution according to the present invention. Figure 2 This is a logic diagram of the partial least squares regression algorithm of this invention; Figure 3 This is a schematic diagram of the structure of a gold ion concentration spectral detection system for gold plating solution according to the present invention. Detailed Implementation

[0009] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0010] like Figure 1 As shown, a method for spectroscopic detection of gold ion concentration in gold plating solution includes: S1: Obtain the UV-Vis spectral data and current temperature data of the gold plating solution, input the current temperature data into the pre-established temperature parameterized spectral response model, and calculate the temperature contribution spectrum corresponding to the current temperature data.

[0011] Specifically, the absorbance of the gold plating solution in the 200-400 nm wavelength range was measured using a UV-Vis spectrometer to obtain the spectral vector. The temperature of the gold plating solution was measured using a temperature sensor and recorded as the current temperature data. Temperature affects the chemical equilibrium state of the complex; increased temperature leads to changes in the stability constant of the complex, thereby altering its form and absorption spectral characteristics. Therefore, temperature recording is necessary for subsequent correction.

[0012] In this embodiment, calculating the temperature contribution spectrum corresponding to the current temperature data includes: The ultraviolet-visible spectra of the gold plating solution were collected at multiple temperatures. The spectral differences between adjacent temperatures were calculated. The temperature gradient matrix was obtained based on the spectral differences. Principal component analysis was performed on the temperature gradient matrix, and a preset number of principal components were extracted as temperature basis vectors.

[0013] This step employs a spectral response model for temperature correction. During the calibration phase, the spectral response model establishes a mapping relationship between temperature and spectral changes. During the detection phase, it calculates the theoretical contribution of temperature to the spectrum based on the measured temperature and subtracts it from the measured spectrum, thereby obtaining a corrected spectrum that reflects only changes in gold concentration.

[0014] During calibration, samples of gold plating solution with the same composition were collected, and ultraviolet-visible spectra were acquired at multiple temperature points (40, 45, 50, 55, 60, and 65 degrees Celsius). The spectral differences between adjacent temperature points were calculated to obtain spectral difference vectors, and a temperature gradient matrix was constructed based on these vectors. Principal component analysis (PCA) was performed on the temperature gradient matrix, extracting a predetermined number of principal components as temperature basis vectors. Each temperature basis vector represents a representative pattern of spectral variation with temperature. In this embodiment, PCA was used for principal component analysis; the specific analysis process is existing technology and will not be described here.

[0015] Then calculate the spectrum at the i-th temperature point. The j-th temperature basis vector The projection coefficients are calculated based on the following formula: ,in, For temperature Spectral vector below The j-th temperature basis vector Projection coefficients on Let j be the j-th temperature basis vector. Repeat the above calculation for all temperature points to obtain the projection coefficient sequence of the j-th temperature basis vector.

[0016] Perform van der Hoff fit on the projection coefficient sequence of the j-th temperature basis vector. The van der Hoff equation is of the form: Where T is the absolute temperature and R is the gas constant, with a value of 8.314 J / (mol·K). To determine the effective activation enthalpy, A and B are fitting constants. The fitting process requires determining parameters A and B. To determine the value of B, the temperature is first converted from Celsius to Kelvin. The temperature sequence and its corresponding projection coefficient sequence are then obtained. A nonlinear least squares method is used for fitting, defining the objective function as the sum of squared residuals between the measured projection coefficients and the fitted values. The Levenberg-Marquardt algorithm is used to find the parameter combination that minimizes the objective function. After fitting, the parameters corresponding to the j-th temperature basis vector are obtained. , and Repeat the above fitting process for all K temperature basis vectors to obtain K sets of parameters.

[0017] During real-time detection, the current temperature is substituted into the spectral response model of different temperature basis vectors to obtain the temperature contribution. The temperature contribution spectrum is obtained by multiplying each current temperature basis vector with its corresponding temperature contribution.

[0018] During the actual testing phase, the current temperature of the gold plating solution is obtained and converted to Kelvin temperature. The Kelvin temperature is then substituted into the van der Hoff equation corresponding to the j-th temperature basis vector extracted in the calibration phase to calculate the temperature contribution of the j-th temperature basis vector at the current temperature. The K temperature basis vectors are then multiplied by their corresponding temperature contributions and summed to obtain the temperature contribution spectrum at the current temperature.

[0019] Through the above steps, the exponential form of the van der Hoff equation conforms to the temperature dependence of the chemical equilibrium constant, accurately describing the nonlinear changes in the spectral response across different temperature ranges. The temperature basis vector extracted by principal component analysis represents the differences in temperature response among different components, allowing the correction process to incorporate the varying temperature sensitivities of multiple components, such as gold complexes, impurity complexes, and organic additives.

[0020] S2: Correct the UV-Vis spectral data based on temperature contribution spectrum to obtain the corrected spectrum. Use the partial least squares regression algorithm based on complexation equilibrium constraint to analyze the corrected spectrum and obtain the predicted gold ion concentration and complexation consistency index.

[0021] The corrected spectrum is obtained by subtracting the temperature contribution spectrum from the UV-Vis spectral data. The corrected spectrum eliminates the influence of temperature changes on the complexation equilibrium, retaining only the spectral characteristics caused by changes in gold concentration and other component concentrations.

[0022] In this embodiment, a partial least squares regression algorithm based on complexation equilibrium constraints is used to analyze the corrected spectrum, including: During the training iteration of the partial least squares regression algorithm, the corrected spectrum of the training sample is projected onto the current load vector to obtain the current latent variable score, and the initial gold ion concentration prediction value is calculated based on the current latent variable score.

[0023] In the gold plating solution system, the total amount of cyanide ions is constrained by material balance. Gold ions exist in the form of complexes. When the gold ion concentration decreases, the cyanide ions released from the decomposition of the gold complexes enter a free state. An increase in the concentration of free cyanide ions drives the transformation of impurity complexes to a higher coordination number form. Impurity complexes with different coordination numbers exhibit differences in the position and intensity of their absorption peaks in the ultraviolet region; an increase in coordination number causes the absorption peak to shift towards longer wavelengths. Traditional partial least squares regression (PLR) fits changes in gold concentration and impurity spectra as synchronous phenomena during training. When the impurity composition in the test sample deviates from that in the training sample, the model cannot correctly separate the contributions of gold concentration changes and impurity interference, leading to prediction errors. Therefore, this step modifies the load vector optimization process of the PLS algorithm by introducing a cyanide ion material balance constraint.

[0024] During the training phase of the partial least squares regression algorithm, a standard gold plating solution sample is prepared, and its corrected spectrum and known gold ion concentration vector are obtained. In each iteration, the current load vector is solved based on the residual spectral matrix and residual concentration vector calculated in the current iteration. The residual corrected spectrum of the training sample is projected onto the current load vector to obtain the current latent variable score. Based on the current latent variable score and the current regression coefficient, the initial predicted gold ion concentration value of the current training sample is calculated.

[0025] The theoretical average coordination number is calculated based on the preset cyanide ion material balance relationship and the initial predicted gold ion concentration. The actual average coordination number is obtained based on the spectral shape parameters of the characteristic region of the impurity complex in the calibration spectrum of the training sample. The predicted difference between the theoretical average coordination number and the actual average coordination number is calculated. A penalty term is constructed based on the predicted difference and the preset penalty weight.

[0026] In this embodiment, the actual average coordination number is obtained based on the spectral shape parameters of the characteristic regions of impurity complexes in the calibration spectra of the training samples, including: The characteristic regions of impurity complexes in the calibration spectrum are extracted, and the absorption peak position, half-peak width, and peak intensity ratio are used as spectral shape parameters of the characteristic regions of impurity complexes. The actual average coordination number corresponding to the spectral shape parameters is determined based on a pre-established spectral shape lookup table.

[0027] Specifically, before training the partial least squares regression algorithm, a coordination number spectral shape lookup table is pre-established in the laboratory. Taking copper, a common impurity metal in gold plating solutions, as an example, various copper cyanide solutions are prepared. The amount of free potassium cyanide added in each solution is controlled to make the concentration of free cyanide ions exhibit a gradient distribution in different solutions. For example, solutions with free cyanide ion concentrations of 0.02 mol / L, 0.05 mol / L, 0.1 mol / L, 0.2 mol / L, and 0.5 mol / L are prepared, while the total concentration of copper in each solution remains constant.

[0028] For each solution, the concentration distribution of each coordination number form was calculated based on the equilibrium constant of the stepwise complexation reaction between copper and cyanide ions. The complexes formed by copper and cyanide ions include forms with coordination numbers of 2, 3, and 4, with corresponding cumulative stability constants of [missing values]. , , The average coordination number was calculated based on the concentration of free cyanide ions and the cumulative stability constant. Simultaneously, the absorbance spectra of each solution in the 200-400 nm wavelength range were measured using a UV-Vis spectrometer.

[0029] The spectral shape parameters of the 250-300 nm wavelength range, which represents the characteristic region of impurities, are extracted from the spectra of each solution. These extracted spectral shape parameters include the absorption peak position (determined by finding the local maximum absorbance point within this band), the half-width at half-maximum (calculated as the difference between two wavelength points corresponding to half the absorbance of the peak), and the peak intensity ratio (if a main peak and a secondary peak exist, the ratio of the absorbance of the main peak to the secondary peak is calculated; if there is a single absorption peak, it is set to 1). A mapping relationship is established between each solution with a known average coordination number and its corresponding spectral shape parameters, thereby obtaining a coordination number spectral shape lookup table.

[0030] In this embodiment, the theoretical average coordination number is calculated based on the preset cyanide ion material balance relationship and the initial predicted gold ion concentration, including: Based on the total concentration of cyanide ions, the predicted initial concentration of gold ions, the total concentration of impurity metals, and the cumulative stability constant, the cyanide ion material balance relationship is solved to obtain the concentration of free cyanide ions and the concentration of impurity metal complexes of each coordination number. The theoretical average coordination number is obtained by taking a weighted average of all coordination numbers based on the concentration of impurity metal complexes of each coordination number.

[0031] Specifically, based on the initial predicted gold ion concentration, the free cyanide ion concentration is calculated using the cyanide ion material balance relationship. The material balance relationship is as follows: ,in, This represents the total concentration of cyanide ions. This represents the initial predicted gold ion concentration. Let be the coordination number of the m-th impurity metal complex. Let m be the concentration of the m-th impurity metal complex. This represents the concentration of free cyanide ions. The total cyanide ion concentration is a known parameter in the gold plating solution formulation; the concentration and coordination number of impurity metal complexes need to be determined through chemical equilibrium calculations.

[0032] For example, regarding copper impurities, the total concentration of copper is known. The stepwise complexation reaction of copper with cyanide ions exhibits a stability constant. Complexes with a coordination number of 2... The stability constant is Complexes with a coordination number of 3 The stability constant is Complexes with a coordination number of 4 The stability constant is The concentrations of each coordination number species were calculated based on the free cyanide ion concentration and the cumulative stability constant, including the concentration of the complex with coordination number n. Calculated based on the following formula: ,in, The total concentration of copper, Let be the cumulative stability constant of the copper cyanide complex with coordination number n. Let n be the concentration of free cyanide ions with coordination number n. The theoretical average coordination number is then calculated using the following formula. , The theoretical average coordination number represents the impurity coordination number calculated based on the current predicted gold concentration and cyanide ion material balance.

[0033] The difference between the theoretical average coordination number and the actual average coordination number is calculated and defined as the prediction difference. The prediction difference represents the degree of chemical inconsistency between the predicted gold concentration corresponding to the current loading vector and the changes in the impurity region in the spectrum.

[0034] The penalty term is added to the objective function of partial least squares regression to obtain the modified objective function. The load vector that maximizes the modified objective function is then obtained by using the gradient ascent method, which is taken as the optimal load vector.

[0035] A penalty term is introduced into the objective function of partial least squares regression, denoted as . Calculated based on the following formula: ,in The penalty weighting coefficient indicates the severity to which the current predicted value violates the cyanide ion material balance constraint. A larger penalty value indicates a more severe violation of the constraint. To predict the difference, a penalty term is added to the original objective function of the partial least squares regression. The modified objective function is as follows: Where w is the load vector and C is the covariance matrix. The optimal load vector, which maximizes the modified objective function, is obtained by solving the gradient ascent method, thus satisfying the cyanide ion material balance constraint.

[0036] In the actual prediction process, the corrected spectrum is projected onto the optimal loading vector to obtain the latent variable score, the predicted value of gold ion concentration is calculated based on the latent variable score, and the complexation consistency index is calculated based on the theoretical average coordination number and the actual average coordination number.

[0037] After model training is completed, the optimal loading vector matrix, reconstructed loading matrix, and regression coefficient vector corresponding to each latent variable are saved. In the actual prediction stage, the corrected spectrum of the gold plating solution to be tested is obtained and projected onto each optimal loading vector to obtain the latent variable score. The score is multiplied by the corresponding regression coefficient and summed to obtain the final predicted value of gold ion concentration.

[0038] The final theoretical average coordination number is determined based on the predicted gold ion concentration. The difference between the final theoretical average coordination number and the actual average coordination number is calculated. Then, the complexation consistency index is calculated based on the following formula. : ,in, This is the preset maximum allowable coordination number difference, for example, 0.5. The closer the complexation consistency index is to 1, the more chemically consistent the predicted gold concentration is with the changes in the impurity region in the spectrum.

[0039] This method introduces cyanide ion material balance constraints into partial least squares regression, ensuring that the latent variables extracted by the algorithm not only maximize statistical correlation but also satisfy the law of chemical composition conservation. When the impurity composition in the test sample deviates from that in the training sample, the constraint term guides the algorithm to adjust the predicted values, ensuring that the predicted gold concentration and impurity spectral changes conform to the chemical logic of cyanide ion distribution. The complexation consistency index provides a basis for judging the chemical rationality of subsequent confidence assessments.

[0040] S3: Obtain the theoretical spectrum from the pre-established ground-state spectral library based on the predicted gold ion concentration, and calculate the difference between the corrected spectrum and the theoretical spectrum at each wavelength point to obtain the deviation spectrum.

[0041] The spectral library stores the theoretical spectra of this production system at different gold ion concentrations. The initial ground-state spectral library was established using freshly prepared plating solutions. Standard plating solutions with gold ion concentrations of 4 g / L, 6 g / L, 8 g / L, 10 g / L, and 12 g / L were prepared, and the UV-Vis spectral data at each concentration point were measured under standard temperature conditions. The measured UV-Vis spectral data were stored as the initial ground-state spectral library. Each concentration point in the ground-state spectral library corresponds to a theoretical spectral curve.

[0042] In the actual detection process, the current measured calibration spectrum and the predicted gold ion concentration are obtained. Since the predicted gold ion concentration is a continuous variable, while the ground-state spectral library stores theoretical spectra at discrete concentration points, it is necessary to find the theoretical spectra corresponding to the two adjacent concentration points in the ground-state spectral library based on the predicted gold ion concentration. Linear interpolation is then performed on the two theoretical spectra to calculate the theoretical spectrum that precisely corresponds to the current predicted concentration. Subsequently, the difference between the calibration spectrum and the theoretical spectrum at each wavelength is calculated to obtain the deviation spectrum of the current measurement. The deviation spectrum reflects the deviation of the current state of the plating solution from the theoretical state in the ground-state spectral library. This deviation mainly originates from the accumulation of degradation products and impurity metals.

[0043] If the ground-state spectral library remains unchanged from its initial state, the deviation spectrum calculated during continuous detection will contain two components from completely different sources: one is a reversible spectral deviation caused by fluctuations in the plating solution temperature and instantaneous changes in component ratios; the other is an irreversible background drift caused by the accumulation of additive degradation products and impurity metals. These two components superimpose in the deviation spectrum, making it impossible for subsequent ground-state deviation assessments, prediction confidence judgments, and complexation equilibrium consistency analyses based on the deviation spectrum to correctly distinguish between instantaneous state changes and long-term aging trends of the plating solution, thus affecting the reliability of the detection results.

[0044] During continuous online monitoring of gold plating solutions, even with replenishment according to the same formula, the content of impurity metals and the concentration of free cyanide ions in the plating solution dynamically change due to factors such as workpiece carry-over, slight fluctuations in the replenished solution, temperature fluctuations in the production environment, and the passage of plating time. These differences alter the coordination state of impurity complexes, thus affecting the interference characteristics of the ultraviolet-visible spectrum. Simultaneously, the varying degradation rates of organic components during continuous use lead to unpredictable shifts in the spectral background. When the impurity composition of the plating solution deviates from the initial calibration sample after a period of continuous operation, significant deviations occur in the detection results, resulting in inaccurate concentration control. Therefore, this application proposes the following solution.

[0045] The deviation spectra obtained from multiple consecutive online time points are constructed into a deviation spectrum matrix according to the measurement order. The deviation spectrum matrix is ​​then decomposed into a non-negative matrix to obtain the basis vector matrix and the coefficient matrix. During the iterative process of non-negative matrix decomposition, after each update of the coefficient matrix, a monotonically non-decreasing constraint is applied to the coefficient matrix. The iterative update of the coefficient matrix and the application of the monotonically non-decreasing constraint are alternately performed until the preset convergence condition is reached.

[0046] The deviation spectra obtained from multiple consecutive measurements are arranged in chronological order to form a deviation spectral matrix. The element in the i-th row and j-th column of the matrix represents the deviation absorbance at the i-th wavelength point during the j-th measurement. Non-negative matrix decomposition is then performed on the deviation spectral matrix. This decomposition results in the product of two matrices, yielding a basis vector matrix and a coefficient matrix. The number of rows in the basis vector matrix equals the number of wavelength points, and the number of columns equals the preset number of basis vectors. The k-th column of the basis vector matrix represents the spectral characteristics of the k-th interference source. The number of rows in the coefficient matrix H equals the number of basis vectors K, and the number of columns equals the cumulative number of online measurements. The k-th row of the coefficient matrix represents the change in the intensity of the k-th interference source over time.

[0047] The iterative update process of nonnegative matrix factorization adopts a multiplicative update rule, and the specific update method is existing technology and will not be described here. Since the accumulation of degradation products and impurity metals in the plating bath is irreversible, the intensity coefficients of each interference source monotonically increase with time. After each update of the coefficient matrix H, the k-th row of H is checked. If the value of the next element in the element sequence is less than the value of the previous element, the value of the next element is corrected to the value of the previous element.

[0048] Repeat the above correction process for all rows of the coefficient matrix to complete the application of monotonicity constraints. The iterative update of nonnegative matrix decomposition and the application of monotonicity constraints are performed alternately until the changes in the basis vector matrix and the coefficient matrix are less than the preset convergence threshold.

[0049] After nonnegative matrix factorization, each column of the basis vector matrix corresponds to a different type of interference source. The first basis vector may correspond to the spectral characteristics of a certain impurity metal complex, the second basis vector may correspond to the spectral characteristics of organic additive residues or degradation products, and the third basis vector may correspond to the spectral characteristics of another impurity component. Each row of the coefficient matrix reflects the intensity change of the corresponding interference source at different online measurement times. By applying a monotonically non-decreasing constraint, it is ensured that the coefficient matrix captures the cumulative trend or concentration drift law of each interference source as the electroplating operation time progresses.

[0050] Extract the basis vector matrix after iteration and the column vectors in the coefficient matrix corresponding to the current time. Calculate the product of the basis vector matrix and the column vectors to obtain the cumulative interference spectrum. Superimpose the cumulative interference spectrum onto the theoretical spectrum of each concentration point in the ground state spectral library to obtain the updated ground state spectral library.

[0051] Calculate the product of the basis vector matrix and the coefficient matrix at the current accumulation stage to obtain the cumulative interference spectrum at the current time. Superimpose the cumulative interference spectrum onto the theoretical spectra of each concentration point in the ground-state spectral library to obtain the updated ground-state spectral library.

[0052] Specifically, after each preset number of online measurements, the reconstruction error of the deviation spectral matrix is ​​calculated. When the reconstruction error exceeds a preset threshold, it indicates that a new type of interference has appeared in the deviation spectral matrix that cannot be explained by the existing basis vectors. This may be due to abnormal replenishment fluid or changes in workpiece material introducing new impurity types, or adjustments to production process parameters leading to new interfering components. In this case, the number of basis vectors K is increased, and non-negative matrix decomposition is performed again. For example, the number of basis vectors is increased from 3 to 4, and the deviation spectral matrix is ​​re-decomposed to obtain a new basis vector matrix and coefficient matrix containing K+1 basis vectors. After each preset number of online measurements, the ground-state spectral library is updated. If the second preset number of measurements is greater than the first preset number of measurements, the above update operation is repeated for all concentration points in the ground-state spectral library to complete the overall update of the ground-state spectral library. The updated ground-state spectral library reflects the typical interference characteristics of the production system at the current stage, and subsequent online measurements will be based on the updated ground-state spectral library to calculate theoretical and deviation spectra.

[0053] After updating the ground-state spectral library, the change in the library is calculated as the difference between the theoretical spectra at each concentration point before and after the update. This change is projected onto the loading space of the partial least squares regression algorithm to calculate the shift in the scores of each latent variable. In subsequent predictions, the systematic shift is subtracted from the latent variable scores to adapt the partial least squares regression algorithm to the updated ground-state spectral library. This correction process avoids the frequent re-preparation of standard samples and retraining of the model, reducing detection costs.

[0054] Specifically, after the ground-state spectral library is updated, the bias spectral matrix is ​​cleared, and the current moment is taken as the new accumulation starting point.

[0055] S4: Based on the latent variable scores and corresponding loading vectors in the partial least squares regression algorithm, the reconstructed spectrum is obtained. The spectral residual is calculated based on the corrected spectrum and the reconstructed spectrum. The predicted value of gold ion concentration is output based on the complexation consistency index, spectral residual and ground state deviation index. The ground state deviation index is the ratio of the norm of the current deviation spectrum to the norm of the deviation spectrum recorded in the most recent ground state spectrum library.

[0056] In this embodiment, the predicted gold ion concentration is output based on the complexation consistency index, spectral residual, and ground state deviation index, including: When the spectral residual is less than the first threshold, the complexation consistency index is greater than the second threshold, and the ground state deviation index is less than the third threshold, the predicted gold ion concentration is output. When the spectral residual is greater than the fourth threshold, or the complexation consistency index is less than the fifth threshold, an abnormal detection warning is output and no predicted gold ion concentration is output.

[0057] The corrected spectrum is projected onto the latent variable space of the partial least squares regression algorithm to obtain the score of each latent variable. Then, the reconstructed spectrum is generated using the loading vectors corresponding to each latent variable. The difference between the corrected spectrum and the reconstructed spectrum is calculated and denoted as the spectral residual. The spectral residual represents the portion of the corrected spectrum that cannot be explained by the model's latent variable space. A smaller spectral residual value indicates that the spectral features are within the model's training range, while a larger value indicates that the spectrum contains anomalous components not learned by the partial least squares regression algorithm, which may be due to unknown impurities or sensor anomalies.

[0058] Next, the measured deviation spectrum is obtained, and its norm is calculated. The norm of the reference deviation spectrum, recorded during the most recent update of the ground-state spectral library, is obtained, and the ratio of the current deviation spectrum's norm to the reference deviation spectrum's norm is calculated, denoted as the ground-state deviation index. The ground-state deviation index represents the degree of deviation of the current plating solution state from the typical state represented by the ground-state spectral library. A value close to 1 indicates that the matrix characteristics of the current plating solution state match the ground-state spectral library well, and the current ground-state spectral library is still applicable. A value much greater than 1 indicates that the interference characteristics of the current plating solution significantly deviate from the ground state, possibly due to abnormal replenishment, production process adjustments, or long-term aging; the current ground-state spectral library may no longer be applicable.

[0059] Set a first threshold, a second threshold, and a third threshold. The first threshold is the upper limit of the spectral residual, the second threshold is the lower limit of the complexation consistency index, and the third threshold is the upper limit of the ground state deviation index. When the spectral residual is less than the first threshold, the complexation consistency index is greater than the second threshold, and the ground state deviation index is less than the third threshold, output the predicted gold ion concentration.

[0060] Stricter anomaly detection thresholds are set, namely the fourth and fifth thresholds. The fourth threshold is greater than the first threshold, and the fifth threshold is less than the second threshold. When the spectral residual is greater than the fourth threshold or the complexation consistency index is less than the fifth threshold, a detection anomaly warning is output, and the predicted gold ion concentration value is not output. The warning message includes: "Detection results are unreliable; please check the sample preparation process, sensor status, or send the sample to the laboratory for analysis." If the spectral residual is greater than the first threshold but less than the fourth threshold, it is marked as containing abnormal components in the spectrum, and laboratory retesting is recommended. If the complexation consistency index is less than the second threshold but greater than the fifth threshold, it is marked as having low chemical consistency, possibly indicating the presence of unconventional impurities.

[0061] Reference Figure 2The diagram shows a comparison between the detection results of the partial least squares regression algorithm of this invention and the traditional detection results. To verify the effectiveness of the method of this invention, multiple test samples with gold ion concentrations ranging from 4 g / L to 12 g / L were prepared, and interference from impurity coordination number changes caused by fluctuations in free cyanide ion concentration was artificially introduced. It can be seen that the traditional partial least squares regression algorithm, due to its inability to decouple the interference between changes in gold concentration and changes in the spectrum of impurity complexes, produces prediction values ​​that deviate significantly from the ideal curve, resulting in large nonlinear prediction errors. In contrast, the algorithm of this invention, by introducing cyanide ion material balance constraints in the load vector optimization, produces prediction points that closely follow the ideal prediction curve.

[0062] like Figure 3 As shown, the present invention also provides a gold ion concentration spectral detection system for gold plating solution, which is used to implement the above-mentioned method. The system includes: The temperature correction module acquires the ultraviolet-visible spectral data of the gold plating solution and the current temperature data. It inputs the current temperature data into a pre-established temperature-parameterized spectral response model and calculates the temperature contribution spectrum corresponding to the current temperature data.

[0063] The complexation prediction module corrects the UV-Vis spectral data based on the temperature contribution spectrum to obtain the corrected spectrum. It then uses a partial least squares regression algorithm based on complexation equilibrium constraints to analyze the corrected spectrum and obtain the predicted gold ion concentration and complexation consistency index.

[0064] The residual analysis module obtains the theoretical spectrum from a pre-established ground-state spectral library based on the predicted gold ion concentration, and calculates the difference between the corrected spectrum and the theoretical spectrum at each wavelength point to obtain the deviation spectrum.

[0065] The results output module reconstructs the spectrum based on the latent variable scores and corresponding loading vectors in the partial least squares regression algorithm, calculates the spectral residuals based on the corrected spectrum and the reconstructed spectrum, and outputs the predicted gold ion concentration based on the complexation consistency index, spectral residuals and ground state deviation index. The ground state deviation index is the ratio of the norm of the current deviation spectrum to the norm of the deviation spectrum recorded in the most recent ground state spectrum library.

[0066] It should be noted that the algorithm parameters involved in this invention, such as the number of principal components extracted by principal component analysis, the fitting parameters of the van der Hoff equation, and the number of latent variables in partial least squares regression, can be determined by those skilled in the art through a limited number of experiments based on the actual gold plating solution formulation system, detection accuracy requirements, and sensor characteristics. Preprocessing methods for spectral data, such as smoothing and normalization, can be implemented using conventional methods in the field and will not be elaborated here. Furthermore, in engineering implementation, those skilled in the art will avoid division by zero by setting minimum truncation and other conventional methods. For the sake of simplified formula presentation, this specification will not specifically describe such conventional processing. The above parameter selection and numerical processing fall within the scope of conventional technical capabilities in the field and do not affect the implementation and effectiveness of the technical solution of this invention, nor do they constitute a limitation on the scope of protection of this invention.

Claims

1. A method for spectroscopic detection of gold ion concentration in gold plating solution, characterized in that, include: Obtain the ultraviolet-visible spectral data and current temperature data of the gold plating solution, input the current temperature data into the pre-established temperature parameterized spectral response model, and calculate the temperature contribution spectrum corresponding to the current temperature data; The UV-Vis spectral data were corrected based on the temperature contribution spectrum to obtain the corrected spectrum. The partial least squares regression algorithm based on complexation equilibrium constraint was used to analyze the corrected spectrum to obtain the predicted value of gold ion concentration and complexation consistency index. The theoretical spectrum is obtained from a pre-established ground-state spectral library based on the predicted gold ion concentration, and the difference between the corrected spectrum and the theoretical spectrum at each wavelength is calculated to obtain the deviation spectrum. The reconstructed spectrum is obtained by reconstructing the latent variable scores and corresponding loading vectors in the partial least squares regression algorithm. The spectral residual is calculated based on the corrected spectrum and the reconstructed spectrum. The predicted value of gold ion concentration is output based on the complexation consistency index, spectral residual and ground state deviation index. The ground state deviation index is the ratio of the norm of the current deviation spectrum to the norm of the deviation spectrum recorded in the most recent ground state spectrum library.

2. The method according to claim 1, characterized in that, Calculate the temperature contribution spectrum corresponding to the current temperature data, including: The ultraviolet-visible spectra of the gold plating solution were collected at multiple temperatures. The spectral differences between adjacent temperatures were calculated. The temperature gradient matrix was obtained based on the spectral differences. Principal component analysis was performed on the temperature gradient matrix, and a preset number of principal components were extracted as temperature basis vectors. For each temperature basis vector, a van der Hoff model is fitted to obtain the effective activation enthalpy parameter and fitting constant. The effective activation enthalpy parameter and fitting constant are then substituted into the van der Hoff model to determine the spectral response model of each temperature basis vector. During real-time detection, the current temperature is substituted into the spectral response model of different temperature basis vectors to obtain the temperature contribution. Each temperature basis vector is multiplied by its corresponding temperature contribution and summed to obtain the temperature contribution spectrum.

3. The method according to claim 1, characterized in that, The corrected spectrum was analyzed using a partial least squares regression algorithm based on complexation equilibrium constraints, including: During the training iteration of the partial least squares regression algorithm, the corrected spectrum of the training sample is projected onto the current load vector to obtain the current latent variable score, and the initial gold ion concentration prediction value is calculated based on the current latent variable score. The theoretical average coordination number is calculated based on the preset cyanide ion material balance relationship and the initial gold ion concentration prediction. The actual average coordination number is obtained based on the spectral shape parameters of the characteristic region of the impurity complex in the calibration spectrum of the training sample. The predicted difference between the theoretical average coordination number and the actual average coordination number is calculated. A penalty term is constructed based on the predicted difference and the preset penalty weight. The penalty term is added to the objective function of partial least squares regression to obtain the modified objective function. The load vector that maximizes the modified objective function is then obtained by using the gradient ascent method as the optimal load vector. In the actual prediction process, the corrected spectrum is projected onto the optimal loading vector to obtain the latent variable score, the predicted value of gold ion concentration is calculated based on the latent variable score, and the complexation consistency index is calculated based on the theoretical average coordination number and the actual average coordination number.

4. The method according to claim 3, characterized in that, The actual average coordination number is obtained based on the spectral shape parameters of the characteristic regions of impurity complexes in the corrected spectra of the training samples, including: The characteristic regions of impurity complexes in the calibration spectrum are extracted, and the absorption peak position, half-peak width, and peak intensity ratio are used as spectral shape parameters of the characteristic regions of impurity complexes. The actual average coordination number corresponding to the spectral shape parameters is determined based on a pre-established spectral shape lookup table.

5. The method according to claim 3, characterized in that, The theoretical average coordination number is calculated based on the preset cyanide ion material balance relationship and the initial predicted gold ion concentration, including: Based on the total concentration of cyanide ions, the predicted initial concentration of gold ions, the total concentration of impurity metals, and the cumulative stability constant, the cyanide ion material balance relationship is solved to obtain the concentration of free cyanide ions and the concentration of impurity metal complexes of each coordination number. The theoretical average coordination number is obtained by taking a weighted average of all coordination numbers based on the concentration of impurity metal complexes of each coordination number.

6. The method according to claim 1, characterized in that, It also includes the following steps: The deviation spectra obtained from multiple consecutive online time points are constructed into a deviation spectrum matrix according to the measurement order. The deviation spectrum matrix is ​​decomposed into a non-negative matrix to obtain the basis vector matrix and the coefficient matrix. During the iterative process of non-negative matrix decomposition, after each update of the coefficient matrix, a monotonically non-decreasing constraint is applied to the coefficient matrix. The iterative update of the coefficient matrix and the application of the monotonically non-decreasing constraint are alternately performed until the preset convergence condition is reached. Extract the basis vector matrix after iteration and the column vectors in the coefficient matrix corresponding to the current time. Calculate the product of the basis vector matrix and the column vectors to obtain the cumulative interference spectrum. Superimpose the cumulative interference spectrum onto the theoretical spectrum of each concentration point in the ground state spectral library to obtain the updated ground state spectral library.

7. The method according to claim 1, characterized in that, The predicted gold ion concentration is output based on the complexation consistency index, spectral residual, and ground state deviation index, including: When the spectral residual is less than the first threshold, the complexation consistency index is greater than the second threshold, and the ground state deviation index is less than the third threshold, the predicted gold ion concentration is output. When the spectral residual is greater than the fourth threshold, or the complexation consistency index is less than the fifth threshold, an abnormal detection warning is output and no predicted gold ion concentration is output.

8. A gold ion concentration spectral detection system for gold plating solution, used to implement the method as described in any one of claims 1-7, characterized in that, The system includes: The temperature correction module acquires the ultraviolet-visible spectral data and current temperature data of the gold plating solution, inputs the current temperature data into a pre-established temperature parameterized spectral response model, and calculates the temperature contribution spectrum corresponding to the current temperature data. The complexation prediction module corrects the UV-Vis spectral data based on the temperature contribution spectrum, obtains the corrected spectrum, and uses a partial least squares regression algorithm based on complexation equilibrium constraints to analyze the corrected spectrum and obtain the predicted gold ion concentration and complexation consistency index. The residual analysis module obtains the theoretical spectrum from the pre-established ground-state spectral library based on the predicted gold ion concentration, and calculates the difference between the corrected spectrum and the theoretical spectrum at each wavelength point to obtain the deviation spectrum. The results output module reconstructs the spectrum based on the latent variable scores and corresponding loading vectors in the partial least squares regression algorithm, calculates the spectral residuals based on the corrected spectrum and the reconstructed spectrum, and outputs the predicted gold ion concentration based on the complexation consistency index, spectral residuals and ground state deviation index. The ground state deviation index is the ratio of the norm of the current deviation spectrum to the norm of the deviation spectrum recorded in the most recent ground state spectrum library.