Method for generating chemical production wastewater treatment system control model

Through online monitoring and chemical engineering simulation, combined with high-definition industrial cameras and image processing technology, the control defects in the wastewater treatment system are identified and corrected, and the problem of relying on manual intervention and lack of adaptability in traditional methods is solved, and the efficient and stable operation of the wastewater treatment system is achieved.

CN119556575AActive Publication Date: 2025-03-04SHENZHEN JINGHENGYU ENVIRONMENTAL TECH CO LTD

Patent Information

Application Number
CN202510127792.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-05
Publication Date
2025-03-04
Estimated Expiration
2045-02-05

AI Technical Summary

Technical Problem

The correction of the traditional wastewater treatment system control model relies on manual intervention and lacks adaptability, resulting in the failure to detect control defects in a timely manner or make mistakes in judgment, affecting the stability and efficiency of the system.

Method used

Chemical wastewater data is collected through online monitoring instruments, chemical engineering simulation software is used to build a wastewater control model, and combined with high-definition industrial cameras and image processing technology to identify centrifugal pump leakage and pipeline locations, and model correction and optimization are carried out.

Benefits of technology

It realizes accurate judgment and model optimization in the wastewater recovery control stage, timely discovers control abnormalities, improves the stability and efficiency of the system, reduces the risks of manual misjudgment and misjudgment, and improves the system's adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119556575A_ABST
    Figure CN119556575A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of wastewater treatment, in particular to a generation method for a chemical production wastewater treatment system control model. The method comprises the following steps: collecting chemical wastewater data by using an online monitoring instrument, wherein the chemical wastewater data comprises tin-containing wastewater data and etching liquid waste liquid data; determining a wastewater recovery control stage according to the chemical wastewater data; constructing a wastewater control model by utilizing chemical engineering simulation software based on the wastewater recovery control stage; inputting the chemical wastewater data into a wastewater control model, simulating a wastewater recovery control process by using simulation software to obtain wastewater recovery control data, and performing control abnormality judgment on the wastewater recovery control data to obtain abnormal wastewater data; the high-definition industrial camera is used for collecting images of the waste water sedimentation tank, and a centrifugal pump image is recognized and obtained from the images of the waste water sedimentation tank. According to the method, wastewater recovery control is optimized based on a wastewater treatment technology, and the wastewater recovery efficiency and the anomaly detection rate are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of wastewater treatment, and in particular to a method for generating a control model for a chemical production wastewater treatment system. Background Art

[0002] In traditional methods, the correction of wastewater control models is usually based on the identification results of centrifugal pump leakage. However, this correction process is more dependent on manual intervention and lacks adaptive capabilities. If the control defects are not discovered in time or the judgment is wrong, the correction of the control model will be delayed, which will affect the stability and efficiency of the entire wastewater treatment system. In traditional methods, the recognition and processing of wastewater sedimentation tank images mainly rely on manually set preset parameters. The image processing process is relatively simple and lacks intelligent analysis methods. This manual adjustment method not only increases labor costs, but also leads to misjudgments and missed judgments, affecting the accuracy and efficiency of image recognition. Although traditional methods make abnormal judgments in wastewater recovery control data, they cannot effectively respond to sudden abnormal situations due to the relatively simple monitoring methods and early warning mechanisms. For example, problems such as centrifugal pump leakage and pipeline corrosion are often difficult to detect in time in the early stages, resulting in the inability to quickly identify and process abnormal data, thereby affecting the reliability and safety of the wastewater treatment system. Summary of the invention

[0003] Based on this, it is necessary for the present invention to provide a method for generating a control model for a chemical production wastewater treatment system to solve at least one of the above technical problems.

[0004] To achieve the above object, a method for generating a control model for a chemical production wastewater treatment system comprises the following steps: Step S1: using online monitoring instruments to collect chemical wastewater data, including tin-containing wastewater data and etching liquid wastewater data; determining the wastewater recovery control stage according to the chemical wastewater data; and constructing a wastewater control model based on the wastewater recovery control stage and using chemical engineering simulation software; Step S2: inputting chemical wastewater data into the wastewater control model, and using simulation software to simulate the wastewater recovery control process to obtain wastewater recovery control data, and performing control abnormality judgment on the wastewater recovery control data to obtain abnormal wastewater data; Step S3: using a high-definition industrial camera to collect an image of the wastewater sedimentation tank, and identifying and obtaining an image of the centrifugal pump from the image of the wastewater sedimentation tank; locating the pipeline position based on the centrifugal pump image to obtain pipeline position data; obtaining a pipeline liquid image based on the pipeline position data, and performing color detection. If the color of the pipeline liquid does not meet the preset color value, it is determined that the centrifugal pump is leaking; Step S4: Identify the control defects of the centrifugal pump leakage, perform model correction on the wastewater control model based on the control defects, and generate a wastewater optimization control model.

[0005] The present invention collects chemical wastewater data by using online monitoring instruments and constructs a wastewater control model by simulation software, so as to realize accurate judgment and model optimization of the wastewater recovery control stage. Through the simulation and abnormal judgment of wastewater recovery control data, the control abnormality occurring in the wastewater recovery process can be found in time, and then the abnormal wastewater data can be identified and processed accordingly, so as to ensure the stability and efficiency of the wastewater recovery process. In the image recognition process of the wastewater sedimentation tank, the use of high-definition industrial cameras improves the clarity and accuracy of the image, so that the acquisition of centrifugal pump and pipeline position data is more accurate. By using image processing technology to detect the color of the pipeline liquid and compare it with the preset color value, the change of the pipeline liquid can be quickly identified, and the leakage problem of the centrifugal pump can be found in time, so as to avoid the further development of the leakage incident and improve the safety and reliability of the system. Through the identification of control defects and model correction, the wastewater control model is optimized, avoiding the deficiency of relying on manual intervention in the traditional method, and reducing the risk of human misjudgment and missed judgment. The automation and intelligence of the whole process improve the adaptive ability of the system, reduce the dependence on manual operation, and enable the wastewater treatment system to operate more efficiently and stably. This integrated system can promptly detect and respond to unexpected abnormal situations, such as centrifugal pump leakage, pipeline corrosion, etc., thereby improving the response speed and processing capacity of the wastewater treatment process, and ultimately ensuring the reliability, safety and efficiency of the wastewater treatment system. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments thereof made with reference to the following drawings: Figure 1 The figure is a schematic flow chart of the steps of the method for generating a control model of a chemical production wastewater treatment system according to the present invention; Figure 2 Detailed step flow diagram of step S1 in the present invention; Figure 3 Detailed step flow diagram of step S14 in the present invention; The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0007] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.

[0008] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.

[0009] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.

[0010] To achieve this, please refer to Figures 1 to 3 The present invention provides a method for generating a control model for a chemical production wastewater treatment system, the method comprising the following steps: Step S1: using online monitoring instruments to collect chemical wastewater data, including tin-containing wastewater data and etching liquid wastewater data; determining the wastewater recovery control stage according to the chemical wastewater data; and constructing a wastewater control model based on the wastewater recovery control stage and using chemical engineering simulation software; In this embodiment, online monitoring instruments are used to collect chemical wastewater data in real time. Basic water quality parameters such as pH value, temperature, chemical oxygen demand (COD), total suspended solids (TSS) and heavy metal ion concentration of tin-containing wastewater and etching liquid waste are collected by sensors. In tin-containing wastewater, special attention is paid to the concentration of tin ions (usually the threshold is set to 10 mg / L), while in etching liquid waste, special attention is paid to the concentration of fluoride and sulfate ions (the thresholds are set to 2 mg / L and 5 mg / L respectively). After data collection, the data is transmitted to the central processing unit in real time through the chemical wastewater treatment system, and the data is classified according to the set wastewater recovery control stage (such as primary pretreatment, intermediate recovery, advanced purification, etc.). For example, when the COD concentration in the wastewater exceeds the set threshold of 200 mg / L, it is determined that it is necessary to enter the advanced purification stage. Based on these control stages, a wastewater control model is established through chemical engineering simulation software (such as Aspen Plus or HYSYS) to simulate the wastewater flow and treatment process at different stages to obtain corresponding control parameters, such as reactor volume, flow setting and mixing time. Using this model, the treatment plans and equipment configurations required for different control stages can be predicted.

[0011] Step S2: inputting chemical wastewater data into the wastewater control model, and using simulation software to simulate the wastewater recovery control process to obtain wastewater recovery control data, and performing control abnormality judgment on the wastewater recovery control data to obtain abnormal wastewater data; In this embodiment, the pH value, COD, TSS and other data of tin-containing wastewater and etching liquid waste liquid are input into the model, and the model calculates the energy consumption, reaction time and required amount of chemicals in the wastewater recovery control process at each stage through these parameters. Subsequently, the wastewater recovery process is simulated using simulation software to obtain recovery control data including wastewater flow, reactant consumption, etc. In order to ensure the validity of the control data, a threshold range is set, and the pH value should be maintained between 6.0 and 9.0, and the COD value should be controlled below 100 mg / L. When the simulation results show abnormal data, the system will automatically judge the recovery control data abnormally. If the pH value of the wastewater fluctuates abnormally (for example, exceeds the set threshold range) or the COD concentration exceeds the standard (for example, exceeds 100 mg / L), the data is marked as abnormal wastewater data and enters the next processing stage.

[0012] Step S3: using a high-definition industrial camera to collect an image of the wastewater sedimentation tank, and identifying and obtaining an image of the centrifugal pump from the image of the wastewater sedimentation tank; locating the pipeline position based on the centrifugal pump image to obtain pipeline position data; obtaining a pipeline liquid image based on the pipeline position data, and performing color detection. If the color of the pipeline liquid does not meet the preset color value, it is determined that the centrifugal pump is leaking; In this embodiment, the camera is installed above the sedimentation tank to ensure that the entire sedimentation tank area can be covered and clear images can be collected in real time. The structural features of the centrifugal pump are identified from the image by an image processing algorithm (such as edge detection and morphological processing technology based on OpenCV). During the recognition process, the feature matching algorithm in image processing is used to accurately locate the position of the centrifugal pump image by comparing the shape features of the centrifugal pump (such as roundness and blade shape). Then, according to the coordinate information of the centrifugal pump image, the position of the wastewater pipeline is located using a machine vision algorithm. At this time, the data of the key positions of the pipeline (such as inlet and outlet ports) are extracted, and the pipeline position data is generated. Further, the color of the pipeline liquid is detected by image recognition technology, using color space conversion (such as RGB to HSV) and setting a color threshold standard, for example, setting the normal color range of the liquid in the pipeline to HSV values ​​(0, 0, 80) to (30, 255, 255). If the liquid color deviates from this preset range (such as more than 30% change), it is determined that the centrifugal pump is leaking.

[0013] Step S4: Identify the control defects of the centrifugal pump leakage, perform model correction on the wastewater control model based on the control defects, and generate a wastewater optimization control model.

[0014] In this embodiment, the pipeline position data and liquid color detection results obtained from the image recognition process are input into the defect recognition module. If the color detection result shows that the color of the pipeline liquid deviates from the set threshold, it is marked as a centrifugal pump leak, and the specific location and degree of the leak are further analyzed. After the control defect is identified, the wastewater control model is immediately corrected by the model correction module. According to the positioning data of the leakage point, the corresponding flow control parameters and reactor operation mode in the wastewater treatment process are adjusted. If the leakage occurs at the key control point of the wastewater flow (such as the wastewater return pipe), the flow of the return pipe and the opening and closing state of the control valve are adjusted to reduce the impact of the leakage on the system stability. At the same time, the parameters in the model, such as flow rate, pump speed, etc., are updated so that it can maintain the treatment effect in the case of leakage, and a wastewater optimization control model is generated. In the optimized control model, the flow setting value and the speed of the pump are automatically adjusted according to the new system state to ensure the stability and efficiency of the wastewater treatment process.

