A method, device and system for treating waste liquid in a chemical plant

By acquiring the current timing data of the waste liquid treatment system in the chemical workshop, using the dynamic time warping algorithm to decouple the flow velocity lag and pipe wall residue characteristics, and combining the nonlinear model to calculate the replacement volume, the reliability and economy issues of the replacement process in the waste liquid treatment of the chemical workshop were solved, and precise adaptive control was achieved.

CN121850105BActive Publication Date: 2026-06-19JINING FUSHUN CHEM CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINING FUSHUN CHEM CO LTD
Filing Date
2026-03-16
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In the treatment of waste liquid in chemical workshops, existing flushing strategies with fixed time or volume parameters cannot adapt to the dynamic fluctuations in the viscosity and rheological properties of the waste liquid, resulting in the residue of toxic mother liquor or the mixing of clean water, which affects the reliability and economy of the replacement process.

Method used

By acquiring the current timing data of the delivery pump motor, the characteristic parameters of waste liquid flow lag and pipe wall residue are decoupled using the dynamic time warping algorithm. Combined with the nonlinear model, the replacement volume is dynamically calculated to achieve adaptive control.

Benefits of technology

It achieves precise, economical, and reliable replacement control of high-viscosity, easily adhered waste liquid pipelines without relying on end-point online instruments, avoiding the problems of toxic mother liquor residue and water mixing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121850105B_ABST
    Figure CN121850105B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, and system for treating waste liquid in a chemical workshop, relating to the field of chemical waste liquid treatment technology. It addresses the problem of achieving precise and adaptive control of the high-viscosity waste liquid replacement process within chemical pipelines without relying on easily contaminated end-point online instruments. The method includes: acquiring first current timing data of the pump motor during the discharge of the current batch of waste liquid, and second current timing data based on clean water; determining first and second characteristic parameters based on the first and second current timing data and a preset dynamic time warping algorithm; determining the target replacement volume required for the discharge of the current batch of waste liquid based on the first and second characteristic parameters; and, according to the target replacement volume, introducing cleaning medium into the discharge pipeline for replacement operation, and switching the flow direction at the end of the pipeline when the accumulated introduced volume reaches the target replacement volume.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of chemical waste liquid treatment technology, specifically to a method, apparatus, and system for treating waste liquid in a chemical workshop. Background Technology

[0002] In the field of fine chemical production, in order to save workshop space and construction costs, enterprises generally adopt a single-pipe shared, time-sharing discharge model, transporting multiple streams of waste liquids with significantly different properties to the wastewater treatment plant through the same pipeline. This model requires the same pipeline to alternately treat high-viscosity, easily wall-attached process mother liquor and low-viscosity equipment cleaning water, thus bringing about a general technical challenge in fluid displacement within the pipeline.

[0003] Currently, pipeline flushing operations typically rely on fixed time or volume parameters. This rigid strategy cannot adapt to dynamic fluctuations in waste liquid viscosity, rheological properties, and wall adhesion tendency. This leads to a dilemma in actual operation: insufficient flushing results in toxic mother liquor residue entering subsequent biological treatment systems, causing disruption; while excessive flushing mixes large amounts of clean water with high-concentration waste liquid, significantly increasing hazardous waste disposal costs. Ultimately, the reliability and economy of the entire replacement process cannot be guaranteed. Summary of the Invention

[0004] To address the current technical challenge of achieving precise and adaptive control of high-viscosity waste liquid replacement processes in chemical pipelines without relying on easily contaminated end-point online instruments, this invention aims to provide a method, apparatus, and system for treating waste liquid in chemical workshops. The specific technical solution adopted is as follows:

[0005] In a first aspect, the present invention provides a method for treating waste liquid in a chemical workshop, comprising: acquiring first current timing data of a pump motor and second current timing data based on clean water during the discharge of a current batch of waste liquid; determining a first characteristic parameter and a second characteristic parameter based on the first current timing data, the second current timing data, and a preset dynamic time warping algorithm; wherein the first characteristic parameter is used to characterize the degree of stretching of the current waveform on the time axis caused by the lag in the flow rate of the waste liquid, and the second characteristic parameter is used to characterize the degree of distortion in the amplitude shape of the current waveform caused by pipe wall residue; determining the target replacement volume required for the discharge of the current batch of waste liquid based on the first characteristic parameter and the second characteristic parameter; and, according to the target replacement volume, introducing a cleaning medium into the discharge pipe for replacement operation, and switching the flow direction at the end of the pipe when the accumulated introduced volume reaches the target replacement volume.

[0006] Secondly, the present invention provides a chemical workshop waste liquid treatment system, comprising: a data acquisition module, a feature extraction module, a volume calculation module, and a replacement execution module; the data acquisition module is used to acquire first current timing data of the motor of the delivery pump during the discharge of the current batch of waste liquid, and second current timing data based on clean water; the feature extraction module is used to determine a first feature parameter and a second feature parameter based on the first current timing data, the second current timing data, and a preset dynamic time warping algorithm; wherein, the first feature parameter is used to characterize the degree of stretching of the current waveform on the time axis caused by the lag of the waste liquid flow rate, and the second feature parameter is used to characterize the degree of distortion of the current waveform in amplitude shape caused by pipe wall residue; the volume calculation module is used to determine the target replacement volume required for the discharge of the current batch of waste liquid based on the first feature parameter and the second feature parameter; the replacement execution module is used to introduce cleaning medium into the discharge pipe to perform replacement operation according to the target replacement volume, and switch the flow direction at the end of the pipe when the accumulated introduced volume reaches the target replacement volume.

[0007] Thirdly, the present invention provides an electronic device, comprising: a processor and a memory; wherein the memory is used to store one or more programs, the one or more programs including computer-executable instructions, and when the electronic device is running, the processor executes the computer-executable instructions stored in the memory to cause the electronic device to perform the chemical workshop waste liquid treatment method as described in the first aspect and any possible implementation thereof.

