Intelligent operation and maintenance method and device of water quality monitoring system

By extracting target images from monitoring videos, identifying the liquid level and operating status in the water quality monitoring system, and generating operation and maintenance logs, the problem of low maintenance efficiency of existing systems is solved, online maintenance and fault positioning is achieved, and the stability of the system is improved and maintenance efficiency.

CN119516471APending Publication Date: 2025-02-25CHINA NAT ENVIRONMENTAL MONITORING CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411578723.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The maintenance and troubleshooting of existing surface water quality online monitoring systems require manual on-site inspection and operation, resulting in low maintenance efficiency and long failure duration, affecting the stable operation of the system.

Method used

By extracting target images from the monitoring video, identifying the liquid level of the container and the operating status of the machine parts, and generating operation and maintenance logs, the online maintenance and fault positioning of the water quality monitoring system is realized.

Benefits of technology

It improves the maintenance efficiency of the water quality monitoring system, shortens the fault location and resolution time, and ensures the stable and healthy operation of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119516471A_ABST
    Figure CN119516471A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent operation and maintenance method and device for a water quality monitoring system. The method comprises the following steps: obtaining a target image from a monitoring video; extracting an image block corresponding to the detection target from the target image; for a detection target of which the type is a container, identifying a pixel coordinate of an edge identifier of the container and a pixel coordinate of a liquid level of a water sample carried by the container from the image block; determining the liquid level of the container based on the pixel coordinates of the edge identifier and the pixel coordinates of the liquid level; for the detection target of which the type is the machine part, determining the operation state of the machine part based on the similarity between the image block and the sample image; and generating an operation and maintenance log of the water quality monitoring system based on the liquid level of the container and the operation state of the machine part. According to the method, an image block corresponding to a detection target is determined from a target image provided by a monitoring video, and the operation state of a component related to water sample detection in the water quality detection system is identified, so that online maintenance of the water quality detection system is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of water quality monitoring, and in particular to an intelligent operation and maintenance method and device for a water quality monitoring system. Background Art

[0002] The surface water quality monitoring system is mainly composed of water sampling unit, pretreatment unit, water distribution unit, control unit, analysis unit, data acquisition and transmission unit, auxiliary unit, etc. Among them, the pretreatment unit, water distribution unit, control unit, data acquisition and transmission unit, auxiliary unit, etc. constitute an integrated system, and the analysis unit is composed of analyzer instruments. The analysis instruments of the conventional nine-parameter surface water quality monitoring system include total phosphorus analyzer, total nitrogen analyzer, ammonia nitrogen analyzer, permanganate index analyzer and five-parameter (PH, dissolved oxygen, conductivity, turbidity, water temperature) analyzer. The water quality analyzer instrument needs to extract surface water samples for analysis, and the surface water samples need to be extracted, transported and stored by the integrated system through pumps, valves, pipelines, water sample cups and other devices. The instrument analyzer requires pure water, reagents, etc., and the waste liquid will be discharged into the waste liquid barrel after the analysis is completed. During the whole process, it is inevitable that the pumps, valves and other components of the system will fail, block, leak, etc. At this time, maintenance personnel need to quickly locate the fault point to solve the problem and restore the normal operation of the system.

[0003] At present, the maintenance and inspection of the online surface water quality monitoring system requires on-site inspection and operation by maintenance personnel. The operating status of the equipment on the system cannot be monitored in real time or left with traces. Some abnormal faults often require manual investigation and backtracking. These problems greatly increase the workload of manual maintenance and increase the duration of on-site equipment failures, which is not conducive to the stable and healthy operation of the online monitoring system. Summary of the invention

[0004] The present application provides an intelligent operation and maintenance method and device for a water quality monitoring system, the purpose of which is to realize online maintenance of the water quality monitoring system to improve the maintenance efficiency of the water quality monitoring system.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] An intelligent operation and maintenance method for a water quality monitoring system, comprising:

[0007] Obtaining a target image from a monitoring video; the monitoring video includes a video of a water quality monitoring system performing water sample detection; the target image is an image frame containing a detection target; the types of the detection targets include a container with a preset edge mark and used to carry a water sample, and a machine component used to transport the water sample;

[0008] Extracting an image block corresponding to the detection target from the target image;

[0009] For a detection target of the container type, pixel coordinates of an edge mark of the container and pixel coordinates of a liquid surface of the water sample carried by the container are identified from the image block;

[0010] Determining the liquid level of the container based on the pixel coordinates of the edge marker and the pixel coordinates of the liquid surface;

[0011] For a detection target of the type of the machine component, determining the operating state of the machine component based on the similarity between the image block and the sample image;

[0012] Based on the liquid level of the container and the operating status of the machine components, an operation and maintenance log of the water quality monitoring system is generated.

[0013] Optionally, extracting an image block corresponding to the detection target from the target image includes:

[0014] Obtaining camera distortion parameters of a target camera and determining a corresponding transformation matrix; the target camera is a camera that shoots the surveillance video;

[0015] Using the transformation matrix, transforming the target image to obtain a valid image; the distortion of the valid image is less than the distortion of the target image;

[0016] An image block corresponding to the detection target is extracted from the effective image.

[0017] Optionally, the process of extracting an image block corresponding to the detection target from the valid image includes one of the following:

[0018] Performing target detection on the valid image to obtain an image block corresponding to the detected target;

[0019] According to the preset positioning of the detection target, the effective image is cropped to obtain a corresponding image block.

[0020] Optionally, the edge identifier includes an upper edge identifier and a lower edge identifier. For a detection target of the container type, pixel coordinates of the edge identifier of the container and pixel coordinates of the liquid surface of the water sample carried by the container are identified from the image block, including:

[0021] For a detection target of the container type, determining a grayscale value of each pixel in the image block;

