A method, device, equipment and storage medium for detecting water quality in a sedimentation area

The CNN-based method for water quality and sludge thickness measurement in sedimentation tanks addresses inaccuracies and lack of real-time monitoring, offering precise and adaptive control for enhanced sedimentation tank performance.

CN118781103BActive Publication Date: 2024-12-20厦门市政环境科技股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411246576.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-20
Estimated Expiration
2044-09-06

AI Technical Summary

Technical Problem

Existing methods for measuring water quality and sludge thickness in sedimentation tanks are inaccurate, require manual operation, and cannot provide real-time monitoring, leading to inefficiencies and unstable effluent quality.

Method used

A method using a pre-trained CNN model to process sedimentation area images, generating feature vectors, and calculating distances to standard images for accurate water quality and sludge thickness labels, with integrated reporting and adaptive sampling.

Benefits of technology

Provides accurate, real-time measurement of water quality and sludge thickness, enabling intelligent adjustment of sedimentation tank operations for improved efficiency and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118781103B_ABST
    Figure CN118781103B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, equipment and storage medium for detecting water quality in a sedimentation area. The method receives sedimentation area images sent by an image acquisition device at preset time intervals and pre-processes the sedimentation area images. Then, a pre-trained CNN model is called to extract the pre-processed sedimentation area images to generate feature vectors. Then, the distance between the feature vector and the feature vector of each standard image is calculated, the standard image with the minimum distance is determined and the corresponding index is generated. Finally, the sedimentation area image is inferred according to the index to generate a water quality label and a mud thickness label. The problem of inaccurate measurement of water quality and mud thickness is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of water quality detection, and in particular to a method, device, equipment and storage medium for detecting water quality in a sedimentation area. Background Art

[0002] Water quality and sludge thickness are two key indicators for evaluating the effectiveness of sedimentation tanks, which directly affect the efficiency of water treatment systems and the quality of effluent. Water quality testing usually involves two main aspects: physical and chemical analysis and microbial testing. In terms of physical and chemical analysis, commonly used tools include online dissolved oxygen meters, turbidity meters, pH meters, conductivity meters, and dissolved oxygen analyzers. These tools are used to measure the dissolved oxygen content, turbidity, pH value, ion content, and dissolved oxygen content in water. On the other hand, in terms of microbial testing, physical and chemical testers, colorimeters, portable residual chlorine / total chlorine testers, and COD testers are usually used to detect the content of humus, organic matter, metals and other substances in water, as well as indicators such as residual chlorine, total chlorine content, and chemical oxygen demand in water.

[0003] However, the above detection methods have some shortcomings. First, most of these methods require manual operation, so they may be affected by the operator's technical level and subjective factors, which may affect the accuracy of the test results and have certain uncertainties. Secondly, these devices can only perform single and limited indicator tests and cannot fully reflect the overall situation of water quality. Finally, the detection speed of these devices is relatively slow and real-time monitoring cannot be achieved, so there are certain limitations in timely detection and treatment of water quality problems. These limitations may lead to reduced operating efficiency of sedimentation tanks, unstable effluent quality, and increased maintenance costs.

[0004] The sludge thickness refers to the thickness of the sludge at the bottom of the sedimentation tank, and its impact on the water treatment system cannot be ignored. For example, excessive sludge thickness causes it to occupy too much of the sedimentation tank capacity, reducing the system's treatment efficiency; excessive sludge causes sludge blocks to float up, affecting the quality of the effluent and causing adverse effects on the water quality. It can be seen that it is necessary to adjust the sludge discharge system in a timely manner according to the water quality and the current sludge thickness to improve the sludge suction efficiency and thus improve the treatment efficiency. Among the existing sludge thickness measurement methods, the manual rod insertion visual method is simple to operate but has poor accuracy and large deviations; the optical probe mobile measurement method will be affected by excessive sediment content in the pool or excessively turbid water quality. The limitations of these methods may lead to inaccurate judgments on the timing of sludge discharge and affect the overall performance of the sedimentation tank.

[0005] In view of this, this application is filed. Summary of the invention

[0006] The invention discloses a method, device, equipment and storage medium for detecting water quality in a sedimentation area, aiming to solve the problem of inaccurate measurement of water quality and sludge thickness.

[0007] The first embodiment of the present invention provides a method for detecting water quality in a sedimentation area, comprising:

[0008] receiving a sedimentation area image sent by an image acquisition device at preset time intervals, and preprocessing the sedimentation area image;

[0009] Calling a pre-trained CNN model to extract the pre-processed precipitation area image to generate a feature vector;

[0010] Calculating the distance between the feature vector and each standard image feature vector, determining the standard image with the minimum distance and generating a corresponding index;

[0011] The sedimentation area image is inferred according to the index to generate a water quality label and a mud thickness label.

[0012] Preferably, the preprocessing includes: performing filtering operations, image enhancement operations, and size unification operations on the sedimentation area image.

[0013] Preferably, before calling the pre-trained CNN model to extract the pre-processed precipitation area image to generate the feature vector, the step also includes training the CNN model, wherein the training process is:

[0014] Classify water quality from clear to turbid, classify sludge according to different thicknesses, and classify light conditions;

[0015] Under different water quality levels, different sludge thickness levels, and different lighting conditions, multiple groups of standard images are collected respectively, wherein the multiple groups of standard images cover different states and scenes of the sedimentation tank;

[0016] Preprocessing and data annotation are performed on the plurality of groups of standard images to generate a standard image data set, which is divided into a training set and a test set according to a preset ratio, wherein the annotation includes water quality characteristics and mud thickness;

[0017] Use convolutional neural networks to establish water quality identification models and sludge thickness measurement models, learn and train through training sets, and optimize the structures and parameters of water quality identification models and sludge thickness measurement models through cross-validation and parameter adjustment;

[0018] The water quality identification model and the sludge thickness measurement model are tested using the test set, and the structure and parameters of the water quality identification model and the sludge thickness measurement model are adjusted and optimized based on the test results.

[0019] Preferably, it also includes:

[0020] Generate image samples through mirroring, rotation, and scaling operations to expand the training set;

[0021] And identify the labeled data and delete abnormal data or incorrectly labeled image samples.

[0022] Preferably, the water quality label and the mud thickness label are used to adjust the operating parameters of the sedimentation tank and the operating frequency of the mud discharger.

[0023] Preferably, after the sedimentation area image is inferred according to the index to generate a water quality label and a mud thickness label, the method further includes:

[0024] After judging that the water quality in the sedimentation tank meets the requirements according to the water quality label and the sludge thickness label, the whole-process recorded water quality information and sludge thickness information are integrated and a report is generated, wherein the report includes a time line graph, sedimentation efficiency, and sedimentation amount.

[0025] Preferably, the method further comprises: adjusting the sampling frequency of the image acquisition device according to the report.

[0026] The second embodiment of the present invention provides a device for detecting water quality in a sedimentation area, comprising:

[0027] A preprocessing unit, used for receiving the sedimentation area image sent by the image acquisition device at preset time intervals, and preprocessing the sedimentation area image;

[0028] A feature vector generating unit, used for calling a pre-trained CNN model to extract the pre-processed precipitation area image to generate a feature vector;

[0029] An index generating unit, used for calculating the distance between the feature vector and the feature vector of each standard image, determining the standard image with the minimum distance and generating a corresponding index;

[0030] The label generation unit is used to infer the sedimentation area image according to the index to generate a water quality label and a mud thickness label.

[0031] The third embodiment of the present invention provides a sedimentation area water quality detection device, including a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement a sedimentation area water quality detection method as described in any one of the above.

[0032] The fourth embodiment of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program can be executed by a processor of a device where the computer-readable storage medium is located to implement a method for detecting water quality in a sedimentation area as described in any one of the above items.

[0033] Based on the detection method, device, equipment and storage medium of the water quality of the sedimentation area provided by the present invention, the sedimentation area image sent by the image acquisition device at preset time intervals is received and the sedimentation area image is preprocessed; then, the pre-trained CNN model is called to extract the pre-processed sedimentation area image to generate a feature vector; then, the distance between the feature vector and the feature vector of each standard image is calculated, the standard image with the minimum distance is determined and the corresponding index is generated; finally, the sedimentation area image is inferred according to the index to generate a water quality label and a mud thickness label. The problem of inaccurate measurement of water quality and mud thickness is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic flow chart of a method for detecting water quality in a sedimentation area provided by the first embodiment of the present invention;