[0008] The present invention has the following beneficial effects: by non-invasively analyzing the morphology and time axis distortion of the pump current waveform, it innovatively decouples two independent features characterizing the lag in waste liquid flow rate and the residue on the pipe wall. Based on this, it dynamically calculates the adaptive replacement volume through a nonlinear model, thereby achieving accurate, economical and reliable adaptive control of the replacement process of high-viscosity, easily adherent chemical waste liquid pipelines without relying on easily contaminated online instruments at the end. Attached Figure Description

[0009] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. 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.

[0010] Figure 1 This is a schematic diagram of the architecture of a chemical workshop waste liquid treatment system provided in one embodiment of the present invention;

[0011] Figure 2 This is a schematic flowchart of a method for treating waste liquid in a chemical workshop according to an embodiment of the present invention;

[0012] Figure 3 This is one of the structural schematic diagrams of a chemical workshop waste liquid treatment device provided in one embodiment of the present invention;

[0013] Figure 4 This is a second schematic diagram of a chemical workshop waste liquid treatment device provided in one embodiment of the present invention. Detailed Implementation

[0014] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the specific implementation methods, structures, features, and effects of the present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0015] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0016] In all division and logarithmic operations involved in this invention, a smoothing mechanism is employed to prevent computer program crashes or invalid values ​​from being generated due to a zero denominator or zero input. Specifically, a correction factor ε, which is a very small positive number, is superimposed on the denominator term of the division operation or the argument term of the logarithmic function, for example, a value of 10 to the power of negative 5, thereby ensuring the robustness and feasibility of the algorithm under extreme conditions.

[0017] The following description, in conjunction with the accompanying drawings, details the specific scheme of a chemical workshop waste liquid treatment method, apparatus, and system provided by the present invention.

[0018] For example, such as Figure 1 The diagram shown is a schematic representation of the architecture of a chemical workshop waste liquid treatment system (hereinafter referred to as the waste liquid treatment system) according to an embodiment of the present invention. The waste liquid treatment system 10 includes: a data acquisition module 11, a feature extraction module 12, a volume calculation module 13, a replacement execution module 14, and an update and optimization module 15. The modules are described below in sequence:

[0019] (1) Data acquisition module 11.

[0020] The data acquisition module 11 is responsible for collecting and preprocessing the core current signal used to analyze the rheological properties of waste liquid, providing standardized and comparable input data for subsequent feature decoupling.

[0021] Optionally, the data acquisition module 11 is used to acquire the first current timing data of the transfer pump motor and the second current timing data of the clean water reference during the discharge of the current batch of waste liquid.

[0022] Specifically, the data acquisition module 11 functions to cover system initialization calibration and online operation data acquisition. First, during system calibration, the data acquisition module 11 controls the delivery pump to extract clean water under constant operating conditions and acquires the motor current signal through a current transformer. After filtering and Z-Score normalization, the sequence representing the ideal load pattern of the clean water is stored as the second current time series data. Next, during wastewater discharge, the data acquisition module 11 determines the start of discharge based on pump operation and valve signals, and acquires raw current data in real time. Finally, the data acquisition module 11 sequentially performs Z-Score normalization and linear interpolation resampling on the acquired raw current data to align its length with the second current time series data, thereby obtaining the first current time series data that can be used for accurate comparison.

[0023] The first and second current timing data, whose lengths are consistent with the reference, output by the data acquisition module 11, are the direct inputs for the feature extraction module 12 to perform waveform analysis.

[0024] (2) Feature extraction module 12.

[0025] The feature extraction module 12 receives the first current time series data and the second current time series data from the data acquisition module 11. It is responsible for decoupling the coupling effect of the two physical states of "flow velocity lag" and "wall residue" in the flow of waste liquid on the current waveform, and extracting two independent and quantitative feature parameters.

[0026] Optionally, the feature extraction module 12 is used to determine a first feature parameter and a second feature parameter based on the first current time series data, the second current time series data, and a preset dynamic time warping algorithm. The first feature parameter characterizes the degree of stretching of the current waveform on the time axis caused by the lag in waste liquid flow rate, and the second feature parameter characterizes the degree of distortion in the amplitude shape of the current waveform caused by pipe wall residue.

[0027] In its implementation, the feature extraction module 12 embeds a dynamic time warping algorithm. First, this module calculates the optimal matching path between the first and second current time series data to align similar feature points of the two waveforms on the time axis. Then, based on the ratio of the total step size of this optimal matching path to the length of the second current time series data, the feature extraction module 12 calculates the first feature parameter. Finally, the feature extraction module 12 calculates the average amplitude difference of all matching point pairs on the optimal matching path and uses this as the second feature parameter.

[0028] The first and second feature parameters output by the feature extraction module 12 accurately quantify the rheological state of the waste liquid and are directly sent to the volume calculation module 13 as the core basis for dynamic decision-making.

[0029] (3) Volume calculation module 13.

[0030] The volume calculation module 13 receives two feature parameters output by the feature extraction module 12 and is responsible for calculating the target replacement volume required for the discharge of the current batch of waste liquid based on the built-in nonlinear compensation model and safety logic, thereby realizing the transformation from state perception to control command.

[0031] Optionally, the volume calculation module 13 is used to determine the target replacement volume required for the discharge of the current batch of waste liquid based on the first characteristic parameter and the second characteristic parameter.

[0032] Specifically, the volume calculation module 13 first performs core model calculations: the first characteristic parameter is input into a first nonlinear function (such as a logarithmic function) for processing to obtain a first compensation amount; the second characteristic parameter is input into a second nonlinear function (such as a square function) for processing to obtain a second compensation amount. Then, the basic replacement amount corresponding to a single pipe volume, the first compensation amount, and the second compensation amount are added to obtain the replacement volume ratio, which is then multiplied by a preset pipe physical volume to obtain the initial target replacement volume. Finally, the volume calculation module 13 performs a safety check: the calculated initial target replacement volume is compared with a preset maximum safe replacement volume, and the smaller of the two is taken as the final determined target replacement volume to prevent instruction errors due to calculation anomalies.

[0033] The target replacement volume ultimately determined by the volume calculation module 13 is the sole source of instructions for the replacement execution module 14 to perform precise flow control.

