A smelting arsenic-containing wastewater early warning monitoring method based on electrical sensing

By deploying an electrical sensor array in the arsenic-containing wastewater system of smelting, establishing a baseline model, and performing signal processing and prediction, the problems of signal separation and short-term prediction under multi-ion interference were solved, and high-precision wastewater monitoring and intelligent early warning were achieved.

CN121410070BActive Publication Date: 2026-06-26XIANGNAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIANGNAN UNIV
Filing Date
2025-12-12
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing electrical sensing technologies suffer from difficulties in signal separation under multi-ion interference and lack of short-term prediction capabilities for changes in pollutant concentrations when monitoring arsenic-containing wastewater from smelting processes. This results in low monitoring accuracy and makes it difficult to achieve intelligent early warning.

Method used

By deploying electrical sensor arrays in wastewater discharge pipes and sedimentation tanks, an electrical baseline model is established. Voltage signals are collected in real time and standardized and Kalman filtered for drift compensation. A dielectric decoupling matrix is ​​constructed to separate multi-ion responses. A PSO-BP network is used to predict short-term changes. The arsenic ion concentration distribution and diffusion gradient are solved by combining an electric-current field co-inversion model to generate early warning levels.

Benefits of technology

It achieves high-precision monitoring and short-term early warning of arsenic-containing wastewater, improves the system's anti-interference ability and prediction accuracy, has self-learning and dynamic compensation capabilities, and can respond to concentration changes and diffusion trends in real time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121410070B_ABST
    Figure CN121410070B_ABST
Patent Text Reader

Abstract

The application discloses a smelting arsenic-containing wastewater early warning monitoring method based on electrical sensing, and relates to the technical field of environmental monitoring. The application discloses a smelting arsenic-containing wastewater early warning monitoring method based on electrical sensing, and relates to the technical field of environmental monitoring. The application discloses a smelting arsenic-containing wastewater early warning monitoring method based on electrical sensing, and relates to the technical field of environmental monitoring. The application discloses a smelting arsenic-containing wastewater early warning monitoring method based on electrical sensing, and relates to the technical field of environmental monitoring. The application discloses a smelting arsenic-containing wastewater early warning monitoring method based on electrical sensing, and relates to the technical field of environmental monitoring. The application discloses a smelting arsenic-containing wastewater early warning monitoring method based on electrical sensing, and relates to the technical field of environmental monitoring. The application discloses a smelting arsenic-containing wastewater early warning monitoring method based on electrical sensing, and relates to the technical field of environmental monitoring. The application discloses a smelting arsenic-containing wastewater early warning monitoring method based on electrical sensing, and relates to the technical field of environmental monitoring. The application discloses a method for monitoring and early warning of smelting wastewater containing arsenic based on electrical sensing, which effectively improves the resolution and early warning real-time performance of electrical monitoring of arsenic-containing wastewater.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of environmental monitoring technology, and in particular to an early warning monitoring method for arsenic-containing wastewater from smelting based on electrical sensing. Background Technology

[0002] In smelting and hydrometallurgical processes, leaching, washing, and flue gas purification generate large amounts of arsenic-containing wastewater. This wastewater has a complex composition and fluctuates significantly in concentration. To meet emission standards and ensure process safety, the industry now widely uses online electrical sensing technology to monitor the conductivity, impedance spectrum, or dielectric properties of the wastewater, thereby predicting the concentration of metal ions and pollution trends. Specifically, an electrode array is installed in the wastewater pipeline or settling tank, a stable current is applied, and the electrical response of the solution is measured. This monitoring method does not require the addition of chemical reagents, can operate continuously, and has become an important supplement to traditional chemical analysis methods.

[0003] However, most current electrical monitoring systems still rely on single-frequency measurements or empirical formulas to fit data, resulting in limited signal resolution and interference resistance. This is especially problematic in environments like smelting wastewater where multiple ions coexist—such as arsenic, iron, copper, and lead—and where electrodes are prone to polarization. The influence of different ions on the electrical signal is difficult to distinguish accurately, leading to unreliable monitoring accuracy and prediction results. Furthermore, existing systems primarily focus on static concentration detection, lacking analysis of signal changes over time, let alone short-term trend prediction. In the event of sudden pollution or rapid concentration fluctuations, the systems often fail to react quickly enough, limiting their practical application in intelligent early warning systems. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides an early warning and monitoring method for arsenic-containing wastewater from smelting based on electrical sensing, which solves two major problems of existing electrical sensing technologies: difficulty in signal separation under multi-ion interference and lack of short-term prediction capability for changes in pollution concentration.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides a method for early warning and monitoring of arsenic-containing wastewater from smelting based on electrical sensing, comprising,

[0008] Electrical sensor arrays were deployed in wastewater discharge pipes and sedimentation tanks. The reference impedance and dielectric response under pure water conditions were collected by constant current excitation to establish an electrical baseline model.

[0009] Voltage signals are collected in real time under wastewater flow conditions and compared with the reference impedance in the electrical reference model. Standardization processing and Kalman filter drift compensation are performed to obtain the health correction signal.

[0010] Based on the health correction signal, a dielectric decoupling matrix is ​​constructed to separate the multi-ion response. The pure arsenic signal is extracted and its short-term changes are predicted by a PSO-BP network. The predicted signal and the velocity field are input into the electro-flow field co-inversion model to solve the arsenic ion concentration distribution and diffusion gradient. The risk index is calculated by combining the predicted signal to generate an early warning level. Response operations are executed according to the early warning level.

[0011] As a preferred embodiment of the early warning and monitoring method for arsenic-containing wastewater from smelting based on electrical sensing according to the present invention, the step of constructing a dielectric decoupling matrix to separate multiple ion responses based on health correction signals, extracting pure arsenic signals, and predicting short-term changes via a PSO-BP network includes:

[0012] Based on the health-corrected impedance signal, the relative permittivity is calculated according to the equivalent capacitance model, and the difference between the relative permittivity and the reference dielectric spectrum is used to form the corrected differential dielectric response. Multi-band response values ​​are extracted under a preset characteristic frequency set. The dielectric decoupling matrix is ​​constructed by combining the standardized dielectric response amplitudes of each metal ion at different frequencies in the experimental calibration database. The multi-ion mixed signal is separated by Tikhonov regularization, and the pure electrical response time series corresponding to arsenic ions is extracted and standardized.