[0022] Performing differential calculation on the grayscale values ​​of a plurality of pixel points belonging to the same column in the image block to obtain a differential value of each of the pixel points;

[0023] Based on the pixel point whose differential value is greater than the preset calibration value, it is determined as the target pixel point;

[0024] According to the specified expansion direction, the image of the determined multiple target pixels is expanded to obtain multiple connected domains;

[0025] Sorting the plurality of connected domains according to the order of pixel values ​​from large to small to obtain a target sequence;

[0026] Determine the pixel coordinates of the upper edge mark of the container based on the connected domain with the largest Y-axis coordinate value among the first three connected domains of the target sequence;

[0027] Determine the pixel coordinates of the lower edge mark of the container based on the connected domain with the smallest Y-axis coordinate value among the first three connected domains of the target sequence;

[0028] Based on the connected domains whose Y-axis coordinate values ​​are not the largest and the smallest in the first three connected domains of the target sequence, the pixel coordinates of the liquid surface of the water sample carried by the container are determined.

[0029] Optionally, determining the liquid level of the container based on the pixel coordinates of the edge marker and the pixel coordinates of the liquid surface includes:

[0030] Obtaining the number of pixels in each of the first area and the second area; the first area includes an area in the image block starting from the pixel coordinates of the liquid surface and ending at the pixel coordinates of the lower edge mark; the second area includes an area in the image block starting from the pixel coordinates of the upper edge mark and ending at the pixel coordinates of the lower edge mark;

[0031] The liquid level of the container is determined based on a ratio between the number of pixels in the first area and the number of pixels in the second area.

[0032] Optionally, for a detection target of the type of the machine component, determining the operating state of the machine component based on the similarity between the image block and the sample image includes:

[0033] For a detection target of the type of the machine component, obtaining a sample image of the machine component;

[0034] Performing feature extraction on the image block to obtain a first feature;

[0035] Performing feature extraction on the sample image to obtain a second feature;

[0036] Determining the similarity between the image block and a sample image based on the cosine similarity between the first feature and the second feature;

[0037] Based on the similarity between the image block and the sample image, the operating status of the machine component is determined.

[0038] Optionally, determining the operating state of the machine component based on the similarity between the image block and the sample image includes:

[0039] If the similarity between the image block and the sample image meets a preset threshold, determining that the operating state of the machine component is normal;

[0040] If the similarity between the image block and the sample image does not meet the preset threshold, it is determined that the operating state of the machine component is abnormal.

[0041] An intelligent operation and maintenance device for a water quality monitoring system, comprising:

[0042] An image acquisition unit, used to acquire a target image from a monitoring video; the monitoring video includes a video of a water quality monitoring system performing water sample detection; the target image is an image frame containing a detection target; the types of the detection target include a container with a preset edge mark and used to carry a water sample, and a machine component used to transport the water sample;

[0043] An image extraction unit, used for extracting an image block corresponding to the detection target from the target image;

[0044] An image recognition unit, for identifying, for a detection target of the container type, pixel coordinates of an edge mark of the container and pixel coordinates of a liquid surface of the water sample carried by the container from the image block;

[0045] a liquid level recognition unit, configured to determine the liquid level of the container based on the pixel coordinates of the edge marker and the pixel coordinates of the liquid surface;

[0046] a state recognition unit, configured to determine, for a detection target of the type of the machine component, an operating state of the machine component based on a similarity between the image block and a sample image;

[0047] The log generation unit is used to generate an operation and maintenance log of the water quality monitoring system based on the liquid level of the container and the operating status of the machine components.

[0048] Optionally, the image extraction unit is specifically used for:

[0049] Obtaining camera distortion parameters of a target camera and determining a corresponding transformation matrix; the target camera is a camera that shoots the surveillance video;

[0050] Using the transformation matrix, transforming the target image to obtain a valid image; the distortion of the valid image is less than the distortion of the target image;

[0051] An image block corresponding to the detection target is extracted from the effective image.

[0052] Optionally, the process by which the image extraction unit extracts the image block corresponding to the detection target from the valid image includes one of the following:

[0053] Performing target detection on the valid image to obtain an image block corresponding to the detected target;

[0054] According to the preset positioning of the detection target, the effective image is cropped to obtain a corresponding image block.

[0055] Optionally, the edge identifier includes an upper edge identifier and a lower edge identifier, and the image recognition unit is specifically used for:

[0056] For a detection target of the container type, determining a grayscale value of each pixel in the image block;

[0057] Performing differential calculation on the grayscale values ​​of a plurality of pixel points belonging to the same column in the image block to obtain a differential value of each of the pixel points;

[0058] Based on the pixel point whose differential value is greater than the preset calibration value, it is determined as the target pixel point;

[0059] According to the specified expansion direction, the image of the determined multiple target pixels is expanded to obtain multiple connected domains;

[0060] Sorting the plurality of connected domains according to the order of pixel values ​​from large to small to obtain a target sequence;

[0061] Determine the connected domain with the largest Y-axis coordinate value among the first three connected domains of the target sequence as the upper edge mark of the container;

[0062] Determine the connected domain with the smallest Y-axis coordinate value among the first three connected domains of the target sequence as the lower edge mark of the container;

[0063] Based on the connected domains whose Y-axis coordinate values ​​in the first three connected domains of the target sequence are not the largest and the smallest, the liquid level of the water sample carried by the container is determined.

[0064] Optionally, the liquid level identification unit is specifically used for:

[0065] Obtaining the number of pixels in each of the first area and the second area; the first area includes an area in the image block starting from the pixel coordinates of the liquid surface and ending at the pixel coordinates of the lower edge mark; the second area includes an area in the image block starting from the pixel coordinates of the upper edge mark and ending at the pixel coordinates of the lower edge mark;

[0066] The liquid level of the container is determined based on a ratio between the number of pixels in the first area and the number of pixels in the second area.