[0034] (4) Replacement execution module 14.

[0035] The replacement execution module 14 receives the target replacement volume command issued by the volume calculation module 13 and is responsible for precisely controlling the introduction of the cleaning medium and the switching of the flow direction at the end of the pipeline, and converting the calculation command into the actual physical replacement process.

[0036] Optionally, the replacement execution module 14 is used to introduce cleaning medium into the discharge pipe to perform a replacement operation according to the target replacement volume, and to switch the flow direction at the end of the pipe when the accumulated introduced volume reaches the target replacement volume.

[0037] Specifically, the replacement execution module 14 is linked with the field actuators via a controller. First, upon receiving an instruction, the module controls the activation of the flushing water pump and inlet valve to begin injecting the cleaning medium into the pipeline, and reads the inlet flow meter signal in real time to calculate the cumulative influent volume. During this process, the replacement execution module 14 controls the end diversion valve to remain pointing towards the high-concentration waste liquid collection tank. Finally, when the cumulative influent volume reaches the target replacement volume, the replacement execution module 14 immediately drives the end diversion valve to switch to the low-concentration regulating tank, marking the completion of this replacement cleaning.

[0038] The replacement execution module 14 completes the flow direction switching action, and at the same time triggers the start conditions of the update optimization module 15.

[0039] (5) Update and optimize module 15.

[0040] The update and optimization module 15 is an optimization module to enhance the long-term adaptability and economy of the system. It is responsible for evaluating the cleaning effect after each replacement by using sensor feedback in a relatively clean environment at the end of the pipeline, and dynamically adjusting the parameters of the nonlinear model in the volume calculation module 13 to form a closed-loop optimization.

[0041] Optionally, the update and optimization module 15 is used to obtain the purity feedback value of the cleaning medium at the end of the pipeline at a preset time after switching the flow direction at the end of the pipeline; and to adjust the compensation coefficient used to calculate the second compensation amount according to the deviation between the purity feedback value of the cleaning medium and the preset reference value.

[0042] Specifically, the update and optimization module 15 first starts after the valve switches and a delay period. At this time, it reads the measured value from the end-point water quality sensor as the feedback value for the purity of the cleaning medium and verifies its validity (e.g., within a reasonable range). Then, if the data is valid, it calculates the relative deviation between the feedback value and the clean water reference value. Finally, the update and optimization module 15 performs parameter adjustments based on this deviation: if the deviation is greater than a first threshold, the compensation coefficient is increased with a larger first adjustment step; if the deviation is less than a second threshold multiple times consecutively, the compensation coefficient is decreased with a smaller second adjustment step. The updated compensation coefficient is stored and used for the next batch of calculations, thus enabling the system to adapt to equipment aging.

[0043] For example, the first threshold can be set according to the allowable residual concentration of the cleaning process, such as 20%; the second threshold can be set according to the water-saving target, such as 5%; the first adjustment step can be 0.1, and the second adjustment step can be 0.02. The above values ​​can be adjusted according to actual water quality requirements and operational experience.

[0044] The above describes the waste liquid treatment system 10 and its included modules.

[0045] For example, such as Figure 2The diagram shown is a flow chart of a chemical workshop wastewater treatment method according to an embodiment of the present invention, including the following steps:

[0046] S201. Obtain the first current timing data of the transfer pump motor during the discharge of the current batch of waste liquid, and the second current timing data of the clean water reference.

[0047] For example, this step can be performed by the data acquisition module 11 in the waste liquid treatment system 10 described above, and specifically includes the following steps:

[0048] (1) During the system calibration stage, the motor current data of the delivery pump during the process of delivering clean water is obtained, and after standardization, it is stored as the second current timing data.

[0049] Specifically, when the pipeline is in a clean state, the data acquisition module 11 controls the delivery pump to extract clean water under stable operating conditions (such as constant motor speed, voltage, and other operating parameters), while simultaneously acquiring the raw three-phase current signal during motor operation via a current sensor. Then, the data acquisition module 11 filters this raw signal to eliminate high-frequency noise and performs Z-Score normalization to eliminate the dimensional effects of grid voltage fluctuations. Finally, the obtained current sequence, representing the ideal flow load pattern of the clean water, is used as a "constant comparison benchmark" and stored as the second current time series data for the clean water benchmark.

[0050] (2) During the waste liquid discharge stage, the original current data of the delivery pump motor is collected, and the original current data is standardized and resampled to obtain the first current time series data.

[0051] Specifically, the data acquisition module 11 first determines the start of the wastewater discharge process based on the operating status signal of the transfer pump and the opening signal of the wastewater discharge source valve. Then, it activates the high-speed acquisition circuit to record the raw current data of the transfer pump motor in real time. For the acquired raw current data, the data acquisition module 11 first performs Z-Score standardization processing, the same as in the calibration stage. Finally, to address the data length differences caused by varying discharge durations in different batches, the data acquisition module 11 resamples the standardized sequence using a linear interpolation algorithm, ensuring that the number of data points matches the stored second current time-series data, thus obtaining first current time-series data that can be used for accurate waveform comparison.

[0052] Thus, by first calibrating the clean water benchmark and then collecting and preprocessing the waste liquid current data in real time, the data acquisition module 11 provides standardized current sequence pairs with consistent length and dimensionless differences for subsequent analysis, laying the foundation for non-invasive sensing.

[0053] S202. Based on the first current timing data, the second current timing data, and the preset dynamic time warping algorithm, determine the first characteristic parameter and the second characteristic parameter. The first characteristic parameter characterizes the degree of stretching of the current waveform on the time axis caused by the lag in waste liquid flow rate, and the second characteristic parameter characterizes the degree of distortion in the amplitude shape of the current waveform caused by pipe wall residue.