[0013] The rate of change between adjacent samples of the pure arsenic signal sequence is calculated and the state interval is adaptively adjusted. A state transition probability matrix is ​​constructed and the center value of the interval with the maximum transition probability is selected as the initial value of the Markov trend. The initial value of the Markov trend is fused with the current pure arsenic signal through exponential smoothing to obtain the final initial value of the trend.

[0014] The autocorrelation coefficient of the pure arsenic signal is calculated to generate a weighted time delay feature. The current signal, initial trend value, and time delay term are combined into a composite input vector. Using the composite input vector as input, the weights, biases, and interval correction parameters of the BP neural network are optimized using an immune-enhanced particle swarm optimization algorithm. Early convergence is suppressed by immune perturbation and parameter adaptive optimization is achieved. Finally, the input vector is input into the PSO-optimized BP network to output the pure arsenic prediction signal for future time moments, which is then converted back to the actual electrical response by inverse normalization.

[0015] As a preferred embodiment of the early warning and monitoring method for arsenic-containing wastewater from smelting based on electrical sensing described in this invention, the step of inputting the predicted signal and the flow velocity field into the electro-flow field co-inversion model to solve for the arsenic ion concentration distribution and diffusion gradient includes:

[0016] The predicted signal is mapped to the equivalent conductivity field at future moments, establishing the spatial basis of the electrical input;

[0017] Using the equivalent conductivity field as the dielectric distribution coefficient of the potential equation, a Poisson-type governing equation is established, and a predicted potential correction is introduced into the boundary conditions. After finite element discretization and iterative solution, the potential field distribution at future time is obtained, and the spatial gradient generation electric field distribution is further calculated.

[0018] The obtained electric field distribution is spatially registered with the real-time collected flow velocity field to construct a complete electric-current co-migration control equation. The motion behavior of arsenic ions in wastewater flow is simulated. Based on the electric-current co-migration control equation, the arsenic ion concentration distribution is updated step by step according to the time step, and the current electric field and flow velocity field are used to perform gradient calculation on the concentration field.

[0019] As a preferred embodiment of the early warning and monitoring method for arsenic-containing smelting wastewater based on electrical sensing according to the present invention, the step of deploying an electrical sensing array in the wastewater discharge pipeline and sedimentation tank, and collecting the reference impedance and dielectric response under pure water conditions through constant current excitation to establish an electrical baseline model includes:

[0020] Electrical sensor arrays are deployed at three locations: the inlet of the wastewater discharge pipe, the middle section of the sedimentation tank, and the main discharge outlet. A constant current excitation is applied to each node, and segmented frequency sweep sampling is performed within the frequency range. The frequency range is divided into B sampling points at equal intervals on a logarithmic scale, which are recorded as the characteristic frequency set. The voltage amplitude and phase information of each frequency point are recorded synchronously, and the reference impedance is calculated based on the measured voltage and the known excitation current.

[0021] The capacitance values ​​at each frequency point are obtained by fitting the equivalent capacitance, and the dielectric response function is calculated.

[0022] The reference impedance and dielectric constant of each node are combined to form an electrical baseline model.

[0023] As a preferred embodiment of the early warning monitoring method for arsenic-containing smelting wastewater based on electrical sensing described in this invention, the step of real-time acquisition of voltage signals under wastewater flow conditions, comparison with the reference impedance in the electrical reference model, and performing standardization processing and Kalman filter drift compensation to obtain a health correction signal includes:

[0024] After establishing the baseline, the system switches to the actual wastewater flow condition. Voltage response signals are collected in parallel through three deployed sensor nodes. Under the condition of maintaining constant current excitation, the real-time complex impedance at the corresponding frequency point is calculated and differentially processed with the reference impedance at the corresponding frequency point to form a time difference matrix. Within a sliding window, the mean and standard deviation of the real part of the impedance at each frequency point are calculated, and the differential signal is standardized to generate a standardized observation vector.

[0025] Using electrode polarization and link drift as state variables, a first-order random walk Kalman filter model is established to estimate and correct drift intensity in real time. In each sampling period, the current state is predicted using the previous drift estimate, and the filter is updated in combination with real-time observations. The Kalman gain is calculated and the state variance is dynamically adjusted to obtain the current optimal drift estimate and correct the original impedance in real time, thus obtaining a healthy corrected impedance signal.

[0026] As a preferred embodiment of the early warning and monitoring method for arsenic-containing wastewater from smelting based on electrical sensing described in this invention, the step of calculating risk indicators by combining predicted signals includes: calculating the relative change deviation between the currently measured pure arsenic electrical response signal and the predicted pure arsenic electrical response signal, the overall concentration change rate, and normalizing the concentration gradient field; and calculating a comprehensive risk score based on the signal deviation, the concentration change rate, and the normalized gradient using a weighted fusion method.

[0027] As a preferred embodiment of the early warning monitoring method for arsenic-containing smelting wastewater based on electrical sensing described in this invention, the generation of early warning levels refers to classifying wastewater into low-risk, medium-risk, and high-risk levels based on a comprehensive risk score and threshold.

[0028] As a preferred embodiment of the early warning monitoring method for arsenic-containing wastewater from smelting based on electrical sensing according to the present invention, the step of performing response operations according to the early warning level includes:

[0029] If the risk level is determined to be low, the wastewater condition will be stable, and the current sampling and monitoring frequency will be maintained without triggering any additional operations.

[0030] If the risk level is medium risk, it will automatically enter the enhanced monitoring mode, increase the sampling frequency and data upload rate, and send early warning prompts to the regulatory terminal.

[0031] If the risk level reaches high risk, the emergency response procedure will be triggered immediately, multiple linkage operations will be executed, and alarm information will be pushed to the monitoring platform and management terminal in real time.

[0032] In a second aspect, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the method for early warning and monitoring of arsenic-containing wastewater from smelting based on electrical sensing as described in the first aspect of the present invention.