[0067] Optionally, the state identification unit is specifically used for:

[0068] For a detection target of the type of the machine component, obtaining a sample image of the machine component;

[0069] Performing feature extraction on the image block to obtain a first feature;

[0070] Performing feature extraction on the sample image to obtain a second feature;

[0071] Determining the similarity between the image block and a sample image based on the cosine similarity between the first feature and the second feature;

[0072] Based on the similarity between the image block and the sample image, the operating status of the machine component is determined.

[0073] Optionally, the state identification unit is specifically used for:

[0074] If the similarity between the image block and the sample image meets a preset threshold, determining that the operating state of the machine component is normal;

[0075] If the similarity between the image block and the sample image does not meet the preset threshold, it is determined that the operating state of the machine component is abnormal.

[0076] A storage medium includes a stored program, wherein the program executes the intelligent operation and maintenance method of the water quality monitoring system when the program is run by a processor.

[0077] An electronic device, comprising: a processor, a memory and a bus; the processor and the memory are connected via the bus;

[0078] The memory is used to store programs, and the processor is used to run programs, wherein the program executes the intelligent operation and maintenance method of the water quality monitoring system when the processor runs it.

[0079] The technical solution provided by the present application obtains a target image from a surveillance video. An image block corresponding to the detection target is extracted from the target image. For a detection target of the container type, the pixel coordinates of the edge mark of the container and the pixel coordinates of the liquid surface of the water sample carried by the container are identified from the image block. The liquid level of the container is determined based on the pixel coordinates of the edge mark and the pixel coordinates of the liquid surface. For a detection target of the machine component type, the operating status of the machine component is determined based on the similarity between the image block and the sample image. Based on the liquid level of the container and the operating status of the machine component, an operation and maintenance log of the water quality monitoring system is generated. For detection targets of container type, the present application identifies the liquid level of the container based on the edge identification determined in the corresponding image block and the pixel coordinates of the liquid surface (the liquid level can reflect the operating status of components related to the container in the water quality monitoring system); for detection targets of machine parts, the operating status of the machine parts is determined based on the similarity between the corresponding image block and the sample image, so that all components related to water sample detection in the water quality detection system are effectively monitored, thereby realizing online maintenance of the water quality monitoring system, and using operation and maintenance logs to assist staff in quickly locating faulty components to improve the maintenance efficiency of the water quality monitoring system. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0081] Figure 1 A schematic diagram of a flow chart of an intelligent operation and maintenance method for a water quality monitoring system provided in an embodiment of the present application;

[0082] Figure 2 A flow chart of another intelligent operation and maintenance method of a water quality monitoring system provided in an embodiment of the present application;

[0083] Figure 3 A flow chart of another intelligent operation and maintenance method of a water quality monitoring system provided in an embodiment of the present application;

[0084] Figure 4 A flow chart of another intelligent operation and maintenance method of a water quality monitoring system provided in an embodiment of the present application;

[0085] Figure 5 A flow chart of another intelligent operation and maintenance method of a water quality monitoring system provided in an embodiment of the present application;

[0086] Figure 6A schematic diagram of the architecture of an intelligent operation and maintenance device for a water quality monitoring system provided in an embodiment of the present application;

[0087] Figure 7 A front schematic diagram of a water quality monitoring system provided in an embodiment of the present application;

[0088] Figure 8 A side schematic diagram of a water quality monitoring system provided in an embodiment of the present application;

[0089] Fig. 9 A schematic diagram of the back side of a water quality monitoring system provided in an embodiment of the present application;

[0090] Fig.10 A front schematic diagram of a water quality analyzer provided in an embodiment of the present application;

[0091] Fig.11 A schematic diagram of a container provided in an embodiment of the present application;

[0092] Fig.12 A schematic diagram of an edge marker provided in an embodiment of the present application;

[0093] Fig.13 A schematic diagram of a liquid surface provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0095] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0096] like Figure 1As shown, it is a flow chart of an intelligent operation and maintenance method of a water quality monitoring system provided in an embodiment of the present application, including the following steps.

[0097] S101: Obtain a target image from a surveillance video.

[0098] Among them, the monitoring video includes the video of the water quality monitoring system performing water sample detection, the target image is an image frame containing the detection target, and the types of detection targets include containers with preset edge markings and used to hold water samples, and machine parts used to transport water samples.

[0099] It should be noted that the surveillance video comes from a preset hardware system, which includes a computer, a hard disk recorder, a camera and an identification target. The computer mainly communicates with the hard disk recorder to obtain the identification surveillance video from the hard disk recorder. The hard disk recorder links the camera and the computer and is responsible for the video access of each camera. The camera is responsible for collecting and identifying the working video of the water quality monitoring system.

[0100] In some examples, the detection targets include but are not limited to: water sample cups, pure water buckets, waste liquid buckets, pumps, valves, analysis modules of water quality analysis instruments, pipelines and valves of integrated systems, etc. Among them, water sample cups, pure water buckets, and waste liquid buckets are containers, and pumps, valves, analysis modules, and pipelines and valves of integrated systems of water quality analysis instruments are machine parts.

[0101] In some examples, the hardware system can be installed in combination with a water quality monitoring system. Figure 7 , Figure 8 as well as Fig. 9 As shown, specifically, Figure 7 Can be seen as a front view of the water quality monitoring system, Figure 8 Can be seen as a side view of the water quality monitoring system. Fig. 9 It can be seen as the back view of the water quality monitoring system. In addition, the structure of the water quality analyzer shown in the water quality monitoring system can also be seen Fig.10 shown.

[0102] In a possible implementation, a target image can be obtained from a surveillance video according to a preset time period (the preset time period is the period for the water quality monitoring system to perform water sample testing). The target image obtained in each time period is used as an intelligent operation and maintenance reference for the water quality monitoring system to perform each water sample testing, so as to realize online real-time operation and maintenance of the water quality monitoring system.