[0054] For example, this step can be performed by the feature extraction module 12 in the waste liquid treatment system 10 described above. Specifically, the feature extraction module 12 calculates the optimal matching path between the first current time series data and the second current time series data using an embedded dynamic time warping algorithm, thereby aligning the similar morphological points of the two waveforms on the time axis; then, based on the ratio of the total step size of the optimal matching path to the length of the second current time series data, it determines the first feature parameter; and based on the average value of the amplitude difference of all matching point pairs on the path, it determines the second feature parameter. It should be noted that the specific process of the aforementioned sub-steps can be found in S301-S303 below, and will not be repeated here.

[0055] In another possible implementation, the feature extraction module 12 can also obtain the first feature parameter by calculating the ratio of the maximum number of consecutively repeated matching points on the optimal matching path to the total step length of the path. This method focuses more on identifying local segments in the waveform that are significantly stretched and is more sensitive to sudden changes in flow velocity.

[0056] In another possible implementation, the feature extraction module 12 can also obtain the second feature parameter by calculating the standard deviation of the amplitude difference between all matching points on the optimal matching path when extracting the second feature parameter. This method focuses on evaluating the severity of waveform distortion fluctuations and can better distinguish between uniform wall adhesion and local agglomeration.

[0057] Thus, the feature extraction module 12 uses a dynamic time warping algorithm to decouple two independent feature parameters, namely "flow velocity lag" and "wall residue", from the coupled current waveform, thereby achieving a non-invasive and quantitative assessment of the complex rheological state of the waste liquid.

[0058] S203. Determine the target replacement volume required for the discharge of the current batch of waste liquid based on the first characteristic parameter and the second characteristic parameter.

[0059] For example, this step can be performed by the volume calculation module 13 in the waste liquid treatment system 10 described above, specifically including: the volume calculation module 13 first processes the first characteristic parameter through a first nonlinear function to obtain a first compensation amount, and processes the second characteristic parameter through a second nonlinear function to obtain a second compensation amount; then, it adds the basic replacement amount corresponding to a single pipe volume, the first compensation amount, and the second compensation amount to obtain the replacement volume ratio; then, it multiplies the ratio by a preset pipe physical volume to obtain the initial target replacement volume; finally, it compares the initial target replacement volume with a preset maximum safe replacement volume, and takes the smaller value of the two as the final determined target replacement volume. It should be noted that the specific process of the aforementioned sub-steps can be found in S401-S403 below, and will not be repeated here.

[0060] In another possible implementation, the volume calculation module 13 can also employ a simplified linear compensation model when determining the target replacement volume required for the discharge of the current batch of waste liquid. This model multiplies the first characteristic parameter and the second characteristic parameter by a fixed empirical coefficient, adds them together, and then sums them with the base replacement amount to obtain the replacement volume ratio. This method is simpler to calculate and is suitable for application scenarios where the fluid properties are relatively stable and the economic requirements are not extreme.

[0061] Therefore, the volume calculation module 13 introduces nonlinear compensation terms for flow velocity lag and wall residue respectively, and scientifically integrates the two characteristic parameters into a displacement volume command. This command can ensure thorough rinsing, prevent over-rinsing, and avoid extreme outliers through safety checks.

[0062] S204. According to the target replacement volume, the cleaning medium is introduced into the discharge pipe to carry out the replacement operation, and when the cumulative introduced volume reaches the target replacement volume, the flow direction at the end of the pipe is switched.

[0063] For example, this step can be performed by the displacement execution module 14 in the waste liquid treatment system 10 described above.

[0064] Specifically, after receiving the target replacement volume command from the volume calculation module 13, the replacement execution module 14 first controls the start of the cleaning medium delivery pump and the corresponding inlet valve to begin injecting cleaning medium (such as clean water) into the discharge pipeline. During this process, the replacement execution module 14 reads the signal from the high-precision flow meter installed on the cleaning medium pipeline in real time and continuously calculates the cumulative inflow volume since the start of self-flushing through integral calculation. At the same time, it controls the diversion valve at the end of the pipeline to keep pointing towards the high-concentration waste liquid collection tank. Finally, when the replacement execution module 14 detects that the cumulative inflow volume has reached the target replacement volume, it immediately sends an electrical control signal to the end diversion valve, driving it to switch the flow direction from the high-concentration waste liquid collection tank to the low-concentration wastewater regulating tank, thereby completing this replacement cleaning operation.

[0065] Thus, the displacement execution module 14, through closed-loop flow control and precise valve action, accurately translates the calculated target displacement volume command into a cleaning operation in the physical world, ensuring the effective execution of the decision.

[0066] Based on the above technical solution, this invention innovatively decouples two independent features characterizing waste liquid flow lag and pipe wall residue by non-invasively analyzing the morphology and time axis distortion of the pump current waveform. Based on this, the adaptive replacement volume is dynamically calculated through a nonlinear model, thereby achieving accurate, economical and reliable adaptive control of the replacement process of high-viscosity, easily wall-attached chemical waste liquid pipelines without relying on easily contaminated online instruments at the end.

[0067] For example, in another method for treating waste liquid in a chemical workshop provided by an embodiment of the present invention, the first characteristic parameter and the second characteristic parameter are determined based on the first current time series data, the second current time series data, and a preset dynamic time warping algorithm, specifically including the following steps:

[0068] S301. Calculate the optimal matching path between the first current timing data and the second current timing data.

[0069] In this step, the feature extraction module 12 calculates the first current time series data using a preset Dynamic Time Warping (DTW) algorithm. ,...,s_m} and the second current timing data of the clear water reference Optimal matching path between q_n, ..., q_n The path is a sequence of index pairs, where each index pair... This means matching the i-th point of the waste liquid data with the j-th point of the clean water data. The calculation process is as follows:

[0070] Feature extraction module 12 first constructs an m×n cumulative cost matrix D, where each element Indicates starting from the origin Time The minimum cumulative distance for any point. Its cumulative distance Local distance from that point (usually Euclidean distance) (and the predecessor point that can reach this point) , , The minimum cumulative distances are summed to obtain the result, i.e.:

[0071]

[0072] Initialization at the start of computation After filling in the complete cumulative cost matrix, from the endpoint To begin, backtrack to the starting point based on the principle of minimizing cumulative cost. The sequence of path points traversed is the optimal matching path. This algorithm can effectively align two similar sequences that exhibit nonlinear stretching or compression on the time axis.