[0035] Figure 2 It is a module schematic diagram of a device for detecting water quality in a sedimentation area provided in the second embodiment of the present invention. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0037] In order to better understand the technical solution of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0038] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0040] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0041] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0042] The "first\second" mentioned in the embodiments is only to distinguish similar objects, and does not represent a specific order for the objects. It is understandable that the "first\second" can be interchanged with the specific order or sequence where permitted. It should be understood that the objects distinguished by "first\second" can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than those illustrated or described herein.

[0043] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0044] The invention discloses a method, device, equipment and storage medium for detecting water quality in a sedimentation area, aiming to solve the problem of inaccurate measurement of water quality and sludge thickness.

[0045] See also Figure 1 The first embodiment of the present invention provides a method for detecting water quality in a sedimentation area, which can be performed by a detection device for water quality in a sedimentation area (hereinafter referred to as the detection device), and in particular, by one or more processors in the detection device to implement at least the following steps:

[0046] S101, receiving a sedimentation area image sent by an image acquisition device at preset time intervals, and preprocessing the sedimentation area image;

[0047] In this embodiment, the detection device can be a terminal with data processing capabilities such as a server, workstation, laptop computer, desktop computer, etc., which can communicate with the image acquisition device by wire or wirelessly to receive the sedimentation area image acquired by the image acquisition device. The detection device can be installed with a corresponding operating system and application software, and the functions required by this embodiment can be realized through the combination of the operating system and application software.

[0048] It should be noted that in this embodiment, according to the actual situation of the sedimentation tank, the camera's field of view, image quality, working performance, waterproofness and other factors can be considered to select a suitable model of mobile camera; considering the observation needs at night or in dark conditions, the waterproof performance is comprehensively considered to select a suitable fill light device; comprehensively considering the lighting conditions, wind direction conditions, geological conditions, sedimentation tank layout and other factors in the sedimentation area, select a place with little influence from lighting conditions and wind conditions and good foundation conditions, install the mobile camera and fill light device, and adjust the angle. Preferably, the mobile camera and fill light device can be installed on a pan / tilt that can be moved in different directions so as to change the position when adversely affected by light, wind and the like.

[0049] In this embodiment, the preprocessing includes: performing a filtering operation on the sedimentation area image, wherein the filtering operation may be a median filter. , or a Gaussian filter , remove the noise in the image.

[0050] You can use histogram equalization , contrast stretch Perform image enhancement to enhance the visual effect of the image; and adjust the collected images to a uniform size .in, is the input image, is the standard deviation of the Gaussian filter, are the width and height of the target image respectively.

[0051] S102, calling a pre-trained CNN model to extract the pre-processed sedimentation area image to generate a feature vector;

[0052] In a possible implementation of the present invention, in order to establish an accurate water quality recognition model and a mud thickness measurement model, the CNN model is trained, and specifically, the key parameters of the sedimentation tank can be finely graded first. The water quality is divided into multiple levels from clear to turbid, for example, it can be divided into four levels: extremely clear, slightly turbid, moderately turbid, and severely turbid. The mud thickness is also divided according to the actual situation, such as 0-5cm, 5-10cm, 10-15cm, etc. At the same time, considering the impact of lighting conditions on image quality, the light intensity can be graded, including weak light, normal light, and strong light levels.

[0053] After the classification was completed, a large number of standard images were collected under various combinations of conditions. This covers various scenarios of sedimentation tanks under different operating states and environmental conditions. For example, images were collected under clear water, thin mud and strong light conditions, and also under turbid water, thick mud and weak light conditions. This allows the model to adapt to various complex actual situations.

[0054] The collected standard images were preprocessed and data annotated. The preprocessing steps include image denoising, contrast enhancement, and size unification. The main purpose of these steps is to improve the image quality and lay the foundation for model training. Furthermore, in this embodiment, detailed water quality characteristics and mud thickness information are annotated for each image. This not only improves the learning efficiency of the model, but also ensures that the model can accurately identify key features.

[0055] In order to ensure the generalization ability of the model, the processed standard image dataset is divided into a training set and a test set in a ratio of 7:3. In the model building stage, a convolutional neural network (CNN) can be selected as the basic architecture to establish a water quality recognition model and a mud thickness measurement model respectively. The multi-layer structure and convolution characteristics of CNN make it particularly suitable for processing image data and can effectively extract complex features in the image. The two models were deeply learned and trained using the training set. During the training process, cross-validation technology was used to evaluate the model performance, and the model structure was optimized by adjusting the hyperparameters. In the iterative optimization process, the accuracy and stability of the model were significantly improved.