[0103] It should be noted that the container shown in the embodiment of the present application is transparent or translucent. In a possible implementation manner, a black identification tape may be attached to the container to serve as an edge identification of the container.

[0104] In some examples, the target image may be one or more, depending on the shooting angle of the camera of the hardware system. If the shooting angle can cover all detection targets, the target image may be one; if the shooting angle cannot cover all detection targets, the target image may be multiple.

[0105] S102: Extracting an image block corresponding to the detection target from the target image.

[0106] Among them, due to the limitation of shooting angle, the monitoring video or target image has camera distortion. In order to improve the accuracy of the image block, the target image can be rectified for distortion.

[0107] Optionally, the implementation process of extracting the image block corresponding to the detection target from the target image can be found in Figure 2 Steps shown and explanations of the steps.

[0108] S103: For a detection target of a container type, pixel coordinates of an edge mark of the container and pixel coordinates of a liquid surface of a water sample carried by the container are identified from the image block.

[0109] The edge mark includes an upper edge mark and a lower edge mark. Since the container is pre-set with an upper edge mark and a lower edge mark, the upper edge mark and the lower edge mark will be displayed in the image block. In addition, when the water quality monitoring system performs water sample detection, the container will carry the water sample. Therefore, the liquid level of the water sample carried by the container will be displayed in the image block.

[0110] Optionally, for a detection target of the container type, the pixel coordinates of the edge mark of the container and the pixel coordinates of the liquid surface of the water sample carried by the container are identified from the image block. Figure 3 Steps shown and explanations of the steps.

[0111] S104: Determine the liquid level of the container based on the pixel coordinates of the edge marker and the pixel coordinates of the liquid surface.

[0112] After obtaining the pixel coordinates of the upper edge mark, the lower edge mark and the liquid surface, the liquid level of the container can be identified through the pixel coordinates of the upper edge mark, the lower edge mark and the liquid surface.

[0113] In some examples, the upper edge mark, the lower edge mark and the display of the liquid surface in the image block can be seen in Fig.11 shown.

[0114] It should be noted that the liquid level of the container can reflect whether the components related to the container in the water quality monitoring system are operating normally. Generally speaking, if the liquid level of the container meets the preset height, it can be determined that the components related to the container in the water quality monitoring system are operating normally. If the liquid level of the container does not meet the preset height, it can be determined that the components related to the container in the water quality monitoring system are operating abnormally.

[0115] Optionally, the process of determining the liquid level of the container based on the pixel coordinates of the edge marker and the pixel coordinates of the liquid surface can be found in Figure 4 Steps shown and explanations of the steps.

[0116] S105: For a detection target of a machine component type, determine the operating state of the machine component based on the similarity between the image block and the sample image.

[0117] The sample image is an image recorded when the machine component is in normal operation. Through the similarity between the image block and the sample image, it can be determined whether the machine component is operating normally.

[0118] Optionally, for a detection target of a machine component type, the implementation process of determining the operating state of the machine component based on the similarity between the image block and the sample image can be found in Figure 5 Steps shown and explanations of the steps.

[0119] S106: Generate an operation and maintenance log of the water quality monitoring system based on the liquid level of the container and the operating status of the machine components.

[0120] Among them, the liquid level of the container and the corresponding image block, as well as the operating status of the machine parts and the corresponding image blocks obtained during each water sample detection can be recorded in the operation and maintenance log, so that the staff can quickly learn about the faulty parts (or causes of failure) of the water quality monitoring system through the operation and maintenance log, thereby improving maintenance efficiency.

[0121] In some examples, for the intelligent operation and maintenance of the components related to the water sample cup in the water quality monitoring system, when the integrated system in the water quality monitoring system starts the water sample pump to collect water, the water sample enters the grit chamber for sedimentation until the sedimentation time reaches the preset time, and the water sample is transferred from the grit chamber to the water sample cup by the sample supply pump. After the water sample is transferred, the hardware system has recorded the monitoring video of the water sample detection process, and the target image of the water sample cup as the detection target is obtained from the monitoring video, and the image block corresponding to the water sample cup is extracted from the target image. The liquid level of the water sample cup is identified based on the image block. If the liquid level of the water sample cup meets the preset height, it can be determined that the components related to the water sample cup (i.e., the water sample pump, the sample supply pump, and the grit chamber) are operating normally. If the liquid level of the water sample cup does not meet the preset height, it can be determined that the components related to the water sample cup (i.e., one or more of the water sample pump, the sample supply pump, and the grit chamber) are operating abnormally. In addition, when it is determined that the liquid level of the water sample cup does not meet the preset height, the preset alarm module can be used to promptly notify the staff to check and verify.

[0122] In some examples, for the intelligent operation and maintenance of components related to the pure water bucket in the water quality monitoring system, an operation and maintenance time point can be set in advance. When the current time reaches the operation and maintenance time point, a target image with the pure water bucket as the detection target is obtained from the monitoring video collected at the current time, and the image block corresponding to the pure water bucket is extracted from the target image. The liquid level of the pure water bucket is identified based on the image block. If the liquid level of the pure water bucket meets the preset height, it can be determined that the components related to the pure water bucket are operating normally. If the liquid level of the pure water bucket does not meet the preset height, it can be determined that the components related to the pure water bucket are operating abnormally, and the staff is prompted with "insufficient pure water" through the preset warning module, and the liquid level of the pure water bucket and the corresponding image block are recorded in the operation and maintenance log for the staff to view in real time.