[0073] S302. Determine the first characteristic parameter based on the ratio between the total step size of the optimal matching path and the length of the second current timing data.

[0074] Furthermore, the feature extraction module 12 calculates the first feature parameter using the following formula:

[0075]

[0076] In the above formula, The first characteristic parameter quantifies the flow rate lag effect caused by the higher viscosity of wastewater compared to clean water. A value greater than 0 indicates that the wastewater discharge is slower than the clean water baseline, equal to 0 indicates synchronization, and less than 0 (theoretically invalid) indicates that it is faster than the baseline. k represents the total step size of the optimal matching path, i.e., the number of index pairs contained in the path. n represents the second current time series data of the clean water baseline. The length of the data is the total number of data points.

[0077] It should be noted that the total step size k of the optimal matching path in the above formula is essentially the waste liquid sequence. Stretch or compress on the timeline to align the clear water sequence. The number of steps taken. Ideally, if the two sequences are completely synchronized (i.e., the flow rate of waste liquid is the same as that of clean water), then the path is a diagonal line from (1,1) to (m,n), in which case k≈n (m is approximately equal to n). ≈0. When the overall flow rate of the waste liquid slows down due to high viscosity, its current waveform is stretched on the time axis (m>n). To align, the DTW algorithm needs to insert more "wait" or horizontal / vertical movement steps in the path, making k>n, thus leading to... >0. The higher the value, the more severe the lag in flow rate of the waste liquid relative to the clean water.

[0078] S303. Determine the second feature parameter based on the average value of the amplitude difference of all matching point pairs on the optimal matching path.

[0079] For example, the feature extraction module 12 calculates the second feature parameter using the following formula:

[0080]

[0081] in, The second characteristic parameter is used to quantify the degree of distortion in the amplitude shape of the current waveform caused by solid particles adhering to the wall or fluid heterogeneity in the waste liquid. The larger the value, the more severe the waveform distortion, which indirectly reflects the higher risk of pipe wall residue; k represents the total step size of the optimal matching path Path. This represents the index of a matching point pair in the optimal matching path; This represents the amplitude of the i-th data point in the first current time series data; This represents the amplitude of the j-th data point in the second current time-series data of the clear water reference. This represents the absolute difference in magnitude between corresponding matched point pairs; This represents the summation of the absolute differences in magnitude among all k matching point pairs on the path Path.