[0015] Optionally, step S1 specifically includes: Step S11: using an online heavy metal sensor to measure the tin ion concentration, wherein the acquisition frequency is set to once per minute and the measurement range is 0-100 mg / L, to obtain tin-containing wastewater data; In the present embodiment, the concentration of tin ions is measured by an online heavy metal sensor, and the online heavy metal sensor is installed at an appropriate position of the pipeline through which the tin-containing wastewater flows. The measurement range of the sensor is set to 0-100 mg / L, and the acquisition frequency is once per minute. The sensor measures the concentration of tin ions in the wastewater by the principle of electrochemical reaction, and specifically calculates the concentration of tin ions by the potential change of the electrode. In actual operation, the threshold value of the sensor is set to 10 mg / L. When the concentration of tin ions exceeds this value, the sensor outputs a signal, indicating that the wastewater needs to be further treated. The sensor contains a solid-state electrode, which is compared with the current intensity of the reaction of tin ions in the wastewater, so as to obtain the concentration of tin ions in real time. The collected data is automatically transmitted to the central control unit for processing by the data acquisition system.

[0016] Step S12: using a pH sensor to monitor the pH value of the waste etching liquid in real time, setting the measurement range to 0-14 pH and the accuracy to ±0.01 pH, to obtain the waste etching liquid data; In this embodiment, a pH sensor is installed on the flow pipe of the etching liquid waste. The measurement range of the sensor is set to 0-14pH, and the accuracy is ±0.01pH. In actual operation, the pH sensor determines the pH value by measuring the hydrogen ion concentration in the waste liquid. Glass electrodes are used inside the sensor, and the change in electrode potential is proportional to the hydrogen ion concentration in the liquid. During installation, ensure that the sensor is in good contact with the waste liquid and calibrate it regularly to ensure measurement accuracy. The pH sensor automatically collects data once a minute and transmits the real-time pH value to the central processing system through the data transmission system. During the entire wastewater treatment process, the normal range of the pH value is set to 4-12pH. If the measured value exceeds this range, the system automatically alarms and starts the corresponding control measures.

[0017] Step S13: Integrate tin-containing wastewater data and etching liquid wastewater data to obtain chemical wastewater data; In this embodiment, the tin ion concentration data of tin-containing wastewater and the pH value data of etching liquid waste liquid are collected respectively by heavy metal sensors and pH sensors. The data acquisition system performs time-series synchronization processing on the raw data obtained from the two sensors to ensure that the data acquisition time and acquisition frequency are consistent. Then, the tin ion concentration data collected every minute and the pH value data collected every minute are merged into a comprehensive chemical wastewater data set in chronological order. In order to ensure the accuracy of data integration, the data system verifies the wastewater data collected each time to ensure that the data is complete and not lost. If the data is found to be abnormal (such as the sensor acquisition value exceeds the preset range), the abnormal data is marked and corrected. Finally, the integrated chemical wastewater data can be used for subsequent wastewater recovery control stage judgment.

[0018] Step S14: determining the wastewater recovery control stage according to the chemical wastewater data to obtain the wastewater recovery control stage; In this embodiment, the stage of wastewater recovery is determined by preset thresholds and control rules based on the concentration of tin ions in tin-containing wastewater and the pH value of the etching liquid waste. If the tin ion concentration exceeds 10 mg / L and the pH value is between 4-12, the system judges to enter the primary recovery stage; if the tin ion concentration is between 0-10 mg / L and the pH value is greater than 12, the system enters the intermediate recovery stage; if the tin ion concentration and pH value are normal (tin ion concentration is less than 1 mg / L, pH value is between 8-10), then enter the advanced purification stage. The judgment process is completed using a preset rule engine to ensure that each wastewater sample can be assigned to the corresponding recovery stage according to the actual parameters. The control system automatically adjusts the wastewater treatment process through data analysis and parameter setting.

[0019] Step S15: constructing a wastewater control model based on the wastewater recovery control stage and using chemical engineering simulation software.

[0020] In this embodiment, the model parameters of the wastewater treatment process are set according to the chemical wastewater data (such as tin ion concentration, pH value, etc.) and the determined recovery control stage (such as primary recovery, intermediate recovery, and advanced purification). In the primary recovery stage, the chemical reaction time is set to 30 minutes and the reactor capacity is 1000L; in the intermediate recovery stage, the agent dosage is set to 50mg / L and the reaction temperature is set to 25°C; in the advanced purification stage, the filtration system flow is set to 2m³ / h, and the filter material replacement cycle is once every 6 months. Using chemical engineering simulation software (such as Aspen Plus or HYSYS), after entering these parameters, the software automatically constructs a wastewater control model to simulate the reaction process, flow regulation, energy consumption and other data of different control stages. Finally, the obtained wastewater control model can reflect the wastewater recovery process in different treatment stages in real time, providing accurate data support and optimization solutions for subsequent operations.

[0021] Optionally, step S14 is specifically: Step S141: dividing the tin-containing wastewater data by concentration, adopting ion exchange recovery control when the tin ion concentration is below 50 mg / L, and adopting electrolytic deposition recovery control when the tin ion concentration exceeds 50 mg / L, and obtaining ion exchange recovery control stage data and electrolytic deposition recovery control stage data; In this embodiment, real-time tin ion concentration data is obtained from an online heavy metal sensor. The collected tin ion concentration data is a continuous time series, collected once every minute. When the data is statistically processed, a threshold of 50 mg / L is set. If the tin ion concentration is lower than 50 mg / L, the ion exchange recovery control stage is entered. The technology used in the ion exchange recovery control stage is to exchange the tin ions in the wastewater with other harmless ions through ion exchange resin. In this process, the exchange capacity of the resin should be dynamically adjusted according to the tin ion concentration in the wastewater, and the amount of resin used is proportioned according to 5 kg of resin per ton of wastewater. If the tin ion concentration exceeds 50 mg / L, the electrolytic deposition recovery control stage is entered. In the electrolytic deposition recovery process, the wastewater is treated by an electrolytic cell, the current density is set to 20 A / m², and the electrolysis time is set to 30 minutes to ensure that the tin ions in the wastewater can be effectively removed by the electrolytic deposition process. Finally, the ion exchange recovery control stage data and the electrolytic deposition recovery control stage data are obtained, and the data include parameters such as concentration change and processing time.

[0022] Step S142: pH value acid-base adjustment is performed on the etching liquid waste liquid data to obtain neutral pH value etching liquid waste liquid data, and precipitation method recovery control setting is performed on the neutral pH value etching liquid waste liquid data to obtain precipitation method recovery control stage data; In this embodiment, the real-time pH value of the etching liquid waste liquid is measured by a pH sensor. If the measured pH value is lower than the set threshold value of 4, or higher than the set threshold value of 12, acid-base adjustment is required. According to the data setting, the pH value is adjusted to the neutral range of 6-8 pH. In actual operation, it can be adjusted by adding acidic substances (such as sulfuric acid) or alkaline substances (such as sodium hydroxide solution), and the specific amount added is calculated according to the pH and amount of the waste liquid. For example, if the volume of the waste liquid is 100L and the pH value is 2.5, 10L of concentrated sulfuric acid needs to be added to adjust to a pH value of 6. After adjustment, the obtained neutral pH etching liquid waste liquid data enters the precipitation method recovery control stage. The precipitation method recovery control uses a chemical precipitation method to remove heavy metal ions in the waste liquid, for example, by adding calcium hydroxide to adjust the precipitation reaction, and the amount of calcium hydroxide added is set to add 20g of calcium hydroxide per 100L of waste liquid. The precipitation reaction lasts for 30 minutes to ensure that most of the heavy metals in the waste liquid are precipitated and removed. The data obtained in the recovery control stage of the precipitation method include parameters such as metal removal rate after precipitation reaction, wastewater pH value, and precipitation time.

[0023] Step S143: Perform stage integration according to the ion exchange recovery control stage data, the electrolytic deposition recovery control stage data and the precipitation recovery control stage data, so as to obtain the wastewater recovery control stage.

[0024] In this embodiment, the main data of each recovery stage are collected, including the change of heavy metal concentration in the wastewater, the adjustment of pH value, the processing time and other data. For the ion exchange recovery control stage, the data include the removal efficiency of tin ions, the amount of resin, the recovery time, etc.; for the electrolytic deposition recovery control stage, the data include the current density, the electrolysis time, the removal amount of tin ions, etc.; for the precipitation recovery control stage, the data include the amount of added medicine, the precipitation efficiency, the amount of heavy metals removed, etc. Through the data integration method, the data of the three recovery stages are uniformly processed to establish a comprehensive wastewater recovery control stage to ensure that the data of each stage can accurately reflect the recovery process of the wastewater. The control parameters of each stage can be merged using the weighted average method, and the weight is determined by the treatment effect of each stage and the specific needs of the wastewater. For example, if the data weight of the ion exchange recovery control stage is 0.4, the weight of the electrolytic deposition recovery control stage is 0.3, and the weight of the precipitation recovery control stage is 0.3, then a comprehensive recovery control stage data can be obtained by weighted average, and finally the comprehensive data of the wastewater recovery control stage is formed.

[0025] Optionally, step S15 is specifically: Step S151: inputting chemical wastewater data into simulation software and performing flow simulation to obtain wastewater flow data; In this embodiment, chemical wastewater data is first collected by online monitoring equipment, including relevant data of tin-containing wastewater and etching liquid waste, such as concentration, pH value, etc. These data are input into the simulation software for flow simulation. At the beginning of the simulation process, the initial conditions of the flow simulation are set, including temperature, pressure, wastewater inflow velocity, etc. The wastewater flow simulation is set as a three-dimensional flow model, and the boundary conditions of the flow during the simulation are set to the inlet flow rate of the wastewater entering the flow channel is 10m³ / h, and the outlet flow rate of the outflow flow channel is set to 10m³ / h. The simulation software calculates the flow of wastewater in the pipeline and the pool body, and obtains wastewater flow data, including the flow rate and flow velocity of the flow. The simulation results include flow velocity, pressure and flow data for each flow area. The simulation time range is set to 30 minutes and the time step is 1 second.

[0026] Step S152: extracting flow data and flow velocity data of wastewater flow data; In this embodiment, flow data and flow velocity data are extracted from the wastewater flow data. The flow data is extracted according to the outlet and inlet settings in the simulation software, and the flow data when the wastewater enters the recovery pool is mainly focused on. Assuming that the inlet flow rate is 10m³ / h during the simulation process and the outlet flow rate is also 10m³ / h, the flow data represents the overall flow of the wastewater. The flow velocity data is obtained by analyzing the velocity field distribution of each flow area. Using the flow velocity extraction tool of the simulation software, it is set to extract the flow velocity value at each specific time point (for example, every 5 minutes during the simulation process), and record the flow velocity in different areas of the recovery pool. The flow velocity data mainly focuses on the velocity changes in the bottom and surface areas of the recovery pool. The flow velocity range set during the simulation process is 0.1-1.0 m / s.

[0027] Step S153: Scan the length and width of the wastewater recovery pool using a laser scanner, wherein the scanning distance is set to 1-50 meters and the scanning density is set to 50-150 points / square meter to obtain shape data of the wastewater recovery pool; In this embodiment, a laser scanner is used to scan the length and width of the wastewater recovery pool. The scanning distance of the laser scanner is set to 1-50 meters, and the scanning density is set to 50-150 points per square meter. The laser scanner performs high-precision measurements on various areas of the recovery pool to generate point cloud data. The scanned data covers parameters such as the length, width, and depth of the recovery pool. During the scanning process, the laser scanner scans according to a preset trajectory to ensure that the entire geometry of the recovery pool is covered. After each scan, the data is stored in real time in the processing equipment. The data contains geometric features such as the surface shape of the pool body and the curvature of the pool wall. The point cloud data is processed by computer software to obtain detailed shape data of the wastewater recovery pool, and output the length, width, depth and surface curvature information of the pool body.