[0056] The trained model was thoroughly tested using a pre-reserved test set. The test results were used not only to evaluate the overall performance of the model but also to identify potential weaknesses in the model. Based on these test results, the structure and parameters of the model were further adjusted and optimized, such as fine-tuning the number of convolutional layers and adjusting the learning rate, to achieve the best performance.

[0057] S103, calculating the distance between the feature vector and the feature vector of each standard image, determining the standard image with the minimum distance and generating a corresponding index;

[0058] In this embodiment, the distance calculation expression is:

[0059]

[0060] in, is the feature vector of the new image, for The feature vector of the standard image, the standard image index corresponding to the minimum distance , , For calculation When the minimum value is obtained .

[0061] It should be noted that when the detection device receives a new sedimentation tank image, it first uses a pre-trained convolutional neural network (CNN) model to extract the feature vector of the image. This feature vector is a high-dimensional array that contains the key visual feature information of the image. The detection device calculates the distance between this new feature vector and each standard image feature vector stored in the database. The "distance" here can be measured by Euclidean distance or cosine similarity. Euclidean distance can reflect the absolute distance of vectors in high-dimensional space, while cosine similarity focuses more on the similarity of vector directions. It can be selected according to the specific application scenario. It is not specifically limited here, but these solutions are all within the scope of protection of the present invention.

[0062] After calculating all the distances, the detection device will determine the standard image with the smallest distance and generate the corresponding index. This index is actually the unique identifier of the standard image in the database, through which all relevant information of the standard image can be quickly accessed, including important parameters such as water quality level and mud thickness.

[0063] S104, inferring the sedimentation area image according to the index to generate a water quality label and a mud thickness label.

[0064] Specifically, in this embodiment, the detection device quickly locates the standard image that is most similar to the current sedimentation area image through the index. This standard image carries a wealth of predefined information, including detailed water quality parameters and mud thickness data. However, in this embodiment, the detection device does not just stop at simple label matching, but further uses a deep learning model to perform refined reasoning on the current image. It takes into account multiple key factors, such as the overall characteristics of the image, local details, color distribution, and subtle differences from the standard image.

[0065] In terms of water quality label generation, the detection equipment will analyze multiple dimensions in the image, such as water transparency, color changes, and surface reflective properties. By comparing with standard images and combining with the pre-trained water quality recognition model, the system can accurately determine the current water quality and generate a corresponding water quality label. This label not only includes basic water quality levels (such as clear, slightly turbid, severely turbid, etc.), but also more detailed water quality parameters, such as suspended matter content, organic matter concentration and other quantitative indicators.

[0066] For the generation of the sludge thickness label, the detection equipment not only considers the color and texture characteristics of the bottom of the sedimentation tank, but also analyzes the light transmission from the water surface to the bottom of the pool, as well as the possible distribution of sediments in the water body. Through comprehensive analysis, combined with the pre-trained sludge thickness measurement model, the system can accurately estimate the current sludge thickness and generate corresponding labels. This label can include a specific thickness value (such as 5.2 cm) or a predefined thickness range (such as 5-10 cm). In practical applications, the detection equipment can generate detailed labels such as "water quality is slightly turbid, suspended matter content is about 50 mg / L, and sludge thickness is in the range of 7-8 cm." It provides a solid foundation for the intelligent management of water treatment systems, and can be used to automatically adjust the amount of flocculants, optimize the sludge discharge cycle, predict maintenance needs, and other aspects.

[0067] In a possible embodiment of the present invention, the original image can be transformed by using mirror inversion, rotation, and scaling operations to generate a large number of new training samples. Among them, the mirror inversion operation can create a horizontal or vertical flip version of the image, so that the model learns to recognize features at different angles, the rotation operation can simulate slight changes in the camera installation angle, and generate more diverse images by rotating at a small angle (such as ±15°), and the scaling operation simulates the effect of shooting at different distances, so that the model can adapt to feature recognition at different scales.

[0068] These data enhancement operations enable the present embodiment to generate a large number of new samples from limited original images. For example, for each original image, 10-20 transformed new images may be generated. This not only significantly increases the amount of training data, but also improves the diversity of data. The enhanced data set contains more possible scenes and perspectives, which helps to improve the model's adaptability to various actual situations.

