Anti-biological blockage water level monitoring method and system based on ToF

By using a ToF sensor to collect auxiliary sensing signals from water level monitoring equipment and constructing a time-series feature vector for hierarchical binary classification, a directional processing mechanism is triggered for signal compensation and self-cleaning. This solves the problem of water level monitoring equipment being susceptible to biological blockage and water quality interference, and improves monitoring accuracy and reliability.

CN121740191APending Publication Date: 2026-03-27JIANGSU FREQUENCY POINT INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-24
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing water level monitoring equipment is susceptible to signal attenuation due to biological blockage and water quality interference, resulting in large measurement errors and poor long-term operational reliability.

Method used

The main ToF ranging signal is acquired by a ToF sensor, and echo intensity, multispectral features and window transmittance are simultaneously collected as auxiliary sensing signals. A time-series feature vector is constructed and input into a lightweight classification model for hierarchical binary classification recursion, triggering a directional processing mechanism for signal compensation and self-cleaning.

Benefits of technology

It achieves automatic identification, signal compensation, and ultrasonic self-cleaning under biological blockage and water quality interference, improving the accuracy of water level monitoring and the reliability of equipment operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121740191A_ABST
    Figure CN121740191A_ABST
Patent Text Reader

Abstract

The invention discloses a ToF-based biological clogging prevention water level monitoring method and system, and relates to the technical field of water level monitoring, and the method comprises the steps: obtaining a main ToF ranging signal through a ToF sensor, and synchronously collecting echo intensity, multispectral characteristics and window transmittance as auxiliary sensing signals; constructing a time sequence feature vector based on the auxiliary sensing signal and the historical water level data, inputting the time sequence feature vector into a lightweight classification model for hierarchical dichotomy recursion, and outputting a feature classification result; and triggering a directional processing mechanism according to a feature classification result. The technical problems that in the prior art, water level monitoring equipment is prone to biological blockage and water quality interference, signal attenuation is caused, the measuring error is large, and the long-term operation reliability is poor are solved, and automatic recognition, signal compensation and ultrasonic self-cleaning under biological blockage and water quality interference are achieved; and the water level monitoring precision and the equipment operation reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water level monitoring technology, specifically to a Time-of-Flight (ToF)-based method and system for preventing bioclogging water level monitoring. Background Technology

[0002] Existing water level monitoring equipment operates in aquatic environments for extended periods. Optical probes and sensing windows are highly susceptible to biological blockage and pollution caused by microbial attachment, algae growth, and sediment and suspended solids, leading to signal attenuation and decreased ranging accuracy. Traditional monitoring devices lack adaptive compensation and active cleaning capabilities for signal attenuation, resulting in high manual maintenance costs and operational difficulties, making it difficult to achieve long-term, stable, and high-precision continuous water level monitoring in complex aquatic environments.

[0003] Existing water level monitoring equipment suffers from technical problems such as susceptibility to biological blockage, water quality interference leading to signal attenuation, large measurement errors, and poor long-term operational reliability. Summary of the Invention

[0004] This application provides a Time-of-Flight (ToF)-based method and system for preventing bioclogging water level monitoring, which addresses the technical problems of existing water level monitoring equipment being susceptible to bioclogging, signal attenuation due to water quality interference, large measurement errors, and poor long-term operational reliability.

[0005] In view of the above problems, this application provides a Time-of-Flight (ToF)-based method and system for monitoring water levels to prevent bioclogging.

[0006] The first aspect of this application provides a Time-of-Flight (ToF)-based method for monitoring water levels to prevent bioclogging, the method comprising:

[0007] The main ToF ranging signal is acquired through a ToF sensor, and echo intensity, multispectral features, and window transmittance are simultaneously collected as auxiliary sensing signals. A time-series feature vector is constructed based on the auxiliary sensing signals and historical water level data, and input into a lightweight classification model for hierarchical binary classification recursion, outputting feature classification results. These results include a first-order classification based on window contamination and water quality pollution, and a second-order classification based on window contamination. A directional processing mechanism is triggered based on the feature classification results. This mechanism includes: if the classification is the first case, a first directional processing engine is activated to compensate the main ToF ranging signal and determine valid water level data; if the classification is the second case, a second directional processing engine is activated to make self-cleaning parameter decisions and drive the ultrasonic transducer to perform ultrasonic vibration cleaning, generating a cleaning record.

[0008] A second aspect of this application provides a Time-of-Flight (ToF)-based anti-bioclogging water level monitoring system, the system comprising:

[0009] The ranging signal acquisition module is used to acquire the main ToF ranging signal through a ToF sensor, and simultaneously collect echo intensity, multispectral features, and window transmittance as auxiliary sensing signals. The feature classification result output module is used to construct a time-series feature vector based on the auxiliary sensing signal and historical water level data, input it into a lightweight classification model for hierarchical binary classification recursion, and output the feature classification result. The feature classification result includes a first-order classification based on window contamination and water quality pollution, and a second-order classification based on window contamination. The directional processing mechanism triggering module is used to trigger a directional processing mechanism based on the feature classification result. The directional processing mechanism includes: if it is the first classification case, starting the first directional processing engine to compensate the main ToF ranging signal and determine the effective water level data; if it is the second classification case, starting the second directional processing engine to make self-cleaning parameter decisions and drive the ultrasonic transducer to perform ultrasonic vibration cleaning and generate a cleaning record.

[0010] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0011] The system acquires the main ToF ranging signal using a Time-of-Flight (ToF) sensor, and simultaneously collects echo intensity, multispectral features, and window transmittance as auxiliary sensing signals. A time-series feature vector is constructed based on the auxiliary sensing signals and historical water level data. This vector is then input into a lightweight classification model for hierarchical binary classification recursion, outputting feature classification results. These results include a first-order classification based on window contamination and water quality pollution, and a second-order classification based on window contamination. A targeted processing mechanism is triggered based on the feature classification results. This approach achieves automatic identification, signal compensation, and ultrasonic self-cleaning under conditions of biological blockage and water quality interference, improving water level monitoring accuracy and equipment operational reliability. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 A schematic diagram of the ToF-based method for preventing bioclogging water level monitoring provided in this application embodiment;