[0028] Step S154: construct a fluid flow model based on the flow data, flow velocity data and wastewater recovery tank shape data, set the time step to 0.1s, the spatial grid accuracy to 0.5m, and the diffusion coefficient to 0.1cm² / s, simulate the flow behavior of wastewater in the tank, and obtain a fluid flow model; In this embodiment, based on the wastewater flow data and the recovery pool shape data, a three-dimensional grid model of the recovery pool is established, and the spatial grid accuracy is set to 0.5 meters to ensure the meticulousness of the simulation. The fluid flow model is calculated using the finite element analysis method. During the simulation process, the time step is set to 0.1 seconds to ensure accurate description of the flow conditions. The diffusion coefficient is set to 0.1cm² / s to simulate the diffusion of chemical substances in wastewater. According to the pool shape data, the initial conditions of the fluid are set, including the inlet flow rate of the fluid is 10m³ / h and the initial temperature of the fluid is 25°C, to ensure that the model accurately reflects the flow behavior of the wastewater in the pool. Through simulation calculations, the flow velocity, flow rate and diffusion conditions of each area are obtained to obtain a fluid flow model.

[0029] Step S155: Import the ion exchange recovery control stage data, the electrolytic deposition recovery control stage data and the precipitation method recovery control stage data into the fluid flow model, and divide the wastewater control area, wherein the ion exchange treatment flow range is set to 5-50m³ / h, the electrolytic deposition current density range is set to 5-20A / m², and the precipitation method dosage range is set to 0.5-10g / L to obtain a wastewater control model.

[0030] In this embodiment, the recovery control data, including the treatment flow rate, the amount of added medicine, etc., are input into the flow model through the data import function. In the flow model, the flow range of ion exchange treatment is set to 5-50m³ / h, the current density range of electrolytic deposition is set to 5-20A / m², and the dosage range of precipitation method is set to 0.5-10g / L. Then, the wastewater control area is divided according to the different areas in the wastewater recovery pool. According to the shape data of the recovery pool, the fluid flow model is divided into zones, and the treatment process in each control area is simulated according to the above set range. The simulation software simulates each recovery control stage according to the imported control data, and outputs the wastewater control model, and finally obtains a complete wastewater recovery control model.

[0031] Optionally, step S2 specifically includes: Step S21: performing standardization processing on the chemical wastewater data to obtain standardized chemical wastewater data; In this embodiment, the chemical wastewater data includes parameters such as tin ion concentration, pH value, temperature, etc. When performing standardization, all data are first preprocessed to remove outliers and invalid or erroneous data. In this process, the z-score standardization method is used to convert various data into dimensionless data, and the calculation formula is: ; Among them, X is the original data, μ is the mean of the data, and σ is the standard deviation. In this process, the standard deviation and mean of the tin ion concentration, pH value and other chemical composition data in the wastewater are calculated respectively, and they are converted into standardized values ​​to obtain standardized chemical wastewater data. In this way, data of different units and magnitudes are standardized to the same magnitude, providing a unified basis for subsequent data input and analysis.

[0032] Step S22: inputting the standardized chemical wastewater data into the wastewater control model, and uploading the wastewater control model to the simulation software; In this embodiment, after obtaining standardized chemical wastewater data, these data need to be input into the wastewater control model. The function of the wastewater control model is to combine the concentration of various pollutants in the wastewater with the parameters of different recycling treatment methods to provide guidance for the subsequent control process. When inputting data, the standardized chemical wastewater data needs to be formatted according to the requirements of the model and ensure the correspondence of the data items. For example, the tin ion concentration needs to be input into the ion exchange recovery part of the model, and the pH value data is input into the precipitation recovery control module. After the data is input, the model is uploaded to the simulation software system, and the system will automatically identify and load the data and parameters of the model. At this point, the interface of the simulation software will detect the validity of the input data, confirm that the data has been uploaded successfully, and be ready for simulation calculation.

[0033] Step S23: performing ion exchange recovery control simulation in the simulation software, setting the ion exchange resin volume to 5-50 g / L and the exchange rate to 0.1-10 L / min; In the present embodiment, the amount of ion exchange resin is set according to the standardized chemical wastewater data, and the amount of resin is set to between 5-50g / L. The specific amount of resin is determined according to the tin ion concentration in the wastewater. If the tin ion concentration is high, a higher amount of resin needs to be selected. The choice of the amount of resin will affect the exchange rate, and the exchange rate setting range is 0.1-10L / min, and the specific speed depends on factors such as flow rate and wastewater concentration. During the simulation process, after entering these parameters, the simulation software begins to calculate how tin ions are removed by resin exchange reaction under different resin amounts and exchange rates. The simulation software simulates the effects of flow rate, resin amount, etc. on the recovery process, and outputs specific recovery efficiency and wastewater treatment effect.

[0034] Step S24: Perform electrolytic deposition recovery control simulation in the simulation software, setting the current density to 5-20A / m² and the deposition time to 10-60 minutes; In this embodiment, the two key parameters of current density and deposition time are set. In the simulation software, the current density is set to 5-20A / m². The selection of current density is based on the concentration of metal ions in the wastewater and its recovery efficiency requirements. Specifically, when the concentration of metal ions in the wastewater is high, a higher current density is required to achieve rapid deposition, because high current density can accelerate the metal ion reduction deposition process and enhance the deposition rate of the metal. If the metal concentration in the wastewater is low, a lower current density is set to avoid excessive consumption of electrical energy and ensure the stability of the deposition reaction. When the current density is set, the appropriate current density range can be calculated by test or literature data in actual operation. For example, if the concentration of tin ions is 50mg / L, the current density can be set to 15A / m². The deposition time is set to 10-60 minutes. The deposition time directly affects the deposition amount and deposition effect of metal ions. Too short a deposition time leads to incomplete deposition, while too long a deposition time increases energy consumption and causes other side reactions in the deposition process. In the simulation software, the selection of deposition time is set according to the flow rate of the wastewater, the concentration of metal ions, and the required recovery rate. For example, if the goal is a metal recovery rate of more than 90%, a longer deposition time can be set, usually between 40 and 60 minutes. When setting, the rate of the deposition reaction and the actual volume of the deposition tank need to be considered comprehensively. The deposition time setting can also be further adjusted by comparing with the actual operating conditions to ensure the best recovery effect. Then, after entering these parameters, the simulation software will simulate the reduction and deposition behavior of metal ions during the electrolysis process. The simulation software will calculate the deposition rate based on the input current density and deposition time, taking into account the influencing factors such as fluid flow, temperature, and pH value in the electrolytic cell, and simulate the migration and deposition process of metal ions in the wastewater under the action of the electric field. Through simulation, the simulation software generates deposition data, including the amount of metal ions deposited per unit time, the thickness change of the deposited layer, the current efficiency and other information. The data in the simulation process will also take into account the type and deposition characteristics of the metal ions. For example, different metal ions have different deposition rates at the same current density, so the simulation software adjusts the corresponding deposition parameters according to the type of metal ions in the wastewater. The result data of this process include the deposition time curve, current efficiency curve and the final metal deposition amount. The simulation software will output these data as an important basis for judging the effect of wastewater treatment. These data will be further used to optimize the wastewater recovery control model and provide guidance for actual operation.

[0035] Step S25: performing a precipitation recovery control simulation in the simulation software, setting the stirring speed to 50-300 rpm, the precipitation reaction time to 30-120 minutes, and the precipitant dosage to 0.5-10 g / L; In this embodiment, in the simulation software, the stirring speed is set to 50-300rpm. The choice of stirring speed depends on the type of impurities in the wastewater, the size of the particles, and the properties of the precipitant used. A lower stirring speed (such as 50rpm) helps to allow the particles to settle slowly, avoiding excessive stirring that causes the precipitant to disperse or the suspended matter to re-enter the solution. A higher stirring speed (such as 300rpm) can accelerate the mixing of particles and precipitants and improve reaction efficiency. The simulation software will simulate the contact between the suspended matter and the precipitant in the wastewater according to the set stirring speed, thereby determining the optimal stirring intensity. In actual operation, the stirring speed is usually optimized through experiments to ensure that the stirring intensity can fully mix the reactants without causing secondary pollution. The precipitation reaction time is set to 30-120 minutes, and this time range is determined according to the concentration of soluble substances in the wastewater and the reaction time requirements of the precipitant. A shorter reaction time leads to incomplete precipitation, while a longer reaction time increases energy consumption and equipment burden. Typically, the precipitation reaction time is set to 60-90 minutes to ensure that most of the soluble impurities are removed without wasting energy. In the simulation software, the precipitation reaction time affects the simulation of the precipitation process. By gradually recording each time period in the reaction process, the distribution and accumulation of sediments in the wastewater are analyzed. The setting of the precipitation reaction time needs to be adjusted in combination with the sedimentation rate of each component in the wastewater and the sedimentation efficiency of the precipitant. The dosage of the precipitant is set to 0.5-10g / L, and the specific dosage is determined according to the composition of the wastewater and the rate of the precipitation reaction. If the wastewater contains more precipitable substances, such as metal ions, suspended particles, etc., a higher dosage of the precipitant is required; if the impurity concentration in the wastewater is low, the dosage can be appropriately reduced. Usually, the dosage of the precipitant needs to be adjusted according to the experimental data or the optimal ratio of the chemical reaction. For example, if the metal ion concentration in the wastewater is 10mg / L, the dosage of the precipitant can be set to 2g / L. In the simulation software, the dosage of the precipitant affects the reaction rate and precipitation amount. During the simulation process, the software will simulate the removal efficiency of the wastewater components according to the effect of the precipitation reaction under different dosages, and output the corresponding precipitation data. The simulation software will simulate the reaction process between particles and precipitants in the precipitation reaction according to the above-mentioned parameters (stirring speed, reaction time, precipitant dosage). The simulation process will take into account the influence of the solution mixing intensity and reaction time on the precipitation reaction, and record the precipitate mass, sedimentation rate and removal of pollutants in the wastewater in real time in each time period. The simulation results will show how the suspended particles and soluble metal ions in the wastewater are gradually precipitated in different time periods, and provide hourly data on the purification effect.

[0036] Step S26: running the wastewater recovery control program in the simulation software to obtain wastewater recovery control data; In this embodiment, check whether all control parameters have been correctly input, including parameter settings for ion exchange, electrolytic deposition, and precipitation. Then, start the simulation program to simulate the entire process, and the simulation software automatically calculates the reaction conditions at each recovery stage based on the input control data. During the simulation process, the software continuously calculates the removal of pollutants in the wastewater at each stage based on the set time step and flow conditions. After the simulation, the simulation software provides detailed wastewater recovery control data, including the efficiency of recovery at each stage, quality indicators of wastewater after treatment, residual pollutant concentration, etc.

[0037] Step S27: Perform control abnormality judgment on the wastewater recovery control data to obtain abnormal wastewater data.

[0038] In this embodiment, the standard for abnormal judgment is set: for example, if the tin ion concentration exceeds 50 mg / L during the ion exchange process, it is considered abnormal; if the current density is too low or the deposition efficiency is not high during the electrolytic deposition process, it is considered abnormal; if the reaction time in the precipitation method exceeds the set range, or the dosage is too large, it is considered abnormal. By comparing the wastewater recovery control data item by item, the preset abnormal standard is used for judgment. If the data deviates from the predetermined standard, it is automatically marked as abnormal wastewater data, and an alarm or further treatment measures are triggered.

[0039] Optionally, step S27 is specifically: Step S271: When any of the following situations occurs, it is determined that the ion exchange recovery control is abnormal, and the ion exchange recovery control abnormal data is obtained: the recovery liquid flow rate deviates from the optimal range by more than ±10%, the metal ion concentration in the wastewater is lower than 1000 mg / L or higher than 5000 mg / L, and the pH value deviates from the range of 4.5-7.0; In this embodiment, the recovery liquid flow rate is monitored, and the optimal range of flow rate is set to 20-100L / min. If the recovery liquid flow rate deviates from the optimal range by more than ±10%, that is, the flow rate is lower than 18L / min or higher than 110L / min, it is determined that the flow rate is abnormal. Secondly, the concentration of metal ions in the wastewater is monitored, and the normal range of concentration is set to 1000mg / L to 5000mg / L. If the metal ion concentration in the wastewater is lower than 1000mg / L or higher than 5000mg / L, it is immediately determined that the metal ion concentration is abnormal. In addition, the normal range of pH value is set to 4.5 to 7.0. If the pH value deviates from this range, it is determined that the pH value is abnormal. The above three monitoring parameters need to be collected in real time and compared with the set threshold value. If any one exceeds the set allowable range, the system immediately records the abnormal data, including the deviation value, the abnormal occurrence time and the duration. By real-time monitoring and comparing the above key parameters, the ion exchange recovery control abnormal data is automatically determined and output for subsequent analysis and processing.