[0082] Understandably, after aligning the timeline using DTW, The calculation measures the average amplitude difference between two aligned waveforms at their corresponding matching points. Even if the wastewater flow rate is the same as that of the clean water ( If the waste liquid contains substances that easily adhere to the wall or has complex rheological properties, its flow resistance characteristics will change, causing the load current waveform (amplitude) of the driving pump to be distorted and differ from the reference waveform of clean water. By averaging the differences across all matching points, the effect of simple time stretching (due to...) is eliminated. The influence of characterization was independently extracted to reflect the fluid composition or pipe wall condition (wall residue). The larger the value, the further the current waveform deviates from the ideal clear water state, indicating a more serious wall residue or fluid unevenness problem.

[0083] Based on the above technical solution, this embodiment of the invention accurately aligns the current waveforms of waste liquid and clean water using a dynamic time warping algorithm, and decouples two independent characteristic parameters, "flow velocity lag" and "waveform distortion," from the path step size ratio and the amplitude difference at the matching point, respectively. This achieves indirect, non-invasive, and quantitative accurate sensing of the complex rheological state of high-viscosity, easily wall-attached waste liquid, providing key and reliable input parameters for subsequent adaptive calculation of flushing volume. This is the core technical link that enables this method to achieve precise control without relying on end sensors.

[0084] For example, in another method for treating waste liquid in a chemical workshop provided by an embodiment of the present invention, the target replacement volume required for the discharge of the current batch of waste liquid is determined according to a first characteristic parameter and a second characteristic parameter, specifically including the following steps:

[0085] It should be noted that, in order to scientifically quantify the two decoupled rheological features (i.e., the first characteristic parameter and the second characteristic parameter) into compensation values ​​for the flushing water volume, this application introduces a nonlinear compensation model. This model compensates for flow velocity hysteresis and wall residue respectively, and specifically includes the following calculation steps S401 to S403.

[0086] S401. Determine the first compensation amount based on the first characteristic parameter and the first nonlinear function. The first nonlinear function is a logarithmic function.

[0087] In this step, the feature extraction module 12 will extract the first feature parameters. The input is a preset first nonlinear function (i.e., a logarithmic function) processed to obtain the first compensation amount. The specific calculation formula is as follows:

[0088]

[0089] in, This indicates the first compensation amount, used to characterize the additional cleaning amount required due to the lag in waste liquid flow rate; α represents the first characteristic parameter, calculated in step S302; a larger value indicates a slower waste liquid flow rate. α represents the flow rate compensation gain, a preset constant used to adjust the system's sensitivity to flow rate hysteresis effects; for example, an empirical value of 0.5 can be used. η represents the scaling factor, a preset constant used to scale the flow rate. The numerical range of is adjusted to the appropriate input range of the logarithmic function, for example, the empirical value of 10.0 can be taken; ln(⋅) represents the natural logarithm function.

[0090] It should be noted that the above formula uses the mathematical properties of the natural logarithm function ln(⋅) to simulate the "saturation" effect of fluid velocity recovery. When the degree of velocity lag ( When the logarithmic function output value is small, it increases rapidly, and the system will increase the flushing water volume accordingly to compensate for the tailing effect; when When the flow rate becomes very large (i.e., extremely slow), the growth rate of the logarithmic function tends to level off, effectively preventing the calculation of astronomical flushing volumes in extreme cases and avoiding excessive waste of water resources. The coefficients α and η are used for engineering parameter tuning to match the specific needs of different piping systems and fluid characteristics.

[0091] S402. Determine the second compensation amount based on the second characteristic parameter and the second nonlinear function. The second nonlinear function is a square function.

[0092] In this step, the feature extraction module 12 extracts the second feature parameter. The second nonlinear function (i.e., a square function) is input and processed to obtain the second compensation amount. The specific calculation formula is as follows:

[0093]

[0094] in, This indicates the second compensation amount, used to characterize the additional scouring intensity required due to pipe wall residue; The second characteristic parameter, calculated in step S303, represents the second characteristic parameter. A larger value indicates more severe waveform distortion, indirectly reflecting a higher degree of wall adhesion. γ represents the compensation coefficient, an adjustable parameter with corresponding dimensions, used to... The squared value is converted into a dimensionless compensation quantity, the initial value of which can be set to the default value (e.g., 2.0A⁻²), and is adaptively updated through a feedback mechanism during system operation to adjust the influence weight of the wall adhesion characteristics on the total flushing volume.

[0095] It should be noted that the above formula uses the mathematical properties of square functions to simulate the "non-linear" difficulty required to remove stubborn plaque. As the degree of plaque ( As the laminar boundary layer adhesion and stripping difficulty increase, the required strength increases exponentially. The square term ensures a moderate increase in flushing water volume when slight wall adhesion is detected, while a significant and rapid increase in flushing water volume is implemented when severe wall adhesion is detected to provide sufficient flushing force to strip the residue from the pipe wall. The coefficient γ, as a gain, allows the system to dynamically adjust the emphasis on this term based on long-term operating results.

[0096] S403. Determine the target replacement volume based on the preset pipeline volume, foundation replacement amount, first compensation amount, and second compensation amount.

[0097] For example, the feature extraction module 12 determines the target replacement volume based on the preset pipe volume, basic replacement amount, first compensation amount, and second compensation amount, including the following steps:

[0098] (1) Determine the initial target replacement volume based on the preset pipeline volume, basic replacement amount, first compensation amount and second compensation amount.

[0099] Specifically, the feature extraction module 12 calculates the initial target permutation volume using the following formula:

[0100]

[0101] in, This represents the calculated initial target displacement volume; The preset physical volume of the pipeline is a fixed constant determined based on pipeline design drawings or measured data; B represents the basic replacement volume, which has a value of 1, corresponding to the minimum volume of cleaning medium theoretically required to replace the entire pipeline volume. This represents the first compensation amount determined by step S401; This represents the second compensation amount determined by step S402.

[0102] Understandably, the above formula adds the basic requirement (1 times the pipe volume), the compensation for flow lag (Clag), and the compensation for wall residue (Cdiff) to obtain a total displacement volume ratio. This ratio is then multiplied by the pipe's physical volume. Multiplying them together yields the result that satisfies the current rheological state of the waste liquid (from...). and Theoretical flushing volume (characterized) .

[0103] (2) The smaller value between the initial target displacement volume and the preset maximum safe displacement volume is determined as the target displacement volume.

[0104] Furthermore, the feature extraction module 12 performs a safety circuit breaker check and determines the final target replacement volume through the following logic:

[0105]

[0106] in, Indicates the final target permutation volume; This indicates that the smaller of the two parameters within the parentheses should be selected. This represents the preset maximum safe replacement ratio, which is a constant.

[0107] It should be noted that the above formula is to prevent errors caused by abnormal sensor signals, algorithm calculation errors, or other extreme operating conditions. The system calculates abnormally large values, which could lead to severe water waste or even localized flooding accidents. To address this, a safety circuit breaker mechanism is introduced. This mechanism will trigger a circuit breaker based on the calculated initial target volume. With a preset safety limit ( Compare them. If If it does not exceed this limit, then use As the instruction value; if If the value exceeds this limit, the system will force the system to use the safety limit value as the final instruction value. And record the exception log.

[0108] For example, maximum safe displacement ratio The value is determined based on a comprehensive consideration of engineering safety redundancy and economic benefits. For example, an empirical value of 5.0 can be used, representing that the maximum flushing volume does not exceed 5 times the physical volume of the pipeline. This value must ensure that it can play a protective role in most abnormal situations, while not being overly conservative to the point of affecting the cleaning effect under normal operating conditions.

[0109] Based on the above technical solution, this embodiment of the invention introduces nonlinear compensation models for velocity hysteresis (logarithmic function) and wall residue (square function), respectively, to scientifically quantify the two decoupled rheological characteristics into compensation values ​​for flushing water volume. This model can accurately respond to different rheological states: the logarithmic term prevents unrealistically large water volumes at extremely low flow rates, reflecting economic efficiency; the square term ensures sufficient flushing force for severe wall residue conditions, reflecting thoroughness. Furthermore, by summing the compensation amount with the basic replacement amount and multiplying it by the pipe capacity to obtain the theoretical value, and then outputting the final command after a safety fuse check, this embodiment achieves accurate and adaptive flushing decisions while ensuring the system's engineering robustness and operational safety.

[0110] In this embodiment of the invention, the waste liquid treatment device for a chemical workshop can be divided into functional modules or functional units according to the above method example. For example, each function can be divided into its own functional modules or functional units, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module or functional unit. The module or unit division in this embodiment is illustrative and represents only one logical functional division; in actual implementation, other division methods may be used.

[0111] For example, such as Figure 3 The diagram shown is a possible structural schematic of a chemical workshop wastewater treatment device according to an embodiment of the present invention. The chemical workshop wastewater treatment device 500 includes: an acquisition unit 501 and a treatment unit 502;

[0112] The acquisition unit 501 is used to acquire the first current timing data of the motor of the transfer pump during the discharge of the current batch of waste liquid, and the second current timing data of the clean water reference.

[0113] The processing unit 502 is used to determine a first characteristic parameter and a second characteristic parameter based on the first current timing data, the second current timing data, and a preset dynamic time warping algorithm. The first characteristic parameter characterizes the degree of stretching of the current waveform on the time axis caused by the lag in waste liquid flow rate, and the second characteristic parameter characterizes the degree of distortion in the amplitude shape of the current waveform caused by pipe wall residue.

[0114] The processing unit 502 is also configured to determine the target replacement volume required for the discharge of the current batch of waste liquid based on the first characteristic parameter and the second characteristic parameter.

[0115] The processing unit 502 is also used to introduce cleaning medium into the discharge pipe to perform a replacement operation according to the target replacement volume, and to switch the flow direction at the end of the pipe when the accumulated introduced volume reaches the target replacement volume.

[0116] The processing unit 502 is also used to acquire motor current data during the process of the delivery pump delivering clean water during the system calibration stage, and store it as second current timing data after standardization processing.

[0117] The processing unit 502 is also used to collect the raw current data of the delivery pump motor during the waste liquid discharge stage, and to perform standardization and resampling processing on the raw current data to obtain the first current time series data.

[0118] The processing unit 502 is also used to calculate the optimal matching path between the first current timing data and the second current timing data.

[0119] The processing unit 502 is also used to determine the first characteristic parameter based on the ratio between the total step size of the optimal matching path and the length of the second current timing data.

[0120] The processing unit 502 is also used to determine the second feature parameter based on the average value of the magnitude difference of all matching point pairs on the optimal matching path.

[0121] The processing unit 502 is further configured to determine a first compensation amount based on the first characteristic parameter and the first nonlinear function. The first nonlinear function is a logarithmic function.

[0122] The processing unit 502 is further configured to determine a second compensation amount based on the second characteristic parameter and the second nonlinear function. The second nonlinear function is a square function.

[0123] The processing unit 502 is also used to determine the target replacement volume based on the preset pipeline volume, the basic replacement amount, the first compensation amount, and the second compensation amount.

[0124] The processing unit 502 is also used to determine the initial target replacement volume based on the preset pipeline volume, basic replacement amount, first compensation amount and second compensation amount.

[0125] The processing unit 502 is further configured to determine the smaller value between the initial target displacement volume and the preset maximum safe displacement volume as the target displacement volume.

[0126] The processing unit 502 is also used to obtain the purity feedback value of the cleaning medium at the end of the pipeline at a preset time after switching the flow direction at the end of the pipeline.

[0127] The processing unit 502 is also used to adjust the compensation coefficient used to calculate the second compensation amount based on the deviation between the feedback value of the purity of the cleaning medium and the preset reference value.

[0128] The processing unit 502 is also used to calculate the relative deviation between the cleaning medium purity feedback value and the preset reference value when it is determined that the cleaning medium purity feedback value is valid.

[0129] The processing unit 502 is also configured to increase the compensation coefficient by a first adjustment step if the relative deviation is greater than the first threshold.

[0130] The processing unit 502 is further configured to reduce the compensation coefficient by a second adjustment step size if the relative deviation is less than the second threshold multiple times consecutively. The second adjustment step size is smaller than the first adjustment step size.

[0131] The processing unit 502 is also used to determine the start of the waste liquid discharge process based on the operating status signal of the transfer pump and the valve status signal of the waste liquid discharge source.

[0132] Optionally, the chemical plant waste liquid treatment device 500 may also include a storage unit ( Figure 3 (shown in dashed box) The storage unit stores a program or instruction. When the acquisition unit 501 and the processing unit 502 execute the program or instruction, the chemical workshop waste liquid treatment device can perform the chemical workshop waste liquid treatment method of the above method embodiment.

[0133] also, Figure 3 The technical effects of the chemical workshop waste liquid treatment device can be referred to the technical effects of the chemical workshop waste liquid treatment method in the above embodiments, and will not be repeated here.

[0134] For example, Figure 4 This is another possible structural schematic diagram of the chemical workshop wastewater treatment device involved in the above embodiments. For example... Figure 4 As shown, the chemical workshop waste liquid treatment device 600 includes: processor 602.

[0135] The processor 602 is used to control and manage the operation of the chemical workshop waste liquid treatment device 500, for example, to execute the steps performed by the acquisition unit 501 and the processing unit 502 in the chemical workshop waste liquid treatment device 500, and / or to execute other processes of the technical solution described herein.

[0136] The processor 602 described above can implement or execute various exemplary logic blocks, modules, and circuits described in connection with the present invention. The processor can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in connection with the present invention. The processor can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0137] Optionally, the chemical plant waste liquid treatment device 600 may further include a communication interface 603, a memory 601, and a bus 604. The communication interface 603 supports communication between the chemical plant waste liquid treatment device 600 and other network entities. The memory 601 stores the program code and data of the chemical plant waste liquid treatment device.

[0138] The memory 601 may be a memory in a chemical workshop waste liquid treatment device. The memory may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk or solid-state drive; the memory may also include a combination of the above types of memory.

[0139] Bus 604 can be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 604 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0140] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and module described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0141] This invention provides a computer program product containing instructions. When the computer program product is run on the electronic device of this invention, it causes the computer to execute the chemical workshop waste liquid treatment method described in the above method embodiment.

[0142] This invention also provides a computer-readable storage medium storing instructions. When a computer executes these instructions, the electronic device of this invention performs each step of the chemical workshop waste liquid treatment device in the method flow shown in the above-described method embodiments.

[0143] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), registers, hard disks, optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof, or any other form of computer-readable storage medium in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium may also be a component of the processor. The processor and the storage medium may reside in an application-specific integrated circuit (ASIC). In embodiments of the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0144] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0145] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