[0123] In some examples, for the intelligent operation and maintenance of the metering pump of a water quality analyzer in a water quality monitoring system, when a leakage fault occurs in the metering pump, the liquid in the metering pump will leak into the waste liquid collection tray at the bottom of the water quality analyzer. The waste liquid collection tray may be provided with an alarm device. When the alarm device sounds an alarm, a target image of the metering pump as a detection target is obtained from the monitoring video, and an image block corresponding to the metering pump is extracted from the target image. The similarity between the image block and the sample image of the metering pump is calculated. If the similarity does not meet the preset threshold, the operating status of the metering pump is determined to be abnormal, and the image block corresponding to the metering pump and the determined operating status can be fed back to the staff through the alarm module so that the staff can promptly bring the corresponding maintenance parts to the site for maintenance.

[0124] It is understandable that, compared with the traditional liquid level recognition method, the edge detection liquid level algorithm is used to calculate the liquid level of the container, so that the intelligent operation and maintenance of the components related to water sample detection can be realized through the liquid level, and the liquid level of the pure water bucket can be monitored in real time. Under the condition of fixed monitoring frequency, the remaining use time of pure water can be calculated in advance, so that the staff can make a water replenishment plan in advance. The monitoring of waste liquid barrels is the same. In addition, the similarity between the image blocks corresponding to the machine parts and the sample images is used to identify the operating status of the machine parts, which can help the staff improve the maintenance efficiency, and the original picture (i.e., image block) at the time of judgment can be retained. Even if the judgment is wrong, the staff can confirm whether the fault is true by looking back at the original picture.

[0125] In the process shown in S101-S106 above, for a detection target of container type, the liquid level of the container is identified based on the edge identification determined in the corresponding image block and the pixel coordinates of the liquid surface (the liquid level can reflect the operating status of the components related to the container in the water quality monitoring system); for a detection target of machine component type, the operating status of the machine component is determined based on the similarity between the corresponding image block and the sample image, so that all components related to water sample detection in the water quality detection system are effectively monitored, thereby realizing online maintenance of the water quality monitoring system, and using operation and maintenance logs to assist staff to quickly locate faulty components, so as to improve the maintenance efficiency of the water quality monitoring system.

[0126] like Figure 2 As shown, it is a flow chart of another intelligent operation and maintenance method of a water quality monitoring system provided in an embodiment of the present application, including the steps shown below.

[0127] S201: Obtain camera distortion parameters of a target camera and determine a corresponding transformation matrix.

[0128] The target camera is a camera that shoots surveillance video.

[0129] It should be noted that the camera distortion parameters are parameters used to measure the degree of distortion of the camera lens. They are usually obtained through camera calibration and are used for distortion correction in the fields of image processing and computer vision. There are inevitably manufacturing errors and optical physical limitations in the design of camera lenses, which lead to distortion in the transmission and imaging of light in the camera. Distortion is divided into two types: radial distortion and tangential distortion. The former is an arc distortion caused by the different focusing positions of the light after it is offset from the center point of the camera, and the latter is a non-arc distortion that causes image deformation due to the imaging plane not being perpendicular to the optical axis. These distortions have a negative impact on the accuracy and quality of the image, so distortion correction is required in the fields of image processing and computer vision.

[0130] Generally speaking, camera distortion parameters are used to measure the degree of camera lens distortion. The larger the value, the more obvious the distortion. Usually, camera calibration can obtain camera distortion parameters, which can be used to directly perform distortion correction or calculate the transformation matrix for distortion correction.

[0131] In some examples, the camera distortion parameters can be obtained through camera calibration. Camera calibration refers to the process of extracting the two-dimensional coordinates of an object from multiple images taken at different positions when the three-dimensional coordinates of the object are known, and then fitting the camera's internal and external parameters through the least squares method. Specifically, the internal parameters include camera distortion parameters, focal length, principal point position, etc., and the external parameters include the position and posture of the camera in space.

[0132] S202: transform the target image using a transformation matrix to obtain a valid image.

[0133] Among them, the distortion of the effective image is less than the distortion of the target image.

[0134] It can be understood that using the transformation matrix to transform the target image is actually to perform camera distortion correction on the target image, and transform the target image with camera distortion into a valid image without distortion.

[0135] S203: Extracting an image block corresponding to the detection target from the valid image.

[0136] After obtaining a distortion-free valid image, an image block corresponding to the detection target can be extracted from the valid image in a variety of ways.

[0137] Optionally, the implementation process of extracting image blocks corresponding to the detection target from the effective image may include one of the following: performing target detection on the effective image to obtain image blocks corresponding to the detection target; and cropping the effective image according to a preset positioning of the detection target to obtain corresponding image blocks.

[0138] In some examples, a deep learning-based object detection algorithm can be used to perform object detection on a valid image to obtain an image block corresponding to the detected object. Object detection refers to finding an object of interest in an image and determining the category and location of the object.

[0139] In some examples, the image size of the target image can be pre-set (i.e., by setting camera parameters to ensure that the screen size of the monitoring video meets expectations, and the water quality monitoring system is a large-scale equipment and is static when working. For this reason, the screen of the monitoring video can be of a fixed size, and the display position of the detection target in the screen will basically not change). By pre-configuring the corresponding positioning of the detection target in the pixel coordinate system, the effective image can be cropped according to the preset positioning of the detection target to obtain the corresponding image block.

[0140] It should be noted that a valid image may contain multiple detection targets. To this end, an image block corresponding to each detection target may be extracted from the valid image, and the size of the image block corresponding to each detection target may be different.

[0141] In the above process S201-S203, the target image is transformed by the transformation matrix corresponding to the camera distortion parameters to obtain a distortion-free effective image, and an image block corresponding to the detection target is obtained from the effective image, thereby effectively improving the accuracy of the image block.

[0142] like Figure 3 As shown, it is a flow chart of another intelligent operation and maintenance method of a water quality monitoring system provided in an embodiment of the present application, including the steps shown below.

[0143] S301: For a detection target of container type, determine the grayscale value of each pixel in the image block.

