Full-spectrum neural network water quality monitoring method based on circulation type self-cleaning
By employing a flow-through self-cleaning full-spectrum neural network water quality monitoring method, combined with liquid presence determination and self-cleaning operation, the problems of poor measurement quality and short motor life in turbid water bodies have been solved, achieving efficient and accurate water quality monitoring and extending motor life.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BO RUI SI SHU ZHI KE JI (SHEN ZHEN) YOU XIAN GONG SI
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-05
AI Technical Summary
Existing full-spectrum water quality monitoring equipment suffers from reduced measurement quality when the water is turbid, shortens the lifespan of the cleaning system's motor, and is costly and complex to maintain.
A full-spectrum neural network-based water quality monitoring method based on flow-through self-cleaning is adopted. By acquiring air standard absorbance spectral line data and spectral similarity threshold, the presence of liquid is determined, and a self-cleaning operation is performed based on the determination result. The concentration of water quality parameters is calculated by combining the method with a pre-trained full-spectrum feedforward neural network.
It enables automatic liquid detection and self-cleaning in complex environments, extends the life of the cleaning motor, improves the accuracy of water quality monitoring and the long-term operational reliability of the equipment, and reduces the difficulty and cost of operation and maintenance.
Smart Images

Figure CN121978035A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of water quality testing technology, specifically relating to a full-spectrum neural network water quality monitoring method based on flow-through self-cleaning. Background Technology
[0002] Online water quality monitoring technology is a core technology in the environmental protection and water affairs fields. Traditional water quality monitoring mainly relies on chemical analysis methods. Although fully automated online analyzers have been adopted, they suffer from problems such as long analysis cycles, high costs, and complex operation. Furthermore, they require the use of chemical reagents, which can easily cause secondary pollution.
[0003] Full-spectrum water quality monitoring technology has rapidly developed and become a hot topic in technological research due to its enormous potential as a rapid, non-destructive method that requires no chemical reagents and can simultaneously detect multiple parameters. Compared with traditional chemical methods, spectroscopic methods can directly monitor the water body in situ or online, greatly simplifying the process, reducing operation and maintenance costs, and making it possible to achieve wide-area, high-frequency water quality monitoring. This technology acquires a "data goldmine" containing a large amount of water quality information by collecting the continuous absorption spectrum of water bodies in the ultraviolet, visible, and near-infrared bands (such as 200-900 nm), far exceeding the information provided by a single or a few wavelength points.
[0004] However, traditional full-spectrum water quality monitoring equipment still uses absorption spectra across a limited number of frequency bands. It calculates the concentration of a limited number of factors by substituting absorbance information at each frequency point through simple linear calibration or nonlinear fitting. This simplistic model leads to significant deviations in the measured results when the water structure changes.
[0005] In addition, traditional full-spectrum water quality monitoring equipment is installed in situ and put directly into the water. When the water sample is turbid, the lack of necessary pretreatment will seriously affect the measurement quality. Moreover, it is usually deployed in the middle of rivers and lakes, and daily operation and maintenance are also very troublesome. On the other hand, if it is made into a shore-extraction type, that is, water is pumped up by a water pump, an additional flow pool is required, which is more expensive and larger in size.
[0006] Currently, flow-through full-spectrum water quality testing devices with cleaning systems have appeared on the market. However, the cleaning cycle is performed at a predetermined fixed frequency. When the water intake is short of water (especially in sewage pipe network situations), the cleaning system still works at a certain frequency, which will greatly shorten the life of the motor. This is particularly noticeable when using brushed motors.
[0007] As mentioned above, how to provide a full-spectrum neural network water quality monitoring method based on flow-through self-cleaning that can automatically detect and self-clean liquids to improve the service life of the cleaning motor has become an urgent problem to be solved in this field. Summary of the Invention
[0008] The purpose of this invention is to provide a full-spectrum neural network water quality monitoring method based on flow-through self-cleaning, in order to solve the above-mentioned problems existing in the prior art.
[0009] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a full-spectrum neural network-based water quality monitoring method based on flow-through self-cleaning, comprising: The system acquires preset air standard absorbance spectral line data and spectral similarity threshold, and obtains a measurement trigger command to emit a broadband beam to the sample to be tested in the flow cell, and performs spectral acquisition of the sample to be tested to obtain the absorbance spectral line data of the sample to be tested. The air standard absorbance spectral line data and the absorbance spectral line data of the sample to be tested are both a set of discrete vector sequences. A preset similarity function is obtained, and the similarity between the absorbance spectral data of the sample to be tested and the absorbance spectral data of the air standard is calculated using the similarity function. The liquid presence is determined by using the spectral similarity threshold to determine the liquid presence. Obtain the preset self-cleaning cycle of the flow cell and the self-cleaning operation log of the flow cell. Based on the self-cleaning cycle of the flow cell, the self-cleaning operation log of the flow cell, and the liquid presence determination result, perform the self-cleaning operation of the flow cell to form a cleaned flow cell. The sample to be tested in the cleaned flow cell is used as the target sample. A broadband beam is emitted to the target sample in the cleaned flow cell to collect the target sample spectrum and obtain the target sample absorbance spectral data. The target sample absorbance spectral data is then input into a pre-trained full-spectrum feedforward neural network inference model to calculate the target water quality parameter concentration value of the target sample, thereby realizing water quality monitoring.
[0010] In one possible design, preset air standard absorbance spectral line data and spectral similarity threshold are acquired, and a measurement trigger command is obtained to emit a broadband beam of light onto the sample to be tested in the flow cell, thereby acquiring the sample's absorbance spectral line data, including: Acquire preset air standard absorbance spectral data The air standard absorbance spectral line data ,and Indicates the first One spectral acquisition point, Indicates the first Air standard absorbance collected at each spectral acquisition point Indicates the total number of spectral acquisition points; Obtain a measurement trigger command, and control the generation of a broadband light beam according to the measurement trigger command, so as to utilize... The spectral acquisition points are used to simultaneously acquire spectra of the sample to be tested in the flow cell, so as to obtain the absorbance spectral data of the sample to be tested. Wherein, the sample to be tested is an air sample or a liquid sample in the flow cell, and the absorbance spectral data of the sample to be tested... ,and Indicates the first The absorbance of the sample to be tested is collected at each spectral acquisition point.
[0011] In one possible design, a preset similarity function is obtained, and the similarity between the absorbance spectral data of the sample to be tested and the absorbance spectral data of the standard air is calculated using the similarity function. Then, a liquid presence determination is performed on the spectral similarity using the spectral similarity threshold to obtain a liquid presence determination result, including: Get the preset similarity function , wherein the similarity function The algorithm can be Euclidean distance, inner product, or cosine similarity. The absorbance spectral data of the sample to be tested and the air standard absorbance spectral line data Input the similarity function To calculate the absorbance spectral data of the sample to be tested. and the air standard absorbance spectral line data Spectral similarity between the two ; Using the spectral similarity threshold For the spectral similarity to be measured Perform a liquid presence determination and obtain the liquid presence determination result; If the spectral similarity to be measured Not lower than the spectral similarity threshold The result of the liquid presence determination is that no liquid exists; If the spectral similarity to be measured Below the spectral similarity threshold The result of the liquid presence determination is that liquid is present.
[0012] In one possible design, a preset flow cell self-cleaning cycle and the flow cell self-cleaning operation log are obtained. Based on the flow cell self-cleaning cycle, the flow cell self-cleaning operation log, and the liquid presence determination result, a flow cell self-cleaning operation is performed to form a cleaned flow cell, including: When the liquid presence determination result is that there is no liquid, the sample spectrum of the test sample is acquired at the next time moment to obtain the absorbance spectral data of the test sample at the next time moment. The similarity between the absorbance spectral data of the test sample and the absorbance spectral data of the air standard is calculated, and the liquid presence determination is performed again by using the spectral similarity threshold, until the liquid presence determination result is that there is liquid. When the liquid presence determination result indicates the presence of liquid, the preset flow cell self-cleaning cycle and the flow cell self-cleaning operation log are obtained, and based on the flow cell self-cleaning cycle and the flow cell self-cleaning operation log, the flow cell self-cleaning operation is performed to form a cleaned flow cell.
[0013] In one possible design, based on the flow cell self-cleaning cycle and the flow cell self-cleaning operation log, a flow cell self-cleaning operation is performed to form a cleaned flow cell, including: Based on the self-cleaning operation log of the flow pool, the most recent cleaning record is extracted, and the time information corresponding to the most recent cleaning record is extracted as the most recent cleaning time. Obtain the current time information, and calculate the difference between the most recent cleaning time and the current time information to obtain the difference between the most recent cleaning time and the current time information, which is used as the uncleaned duration of the flow pool; Based on the self-cleaning cycle of the flow cell and the uncleaned time of the flow cell, it is determined whether the uncleaned time of the flow cell reaches or exceeds the self-cleaning cycle of the flow cell. If not, mark the current flow cell as a cleaned flow cell; If so, a flow cell cleaning control signal is issued to perform a flow cell self-cleaning operation according to the flow cell cleaning control signal. The cleaned flow cell is marked as a cleaned flow cell, and the current time information is recorded to form a current cleaning record. The current cleaning record is entered into the flow cell self-cleaning operation log.
[0014] In one possible design, the sample to be tested in the cleaned flow-through tank is used as the target sample. A broadband light beam is emitted to the target sample in the cleaned flow-through tank to acquire the target sample's spectrum, obtaining the target sample's absorbance spectral data. This target sample absorbance spectral data is then input into a pre-trained full-spectrum feedforward neural network inference model to calculate the target water quality parameter concentration value of the target sample, thereby achieving water quality monitoring, including: The sample to be tested in the cleaned flow cell is used as the target sample. A broadband beam is emitted to the target sample in the cleaned flow cell to perform synchronous spectral acquisition and obtain the target sample absorbance spectral data. A pre-trained full-spectrum feedforward neural network inference model is obtained. The target sample absorbance spectral data is input into the input layer of the full-spectrum feedforward neural network inference model. The full-spectrum feedforward neural network inference model performs feature extraction and nonlinear mapping on the target sample absorbance spectral data to output the target water quality parameter concentration value, thereby completing water quality monitoring.
[0015] Secondly, the present invention provides a full-spectrum neural network water quality monitoring device based on flow-through self-cleaning, comprising: The system comprises a control inference unit, a spectral acquisition unit, and a self-cleaning unit. The instruction input terminal of the control inference unit is used to acquire external instruction inputs. The control signal output terminal of the control inference unit is electrically connected to the spectral acquisition control signal input terminal of the spectral acquisition unit and the flow cell cleaning control signal input terminal of the self-cleaning unit, respectively. The spectral data transmission terminal of the spectral acquisition unit is electrically connected to the spectral data receiving terminal of the control inference unit. The flow cell marker output terminal of the self-cleaning unit is electrically connected to the flow cell marker input terminal of the control inference unit. The control reasoning unit is used to acquire a measurement trigger command to generate a first spectral acquisition control signal, control the spectral acquisition unit to acquire the spectrum of the sample to be tested, receive the absorbance spectral line data of the sample to be tested to determine the presence of liquid, and generate a flow cell cleaning control signal to control the self-cleaning unit to perform the flow cell self-cleaning operation. The spectral acquisition unit is used to receive the first spectral acquisition control signal, to emit a broadband beam, and to acquire the spectrum of the sample to be tested, to obtain the absorbance spectral line data of the sample to be tested, and to send the absorbance spectral line data of the sample to be tested to the control inference unit. The self-cleaning unit is used to receive the flow cell cleaning control signal to perform the flow cell self-cleaning operation. The control inference unit is also used to identify the cleaned flow tank and generate a second spectral acquisition control signal to control the spectral acquisition unit to acquire the spectrum of the target sample and receive the absorbance spectral line data of the target sample so as to calculate the concentration value of the target water quality parameter of the target sample through the full-spectrum feedforward neural network inference model deployed in the control inference unit. The spectral acquisition unit is also used to receive the second spectral acquisition control signal to emit a broadband beam and perform target sample spectral acquisition to obtain target sample absorption spectral line data, and to send the target sample absorption spectral line data to the control inference unit.
[0016] In one possible design, the spectral acquisition unit includes a xenon lamp, a collimating lens, a light guide column, and a spectrometer, and the self-cleaning unit includes a motor, a drive shaft, and brushes. The xenon lamp's input terminal serves as the spectral acquisition control signal input terminal of the spectral acquisition unit, and is electrically connected to the control signal output terminal of the inference unit. The xenon lamp's outlet is positioned directly opposite the light guide column's inlet. The collimating lens is positioned between the xenon lamp's outlet and the light guide column's inlet. The light guide column's outlet is positioned directly opposite the spectrometer's spectral acquisition terminal. The spectrometer's output terminal serves as the spectral data transmission terminal of the spectral acquisition unit, and is electrically connected to the spectral data reception terminal of the inference unit. The controlled end of the motor serves as the input terminal for the flow tank cleaning control signal of the self-cleaning unit, and is electrically connected to the output terminal of the control signal of the induction unit. The output shaft of the motor is coaxially and fixedly connected to the transmission shaft, and the transmission shaft is fixedly connected to the fixed end of the brush.
[0017] Thirdly, the present invention provides an electronic device comprising a memory, a processor, and a transceiver connected in sequence and communication, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the full-spectrum neural network water quality monitoring method based on flow-through self-cleaning as described in the first aspect or any possible design of the first aspect.
[0018] Fourthly, the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, perform the full-spectrum neural network water quality monitoring method based on flow-through self-cleaning as described in the first aspect or any possible design of the first aspect.
[0019] Fifthly, the present invention provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform the flow-through self-cleaning full-spectrum neural network water quality monitoring method as described in the first aspect or any possible design of the first aspect.
[0020] Beneficial Effects: This invention provides a full-spectrum neural network water quality monitoring method based on flow-through self-cleaning, comprising: First, acquiring preset air standard absorbance spectral line data and a spectral similarity threshold, and acquiring a measurement trigger command to emit a broadband beam of light onto the sample to be tested in the flow-through pool for spectral acquisition, thereby obtaining the absorbance spectral line data of the sample to be tested, wherein the air standard absorbance spectral line data and the absorbance spectral line data of the sample to be tested are both a set of discrete vector sequences; Second, acquiring a preset similarity function, using the similarity function to calculate the spectral similarity between the absorbance spectral line data of the sample to be tested and the air standard absorbance spectral line data, and using the spectral similarity threshold to further analyze the spectral similarity. The system first determines the presence of liquid and obtains the liquid presence determination result. Then, it acquires the preset self-cleaning cycle of the flow cell and the self-cleaning operation log of the flow cell. Based on the self-cleaning cycle, the self-cleaning operation log, and the liquid presence determination result, it performs a self-cleaning operation of the flow cell to form a cleaned flow cell. Finally, it uses the sample to be tested in the cleaned flow cell as the target sample, emits a broadband beam to the target sample in the cleaned flow cell, performs target sample spectrum acquisition, obtains the target sample absorbance spectral line data, and inputs the target sample absorbance spectral line data into a pre-trained full-spectrum feedforward neural network inference model to calculate the target water quality parameter concentration value of the target sample, thereby realizing water quality monitoring. By collecting the absorbance spectral data of the sample to be tested and comparing it with the absorbance spectral data of the standard air, the similarity of the spectrum to be tested is calculated using a similarity function. The liquid presence is then determined using the spectral similarity threshold to complete the automatic liquid detection and obtain the liquid presence determination result. This enables targeted self-cleaning, avoids dry brushing, and significantly extends the service life of the cleaning motor. Furthermore, based on the liquid presence determination result and the cleanliness of the flow tank, the spectrum of the target sample is collected to improve the accuracy of water quality monitoring. Attached Figure Description
[0021] Figure 1 A schematic flowchart of the full-spectrum neural network water quality monitoring method based on flow-through self-cleaning provided in an embodiment of the present invention; Figure 2 A schematic diagram of the functional structure of a full-spectrum neural network water quality monitoring device based on flow-through self-cleaning provided in an embodiment of the present invention; Figure 3 A schematic diagram of the mechanical structure of the full-spectrum neural network water quality monitoring device based on flow-through self-cleaning provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the accompanying drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.
[0023] It should be understood that although the terms first, second, etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit, without departing from the scope of the exemplary embodiments of the invention.
[0024] It should be understood that the term "and / or" that may appear in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist simultaneously. The term " / and" that may appear in this document describes another relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this document generally indicates that the related objects before and after it are in an "or" relationship.
[0025] Example: like Figure 1 As shown, the first aspect of this embodiment provides a full-spectrum neural network water quality monitoring method based on flow-through self-cleaning, which may include, but is not limited to, the following steps: S1. Obtain preset air standard absorbance spectral line data and spectral similarity threshold, and obtain measurement trigger command to emit a broadband beam to the sample to be tested in the flow cell, perform spectral acquisition of the sample to be tested, and obtain the absorbance spectral line data of the sample to be tested, wherein the air standard absorbance spectral line data and the absorbance spectral line data of the sample to be tested are both a set of discrete vector sequences. In one possible implementation, step S1 involves acquiring preset air standard absorbance spectral line data and spectral similarity thresholds, and acquiring a measurement trigger command to emit a broadband beam of light onto the sample to be tested in the flow cell, performing spectral acquisition of the sample to be tested, and obtaining the absorbance spectral line data of the sample to be tested. This step can be decomposed into, but is not limited to, the following steps S11-S12, specifically including: S11. Obtain preset air standard absorption spectrum data The air standard absorbance spectral line data ,and Indicates the first One spectral acquisition point, Indicates the first Air standard absorbance collected at each spectral acquisition point Indicates the total number of spectral acquisition points; S12. Obtain a measurement trigger command, and control the generation of a broadband light beam according to the measurement trigger command, so as to utilize... The spectral acquisition points are used to simultaneously acquire spectra of the sample to be tested in the flow cell, so as to obtain the absorbance spectral data of the sample to be tested. Wherein, the sample to be tested is an air sample or a liquid sample in the flow cell, and the absorbance spectral data of the sample to be tested... ,and Indicates the first The absorbance of the sample to be tested is collected at each spectral acquisition point.
[0026] S2. Obtain a preset similarity function, use the similarity function to calculate the spectral similarity between the absorbance spectral data of the sample to be tested and the absorbance spectral data of the standard air, and use the spectral similarity threshold to determine the presence of liquid in the spectral similarity to be tested, and obtain the liquid presence determination result; In one possible implementation, step S2 involves obtaining a preset similarity function, calculating the spectral similarity between the absorbance spectral data of the sample to be tested and the absorbance spectral data of the standard air using the similarity function, and using the spectral similarity threshold to determine the presence of liquid, thereby obtaining a liquid presence determination result. This step can be broken down into, but is not limited to, the following steps S21-S25, specifically including: S21. Obtain the preset similarity function , wherein the similarity function If the similarity function is obtained using Euclidean distance, inner product, or cosine similarity algorithm... Using the Euclidean distance algorithm, the absorbance spectral data of the sample to be tested... and the air standard absorbance spectral line data Spectral similarity between the two This can be expressed by the following formula:
[0027] S22. Obtain the absorbance spectral data of the sample to be tested. and the air standard absorbance spectral line data Input the similarity function To calculate the absorbance spectral data of the sample to be tested. and the air standard absorbance spectral line data Spectral similarity between the two ; S23. Utilizing the aforementioned spectral similarity threshold For the spectral similarity to be measured Perform a liquid presence determination and obtain the liquid presence determination result; S24. If the spectral similarity to be measured Not lower than the spectral similarity threshold The result of the liquid presence determination is that no liquid exists; S25. If the spectral similarity to be measured Below the spectral similarity threshold The result of the liquid presence determination is that liquid is present.
[0028] It should be noted that, compared to existing flow-through monitoring devices with cleaning functions, whose cleaning actions are typically triggered by a simple timer and executed at fixed intervals, ignoring the actual operating conditions within the flow-through pool, this indiscriminate cleaning method leads to situations where the water intake experiences temporary water shortages due to changes in pipeline pressure, pump failures, or seasonal droughts. This causes the motor-driven brushes to spin freely in the air, resulting in dry brushing. Especially for commonly used brushed motors, dry brushing causes the brushes and commutator to rub violently without lubrication, resulting in abnormal wear and heat generation. This can shorten the motor's lifespan by several times or even tens of times, becoming a major cause of equipment failure. In contrast, the flow-through self-cleaning full-spectrum neural network water quality monitoring method provided in this embodiment introduces a spectrum-based intelligent liquid presence prediction mechanism, fundamentally eliminating this drawback. After each measurement trigger command is received, it does not directly execute cleaning or measurement, but first utilizes air standard absorption spectral line data. Compared with the rapidly acquired absorbance spectral data of the sample to be tested Real-time comparisons are performed to establish similarity criteria, enabling accurate determination of the presence of liquid within the flow-through tank. Only when the presence of liquid is confirmed will the system initiate cleaning according to a preset self-cleaning cycle. This control logic enables the water quality monitoring method in this embodiment to achieve intelligent, autonomous decision-making, ensuring maximum efficiency in every monitoring action. This significantly extends the service life of the motor, transmission components, and brushes, and substantially improves the long-term operational reliability of the water quality monitoring device in complex field environments.
[0029] S3. Obtain the preset self-cleaning cycle of the flow cell and the self-cleaning operation log of the flow cell. Based on the self-cleaning cycle of the flow cell, the self-cleaning operation log of the flow cell and the liquid presence determination result, perform the self-cleaning operation of the flow cell to form a cleaned flow cell. In one possible implementation, step S3 involves obtaining a preset flow cell self-cleaning cycle and the flow cell self-cleaning operation log. Based on the flow cell self-cleaning cycle, the flow cell self-cleaning operation log, and the liquid presence determination result, a flow cell self-cleaning operation is performed to form a cleaned flow cell. This step can be broken down into, but is not limited to, the following steps S31-S32, specifically including: S31. When the liquid presence determination result is that there is no liquid, the sample to be tested is sampled at the next time moment to obtain the absorbance spectral data of the sample to be tested at the next time moment, the similarity between the absorbance spectral data of the sample to be tested and the absorbance spectral data of the air standard is calculated, and the liquid presence determination is performed again on the similarity of the spectral data of the sample to be tested using the spectral similarity threshold, until the liquid presence determination result is that there is liquid; S32. When the liquid presence determination result is that liquid is present, obtain the preset flow cell self-cleaning cycle and the flow cell self-cleaning operation log, and perform the flow cell self-cleaning operation based on the flow cell self-cleaning cycle and the flow cell self-cleaning operation log to form a cleaned flow cell.
[0030] In one possible implementation, step S32 involves performing a flow-through self-cleaning operation based on the flow-through self-cleaning cycle and the flow-through self-cleaning operation log to form a cleaned flow-through. This step can be broken down into, but is not limited to, the following steps S321-S32, specifically including: S321. Based on the self-cleaning operation log of the flow cell, extract the most recent cleaning record and extract the time information corresponding to the most recent cleaning record as the most recent cleaning time. S322. Obtain the time information of the current moment, and calculate the difference between the most recent cleaning time and the time information of the current moment to obtain the difference between the most recent cleaning time and the time information of the current moment, which is used as the uncleaned duration of the flow pool; S323. Based on the self-cleaning cycle of the flow cell and the uncleaned duration of the flow cell, determine whether the uncleaned duration of the flow cell reaches or exceeds the self-cleaning cycle of the flow cell. S324. If not, mark the current flow cell as a cleaned flow cell; S325. If so, a flow cell cleaning control signal is issued to perform a flow cell self-cleaning operation according to the flow cell cleaning control signal, the cleaned flow cell is marked as a cleaned flow cell, and the current time information is recorded to form a current cleaning record, and the current cleaning record is entered into the flow cell self-cleaning operation log.
[0031] S4. The sample to be tested in the cleaned flow cell is used as the target sample. A broadband beam is emitted to the target sample in the cleaned flow cell to collect the target sample spectrum, obtain the target sample absorbance spectral data, and input the target sample absorbance spectral data into a pre-trained full-spectrum feedforward neural network inference model to calculate the target water quality parameter concentration value of the target sample, thereby realizing water quality monitoring.
[0032] In one possible implementation, step S4 involves using the sample to be tested in the cleaned flow tank as the target sample. A broadband light beam is emitted to the target sample in the cleaned flow tank to acquire the target sample's spectrum, obtaining the target sample's absorbance spectral data. This target sample absorbance spectral data is then input into a pre-trained full-spectrum feedforward neural network inference model to calculate the target water quality parameter concentration value of the target sample, thereby achieving water quality monitoring. This step can be broken down into, but is not limited to, the following steps S41-S42, specifically including: S41. Using the sample to be tested in the cleaned flow cell as the target sample, a broadband beam is emitted to the target sample in the cleaned flow cell to perform synchronous spectral acquisition and obtain the target sample absorbance spectral data of the target sample. S42. Obtain a pre-trained full-spectrum feedforward neural network inference model, input the target sample absorbance spectral data of the target sample into the input layer of the full-spectrum feedforward neural network inference model, and perform feature extraction and nonlinear mapping on the target sample absorbance spectral data through the full-spectrum feedforward neural network inference model to output the target water quality parameter concentration value and complete water quality monitoring.
[0033] It should be noted that the full-spectrum neural network water quality monitoring method based on flow-through self-cleaning provided in this embodiment, when acquiring and analyzing the spectrum of the target sample, obtains comprehensive information including organic matter, inorganic matter, suspended particles, etc. in the water body by acquiring continuous, high-resolution full-band spectral data from ultraviolet to near-infrared. It then uses a pre-trained full-spectrum feedforward neural network inference model (which is trained with a large amount of multi-sample data and can automatically learn and mine the highly complex and nonlinear mapping relationship between the full-spectrum data and various water quality parameters. Essentially, it is a powerful and adaptive multivariate correction model that can not only effectively overcome the influence of background interference and co-absorption of substances, but also quickly output the concentration values of multiple key water quality parameters (such as COD, BOD, ammonia nitrogen, nitrate, turbidity, etc.)) for rapid analysis and inference to achieve efficient and accurate online monitoring, providing a high-quality data foundation for water quality monitoring and subsequent precise environmental governance.
[0034] like Figure 2As shown, the second aspect of this embodiment provides an apparatus for implementing the full-spectrum neural network water quality monitoring method based on flow-through self-cleaning described in the first aspect of the embodiment, comprising: The system comprises a control inference unit, a spectral acquisition unit, and a self-cleaning unit. The instruction input terminal of the control inference unit is used to acquire external instruction inputs. The control signal output terminal of the control inference unit is electrically connected to the spectral acquisition control signal input terminal of the spectral acquisition unit and the flow cell cleaning control signal input terminal of the self-cleaning unit, respectively. The spectral data transmission terminal of the spectral acquisition unit is electrically connected to the spectral data receiving terminal of the control inference unit. The flow cell marker output terminal of the self-cleaning unit is electrically connected to the flow cell marker input terminal of the control inference unit. The control reasoning unit is used to acquire a measurement trigger command to generate a first spectral acquisition control signal, control the spectral acquisition unit to acquire the spectrum of the sample to be tested, receive the absorbance spectral line data of the sample to be tested to determine the presence of liquid, and generate a flow cell cleaning control signal to control the self-cleaning unit to perform the flow cell self-cleaning operation. The spectral acquisition unit is used to receive the first spectral acquisition control signal, to emit a broadband beam, and to acquire the spectrum of the sample to be tested, to obtain the absorbance spectral line data of the sample to be tested, and to send the absorbance spectral line data of the sample to be tested to the control inference unit. The self-cleaning unit is used to receive the flow cell cleaning control signal to perform the flow cell self-cleaning operation. The control inference unit is also used to identify the cleaned flow tank and generate a second spectral acquisition control signal to control the spectral acquisition unit to acquire the spectrum of the target sample and receive the absorbance spectral line data of the target sample so as to calculate the concentration value of the target water quality parameter of the target sample through the full-spectrum feedforward neural network inference model deployed in the control inference unit. The spectral acquisition unit is also used to receive the second spectral acquisition control signal to emit a broadband beam and perform target sample spectral acquisition to obtain target sample absorption spectral line data, and to send the target sample absorption spectral line data to the control inference unit.
[0035] like Figure 3 As shown, in one possible implementation, the spectral acquisition unit includes a xenon lamp, a collimating lens, a light guide column, and a spectrometer, and the self-cleaning unit includes a motor, a drive shaft, and brushes. The xenon lamp's input terminal serves as the spectral acquisition control signal input terminal of the spectral acquisition unit, and is electrically connected to the control signal output terminal of the inference unit. The xenon lamp's outlet is positioned directly opposite the light guide column's inlet. The collimating lens is positioned between the xenon lamp's outlet and the light guide column's inlet. The light guide column's outlet is positioned directly opposite the spectrometer's spectral acquisition terminal. The spectrometer's output terminal serves as the spectral data transmission terminal of the spectral acquisition unit, and is electrically connected to the spectral data reception terminal of the inference unit. The controlled end of the motor serves as the input terminal for the flow tank cleaning control signal of the self-cleaning unit, and is electrically connected to the output terminal of the control signal of the induction unit. The output shaft of the motor is coaxially and fixedly connected to the transmission shaft, and the transmission shaft is fixedly connected to the fixed end of the brush.
[0036] In one possible implementation, the flow-through self-cleaning full-spectrum neural network water quality monitoring device provided in this embodiment emits a wide-area light from ultraviolet to infrared. It is installed above a collimating lens, with the center point of its bulb (the outlet of the xenon lamp) directly facing the focal point of the collimating lens. The collimating lens is used to convert the light emitted by the xenon lamp (point light source) into parallel light, forming a broadband beam to ensure measurement accuracy. It is preferably made of quartz glass with good transmittance to ultraviolet light. The light guide column consists of two cylindrical transparent bodies installed on the flow cell and fixedly connected by glue. Its material is preferably made of quartz glass with good transmittance to ultraviolet light. The spectrometer is used to measure the absorption spectral lines of the sample (the sample to be tested or the target sample) (i.e., the absorbance vector composed of the absorbance at each frequency point in the entire frequency band from infrared to ultraviolet) to form the absorption spectral line data of the sample to be tested or the target sample. It includes a grating, a linear array sensor, a reflector, and a built-in computing control unit.
[0037] Furthermore, in the flow-through self-cleaning full-spectrum neural network water quality monitoring device provided in this embodiment, the flow cell is a square thick tube. The liquid to be measured can flow through the flow cell under liquid pressure and pass through the measurement window formed by two light guide columns. When the xenon lamp is turned on, the spectrometer can scan the absorption spectral lines of the water sample in real time. When the motor rotates, its output shaft drives the fixedly connected transmission shaft to rotate, and the transmission shaft drives the brush to rotate together, performing self-cleaning on the end faces (measurement windows) of the two light guide columns inside the flow cell. In a preferred application, a sealing ring 2 can be set, which is fitted onto the transmission shaft to embed it into the wall of the flow cell. Lubricating oil is applied to the sealing ring 2 to improve the waterproof effect and reduce friction. In order to reduce the overall volume of the flow cell and reduce the length of the brush to improve the cleaning power, the spectral acquisition end of the spectrometer can be set close to the motor.
[0038] In a specific application, the full-spectrum neural network water quality monitoring device based on flow-through self-cleaning provided in this embodiment also includes a mounting base box, a connecting block, and a sealing ring 1. The mounting base box is equipped with multiple screw fastening mechanisms, serving as the mounting base connecting block for the control inference unit, the spectral acquisition unit, and the self-cleaning unit. The inner wall of the connecting block is provided with pipe threads for connecting universal threaded pipe fittings (such as 4-point male fittings) to convert a universal round pipe into a square pipe for the flow-through pool. The sealing ring 1 is fastened between the connecting block and the flow-through pool. By pressing the sealing ring 1, the airtightness with the flow-through pool can be ensured, preventing water leakage.
[0039] It should be noted that the full-spectrum neural network water quality monitoring device based on flow-through self-cleaning provided in this embodiment integrates the full-spectrum light source (xenon lamp), sensing components (which can be installed in the self-cleaning unit to identify the self-cleaning markers in the flow-through pool), the self-cleaning unit, and the control inference unit into a compact mounting box, forming a fully functional integrated chassis. Specifically, by placing the spectrometer's spectral acquisition end close to the motor, the volume and overall size of the flow-through pool are effectively compressed, allowing for a shorter brush length. This improves cleaning power and effectiveness under the same torque. This compact design reduces the material cost and transportation and deployment difficulty of the device in this embodiment, making it suitable not only for standard environmental monitoring stations but also for easy installation in diverse scenarios such as space-constrained municipal manholes, small outdoor cabinets, mobile monitoring vehicles, or ships, significantly improving its applicability and compatibility. Furthermore, the water quality monitoring device in this embodiment achieves target sample extraction and testing through pipeline connections, ensuring the representativeness of the target samples and placing the device itself in an easily accessible maintenance location. This greatly reduces the workload of daily maintenance, decreases reliance on professional maintenance personnel, and facilitates large-scale, grid-based monitoring.
[0040] The working process, working details and technical effects of the device provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.
[0041] like Figure 4 As shown, the third aspect of this embodiment provides an electronic device, including: a memory, a processor, and a transceiver that are sequentially and communicatively connected, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the full-spectrum neural network water quality monitoring method based on flow-through self-cleaning as described in the first aspect of the embodiment.
[0042] For specific examples, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out (FIFO) memory, and / or first-in-last-out (FILO) memory, etc.; specifically, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state.
[0043] In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. For example, the processor may not be limited to microprocessors of the STM32F105 series, reduced instruction set computer (RISC) microprocessors, x86 architecture processors, or processors with integrated neural network processing units (NPUs). The transceiver may be, but is not limited to, a Wi-Fi transceiver, a Bluetooth transceiver, a General Packet Radio Service (GPRS) transceiver, a ZigBee transceiver (a low-power LAN protocol based on the IEEE 802.15.4 standard), a 3G transceiver, a 4G transceiver, and / or a 5G transceiver. Furthermore, the device may also include, but is not limited to, a power module, a display screen, and other necessary components.
[0044] The working process, working details and technical effects of the electronic device provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.
[0045] The fourth aspect of this embodiment provides a storage medium that stores instructions containing the flow-through self-cleaning full-spectrum neural network water quality monitoring method described in the first aspect of the embodiment. That is, the storage medium stores instructions that, when executed on a computer, perform the flow-through self-cleaning full-spectrum neural network water quality monitoring method as described in the first aspect of the embodiment.
[0046] The storage medium refers to a carrier for storing data, which may include, but is not limited to, floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or memory sticks. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0047] The working process, working details and technical effects of the storage medium provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.
[0048] The fifth aspect of this embodiment provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform the full-spectrum neural network water quality monitoring method based on flow-through self-cleaning as described in the first aspect of this embodiment, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0049] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A full-spectrum neural network-based water quality monitoring method based on flow-through self-cleaning, characterized in that, include: The system acquires preset air standard absorbance spectral line data and spectral similarity threshold, and obtains a measurement trigger command to emit a broadband beam to the sample to be tested in the flow cell, and performs spectral acquisition of the sample to be tested to obtain the absorbance spectral line data of the sample to be tested. The air standard absorbance spectral line data and the absorbance spectral line data of the sample to be tested are both a set of discrete vector sequences. A preset similarity function is obtained, and the similarity between the absorbance spectral data of the sample to be tested and the absorbance spectral data of the air standard is calculated using the similarity function. The liquid presence is determined by using the spectral similarity threshold to determine the liquid presence. Obtain the preset self-cleaning cycle of the flow cell and the self-cleaning operation log of the flow cell. Based on the self-cleaning cycle of the flow cell, the self-cleaning operation log of the flow cell, and the liquid presence determination result, perform the self-cleaning operation of the flow cell to form a cleaned flow cell. The sample to be tested in the cleaned flow cell is used as the target sample. A broadband beam is emitted to the target sample in the cleaned flow cell to collect the target sample spectrum and obtain the target sample absorbance spectral data. The target sample absorbance spectral data is then input into a pre-trained full-spectrum feedforward neural network inference model to calculate the target water quality parameter concentration value of the target sample, thereby realizing water quality monitoring.
2. The water quality monitoring method based on flow-through self-cleaning full-spectrum neural network according to claim 1, characterized in that, Acquire preset air standard absorbance spectral line data and spectral similarity threshold, and obtain measurement trigger command to emit a broadband beam of light onto the sample to be tested in the flow cell, perform spectral acquisition of the sample to be tested, and obtain the absorbance spectral line data of the sample to be tested, including: Acquire preset air standard absorbance spectral data The air standard absorbance spectral line data ,and Indicates the first One spectral acquisition point, Indicates the first Air standard absorbance collected at each spectral acquisition point Indicates the total number of spectral acquisition points; Obtain a measurement trigger command, and control the generation of a broadband light beam according to the measurement trigger command, so as to utilize... The spectral acquisition points are used to simultaneously acquire spectra of the sample to be tested in the flow cell, so as to obtain the absorbance spectral data of the sample to be tested. Wherein, the sample to be tested is an air sample or a liquid sample in the flow cell, and the absorbance spectral data of the sample to be tested... ,and Indicates the first The absorbance of the sample to be tested is collected at each spectral acquisition point.
3. The water quality monitoring method based on flow-through self-cleaning full-spectrum neural network according to claim 2, characterized in that, A preset similarity function is obtained, and the similarity between the absorbance spectral data of the sample to be tested and the absorbance spectral data of the standard air is calculated using the similarity function. Then, a liquid presence determination is performed on the spectral similarity using the spectral similarity threshold to obtain a liquid presence determination result, including: Get the preset similarity function , wherein the similarity function The algorithm can be Euclidean distance, inner product, or cosine similarity. The absorbance spectral data of the sample to be tested and the air standard absorbance spectral line data Input the similarity function To calculate the absorbance spectral data of the sample to be tested. and the air standard absorbance spectral line data Spectral similarity between the two ; Using the spectral similarity threshold For the spectral similarity to be measured Perform a liquid presence determination and obtain the liquid presence determination result; If the spectral similarity to be measured Not lower than the spectral similarity threshold The result of the liquid presence determination is that no liquid exists; If the spectral similarity to be measured Below the spectral similarity threshold The result of the liquid presence determination is that liquid is present.
4. The water quality monitoring method based on flow-through self-cleaning full-spectrum neural network according to claim 1, characterized in that, Obtain the preset flow cell self-cleaning cycle and the flow cell self-cleaning operation log. Based on the flow cell self-cleaning cycle, the flow cell self-cleaning operation log, and the liquid presence determination result, perform the flow cell self-cleaning operation to form a cleaned flow cell, including: When the liquid presence determination result is that there is no liquid, the sample spectrum of the test sample is acquired at the next time moment to obtain the absorbance spectral data of the test sample at the next time moment. The similarity between the absorbance spectral data of the test sample and the absorbance spectral data of the air standard is calculated, and the liquid presence determination is performed again by using the spectral similarity threshold, until the liquid presence determination result is that there is liquid. When the liquid presence determination result indicates the presence of liquid, the preset flow cell self-cleaning cycle and the flow cell self-cleaning operation log are obtained, and based on the flow cell self-cleaning cycle and the flow cell self-cleaning operation log, the flow cell self-cleaning operation is performed to form a cleaned flow cell.
5. The water quality monitoring method based on flow-through self-cleaning full-spectrum neural network according to claim 4, characterized in that, Based on the flow cell self-cleaning cycle and the flow cell self-cleaning operation log, a flow cell self-cleaning operation is performed to form a cleaned flow cell, including: Based on the self-cleaning operation log of the flow pool, the most recent cleaning record is extracted, and the time information corresponding to the most recent cleaning record is extracted as the most recent cleaning time. Obtain the current time information, and calculate the difference between the most recent cleaning time and the current time information to obtain the difference between the most recent cleaning time and the current time information, which is used as the uncleaned duration of the flow pool; Based on the self-cleaning cycle of the flow cell and the uncleaned time of the flow cell, it is determined whether the uncleaned time of the flow cell reaches or exceeds the self-cleaning cycle of the flow cell. If not, mark the current flow cell as a cleaned flow cell; If so, a flow cell cleaning control signal is issued to perform a flow cell self-cleaning operation according to the flow cell cleaning control signal. The cleaned flow cell is marked as a cleaned flow cell, and the current time information is recorded to form a current cleaning record. The current cleaning record is entered into the flow cell self-cleaning operation log.
6. The water quality monitoring method based on flow-through self-cleaning full-spectrum neural network according to claim 1, characterized in that, The sample to be tested in the cleaned flow tank is used as the target sample. A broadband light beam is emitted to the target sample in the cleaned flow tank to acquire the target sample spectrum, thereby obtaining the target sample absorbance spectral data. The target sample absorbance spectral data is then input into a pre-trained full-spectrum feedforward neural network inference model to calculate the target water quality parameter concentration value of the target sample, thus realizing water quality monitoring, including: The sample to be tested in the cleaned flow cell is used as the target sample. A broadband beam is emitted to the target sample in the cleaned flow cell to perform synchronous spectral acquisition and obtain the target sample absorbance spectral data. A pre-trained full-spectrum feedforward neural network inference model is obtained. The target sample absorbance spectral data is input into the input layer of the full-spectrum feedforward neural network inference model. The full-spectrum feedforward neural network inference model performs feature extraction and nonlinear mapping on the target sample absorbance spectral data to output the target water quality parameter concentration value, thereby completing water quality monitoring.
7. A full-spectrum neural network water quality monitoring device based on flow-through self-cleaning, characterized in that, The water quality monitoring method based on flow-through self-cleaning full-spectrum neural network as described in any one of claims 1 to 6 includes: a control inference unit, a spectral acquisition unit, and a self-cleaning unit. The instruction input terminal of the control inference unit is used to acquire external instruction inputs. The control signal output terminal of the control inference unit is electrically connected to the spectral acquisition control signal input terminal of the spectral acquisition unit and the flow-through cell cleaning control signal input terminal of the self-cleaning unit, respectively. The spectral data transmission terminal of the spectral acquisition unit is electrically connected to the spectral data receiving terminal of the control inference unit. The flow-through cell marker output terminal of the self-cleaning unit is electrically connected to the flow-through cell marker input terminal of the control inference unit. The control reasoning unit is used to acquire a measurement trigger command to generate a first spectral acquisition control signal, control the spectral acquisition unit to acquire the spectrum of the sample to be tested, receive the absorbance spectral line data of the sample to be tested to determine the presence of liquid, and generate a flow cell cleaning control signal to control the self-cleaning unit to perform the flow cell self-cleaning operation. The spectral acquisition unit is used to receive the first spectral acquisition control signal, to emit a broadband beam, and to acquire the spectrum of the sample to be tested, to obtain the absorbance spectral line data of the sample to be tested, and to send the absorbance spectral line data of the sample to be tested to the control inference unit. The self-cleaning unit is used to receive the flow cell cleaning control signal to perform the flow cell self-cleaning operation. The control inference unit is also used to identify the cleaned flow tank and generate a second spectral acquisition control signal to control the spectral acquisition unit to acquire the spectrum of the target sample and receive the absorbance spectral line data of the target sample so as to calculate the concentration value of the target water quality parameter of the target sample through the full-spectrum feedforward neural network inference model deployed in the control inference unit. The spectral acquisition unit is also used to receive the second spectral acquisition control signal to emit a broadband beam and perform target sample spectral acquisition to obtain target sample absorption spectral line data, and to send the target sample absorption spectral line data to the control inference unit.
8. The full-spectrum neural network water quality monitoring device based on flow-through self-cleaning according to claim 7, characterized in that, include: The spectral acquisition unit includes a xenon lamp, a collimating lens, a light guide column, and a spectrometer; the self-cleaning unit includes a motor, a drive shaft, and brushes. The xenon lamp's input terminal serves as the spectral acquisition control signal input terminal of the spectral acquisition unit, and is electrically connected to the control signal output terminal of the inference unit. The xenon lamp's outlet is positioned directly opposite the light guide column's inlet. The collimating lens is positioned between the xenon lamp's outlet and the light guide column's inlet. The light guide column's outlet is positioned directly opposite the spectrometer's spectral acquisition terminal. The spectrometer's output terminal serves as the spectral data transmission terminal of the spectral acquisition unit, and is electrically connected to the spectral data reception terminal of the inference unit. The controlled end of the motor serves as the input terminal for the flow tank cleaning control signal of the self-cleaning unit, and is electrically connected to the output terminal of the control signal of the induction unit. The output shaft of the motor is coaxially and fixedly connected to the transmission shaft, and the transmission shaft is fixedly connected to the fixed end of the brush.
9. An electronic device, characterized in that, The device includes a memory, a processor, and a transceiver that are sequentially and communicatively connected. The memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the full-spectrum neural network water quality monitoring method based on flow-through self-cleaning as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or the instructions are executed by the computer, they implement the full-spectrum neural network water quality monitoring method based on flow-through self-cleaning as described in any one of claims 1 to 6.