[0040] Step S272: When the following conditions occur at the same time, it is determined that the electrolytic deposition recovery control fails and the electrolytic deposition recovery control failure data is obtained: the electrolysis efficiency is detected to be lower than 85% for three consecutive times, the concentration of metal electrolysis products in the effluent water exceeds 30% of the influent water concentration, and the current density of the electrolytic cell fluctuates abnormally and the above abnormalities last for more than 40 minutes; In this embodiment, the electrolysis efficiency detection is performed by comparing the change in metal concentration before and after electrolysis, and the electrolysis efficiency standard is set to be above 85%. If the electrolysis efficiency detection value is lower than 85% for three consecutive times, it is determined that the electrolysis efficiency is insufficient, and the abnormal electrolysis efficiency data is recorded. Secondly, the concentration of metal electrolysis products in the effluent should be lower than 30% of the influent concentration. When the effluent metal concentration exceeds 30% of the influent concentration, it indicates that the electrolytic deposition process has failed, and this abnormal data is recorded and a failure report is generated. Finally, the current density of the electrolytic cell should be maintained stable, and the current density range is set to 5-20A / m². If the current density of the electrolytic cell fluctuates abnormally, and this fluctuation lasts for more than 40 minutes, it is determined that the electrolytic deposition process has failed. All detection data are collected through a real-time monitoring system. If any detection item is abnormal, the system immediately determines and outputs the electrolytic deposition recovery control failure data for subsequent analysis and adjustment.

[0041] Step S273: When the following conditions occur at the same time, it is determined to be a sedimentation recovery control failure and sedimentation recovery control failure data is obtained: the amount of precipitant added changes by more than 15% within 1 hour, the concentration of suspended solids in the wastewater continues to rise by more than 20%, the temperature deviates from the normal range of 20-30°C, the pH value deviates from the normal range of 5.0-8.5, and the sedimentation rate of the precipitate is significantly slowed down and cannot be recovered in time; In this embodiment, the dosage of the precipitant should remain stable, and the dosage change per hour is set to not exceed 15%. If the dosage of the precipitant changes by more than 15% within 1 hour, it is determined to be abnormal dosage, and the dosage abnormal data is recorded. Secondly, the suspended solids concentration in the wastewater should gradually decrease, and the normal rate of decline of the suspended solids concentration is set to 10-20% per hour. If the suspended solids concentration in the wastewater continues to rise by more than 20% within a certain period of time, it is determined that the precipitation effect is invalid, and the abnormal suspended solids concentration data is recorded. Furthermore, the wastewater temperature should be controlled within the range of 20-30 ° C. If the temperature exceeds this range, it is determined to be abnormal temperature, and the abnormal temperature data is recorded. Finally, the pH value should be maintained within the range of 5.0-8.5. If the pH value deviates from this range, and the sedimentation rate is significantly slowed down and cannot be restored in time, it is determined to be abnormal pH and the data is recorded. The generation of the precipitation method recovery control fault data depends on the data acquisition and abnormal judgment of the real-time monitoring system. If the above abnormal situation occurs, the precipitation method recovery control fault data is immediately recorded and output.

[0042] Step S274: Integrate the ion exchange recovery control abnormal data, the electrolytic deposition recovery control failure data and the precipitation recovery control failure data to obtain abnormal wastewater data.

[0043] In this embodiment, various abnormal data are automatically integrated by the system. First, according to the abnormal data of ion exchange recovery control, including the abnormalities of flow rate, metal concentration and pH value, the abnormal conditions of ion exchange recovery process are integrated. Then, the failure data of electrolytic deposition recovery control is integrated to record the abnormal conditions of electrolysis efficiency, metal product concentration and current density fluctuation. Finally, the precipitation recovery control fault data is integrated to analyze the abnormal conditions of precipitant dosage, suspended solids concentration, temperature and pH value. All abnormal data are summarized according to their respective timestamps, abnormal parameters and occurrence duration, and a complete abnormal wastewater data report is generated. These abnormal wastewater data will serve as the basis for subsequent fault analysis and adjustment decisions, and will be stored and processed by the system to provide a basis for subsequent optimization of wastewater recovery process.

[0044] Optionally, step S3 specifically includes: Step S31: Use a high-definition industrial camera to collect an image of the wastewater sedimentation tank. The camera's collection angle should be set to cover the entire sedimentation tank area. The camera is kept 2-5 meters away from the sedimentation tank. The wastewater sedimentation tank image is Gaussian blurred, a 3x3 Gaussian convolution kernel is selected, and the standard deviation is set to 1.0 to 2.0 to obtain a Gaussian blurred sedimentation tank image. In this embodiment, a high-definition industrial camera is used for shooting. The position of the camera should be set in an area 2 to 5 meters away from the wastewater sedimentation tank to ensure that the panoramic view of the entire sedimentation tank can be covered. The installation angle of the camera should be adjusted according to the layout of the sedimentation tank to ensure that the captured image can include all key areas of the sedimentation tank and avoid blind spots. After image acquisition, the wastewater sedimentation tank image is Gaussian blurred. The Gaussian blur operation is achieved by using a 3x3 Gaussian convolution kernel, where the standard deviation of the convolution kernel is set to 1.0 to 2.0. The choice of standard deviation determines the degree of blur, and the larger the value, the stronger the blur effect of the image. By applying the convolution kernel and the standard deviation value, the collected image is processed to reduce the noise in the image and smooth the image to obtain a Gaussian blurred sedimentation tank image. The core of this process is to control the standard deviation of the Gaussian blur to ensure that the details of the image are retained while removing unnecessary interference information.

[0045] Step S32: Performing centrifugal pump outer edge detection on the Gaussian blurred sedimentation tank image. The preset parameters of the edge detection algorithm include a low threshold and a high threshold. The low threshold range is set to 30-50, and the high threshold range is set to 100-150. The threshold controls the sensitivity of edge detection. By performing gradient calculation on the Gaussian blurred sedimentation tank image, the edge area is identified to obtain the centrifugal pump outer edge image. In this embodiment, the Canny edge detection method in the edge detection algorithm is used. The preset parameters of edge detection include a low threshold and a high threshold. The low threshold range is set to 30-50, and the high threshold range is set to 100-150. The low threshold controls the sensitivity of the detection algorithm to tiny edges. When the low threshold is low, more edges can be detected to prevent missing details; the high threshold determines which edges are considered to be obvious feature boundaries. In the specific operation, the gradient of the image after Gaussian blur is first calculated to identify the areas with large grayscale changes in the image, which are potential edges. By setting appropriate low and high thresholds, the system calculates the gradient of the image and filters out the significant edges in the image according to the set threshold conditions, and finally obtains the edge image of the outside of the centrifugal pump. The key in this process is to accurately select the low and high threshold ranges and control the accuracy of edge detection by adjusting the threshold.

[0046] Step S33: performing centrifugal pump region recognition on the Gaussian blurred sedimentation tank image according to the centrifugal pump outer edge image, wherein the contour area range is set to 2000-10000 pixels, to obtain a centrifugal pump region image; In this embodiment, the contours in the image are identified and extracted. All closed contours in the image are extracted through a contour recognition algorithm (such as the findContours function of OpenCV). In order to accurately identify the centrifugal pump area, the extracted contours need to be screened, and the area range of the contours is set to 2000-10000 pixels. The area range is set to filter out smaller or larger contours in the image that are not related to the centrifugal pump, and only retain contours that match the centrifugal pump area. After identifying contours that meet the area range, the system marks these areas as centrifugal pump areas. In this process, the area screening ensures the accuracy of the identified area. By comparing the set area range, the misidentified area is effectively eliminated to obtain an accurate centrifugal pump area image.

[0047] Step S34: performing a closing operation on the discontinuous contour edges in the centrifugal pump area image, thereby obtaining a complete contour image of the centrifugal pump; In this embodiment, it is achieved through the closing operation in morphological operations. The closing operation is to perform an erosion operation on the image after the dilation operation, which can effectively fill the small holes in the contour and connect the broken edges. In actual operation, a structural element of size 3x3 or 5x5 is used to perform a closing operation on the centrifugal pump area image. The specific steps are: first, a dilation operation is performed to fill the small holes in the image to make the contour more coherent; then an erosion operation is performed to eliminate unnecessary noise and edges. Through this process, the originally discontinuous contour edges are closed, thereby obtaining a complete contour image of the centrifugal pump. The key to this operation lies in the selection and size setting of the structural element. The appropriate structural element can effectively connect the discontinuous edges to avoid affecting the integrity of the area.

[0048] Step S35: locating the pipeline position based on the complete contour image of the centrifugal pump to obtain pipeline position data, and performing image acquisition based on the pipeline position data to obtain a pipeline image; In this embodiment, the contact area between the centrifugal pump and the pipeline is located by using image processing algorithms (such as detection and template matching in morphological operations). The starting point and end point of the pipeline are determined by analyzing the relative position of the complete outline of the centrifugal pump. The specific operation is to match the contour features of the centrifugal pump with the geometric features of the pipeline (such as a circle or a long strip) to identify the outline of the pipeline. This process also needs to consider the relative position relationship between the pipeline and the centrifugal pump and the size range of the pipeline (such as diameter or width). After obtaining the exact position of the pipeline, image acquisition is performed to ensure that the complete image of the pipeline can be acquired and saved. By extracting the pipeline position data, the relative position and morphological characteristics of the pipeline are accurately obtained, providing basic data for subsequent corrosion identification.

[0049] Step S36: performing pipeline corrosion identification based on the pipeline image to obtain a pipeline corrosion image; In this embodiment, the pipeline image is gray-processed and converted into a single-channel gray-scale image. Then, the edge detection algorithm (such as the Sobel operator) is used to identify the corrosion area. In the image, the corrosion area usually appears as a rough surface with obvious holes or cracks. The system identifies the corrosion location by calculating the grayscale changes, texture features and morphological features of the area in the image. For the identified corrosion area, by calculating its proportion of the pipeline surface area, it is further verified whether it is a valid corrosion area. In this way, the pipeline corrosion image is finally obtained, which contains all the identified corrosion points and corrosion degrees.

[0050] Step S37: Identify impurities in the pump cavity based on the complete contour image of the centrifugal pump to obtain an impurity image of the pump cavity; In this embodiment, the centrifugal pump area is subdivided, and the analysis focuses on the internal area of ​​the pump cavity. The impurity area in the pump cavity is separated from the background using an image segmentation algorithm (such as threshold-based segmentation or region growing method). In the image, pump cavity impurities usually appear as foreign particles or sediments, and their color, shape and size are quite different from other parts of the pump cavity. These impurity areas are identified by calculating the texture features of the image. The system marks and records these impurity areas, generates a pump cavity impurity image, and ensures that all impurity positions are accurately calibrated.

[0051] Step S38: integrating abnormal images according to the pipeline corrosion image and the pump cavity impurity image to obtain an abnormal image of the centrifugal pump; In this embodiment, the two image data are merged. The merging operation is performed based on the pixel information of the image to ensure that the abnormal area in each image is synchronously marked. Through image fusion technology, the pipeline corrosion and pump cavity impurity areas are merged into one image to generate a centrifugal pump abnormal image. When merging, it is necessary to ensure that different types of abnormal data are clearly marked in the image for subsequent analysis and processing.