[0033] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the method for early warning and monitoring of arsenic-containing wastewater from smelting based on electrical sensing as described in the first aspect of the present invention.

[0034] The beneficial effects of this invention are as follows: By establishing a multi-frequency domain dielectric decoupling matrix, this invention introduces the polarization relaxation characteristics of different metal ions into the matrix modeling process, and combines it with Tikhonov regularization to achieve stable separation of mixed signals, effectively solving the monitoring misjudgment problem caused by cross-interference of electrical signals in traditional multi-ion systems. In response to the nonlinear drift and time-varying characteristics of wastewater signals during long-term online operation, this invention introduces an immune-enhanced particle swarm optimization BP neural network prediction model, and achieves short-term trend prediction through a parameter adaptive update mechanism, enabling the monitoring system to have self-learning and dynamic compensation capabilities, thereby realizing real-time early warning of concentration changes and diffusion trends in arsenic-containing wastewater. Attached Figure Description

[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is a flowchart of the early warning monitoring method for arsenic-containing wastewater from smelting based on electrical sensing in Example 1.

[0037] Figure 2 This is a schematic diagram of the process for electro-current field co-inversion and early warning decision-making in Example 1. Detailed Implementation

[0038] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0039] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0040] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0041] Example 1, referring to Figure 1 and Figure 2 This is the first embodiment of the present invention, which provides a method for early warning monitoring of arsenic-containing wastewater from smelting based on electrical sensing, including the following steps:

[0042] S1. Install electrical sensor arrays in wastewater discharge pipes and sedimentation tanks, and collect reference impedance and dielectric response under pure water conditions through constant current excitation to establish an electrical baseline model.

[0043] Specifically, according to the order in which the wastewater flows, electrical sensor arrays are deployed at three locations: the inlet of the wastewater discharge pipe, the middle section of the sedimentation tank, and the main discharge outlet. Each sensor node adopts a three-electrode configuration, consisting of a graphite composite working electrode, a stainless steel counter electrode, and an Ag / AgCl reference electrode. The electrode spacing is strictly fixed at 10 mm to ensure consistent geometric constants.

[0044] After the installation is completed, the electrodes are fixed with PEEK insulating brackets and connected to a constant current source with shielded wires of equal length to ensure consistent signal path impedance.

[0045] To eliminate installation errors and external interference, before formal operation, pure water with a conductivity of less than 5 μS / cm was introduced and continuously flushed the pipeline for 10 minutes at a flow rate of 0.2–0.3 m / s to depolarize the electrode surface and achieve thermal steady state. A constant current excitation was then applied to each node, with the excitation amplitude fixed at 1 mA. rms The frequency range of 10 Hz to 100 kHz is segmented for frequency sweep sampling, and the frequency range is divided into B sampling points at equal intervals on a logarithmic scale, which are denoted as the characteristic frequency set. The voltage amplitude and phase information of each frequency point are recorded synchronously, and the reference impedance is calculated based on the measured voltage and the known excitation current.

[0046]

[0047] In the formula, It is the reference complex impedance. It is the voltage response under a pure water reference. It is the amplitude of the excitation current;

[0048] The capacitance values ​​at each frequency point are obtained by fitting the equivalent capacitance. Calculate the dielectric response function:

[0049]

[0050] In the formula, It is the electrode spacing. It is the effective area of ​​the electrode. It is the vacuum permittivity. It is the reference complex permittivity;

[0051] The capacitance values ​​at each frequency point obtained by combining the equivalent capacitance fitting include:

[0052] Based on the characteristics of extremely low ion concentration and extremely weak electrode interface reaction in a pure water environment, the electrode system is equivalent to a simplified RC model (equivalent circuit model) consisting of solution resistance and double-layer capacitance connected in series. Its complex impedance can be expressed as:

[0053]

[0054] In the formula, It is the resistance of the solution. It is a double-layer capacitor. This is the current frequency. It is the imaginary unit;

[0055] The real and imaginary parts of the measured impedance are fitted using the least squares method. The solution resistance and double-layer capacitance parameters (equivalent capacitance values ​​corresponding to that frequency point) that minimize the fitting error are then determined. To improve the robustness of the fitting, a sliding weighted fitting is performed within adjacent frequency intervals (e.g., three consecutive frequency points) to ensure that a smooth and physically meaningful fit can be obtained stably even under measurement noise or phase drift conditions. The change curve, the final result The value reflects the polarization and geometric characteristics between electrodes in a pure water environment;

[0056] To eliminate geometric differences and measurement noise among multiple nodes, a three-standard-deviation consistency test is performed on the reference impedance and dielectric constant of the three nodes. If a deviation occurs, the abnormal frequency point is automatically remeasured and the median value is taken to ensure that the baseline signals of all nodes are on the same electrical scale. The reference impedance and dielectric constant of each node are then combined to form an electrical baseline model. .

[0057] By combining a multi-node electrical sensor array with equivalent capacitance fitting technology, an electrical baseline model with unified geometric constants and frequency response characteristics was established, enabling high-precision calibration of the arsenic-containing wastewater monitoring system. Pure water excitation and sliding weighted fitting effectively eliminated electrode polarization, contact errors, and environmental noise, ensuring good physical repeatability of impedance and dielectric characteristics. Multi-node consistency verification and median retesting mechanisms guaranteed the stability of spatially distributed data, providing a reliable reference for subsequent health correction, dielectric decoupling, and prediction models. Compared with traditional single-frequency conductivity monitoring, this method significantly improves the system's anti-interference capability, signal resolution, and cross-node comparability, laying a stable benchmark for dynamic early warning and concentration inversion of arsenic-containing wastewater.

[0058] S2. Under the condition of wastewater flow, the voltage signal is collected in real time and compared with the reference impedance in the electrical reference model. The signal is then standardized and Kalman filter drift compensation is performed to obtain the health correction signal.

[0059] Specifically, after establishing the baseline, the system switches to the actual flow condition of wastewater and collects voltage response signals in parallel through three deployed sensing nodes. Under the condition of maintaining constant current excitation, the real-time complex impedance at the corresponding frequency point is calculated.

[0060] After obtaining the new complex impedance, the difference between it and the reference impedance is calculated to form a time difference matrix. Select a sliding window length m, calculate the mean and standard deviation of the real impedance at each frequency point f within the window, and perform standardization:

[0061]

[0062] In the formula, It is the real part of the impedance change (reflecting the change in solution conductivity). It is the moving average of the real part of the impedance corresponding to frequency f within a time window m. It is the standard deviation of the real part of the impedance within the same window, reflecting the amplitude of signal fluctuation. It is the standardized observation vector;

[0063] Using electrode / link drift as a state variable (a real scalar, corresponding to the drift intensity at the current frequency), For the observations, a first-order random walk + additive Gaussian noise model is established:

[0064]

[0065] In the formula, It is the estimated drift intensity at the current moment. It is the state value from the previous moment. This is the process noise term, representing the natural disturbances or uncertainties in the system state over time. These are observed values, and in this scheme, they represent the standardized impedance offset. This is the observation noise term, representing the error introduced during the observation process (such as measurement error, sensor error, etc.).

[0066] At the beginning of each sampling period, the current state is predicted using the drift estimate from the previous period, and the prediction variance is estimated as follows:

[0067]

[0068] In the formula, This represents the predicted state at time t, that is, the current state calculated based on the previous estimate (time t-1). This represents the state at time t−1 relative to the current time t. The prediction This represents the uncertainty of the current forecast state (forecast covariance), which is the level of confidence in the forecast phase. This represents the uncertainty of the previous state estimate (the covariance after the last update). It is the process noise variance;

[0069] The filter update equation is:

[0070]

[0071]

[0072] In the formula, It is the measurement error of standardized observations. It is Kalman gain. This represents the final state estimate updated at time t based on current observation information. This represents the final uncertainty (updated covariance) after combining observations and corrections at the current moment.

[0073] The original impedance is corrected in real time based on the drift estimated by Kalman spectroscopy to obtain a health correction signal:

[0074]

[0075] In the formula, It is a health-correcting impedance. It is the standard deviation of the real part of the impedance within the same window.

[0076] Time difference and normalization processing can adaptively remove dimensional differences and noise interference from multi-frequency sampled signals, making impedance change trends more temporally stable and thus improving the system's sensitivity to minute ion concentration fluctuations. The Kalman filter model, using electrode drift as a state variable to construct a prediction-update equation, can estimate and compensate for signal offsets caused by polarization, temperature changes, and link instability in real time, ensuring data consistency and repeatability during long-term operation of the sensing nodes. The stability of the health impedance signal after filtering correction is significantly enhanced, providing a high signal-to-noise ratio input for subsequent dielectric decoupling and intelligent prediction. In summary, this method achieves a leap from passive detection to adaptive correction of electrical sensing signals, significantly improving the real-time performance, robustness, and early warning accuracy of arsenic-containing wastewater monitoring systems.

[0077] S3. Based on the health correction signal, a dielectric decoupling matrix is ​​constructed to separate the multi-ion response. The pure arsenic signal is extracted and its short-term changes are predicted by a PSO-BP network. The predicted signal and the velocity field are input into the electro-flow field co-inversion model to solve the arsenic ion concentration distribution and diffusion gradient. The risk index is calculated in combination with the predicted signal to generate an early warning level. Response operations are executed according to the early warning level.

[0078] Preferably, based on the health correction signal, a dielectric decoupling matrix is ​​constructed to separate the multi-ion response, and the pure arsenic signal is extracted and short-term changes are predicted using a PSO-BP network, including:

[0079] Based on health-corrected impedance The relative permittivity is calculated based on the equivalent capacitance model. :

[0080]

[0081] In the formula, The dielectric constant is measured at frequency f and time t, and A is the effective area of ​​the electric field between the electrode and the wastewater, which determines the electric field distribution and current density. d is the vacuum permittivity, d is the electrode spacing, and j is the imaginary unit. It is angular frequency;

[0082] The corrected difference spectrum is obtained by subtracting the calculated dielectric response from the reference dielectric spectrum:

[0083]

[0084] In the formula, It is the differential dielectric spectrum relative to a reference.

[0085] A hybrid dielectric response vector is formed under the characteristic frequency set:

[0086]

[0087] In the formula, It is the differential dielectric response vector at n frequencies. It is the nth observation frequency (out of a total of n frequency points);

[0088] Based on the dielectric response characteristics of each metal ion at different frequencies in the experimental calibration database, the normalized frequency response ratio is extracted, and a dielectric decoupling matrix is ​​constructed accordingly.

[0089]

[0090] In the formula, Is the j-th type ion at frequency The normalized dielectric response amplitude at the point was obtained by experimental calibration of the electrical spectrum of a single-ion solution;

[0091] To separate the pure arsenic response from the mixed signal, Tikhonov regularization was used for stable inversion to extract the pure signal component corresponding to arsenic ions, which was then normalized.

[0092]

[0093] In the formula, Here, λ represents the pure response value of each ion at the current time t, D is the dielectric decoupling matrix, and λ is the regularization coefficient to prevent ill-conditioned matrix inversion, based on the response matrix. The condition number and data noise level typically range from 10. −6 ~10 −2 The appropriate value can be adaptively selected using the L-curve criterion or generalized cross-validation (GCV) method in existing technologies, where J is the identity matrix. It is a multi-ion mixed dielectric response vector;

[0094] By treating the pure signal component corresponding to arsenic ions as the time series input, a continuous time series is constructed:

[0095]

[0096] In the formula, Sampling time The electrical response signal value of pure arsenic on the surface (obtained after dielectric decoupling, retaining only the contribution of arsenic ions);

[0097] To capture the dynamic trend of signal changes, the rate of change between adjacent samples is calculated:

[0098]

[0099] In the formula, It is the arsenic electrical response signal value collected at the i-th time point. It is the rate of change of the signal. It is the sampling time point;

[0100] Adjust the width of each state interval based on the signal change rate:

[0101]

[0102] In the formula, and These are the arsenic signal values ​​at two adjacent points. This is the adjustment factor for state partitioning, controlling the influence of the rate of change on the interval width. It is usually set to 0.1–0.5, and is determined through empirical parameters in adaptive state modeling. It is the amplitude width used to dynamically generate the state interval;