[0014] Figure 2 A schematic diagram of the structure of a ToF-based anti-bioclogging water level monitoring system provided in this application embodiment.

[0015] Figure labeling: 10 for ranging signal acquisition module, 20 for feature classification result output module, and 30 for orientation processing mechanism triggering module. Detailed Implementation

[0016] This application provides a ToF-based method and system for preventing bioclogging water level monitoring, which addresses the technical problems of existing water level monitoring equipment being susceptible to bioclogging, signal attenuation due to water quality interference, large measurement errors, and poor long-term operational reliability.

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0018] Example 1, as Figure 1 As shown, this application provides a Time-of-Flight (ToF)-based method for monitoring water levels to prevent bioclogging, the method comprising:

[0019] Step S100: Acquire the main ToF ranging signal through the ToF sensor, and simultaneously collect echo intensity, multispectral characteristics and window transmittance as auxiliary sensing signals.

[0020] Specifically, the Time-of-Flight (ToF) sensor mounted on the water level monitoring equipment uses a buoy inside the pipe as a detection target, periodically emitting modulated light pulses and receiving echo signals from the water surface. The initial water level value is calculated based on the time difference of the echoes and used as the main ToF ranging signal. Simultaneously, the echo intensity corresponding to the water surface echo is determined, which characterizes the signal attenuation. The low-power multispectral LED integrated into the equipment synchronously collects the reflection intensity of the target wavelength and determines the multispectral characteristics accordingly. These multispectral characteristics can identify the type of biofilm. Furthermore, a low-power internal reference light is periodically emitted to collect the window transmittance of the ToF sensor's optical window. This window transmittance characterizes the contamination adhesion of the optical window. Finally, the collected echo intensity, multispectral characteristics, and window transmittance are integrated as auxiliary sensing signals.

[0021] Step S200: Construct a time-series feature vector based on the auxiliary sensing signal and historical water level data, input it into a lightweight classification model for hierarchical binary classification recursion, and output the feature classification result. The feature classification result includes a first-order classification based on window pollution and water pollution, and a second-order classification based on the window pollution class.

[0022] Specifically, firstly, using a cleanliness baseline as a reference, the auxiliary sensing signal composed of echo intensity, multispectral characteristics, and window transmittance is quantitatively analyzed. Quantitative indicators of intensity attenuation, window transmittance change, and spectral characteristic change are defined and formed into an auxiliary feature sequence. Then, historical water level data is retrieved, and short-term fluctuation and long-term drift characteristics of water level values ​​are extracted through data mining. Based on this, the signal-to-noise ratio characteristics of water level monitoring are determined. The auxiliary feature sequence and signal-to-noise ratio characteristics are fused temporally to construct a temporal feature vector that combines sensing signal changes and water level data characteristics. Subsequently, this temporal feature vector is input into a pre-constructed lightweight classification model. This model consists of multi-level cascaded classification layers. Each classification layer incorporates the state-signal attenuation-sensor cleanliness multivariate linear relationship of temporal features as a pollution category criterion. The model performs hierarchical binary classification recursive calculations, first completing the first-order classification based on window pollution and water quality pollution. Then, for the categories determined as window pollution in the first-order classification, a second-order classification related to the degree of pollution is further carried out. Finally, the feature classification result containing the first-order and second-order classification results is output.

[0023] Step S300: Trigger the targeted processing mechanism based on the feature classification results.

[0024] The targeted processing mechanism includes:

[0025] If it is the first category case, start the first orientation processing engine to compensate the main ToF ranging signal and determine the valid water level data;

[0026] If it is the second category, the second directional processing engine is activated to make self-cleaning parameter decisions and drive the ultrasonic transducer to perform ultrasonic vibration cleaning, generating a cleaning record.

[0027] Specifically, the targeted processing mechanism refers to a closed-loop control mechanism that matches and executes corresponding data compensation or equipment cleaning operations based on feature classification results. The first classification case specifically refers to the situation where the first-order classification determines window contamination and the second-order classification result is below a preset contamination threshold. The first targeted processing engine refers to an algorithm module that implements ranging signal compensation based on a signal attenuation model. The second classification case specifically refers to the situation where the first-order classification determines window contamination and the second-order classification result is higher than or equal to a preset contamination threshold. The second targeted processing engine refers to a hardware driver module that integrates self-cleaning parameter decision-making and execution control functions. This step uses an embedded processor to read the feature classification results output by the lightweight classification model in real time and perform threshold comparison. Based on the comparison result, the corresponding targeted processing mechanism is triggered: if the first classification case is determined, the first targeted processing engine is immediately started, and the preset Lambert-Bi... The signal attenuation compensation model, combined with the window transmittance and echo intensity quantification indexes in the auxiliary sensing signal, performs nonlinear attenuation compensation and drift correction on the main ToF ranging signal, calculates and determines the effective water level data after removing pollution interference; if it is determined to be the second category, the second directional processing engine is activated. First, based on the pollution level, window transmittance value and historical cleaning records corresponding to the second-order classification result, it automatically determines the self-cleaning parameters such as the vibration frequency, duration and power level of the ultrasonic transducer. Then, the engine sends a drive command to the ultrasonic transducer to control it to carry out ultrasonic vibration cleaning operation according to the decision parameters. It uses the ultrasonic cavitation effect to remove the adhering contaminants on the surface of the optical window. At the same time, it records the trigger time, pollution level, execution parameters and window transmittance recovery value after cleaning, generates an unalterable cleaning record and stores it in the local storage module.

[0028] In one possible implementation, step S100 further includes:

[0029] Step S110: Periodically emit modulated light pulses through the ToF sensor and receive water surface echoes. Calculate the initial water level value using the echo time difference as the main ToF ranging signal.

[0030] Step S120: Determine the echo intensity of the water surface echo, wherein the echo intensity characterizes the degree of signal attenuation.

[0031] Step S130: By integrating a low-power multispectral LED, the reflection intensity of the target wavelength is simultaneously collected to determine the multispectral characteristics, wherein the multispectral characteristics are used to identify the type of biofilm.

[0032] Step S140: By periodically emitting a low-power internal reference light, the window transmittance of the ToF sensor optical window is acquired, wherein the window transmittance characterizes the contamination adhesion.