[0052] Step S39: Determine the abnormal position according to the abnormal image of the centrifugal pump, photograph the pipeline liquid according to the abnormal position of the centrifugal pump, and perform color detection, convert the pipeline liquid image into HSV color space, and perform threshold detection on the liquid color in the image; the normal color range of the preset liquid is [40,60,50] to [100,255,255], where the H value represents the hue, the S value represents the saturation, and the V value represents the brightness; if the pipeline liquid color does not meet this range, it is determined that the liquid color is abnormal and it is judged to be a centrifugal pump leakage.

[0053] In this embodiment, image processing technology (such as contour analysis) is used to determine the specific location of the abnormal area of ​​the centrifugal pump. These locations are marked as abnormal points or abnormal areas for subsequent inspection. Afterwards, the pipeline liquid image is taken for the abnormal position and the color detection is performed on it. The pipeline liquid image is analyzed by converting it into the HSV color space, and the normal color range of the preset liquid is [40,60,50] to [100,255,255], where the H value represents the hue, the S value represents the saturation, and the V value represents the brightness. Through threshold detection, it is determined whether the color of the liquid in the image is within the range. If the liquid color does not meet the set range, it is determined that the liquid color is abnormal and it is determined to be a centrifugal pump leak. In this process, the key to color detection is to select a suitable HSV range and accurately determine whether the color is beyond the normal range.

[0054] Optionally, step S36 is specifically: Step S361: performing grayscale conversion on the pipeline image to obtain a pipeline grayscale image; In this embodiment, when grayscale conversion is performed on the pipeline image, the original pipeline image (usually a color image) is first converted into a grayscale image. The grayscale conversion operation adopts the standard RGB to grayscale conversion formula: Gray=0.2989 R+0.5870 G+0.1140 B; Among them, R, G, and B are the pixel values ​​of the red, green, and blue channels of the image respectively. This formula converts the three color channels into grayscale values ​​by weighted averaging. After this conversion, each pixel in the original image will be converted to a grayscale value between 0 and 255, where 0 represents black and 255 represents white. After the conversion is completed, the resulting pipeline grayscale image will be a single-channel image, and the grayscale value of each pixel determines the brightness intensity of that position.

[0055] Step S362: Calculate the horizontal pixel values ​​in the pipeline grayscale image, construct a grayscale co-occurrence matrix based on the horizontal pixel values, extract low energy values ​​with energy less than 0.1 and low contrast values ​​of 0.2-0.8, perform intersection area operation on the pipeline grayscale image according to the low energy values ​​and low contrast values, and obtain a binary image of the pipeline corrosion area; In this embodiment, the horizontal pixel value of the pipeline grayscale image is calculated. By traversing each row of pixel values, the grayscale value of each row is obtained and its average value is calculated as the horizontal pixel value of the row. Next, a grayscale co-occurrence matrix is ​​constructed based on these horizontal pixel values. The grayscale co-occurrence matrix is ​​used to describe the spatial relationship between different grayscale values ​​in the image, and mainly calculates the joint probability distribution between grayscale levels. In this process, appropriate distances and angles (such as 0 degrees, 45 degrees, 90 degrees, and 135 degrees) are selected to calculate the co-occurrence matrix. The energy and contrast features in the co-occurrence matrix are extracted, and low energy values ​​with energy less than 0.1 and low contrast values ​​with contrast ranging from 0.2 to 0.8 are used as the focus of feature extraction. These features are used to perform intersection area operations, perform area screening on the pipeline grayscale image, and extract the corrosion area. The intersection area operation is implemented by threshold operation, and the area that meets the energy and contrast requirements is screened out, and finally a binary image of the pipeline corrosion area is obtained, where the corrosion area is marked as white (1) and the non-corrosion area is marked as black (0).

[0056] Step S363: select a 5x5 circular core structure element, apply the circular core structure element to each pixel of the binary image of the pipeline corrosion area by sliding, and update it according to the pixel value of the area covered by the circular core structure element to obtain the expansion area image; In this embodiment, a 5x5 circular core structure element is selected and applied to each pixel of the binary image of the pipeline corrosion area. The circular core structure element is applied in the image by means of a sliding window, with a range of 5x5 pixels. At each sliding position, the central pixel of the circular core structure element is compared with all the pixel values ​​in its coverage area, and the update of the current pixel is determined according to the pixel value of the coverage area. The specific operation is: if there are a certain number of white pixels (i.e., corrosion area) in the coverage area, the area is updated to white (i.e., expansion); if there are fewer white pixels in the coverage area, the black value of the area is maintained. Through this method, the boundary of the pipeline corrosion area is expanded, and the originally smaller or thinner corrosion area becomes more obvious, and the expansion area image is obtained. In this process, the size and shape of the structure element determine the degree of expansion, and the 5x5 circular core can effectively expand the corrosion area.

[0057] Step S364: denoising the dilated region image to obtain a denoised dilated region image; In this embodiment, when the expansion area image is subjected to denoising, a median filtering method is used to remove the noise in the image. Median filtering is a nonlinear filtering technique that selects a fixed-size window (such as 3x3 or 5x5) around each pixel point and replaces the value of the central pixel with the median of all pixel values ​​in the window. This method can effectively remove salt and pepper noise (i.e., randomly distributed black and white dots) and other high-frequency noise. In a specific operation, a 5x5 window size is used to filter the expansion area image. Each time the window is slid, the median is calculated based on the pixel values ​​in the window, and the pixel value at the center of the window is updated with the median. Through this process, the noise in the expansion area image is smoothed out, and a denoised expansion area image is finally obtained, in which only the real erosion area is retained.

[0058] Step S365: Based on the denoised dilated area image, the pipeline grayscale image is used to locate the pipeline corrosion area, wherein the pipeline area positioning standard is: cross-sectional area 500-5000px², circularity threshold greater than 0.8, aspect ratio set to 1:2, and the pipeline corrosion image is obtained.

[0059] In this embodiment, when locating the pipeline corrosion area based on the denoised expansion area image, all contours in the denoised expansion area image are first extracted. Through the contour detection algorithm (such as the findContours function in OpenCV), all closed areas in the image are identified. Then, these contours are screened and the pipeline area positioning standards are set: the cross-sectional area is between 500-5000px², the circularity is greater than 0.8, and the aspect ratio is set to 1:2. The cross-sectional area requires that a sufficiently large corrosion area be screened out, and the noise area less than 500px² be excluded; the circularity threshold is greater than 0.8 to ensure that the selected area is a relatively circular corrosion area to avoid misidentification as an area of ​​other shapes; the aspect ratio requires that the aspect ratio of the corrosion area is close to the actual shape of the pipeline, and excludes areas whose shapes do not meet the requirements. After screening by these standards, qualified pipeline corrosion images are obtained, and the specific location and shape of the corrosion are marked in these images, which is convenient for subsequent further analysis.

[0060] Optionally, step S37 is specifically: Step S371: Position the complete outline image of the centrifugal pump, and capture the temperature change in the pump cavity at that position through a thermal imaging camera to obtain a temperature image of the centrifugal pump; In this embodiment, a thermal imaging camera is used to locate the position of the centrifugal pump and capture the temperature changes in the pump cavity. The thermal imaging camera should be set parallel to the direction of the pump cavity and be able to cover the entire pump cavity area. The camera should be selected with a higher resolution (such as 640×480 pixels or higher) and a wider temperature measurement range (for example, -20°C to 200°C). The device uses the principle of infrared thermal sensing to capture the temperature distribution in the pump cavity in real time. The temperature data is converted into a thermal image by the camera, and each pixel value in the thermal image represents the temperature of that point. After the acquired centrifugal pump temperature image is processed by thermal imaging, it clearly shows the temperature changes in various areas of the pump cavity, especially the areas with abnormal high temperatures.

[0061] Step S372: performing grayscale conversion on the centrifugal pump temperature image to obtain a temperature grayscale image, and performing Gaussian blur processing on the temperature grayscale image to obtain a Gaussian blurred temperature grayscale image; In this embodiment, the centrifugal pump temperature image is gray-scale converted, and the infrared signal value in the thermal imaging image is converted into a standard gray-scale image. The gray-scale conversion formula is: Gray=0.299×R+0.587×G+0.114×B; Among them, R, G, and B are the values ​​of the red, green, and blue channels in the image. The converted temperature grayscale image is represented by grayscale values. The areas with lower values ​​represent lower temperatures, and the areas with higher values ​​represent higher temperatures. Then, the temperature grayscale image is smoothed using Gaussian blur processing. At this time, a 3x3 Gaussian convolution kernel is selected, and the standard deviation is set to 1.5. Gaussian blur can effectively reduce the noise and details in the image, making the trend of temperature change more obvious. By applying this blur operation, the details and local changes in the temperature image become smoother and more uniform, which helps the accuracy of subsequent temperature threshold segmentation.

[0062] Step S373: performing threshold segmentation on the Gaussian blurred temperature grayscale image, setting the temperature threshold range to 35-45° C., so as to screen out the high temperature area inside the pump cavity and obtain a high temperature area image; In this embodiment, by setting the temperature threshold range to 35°C to 45°C, the high-temperature area inside the pump cavity is screened out. The temperature threshold range is set according to the actual working conditions and the working standards of the centrifugal pump to ensure that only areas with abnormally high temperatures are extracted. The specific method of threshold segmentation is to traverse each pixel in the image. If the temperature corresponding to the pixel value is between 35°C and 45°C, the pixel is marked as white (1), indicating that it is a high-temperature area; if the pixel value is not in this range, it is marked as black (0), indicating that it does not belong to the high-temperature area. Through this segmentation operation, the high-temperature area image obtained shows all areas inside the pump cavity that meet the temperature range, and does not contain other areas where the temperature does not meet the requirements.

[0063] Step S374: select a 3×3 rectangular core structure element, apply an expansion operation to expand the edge of the high-temperature area image, enhance the thermal anomaly signal of the potential high-temperature area, and obtain an expanded high-temperature area image; In this embodiment, a 3×3 rectangular kernel structure element is selected and applied to the dilation operation of the high temperature area image. The rectangular kernel structure element slides over each pixel of the image and determines the update of the current pixel based on the pixel value in its coverage area. If the coverage area of ​​the rectangular kernel structure element contains at least one white pixel, the center pixel will be updated to white, thereby achieving the dilation of the area. This dilation operation can expand the boundaries of the high temperature area, making the potential high temperature area more prominent, which is helpful for subsequent anomaly detection. Through the application of the 3×3 rectangular kernel, the dilation operation can effectively expand the original high temperature area to better identify the thermal anomaly area.

[0064] Step S375: De-noising the expanded high-temperature region image, using a 3×3 filter window to remove stray noise, to obtain a de-noised high-temperature region image; In this embodiment, in order to remove the stray noise in the image, a 3×3 filter window is used for median filtering. Each time the window is slid, the median of the pixel values ​​in the window is taken, and the median is used to replace the pixel value in the center of the window. Through this operation, the noise in the original image (such as isolated single noise points or over-expanded edges) is effectively smoothed out, and the denoised high-temperature area image obtained only contains the real high-temperature area. The denoised image is clearer, which is convenient for subsequent area positioning and impurity area detection.

[0065] Step S376: locating the impurity region according to the denoised high temperature region image, identifying the boundary of the high temperature region, and obtaining the impurity region contour data; In this embodiment, a contour detection algorithm is applied to identify the boundaries of each high-temperature area in the denoised image. Through the findContours function in OpenCV, the contour of each high-temperature area is identified, and the geometric features of its area, such as area, circularity, aspect ratio, etc., are calculated. Through these geometric features, the area belonging to the impurities inside the pump cavity is identified. The impurity area usually has a more obvious thermal anomaly signal, and its position usually differs from other structures in the pump cavity. The goal of this step is to accurately locate the impurity area that is not related to the actual pump cavity structure and obtain the contour data of the impurity area.

[0066] Step S377: Perform regional screening and calibration on the impurity area contour data, set the minimum temperature deviation of the impurity area to 5°C, set the minimum area threshold to 100px², the circularity to be greater than 0.7, and the aspect ratio to be greater than 0.5 and less than 2, to obtain the pump cavity impurity image.