[0069] However, an increase in the amount of data does not necessarily mean an increase in quality. In order to ensure the high quality of the training data, a data cleaning process is implemented at the same time. This includes reviewing the labeled data to identify and delete abnormal data or image samples with incorrect labels. A variety of methods can be used to achieve this goal, including a combination of statistical analysis, manual review, and automated detection algorithms.

[0070] In a possible embodiment of the present invention, the water quality label and the mud thickness label are used to adjust the operating parameters of the sedimentation tank and the operating frequency of the mud discharger.

[0071] The detection equipment can adjust multiple key sedimentation tank operating parameters in real time based on the generated water quality label and mud thickness label. For example, when the water quality label shows that the turbidity of the water body has increased, the system will automatically increase the dosage of flocculant to promote the coagulation and sedimentation of suspended particles. At the same time, the system may slightly reduce the inlet flow rate and extend the residence time of the water in the sedimentation tank, thereby improving the sedimentation effect. On the contrary, if the water quality label indicates that the clarity of the water body has improved, the system may reduce the amount of flocculant and appropriately increase the treatment flow to improve the overall treatment efficiency.

[0072] The sludge thickness label is mainly used to optimize the working frequency of the sludge discharger. When the sludge thickness label shows that the bottom sludge thickness is close to the preset threshold, the system will automatically increase the working frequency of the sludge discharger to prevent the sludge from accumulating too thickly and affecting the sedimentation effect. On the contrary, if the sludge thickness is at a low level, the system may appropriately reduce the sludge discharge frequency, which not only saves energy but also reduces the disturbance to the already formed good sedimentation layer. In addition, the detection equipment can also predictively adjust the sludge discharge plan according to the changing trend of the sludge thickness, and start to increase the sludge discharge frequency before the sludge accumulation reaches the critical value, so as to better maintain the stable operation of the sedimentation tank.

[0073] In a possible embodiment of the present invention, after the sedimentation area image is inferred according to the index to generate a water quality label and a mud thickness label, the method further includes:

[0074] After judging that the water quality in the sedimentation tank meets the requirements according to the water quality label and the sludge thickness label, the whole-process recorded water quality information and sludge thickness information are integrated and a report is generated, wherein the report includes a time line graph, sedimentation efficiency, and sedimentation amount.

[0075] It should be noted that the time line chart is the most intuitive part of the report, which can clearly show the changing trend of water quality and sludge thickness over time. This chart can include multiple curves, representing different water quality parameters (such as turbidity, pH value, suspended solids content, etc.) and sludge thickness. Through these curves, operators can quickly identify key nodes in the treatment process, such as sudden changes in water quality, moments of accelerated or slowed sedimentation, etc. It is easy to understand the factors that affect the treatment effect and provide direction for future process improvements.

[0076] Sedimentation efficiency is another important indicator in the report. The detection equipment will calculate and display the average sedimentation efficiency of the entire treatment cycle, as well as the changes in efficiency at different times. This indicator is usually expressed as a percentage and reflects the degree to which suspended matter is removed. By analyzing the fluctuations in sedimentation efficiency, the impact of different operating parameters (such as flocculant dosage, hydraulic load, etc.) on the treatment effect can be evaluated, thereby optimizing the operating strategy. The statistics of sedimentation volume provide more information about sludge management. The report will show the accumulated sedimentation volume throughout the cycle, as well as the changes in sedimentation rate.

[0077] In a possible embodiment of the present invention, the method further includes: adjusting the sampling frequency of the image acquisition device according to the report.

[0078] Specifically, in this embodiment, the detection device will analyze various indicators in the report, such as water quality change trends, sedimentation efficiency fluctuations, mud thickness growth rate, etc., to determine the optimal image acquisition frequency. For example, when the report shows that the water quality and mud thickness are relatively stable, the system may appropriately reduce the sampling frequency, such as from once every 5 minutes to once every 15 minutes. On the contrary, if the report indicates that certain key parameters have rapid changes or abnormal fluctuations, the system will automatically increase the sampling frequency, which may be increased to once a minute or more frequently to capture more detailed information.