[0033] Step S150: Add the echo intensity, multispectral characteristics and window transmittance to the auxiliary sensing signal.

[0034] Specifically, the ToF sensor connected to the embedded processor uses the buoy in the pipeline of the water level monitoring device as the target for water level detection. It transmits modulated light pulses directionally to the water surface according to a preset acquisition cycle, and at the same time receives the water surface echo signal formed by the reflection of the water surface in real time. By accurately calculating the time difference between the transmission of the modulated light pulse and the reception of the water surface echo, and combining the propagation characteristics of light, the initial water level value is calculated and used as the main ToF ranging signal.

[0035] During the synchronous period when the ToF sensor receives the water surface echo signal, the signal acquisition module of the sensor performs real-time sampling and amplitude quantization of the echo electrical signal. With the help of the signal strength calculation algorithm built into the embedded processor, the effective value of the sampled echo signal data is extracted and normalized to accurately determine the corresponding water surface echo intensity value. This echo intensity, as a quantitative characterization index, directly reflects the overall signal attenuation degree generated after the modulated light pulse is emitted, propagates in the water, and is reflected by the water surface. This provides core data support for the signal attenuation dimension for subsequent determination of pollution type and degree.

[0036] Synchronized with the ToF sensor's modulation of light pulses, a hardware-linked low-power multispectral LED is triggered to emit target wavelength detection light to the monitored water surface area according to a preset monitoring band. A high-sensitivity photoelectric receiving module collects the target wavelength light signals reflected from pollutants and biofilms attached to the water surface and optical window in real time, and performs photoelectric conversion to transform the light signals into quantifiable electrical signals. The converted electrical signals undergo signal amplification, filtering, and noise reduction conditioning to eliminate environmental stray light and circuit interference. Finally, an embedded processor quantizes the intensity of each target wavelength electrical signal after conditioning. The reflection intensity value corresponding to each target wavelength is calculated. Then, feature extraction is performed on the reflection intensity values ​​of the entire band to extract core feature parameters such as the peaks and troughs of the wavelength-intensity curve, the reflectivity of characteristic wavelengths, and the intensity differences and ratios between bands. These parameters are then normalized to eliminate the influence of dimensions and map them to a unified feature interval. All the processed core feature parameters are integrated into a structured feature dataset according to preset dimensions to determine the multispectral features. These multispectral features, through the specific reflection patterns of different biofilms to each target wavelength, become the core quantitative basis for accurately identifying the specific types of biofilms in the monitoring area.

[0037] According to the preset acquisition cycle, the ToF sensor's built-in transmitting unit directionally emits a low-power internal reference light beam into its optical window. This reference light is a standard light signal with a fixed wavelength and fixed intensity. Simultaneously, the high-sensitivity receiving unit of the sensor synchronously acquires the reference light signal transmitted through the window on the other side. The received transmitted light signal is first converted into an electrical signal through photoelectric conversion, and then amplified, filtered, and denoised. The embedded processor then uses the light intensity ratio calculation method to calculate the ratio between the intensity of the conditioned transmitted light signal and the intensity of the original emitted reference light signal. The calculated ratio is the window transmittance of the ToF sensor's optical window. This window transmittance value is negatively correlated with the degree of contamination on the optical window. The lower the value, the more serious the contamination of biological organisms, impurities, etc., on the window surface. This quantitatively characterizes the actual contamination situation of the optical window.

[0038] First, the embedded processor standardizes the data format of the previously acquired echo intensity values, multispectral feature structured dataset, and window transmittance values ​​after signal conditioning and quantization, converting them into a floating-point feature data format recognizable by a lightweight classification model. Then, relying on the processor's built-in time-series data stitching algorithm, the three types of data are mapped one by one to the preset data fields of the auxiliary sensing signal according to the preset feature dimension order, completing the orderly addition and integration of multi-dimensional sensing data. At the same time, corresponding acquisition timestamps and feature identification tags are added to each type of data to construct a structured auxiliary sensing signal dataset that combines time sequence and feature recognition. Finally, the integrated complete data is written to the device's local feature data cache.

[0039] In one possible implementation, step S200 further includes:

[0040] Step S210: Using a cleanliness baseline value, define the intensity attenuation, window transmittance change, and spectral characteristic change of the auxiliary sensing signal as an auxiliary feature sequence.

[0041] Step S220: Based on historical water level data, analyze the short-term fluctuation characteristics and long-term drift characteristics of water level values ​​to determine the signal-to-noise ratio characteristics.

[0042] Step S230: Construct a time-series feature vector based on the auxiliary feature sequence and the signal-to-noise ratio feature.

[0043] Specifically, the embedded processor first retrieves the pre-stored cleanliness baseline values. These baseline values ​​are the echo intensity baseline value, window transmittance baseline value, and multispectral reflectance intensity baseline values ​​for each target wavelength, calibrated by the sensor under interference-free conditions where the optical window is clean and the water is clear. These serve as reference benchmarks for the quantitative analysis of various features. Then, using the difference ratio dual quantization method, the real-time echo intensity, real-time window transmittance, and real-time multispectral reflectance intensity of each target wavelength in the auxiliary sensing signal are calculated with the corresponding cleanliness baseline values. The relative attenuation rate of the echo intensity and the relative attenuation rate of the window transmittance are obtained by calculating (baseline value - real-time value) / baseline value × 100%. For the rate of change, the band deviation value of the spectral characteristics is calculated by the difference between the real-time reflection intensity of each target wavelength and the reference value. This allows for the precise definition of quantifiable intensity attenuation, window transmittance change, and spectral characteristic change indicators. Finally, using the timestamp sequential arrangement method, the quantitative indicators of intensity attenuation, window transmittance change, and spectral characteristic change of each target wavelength under the same acquisition cycle are combined. Then, the combined indicators of each cycle are sequentially connected according to the acquisition time of the sensors to form a structured one-dimensional data sequence arranged in the time dimension. This is used to determine the auxiliary feature sequence, which can dynamically reflect the pollution change trend of each sensing feature over time.