[0103] Based on the minimum interval width, segments are made proportionally to generate a state set and a unique number is assigned to each interval.

[0104] Each sampled value in the time series is mapped to a corresponding state interval to form a state label sequence, and the number of transitions between adjacent states is counted within a sliding time window:

[0105]

[0106] In the formula, and N is the state interval between the current moment and the next moment, and N() is the number of data pairs that satisfy the specific state transition conditions, in units of "times" or "pieces".

[0107] Construct the transition counting matrix N;

[0108] Normalizing each row of the transition counting matrix yields the state transition probability matrix, thereby quantifying the trend of signal changes between different states:

[0109]

[0110] In the formula, From state Transferred to Number of times, From state The total number of possible transitions from the starting point. It is conditional probability, which means that in Which state is most likely to transition to at any given moment?

[0111] Read the current state, select the target state with the highest probability from the transition probability matrix, and calculate the center value as the initial value of the Markov trend based on the amplitude interval boundary:

[0112]

[0113] In the formula, The current state Transition to state The conditional probability, It is the index of the state that maximizes Y from all u values. It is the interval corresponding to the state with the highest probability of transition (the value range is a range of arsenic signals). It is the predicted initial value of the trend, that is, the center value of the state interval;

[0114] To eliminate the impact of sudden disturbances, the initial Markov trend value is fused with the current pure arsenic signal using exponential smoothing to obtain the final initial trend value:

[0115]

[0116] In the formula, This is the trend forecast value after smoothing correction. It is a weighted smoothing factor, set empirically, with commonly used values ​​of 0.6–0.9, set using the exponential smoothing method;

[0117] To characterize the time memory of pure arsenic signals, the autocorrelation coefficient of pure arsenic signals was calculated and a weighted time-delay signal was generated;

[0118] The calculation of the autocorrelation coefficient of the pure arsenic signal As shown below:

[0119]

[0120] In the formula, It is the electrical response signal at the i-th sampling point. It is the signal value after a lag of p sampling intervals. It is the average electrical response. It is the window length;

[0121] The generated weighted time-delay signal is shown below:

[0122]

[0123] In the formula, It is the lagged weighting coefficient. It is a weighted delay signal. is the p-th time-delay component of the pure arsenic signal, and k is the maximum time-delay order;

[0124] The current pure arsenic signal, initial trend value, and time delay weighting term are fused to construct a composite input vector X. in ;

[0125] Based on the composite input vector, a three-input single-output BP network model structure is established. The number of nodes in the input layer (3), hidden layer (8) and output layer (1) and the BP network parameter set Θ={W,b,θ} are defined, where W is the weight matrix, b is the bias vector, and θ is the scalar correction coefficient, which is used to linearly correct the network output and compensate for systematic deviations.

[0126] The BP parameters are optimized using an immune-enhanced particle swarm optimization algorithm, where each particle represents a candidate parameter solution. Position and velocity are initialized, and parameters are set.

[0127]

[0128] In the formula, It is the initial position vector of the i-th particle. It is the initial velocity vector of the i-th particle. This indicates that random uniform sampling is performed within the interval from -1 to 1, used to generate initial parameter values. This indicates that a random, uniform sample is taken within the range of -0.5 to 0.5 to generate the initial velocity value;

[0129] In this embodiment, the preferred settings include a particle count of 30, a maximum number of iterations of 100, an inertia weight w ∈ [0.9, 0.4] that decreases linearly with iteration, and a learning factor c1 = c2 = 2.0;

[0130] Each particle is injected into the network to perform a forward prediction once:

[0131]

[0132] In the formula, It is the predicted signal generated by the i-th particle. It is the mapping function of the BP neural network. It is the weight matrix of the i-th particle. It is the bias vector of the i-th particle. It is the interval correction parameter for the i-th particle. It is a composite input vector. It is a predicted time interval;

[0133] Using the mean squared error as the fitness function, the deviation between the predicted output and the current true value is calculated:

[0134]

[0135] In the formula, It is the fitness value of the i-th particle. It is the sample size. It is the true target value of the h-th sample. It is the predicted value of the i-th particle in the h-th sample;

[0136] And mark the individual optimal and the global optimal;

[0137] After obtaining the fitness distribution, the particle position and velocity are automatically updated:

[0138]

[0139] In the formula, It is the velocity vector of the i-th particle in the k-th generation. It is the parameter position of the i-th particle in the k-th generation. It is inertial weight. and It is the learning factor (individual and group acceleration constant). and These are random coefficients. It is the best parameter position ever achieved by the i-th particle in history. It is the globally optimal position. It is the updated velocity vector. This is the location of the updated parameters;

[0140] The inertial weight w decreases linearly with iteration, enabling early global search and later local refinement.

[0141] If the global error convergence rate Δg < 1 for multiple consecutive generations, the immune perturbation mechanism is triggered:

[0142] Select the top 20% of high-fit particles and perform small perturbation correction:

[0143]

[0144] In the formula, It is the particle's current position. δ is the perturbation strength coefficient, which controls the perturbation amplitude. It is typically set to 0.05 and is determined by existing technology based on the antibody mutation mechanism in the immune algorithm. That is, it is given according to the standard perturbation strategy of the Artificial Immune Algorithm (AIS) in preventing premature convergence of the particle swarm. The value is based on the principle of balancing parameter convergence stability and error sensitivity. It is usually set to δ = 0.01 to 0.1. Among them, δ = 0.05 can avoid solution oscillation while maintaining global search capability. It is determined through optimization through multiple sets of simulation experience. randn() is a normal random perturbation that follows a standard normal distribution random number with a mean of 0 and a variance of 1.

[0145] If the error decreases after the disturbance, it is retained; otherwise, it is rolled back. This loop runs at high speed within the control period until the iteration termination condition is met (the maximum number of algebras is reached).

[0146] The expression for calculating the global error convergence rate is as follows:

[0147]

[0148] In the formula, It is the fitness value of the globally optimal individual at the e-th iteration. It is the fitness value of the globally optimal individual at the (e-1)th iteration;

[0149] When the particle swarm converges, immediately extract the global optimal solution:

[0150]

