An automated sampling and titration analysis method based on the treatment of acidic wastewater from copper smelting
By using image processing and dynamic response characteristic analysis, the problem of distinguishing arsenic precipitates from other heavy metal precipitates in copper smelting wastewater has been solved, enabling copper smelting enterprises to achieve environmental compliance and resource recycling.
Patent Information
- Application Number
- CN202511188263.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-08-25
AI Technical Summary
In existing technologies, arsenic precipitates in copper smelting wastewater are difficult to distinguish from other heavy metal precipitates, leading to deviations in spectral analysis results and making it impossible to accurately determine whether arsenic has been completely removed.
An automated sampling titration analysis method based on the treatment of acidic wastewater from copper smelting was adopted. Image processing technology was used to extract the contour and hue features of the precipitate, generate the precipitate aggregation complexity and arsenic-specific hue separation degree, and combine dynamic response characteristics and interference correction to calculate the dynamic arsenic residue risk coefficient and determine the arsenic removal qualification mark.
It enables accurate identification of arsenic precipitates, avoids detection biases in traditional spectral analysis, improves detection efficiency and accuracy, and ensures that waste acid meets environmental standards and is recycled.
Smart Images

Figure CN120707567B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of acid wastewater titration analysis technology, specifically to an automatic sampling titration analysis method based on the treatment process of acid wastewater from copper smelting. Background Technology
[0002] The flue gas generated during copper smelting typically contains impurities such as sulfur dioxide, arsenic, and lead, and also carries varying degrees of dust. It is generally fed into an acid production system to manufacture industrial sulfuric acid. Although the flue gas undergoes dust removal processes such as electrostatic precipitators, it still contains certain impurities. In the acid production system, the flue gas is first purified through a circulating spray system to achieve cooling and dust removal. The purification and washing liquid contains soluble impurities such as arsenic, fluorine, and chlorine, especially arsenic, which is generally present in high concentrations. It also contains dissolved sulfur trioxide and some sulfur dioxide, resulting in a generally high acidity. Therefore, this periodically discharged portion of the purification and washing liquid is referred to as waste acid, or polluted acid wastewater.
[0003] The treatment process for waste acid involves removing heavy metal ions such as arsenic, copper, lead, and zinc, especially arsenic. Waste acid treatment typically employs a method of first removing arsenic and then neutralizing it in order to achieve water reuse.
[0004] Currently, when removing arsenic from waste acid, these ions react with the treatment agent to form precipitates of similar form. Spectroscopic analysis is typically used to analyze the arsenic precipitates and residual arsenic in the solution. Arsenic in waste acid and precipitates of heavy metal ions such as copper, lead, and zinc have certain similarities in molecular structure. When these precipitates are mixed, the spectral signals overlap, making it difficult to accurately distinguish arsenic precipitates from other similar metal precipitates. This leads to deviations in the detection results of residual arsenic in the solution, making it impossible to accurately determine whether arsenic has been completely removed. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides an automated sampling and titration analysis method based on the treatment of acid wastewater from copper smelting, thus solving the aforementioned problems.
[0006] The above technical objectives of the present invention are achieved through the following technical solutions:
[0007] An automated sampling and titration analysis method based on the treatment of acidic wastewater from copper smelting includes:
[0008] Step S1: Collect waste acid to obtain waste acid samples;
[0009] Step S2: Titrate the waste acid sample, obtain the image of the waste acid sample after the titration reaction, extract the precipitate contour from the waste acid sample image, and generate the precipitate aggregation complexity.
[0010] Step S3: Convert the waste acid sample image to the HSV color space and segment it to generate arsenic-specific hue separation degree;
[0011] Step S4: Combine the precipitation coagulation complexity and arsenic-specific phase separation to obtain the precipitation effectiveness index;
[0012] Step S5: Calculate the precipitation effectiveness index to obtain the dynamic arsenic residue risk coefficient;
[0013] Step S6: Determine the arsenic removal qualification mark based on the dynamic arsenic residue risk coefficient.
[0014] Furthermore, the waste acid sample is titrated, including:
[0015] The single sampling volume of the waste acid sample was 50 ml, and sodium hydrosulfide solution was added for titration.
[0016] Furthermore, the sediment contours of the waste acid sample images are extracted to generate sediment aggregation complexity, including:
[0017] The waste acid sample image is segmented, and the region significance coefficient is generated based on the difference in optical properties between the precipitate and the background.
[0018] The contour fractal index was obtained by analyzing the edges of precipitates in images of waste acid samples.
[0019] Calculate the spatial distribution density of the precipitate outline in the waste acid sample image to generate the particle aggregation density;
[0020] The precipitation aggregation complexity is obtained by fusing the regional significance coefficient, the profile fractal index, and the particle aggregation density.
[0021] Furthermore, the waste acid sample image is converted to the HSV color space and segmented to generate arsenic-specific hue separation, including:
[0022] The waste acid sample image was converted from the RGB color space to the HSV color space, and the hue channel information was extracted to generate the original hue channel data.
[0023] The original hue channel data is processed to retain effective color information, resulting in purified hue channel data;
[0024] Obtain the characteristic hue range of arsenic precipitates and determine the characteristic hue interval of arsenic.
[0025] Calculate the percentage of pixels in the purified hue channel data that fall within the arsenic characteristic hue range, and generate the hue range matching rate.
[0026] Furthermore, the waste acid sample image is converted to the HSV color space and segmented to generate arsenic-specific hue separation, which also includes:
[0027] Based on the hue interval matching rate, threshold segmentation is performed on the waste acid sample image to obtain the suspected arsenic precipitate region;
[0028] Calculate the hue consistency within the suspected arsenic precipitate area, and determine the hue uniformity of the generated area;
[0029] The hue interval matching rate and the regional hue uniformity are fused to obtain the arsenic-specific hue separation degree.
[0030] Furthermore, the precipitation coagulation complexity and arsenic-specific phase separation degree are integrated to obtain the precipitation effectiveness index, including:
[0031] The dynamic response characteristics of precipitation aggregation complexity and arsenic-specific phase separation degree as precipitation reaction progress were analyzed, and characteristic response difference degree was generated.
[0032] Based on the characteristic response difference, the precipitation aggregation complexity and arsenic-specific phase separation degree were analyzed to obtain dynamic adaptation weights.
[0033] The precipitation coagulation complexity and arsenic-specific phase separation degree are weighted and fused according to the dynamic adaptation weight to obtain the weighted fusion value;
[0034] Calculate the joint distribution characteristics of precipitation aggregation complexity and arsenic-specific phase separation in numerical space, and generate the joint contribution of the characteristics.
[0035] Furthermore, the precipitation coagulation complexity and arsenic-specific phase separation degree are combined to obtain the precipitation effectiveness index, which also includes:
[0036] The weighted fusion value and the joint contribution of features are fused to obtain a preliminary effectiveness index;
[0037] The preliminary effectiveness index is dynamically calibrated based on the difference in characteristic responses to obtain the precipitation effectiveness index.
[0038] Furthermore, the precipitation effectiveness index was calculated to obtain the dynamic arsenic residue risk coefficient, including:
[0039] The relationship between precipitation effectiveness index and arsenic residue was analyzed to generate an effectiveness-residue correlation coefficient.
[0040] The integrity of arsenic precipitates is analyzed based on the complexity of precipitation and coagulation, and a precipitation integrity index is generated.
[0041] The effectiveness-residue correlation was processed based on the sedimentation integrity index to obtain the integrity-weighted correlation value;
[0042] Calculate the degree of interference of other heavy metal ions in the waste acid sample to arsenic, and generate interference correction coefficients;
[0043] The dynamic arsenic residue risk coefficient is obtained by fusing the integrity-weighted correlation value and the interference correction coefficient.
[0044] Furthermore, based on the dynamic arsenic residue risk coefficient, the criteria for arsenic removal compliance are determined, including:
[0045] The emission standard limit for arsenic in waste acid samples is obtained, the emission standard limit is analyzed, and a baseline risk threshold is generated.
[0046] Analyze the fluctuation range of the sedimentation effectiveness index and calculate the correlation coefficient between the fluctuation range and the benchmark risk threshold;
[0047] The benchmark risk threshold is dynamically adjusted based on the correlation volatility coefficient to obtain the real-time judgment threshold.
[0048] Furthermore, based on the dynamic arsenic residue risk coefficient, the criteria for determining arsenic removal compliance also include:
[0049] A judgment sensitivity coefficient is generated based on the combined stability of arsenic-specific phase separation degree and precipitation aggregation complexity.
[0050] Based on the judgment sensitivity coefficient, the dynamic arsenic residue risk coefficient is compared with the real-time judgment threshold to generate an arsenic removal qualification mark.
[0051] In summary, the present invention has the following main beneficial effects:
[0052] Through multi-dimensional feature extraction and analysis, accurate identification of arsenic precipitates was achieved, effectively solving the problem of signal superposition of precipitates with similar morphology in traditional spectral analysis. Bubble noise was eliminated by 3×3 median filtering, and a background benchmark was determined. Regional significance coefficients were extracted, and the morphology and distribution of precipitates were analyzed by contour fractal index and particle aggregation density. The fused precipitation aggregation complexity can accurately reflect the aggregation degree of arsenic precipitates. At the same time, the image was converted to HSV color space, and after purification processing, the characteristic hue range of arsenic was locked. Combined with threshold segmentation and hue uniformity analysis, the generated arsenic-specific hue separation can specifically distinguish arsenic from other heavy metal precipitates. This dual feature extraction mechanism of morphology and color improves the accuracy of arsenic precipitate identification.
[0053] By analyzing the dynamic response characteristics of precipitation aggregation complexity and arsenic-specific phase separation, a dynamic adaptive weight is generated and fused to obtain a precipitation effectiveness index. This fully considers the correlation changes between the two during the reaction process. Furthermore, by using the precipitation integrity index and interference correction coefficient, combined with the weight allocation of interfering ions such as copper, lead, and zinc, the effectiveness-residue correlation is corrected. The resulting dynamic arsenic residue risk coefficient can truly reflect the arsenic residue status, making the judgment results more consistent with the actual titration reaction situation.
[0054] By generating a benchmark risk threshold based on the arsenic emission standard limit, and dynamically adjusting the real-time judgment threshold by combining the fluctuation range of the precipitation effectiveness index, and then integrating the judgment sensitivity coefficient with the stability of key features, the final qualification mark is determined by the risk deviation value. This fully considers the dynamic fluctuation of the reaction and the synergy of features, effectively avoiding misjudgments caused by detection deviations. At the same time, the combination of automatic sampling titration and image analysis realizes the automation of the detection process, improves detection efficiency, and ensures the subsequent reuse of waste acid, enabling copper smelting enterprises to achieve the dual goals of environmental compliance and resource recycling. Attached Figure Description
[0055] Figure 1 This is a flowchart illustrating the steps of the automatic sampling and titration analysis method for treating acidic wastewater from copper smelting, as described in this invention. Detailed Implementation
[0056] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0057] refer to Figure 1 An automated sampling and titration analysis method based on the treatment of acidic wastewater from copper smelting includes:
[0058] Step S1: Collect waste acid to obtain waste acid samples;
[0059] Step S2: Titrate the waste acid sample, obtain the image of the waste acid sample after the titration reaction, extract the precipitate contour from the waste acid sample image, and generate the precipitate aggregation complexity.
[0060] Step S3: Convert the waste acid sample image to the HSV color space and segment it to generate arsenic-specific hue separation degree;
[0061] Step S4: Combine the precipitation coagulation complexity and arsenic-specific phase separation to obtain the precipitation effectiveness index;
[0062] Step S5: Calculate the precipitation effectiveness index to obtain the dynamic arsenic residue risk coefficient;
[0063] Step S6: Determine the arsenic removal qualification mark based on the dynamic arsenic residue risk coefficient.
[0064] By extracting the precipitate profile and segmenting the HSV color space, the precipitate coagulation complexity and arsenic-specific hue separation degree are generated respectively. After fusion calculation, a dynamic arsenic residue risk coefficient is obtained, which can accurately determine whether arsenic has been completely removed. This avoids the detection bias of traditional spectral analysis, improves the accuracy and reliability of arsenic removal judgment in waste acid treatment, and ensures subsequent water reuse.
[0065] In one embodiment, the waste acid sample is titrated, including:
[0066] The single sampling volume of the waste acid sample is 50 ml, and 2-3 drops of sodium hydrosulfide solution are added. After adding the solution, let it stand for 5 seconds, then stir. After stirring, let it stand for 15 seconds to complete the titration reaction.
[0067] In one embodiment, the precipitation contour is extracted from the waste acid sample image to generate precipitation aggregation complexity, including:
[0068] The waste acid sample image is segmented, and regional significance coefficients are generated based on the differences in optical properties between the precipitate and the background. Specifically, this includes: performing 3×3 pixel median filtering on the waste acid sample image: replacing each pixel in the waste acid sample image with the median gray value of all pixels within a 3×3 area around it (the median gray value is the middle value among all pixels within a certain range (3×3 area) around the specified pixel after sorting by size), thus eliminating noise interference such as bubbles generated by the titration reaction; starting from the upper left corner of the waste acid sample image, using 5×5 pixels as a window, moving one pixel to the right each time, and continuing on a new line after reaching the right end, traversing the entire image; for each window, calculating the sum of the gray values of 25 pixels and dividing by 25 to obtain the average gray value of that window, collecting the average gray values of all windows to form a dataset; processing the dataset using K-means clustering (K=2): randomly selecting two initial cluster centers, calculating the distance between the mean of each window and the two initial cluster centers, and assigning it to the cluster closer to the initial cluster center; re-... The mean of the two clusters is calculated as the new cluster center. This process is repeated iteratively until the new cluster centers stabilize. The number of windows contained in each cluster is counted, and the cluster with a window count exceeding 60% is selected. Its final cluster center value is the background baseline gray value (since the background usually occupies a larger proportion in the image). For each pixel in the image, its gray value is subtracted from the background baseline gray value. The absolute value is then divided by 255 (the image gray value range is 0-255), and the result is normalized to 0-1, which is the gray-level difference feature value for each pixel. The gradient of the waste acid sample image is calculated. For intensity and direction, a low threshold of 50 and a high threshold of 150 are set. Pixels with gradient values higher than 150 are marked as defined edges (denoted as 1), those lower than 50 are marked as non-edges (denoted as 0), and those in between that are connected to defined edges are also denoted as 1. For each pixel, its grayscale difference feature value is multiplied by 0.4 and the edge feature value (1 or 0) is multiplied by 0.6. The calculation result is normalized to between 0 and 1, which is the region significance coefficient of the pixel (range 0-1). The higher the value, the greater the probability that the location belongs to a deposit.
[0069] The analysis of the precipitate edges in the waste acid sample image yields the contour fractal index. Specifically, this involves: forming a binary image (precipitate = 1, background = 0) from pixels with a region significance coefficient ≥ 0.6; scanning pixel by pixel from the top left corner of the binary image; finding the first pixel with a value of 1 as the starting point; checking pixels in eight directions clockwise around this pixel; filtering out edge points with a value of 1 that are not recorded and whose neighborhood contains 0 values; recording their coordinates; repeating this process from the starting point until returning to the initial point; obtaining the coordinates of all pixels in the complete contour; using the box-counting method: taking square boxes with side lengths of 1, 2, 4, 8, 16, and 32 pixels; for each size, calculating the minimum number of boxes required to cover the complete contour; calculating the natural logarithm of the side length of each box and the natural logarithm of the corresponding number of boxes; mapping these values to points; finding a straight line that is closest to all points (minimizing the sum of the squares of the perpendicular distances from each point to the line); the absolute value of the slope of this line (the degree of inclination represents the slope) is the contour fractal index.
[0070] Calculate the spatial distribution density of precipitate outlines in waste acid sample images to generate particle aggregation density. Specifically, this involves: dividing the number of precipitate pixels with a value of 1 in the binary image by the total number of pixels in the image to obtain the area percentage; scanning pixel by pixel starting from the top left corner of the binary image; when encountering a pixel with a value of 1 and no label, taking it as the starting point of an independent precipitate particle; checking the eight adjacent pixels above, below, left, right, and along the four diagonals of that pixel; grouping all pixels connected to the starting point with a value of 1 into the same group and labeling them with the same number; after completing one group of labeling, continuing to scan the image and repeating the above process. The process continues until all pixels with a value of 1 are marked, with each number corresponding to an independent sediment particle. Each sediment particle is considered as a connected component. For each connected component, the average value of all pixel coordinates is calculated as the contour center of the sediment particle. For the contour centers of all sediment particles, the straight-line distance between any two contour centers is calculated one by one (i.e., the square root of the sum of the horizontal coordinate difference and the square root of the vertical coordinate difference). The sum of all distances is divided by the total number of distances to obtain the average distance. The area ratio is divided by the average distance, and the result is normalized to 0-1, which is the particle aggregation density.
[0071] The precipitation aggregation complexity is obtained by fusing the regional significance coefficient, the contour fractal index, and the particle aggregation density. Specifically, this involves: calculating the average regional significance coefficient of all precipitate pixels, denoted as the significance mean; multiplying the significance mean, contour fractal index, and particle aggregation density by weights of 0.3, 0.4, and 0.3 respectively; summing the three products; and normalizing the result to 0-1, which represents the precipitation aggregation complexity. A higher value indicates a higher degree of precipitation aggregation. In the removal of arsenic from copper smelting wastewater, the precipitation aggregation complexity should primarily reflect the morphological integrity and aggregation of the precipitate. Effectiveness is assessed by considering the contour fractal index, which directly describes the complexity of the precipitate edges. The more complex the edges (e.g., the irregular agglomeration of arsenic sulfide precipitates), the more complete the reaction, and it has the most significant impact on the degree of aggregation, hence it has the highest weight of 0.4. The regional significance coefficient is the basis for identifying precipitates, but it mainly reflects the distinction from the background and is relatively more affected by image noise, so the significance mean is used as an auxiliary indicator with a weight of 0.3. The particle aggregation density reflects the spatial density of the precipitate; the denser the aggregation, the better the aggregation effect. Its importance is lower than that of the contour fractal index, hence its weight of 0.3.
[0072] Bubble noise is eliminated by 3×3 median filtering, and the background baseline gray value is determined. The significance coefficient of the precipitate area is accurately extracted, effectively eliminating interference. Through contour fractal index calculation and particle aggregation density analysis, the morphology and distribution characteristics of the precipitate can be understood in detail, solving the problem that traditional methods are difficult to distinguish precipitates with similar morphologies. This improves the specificity of arsenic precipitate identification. Furthermore, by weighted fusion of significant mean, contour fractal index and particle aggregation density to generate precipitate aggregation complexity, the core role of contour fractal index is highlighted, accurately reflecting the reaction sufficiency and aggregation effect of arsenic precipitation. This specifically solves the detection deviation caused by spectral signal superposition and improves the accuracy of arsenic removal judgment in waste acid.
[0073] In one embodiment, the waste acid sample image is converted to the HSV color space and segmented to generate arsenic-specific hue separation, including:
[0074] The waste acid sample image was converted from the RGB color space to the HSV color space. Hue channel information was extracted to generate raw hue channel data. Specifically, for each pixel's RGB value (red, green, blue, range 0-255), the maximum, minimum, and difference among the three values were calculated. If the maximum value was red, the hue value was (green-blue) divided by the difference and then multiplied by 60. If the hue value exceeded 0, 360 was added to it. If the maximum value was green, the hue value was (blue-red) divided by the difference, multiplied by 60, and then added by 120. If the maximum value was blue, the hue value was (red-green) divided by the difference, multiplied by 60, and then added by 240. If the difference was 0, the hue value was 0. The hue values of all pixels were extracted to form the raw hue channel data.
[0075] The original hue channel data is processed to retain valid color information, resulting in purified hue channel data. Specifically, this involves: calculating the first quartile (the value at the 25th percentile after all data is sorted in ascending order) and the third quartile (the value at the 75th percentile) of the original hue channel data, with the difference between them being the interquartile range; removing data that is less than the first quartile minus 1.5 times the interquartile range and greater than the third quartile plus 1.5 times the interquartile range; for each remaining pixel, summing the hue values of its eight neighboring pixels and itself (a total of nine pixels) and dividing by 9, using the result as the purified hue value for that pixel; and the complete data formed after all pixels have undergone this processing is the purified hue channel data.
[0076] To obtain the characteristic hue range of arsenic precipitates and determine the characteristic hue interval of arsenic, the following steps are taken: Based on the typical hue characteristics of known arsenic precipitates (arsenic sulfides), from the purified hue channel data, select pixels in the binary image with a value of 1 and a hue that conforms to the typical characteristics, extract the hue values of these pixels, calculate the minimum value as the lower limit and the maximum value as the upper limit, and this range is the characteristic hue interval of arsenic.
[0077] The percentage of pixels in the purified hue channel data that fall within the arsenic characteristic hue range is calculated to generate the hue range matching rate. Specifically, this includes: counting the total number of pixels in the purified hue channel data whose hue values are greater than or equal to the lower limit of the arsenic characteristic hue range and less than or equal to the upper limit, and also counting the total number of pixels in the purified hue channel data; dividing the total number of pixels by the total number of pixels, and normalizing the result to between 0 and 1, which is the hue range matching rate, used to represent the percentage of matching pixels.
[0078] By converting waste acid sample images from RGB to HSV color space, the original hue channel data is extracted through precise calculation of hue values. Combined with interquartile range filtering of outliers and neighborhood mean smoothing, purified hue channel data is obtained, effectively eliminating noise interference and preserving true color information. This provides a color basis for distinguishing similar morphological precipitates. At the same time, based on the typical hue characteristics of known arsenic precipitates, the characteristic hue range of arsenic is determined. By calculating the proportion of pixels in the purified data that fall into this range, the hue range matching rate is generated, which can specifically identify arsenic precipitates and significantly improve its distinguishability from heavy metal precipitates such as copper, lead, and zinc, avoiding misjudgment due to morphological similarity.
[0079] In one embodiment, converting the waste acid sample image to the HSV color space and segmenting it to generate arsenic-specific hue separation further includes:
[0080] Based on the hue interval matching rate, threshold segmentation is performed on the waste acid sample image to obtain the suspected arsenic precipitate region. Specifically, the following steps are taken: using 0.5 times the hue interval matching rate as the segmentation threshold, the purified hue channel data is processed pixel by pixel to determine whether its hue value is within the arsenic characteristic hue interval. If it is, the hue matching degree is set to 1; otherwise, it is 0. The product of the region significance coefficient of the pixel and the hue matching degree is calculated. If the product result is greater than the segmentation threshold, it is marked as 1 (suspected arsenic precipitate region); otherwise, it is marked as 0. After all pixels are processed, a binary image composed of 0 and 1 is formed, where the region of 1 is the suspected arsenic precipitate region.
[0081] To calculate the hue consistency within the suspected arsenic deposit area and generate a hue uniformity for the region, the following steps are taken: calculate the mean of the purified hue values of all pixels within the suspected arsenic deposit area, then calculate the absolute difference between the hue value of each pixel and the mean, sum all the differences and divide by the total number of pixels to obtain the average deviation, subtract the ratio of the average deviation to the width of the arsenic characteristic hue interval from 1, and normalize the calculation result to 0-1, which is the hue uniformity of the region.
[0082] The hue interval matching rate and the regional hue uniformity are fused to obtain the arsenic-specific hue separation degree. Specifically, the hue interval matching rate is assigned a weight of 0.6 and the regional hue uniformity degree is assigned a weight of 0.4. The hue interval matching rate and the regional hue uniformity degree are multiplied by their respective weights and then added together. The result is normalized to 0-1, which is the arsenic-specific hue separation degree. Among them, the hue interval matching rate is the core basis for identifying arsenic deposits, which directly reflects the degree of matching between pixels and feature hues and is a prerequisite for region determination, so it is assigned a high weight (0.6). The regional hue uniformity degree is used to verify the hue stability within the region and is a quality correction for the matching result, so its weight is slightly lower (0.4).
[0083] By using 0.5 times the hue interval matching rate as the segmentation threshold, and combining the product of the regional significance coefficient and the hue matching degree for threshold segmentation, the suspected arsenic precipitate area is accurately located. This effectively reduces the interference of precipitates with similar forms such as copper, lead, and zinc, solves the problem of difficulty in distinguishing them due to similar forms in traditional methods, and improves the targeting of arsenic precipitate identification.
[0084] By calculating the hue uniformity of the region to reflect the hue stability within the suspected region, and by integrating the hue interval matching rate and the regional hue uniformity with weights of 0.6 and 0.4, an arsenic-specific hue separation degree is generated, which significantly improves the accuracy of distinguishing arsenic precipitates from other heavy metal precipitates and avoids detection bias.
[0085] In one embodiment, the precipitation coagulation complexity and arsenic-specific phase separation are combined to obtain a precipitation effectiveness index, including:
[0086] The dynamic response characteristics of precipitation aggregation complexity and arsenic-specific chromaticity separation degree as the precipitation reaction progress were analyzed, and characteristic response difference degree was generated. Specifically, the following steps were taken: First, the precipitation aggregation complexity and arsenic-specific chromaticity separation degree at different reaction times were recorded to form two sets of time series data (containing values at n and m reaction times, respectively); An n x m local distance matrix was constructed, where each element of the matrix is the absolute difference between the values of the two sequences at the corresponding time (i.e., the absolute difference between the precipitation aggregation complexity at time i and the arsenic-specific chromaticity separation degree at time j); Path constraints were set (the path slope was limited to between 0.5 and 2 to avoid excessive distortion). Starting from the upper left corner of the matrix (initial time), a path to the lower right corner (final time) was found according to the rule that "each step can only move to the right, down, or diagonally to the lower right" to minimize the sum of all local distances (cumulative distance) on the path; The minimum cumulative distance was divided by the number of steps contained in the path and normalized to between 0 and 1. Then, the normalized result was subtracted from 1 to obtain the characteristic response difference degree in the range of 0-1.
[0087] An analysis of precipitation aggregation complexity and arsenic-specific hue separation degree based on characteristic response difference was conducted to obtain dynamic adaptation weights. Specifically, the weights of precipitation aggregation complexity and arsenic-specific hue separation degree were allocated according to a fixed ratio based on characteristic response difference. When characteristic response difference = 0 (precipitation aggregation complexity and arsenic-specific hue separation degree are completely synchronized), the weight of precipitation aggregation complexity is set to 0.5, and the weight of arsenic-specific hue separation degree is also set to 0.5; when characteristic response difference = 1 (precipitation aggregation complexity and arsenic-specific hue separation degree are completely synchronized), the weight of precipitation aggregation complexity is set to 0.5, and the weight of arsenic-specific hue separation degree is also set to 0.5. When the separation response is completely out of sync, the precipitation-agglomeration complexity weight is set to 0.6, and the arsenic-specific hue separation weight is 0.4; when the characteristic response difference is between 0 and 1, the precipitation-agglomeration complexity weight = 0.5 + 0.1 × characteristic response difference, and the arsenic-specific hue separation weight = 0.5 - 0.1 × characteristic response difference, ensuring that the weights are continuously and linearly adjusted with the characteristic response difference, and that the sum of the two weights is always 1, thus obtaining the dynamic adaptation weights of precipitation-agglomeration complexity and arsenic-specific hue separation.
[0088] The precipitation coagulation complexity and arsenic-specific hue separation degree are weighted and fused according to the dynamic adaptation weight to obtain the weighted fusion value. Specifically, the numerical ranges of precipitation coagulation complexity (0-1) and arsenic-specific hue separation degree (0-1) are each divided into 10 intervals (each interval width is 0.1), forming a 10×10 two-dimensional grid (100 cells in total). The number of two-dimensional data points (each two-dimensional data point represents the precipitation coagulation complexity and arsenic-specific hue separation degree at the corresponding time) of the waste acid sample at different times during the titration reaction is counted and the number of data points in each grid cell is divided by the total number of data points in the total dimension to obtain the proportion of that cell. The median of precipitation coagulation complexity and arsenic-specific hue separation degree in each cell is calculated (for example, the median of the first interval is 0.05, the median of the second interval is 0.15, and so on). The proportion of the cell is multiplied by the product of the two medians, and the results of the 100 cells are summed and normalized to 0-1, which is the joint contribution of the features.
[0089] By analyzing the dynamic response characteristics of precipitation aggregation complexity and arsenic-specific hue separation, a local distance matrix is constructed and the path with the minimum cumulative distance is found to generate characteristic response difference, thereby determining the dynamic adaptation weight. This dynamic adjustment method can accurately adapt to the synchronous changes of the two in the reaction process, avoid the deviation caused by fixed weights, solve the problem that traditional methods are difficult to take into account the dynamic correlation of morphological and color features, and improve the flexibility and accuracy of the analysis.
[0090] By statistically analyzing the distribution of data points using a two-dimensional grid, the joint contribution of features is calculated to achieve weighted fusion. This process comprehensively considers the synergistic effect of precipitation coagulation and color separation, highlighting the combined influence of the two on the effectiveness of arsenic precipitation, effectively distinguishing arsenic from other heavy metal precipitates, and facilitating subsequent accurate determination of whether arsenic has been completely removed.
[0091] In one embodiment, the precipitation coagulation complexity and arsenic-specific phase separation are combined to obtain a precipitation effectiveness index, which further includes:
[0092] The weighted fusion value and the joint contribution of features are fused to obtain a preliminary effectiveness index. Specifically, when fusing the weighted fusion value and the joint contribution of features, a weighted summation algorithm is used. The weighted fusion value is assigned a weight of 0.6 and the joint contribution of features is assigned a weight of 0.4. The two are multiplied by their respective weights and then added together. The sum is normalized to the range of 0-1, which is the preliminary effectiveness index.
[0093] The preliminary effectiveness index is dynamically calibrated based on the characteristic response difference to obtain the precipitation effectiveness index. Specifically, when the characteristic response difference is 0 (completely synchronized), the calibration coefficient is 0.8; when the characteristic response difference is 1 (completely out of sync), the calibration coefficient is 1; when the characteristic response difference is between 0 and 1, the calibration coefficient = 0.8 + 0.2 × characteristic response difference. The preliminary effectiveness index is multiplied by the calibration coefficient, and the calculation result is normalized to 0-1 to obtain the precipitation effectiveness index.
[0094] A preliminary effectiveness index is obtained by fusing weighted fusion values and the joint contribution of features. Then, the calibration coefficient is dynamically adjusted based on the difference in feature responses to generate a precipitation effectiveness index. This process not only highlights the dominant role of core features, but also adapts to the difference in responses between the two through dynamic calibration, accurately reflecting the true effectiveness of arsenic precipitation. This effectively solves the judgment bias caused by the superposition of signals from similar precipitates in traditional methods, and further ensures the accuracy of arsenic removal detection in waste acid.
[0095] In one embodiment, the precipitation effectiveness index is calculated to obtain the dynamic arsenic residue risk coefficient, including:
[0096] The relationship between precipitation effectiveness index and arsenic residue was analyzed to generate an effectiveness-residue correlation. Specifically, this involved: obtaining the arsenic residue from historical titration analyses; subdividing the precipitation effectiveness index (0-1) into 100 scales at 0.01 intervals; recording the historical maximum and minimum values of arsenic residue for each scale; calculating the difference between the historical maximum and minimum values, which is the residue fluctuation range for that scale; using the largest fluctuation range among all scales as the benchmark value; dividing the residue fluctuation range of the current precipitation effectiveness index scale by the benchmark value to obtain the fluctuation ratio; subtracting the fluctuation ratio from 1 and normalizing it to 0-1, which is the effectiveness-residue correlation.
[0097] The integrity of arsenic precipitates is analyzed based on precipitation coagulation complexity, generating a precipitation integrity index. Specifically, the historical maximum value of precipitation coagulation complexity is set as 1 (completely intact), and the minimum value is 0 (no precipitation). The ratio of the current precipitation coagulation complexity to the historical maximum value is used as the base value. The base value is multiplied by 0.9 and then a baseline compensation value of 0.1 is added. The calculation result is normalized to 0-1, which is the precipitation integrity index. The higher the value of the precipitation integrity index, the higher the integrity of the arsenic precipitate.
[0098] The effectiveness-residue correlation is processed based on the precipitation integrity index to obtain an integrity-weighted correlation value. Specifically, this involves: using the precipitation integrity index as a benchmark, calculating the absolute difference between the precipitation integrity index and 0.5 to obtain the integrity deviation; subtracting the integrity deviation from 1 to obtain a correction coefficient; multiplying the effectiveness-residue correlation by the correction coefficient; and normalizing the calculation result to 0-1 to obtain the integrity-weighted correlation value. The closer the integrity-weighted correlation value is to 0.5, the smaller the impact of the correction coefficient on the correlation.
[0099] The interference levels of other heavy metal ions in the waste acid sample to arsenic were calculated, and interference correction coefficients were generated. Specifically, copper, lead, and zinc were identified as the main interfering ions. The historical maximum interference concentrations of copper, lead, and zinc were obtained, and their historical maximum interference concentrations were set as standard thresholds. The concentrations of each ion in the waste acid sample were obtained, and the ratio of each ion concentration to its corresponding standard threshold was calculated to obtain the single ion interference ratio. Copper was assigned a weight of 0.4, lead 0.3, and zinc 0.3. The single ion interference ratios of copper, lead, and zinc were multiplied by their respective weights and then summed to obtain the total interference ratio. The total interference ratio was subtracted from 1 and the result was normalized to 0-1, which is the interference correction coefficient. The higher the interference correction coefficient, the smaller the interference. In the titration reaction, copper ions usually have the most significant interference to arsenic, so the weight is relatively high (0.4), while lead and zinc have similar interference levels to arsenic, so they are assigned equal weights (0.3).
[0100] The integrity-weighted correlation value and the interference correction coefficient are fused to obtain the dynamic arsenic residue risk coefficient. Specifically, the integrity-weighted correlation value is set to a weight of 0.6 and the interference correction coefficient is set to a weight of 0.4. The sum of the products of the integrity-weighted correlation value and the interference correction coefficient with their respective weights is calculated and then divided by the total weight (1). The result is normalized to 0-1, which is the dynamic arsenic residue risk coefficient. The lower the value of the dynamic arsenic residue risk coefficient, the higher the risk of arsenic residue. In the removal of arsenic from copper smelting waste acid, the integrity-weighted correlation value directly reflects the reliable correlation between precipitation effectiveness and arsenic residue. The integrity of precipitation is the core basis for the effective removal of arsenic. The more complete the precipitate, the more difficult it is for arsenic to remain. This is the core basis for judging the arsenic removal effect, so it is given a higher weight (0.6). The interference correction coefficient reflects the interference of other heavy metals on arsenic, but interference is a secondary influence and is not the fundamental factor that determines the arsenic removal qualification, so it has a lower weight (0.4).
[0101] By analyzing historical data on precipitation effectiveness index and arsenic residue, an effectiveness-residue correlation coefficient is generated. Combined with precipitation integrity index correction, an integrity-weighted correlation value is obtained, which accurately analyzes the correlation between precipitation effectiveness and arsenic residue. It fully considers the impact of the integrity of arsenic precipitate on residue, and solves the correlation bias caused by neglecting the integrity of precipitate morphology in traditional methods. At the same time, based on the influence of interfering ions such as copper, lead, and zinc, different weights are assigned according to the degree of interference to calculate the interference correction coefficient. Then, the integrity-weighted correlation value and the interference correction coefficient are combined to obtain a dynamic arsenic residue risk coefficient, which effectively offsets the interference of similar heavy metal precipitates and avoids misjudgment caused by the superposition of spectral signals. This makes the arsenic residue risk assessment more realistic and significantly improves the accuracy of arsenic removal detection in waste acid.
[0102] In one embodiment of this invention, the arsenic removal qualification standard is determined based on a dynamic arsenic residue risk coefficient, including:
[0103] The emission standard limit for arsenic in waste acid samples is obtained, and the emission standard limit is analyzed to generate a baseline risk threshold. Specifically, this includes: obtaining the emission standard limit for arsenic; setting the precipitation effectiveness index to 1.0 (theoretical optimal state); the corresponding risk coefficient should match the emission standard limit; using the emission standard limit as a baseline reference value; dividing the baseline reference value by the historical maximum arsenic residue; and normalizing the resulting ratio to 0-1, which is the baseline risk threshold.
[0104] Analyze the fluctuation range of the sedimentation effectiveness index and calculate the correlation fluctuation coefficient between the fluctuation range and the benchmark risk threshold. Specifically, based on the current sedimentation effectiveness index, set its theoretical fluctuation range to ±0.1 (i.e., the current value minus 0.1 to plus 0.1). The difference between the ranges is the fluctuation range. Calculate the ratio of the fluctuation range to the benchmark risk threshold to obtain the original coefficient. Divide the original coefficient by 0.2 (the theoretical maximum fluctuation range) and normalize the calculation result to 0-1, which is the correlation fluctuation coefficient.
[0105] The benchmark risk threshold is dynamically adjusted based on the correlation volatility coefficient to obtain the real-time judgment threshold. Specifically, the correlation volatility coefficient is multiplied by 0.2 (the upper limit of the adjustment range) to obtain the threshold correction amount. The benchmark risk threshold is then added to the threshold correction amount, and the result is normalized to between 0 and 1, which is the real-time judgment threshold.
[0106] By using the emission standard limit for arsenic as a benchmark, combined with the theoretical optimal state of the precipitation effectiveness index and the historical maximum arsenic residue, a benchmark risk threshold is generated. This ensures that the benchmark risk threshold setting is closely related to actual emission requirements, solving the problem of insufficient applicability caused by the traditional judgment standard being divorced from the emission standard. It provides a benchmark that meets the requirements for arsenic removal qualification judgment, ensuring that the judgment results comply with environmental protection standards.
[0107] By analyzing the fluctuation range of the precipitation effectiveness index and calculating the correlation fluctuation coefficient, the benchmark risk threshold is dynamically adjusted to obtain the real-time judgment threshold. This adjustment mechanism fully considers the actual fluctuation of precipitation effectiveness, avoids the shortcomings of fixed thresholds that are difficult to adapt to dynamic changes, effectively offsets the deviation caused by interference from similar precipitates, makes the determination of arsenic removal qualification more accurate, and improves the accuracy of waste acid treatment compliance judgment.
[0108] In one embodiment of this invention, determining the arsenic removal qualification mark based on the dynamic arsenic residue risk coefficient further includes:
[0109] Based on the combined stability of arsenic-specific phase separation degree and precipitation aggregation complexity, a judgment sensitivity coefficient is generated. Specifically, this includes: calculating the absolute difference between arsenic-specific phase separation degree and precipitation aggregation complexity, and calculating the mean of the sum of the two absolute differences. Subtracting 1 (the ratio of the absolute difference to the mean) and normalizing the calculation result to 0-1 gives the judgment sensitivity coefficient.
[0110] Based on the judgment sensitivity coefficient, the dynamic arsenic residue risk coefficient is compared with the real-time judgment threshold to generate an arsenic removal qualification mark. Specifically, this includes: calculating the difference between the dynamic arsenic residue risk coefficient and the real-time judgment threshold, multiplying the difference by the judgment sensitivity coefficient to obtain the risk deviation value; if the risk deviation value is ≥0, it is judged as qualified, and the arsenic removal qualification mark is 1, indicating that the arsenic removal is qualified; if the risk deviation value is <0, it is judged as unqualified, and the arsenic removal qualification mark is 0, indicating that the arsenic removal is unqualified, triggering an alarm.
[0111] By calculating the absolute difference and related mean values of the arsenic-specific color separation degree and the precipitation aggregation complexity, a judgment sensitivity coefficient is generated. This coefficient accurately reflects the joint stability of the two factors, solving the problem of neglecting the synergy of key features in traditional judgments. It provides a sensitive feature stability basis for qualification judgment and enhances the ability to distinguish interference from similar precipitates. At the same time, combined with the judgment sensitivity coefficient, the dynamic arsenic residue risk coefficient is compared with the real-time judgment threshold. The arsenic removal qualification mark is determined by the risk deviation value. When the risk deviation value is ≥0, the qualification is determined; otherwise, the qualification is determined and an alarm is triggered. This fully utilizes feature stability information, effectively avoids misjudgment caused by detection deviation, and improves the accuracy and timeliness of arsenic removal qualification judgment.
[0112] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. An automated sampling and titration analysis method based on the treatment of acidic wastewater from copper smelting, characterized in that, include: Step S1: Collect waste acid to obtain waste acid samples; Step S2: Titrate the waste acid sample, obtain an image of the waste acid sample after the titration reaction, extract the precipitate contour from the waste acid sample image, and generate the precipitation aggregation complexity, including: The waste acid sample image is segmented, and the region significance coefficient is generated based on the difference in optical properties between the precipitate and the background. The contour fractal index was obtained by analyzing the edges of precipitates in images of waste acid samples. Calculate the spatial distribution density of the precipitate outline in the waste acid sample image to generate the particle aggregation density; The precipitation aggregation complexity is obtained by fusing the regional significance coefficient, the profile fractal index, and the particle aggregation density. Step S3: Convert the waste acid sample image to the HSV color space and segment it to generate arsenic-specific hue separation degree; Step S4: Combine the precipitation coagulation complexity and arsenic-specific phase separation to obtain the precipitation effectiveness index, including: The dynamic response characteristics of precipitation aggregation complexity and arsenic-specific phase separation degree as precipitation reaction progress were analyzed, and characteristic response difference degree was generated. Based on the characteristic response difference, the precipitation aggregation complexity and arsenic-specific phase separation degree were analyzed to obtain dynamic adaptation weights. The precipitation coagulation complexity and arsenic-specific phase separation degree are weighted and fused according to the dynamic adaptation weight to obtain the weighted fusion value; Calculate the joint distribution characteristics of precipitation aggregation complexity and arsenic-specific phase separation in numerical space, and generate the joint contribution of the characteristics; The weighted fusion value and the joint contribution of features are fused to obtain a preliminary effectiveness index; The preliminary effectiveness index is dynamically calibrated based on the difference in characteristic responses to obtain the precipitation effectiveness index. Step S5: Calculate the precipitation effectiveness index to obtain the dynamic arsenic residue risk coefficient, including: The relationship between precipitation effectiveness index and arsenic residue was analyzed to generate an effectiveness-residue correlation coefficient. The integrity of arsenic precipitates is analyzed based on the complexity of precipitation and coagulation, and a precipitation integrity index is generated. The effectiveness-residue correlation was processed based on the sedimentation integrity index to obtain the integrity-weighted correlation value; Calculate the degree of interference of other heavy metal ions in the waste acid sample to arsenic, and generate interference correction coefficients; The dynamic arsenic residue risk coefficient is obtained by fusing the integrity-weighted correlation value and the interference correction coefficient. Step S6: Determine the arsenic removal qualification mark based on the dynamic arsenic residue risk coefficient.
2. The automatic sampling and titration analysis method based on the treatment of copper smelting wastewater acid as described in claim 1, characterized in that, Titration treatment of waste acid samples includes: The single sampling volume of the waste acid sample was 50 ml, and sodium hydrosulfide solution was added for titration.
3. The automatic sampling and titration analysis method based on the treatment of acidic wastewater from copper smelting as described in claim 1, characterized in that, The waste acid sample image was converted to the HSV color space and segmented to generate arsenic-specific hue separation, including: The waste acid sample image was converted from the RGB color space to the HSV color space, and the hue channel information was extracted to generate the original hue channel data. The original hue channel data is processed to retain effective color information, resulting in purified hue channel data; Obtain the characteristic hue range of arsenic precipitates and determine the characteristic hue interval of arsenic. Calculate the percentage of pixels in the purified hue channel data that fall within the arsenic characteristic hue range, and generate the hue range matching rate.
4. The automatic sampling and titration analysis method based on the treatment of copper smelting wastewater acid as described in claim 3, characterized in that, The waste acid sample image was converted to the HSV color space and segmented to generate arsenic-specific hue separation, which also included: Based on the hue interval matching rate, threshold segmentation is performed on the waste acid sample image to obtain the suspected arsenic precipitate region; Calculate the hue consistency within the suspected arsenic precipitate area, and determine the hue uniformity of the generated area; The hue interval matching rate and the regional hue uniformity are fused to obtain the arsenic-specific hue separation degree.
5. The automatic sampling and titration analysis method based on the treatment of acidic wastewater from copper smelting as described in claim 1, characterized in that, Based on the dynamic arsenic residue risk coefficient, the criteria for arsenic removal compliance are determined, including: The emission standard limit for arsenic in waste acid samples is obtained, the emission standard limit is analyzed, and a baseline risk threshold is generated. Analyze the fluctuation range of the sedimentation effectiveness index and calculate the correlation coefficient between the fluctuation range and the benchmark risk threshold; The benchmark risk threshold is dynamically adjusted based on the correlation volatility coefficient to obtain the real-time judgment threshold.
6. The automatic sampling and titration analysis method based on the treatment of acidic wastewater from copper smelting as described in claim 5, characterized in that, The criteria for determining arsenic removal compliance, based on dynamic arsenic residue risk coefficients, also include: A judgment sensitivity coefficient is generated based on the combined stability of arsenic-specific phase separation degree and precipitation aggregation complexity. Based on the judgment sensitivity coefficient, the dynamic arsenic residue risk coefficient is compared with the real-time judgment threshold to generate an arsenic removal qualification mark.
Citation Information
Patent Citations
Steel dedusting quality grade judgment method based on visual identification
CN113205482A
Control method for improving desulfurization efficiency of fluidized bed furnace
CN118500121A