[0079] The detection equipment will also adjust the sampling strategy based on the abnormal event records in the report. If the report shows that abnormalities are more likely to occur under certain specific conditions (such as a specific time period or a specific water quality state), the system will automatically increase the sampling frequency in these cases to increase the monitoring of potential problems. Dynamic adjustment of sampling frequency can also help extend the life of the equipment. During stable periods when high-frequency sampling is not required, reducing the sampling frequency can reduce the intensity of use of cameras and related equipment, thereby reducing equipment wear and extending service life.

[0080] In actual applications, over time, the detection device can learn from historical data and gradually optimize its adjustment strategy. For example, it can find the correlation between certain specific environmental factors (such as temperature changes, rainfall, etc.) and water quality fluctuations, and adjust the sampling frequency in advance accordingly.

[0081] The second embodiment of the present invention provides a device for detecting water quality in a sedimentation area, comprising:

[0082] The preprocessing unit 201 is used to receive the sedimentation area image sent by the image acquisition device at preset time intervals, and preprocess the sedimentation area image;

[0083] A feature vector generating unit 202 is used to call a pre-trained CNN model to extract the pre-processed sedimentation area image to generate a feature vector;

[0084] An index generating unit 203, configured to calculate the distance between the feature vector and the feature vector of each standard image, determine the standard image with the minimum distance and generate a corresponding index;

[0085] The label generation unit 204 is used to infer the sedimentation area image according to the index to generate a water quality label and a mud thickness label.

[0086] The third embodiment of the present invention provides a sedimentation area water quality detection device, including a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement a sedimentation area water quality detection method as described in any one of the above.

[0087] The fourth embodiment of the present invention provides a computer-readable storage medium, characterized in that a computer program is stored therein, and the computer program can be executed by a processor of a device where the computer-readable storage medium is located to implement a method for detecting water quality in a sedimentation area as described in any one of the above items.

[0088] Based on the detection method, device, equipment and storage medium of the water quality of the sedimentation area provided by the present invention, the sedimentation area image sent by the image acquisition device at preset time intervals is received and the sedimentation area image is preprocessed; then, the pre-trained CNN model is called to extract the pre-processed sedimentation area image to generate a feature vector; then, the distance between the feature vector and the feature vector of each standard image is calculated, the standard image with the minimum distance is determined and the corresponding index is generated; finally, the sedimentation area image is inferred according to the index to generate a water quality label and a mud thickness label. The problem of inaccurate measurement of water quality and mud thickness is solved.

[0089] Exemplarily, the computer program described in the third and fourth embodiments of the present invention can be divided into one or more modules, and the one or more modules are stored in the memory and executed by the processor to complete the present invention. The one or more modules can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the device for detecting water quality in a sedimentation area. For example, the device described in the second embodiment of the present invention.

[0090] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the method for detecting water quality in a sedimentation area, and uses various interfaces and lines to connect the various parts of the method for detecting water quality in a sedimentation area.

[0091] The memory can be used to store the computer program and / or module, and the processor realizes various functions of a method for detecting water quality in a sedimentation area by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, a text conversion function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, text message data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0092] Wherein, if the implemented module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0093] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0094] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for detecting water quality in a sedimentation area, characterized in that: include: receiving a sedimentation area image sent by an image acquisition device at preset time intervals, and preprocessing the sedimentation area image; Calling a pre-trained CNN model to extract the pre-processed sedimentation area image to generate a feature vector, wherein the training process of the CNN model is: grading the water quality from clear to turbid, grading the sludge according to different thicknesses, and grading the lighting conditions; collecting multiple sets of standard images at different water quality levels, different sludge thickness levels, and different lighting conditions, wherein the multiple sets of standard images cover different states and scenes of the sedimentation tank; pre-processing and data annotation of the multiple sets of standard images to generate a standard image data set, which is divided into a training set and a test set according to a preset ratio, wherein the annotation includes water quality characteristics and sludge thickness; using a convolutional neural network to establish a water quality recognition model and a sludge thickness measurement model, learning and training through the training set, and optimizing the structure and parameters of the water quality recognition model and the sludge thickness measurement model through cross-validation and parameter adjustment; using the test set to test the water quality recognition model and the sludge thickness measurement model, and adjusting and optimizing the structure and parameters of the water quality recognition model and the sludge thickness measurement model according to the test results; Calculating the distance between the feature vector and each standard image feature vector, determining the standard image with the minimum distance and generating a corresponding index; Reasoning the sedimentation area image according to the index to generate a water quality label and a mud thickness label; Among them, the mud thickness label is used to adjust the working frequency of the mud discharge machine; the water quality label is used to adjust the operating parameters of the sedimentation tank, specifically: when the water quality label shows that the turbidity of the water body increases, the dosage of the flocculant is automatically increased and the water inlet flow rate is reduced; when the water quality label shows that the clarity of the water body increases, the dosage of the flocculant is reduced and the water inlet flow rate is increased; After the sedimentation area image is inferred according to the index to generate a water quality label and a mud thickness label, the method further includes: After judging that the water quality in the sedimentation tank meets the requirements according to the water quality label and the sludge thickness label, the whole-process recorded water quality information and sludge thickness information are integrated and a report is generated, wherein the report includes a time line graph, sedimentation efficiency, and sedimentation amount; The acquisition frequency of the image acquisition device is adjusted according to the report, wherein the acquisition frequency of the image acquisition device is obtained by analyzing the water quality change trend, sedimentation efficiency fluctuation, and mud thickness growth rate in the report.