[0044] First, historical water level data within a preset time window is retrieved from local storage using an embedded processor. The data undergoes preprocessing, including outlier removal and missing value interpolation, to ensure data integrity. Then, a fixed-step sliding window method is used to mine short-term fluctuation characteristics. A time window and sliding step size are set to adapt to short-term water level changes. The preprocessed historical water level data is segmented, and the variance, extreme value difference, and average fluctuation amplitude of the water level values ​​within each window are calculated. The mean of the multi-window calculation results is used as a quantitative indicator representing the short-term fluctuation characteristics of the water level. Simultaneously, the least squares linear fitting method is used to mine long-term drift characteristics, performing linear trend fitting on the preprocessed historical water level data for the entire time period. The process involves solving for the slope and intercept of the fitted straight line, using the slope value as a quantitative indicator to characterize the long-term drift characteristics of the water level. Subsequently, the short-term fluctuation quantitative indicator and the long-term drift quantitative indicator are weighted and summed according to a preset algorithm to obtain the comprehensive noise value of the water level data. The effective signal value generated by actual hydrological changes in the historical water level data is then extracted, which is the true water level change amplitude after noise removal. Finally, the logarithmic operation and quantization conversion are completed using the core formula for signal-to-noise ratio (SNR) SNR=10×lg(effective signal value / comprehensive noise value). The calculated result is the final signal-to-noise ratio feature, which can accurately characterize the ratio of effective signal to interference noise in the historical water level data.

[0045] First, an embedded processor calls a timestamp alignment algorithm to precisely match the intensity attenuation, window transmittance changes, and spectral feature changes at each time node in the auxiliary feature sequence with the signal-to-noise ratio (SNR) feature according to the acquisition timestamp, ensuring a one-to-one correspondence between auxiliary features and SNR features within the same acquisition cycle. Then, a feature dimension expansion method is used, based on a one-dimensional array of the auxiliary feature sequence, adding an SNR feature dimension to the end of the feature group at each time node, expanding the original [n, 3]-dimensional matrix of the auxiliary feature sequence, where n is the number of acquisition cycles and 3 is the auxiliary feature dimension, to an [n, 4]-dimensional matrix. Subsequently, through... Data normalization is performed to map all eigenvalues ​​in the expanded matrix to the [0, 1] interval, eliminating interference caused by differences in the dimensions of different features. Finally, the normalized [n, 4]-dimensional matrix is ​​encapsulated into a vector structure, and the matrix is ​​converted into a high-dimensional temporal feature vector format that can be recognized by a lightweight classification model in a fixed dimensional order of timestamp-intensity attenuation-window transmittance change-spectral feature change-signal-noise ratio. This completes the construction of the temporal feature vector, which retains the temporal evolution of auxiliary features and incorporates the signal-noise ratio quality features of water level data, providing standardized input for subsequent classification model operations.

[0046] In one possible implementation, step S200 further includes:

[0047] Step S240: Reconstruct time-series feature samples based on historical water level data.

[0048] Step S250: Based on the time-series feature samples, randomly extract the first time-series feature vector and construct the first classification layer, wherein the first classification layer performs binary classification of samples using the first time-series feature vector, and identifies the first pollution class and the second pollution class based on the binary classification results.

[0049] Step S260: Construct a second classification layer by randomly extracting the second temporal feature vector.

[0050] Step S270: Perform multiple rounds of classification layer construction to determine the Nth classification layer, cascade the first classification layer up to the Nth classification layer, and generate the lightweight classification model.

[0051] Specifically, the process begins by retrieving historical water level data stored locally on the device via an embedded processor. This data is then correlated with raw data from auxiliary sensing signals collected concurrently, cleanliness baseline data, and time-series acquisition logs of the entire water level monitoring process. A timestamp-based precise correlation method is used to match historical water level values, echo intensity, multispectral features, and window transmittance within the same acquisition period. Next, data preprocessing is employed to remove outliers, interpolate missing values, and clean up duplicate data, ensuring the validity and integrity of the data. Subsequently, the preprocessed multidimensional data is standardized and converted to a floating-point time-series data format recognizable by the model, according to the feature dimension requirements for training a lightweight classification model. Finally, feature dimension reorganization is used to structurally integrate the multidimensional feature data from each acquisition period in chronological order, forming a time-series feature sample that is continuous in time, complete in dimensions, and clearly labeled.

[0052] First, a first time-series feature vector is randomly extracted from the reconstructed time-series feature sample set according to a preset ratio using a random stratified sampling method. This ensures that the extracted vectors cover different contamination scenarios and data quality levels, and that the vector dimension remains consistent with the sample set. Then, a lightweight machine learning framework adapted to the computing power of embedded devices, such as TensorFlow, is used. Lite employs a logistic regression algorithm to build the core classification model for the first classification layer. The extracted first temporal feature vector is used to initialize the model with a simplified network structure of input layer-hidden layer-output layer. The input layer dimension matches the temporal feature vector dimension, the hidden layer has a small number of neurons to control the model size, and the output layer uses the sigmoid binary activation function. The first temporal feature vector is then divided into training and validation sets in an 8:2 ratio. The model is iteratively trained using a gradient descent optimization algorithm. A preset window contamination threshold is used as the classification criterion, and samples are binary classified into window contamination (Class 1) and non-window contamination / water quality interference (Class 2). One-hot encoded labels are added to both classes for identification. Finally, the accuracy of the trained model is verified using validation set data, and the classification threshold is adjusted until the preset accuracy requirement is met. This completes the construction of the first classification layer, which can perform preliminary binary classification of contamination types based on the input temporal feature vector.

[0053] First, from the reconstructed temporal feature sample set, for the subset of samples identified by the first classification layer as non-window pollution / water quality interference, i.e., the second pollution class, a random stratified sampling method is used to extract a second temporal feature vector with the same dimension as the first temporal feature vector, ensuring that the vector covers scenarios with different levels of water pollution and different biofilm types. Then, using a lightweight machine learning framework adapted to embedded computing power, the core classification model of the second classification layer is built based on the decision tree algorithm. The model structure maintains a minimalist architecture of input layer-hidden layer-output layer, with the input layer dimension matching the second temporal feature vector, and the hidden layer neurons... The number of samples is adapted to the embedded computing capabilities, and the output layer still uses a binary classification activation function. The extracted second temporal feature vector is divided into a training set and a validation set. Using water pollution judgment thresholds, such as differences in multispectral features and echo intensity attenuation, as the core criteria, the samples are trained to classify water pollution (i.e., with biofilm attachment) and no water pollution (i.e., only environmental interference) into binary classification, and the model parameters are iteratively optimized. Finally, the classification accuracy is verified through the validation set, and the judgment threshold is adjusted to meet the preset requirements. The second classification layer is then constructed, which can further refine the judgment results of the first classification layer.