[0151] In the formula, , and These are the optimal weight matrix, the optimal bias vector, and the optimal correction parameters, respectively. It is a minimization operator;

[0152] And reconstruct the BP network:

[0153]

[0154] In the formula, It is the mapping function of the optimized BP network. It is the weight matrix from the input layer to the hidden layer. It is the weight matrix from the hidden layer to the output layer. It is the hidden layer bias vector. It is the output layer bias vector. It is the sigmoid activation function, where x is the network input vector, X in It is a composite input vector;

[0155] After completing parameter optimization, immediately change the current input vector X. in (t) Input the optimized network and perform prediction:

[0156]

[0157] In the formula, It is a standardized prediction signal. It is the output of the network prediction function. It is the current input vector;

[0158] The standardized signal output by the network is denormalized to the actual electrical response value:

[0159]

[0160] In the formula, It is an inverse normalized prediction signal, representing the predicted electrical response of pure arsenic ions over a future time period. It is the minimum value of the signal. It is the maximum value of the signal.

[0161] The dielectric response calculated based on the health-corrected signal, after Tikhonov regularization, can be stably inverted in complex multi-ion systems. A dielectric decoupling matrix is ​​used to achieve high-precision separation of the pure arsenic ion signal, effectively eliminating electrical interference caused by the coexistence of metal ions such as Fe, Cu, and Pb, resulting in better selectivity and noise resistance. Through Markov trend modeling and an adaptive state interval partitioning mechanism, the dynamic evolution characteristics of the pure arsenic signal are transformed into quantifiable state transition probabilities, enabling short-term prediction of concentration change trends. This overcomes the limitations of traditional electrical detection, which only reflects instantaneous changes and lacks trend judgment. An immune-enhanced particle swarm optimization (BP) neural network structure is employed, combining the global optimization capability of the particle swarm with the nonlinear fitting characteristics of BP to improve the convergence speed and generalization ability of the prediction model. An immune perturbation mechanism suppresses premature convergence, ensuring prediction stability under complex nonlinear signals. Finally, the output prediction signal, after inverse normalization, can directly reflect the future changes in the pure arsenic electrical response, providing a highly timely input for electro-flow field inversion, enabling real-time risk assessment and intelligent early warning of arsenic-containing wastewater. This invention achieves a shift from "passive monitoring" to "active prediction," and possesses high sensitivity, high robustness, and engineering feasibility.

[0162] Specifically, the predicted signal and the velocity field are input into the electro-fluid field co-inversion model to solve for the arsenic ion concentration distribution and diffusion gradient, including:

[0163] By mapping the predicted signal to an equivalent conductivity field at future times, a spatial basis for the electrical input is established:

[0164]

[0165] In the formula, It is the equivalent conductivity. It is the impedance-conductivity calibration coefficient, determined experimentally: the impedance is measured under known standard electrolyte solution (such as KCl) conditions, and the proportionality coefficient is calculated in reverse. It is the reciprocal of the real part of the impedance. At characteristic frequency The complex impedance below, It is a prediction of the response signal of pure arsenic. This is the current pure arsenic response signal. It is the signal sensitivity gain, which is determined through engineering experience or optimized through linear regression, and its value ranges from β=0.05–0.25 (dimensionless), determined by the empirical curve of signal-to-noise ratio (SNR > 20 dB);

[0166] Using the equivalent conductivity field as the dielectric distribution coefficient of the potential equation, a Poisson-type governing equation is established:

[0167]

[0168] In the formula, It is the potential distribution. It is a spatial gradient operator;

[0169] Furthermore, a predicted potential correction is introduced into the boundary conditions, enabling the potential to reflect forward-looking changes in the electrical signal in real time.

[0170]

[0171] In the formula, It is the current boundary potential. It is the potential response coefficient, which is determined by the system identification method to minimize the boundary error between the predicted potential and the measured potential;

[0172] After finite element discretization and iterative solution, the potential field distribution at future time moments is obtained, and the electric field distribution generated by the spatial gradient is further calculated:

[0173]

[0174] In the formula, E(x,y,t+Δt) is the electric field intensity vector;

[0175] The direction and amplitude of the electric field describe the propagation trend and intensity of the electrical signal in space;

[0176] The obtained electric field distribution is spatially registered with the real-time acquired flow velocity field to construct a complete electro-current co-migration control equation, simulating the motion behavior of arsenic ions in wastewater flow. This model is iteratively updated at each time step. First, the potential energy distribution is obtained by fixing the electric field, and then the flow field is introduced to solve for the ion concentration change, thereby realizing the continuous influence of the electrical prediction signal on the concentration evolution.

[0177]

[0178] In the formula, It refers to the concentration of arsenic ions. It is the diffusion coefficient, calculated according to the Stokes-Einstein equation and corrected for experimental temperature and viscosity. It refers to ion mobility, calculated based on the Nernst-Einstein relation. is the concentration gradient, and v is the flow velocity field, which is measured by an ultrasonic flow meter or a numerical fluid dynamics (CFD) model;

[0179] To improve coupling accuracy, a step-by-step update strategy is adopted in each time step Δt: first, the flow velocity field is fixed to calculate the electric potential, and then the electric field is fixed to calculate the concentration, thereby maintaining numerical stability.

[0180] Based on the electro-current co-migration control equation, the arsenic ion concentration distribution is updated iteratively according to the time step, using the current electric field and flow velocity field:

[0181]

[0182] To further characterize the diffusion trend, a gradient calculation is performed on the concentration field:

[0183]

[0184] In the formula, It is the concentration gradient intensity;

[0185] The gradient field G directly reflects the spatial migration direction and local change rate of pollutants, and is a core indicator for judging the main diffusion channel and risk area.

[0186] Once the concentration field solution converges, a set of spatially and temporally synchronized datasets is automatically output, including the spatial concentration distribution of arsenic ions, the concentration gradient field, the diffusion trend, and the corresponding electrical prediction signals.