2. The method for detecting water quality in a sedimentation area according to claim 1, characterized in that: The preprocessing includes: performing filtering operation, image enhancement operation, and size unification operation on the sedimentation area image.

3. The method for detecting water quality in a sedimentation area according to claim 1, characterized in that: Also includes: Generate image samples through mirroring, rotation, and scaling operations to expand the training set; And identify the labeled data and delete abnormal data or incorrectly labeled image samples.

4. A device for detecting water quality in a sedimentation area, characterized in that: include: A preprocessing unit, used for receiving the sedimentation area image sent by the image acquisition device at preset time intervals, and preprocessing the sedimentation area image; A feature vector generating unit is used to call a pre-trained CNN model to extract the pre-processed sedimentation area image to generate a feature vector, wherein the training process of the CNN model is: grading the water quality from clear to turbid, grading the sludge according to different thicknesses, and grading the lighting conditions; collecting multiple groups of standard images at different water quality levels, different sludge thickness levels, and different lighting conditions, wherein the multiple groups of standard images cover different states and scenes of the sedimentation tank; pre-processing and data annotation of the multiple groups of standard images to generate a standard image data set, which is divided into a training set and a test set according to a preset ratio, wherein the annotation includes water quality characteristics and sludge thickness; using a convolutional neural network to establish a water quality recognition model and a sludge thickness measurement model, learning and training through the training set, and optimizing the structure and parameters of the water quality recognition model and the sludge thickness measurement model through cross-validation and parameter adjustment; using the test set to test the water quality recognition model and the sludge thickness measurement model, and adjusting and optimizing the structure and parameters of the water quality recognition model and the sludge thickness measurement model according to the test results; An index generating unit, used for calculating the distance between the feature vector and the feature vector of each standard image, determining the standard image with the minimum distance and generating a corresponding index; A label generation unit, used for inferring the sedimentation area image according to the index to generate a water quality label and a mud thickness label; Among them, the mud thickness label is used to adjust the working frequency of the mud discharge machine; the water quality label is used to adjust the operating parameters of the sedimentation tank, specifically: when the water quality label shows that the turbidity of the water body increases, the dosage of the flocculant is automatically increased and the water inlet flow rate is reduced; when the water quality label shows that the clarity of the water body increases, the dosage of the flocculant is reduced and the water inlet flow rate is increased; After the sedimentation area image is inferred according to the index to generate a water quality label and a mud thickness label, the method further includes: After judging that the water quality in the sedimentation tank meets the requirements according to the water quality label and the sludge thickness label, the water quality information and sludge thickness information recorded throughout the process are integrated and a report is generated, wherein the report includes a time line graph, sedimentation efficiency, and sedimentation amount; the acquisition frequency of the image acquisition device is adjusted according to the report, wherein the acquisition frequency of the image acquisition device is obtained by analyzing the water quality change trend, sedimentation efficiency fluctuation, and sludge thickness growth rate in the report.

5. A device for detecting water quality in a sedimentation area, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement a method for detecting water quality in a sedimentation area as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that: A computer program is stored, and the computer program can be executed by a processor of the device where the computer-readable storage medium is located to implement a method for detecting water quality in a sedimentation area as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Device and method for intelligently sensing operation state of sedimentation tank of sewage treatment plant based on computer vision technology

    CN116320281A

  • Sewage water quality identification and application method based on deep learning

    CN118196513A