[0144] The image block may be subjected to grayscale transformation to obtain a grayscale image, and the grayscale value of each pixel in the grayscale image may be identified.

[0145] S302: performing differential calculation on the grayscale values ​​of a plurality of pixels belonging to the same column in the image block to obtain a differential value of each pixel.

[0146] By performing differential calculation on the grayscale values ​​of all pixels in each column of the image block, the differential values ​​of all pixels in the image block can be obtained. Generally speaking, the differential values ​​of multiple pixels in the same column are the same.

[0147] S303: Determine the pixel whose differential value is greater than the preset calibration value as the target pixel.

[0148] After determining the differential values ​​of all pixels in the image block, the differential value of each pixel is compared with a preset calibration value, and the pixel whose differential value is greater than the preset calibration value is determined as the target pixel.

[0149] S304: Perform image expansion on the determined multiple target pixel points according to the specified expansion direction to obtain multiple connected domains.

[0150] The specified expansion direction may be a horizontal direction. Image expansion is a morphological operation in image processing, which can be used to fill holes in an image, enlarge the size of an object, and approach similar objects. The implementation method of image expansion belongs to conventional technical means and will not be described here.

[0151] It should be noted that a connected domain can be regarded as a pixel set composed of adjacent pixels. By performing image dilation on the target pixels, a row of target pixels with the same attributes (such as pixel values) is generated. All target pixels in this row constitute the corresponding connected domain.

[0152] It can be understood that the Y-axis coordinate value of each connected domain in the pixel coordinate system is different.

[0153] S305: Sort the multiple connected domains according to the order of pixel values ​​from large to small to obtain a target sequence.

[0154] Each connected domain contains multiple target pixels with the same attribute (ie, pixel value), and the pixel value of the target pixel can be regarded as the pixel value of the connected domain.

[0155] S306: Determine the pixel coordinates of the upper edge mark of the container based on the connected domain with the largest Y-axis coordinate value among the first three connected domains of the target sequence.

[0156] The first three connected domains of the target sequence are determined, and the Y-axis coordinate values ​​of the first three connected domains are compared to determine the connected domain with the largest Y-axis coordinate value among the first three connected domains. Based on the pixel coordinates of the determined connected domain in the pixel coordinate system, the pixel coordinates of the upper edge mark of the container are determined.

[0157] S307: Determine the pixel coordinates of the lower edge mark of the container based on the connected domain with the smallest Y-axis coordinate value among the first three connected domains of the target sequence.

[0158] The first three connected domains of the target sequence are determined, and the Y-axis coordinate values ​​of the first three connected domains are compared to determine the connected domain with the smallest Y-axis coordinate value among the first three connected domains. The pixel coordinates of the lower edge mark of the container are determined based on the pixel coordinates of the determined connected domain in the pixel coordinate system.

[0159] In some examples, the upper edge mark and the lower edge mark of the container can be seen in Fig.12 shown.

[0160] S308: Determine the pixel coordinates of the liquid surface of the water sample carried by the container based on the connected domains whose Y-axis coordinate values ​​are not the largest and the smallest in the first three connected domains of the target sequence.

[0161] Among them, the first three connected domains of the target sequence are determined, and the Y-axis coordinate values ​​of the first three connected domains are compared to determine the connected domains whose Y-axis coordinate values ​​are not the largest and the smallest in the first three connected domains. Based on the pixel coordinates of the determined connected domains in the pixel coordinate system, the pixel coordinates of the liquid surface of the water sample carried by the container are determined.

[0162] In some examples, the level of the water sample held by the container can be seen Fig.13 shown.

[0163] The above process S301 - S308 can identify the pixel coordinates of the edge mark of the container and the pixel coordinates of the liquid surface of the water sample carried by the container from the image block.

[0164] like Figure 4 As shown, it is a flow chart of another intelligent operation and maintenance method of a water quality monitoring system provided in an embodiment of the present application, including the steps shown below.

[0165] S401: Obtain the number of pixels in the first area and the number of pixels in the second area.

[0166] Among them, the first area includes the area in the image block starting from the pixel coordinates of the liquid surface and ending at the pixel coordinates of the lower edge mark, and the second area includes the area in the image block starting from the pixel coordinates of the upper edge mark and ending at the pixel coordinates of the lower edge mark.

[0167] It should be noted that the upper edge mark, the lower edge mark and the pixel coordinates of the liquid surface are used to determine the first area and the second area in the image block, and to count the number of pixels in the first area and the second area.

[0168] S402: Determine the liquid level of the container based on the ratio between the number of pixels in the first area and the number of pixels in the second area.

[0169] Wherein, based on the ratio between the number of pixels in the first area and the number of pixels in the second area, a percentage value may be calculated, and the percentage value may be determined as the liquid level of the container.

[0170] The process shown in S401-S402 above can use the upper edge mark, the lower edge mark and the pixel coordinates of the liquid surface to determine the first area and the second area in the image block, and determine the liquid level of the container based on the number of pixels in the first area and the number of pixels in the second area.

[0171] like Figure 5 As shown, it is a flow chart of another intelligent operation and maintenance method of a water quality monitoring system provided in an embodiment of the present application, including the steps shown below.

[0172] S501: For a detection target of a machine component type, a sample image of the machine component is obtained.

[0173] The sample images of the machine parts are images of the machine parts when they are operating normally, and can be pre-stored in the database.

[0174] S502: Extract features from the image block to obtain a first feature.

[0175] Among them, a feature descriptor algorithm based on oriented gradient histogram can be used to extract features from the image block to obtain the first feature.

[0176] S503: Extract features from the sample image to obtain a second feature.

[0177] Among them, a feature descriptor algorithm based on oriented gradient histogram can be used to extract features from the sample image to obtain the second feature.

[0178] S504: Determine the similarity between the image block and the sample image based on the cosine similarity between the first feature and the second feature.