[0054] Following the construction logic of the first and second classification layers, the classification layers are constructed in multiple iterations, with pollution type subdivision and pollution degree quantification as the recursive direction. In each iteration, time-series feature vectors of the corresponding dimension are randomly extracted from the target sample subset output by the previous classification layer. Based on a lightweight machine learning framework, simplified algorithms adapted to embedded computing power, such as logistic regression and shallow decision trees, are used to build a new classification layer. Further binary subdivision is performed on the classification results of the previous layer; for example, the third classification layer distinguishes between biofilm pollution and non-biofilm water pollution, and the fourth classification layer distinguishes between light and heavy window pollution, until the Nth classification layer completes the preset finest-grained pollution determination. After completing N rounds of classification layer construction, the classification is carried out according to the first... The decision-making recursive order of the first classification layer, the second classification layer, ..., the Nth classification layer is determined by standardizing the input and output interfaces of each classification layer through a classification layer cascade algorithm. This allows the binary classification result of the previous classification layer to serve as the sample input for the next classification layer, while unifying the feature vector dimension and data format of each classification layer. Finally, the cascaded multi-layer classification model is subjected to overall lightweight compression, such as model quantization, pruning, and removal of redundant parameters and computation nodes, adapting to the storage and computing power limitations of embedded processors. The final result is a lightweight classification model that can realize hierarchical recursive binary classification. This model can accurately determine from pollution type to pollution degree layer by layer and meets the localized computing requirements of the device.

[0055] In one possible implementation, step S200 further includes:

[0056] Define a multivariate linear relationship between the state, signal attenuation, and sensor cleanliness of time-series features, and write it into each classification layer as the contamination criterion for the binary classification result.

[0057] The time-series feature vector is input into the lightweight classification model, and a hierarchical binary classification recursion is performed to determine the feature classification result.

[0058] Specifically, in each classification layer of the lightweight classification model, a multivariate linear relationship between the state, signal attenuation, and sensor cleanliness of time-series features is predefined and written as a criterion for binary contamination classification: Using a cleanliness baseline as a reference, a linear discriminant relationship is established between echo intensity attenuation, window transmittance change, multispectral feature change, and sensor cleanliness. When the sensor optical window is clean and free of contaminants, the echo signal intensity is normal, the window transmittance maintains the baseline value, and the multispectral features are stable, corresponding to a good sensor health status. When a light microbial film or contaminants are present on the window surface, the echo signal begins to attenuate, the window transmittance decreases slightly, and the multispectral features show a regular shift. When contaminants are moderately attached, the signal attenuation amplitude... As the transmittance decreases further, the accuracy of water level measurement is significantly affected. If the linear relationship interval is met, it is determined that front-end cleaning is required. When the window is severely blocked and pollutants completely block the light path, the echo signal is drastically attenuated and the transmittance approaches failure, making the corresponding monitoring data unreliable. At the same time, this multivariate linear relationship clearly distinguishes the characteristic trends of non-attached interference, such as water turbidity, strong turbulence, water surface foam, and a surge in suspended matter. These scenarios only show attenuation of the echo signal but no significant change in window transmittance, and the multispectral characteristics show the unique change pattern of water disturbance. In this way, the linear criterion for distinguishing window attached pollution from water disturbance is solidified to each classification layer, serving as the core judgment basis for the first and second pollution categories in the hierarchical binary classification results.

[0059] The standardized temporal feature vectors are input as tensors into the input layer of the lightweight classification model. The model executes binary classification operations in a hierarchical recursive algorithm according to a preset order of the first classification layer, the second classification layer, ..., the Nth classification layer: First, in the first classification layer, a pre-stored multivariate linear criterion formula is called, and data such as echo intensity attenuation, window transmittance change, and multispectral feature shift in the vector are substituted into the calculation. The first round of binary classification is completed by threshold comparison between window-attached pollution and non-attached water body interference pollution, and the classification label is output as the input filtering condition for the next layer. If it is determined to be window-attached, the second classification layer calls the corresponding criterion formula to further distinguish between "light attachment / moderate attachment / severe blockage"; if it is determined to be water body interference, the second classification layer distinguishes specific interference types such as "turbidity / strong turbulence / foam / suspension solids surge" based on multispectral features and signal-to-noise ratio. Subsequent Nth classification layers all use the previous layer's classification label and feature vector dimension data as input, and call a dedicated linear criterion to complete the subdivision of binary classification until the final feature classification result is output. This process relies on a real-time feature determination mechanism, abandoning the conventional approach of waiting for data anomalies and then tracing back to the cause, which is lagging behind. It actively senses its own health status by calculating the multi-dimensional time-series features collected by the sensor itself in real time. At the same time, it uses a feature dimension differentiation recognition algorithm to accurately distinguish between two scenarios: window dirt adhesion and water body interference. These two scenarios have similar external manifestations but completely different interference natures: water turbidity, turbulence, foam, and a surge in suspended matter. This allows for the accurate location and reliable differentiation of interference sources.

[0060] In one possible implementation, step S100 further includes:

[0061] Step S160: The core components of the water level monitoring equipment include a ToF sensor, an ultrasonic transducer, and an energy system. The ToF sensor is connected to an embedded processor, which has a built-in lightweight classification model.

[0062] Step S170: The ultrasonic transducer is connected to the outer wall of the pipe via a stainless steel crank and bolts to perform structural fixation and vibration transmission.

[0063] Step S180: The core component is installed in a sealed waterproof housing, and the ToF sensor uses the buoy in the pipe as a target to drive water level detection.