Claims

1. A method for treating waste liquid in a chemical workshop, characterized in that, The method includes: Acquire the first current timing data of the transfer pump motor during the discharge of the current batch of waste liquid, and the second current timing data of the clean water reference. Based on the first current timing data, the second current timing data, and the preset dynamic time warping algorithm, a first feature parameter and a second feature parameter are determined; wherein, the first feature parameter is used to characterize the degree of stretching of the current waveform on the time axis caused by the lag of the waste liquid flow rate, and the second feature parameter is used to characterize the degree of distortion of the current waveform in amplitude shape caused by pipe wall residue. Based on the first characteristic parameter and the second characteristic parameter, determine the target replacement volume required for the discharge of the current batch of waste liquid; According to the target replacement volume, a cleaning medium is introduced into the discharge pipe to perform a replacement operation, and when the cumulative introduced volume reaches the target replacement volume, the flow direction at the end of the pipe is switched. Obtain the first current timing data of the transfer pump motor during the discharge of the current batch of waste liquid, and the second current timing data based on clean water, specifically including: During the system calibration phase, the motor current data of the delivery pump during the process of delivering clean water is acquired, and after standardization processing, it is stored as the second current timing data. During the waste liquid discharge stage, the raw current data of the delivery pump motor is collected, and the raw current data is standardized and resampled to obtain the first current time series data. Based on the first current timing data, the second current timing data, and a preset dynamic time warping algorithm, the first feature parameter and the second feature parameter are determined, specifically including: Calculate the optimal matching path between the first current timing data and the second current timing data; The first feature parameter is determined based on the ratio between the total step size of the optimal matching path and the length of the second current timing data. The second feature parameter is determined based on the average magnitude difference of all matching point pairs on the optimal matching path; Based on the first characteristic parameter and the second characteristic parameter, the target replacement volume required for the discharge of the current batch of waste liquid is determined, specifically including: A first compensation amount is determined based on the first characteristic parameter and the first nonlinear function; wherein, the first nonlinear function is a logarithmic function; The second compensation amount is determined based on the second characteristic parameter and the second nonlinear function; wherein the second nonlinear function is a square function. The target replacement volume is determined based on the preset pipeline volume, the basic replacement amount, the first compensation amount, and the second compensation amount.