[0179] The calculation principle of cosine similarity is a conventional technical method and will not be described in detail here. After the cosine similarity between the first feature and the second feature is calculated, the similarity between the image block and the sample image can be determined based on the cosine similarity.

[0180] In some examples, if there are multiple sample images, the cosine similarities between the first feature and the second features of the multiple sample images can be calculated respectively, and the similarity between the image block and the sample image can be determined based on the average of the multiple cosine similarities.

[0181] S505: Determine the operating status of the machine component based on the similarity between the image block and the sample image.

[0182] After determining the similarity between the image block and the sample image, the operating state of the machine component can be identified using the similarity.

[0183] Optionally, if the similarity between the image block and the sample image meets a preset threshold, the operating state of the machine component is determined to be normal; if the similarity between the image block and the sample image does not meet the preset threshold, the operating state of the machine component is determined to be abnormal.

[0184] In the above process shown in S501-S505, the cosine similarity between the first feature and the second feature can be used to determine the similarity between the image block and the sample image, and the operating status of the machine component can be identified according to the similarity.

[0185] like Figure 6 As shown, it is a schematic diagram of the architecture of an intelligent operation and maintenance device of a water quality monitoring system provided in an embodiment of the present application, including the units shown below.

[0186] The image acquisition unit 100 is used to obtain a target image from a monitoring video; the monitoring video includes a video of a water quality monitoring system performing water sample detection; the target image is an image frame containing a detection target; the types of detection targets include containers with preset edge markings and used to hold water samples, and machine parts used to transport water samples.

[0187] The image extraction unit 200 is used to extract an image block corresponding to the detection target from the target image.

[0188] Optionally, the image extraction unit 200 is specifically used to: obtain camera distortion parameters of the target camera and determine the corresponding transformation matrix; the target camera is a camera for shooting surveillance video; using the transformation matrix, the target image is transformed to obtain a valid image; the distortion of the valid image is less than the distortion of the target image; and extract an image block corresponding to the detection target from the valid image.

[0189] Optionally, the process of the image extraction unit 200 for extracting image blocks corresponding to the detection target from the effective image includes one of the following: performing target detection on the effective image to obtain image blocks corresponding to the detection target; and cropping the effective image according to the preset positioning of the detection target to obtain corresponding image blocks.

[0190] The image recognition unit 300 is used to recognize the pixel coordinates of the edge mark of the container and the pixel coordinates of the liquid surface of the water sample carried by the container from the image block for the detection target of the container type.

[0191] Optionally, the edge identifier includes an upper edge identifier and a lower edge identifier, and the image recognition unit 300 is specifically used to: for a detection target of the container type, determine the grayscale value of each pixel in the image block; perform differential calculation on the grayscale values ​​of multiple pixels in the same column of the image block to obtain the differential value of each pixel; determine the pixel whose differential value is greater than a preset calibration value as the target pixel; perform image expansion on the determined multiple target pixels in a specified expansion direction to obtain multiple connected domains; sort the multiple connected domains according to the order of pixel values ​​from large to small to obtain a target sequence; determine the connected domain with the largest Y-axis coordinate value among the first three connected domains of the target sequence as the upper edge identifier of the container; determine the connected domain with the smallest Y-axis coordinate value among the first three connected domains of the target sequence as the lower edge identifier of the container; determine the connected domain whose Y-axis coordinate value among the first three connected domains of the target sequence is not the largest or the smallest as the liquid surface of the water sample carried by the container.

[0192] The liquid level recognition unit 400 is used to determine the liquid level of the container based on the pixel coordinates of the edge marker and the pixel coordinates of the liquid surface.

[0193] Optionally, the liquid level recognition unit 400 is specifically used to: obtain the number of pixels in the first area and the second area respectively; the first area includes the area in the image block starting from the pixel coordinates of the liquid surface and ending at the pixel coordinates of the lower edge mark; the second area includes the area in the image block starting from the pixel coordinates of the upper edge mark and ending at the pixel coordinates of the lower edge mark; determine the liquid level of the container based on the ratio between the number of pixels in the first area and the number of pixels in the second area.

[0194] The state recognition unit 500 is used to determine the operating state of the machine component based on the similarity between the image block and the sample image for the detection target of the machine component type.

[0195] Optionally, the state recognition unit 500 is specifically used to: for a detection target of a machine part type, obtain a sample image of the machine part; perform feature extraction on the image block to obtain a first feature; perform feature extraction on the sample image to obtain a second feature; determine the similarity between the image block and the sample image based on the cosine similarity between the first feature and the second feature; determine the operating state of the machine part based on the similarity between the image block and the sample image.

[0196] Optionally, the state recognition unit 500 is specifically used to: if the similarity between the image block and the sample image meets a preset threshold, determine that the operating state of the machine component is normal; if the similarity between the image block and the sample image does not meet the preset threshold, determine that the operating state of the machine component is abnormal.

[0197] The log generation unit 600 is used to generate an operation and maintenance log of the water quality monitoring system based on the liquid level of the container and the operating status of the machine components.

[0198] For each unit shown above, for a detection target of container type, the liquid level of the container is identified based on the edge identification determined in the corresponding image block and the pixel coordinates of the liquid surface; for a detection target of machine component type, the operating status of the machine component is determined based on the similarity between the corresponding image block and the sample image, so that all components related to water sample detection in the water quality detection system are effectively monitored, thereby realizing online maintenance of the water quality monitoring system, and using operation and maintenance logs to assist staff in quickly locating faulty components to improve the maintenance efficiency of the water quality monitoring system.

[0199] The present application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the intelligent operation and maintenance method of the water quality monitoring system provided by the present application.

[0200] The present application also provides an electronic device, including: a processor, a memory and a bus. The processor and the memory are connected via a bus, the memory is used to store programs, and the processor is used to run programs, wherein when the program is run, the intelligent operation and maintenance method of the water quality monitoring system provided by the present application is executed.