[0067] In this embodiment, the minimum temperature deviation of the impurity area is set to 5°C, requiring that the temperature of the identified impurity area must differ by at least 5°C compared to the surrounding normal area. Next, the minimum area threshold is set to 100px² to exclude invalid impurity areas with too small an area. By calculating the circularity, areas with a circularity greater than 0.7 are screened out to ensure that more regular impurity areas are identified. It is also necessary to set an aspect ratio threshold, stipulating that the aspect ratio is greater than 0.5 and less than 2, to exclude impurity areas with too irregular shapes. Finally, through these standard screening and calibration, images of the impurity areas in the pump chamber are obtained, in which the specific positions and forms of the impurities are marked.

[0068] Optionally, step S4 specifically includes: Step S41: collecting the leakage flow of the centrifugal pump to obtain leakage flow data of the centrifugal pump, and performing flow control defect detection to obtain flow control defect data; In this embodiment, the leakage flow of the centrifugal pump is collected by a flow meter. The flow meter should be installed on the outlet pipe of the centrifugal pump, and a high-precision turbine flow meter or electromagnetic flow meter should be used to accurately measure the change in fluid flow. The data collected by the flow meter should be transmitted to the data processing system in real time for storage and analysis. The centrifugal pump leakage flow data obtained includes the instantaneous value and cumulative value of the flow. Next, flow control defect detection is performed using the set flow control standard (for example, the normal flow should be between 50L / min and 100L / min). When the actual flow deviates greatly from the set range, the detection system will generate flow control defect data. The flow control defect data will reflect the existing pump body leakage or pipeline failure, thereby providing a basis for further diagnosis.

[0069] It is particularly important that step S41 includes the following steps: Step S411: collecting leakage flow of the centrifugal pump to obtain leakage flow data of the centrifugal pump; In this embodiment, a flow meter (such as a turbine flow meter or an ultrasonic flow meter) installed on the flow pipe of the centrifugal pump is used to monitor the leakage flow of the centrifugal pump in real time. The working principle of the flow meter is to calculate the flow rate by measuring the rate at which the fluid flows through the pipeline, and the acquired data includes the flow value per second. The flow sensor should be calibrated within the specified working pressure and temperature range to ensure the accuracy of the data. By continuously collecting flow data and recording changes in leakage flow, a centrifugal pump leakage flow data set is eventually obtained, which contains a timestamp and corresponding flow value. Step S412: Perform time statistics on the centrifugal pump leakage flow data to obtain centrifugal pump leakage flow time data; Step S413: performing leakage pattern recognition on the leakage flow data of the centrifugal pump based on the leakage flow time data of the centrifugal pump, thereby obtaining leakage pattern data; In this embodiment, the leakage flow data of the centrifugal pump obtained by the flow sensor is subjected to time statistical processing, and statistical indicators such as the time interval, peak value, and mean value of the data are calculated. By setting a threshold, outlier detection is performed to screen out the leakage flow change trend in different time periods. Time statistical analysis can be implemented through data processing tools (such as the Pandas library in Python). By calculating the change of the flow value at each moment, the regularity of the flow data in the time dimension can be identified, and the continuity and periodicity characteristics of the leakage flow of the centrifugal pump can be obtained, thereby obtaining the leakage flow time data of the centrifugal pump.

[0070] Step S414: Divide the leakage pattern data to obtain continuous leakage pattern data and intermittent leakage pattern data In this embodiment, the leakage pattern data is classified according to the duration. A time threshold is set, and all leakage pattern data exceeding the threshold are continuous leakage pattern data, and those below the threshold are intermittent leakage pattern data. In specific implementation, the leakage pattern data can be divided according to time periods by time interval segmentation. Continuous leakage usually manifests as long-term, stable flow fluctuations, while intermittent leakage manifests as irregular flow fluctuations, usually with a longer non-leakage period. By comparing the time characteristics of the leakage pattern, the continuous and intermittent leakage data can be accurately distinguished.

[0071] Step S415: performing time statistics according to the continuous leakage mode data, and identifying the loose connection of the pipeline according to the time, so as to obtain the loose connection data of the pipeline; In this embodiment, the loose connection of the pipeline is identified by performing time statistics on the continuous leakage mode data and combining it with the standard flow data of the pipeline operation. First, the continuity of the leakage flow in different time periods is calculated. If it is found that the leakage flow is continuously increasing and exceeds the set standard flow range, it is further determined whether the increase in leakage flow is due to the loose connection of the pipeline. According to the preset pipeline loosening standard (such as the flow threshold change rate at the pipeline interface), when the flow continues to rise for a period of time, it is determined that the pipeline connection is loose, and the pipeline loosening data is recorded.

[0072] Step S416: performing time statistics according to the intermittent leakage mode data, and identifying the damage of the centrifugal pump seal according to the time, so as to obtain the damage data of the centrifugal pump seal; In this embodiment, the intermittent leakage mode data is statistically analyzed over time to analyze the frequency, duration and other parameters of the intermittent leakage. When a centrifugal pump is found to have frequent short-term leakage, the centrifugal pump seal is identified to be damaged in combination with the equipment operation history. By comparing the normal operation data of the equipment with the change in the leakage flow, the time point of seal damage can be determined. By standardizing the damage type, such as the amplitude and interval of flow fluctuations, the centrifugal pump seal damage data is finally obtained.

[0073] Step S417: Integrate the centrifugal pump seal damage data and pipeline connection looseness data to obtain flow control defect data.

[0074] In this embodiment, the loose pipe connection data and the centrifugal pump seal damage data are integrated to generate flow control defect data through weighted average, data merging and other methods. In specific operations, loose pipes and pump seal damage are regarded as two different control defects, and their different effects on flow control are analyzed to obtain a comprehensive flow control defect data set. Ultimately, the flow control defect data will provide key diagnostic information for further optimizing the operation of the wastewater control system.

[0075] Step S42: collecting leakage pressure of the centrifugal pump to obtain leakage pressure data of the centrifugal pump, and performing pressure control defect detection to obtain pressure control defect data; In this embodiment, the leakage pressure data of the centrifugal pump is collected, and the pressure sensor should be installed on the pipeline at the outlet of the centrifugal pump, and the pressure sensor should have high sensitivity (for example, an accuracy of 0.1 bar) and fast response characteristics (the response time should be less than 1 second). The sensor records the pressure value in the case of leakage in real time by monitoring the pressure changes in the pipeline. The leakage pressure data of the centrifugal pump includes the instantaneous value and peak value of the pressure. Next, pressure control defect detection is performed. Set the normal pressure range, for example, the normal pressure should be 2 bar to 4 bar. If the leakage pressure exceeds this range, the pressure control defect detection will be triggered and the pressure control defect data will be generated. This data can indicate the pressure anomaly or control system failure of the centrifugal pump, and provide a basis for subsequent corrections.

[0076] Step S44: performing leakage correction based on the flow control defect data to obtain leakage control correction data; In this embodiment, by analyzing the flow control defect data, the leakage area in the system is identified and leakage compensation is performed. Leakage compensation can be achieved by adjusting the flow setting value of the pump so that the flow meets the design requirements and avoids system failures caused by insufficient flow. For example, the flow output is adjusted by real-time control of the pump speed or valve opening. The leakage correction data may include parameters such as the adjusted flow rate, pump speed, valve opening, etc. These data will be fed back through the closed-loop control system to ensure that the flow control defect is effectively corrected, thereby restoring the normal operation of the pump system.

[0077] It is particularly important that step S44 includes the following steps: Step S441: performing flow deviation analysis based on the flow control defect data, thereby obtaining flow deviation data; In this embodiment, the flow data of the centrifugal pump is collected in real time by a flow sensor. These flow data need to be compared and analyzed with the preset target flow to identify the flow deviation. In specific implementation, the target flow value is set to the standard flow of the system, for example, the target flow is set to 500 L / min. By comparing the real-time flow data with the target flow, the flow deviation is calculated. The calculation formula for the flow deviation is: Traffic deviation = real-time traffic - target traffic; For example, if the real-time flow rate is 480L / min, the flow deviation is -20L / min. Through this analysis, the flow deviation data can be obtained, which reflects the difference between the actual flow rate and the expected target flow rate, providing a basis for subsequent correction steps.

[0078] Step S442: Calculate the difference according to the flow deviation data, so as to obtain flow difference data; In this embodiment, the flow difference refers to the difference between two adjacent flow deviations, reflecting the changing trend of the flow deviation. In specific implementation, the flow deviation data in the continuous time window can be differentially processed. For example, assuming that the flow deviations obtained at two moments are -20L / min and -18L / min respectively, the flow difference can be calculated as: Flow difference = current flow deviation - flow deviation at the previous moment; That is, the flow difference = (-18 L / min) - (-20 L / min) = 2 L / min. Through this calculation, the variation range between continuous flow deviations can be obtained, which can reflect the fluctuation trend of the flow system and help to more accurately grasp the adjustment amount when adjusting the pump speed or valve opening later.

[0079] Step S443: adjusting the pump speed range according to the flow difference data, thereby obtaining pump speed adjustment data; In this embodiment, the direction and amplitude of the pump speed adjustment are determined according to the size and direction (positive or negative) of the calculated flow difference. If the flow difference is a positive value (such as 2L / min), it means that the current flow is slightly too high and the pump speed needs to be reduced; if the flow difference is a negative value (such as -3L / min), it means that the flow is insufficient and the pump speed needs to be increased. In specific operation, the PID control algorithm is used to adjust the pump speed to ensure that the output flow of the pump is closer to the target value more accurately. Assuming that the current pump speed of the system is 1500RPM (revolutions per minute), if the calculated flow difference is a positive value of 2L / min, it means that the pump flow exceeds the target value of 2L / min, so the pump speed needs to be reduced. At this time, the adjustment amount is calculated based on the proportional term (P), integral term (I), and differential term (D) in the PID control algorithm, and the control step is set to 1% of the pump speed change. That is, the adjustment step of 1% is 1500RPM×1%=15RPM, so the pump speed should be adjusted from 1500RPM to 1485RPM. If the flow difference is a negative value of -3L / min, it means that the current flow is insufficient and the pump speed needs to be increased. According to the PID algorithm, the corresponding adjustment amount is calculated, and the adjustment step is still set to 1%. At this time, the adjustment step of 1% is 1500RPM×1%=15RPM, so the pump speed should be increased from 1500 RPM to 1520RPM. The specific adjustment process uses a PID controller for real-time feedback adjustment. The PID controller continuously monitors the flow change, compares the flow difference with the set target, and adjusts the pump speed in real time to keep it within the appropriate range. The PID algorithm controls the direct correction of the flow difference through the proportional term, the integral term considers the cumulative error of the system, and the differential term predicts the future flow trend. Through PID control, the system can respond quickly to flow changes and adjust the pump speed in real time to ensure that the pump flow remains near the predetermined target value. When adjusting the pump speed, the control system must also consider the mechanical characteristics of the pump and the equipment load to avoid excessive adjustment that affects the mechanical life of the pump and the stability of the system. For example, the speed of a pump cannot be adjusted frequently and quickly, and the system can set the maximum adjustment range to ±10% RPM to avoid excessive adjustment that may cause pump loss or unstable operation.