2. The method for treating waste liquid in a chemical workshop according to claim 1, characterized in that, The target replacement volume is determined based on the preset pipeline volume, foundation replacement amount, first compensation amount, and second compensation amount, specifically including: The initial target replacement volume is determined based on the preset pipeline volume, the foundation replacement amount, the first compensation amount, and the second compensation amount; The smaller value between the initial target displacement volume and the preset maximum safe displacement volume is determined as the target displacement volume.

3. The method for treating waste liquid in a chemical workshop according to claim 1, characterized in that, The method further includes: At a preset time after switching the flow direction at the end of the pipeline, obtain the purity feedback value of the cleaning medium at the end of the pipeline; The compensation coefficient used to calculate the second compensation amount is adjusted based on the deviation between the purity feedback value of the cleaning medium and the preset benchmark value.

4. The method for treating waste liquid in a chemical workshop according to claim 3, characterized in that, The step of adjusting the compensation coefficient used to calculate the second compensation amount based on the deviation between the purity feedback value of the cleaning medium and the preset benchmark value specifically includes: When the purity feedback value of the cleaning medium is determined to be valid, the relative deviation between the purity feedback value of the cleaning medium and the preset benchmark value is calculated. If the relative deviation is greater than the first threshold, the compensation coefficient is increased by a first adjustment step. If the relative deviation is less than the second threshold multiple times consecutively, the compensation coefficient is reduced by a second adjustment step size; wherein the second adjustment step size is less than the first adjustment step size.

5. The method for treating waste liquid in a chemical workshop according to claim 1, characterized in that, Before acquiring the first current timing data of the transfer pump motor during the current batch of waste liquid discharge, the method further includes: The start of the waste liquid discharge process is determined based on the operating status signal of the delivery pump and the valve status signal of the waste liquid discharge source.

6. A waste liquid treatment system for a chemical workshop, characterized in that, The system includes: a data acquisition module, a feature extraction module, a volume calculation module, and a permutation execution module; The data acquisition module is used to acquire the first current timing data of the conveying pump motor and the second current timing data of the clean water reference during the discharge of the current batch of waste liquid. The feature extraction module is used to determine a first feature parameter and a second feature parameter based on the first current time series data, the second current time series data and a preset dynamic time warping algorithm; wherein, the first feature parameter is used to characterize the degree of stretching of the current waveform on the time axis caused by the lag of the waste liquid flow rate, and the second feature parameter is used to characterize the degree of distortion of the current waveform in amplitude shape caused by pipe wall residue. The volume calculation module is used to determine the target replacement volume required for the discharge of the current batch of waste liquid based on the first feature parameter and the second feature parameter; The replacement execution module is used to introduce cleaning medium into the discharge pipe to perform a replacement operation according to the target replacement volume, and to switch the flow direction at the end of the pipe when the accumulated introduced volume reaches the target replacement volume; Obtain the first current timing data of the transfer pump motor during the discharge of the current batch of waste liquid, and the second current timing data based on clean water, specifically including: During the system calibration phase, the motor current data of the delivery pump during the process of delivering clean water is acquired, and after standardization processing, it is stored as the second current timing data. During the waste liquid discharge stage, the raw current data of the delivery pump motor is collected, and the raw current data is standardized and resampled to obtain the first current time series data. When determining the first feature parameter and the second feature parameter based on the first current timing data, the second current timing data, and the preset dynamic time warping algorithm, the specific steps include: Calculate the optimal matching path between the first current timing data and the second current timing data; The first feature parameter is determined based on the ratio between the total step size of the optimal matching path and the length of the second current timing data. The second feature parameter is determined based on the average magnitude difference of all matching point pairs on the optimal matching path; Based on the first characteristic parameter and the second characteristic parameter, the target replacement volume required for the discharge of the current batch of waste liquid is determined, specifically including: A first compensation amount is determined based on the first characteristic parameter and the first nonlinear function; wherein, the first nonlinear function is a logarithmic function; The second compensation amount is determined based on the second characteristic parameter and the second nonlinear function; wherein the second nonlinear function is a square function. The target replacement volume is determined based on the preset pipeline volume, the basic replacement amount, the first compensation amount, and the second compensation amount.

7. A waste liquid treatment device for a chemical workshop, characterized in that, include: A processor and a memory; wherein the memory is used to store computer execution instructions, and when the chemical workshop waste liquid treatment device is running, the processor executes the computer execution instructions stored in the memory to cause the chemical workshop waste liquid treatment device to perform the chemical workshop waste liquid treatment method as described in any one of claims 1-5.