[0187] By mapping the predicted electrical signal to an equivalent conductivity field, the electrical data gains spatial analytical capability and can reflect the future trend of arsenic ion concentration. An electric potential boundary correction mechanism is introduced, which allows the electric potential distribution to be dynamically adjusted according to the forward-looking changes of the signal, thus improving the response sensitivity under sudden pollution conditions. By adopting spatial registration and collaborative iterative solution of electric field and velocity field, a physically consistent simulation of arsenic ion diffusion and migration process is achieved. The main diffusion channel and risk area are extracted using the concentration gradient field, supporting risk level classification and source tracing analysis.

[0188] Furthermore, by combining the predicted signals to calculate risk indicators, early warning levels are generated, including:

[0189] Calculate the relative deviation between the currently measured pure arsenic electrical response signal and the predicted pure arsenic electrical response signal. :

[0190]

[0191] In the formula, It is a tiny constant, so division by zero is prevented;

[0192] The concentration field was averaged over time, and the overall concentration change rate was calculated. :

[0193]

[0194] In the formula, This is the current average arsenic concentration. It is the time step. It is the average concentration change rate during normal operation;

[0195] To unify the scale of the concentration spatial distribution characteristics and the risk quantification results, the concentration gradient field is normalized as follows:

[0196]

[0197] In the formula, is the amplitude of the concentration gradient field, is the reference gradient amplitude, is the normalized spatial gradient;

[0198] Based on the signal deviation, the concentration change rate, and the normalized gradient, the comprehensive risk score L(t) is calculated by a weighted fusion method:

[0199]

[0200] In the formula, , and are the weight coefficients, which are determined by the AHP (Analytic Hierarchy Process) and multi-index normalization evaluation. This is a standard method commonly used in the prior art for the fusion of multi-source monitoring indicators. In the actual scenario of smelting wastewater, generally set:

[0201] = 0.3 - The change in the electrical signal is the most sensitive to abnormalities;

[0202] = 0.4 - The change in concentration directly reflects the pollution intensity;

[0203] = 0.3 - The spatial gradient reflects the diffusion trend;

[0204] Based on the risk score, the current wastewater state level is determined:

[0205] Set the risk thresholds l and l1, and l < l1;

[0206] If L(t) < l, it is a low-risk level. If l ≤ L(t) < l1, it is a medium-risk level. If L(t) ≥ l1, it is a high-risk level;

[0207] In this embodiment, the value range of the risk threshold is set between 0.3 and 0.7. This range is determined by the statistical fitting of a large amount of arsenic-containing wastewater monitoring data and the sensitivity-specificity balance analysis (ROC curve method), and can maintain high stability and recognition accuracy under different working conditions.

[0208] By calculating the relative deviation between measured and predicted pure arsenic signals, sensitive identification of abnormal electrical changes is achieved, shifting early warning from static detection to dynamic prediction. Time-averaging processing based on concentration change rate eliminates the impact of short-term fluctuations, more accurately reflecting the trend of pollution load changes. Spatial gradient normalization standardizes diffusion characteristics, giving electrical signals and flow field changes a unified scale, significantly improving the robustness of risk assessment. Finally, a comprehensive risk score is generated through multi-indicator weighted fusion, and a threshold classification optimized by ROC is used to achieve accurate classification and real-time determination of low, medium, and high risks.

[0209] Furthermore, the response actions performed based on the warning level include:

[0210] If the risk level is determined to be low, the wastewater status is stable, and the current sampling and monitoring frequency is maintained without triggering any additional operations. Real-time data is recorded to the safety database for trend tracking.

[0211] If the risk level is medium risk, the enhanced monitoring mode will be automatically entered. Without changing the processing technology, the sampling frequency and data upload rate will be temporarily increased. At the same time, local electrode self-test will be enabled to eliminate electrode drift interference, and an "early warning" prompt will be sent to the monitoring terminal to remind operators to pay attention to the possible increase in arsenic concentration.

[0212] If the risk level reaches high risk, the emergency response procedure will be triggered immediately, and multiple linkage operations will be performed, including: automatically reducing the excitation current to prevent polarization damage, opening the bypass drain valve to intercept high-concentration wastewater, simultaneously starting the backup treatment unit for rapid dilution, and pushing alarm information (time, location, concentration value and electrical deviation) to the monitoring platform and management terminal in real time, forming an immediate response closed loop from monitoring to disposal.

[0213] By establishing a tiered risk assessment mechanism, different levels of response strategies can be dynamically triggered based on the wastewater status: in the low-risk stage, data deposition and trend tracking are achieved; in the medium-risk stage, potential anomalies are detected in advance through enhanced monitoring and electrode self-checks; and in the high-risk stage, current reduction, bypass interception, and linkage with backup treatment units are automatically implemented to form a rapid emergency response system. This method significantly improves the stability and anti-interference capability of the monitoring system, reduces the false alarm rate and response delay, and realizes the transformation from "detecting anomalies" to "proactive prevention and control."

[0214] This embodiment also provides a computer device applicable to the early warning and monitoring method for arsenic-containing wastewater from smelting based on electrical sensing, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the early warning and monitoring method for arsenic-containing wastewater from smelting based on electrical sensing as proposed in the above embodiment.