[0201] In addition, the functions described above in the embodiments of the present application may be at least partially performed by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0202] Although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present application. Certain features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination.

[0203] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. An intelligent operation and maintenance method for a water quality monitoring system, characterized in that: include: Obtaining a target image from a monitoring video; the monitoring video includes a video of a water quality monitoring system performing water sample detection; the target image is an image frame containing a detection target; the types of the detection targets include a container with a preset edge mark and used to carry a water sample, and a machine component used to transport the water sample; Extracting an image block corresponding to the detection target from the target image; For a detection target of the container type, pixel coordinates of an edge mark of the container and pixel coordinates of a liquid surface of the water sample carried by the container are identified from the image block; Determining the liquid level of the container based on the pixel coordinates of the edge marker and the pixel coordinates of the liquid surface; For a detection target of the type of the machine component, determining the operating state of the machine component based on the similarity between the image block and the sample image; Based on the liquid level of the container and the operating status of the machine components, an operation and maintenance log of the water quality monitoring system is generated.

2. The method according to claim 1, characterized in that Extracting an image block corresponding to the detection target from the target image includes: Obtaining camera distortion parameters of a target camera and determining a corresponding transformation matrix; the target camera is a camera that shoots the surveillance video; Using the transformation matrix, transforming the target image to obtain a valid image; the distortion of the valid image is less than the distortion of the target image; An image block corresponding to the detection target is extracted from the effective image.

3. The method according to claim 2, characterized in that The process of extracting the image block corresponding to the detection target from the valid image includes the following steps: Performing target detection on the valid image to obtain an image block corresponding to the detected target; According to the preset positioning of the detection target, the effective image is cropped to obtain a corresponding image block.

4. The method according to claim 1, characterized in that: The edge mark includes an upper edge mark and a lower edge mark. For a detection target of the container type, the pixel coordinates of the edge mark of the container and the pixel coordinates of the liquid surface of the water sample carried by the container are identified from the image block, including: For a detection target of the container type, determining a grayscale value of each pixel in the image block; Performing differential calculation on the grayscale values ​​of a plurality of pixel points belonging to the same column in the image block to obtain a differential value of each of the pixel points; Based on the pixel point whose differential value is greater than the preset calibration value, it is determined as the target pixel point; According to the specified expansion direction, the image of the determined multiple target pixels is expanded to obtain multiple connected domains; Sorting the plurality of connected domains according to the order of pixel values ​​from large to small to obtain a target sequence; Determine the pixel coordinates of the upper edge mark of the container based on the connected domain with the largest Y-axis coordinate value among the first three connected domains of the target sequence; Determine the pixel coordinates of the lower edge mark of the container based on the connected domain with the smallest Y-axis coordinate value among the first three connected domains of the target sequence; Based on the connected domains whose Y-axis coordinate values ​​are not the largest and the smallest in the first three connected domains of the target sequence, the pixel coordinates of the liquid surface of the water sample carried by the container are determined.

5. The method according to claim 4, characterized in that Determining the liquid level of the container based on the pixel coordinates of the edge marker and the pixel coordinates of the liquid surface includes: Obtaining the number of pixels in each of the first area and the second area; the first area includes an area in the image block starting from the pixel coordinates of the liquid surface and ending at the pixel coordinates of the lower edge mark; the second area includes an area in the image block starting from the pixel coordinates of the upper edge mark and ending at the pixel coordinates of the lower edge mark; The liquid level of the container is determined based on a ratio between the number of pixels in the first area and the number of pixels in the second area.

6. The method according to claim 1, characterized in that For a detection target of the type of the machine component, determining the operating state of the machine component based on the similarity between the image block and the sample image includes: For a detection target of the type of the machine component, obtaining a sample image of the machine component; Performing feature extraction on the image block to obtain a first feature; Performing feature extraction on the sample image to obtain a second feature; Determining the similarity between the image block and a sample image based on the cosine similarity between the first feature and the second feature; Based on the similarity between the image block and the sample image, the operating status of the machine component is determined.

7. The method according to claim 6, characterized in that Determining the operating state of the machine component based on the similarity between the image block and the sample image includes: If the similarity between the image block and the sample image meets a preset threshold, determining that the operating state of the machine component is normal; If the similarity between the image block and the sample image does not meet the preset threshold, it is determined that the operating state of the machine component is abnormal.

8. An intelligent operation and maintenance device for a water quality monitoring system, characterized in that: include: An image acquisition unit, used to acquire a target image from a monitoring video; the monitoring video includes a video of a water quality monitoring system performing water sample detection; the target image is an image frame containing a detection target; the types of the detection target include a container with a preset edge mark and used to carry a water sample, and a machine component used to transport the water sample; An image extraction unit, used for extracting an image block corresponding to the detection target from the target image; An image recognition unit, for identifying, for a detection target of the container type, pixel coordinates of an edge mark of the container and pixel coordinates of a liquid surface of the water sample carried by the container from the image block; a liquid level recognition unit, configured to determine the liquid level of the container based on the pixel coordinates of the edge marker and the pixel coordinates of the liquid surface; a state recognition unit, configured to determine, for a detection target of the type of the machine component, an operating state of the machine component based on a similarity between the image block and a sample image; The log generation unit is used to generate an operation and maintenance log of the water quality monitoring system based on the liquid level of the container and the operating status of the machine components.

9. A storage medium, characterized in that: The storage medium includes a stored program, wherein the program, when executed by a processor, executes the intelligent operation and maintenance method of a water quality monitoring system according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: processor, memory, and bus; The processor is connected to the memory via the bus; The memory is used to store programs, and the processor is used to run programs, wherein the program, when run by the processor, executes the intelligent operation and maintenance method of the water quality monitoring system according to any one of claims 1 to 7.