[0080] Step S444: adjusting the valve opening according to the flow difference data, thereby obtaining valve opening adjustment data; In this embodiment, the valve opening adjustment is based on the flow difference data, and the main purpose is to accurately adjust the flow rate of the fluid in the pipeline by controlling the valve opening to ensure that the target flow rate is reached. First, the adjustment direction and amplitude of the valve opening are determined by the calculated flow difference data. If the flow difference is large (for example, more than 5L / min), it means that the flow deviates from the target value more seriously, and a larger adjustment is required at this time. The adjustment step is generally set to 2%-5% of the valve opening. For example, when the flow difference is a positive value (such as +6L / min), it means that the flow is too large, and the valve opening needs to be reduced, and the current 80% opening is reduced to 75%; if the flow difference is a negative value (such as -7L / min), it means that the flow is insufficient, and the valve opening needs to be increased, and the current 60% opening is increased to 64%. If the flow difference is small (for example, between 1L / min and 5L / min), it means that the flow is close to the target flow, and the adjustment amplitude is small at this time, and the adjustment step is usually set to 1%-2%. For example, if the flow difference is negative (such as -2L / min), the valve opening can be increased from 55% to 57%; if the difference is positive (such as +3L / min), the valve opening can be reduced from 70% to 68.5%. When the flow difference is close to zero, it means that the flow is close to the target value. At this time, the adjustment range can be set to the minimum value, usually set to a fine-tuning step of 0.5%-1%. If the current valve opening is 50% and the flow difference is zero, only 0.5% fine-tuning is required to adjust the opening to 50.5%. The valve opening is usually adjusted by an electric control valve or a pneumatic control valve. The electric control valve is driven by a stepper motor or a servo motor. The valve opening is adjusted by precisely controlling the motor rotation angle. The control signal is output by a PID controller or a flow control system. The pneumatic control valve drives the valve opening by changing the air pressure. The pneumatic valve controller changes the valve opening by increasing or decreasing the gas pressure based on the adjustment amount calculated according to the flow difference data. The size of the adjustment step is set according to the system response speed and accuracy requirements. The step size of a fast response system can be set large (such as 2%-5%), while for a system with higher accuracy requirements, it can be set small (such as 0.5%-1%).

[0081] Step S445: Perform leakage control correction integration according to the pump speed adjustment data and the valve opening adjustment data to obtain leakage control correction data.

[0082] In this embodiment, the pump speed adjustment data and the valve opening adjustment data are first synchronized in time series and weighted fused through the control algorithm. The weighting ratio can be set according to the relative influence of the pump and the valve on the flow control. For example, if the pump adjustment has a greater impact on the flow, the pump speed adjustment can be given a higher weight (such as 70%), while the valve opening adjustment has a weight of 30%. Through this integration, a leakage control correction data is obtained, which can be directly used for subsequent system control. The data contains accurate correction values ​​for flow deviations, so that the system can stably maintain the required flow level during operation and effectively prevent leakage problems.

[0083] Step S45: Perform dynamic control based on the pressure control defect data to obtain pressure dynamic control data; In this embodiment, dynamic control is performed based on pressure control defect data, and the pressure control defect data provides specific information about system pressure anomalies, such as pressure values ​​that are too high or too low. Through these data, the PID (proportional-integral-differential) control algorithm is used to dynamically adjust the pressure. The algorithm can adjust the operating state of the pump (such as adjusting the speed, adjusting the valve, etc.) according to the real-time changes in pressure to maintain the pressure within the set range. For example, if the pressure is detected to be too low, the control system will increase the speed of the pump or adjust the opening of the water inlet valve to increase the pressure. The pressure dynamic control data includes real-time pressure values, control parameters (such as PID adjustment coefficients) and dynamically adjusted pressure set values. These data will provide the system with accurate pressure control and stable operation.

[0084] It is particularly important that step S45 includes the following steps: Step S451: Drawing a pressure map based on the pressure control defect data to obtain a pressure map; In this embodiment, it is necessary to collect pressure control defect data, which comes from the pressure sensor or real-time monitoring system of the equipment. The pressure control defect data includes pressure values ​​at different time points, involving the fluctuation of pressure values ​​within the standard working range. Use dedicated drawing software or data processing tools (such as Matplotlib library in MATLAB or Python) to draw a pressure graph in chronological order based on the collected pressure data points. The horizontal axis of the graph is time, and the vertical axis is the pressure value. Each pressure data point corresponds to the pressure value at a certain moment. The drawn pressure graph should show the trend of pressure changes and clearly show the abnormal pressure fluctuations that occur during work.

[0085] Step S452: performing pressure fluctuation statistics on the pressure map to obtain high-fluctuation pressure data; In this embodiment, it is necessary to use statistical methods to analyze the degree of fluctuation in the pressure graph. By setting a threshold (for example, a fluctuation of more than 5% is considered high fluctuation), the data points in the graph that meet the high fluctuation standard are screened out. The specific operation includes calculating the standard deviation of the pressure value and judging the severity of the pressure fluctuation. Usually, a standard deviation threshold can be set (for example, a pressure fluctuation standard deviation of more than 5Pa is considered high fluctuation), and the points in the graph that exceed the threshold are marked. Through these high-fluctuation data points, the area with large pressure fluctuations during the entire monitoring period can be located, and finally the high-fluctuation pressure data can be obtained.

[0086] Step S453: performing fluctuation time statistics on the pressure graph to obtain long-term pressure fluctuation data; In this embodiment, it is necessary to perform a statistical analysis on the duration of fluctuations in the pressure graph. First, define the standard for the fluctuation time. For example, when the pressure fluctuates within the set range for more than 5 seconds, it is a "long-term fluctuation." By writing an algorithm to traverse the pressure graph, mark the time periods of continuous fluctuations, and calculate the duration of these time periods. For example, if the fluctuation lasts for more than 10 seconds, it is marked as a long-term fluctuation, and whether the fluctuation continues is determined based on the set fluctuation range (such as ±5 Pa). Based on these data, a statistical report can be generated to mark the data segments of long-term fluctuations, and finally obtain the long-term pressure fluctuation data.

[0087] Step S454: performing an intersection operation on the high fluctuation pressure data and the long-time pressure fluctuation data, thereby obtaining pressure control defect data; In this embodiment, high-fluctuation pressure data refers to data points with large pressure fluctuations in a short period of time, while long-term fluctuation data refers to fluctuation data with a long duration of pressure. The intersection operation is to filter out pressure data that belongs to both the high-fluctuation area and the long-term fluctuation area. For example, if the pressure fluctuation amplitude of a certain period is greater than 5Pa and the duration exceeds 10 seconds, the data of this period will be classified as pressure control defect data. This step filters out specific pressure abnormality data by setting the intersection condition, and further performs dynamic control based on this.

[0088] Step S455: constructing a dynamic control model according to the pressure control defect data, thereby obtaining a dynamic control model; In this embodiment, pressure fluctuations and other process parameters (such as pump speed, valve opening, etc.) are combined through appropriate data modeling technology to form a mathematical model that can be used for dynamic pressure control. First, the pressure control defect data obtained in step S454 are processed. These data contain high-fluctuation pressure data and long-term fluctuation data, and need to be preprocessed, such as denoising, standardization, etc., to ensure the quality and availability of the data. Common denoising methods include using low-pass filters, mean filters, or other smoothing algorithms suitable for pressure data. The standardization operation can unify the range of data into a standard range, such as 0 to 1, to avoid unnecessary deviations in model training caused by data with large values. Then, according to the processed data, an appropriate modeling technology is selected. A physics-based control model can be used. This type of model usually relies on physical principles in fields such as fluid mechanics, and describes the relationship between variables such as pressure, flow rate, and pump speed in the system through mathematical formulas. Another method is modeling based on empirical data, which extracts rules from historical process data and constructs empirical models through regression analysis, time series analysis, etc. Machine learning models are also a feasible option. Through algorithms such as support vector machines (SVM), decision trees, deep learning, etc., complex patterns of pressure control can be learned from a large amount of historical data. The input data of these models include process parameters such as pressure fluctuation data, pump speed, valve opening, etc., to ensure that the model can fully consider the relationship between multidimensional data. During the model construction process, appropriate modeling tools such as Simulink, MATLAB, Python's Scikit-learn library, etc. are used for implementation. These tools provide rich modeling, training and simulation functions to help build control models suitable for specific applications. The training process uses historical data sets to adjust the parameters of the model to ensure that the model can accurately predict the pressure fluctuations of the system and can output corresponding control instructions, such as adjusting the pump speed or valve opening. Through these control instructions, the system can achieve precise dynamic pressure control and maintain the pressure within a predetermined range, thereby improving the stability and operating efficiency of the system.

[0089] Step S456: Dynamically control the pressure control defect data according to the dynamic control model to obtain pressure dynamic control data.

[0090] In this embodiment, the output of the dynamic control model is compared with the real-time pressure sensor data, and the control parameters such as pump speed and valve opening are dynamically adjusted according to the control instructions of the model. For example, if the model calculates that the valve needs to be opened by 10%, the valve is adjusted to this opening in real time to ensure pressure stability. Through continuous monitoring and adjustment, the system performance is continuously optimized, and finally the pressure dynamic control data is obtained, which records the control parameters and their changing trends during the entire adjustment process.

[0091] Step S46: Optimizing the wastewater control model according to the leakage control correction data and the pressure dynamic control data to generate a wastewater optimization control model.

[0092] In this embodiment, the wastewater control model constructed based on the flow rate, pressure and other parameters of the pump system is a mathematical model for optimizing the flow rate and pressure in the wastewater treatment process. The core goal of the model is to improve the efficiency of wastewater treatment and ensure the safety and stability of the system by adjusting these key parameters. In the implementation process, the model is first updated according to the leakage control correction data and the pressure dynamic control data. These data provide control defect information that occurs in the wastewater control process, such as leakage problems in the pump system and abnormal pressure fluctuations. By analyzing the leakage control correction data, the leakage problem that occurs in the wastewater control process can be identified, and the pressure fluctuation in the system can be identified according to the pressure dynamic control data. Based on these data, the relevant parameters in the wastewater control model, such as the flow setting value, the pressure setting value and the pump speed, are adjusted accordingly. For example, if the leakage problem affects the wastewater flow, the flow setting value is adjusted to adapt to the new flow requirement; if there is a fluctuation in the pressure control, the pressure setting value is adjusted according to the pressure dynamic control data to reduce the fluctuation amplitude. In order to achieve the dynamic adjustment of these parameters, an optimization algorithm can be used, such as a PID control algorithm to accurately adjust the flow and pressure, so that the wastewater treatment process can respond to environmental changes in real time. Through the real-time adjustment of these parameters, the wastewater control model can maintain the high efficiency of wastewater treatment in a dynamic environment, ensure that the system can quickly respond to different operating conditions, and avoid control errors caused by abnormal data or environmental changes. Through the optimized wastewater control model, new control strategies, adjusted model parameters and new operating standards are obtained. These adjustments ensure that the wastewater treatment system can work stably and efficiently in actual operation, thereby improving the overall performance and safety of wastewater treatment. The optimized model provides an adaptive control mechanism that can adjust the control strategy in real time and handle various complex process requirements, thereby achieving the optimization of the wastewater treatment process.

[0093] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.

[0094] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A method for generating a control model for a chemical production wastewater treatment system, characterized in that: The following steps are involved: Step S1: using online monitoring instruments to collect chemical wastewater data, including tin-containing wastewater data and etching liquid wastewater data; determining the wastewater recovery control stage according to the chemical wastewater data; and constructing a wastewater control model based on the wastewater recovery control stage and using chemical engineering simulation software; Step S2: inputting chemical wastewater data into the wastewater control model, and using simulation software to simulate the wastewater recovery control process to obtain wastewater recovery control data, and performing control abnormality judgment on the wastewater recovery control data to obtain abnormal wastewater data; Step S3: using a high-definition industrial camera to collect an image of the wastewater sedimentation tank, and identifying and obtaining an image of the centrifugal pump from the image of the wastewater sedimentation tank; locating the pipeline position based on the centrifugal pump image to obtain pipeline position data; obtaining a pipeline liquid image based on the pipeline position data, and performing color detection. If the color of the pipeline liquid does not meet the preset color value, it is determined that the centrifugal pump is leaking; Step S4: Identify the control defects of the centrifugal pump leakage, perform model correction on the wastewater control model based on the control defects, and generate a wastewater optimization control model.