[0064] Specifically, the core hardware components of the water level monitoring equipment include a ToF sensor, an ultrasonic transducer, and a power system that supplies power to the entire device. The ToF sensor is electrically connected to the embedded processor via a communication interface to transmit raw sensing signals such as real-time acquired echo intensity, multispectral features, and window transmittance to the embedded processor. The embedded processor has a pre-installed and trained lightweight classification model that performs hierarchical binary classification recursive calculations on the received time-series feature vectors to achieve real-time determination of sensor status and interference type.

[0065] The ultrasonic transducer is rigidly installed and fixed to the outer wall of the pipe by a stainless steel crank and fastening bolts. The stainless steel crank and bolts form a reliable mechanical connection structure, which not only realizes the stable assembly and positioning of the ultrasonic transducer outside the pipe, but also ensures that the vibration signal inside the pipe can be transmitted to the ultrasonic transducer efficiently and without attenuation, providing auxiliary vibration signals for water level monitoring and anomaly detection.

[0066] All core components, including the ToF sensor, embedded processor, ultrasonic transducer, and energy system, are uniformly installed inside a sealed waterproof shell, achieving waterproof, dustproof, and corrosion-resistant protection for the entire unit and ensuring stable operation in underwater and humid conditions. The ToF sensor's detection end faces the inside of the pipe, using a buoy that rises and falls with the water level as a target. By emitting detection signals and receiving the echo signals reflected by the buoy, it completes real-time detection and driving acquisition of water level distance.

[0067] In one possible implementation, step S300 further includes:

[0068] Step S310: Identify the feature classification result, optionally trigger the orientation processing engine in the embedded processor. If it is the first classification case, execute the signal compensation mechanism to compensate the main ToF ranging signal. The first classification case is a second-order classification that is less than the preset pollution class.

[0069] Step S320: If it is the second category, trigger the corresponding level of self-cleaning mechanism to drive the ultrasonic transducer to perform ultrasonic vibration cleaning. The second category is a second-order category greater than the preset contamination category, and the first-order category is window contamination.

[0070] Specifically, the embedded processor reads the feature classification results output by the lightweight classification model in real time through the feature result parsing interface, compares the first-order and second-order classification values ​​with the preset pollution class threshold, and constructs a first directional processing engine based on the state-signal attenuation correspondence of time-series features and the Lambert-Beer law. It establishes the association between the first directional processing engine and the first classification condition, and simultaneously establishes the interaction between the second directional processing engine and the ultrasonic transducer. When the classification result is found to meet the first classification condition, that is, the second-order classification result is less than the preset pollution class threshold, the first directional processing engine is activated and the signal compensation mechanism is started. Through the attenuation compensation algorithm, the amplitude compensation, time delay correction and signal-to-noise ratio optimization of the main ToF ranging signal are performed, directly correcting the signal attenuation and ranging offset caused by light pollution or interference, and completing the real-time digital compensation of the main ToF ranging signal.

[0071] The embedded processor extracts the first-order and second-order classification quantization values ​​output by the lightweight classification model. It first verifies whether the first-order classification result indicates window contamination, and then compares the second-order classification value with a preset contamination threshold. If it is determined to be a second-order classification case, i.e., the first-order classification indicates window contamination and the second-order classification value is greater than the preset contamination threshold, the corresponding level of self-cleaning mechanism is triggered. The embedded processor matches the second-order classification value with a preset cleaning parameter table to determine the ultrasonic vibration frequency, duration, and driving power. It generates a PWM pulse driving signal, which is then amplified and transmitted to the ultrasonic transducer. The ultrasonic transducer generates high-frequency mechanical vibration according to the set parameters. The vibration is transmitted to the optical window of the ToF sensor through a mechanical connection structure of stainless steel crank and bolts. The cavitation effect of the vibration and the mechanical impact force are used to peel off the window deposits. During the cleaning process, the window transmittance signal of the ToF sensor is collected in real time. When the transmittance recovers to the preset reference value, the embedded processor stops outputting the driving signal, completing the ultrasonic vibration cleaning of the corresponding level.

[0072] In one possible implementation, step S300 further includes:

[0073] Based on the correspondence between state and signal attenuation in time-series characteristics, and according to the Lambert-Beer law, a first directional processing engine is constructed.

[0074] Establish the association between the first orientation processing engine and the first classification case.

[0075] Establish interaction between the second directional processing engine and the ultrasonic transducer.

[0076] Specifically, based on the correspondence between temporal characteristic states and signal attenuation, and combined with the Lambert-Beer law, A=εbc, where A is absorbance, ε is molar absorptivity, b is optical path length, and c is concentration, a first directional processing engine is constructed: taking the window transmittance and signal attenuation in the temporal characteristics collected by the ToF sensor as core variables, the Lambert-Beer law is transformed into a quantitative formula adapted to sensor signal compensation, and a quantitative mapping relationship between the degree of signal attenuation and transmittance loss and pollutant concentration is established, which is then embedded into the first directional processing engine as the core algorithm basis for signal compensation.

[0077] Subsequently, the association between the first orientation processing engine and the first classification case is established: the first classification case, that is, the judgment result of the second-order classification being less than the preset pollution class threshold, is used as the trigger condition for the first orientation processing engine. When the embedded processor recognizes the classification case, it automatically activates the first orientation processing engine, calls the compensation algorithm based on Lambert-Beer's law, calculates the compensation coefficient according to the signal attenuation, and completes the accurate compensation of the main ToF ranging signal.

[0078] Simultaneously, an interaction mechanism is established between the second directional processing engine and the ultrasonic transducer: the second directional processing engine has a built-in ultrasonic drive parameter table for different cleaning levels. When the second classification is determined, the engine matches the corresponding ultrasonic vibration frequency, duration, and power parameters according to the second-order classification value, generates standardized drive commands, and transmits them to the ultrasonic transducer through the electrical interface to drive it to generate high-frequency vibrations with corresponding parameters. At the same time, it receives the vibration status signal fed back by the ultrasonic transducer in real time, realizes dynamic control of the cleaning process, and completes the two-way data interaction and command execution between the second directional processing engine and the ultrasonic transducer.

[0079] In one possible implementation, step S300 further includes:

[0080] In the embedded processor, valid water level monitoring data and ultrasonic cleaning records are determined.