[0215] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0216] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the method for early warning and monitoring of arsenic-containing wastewater from smelting based on electrical sensing as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0217] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for early warning and monitoring of arsenic-containing wastewater from smelting based on electrical sensing, characterized in that: include, Electrical sensor arrays were deployed in wastewater discharge pipes and sedimentation tanks. The reference impedance and dielectric response under pure water conditions were collected by constant current excitation to establish an electrical baseline model. Voltage signals are collected in real time under wastewater flow conditions and compared with the reference impedance in the electrical reference model. Standardization processing and Kalman filter drift compensation are performed to obtain the health correction signal. Based on the health correction signal, a dielectric decoupling matrix is ​​constructed to separate the multi-ion response. The pure arsenic signal is extracted and its short-term changes are predicted by a PSO-BP network. The predicted signal and the velocity field are input into the electro-flow field co-inversion model to solve the arsenic ion concentration distribution and diffusion gradient. The risk index is calculated by combining the predicted signal to generate an early warning level. Response operations are executed according to the early warning level. The step of constructing a dielectric decoupling matrix based on health correction signals to separate multi-ion responses, extracting pure arsenic signals, and predicting short-term changes via a PSO-BP network includes: Based on the health correction signal, the relative permittivity is calculated according to the equivalent capacitance model and the difference is calculated with the reference dielectric spectrum to form the corrected differential dielectric response. Multi-band response values ​​are extracted under the preset characteristic frequency set. The dielectric decoupling matrix is ​​constructed by combining the standardized dielectric response amplitude of each metal ion at different frequencies in the experimental calibration database. The multi-ion mixed signal is separated by Tikhonov regularization and the pure electrical response time series corresponding to arsenic ions is extracted and standardized. The rate of change between adjacent samples of the pure arsenic signal sequence is calculated and the state interval is adaptively adjusted. A state transition probability matrix is ​​constructed and the center value of the interval with the maximum transition probability is selected as the initial value of the Markov trend. The initial value of the Markov trend is fused with the current pure arsenic signal through exponential smoothing to obtain the final initial value of the trend. The autocorrelation coefficient of the pure arsenic signal is calculated to generate a weighted time delay feature. The current signal, initial trend value, and time delay term are combined into a composite input vector. Using the composite input vector as input, the weights, biases, and interval correction parameters of the BP neural network are optimized using an immune-enhanced particle swarm optimization algorithm. Early convergence is suppressed by immune perturbation and parameter adaptive optimization is achieved. Finally, the input vector is input into the PSO-optimized BP network to output the pure arsenic prediction signal for future time moments, which is then converted back to the actual electrical response by inverse normalization.

2. The method for early warning and monitoring of arsenic-containing wastewater from smelting based on electrical sensing as described in claim 1, characterized in that: The step of inputting the predicted signal and the velocity field into the electro-fluid field co-inversion model to solve for the arsenic ion concentration distribution and diffusion gradient includes: The predicted signal is mapped to the equivalent conductivity field at future time, establishing the spatial basis of the electrical input; Using the equivalent conductivity field as the dielectric distribution coefficient of the potential equation, a Poisson-type governing equation is established, and a predicted potential correction is introduced into the boundary conditions. After finite element discretization and iterative solution, the potential field distribution at future time is obtained, and the spatial gradient generation electric field distribution is further calculated. The obtained electric field distribution is spatially registered with the real-time collected flow velocity field to construct a complete electric-current co-migration control equation. The motion behavior of arsenic ions in wastewater flow is simulated. Based on the electric-current co-migration control equation, the arsenic ion concentration distribution is updated step by step according to the time step, and the current electric field and flow velocity field are used to perform gradient calculation on the concentration field.

3. The method for early warning and monitoring of arsenic-containing wastewater from smelting based on electrical sensing as described in claim 2, characterized in that: The step of deploying an electrical sensor array in the wastewater discharge pipeline and sedimentation tank, and collecting the reference impedance and dielectric response under pure water conditions through constant current excitation to establish an electrical baseline model includes: Electrical sensor arrays are deployed at three locations: the inlet of the wastewater discharge pipe, the middle section of the sedimentation tank, and the main discharge outlet. A constant current excitation is applied to each node, and segmented frequency sweep sampling is performed within the frequency range. The frequency range is divided into B sampling points at equal intervals on a logarithmic scale, which are recorded as the characteristic frequency set. The voltage amplitude and phase information of each frequency point are recorded synchronously, and the reference impedance is calculated based on the measured voltage and the known excitation current. The capacitance values ​​at each frequency point are obtained by fitting the equivalent capacitance, and the dielectric response function is calculated. The reference impedance and dielectric constant of each node are combined to form an electrical baseline model.

4. The method for early warning and monitoring of arsenic-containing wastewater from smelting based on electrical sensing as described in claim 3, characterized in that: The process of acquiring voltage signals in real time under wastewater flow conditions, comparing them with the reference impedance in the electrical reference model, performing standardization processing and Kalman filter drift compensation to obtain a health correction signal includes: After establishing the baseline, the system switches to the actual flow condition of wastewater. Voltage response signals are collected in parallel through three deployed sensor nodes. Under the condition of maintaining constant current excitation, the real-time complex impedance at the corresponding frequency point is calculated and differentially processed with the reference impedance at the corresponding frequency point to form a time difference matrix. The mean and standard deviation of the real part of the impedance at each frequency point are calculated within the sliding window. The differential signal is then standardized to generate a standardized observation vector. Using electrode polarization and link drift as state variables, a first-order random walk Kalman filter model is established to estimate and correct drift intensity in real time. In each sampling period, the current state is predicted using the previous drift estimate, and the filter is updated in combination with real-time observations. The Kalman gain is calculated and the state variance is dynamically adjusted to obtain the current optimal drift estimate and correct the original impedance in real time to obtain the health correction signal.

5. The method for early warning and monitoring of arsenic-containing wastewater from smelting based on electrical sensing as described in claim 4, characterized in that: The risk index calculation based on the predicted signal includes: calculating the relative change deviation between the currently measured pure arsenic electrical response signal and the predicted pure arsenic electrical response signal, the overall concentration change rate, and normalizing the concentration gradient field; and calculating the comprehensive risk score based on the signal deviation, concentration change rate, and normalized gradient using a weighted fusion method.

6. The method for early warning and monitoring of arsenic-containing wastewater from smelting based on electrical sensing as described in claim 5, characterized in that: The aforementioned early warning level refers to classifying wastewater into low-risk, medium-risk, and high-risk levels based on a comprehensive risk score and threshold values.

7. The method for early warning and monitoring of arsenic-containing wastewater from smelting based on electrical sensing as described in claim 6, characterized in that: The action to be performed based on the warning level includes: If the risk level is determined to be low, the wastewater condition will be stable, and the current sampling and monitoring frequency will be maintained without triggering any additional operations. If the risk level is medium risk, it will automatically enter the enhanced monitoring mode, increase the sampling frequency and data upload rate, and send early warning prompts to the regulatory terminal. If the risk level reaches high risk, the emergency response procedure will be triggered immediately, multiple linkage operations will be executed, and alarm information will be pushed to the monitoring platform and management terminal in real time.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the early warning and monitoring method for arsenic-containing wastewater from smelting based on electrical sensing as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the early warning and monitoring method for arsenic-containing wastewater from smelting based on electrical sensing as described in any one of claims 1 to 7.