2. The method for generating a control model for a chemical production wastewater treatment system according to claim 1, characterized in that: Step S1 is specifically as follows: Step S11: using an online heavy metal sensor to measure the tin ion concentration, wherein the acquisition frequency is set to once per minute and the measurement range is 0-100 mg / L, to obtain tin-containing wastewater data; Step S12: using a pH sensor to monitor the pH value of the waste etching liquid in real time, setting the measurement range to 0-14 pH and the accuracy to ±0.01 pH, to obtain the waste etching liquid data; Step S13: Integrate tin-containing wastewater data and etching liquid wastewater data to obtain chemical wastewater data; Step S14: determining the wastewater recovery control stage according to the chemical wastewater data to obtain the wastewater recovery control stage; Step S15: constructing a wastewater control model based on the wastewater recovery control stage and using chemical engineering simulation software.

3. The method for generating a control model for a chemical production wastewater treatment system according to claim 2, characterized in that: Step S14 is specifically as follows: Step S141: dividing the tin-containing wastewater data by concentration, adopting ion exchange recovery control when the tin ion concentration is below 50 mg / L, and adopting electrolytic deposition recovery control when the tin ion concentration exceeds 50 mg / L, and obtaining ion exchange recovery control stage data and electrolytic deposition recovery control stage data; Step S142: pH value acid-base adjustment is performed on the etching liquid waste liquid data to obtain neutral pH value etching liquid waste liquid data, and precipitation method recovery control setting is performed on the neutral pH value etching liquid waste liquid data to obtain precipitation method recovery control stage data; Step S143: Perform stage integration according to the ion exchange recovery control stage data, the electrolytic deposition recovery control stage data and the precipitation recovery control stage data, so as to obtain the wastewater recovery control stage.

4. The method for generating a control model for a chemical production wastewater treatment system according to claim 2, characterized in that: Step S15 is specifically as follows: Step S151: inputting chemical wastewater data into simulation software and performing flow simulation to obtain wastewater flow data; Step S152: extracting flow data and flow velocity data of wastewater flow data; Step S153: Scan the length and width of the wastewater recovery pool using a laser scanner, wherein the scanning distance is set to 1-50 meters and the scanning density is set to 50-150 points / square meter to obtain shape data of the wastewater recovery pool; Step S154: construct a fluid flow model based on the flow data, flow velocity data and wastewater recovery tank shape data, set the time step to 0.1s, the spatial grid accuracy to 0.5m, and the diffusion coefficient to 0.1cm² / s, simulate the flow behavior of wastewater in the tank, and obtain a fluid flow model; Step S155: Import the ion exchange recovery control stage data, the electrolytic deposition recovery control stage data and the precipitation method recovery control stage data into the fluid flow model, and divide the wastewater control area, wherein the ion exchange treatment flow range is set to 5-50m³ / h, the electrolytic deposition current density range is set to 5-20A / m², and the precipitation method dosage range is set to 0.5-10g / L to obtain a wastewater control model.

5. The method for generating a control model for a chemical production wastewater treatment system according to claim 1, characterized in that: Step S2 is specifically as follows: Step S21: performing standardization processing on the chemical wastewater data to obtain standardized chemical wastewater data; Step S22: inputting the standardized chemical wastewater data into the wastewater control model, and uploading the wastewater control model to the simulation software; Step S23: performing ion exchange recovery control simulation in the simulation software, setting the ion exchange resin volume to 5-50 g / L and the exchange rate to 0.1-10 L / min; Step S24: Perform electrolytic deposition recovery control simulation in the simulation software, setting the current density to 5-20A / m² and the deposition time to 10-60 minutes; Step S25: performing a precipitation recovery control simulation in the simulation software, setting the stirring speed to 50-300 rpm, the precipitation reaction time to 30-120 minutes, and the precipitant dosage to 0.5-10 g / L; Step S26: running the wastewater recovery control program in the simulation software to obtain wastewater recovery control data; Step S27: Perform control abnormality judgment on the wastewater recovery control data to obtain abnormal wastewater data.

6. The method for generating a control model for a chemical production wastewater treatment system according to claim 5, characterized in that: Step S27 is specifically as follows: Step S271: When any of the following situations occurs, it is determined that the ion exchange recovery control is abnormal, and the ion exchange recovery control abnormal data is obtained: the recovery liquid flow rate deviates from the optimal range by more than ±10%, the metal ion concentration in the wastewater is lower than 1000 mg / L or higher than 5000 mg / L, and the pH value deviates from the range of 4.5-7.0; Step S272: When the following conditions occur at the same time, it is determined that the electrolytic deposition recovery control fails and the electrolytic deposition recovery control failure data is obtained: the electrolysis efficiency is detected to be lower than 85% for three consecutive times, the concentration of metal electrolysis products in the effluent water exceeds 30% of the influent water concentration, and the current density of the electrolytic cell fluctuates abnormally and the above abnormalities last for more than 40 minutes; Step S273: When the following conditions occur at the same time, it is determined to be a sedimentation recovery control failure and sedimentation recovery control failure data is obtained: the amount of precipitant added changes by more than 15% within 1 hour, the concentration of suspended solids in the wastewater continues to rise by more than 20%, the temperature deviates from the normal range of 20-30°C, the pH value deviates from the normal range of 5.0-8.5, and the sedimentation rate of the precipitate is significantly slowed down and cannot be recovered in time; Step S274: Integrate the ion exchange recovery control abnormal data, the electrolytic deposition recovery control failure data and the precipitation recovery control failure data to obtain abnormal wastewater data.

7. The method for generating a control model for a chemical production wastewater treatment system according to claim 1, characterized in that: Step S3 is specifically as follows: Step S31: Use a high-definition industrial camera to collect an image of the wastewater sedimentation tank. The camera's collection angle should be set to cover the entire sedimentation tank area. The camera is kept 2-5 meters away from the sedimentation tank. The wastewater sedimentation tank image is Gaussian blurred, a 3x3 Gaussian convolution kernel is selected, and the standard deviation is set to 1.0 to 2.0 to obtain a Gaussian blurred sedimentation tank image. Step S32: Performing centrifugal pump outer edge detection on the Gaussian blurred sedimentation tank image. The preset parameters of the edge detection algorithm include a low threshold and a high threshold. The low threshold range is set to 30-50, and the high threshold range is set to 100-150. The threshold controls the sensitivity of edge detection. By performing gradient calculation on the Gaussian blurred sedimentation tank image, the edge area is identified to obtain the centrifugal pump outer edge image. Step S33: performing centrifugal pump region recognition on the Gaussian blurred sedimentation tank image according to the centrifugal pump outer edge image, wherein the contour area range is set to 2000-10000 pixels, to obtain a centrifugal pump region image; Step S34: performing a closing operation on the discontinuous contour edges in the centrifugal pump area image, thereby obtaining a complete contour image of the centrifugal pump; Step S35: locating the pipeline position based on the complete contour image of the centrifugal pump to obtain pipeline position data, and performing image acquisition based on the pipeline position data to obtain a pipeline image; Step S36: performing pipeline corrosion identification based on the pipeline image to obtain a pipeline corrosion image; Step S37: Identify impurities in the pump cavity based on the complete contour image of the centrifugal pump to obtain an impurity image of the pump cavity; Step S38: integrating abnormal images according to the pipeline corrosion image and the pump cavity impurity image to obtain an abnormal image of the centrifugal pump; Step S39: Determine the abnormal position according to the abnormal image of the centrifugal pump, photograph the pipeline liquid according to the abnormal position of the centrifugal pump, and perform color detection, convert the pipeline liquid image into HSV color space, and perform threshold detection on the liquid color in the image; the normal color range of the preset liquid is [40,60,50] to [100,255,255], where the H value represents the hue, the S value represents the saturation, and the V value represents the brightness; if the pipeline liquid color does not meet this range, it is determined that the liquid color is abnormal and it is judged to be a centrifugal pump leakage.

8. The method for generating a control model for a chemical production wastewater treatment system according to claim 7, characterized in that: Step S36 is specifically as follows: Step S361: performing grayscale conversion on the pipeline image to obtain a pipeline grayscale image; Step S362: Calculate the horizontal pixel values ​​in the pipeline grayscale image, construct a grayscale co-occurrence matrix based on the horizontal pixel values, extract low energy values ​​with energy less than 0.1 and low contrast values ​​of 0.2-0.8, perform intersection area operation on the pipeline grayscale image according to the low energy values ​​and low contrast values, and obtain a binary image of the pipeline corrosion area; Step S363: select a 5x5 circular core structure element, apply the circular core structure element to each pixel of the binary image of the pipeline corrosion area by sliding, and update it according to the pixel value of the area covered by the circular core structure element to obtain the expansion area image; Step S364: denoising the dilated region image to obtain a denoised dilated region image; Step S365: Based on the denoised dilated area image, the pipeline grayscale image is used to locate the pipeline corrosion area, wherein the pipeline area positioning standard is: cross-sectional area 500-5000px², circularity threshold greater than 0.8, aspect ratio set to 1:2, and the pipeline corrosion image is obtained.

9. The method for generating a control model for a chemical production wastewater treatment system according to claim 7, characterized in that: Step S37 is specifically as follows: Step S371: Position the complete outline image of the centrifugal pump, and capture the temperature change in the pump cavity at that position through a thermal imaging camera to obtain a temperature image of the centrifugal pump; Step S372: performing grayscale conversion on the centrifugal pump temperature image to obtain a temperature grayscale image, and performing Gaussian blur processing on the temperature grayscale image to obtain a Gaussian blurred temperature grayscale image; Step S373: performing threshold segmentation on the Gaussian blurred temperature grayscale image, setting the temperature threshold range to 35-45° C., so as to screen out the high temperature area inside the pump cavity and obtain a high temperature area image; Step S374: select a 3×3 rectangular core structure element, apply an expansion operation to expand the edge of the high-temperature area image, enhance the thermal anomaly signal of the potential high-temperature area, and obtain an expanded high-temperature area image; Step S375: De-noising the expanded high-temperature region image, using a 3×3 filter window to remove stray noise, to obtain a de-noised high-temperature region image; Step S376: locating the impurity region according to the denoised high temperature region image, identifying the boundary of the high temperature region, and obtaining the impurity region contour data; Step S377: Perform regional screening and calibration on the impurity area contour data, set the minimum temperature deviation of the impurity area to 5°C, set the minimum area threshold to 100px², the circularity to be greater than 0.7, and the aspect ratio to be greater than 0.5 and less than 2, to obtain the pump cavity impurity image.

10. The method for generating a control model for a chemical production wastewater treatment system according to claim 1, characterized in that: Step S4 is specifically as follows: Step S41: collecting the leakage flow of the centrifugal pump to obtain leakage flow data of the centrifugal pump, and performing flow control defect detection to obtain flow control defect data; Step S42: collecting leakage pressure of the centrifugal pump to obtain leakage pressure data of the centrifugal pump, and performing pressure control defect detection to obtain pressure control defect data; Step S44: performing leakage correction based on the flow control defect data to obtain leakage control correction data; Step S45: Perform dynamic control based on the pressure control defect data to obtain pressure dynamic control data; Step S46: Optimizing the wastewater control model according to the leakage control correction data and the pressure dynamic control data to generate a wastewater optimization control model.

Citation Information

Patent Citations

  • Pipeline liquid leakage point position automatic monitoring method based on image monitoring system

    CN116838958A

  • Wastewater treatment system numerical simulation system based on digital twinning

    CN118551586A

  • Industrial waste gas and wastewater treatment method and system based on model optimization

    CN118747419A

  • Centrifugal pump fault diagnosis method and system based on visual sensing technology

    CN119122821A

  • Data transmission monitoring method and system for tin-containing sewage treatment unit

    CN119383212A

Cited By

  • Oil gas multi-parameter intelligent control system based on PLC and real-time data processing

    CN119960374A

  • Intelligent control method and system for production and processing of water-soluble fertilizer

    CN120215245A

  • Circuit board etching solution concentration control method and system

    CN120669772A

  • Topological optimization design system and method for heat dissipation module fin key hole structure

    CN121118295A

  • Remote automatic control method applied to pump station

    CN121165505A