[0081] The effective water level monitoring data and the ultrasonic cleaning record are transmitted back to the water level monitoring control center via the communication bus.

[0082] Specifically, in the embedded processor, the amplitude, time delay and signal-to-noise ratio of the ToF ranging signal are checked. Data that meets the preset accuracy and stability conditions after signal compensation or ultrasonic cleaning is determined to be valid water level monitoring data. At the same time, the triggering conditions, execution time, vibration parameters and execution results of ultrasonic cleaning are recorded in real time to form a standardized ultrasonic cleaning record.

[0083] The embedded processor encapsulates the effective water level monitoring data and ultrasonic cleaning records through the communication bus, encodes the frame format and adds check bits, and then sends the data back to the water level monitoring control center at regular intervals according to the preset communication protocol.

[0084] Example 2, based on the same inventive concept as the ToF-based anti-bioclogging water level monitoring method in the previous examples, such as... Figure 2 As shown, this application provides a Time-of-Flight (ToF)-based anti-bioclogging water level monitoring system. The system and method embodiments in this application are based on the same inventive concept. The system includes:

[0085] The ranging signal acquisition module 10 is used to acquire the main ToF ranging signal through the ToF sensor, and simultaneously collect echo intensity, multispectral characteristics and window transmittance as auxiliary sensing signals.

[0086] The feature classification result output module 20 is used to construct a time-series feature vector based on the auxiliary sensing signal and historical water level data, input it into a lightweight classification model for hierarchical binary classification recursion, and output the feature classification result. The feature classification result includes a first-order classification based on window pollution and water quality pollution, and a second-order classification based on window pollution class.

[0087] The targeted processing mechanism trigger module 30 is used to trigger the targeted processing mechanism based on the feature classification results.

[0088] The targeted processing mechanism includes:

[0089] If it is the first category, the first orientation processing engine is activated to compensate the main ToF ranging signal and determine the valid water level data.

[0090] If it is the second category, the second directional processing engine is activated to make self-cleaning parameter decisions and drive the ultrasonic transducer to perform ultrasonic vibration cleaning, generating a cleaning record.

[0091] Furthermore, the system also includes:

[0092] The ToF sensor periodically emits modulated light pulses and receives water surface echoes. The initial water level is calculated using the echo time difference, serving as the primary ToF ranging signal. The echo intensity of the water surface echo is determined, whereby the echo intensity characterizes the signal attenuation. A low-power multispectral LED is integrated to synchronously acquire the reflection intensity of the target wavelength, determining multispectral characteristics used to identify biofilm types. A low-power internal reference light beam is periodically emitted to acquire the window transmittance of the ToF sensor's optical window, whereby the window transmittance characterizes the degree of contamination adhesion. The echo intensity, multispectral characteristics, and window transmittance are then added to the auxiliary sensing signal.

[0093] Furthermore, the system also includes:

[0094] Using a cleanliness baseline value, the intensity attenuation, window transmittance change, and spectral characteristic change of the auxiliary sensing signal are defined as auxiliary feature sequences. Based on historical water level data, the short-term fluctuation characteristics and long-term drift characteristics of the water level value are explored to determine the signal-to-noise ratio characteristics. Based on the auxiliary feature sequence and the signal-to-noise ratio characteristics, a time-series feature vector is constructed.

[0095] Furthermore, the system also includes:

[0096] Based on historical water level data, reconstruct time-series feature samples; based on the time-series feature samples, randomly extract a first time-series feature vector to construct a first classification layer, wherein the first classification layer performs binary classification of samples using the first time-series feature vector, identifying a first pollution class and a second pollution class based on the binary classification results; construct a second classification layer by randomly extracting a second time-series feature vector; perform multiple rounds of classification layer construction to determine the Nth classification layer, cascade the first classification layer up to the Nth classification layer, and generate the lightweight classification model.

[0097] Furthermore, the system also includes:

[0098] Define a multivariate linear relationship between the state, signal attenuation, and sensor cleanliness of the time-series features, and write it into each classification layer as the contamination criterion for the binary classification result; input the time-series feature vector into the lightweight classification model, perform hierarchical binary classification recursion, and determine the feature classification result.

[0099] Furthermore, the system also includes:

[0100] The core components of the water level monitoring equipment include a ToF sensor, an ultrasonic transducer, and an energy system. The ToF sensor is connected to an embedded processor, which has a built-in lightweight classification model. The ultrasonic transducer is connected to the outer wall of the pipe via a stainless steel crank and bolts, performing structural fixation and vibration transmission. The core components are installed in a sealed waterproof housing, and the ToF sensor uses a buoy inside the pipe as a target for water level detection.

[0101] Furthermore, the system also includes:

[0102] Upon identifying the feature classification result, the directional processing engine within the embedded processor may be triggered. If it is the first classification case, a signal compensation mechanism is executed to compensate the main ToF ranging signal, wherein the first classification case is a second-order classification less than a preset contamination class; if it is the second classification case, a self-cleaning mechanism of the corresponding level is triggered to drive the ultrasonic transducer to perform ultrasonic vibration cleaning, wherein the second classification case is a second-order classification greater than a preset contamination class, and the first-order classification is window contamination.

[0103] Furthermore, the system also includes:

[0104] Based on the correspondence between state and signal attenuation in time-series characteristics, and according to the Lambert-Beer law, a first directional processing engine is constructed; the association between the first directional processing engine and the first classification case is established; and the interaction between the second directional processing engine and the ultrasonic transducer is established.

[0105] Furthermore, the system also includes:

[0106] In the embedded processor, valid water level monitoring data and ultrasonic cleaning records are determined; the valid water level monitoring data and ultrasonic cleaning records are then transmitted back to the water level monitoring control center via a communication bus.

[0107] It should be noted that the order of the embodiments described above is for descriptive purposes only and does not represent the superiority or inferiority of the embodiments. Specific embodiments of this specification have been described above. Furthermore, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0108] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

[0109] This specification and accompanying drawings are merely illustrative examples of this application and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from its scope. Therefore, if such modifications and variations fall within the scope of this application and its equivalents, this application intends to include such modifications and variations.

Claims

1. A method for monitoring water level based on ToF for preventing bio-clogging, characterized in that, The method comprises: obtaining a main ToF ranging signal through a ToF sensor, and synchronously collecting echo intensity, multi-spectral features and window transmittance as auxiliary perception signals; constructing a time-series feature vector based on the auxiliary perception signals and historical water level data, inputting a lightweight classification model for hierarchical binary classification recursion, and outputting a feature classification result, wherein the feature classification result comprises a first-order classification based on window pollution and water quality pollution, and a second-order classification based on the window pollution class; triggering a directional processing mechanism according to the feature classification result; wherein the directional processing mechanism comprises: if it is the first classification case, starting a first directional processing engine, compensating the main ToF ranging signal, and determining effective water level data; if it is the second classification case, starting a second directional processing engine, making a self-cleaning parameter decision, driving an ultrasonic transducer to perform ultrasonic vibration cleaning, and generating a cleaning record.

2. The ToF-based anti-biofouling water level monitoring method of claim 1, wherein, obtaining a main ranging signal through a ToF sensor, and synchronously collecting echo intensity, multi-spectral features and window transmittance as auxiliary perception signals, comprising: periodically emitting modulated light pulses through the ToF sensor and receiving water surface echoes to calculate an initial water level value as the main ToF ranging signal based on the echo time difference; determining the echo intensity of the water surface echoes, wherein the echo intensity represents the degree of signal attenuation; synchronously collecting the reflection intensity of target wavelengths by integrating low-power multi-spectral LEDs to determine multi-spectral features, wherein the multi-spectral features are used to identify biofilm types; periodically emitting a beam of low-power internal reference light to collect the window transmittance of the ToF sensor optical window, wherein the window transmittance represents the pollution attachment condition; adding the echo intensity, multi-spectral features and window transmittance to the auxiliary perception signals.

3. The ToF-based anti-biofouling water level monitoring method of claim 1, wherein, constructing a time-series feature vector based on the auxiliary perception signals and historical water level data, comprising: defining the intensity attenuation, window transmittance change and spectral feature change of the auxiliary perception signals as auxiliary feature sequences based on a clean reference value; mining the short-term fluctuation characteristics and long-term drift characteristics of water level values according to historical water level data to determine a signal-to-noise ratio feature; constructing a time-series feature vector based on the auxiliary feature sequences and the signal-to-noise ratio feature.

4. The ToF-based anti-biofouling water level monitoring method of claim 1, wherein, Before inputting the lightweight classification model, the construction of the lightweight classification model comprises: reconstructing time-series feature samples according to historical water level data; randomly extracting a first time-series feature vector based on the time-series feature samples to construct a first classification layer, wherein the first classification layer performs sample binary classification on the first time-series feature vector to identify a first pollution class and a second pollution class based on the binary classification result; constructing a second classification layer by randomly extracting a second time-series feature vector; performing multi-round classification layer construction to determine an Nth classification layer, cascading the first classification layer to the Nth classification layer to generate the lightweight classification model.

5. The ToF-based anti-biofouling water level monitoring method of claim 4, wherein, defining a multivariate linear relationship of the state-signal attenuation-sensor cleanliness of the time-series feature, and writing it into each classification layer as a pollution class criterion of the binary classification result; inputting the time-series feature vector into the lightweight classification model to perform hierarchical binary classification recursion and determine a feature classification result.

6. The ToF-based anti-biofouling water level monitoring method of claim 1, wherein, The core component of the water level monitoring device comprises a ToF sensor, an ultrasonic transducer and an energy system, wherein the ToF sensor is connected with an embedded processor, and the embedded processor is built-in with a lightweight classification model. The ultrasonic transducer is connected with the outer wall of the pipeline through a stainless steel crank and a bolt to perform structural fixation and vibration conduction. The core component is installed in a sealed waterproof shell, and the ToF sensor drives water level detection with a buoy in the pipeline as a matching target.

7. The ToF-based anti-biofouling water level monitoring method of claim 1, wherein, According to the characteristic classification result, a directional processing mechanism is triggered, including: The characteristic classification result is identified, and a directional processing engine in the embedded processor is optionally triggered. If it is a first classification condition, a signal compensation mechanism is executed to compensate the main ToF ranging signal, wherein the first classification condition is that the second-order classification is less than a preset pollution class. If it is a second classification condition, a corresponding level of self-cleaning mechanism is triggered to drive the ultrasonic transducer to perform ultrasonic vibration cleaning, wherein the second classification condition is that the second-order classification is greater than the preset pollution class, and the first-order classification is window pollution.

8. The ToF-based anti-biofouling water level monitoring method of claim 7, wherein, According to the corresponding relationship between the state-signal attenuation of the time sequence characteristics, a first directional processing engine is constructed according to the Lambert-Beer law; The association between the first directional processing engine and the first classification condition is established; The second directional processing engine interacts with the ultrasonic transducer.

9. The ToF-based anti-biofouling water level monitoring method of claim 1, wherein, In the embedded processor, effective water level monitoring data and ultrasonic cleaning records are determined; Through a communication bus, the effective water level monitoring data and the ultrasonic cleaning records are returned to the water level monitoring central control.

10. A ToF based anti-bio fouling water level monitoring system characterized in that, The system is used to implement the ToF-based anti-bio-clogging water level monitoring method according to any one of claims 1-9, and the system comprises: A ranging signal acquisition module is used to acquire a main ToF ranging signal through a ToF sensor, and to synchronously collect echo intensity, multi-spectral characteristics and window transmittance as auxiliary perception signals; A characteristic classification result output module is used to construct a time sequence feature vector based on the auxiliary perception signals and historical water level data, to input a lightweight classification model for hierarchical two-class recursive, and to output a characteristic classification result, wherein the characteristic classification result comprises a first-order classification based on window pollution and water quality pollution, and a second-order classification based on window pollution class; A directional processing mechanism triggering module is used to trigger a directional processing mechanism according to the characteristic classification result; The directional processing mechanism includes: If it is a first classification condition, a first directional processing engine is started to compensate the main ToF ranging signal to determine effective water level data. If it is a second classification condition, a second directional processing engine is started to make a self-cleaning parameter decision and drive the ultrasonic transducer to perform ultrasonic vibration cleaning to generate a cleaning record.