Online drainage pipe network liquid level prediction method based on authentic platform
By collecting, cleaning, and fusing multi-source data in real time on the Acuity platform, and combining it with the TimesNet deep learning model, accurate real-time monitoring and prediction of liquid levels in drainage pipe networks were achieved. This solved the problem of liquid level prediction in complex environments in existing technologies and improved the intelligent management level of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA THREE GORGES CORPORATION
- Filing Date
- 2025-12-22
- Publication Date
- 2026-04-10
AI Technical Summary
Existing drainage network liquid level prediction technologies are difficult to achieve real-time performance, accuracy, and scalability in complex and widely distributed urban drainage network systems. Traditional mechanistic models or single data-driven methods are also difficult to provide accurate predictions when faced with complex environments.
We adopted an Acuity platform-based approach to collect multi-source data in real time through embedded devices, perform data cleaning, standardization and fusion, train the TimesNet deep learning model, and deploy and infer the model on an edge computing platform to accelerate the prediction process.
It enables accurate real-time monitoring and prediction of liquid levels in drainage pipe networks, supports downstream intelligent scheduling and early warning systems, improves the accuracy, robustness and scalability of prediction, and solves the problems of poor data fusion, insufficient model accuracy and poor real-time performance on site.
Smart Images

Figure CN121835992A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of urban water supply and drainage technology, and specifically to an online prediction method for drainage network liquid levels based on the Acuity platform. Background Technology
[0002] With the continuous intensification of global urbanization, urban population density is increasing daily, leading to a sustained rise in demand for domestic and industrial water. This massive water consumption translates to the daily generation of large amounts of domestic sewage and industrial wastewater, which must be collected, transported, and treated through urban drainage networks. However, current urban drainage systems suffer from the following drawbacks: 1. The urban drainage network is vast and complex: typically composed of main pipes, branch pipes, various pumping stations, and inspection wells, distributed across a large area of the city. The network has a wide radius, numerous branches, and varying burial depths, resulting in significant real-time fluctuations in flow rate, liquid level, and pressure. 2. Environmental and meteorological factors have a significant impact: liquid level fluctuations within the drainage network are often affected by meteorological and environmental factors such as heavy rainfall, temperature, and tides. Especially during rainfall, large amounts of rainwater enter the network, easily causing a sudden increase in water volume and even the risk of overflow. 3. Pipeline aging, sedimentation and potential leaks: Due to their long history or lack of timely maintenance, some cities' old pipelines may have problems such as pipe wall damage, sedimentation and blockage, which can lead to abnormal flow, high or low liquid levels, and increase the difficulty of prediction.
[0003] The aforementioned deficiencies make it impossible to accurately, in real-time, and predictably forecast the liquid level of the entire drainage network, directly impacting the efficiency and safety of urban sewage dispatching and risk management. By predicting the liquid level, timely warnings can be issued when risks such as overflows and backflows are imminent. Furthermore, dispatching optimization and adjustments to pump station start-up and shutdown strategies can be made based on the forecast results, thereby improving the operational efficiency and safety of the entire pipeline system.
[0004] Currently, research on liquid level prediction in drainage pipe networks is quite active in both industry and academia, mainly focusing on the following aspects: Methods based on physical mechanism models: Traditionally, the prediction of liquid level and flow rate in pipe networks relies on mechanistic models established by hydraulic and fluid dynamic equations (such as the Saint-Venant equations), combined with the pipe network topology and boundary conditions (such as pump station operation and rainfall input), to obtain prediction results through numerical solutions. These methods have a solid theoretical foundation, but the model construction is complex, requiring high accuracy in refined pipe network parameters and boundary conditions, and consuming significant computational resources.
[0005] Data-driven or machine learning approaches: With the rapid development of sensor technology and the Internet of Things (IoT), a large number of real-time flow, liquid level, and rainfall monitoring devices have been deployed in urban drainage networks, making data acquisition more convenient. This provides favorable conditions for adopting machine learning or deep learning algorithms. For example, time series prediction models (ARIMA, LSTM, etc.) can be used to predict liquid level data at monitoring points, or regression models such as random forests and XGBoost can be used to predict multi-dimensional input and output data for multiple monitoring points in the network. These methods have significant advantages in reducing the difficulty of model construction, but they have high requirements for data integrity, quality, real-time performance, and feature engineering.
[0006] Hybrid approaches combining physical models and data-driven methods: To leverage the strengths of both mechanistic models and data-driven methods, some researchers have begun to explore integrating the two. This includes embedding compensation terms for uncertainties or unknown disturbances into physical models, or embedding constraints on the hydraulic mechanisms of pipe networks into data-driven models. This hybrid modeling approach can improve prediction accuracy to some extent and exhibit better adaptability to dynamic changes in the external environment.
[0007] In summary, existing drainage network liquid level prediction technologies cannot meet the demands for real-time performance, accuracy, and scalability. Traditional mechanistic models or single data-driven methods struggle to achieve optimal results in all scenarios. Therefore, relying on modern data platforms for multi-source data fusion and intelligent prediction has become an industry trend. Summary of the Invention
[0008] The purpose of this invention is to provide an online prediction method for drainage pipe network liquid levels based on the Acuity platform. This method aims to solve the problem of accurate prediction and real-time monitoring of drainage pipe network liquid levels in complex and widely distributed urban drainage pipe network systems, thereby providing support for downstream intelligent scheduling or early warning systems.
[0009] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for online prediction of liquid level in drainage pipe networks based on the Acuity platform includes the following steps: Step S1, Liquid level data acquisition, transmission and preprocessing; including: Step S1.1: Real-time data acquisition is performed using embedded devices on the Acuity platform. Data is obtained from various monitoring points in the drainage network and transmitted to the data processing system of Acuity and the X86 platform. Step S1.2: Perform data preprocessing, which includes cleaning, standardization, and fusion. Step S2: Build an online prediction model for the liquid level of the drainage network based on TimesNet deep learning using the X86 platform, and train the online prediction model for the liquid level of the drainage network. Use an adaptive optimization algorithm to dynamically adjust the learning rate and weight parameters, and continuously minimize the loss function through backpropagation until the set training conditions are met. Step S3, Acuity platform model deployment and inference acceleration; including model format conversion and quantization, model and engineering deployment, real-time data acquisition and preprocessing, and NPU inference acceleration and prediction output, ultimately achieving real-time prediction of drainage network liquid level, providing support for downstream intelligent scheduling or early warning systems.
[0010] The data preprocessing process in step S1.2 above includes: Step S1.2.1: Data cleaning; outlier data and missing values are removed using a method based on quartiles and interquartile range (IQR). Step S1.2.2: Data standardization; unifying the format of different types of monitoring data, and performing unit conversion, etc. Step S1.2.3: Data fusion; Integrate multi-source data to provide high-quality input for subsequent model training and prediction.
[0011] After the data preprocessing in step S1 above, the following also needs to be performed: Step S1.3, Tool Development: Solidification and Coding of Preprocessing Process. Solidify the data preprocessing process and transform it into a reusable tool. Codify and implement it to form an efficient library file. These tools will be widely used in subsequent training on the X86 platform and real-time inference on the Acuity platform.
[0012] The aforementioned tool development, specifically the preprocessing workflow solidification and coding implementation, includes: Step S1.3.1: Solidify the preprocessing process; encapsulate each step of data preprocessing into a modular, reusable code library to ensure the efficiency and stability of the code; Step S1.3.2, Accelerating computation: To improve the computational efficiency of the preprocessing process, parallel computing and the OpenBLAS high-efficiency mathematical operation library are used to optimize the data processing process and improve the processing speed. Step S1.3.3, Library file generation: Package all data preprocessing tools into library files, such as dynamic link libraries (DLLs) and shared libraries (.so), for use when training models on the X86 platform, and also for use when performing real-time inference on the Acuity platform.
[0013] The specific process of step S2 above includes: Step S2.1: Establish an online prediction model for the liquid level of the drainage network based on TimesNet deep learning; Suppose the object of prediction is a time series of liquid levels at a certain monitoring point, and its multivariate input features are defined as follows: ; in: Indicates time The liquid level value; Indicates flow characteristics; Indicates rainfall characteristics; This represents a meteorological feature vector, including temperature, humidity, and wind speed; The model input-output relationship is constructed using a sliding time window method: ; in: Input the time step for history; To predict the time step; For the future Predicted liquid level at each moment; The TimesNet model extracts multi-scale periodic features of time series through frequency domain transformation, represents the time series as multiple periodic subsequences, and completes the modeling of complex time series structures through a multi-scale feature fusion mechanism, thereby improving the prediction ability of long-period changes and abrupt changes. Step S2.2: Data loading and preprocessing; Step S2.3: Training data organization; Based on the requirements of the prediction task, select an appropriate input-output structure, such as inputting multivariate data from the past N hours to predict the liquid level in the next T hours; further divide the data into training set, validation set and test set to ensure the representativeness and generalization ability of the model training; Based on the requirements of the liquid level prediction task, the following training sample set is constructed: ; The dataset is divided into three sets in chronological order: training set (70%), validation set (15%), and test set (15%). This division method ensures the evaluation of the model's generalization ability on unseen data. Step S2.4, Model Training and Parameter Optimization: Train the online prediction model for the liquid level of the drainage pipe network on the X86 platform; accelerate the optimization of model parameters by using GPU or multi-threaded parallel computing resources; adopt adaptive optimization algorithms, such as Adam and SGD, to dynamically adjust the learning rate and weight parameters, and continuously minimize the loss function through backpropagation. Step S2.5: Dynamic adjustment during training; During training, continuously monitor the loss function on the training set and validation set, and combine early stopping, dynamic learning rate adjustment and other mechanisms to avoid model overfitting or underfitting. Step S2.6, Evaluation of Training Results. After training is completed, common regression evaluation metrics are used to comprehensively evaluate the model performance, including but not limited to: mean squared error (MSE), root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²). These metrics are used to evaluate the model's prediction accuracy and generalization ability on the validation and test sets, ensuring that the model meets deployment requirements. After training, the model performance was evaluated using the following metrics: Mean Square Error (MSE): ; Root Mean Square Error (RMSE): ; Mean Absolute Error (MAE): ; Coefficient of determination R²: ; When the prediction error of the model on the test set meets the preset threshold requirement, the model is considered to be ready for engineering deployment.
[0014] The specific process of step S2.2 above is as follows: By calling the data preprocessing tool described in step S1.3.3, the following processing flow is performed on the raw monitoring data: Missing value handling: Use linear interpolation or sliding window mean to fill in missing data; Outlier correction: Truncate or replace liquid level and flow rate data that exceed physical thresholds; Normalization: Perform a standardization transformation on each feature: ; in and These are the mean and standard deviation of the training set, respectively. The preprocessed data is stored in chronological order as standardized multivariate time series samples for model training and validation.
[0015] The specific process of step S2.4 above is as follows: On x86 architecture computing platforms, GPU or multi-threaded CPU resources are used to train the model; The model parameters are optimized by minimizing the prediction error loss function, which is defined as: ; in: This is the actual liquid level value; Predict liquid level values for the model; The model parameters are updated using the Adam adaptive optimization algorithm: ; in: These are model parameters; The learning rate; , This provides estimates for first- and second-order momentum.
[0016] During the training process in step S2.5 above, the changes in the loss of the training set and the validation set are monitored in real time. When the validation set loss no longer decreases within a certain number of consecutive training cycles, an early stopping mechanism is triggered to terminate training. Simultaneously, the learning rate is automatically adjusted based on the changes in the validation set loss. ; in This mechanism effectively prevents model overfitting and improves model stability.
[0017] Step S3 above includes the following steps: Step S3.1, Model Format Conversion and Quantization. Using the Acuity-toolkit, the .pt format model file generated during training on the X86 platform is imported and converted. Model quantization is then performed to generate a .np model file adapted for the Acuity platform. This step effectively reduces model size and improves inference efficiency on embedded devices. Step S3.2, Model and Project Deployment: Import the .np model file and related project files into the Khadas VIM3 edge computing platform to deploy the model in the target hardware environment; ensure the compatibility of the model files, project configuration, and runtime environment; Step S3.3, Real-time data acquisition and preprocessing: Real-time data acquisition of the drainage network site is carried out through the Khadas VIM3 edge computing platform, and the data preprocessing library file generated in step S1.3.3 is called to standardize, clean and extract features from the acquired multi-source raw data to obtain processed data that meets the model input requirements. Step S3.4, NPU Inference Acceleration and Prediction Output: The preprocessed data is input into the deployed model project, and the NPU (Neural Processing Unit) of the Khadas VIM3 platform is called to accelerate model inference, realizing real-time prediction of the liquid level in the drainage network. The system can output the prediction results in real time and provide support for downstream intelligent scheduling or early warning systems.
[0018] The data collected in step S1.1 above from various monitoring points in the drainage network include liquid level, flow rate, and rainfall data.
[0019] The online liquid level prediction method for drainage pipe networks based on the Acuity platform mentioned in this invention solves the following technical problems: 1. The problem of fusing and processing multi-source heterogeneous data: Predicting liquid levels in urban drainage networks requires integrating data from various sensors, including information on liquid level, flow rate, rainfall, and weather. These data come from diverse sources and are in different formats; efficiently fusing and processing them in real time is one of the key challenges addressed in this patent. The Acuity platform, as an embedded deployment framework, can efficiently integrate and process data from different data sources, ensuring the real-time nature and accuracy of the data.
[0020] 2. Issues with the accuracy of liquid level prediction in complex pipe network environments: Urban drainage networks are complex in structure, and liquid level prediction is affected not only by various factors such as network layout, flow distribution, and rainwater impact, but also by issues such as network aging, blockage, and sedimentation. Traditional physical models or simple data-driven methods may struggle to provide accurate predictions in such complex environments. Therefore, this patent combines the embedded deployment capabilities of the Acuity platform with advanced prediction algorithms to provide an accurate and efficient liquid level prediction solution, improving prediction accuracy and robustness.
[0021] 3. Real-time performance and dynamic adaptability issues: The changes in water levels in drainage pipe networks are highly real-time, especially under extreme weather conditions such as rainfall and tides, where water levels fluctuate dramatically. Acquiring real-time data and making immediate predictions to respond to emergencies is a major technical challenge. The embedded deployment framework provided by the Acuity platform can perform real-time data acquisition and processing in the pipe network monitoring environment. Combined with dynamically optimized prediction models, it has the ability to respond to emergencies and adjust predictions accordingly.
[0022] 4. Model engineering deployment and real-time inference efficiency issues Most existing models are limited to servers or PCs, making it difficult to quickly adapt to embedded / edge devices in the field. This results in high inference latency, untimely response, and poor engineering portability. There is a need to address the automated conversion, quantization, and inference acceleration of models from training to edge platforms (such as Acuity+NPU) to achieve real-time intelligent prediction of liquid levels in the field.
[0023] 5. Rapid Deployment and Scalability: Existing drainage network prediction systems often require significant time and resources during deployment, and their scalability is poor when facing different types of pipe networks or complex environments. The Acuity platform, as an embedded framework, can be quickly integrated into existing pipe network monitoring systems and has excellent scalability, supporting the access of multiple prediction models and data sources, facilitating future system upgrades and optimizations.
[0024] This invention achieves efficient acquisition, cleaning, standardization, and fusion of multivariate heterogeneous data such as liquid level, flow rate, and rainfall, laying a data foundation for accurate prediction and improving the real-time fusion and processing capabilities of multi-source data. It introduces the TimesNet long-term multivariate prediction model, adapted to complex scenarios, significantly improving the accuracy, robustness, and adaptability of liquid level prediction. It achieves automated format conversion, quantization, and efficient deployment of the model on edge devices, utilizing toolchains such as Acuity-toolkit and NPU inference to meet the demands of real-time on-site prediction and high performance. It provides a standardized tool library and engineering support, facilitating system expansion, rapid deployment, and subsequent intelligent scheduling and linkage, thereby improving the intelligent and automated management level of large-scale drainage networks. In summary, this patent solves key technical problems in existing technologies such as inadequate data fusion, insufficient model accuracy and adaptability, poor on-site real-time performance, and weak system scalability, constructing an efficient, intelligent, and scalable liquid level prediction technology system suitable for complex drainage networks. Attached Figure Description
[0025] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a flowchart illustrating the online liquid level prediction method for drainage pipe networks based on the Acuity platform according to the present invention. Detailed Implementation
[0026] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and embodiments.
[0027] Example 1: like Figure 1 As shown, the present invention provides a technical solution, a method for online prediction of liquid level in drainage pipe networks based on the Acuity platform, comprising: Part 1: Liquid Level Data Acquisition, Transmission, Preprocessing, and Tool Development Step S1: Liquid level data acquisition and transmission.
[0028] S1 includes the following sub-steps: Step S101: Liquid Level Data Acquisition. Real-time data acquisition is performed using embedded devices on the Acuity platform to ensure efficient and stable acquisition of data from various monitoring points in the drainage network (such as liquid level, flow rate, rainfall, etc.). The Acuity platform integrates with various sensors to achieve real-time collection of multi-source heterogeneous data.
[0029] Step S102, Data Transmission. The data collected by the sensor is transmitted in real time to the data processing system of Acuity and the X86 platform via IoT technology or a dedicated network for subsequent data preprocessing.
[0030] Step S2: Optimize the data preprocessing workflow. The collected data is often heterogeneous, coming from sensors of different brands and models, resulting in inconsistencies in format, accuracy, and sampling frequency. Therefore, the data needs preprocessing operations such as cleaning, standardization, and fusion to ensure data quality and consistency. S2 includes the following sub-steps: Step S201: Data cleaning. Outlier data and missing values are removed using methods based on quartiles and interquartile range (IQR).
[0031] Step S202: Data Standardization. This involves standardizing the format of different types of monitoring data and performing unit conversions, etc.
[0032] Step S203: Data Fusion. Integrate multi-source data to provide high-quality input for subsequent model training and prediction.
[0033] Step S3, Tool Development: Solidification and Coding of the Preprocessing Workflow. At this stage, the aforementioned data preprocessing workflow needs to be solidified and transformed into reusable tools, which are then coded and implemented to form efficient library files. These tools will be widely used in subsequent x86 platform training and Acuity platform real-time inference.
[0034] S3 includes the following sub-steps: Step S301: Solidify the preprocessing workflow. Encapsulate each step of data preprocessing into a modular, reusable codebase to ensure code efficiency and stability.
[0035] Step S302, Accelerating Operations. To improve the operational efficiency of the preprocessing process, parallel computing and the OpenBLAS high-efficiency mathematical operation library are used to optimize the data processing process and increase the processing speed.
[0036] Step S303: Library file generation. Package all data preprocessing tools into library files (dynamic link libraries DLLs and shared libraries .so), for use when training models on the x86 platform, and also for use when performing real-time inference on the Acuity platform.
[0037] 2. Part Two: Model Training and Optimization on the X86 Platform Step S4: Model training and optimization on the X86 platform.
[0038] S4 includes the following sub-steps: Step S401: Selection of Long-Term Time Series Prediction Model. For long-term time series prediction problems, a model capable of processing time series data is required. Common models include XGBoost (Gradient Boosting Tree), ARIMA (Autoregressive Integral Moving Average), and LSTM (Long Short-Term Memory). Due to the complex, multivariate, and highly variable nature of pipeline liquid level data, along with its significant trends and diverse periods, the TimesNet model is chosen to achieve multi-scale dynamic capture and multivariate feature support, ensuring the model's robustness and scalability in complex scenarios.
[0039] Suppose the object of prediction is a time series of liquid levels at a certain monitoring point, and its multivariate input features are defined as follows: ; in: Indicates time The liquid level value; Indicates flow characteristics; Indicates rainfall characteristics; This represents meteorological feature vectors, including temperature, humidity, wind speed, etc.
[0040] The model input-output relationship is constructed using a sliding time window method: ; in: Input the time step for history; To predict the time step; For the future The predicted liquid level at each moment.
[0041] The TimesNet model extracts multi-scale periodic features of time series through frequency domain transformation, represents the time series as multiple periodic subsequences, and completes the modeling of complex time series structures through a multi-scale feature fusion mechanism, thereby improving the prediction ability of long-period changes and abrupt changes.
[0042] Step S402: Data Loading and Preprocessing. The data preprocessing tool from S303 is invoked to load and standardize the historical dataset, which includes multivariate features such as liquid level, flow rate, rainfall, and weather conditions. A sliding window approach is used to segment the historical time-series data according to a set time step, constructing the training input and prediction target.
[0043] By invoking the data preprocessing tool described in step S303, the following processing procedure is performed on the raw monitoring data: Missing value handling: Use linear interpolation or sliding window mean to fill in missing data; Outlier correction: Truncate or replace liquid level and flow rate data that exceed physical thresholds; Normalization: Perform a standardization transformation on each feature: ; in and These are the mean and standard deviation of the training set, respectively.
[0044] The preprocessed data is stored in chronological order as standardized multivariate time series samples for model training and validation.
[0045] Step S403: Training Data Organization. Based on the requirements of the prediction task, select an appropriate input / output structure (e.g., inputting multivariate data from the past N hours to predict the liquid level in the next T hours). Further divide the data into training, validation, and test sets to ensure the representativeness and generalization ability of the model training.
[0046] Based on the requirements of the liquid level prediction task, the following training sample set is constructed: ; The dataset is divided into three sets in chronological order: training set (70%), validation set (15%), and test set (15%). This division method ensures the evaluation of the model's generalization ability on unseen data.
[0047] Step S404: Model Training and Parameter Optimization. Train the selected long-term time-series prediction model on the x86 platform. Utilize GPU or multi-threaded parallel computing resources to accelerate model parameter optimization. Employ adaptive optimization algorithms (such as Adam or SGD) to dynamically adjust the learning rate and weight parameters, continuously minimizing the loss function through backpropagation.
[0048] On x86 architecture computing platforms, GPU or multi-threaded CPU resources are used to train the model. The model parameters are optimized by minimizing the prediction error loss function, which is defined as: ; in: This is the actual liquid level value; To predict liquid level values for the model.
[0049] The model parameters are updated using the Adam adaptive optimization algorithm: ; in: These are model parameters; The learning rate; , This provides estimates for first- and second-order momentum.
[0050] Step S405: Dynamic Adjustment During Training. During training, the loss function on the training and validation sets is continuously monitored. Mechanisms such as early stopping and dynamic learning rate adjustment are used to avoid overfitting or underfitting of the model.
[0051] During training, the changes in the loss of the training and validation sets are monitored in real time. When the validation set loss no longer decreases over several consecutive training epochs, an early stopping mechanism is triggered to terminate training. Simultaneously, the learning rate is automatically adjusted based on changes in the validation set loss. ; in This mechanism effectively prevents model overfitting and improves model stability.
[0052] Step S406: Evaluation of Training Results. After training is completed, common regression evaluation metrics are used to comprehensively evaluate the model performance, including but not limited to: mean squared error (MSE), root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²). These metrics are used to evaluate the model's prediction accuracy and generalization ability on the validation and test sets, ensuring that the model meets deployment requirements.
[0053] After training, the model performance was evaluated using the following metrics: Mean Square Error (MSE): ; Root Mean Square Error (RMSE): ; Mean Absolute Error (MAE): ; Coefficient of determination R²: ; When the prediction error of the model on the test set meets the preset threshold requirement, the model is considered to be ready for engineering deployment.
[0054] Through the above-mentioned model establishment, training and optimization methods, this application realizes high-precision long-term time-series prediction of drainage network liquid level on the X86 platform, providing a reliable prediction basis for subsequent scheduling decisions and overflow early warning, thereby effectively solving the technical problem in the prior art that it is difficult to take into account the long time span and multivariate complexity.
[0055] 3. Part Three: Accelerating Model Deployment and Inference on the Acuity Platform Step S5: Accelerate model deployment and inference on the Acuity platform.
[0056] S5 includes the following sub-steps: Step S501: Model Format Conversion and Quantization. Using the Acuity-toolkit, import and convert the .pt format model file generated during training on the X86 platform, perform model quantization, and generate a .np model file adapted for the Acuity platform. This step effectively reduces model size and improves inference efficiency on embedded devices.
[0057] Step S502, Model and Project Deployment. Import the .np model file and related project files into the Khadas VIM3 edge computing platform to deploy the model on the target hardware environment. Ensure the compatibility of the model files, project configuration, and runtime environment.
[0058] Step S503: Real-time data acquisition and preprocessing. Real-time data acquisition of the drainage network is performed using the Khadas VIM3 edge computing platform. The data preprocessing library file generated in step S303 is then called to standardize, clean, and extract features from the acquired multi-source raw data to obtain processed data that meets the model input requirements.
[0059] Step S504: NPU Inference Acceleration and Prediction Output. The preprocessed data is input into the deployed model project, and the NPU (Neural Processing Unit) of the Khadas VIM3 platform is invoked to accelerate model inference, enabling real-time prediction of the drainage network liquid level. The system can output the prediction results in real time and provide support for downstream intelligent scheduling or early warning systems.
[0060] This invention, based on the Acuity platform, presents a method for predicting the liquid level in drainage pipe networks. It innovatively proposes an integrated technical solution encompassing the entire process from data acquisition, preprocessing, tool development, model training and optimization to efficient model deployment and inference acceleration. The main content and principles include: (I) Integrated design and tool standardization throughout the entire process 1. Efficient acquisition and standardized transmission of heterogeneous multi-source liquid level data By utilizing embedded devices on the Acuity platform, multi-source monitoring data such as liquid level, flow rate, and rainfall are collected in real time and stably, and transmitted efficiently through a dedicated IoT network, laying the foundation for subsequent intelligent processing.
[0061] 2. Solidification of data preprocessing workflow and development of high-performance tools The preprocessing steps such as data cleaning, standardization, and fusion are solidified into a standard process. Through efficient coding, parallel computing, and mathematical libraries such as OpenBLAS, it is accelerated to form an efficient and universal library file (supporting .so and DLL formats), enabling high-performance reuse of data preprocessing on different hardware platforms (X86 and Acuity embedded platform).
[0062] (II) Model innovation and optimization for long-term, multivariate liquid level prediction 3. Selection and Training Methods for Long-Term Prediction Models in Complex Pipeline Network Liquid Level Scenarios In response to the characteristics of drainage network liquid level data, which are "multi-variable, with significant changing trends and diverse periods", the TimesNet model is innovatively adopted for multi-scale dynamic capture, which supports joint modeling and prediction of complex time series data and significantly improves the robustness and generalization ability of the model.
[0063] By utilizing the sliding window method and dynamic input / output structure design, accurate prediction of future multi-step liquid levels based on historical data can be achieved.
[0064] 4. Multi-level, multi-strategy model optimization and evaluation system By combining automated hyperparameter tuning, cross-validation, dynamic learning rate adjustment, and early stopping mechanisms, the optimal performance of the model is ensured. The model's effectiveness is scientifically evaluated using multiple regression evaluation metrics (MSE, RMSE, MAE, R²) to guarantee its practical deployment value.
[0065] (III) Efficient Embedded Inference Deployment and Edge Intelligence 5. Model format conversion, quantization, and efficient embedded inference acceleration solutions Based on the Acuity-toolkit, it enables automatic conversion and quantization of .pt models to .np models, greatly reducing model size and improving running speed. It is specifically adapted to the Acuity platform and edge devices (such as Khadas VIM3).
[0066] On the embedded platform, the NPU (Neural Processing Unit) enables efficient model inference, meeting the real-time liquid level prediction requirements under complex operating conditions of drainage pipe networks.
[0067] 6. End-to-end efficient closed-loop operation mechanism It achieves full-process automation and efficient closed-loop from data acquisition, preprocessing, model prediction to prediction result output, facilitating seamless integration with on-site intelligent operation and maintenance, scheduling and early warning systems.
[0068] (iv) Portability, scalability and engineering support 7. High reusability and portability of data and modeling tools The data preprocessing library, model training methods, and inference engine support multi-platform operation, facilitating rapid deployment and expansion in different projects and hardware environments.
[0069] In urban water supply and drainage technology, intelligent monitoring and prediction of drainage pipe networks is a core component of smart water management and refined urban management. Traditional methods rely heavily on decentralized data collection and manual operation and maintenance, facing practical challenges such as numerous monitoring points, heterogeneous data, and heavy operational pressure. In recent years, with the advancement of technologies such as the Internet of Things, big data, and AI chips, the demand for high-precision, low-latency prediction of pipe network liquid levels and intelligent edge inference has continued to rise.
[0070] Comparison of Acuity platform with mainstream AI platforms: Acuity platform is positioned as a lightweight, highly integrated embedded AI deployment solution, with the following advantages: ① Supports importing and quantizing models from various AI frameworks (such as PyTorch and ONNX). ② Built-in model acceleration and parallel computation optimization ③ Compatible with various edge computing hardware such as NPU, GPU, and FPGA Compared to platforms such as TensorFlow Lite, NCNN, and OpenVINO, Acuity places greater emphasis on the customization and industrial applicability of the entire toolchain (such as automatic generation of dynamic libraries, one-click model deployment, and compatibility with hardware from multiple manufacturers), making it easier for large-scale practical deployment.
[0071] In practical application scenarios, the usage process includes: ① Deploy Acuity embedded devices at key nodes of the municipal drainage network to achieve high-frequency collection of liquid level, flow rate, and rainfall.
[0072] ② The backend server or edge node periodically synchronizes the latest sensor data and uses fixed library files to complete data cleaning, standardization, and feature fusion.
[0073] ③ The model is trained using an X86 server, the inference engine is sent to the field equipment, and the NPU outputs liquid level predictions in real time, supporting automatic scheduling of pump station start-up and shutdown.
[0074] Early warning and dispatch linkage: When an abnormal liquid level or overflow risk is predicted, it automatically triggers SMS, App push or remote linkage of pump station, effectively improving the speed of emergency response.
[0075] The working principle of the liquid level prediction model of this invention is as follows: The changes in liquid level at monitoring points in urban drainage networks are essentially the result of the combined effects of rainfall input, network transport capacity, and the cumulative effect of historical water volume. Based on the above objective mechanism, this application models multi-source time-series data such as liquid level, flow rate, and rainfall to predict future liquid level change trends. Its working principle is as follows.
[0076] (a) The intrinsic relationship between liquid level, flow rate and rainfall 1. Mechanism of Rainfall's Influence on Liquid Level Rainfall is the primary external driver of water volume changes in drainage systems. The amount and temporal distribution of rainfall determine the inflow intensity and duration into the pipe network. After rainfall begins, as rainwater flows into the pipe network, the water level at monitoring points shows an upward trend; after rainfall ends, the water level gradually recedes as drainage continues. Therefore, historical and current rainfall data can characterize the external excitation conditions for water level changes.
[0077] 2. The constraining effect of flow rate on liquid level Pipeline flow rate reflects the pipeline's transport and discharge capacity. When the flow rate approaches or exceeds the pipeline's design capacity, water stagnates within the network, causing the liquid level to rise; conversely, when downstream discharge is smooth and the flow rate increases, the liquid level may drop. Therefore, flow rate data characterizes the pipeline network's operating status and drainage capacity, directly constraining changes in liquid level.
[0078] 3. Memory effect of historical liquid level Liquid level changes exhibit significant time correlation and lag characteristics. The current liquid level is not only related to immediate rainfall but also closely related to the water storage situation in the previous period. By incorporating historical liquid level sequences, the model can learn the dynamic response characteristics of the pipeline network under different operating conditions.
[0079] (II) Prediction Principles Based on Multivariate Time Series Modeling This application uniformly represents data such as liquid level, flow rate, and rainfall as multivariate time series input: ; in: For a moment The liquid level; This represents the pipeline flow rate at the corresponding time. This represents the rainfall at the corresponding time.
[0080] By constructing a sliding time window, continuous Historical data at each point in time is used as model input: ; The model automatically extracts the following information by learning the mapping relationship between historical input sequences and future liquid levels: The rise and fall patterns of liquid level under different rainfall intensities and durations; The regulatory effect of flow rate changes on liquid level fluctuations; The coupling relationship and lag characteristics between multiple variables over time.
[0081] (III) Mechanism of Long-Term Forecasting Models During model training, the model is continuously compared with the actual monitored liquid level by comparing the error, and the model parameters are iteratively updated. This allows the model to gradually form a numerical expression of the "input-response" relationship of the pipeline network. This process is equivalent to learning the comprehensive operating characteristics of the pipeline system without explicitly establishing the hydrodynamic equations, thereby enabling the prediction of future liquid level change trends.
[0082] When new rainfall and flow data are input into the model, the model can combine the current liquid level status with learned historical patterns to output liquid level prediction results for multiple future times.
[0083] (iv) Technical effects Based on the above working principle, this application can achieve continuous and stable prediction of drainage network liquid level without the need for precise pipeline geometric parameters and complex hydraulic calculations, relying only on historical liquid level, flow rate and rainfall data, thus providing a reliable basis for overflow early warning and scheduling decisions.
[0084] In addressing the issue of insufficient data integration, existing drainage network monitoring and forecasting technologies typically rely on a variety of sensors, including level gauges, flow meters, rain gauges, and weather stations.
[0085] The common practice among existing technicians is to collect, store, and use data from various sensors separately; different monitoring points and equipment manufacturers use different data sampling frequencies, data formats, and physical quantity expression methods; and the data is mainly used for single-point monitoring or post-event statistical analysis.
[0086] In this technological context, current technical personnel typically focus on improving sensor accuracy or enhancing the predictive capabilities of single models, rather than on the unified processing of multi-source data across devices, types, and time scales. Therefore, existing technologies struggle to support real-time fusion and collaborative modeling of multi-source heterogeneous data.
[0087] The technical principles of this invention, namely data cleaning, standardization, and fusion, are as follows: With the goal of improving model usability and meeting real-time prediction needs, the data is systematically reconstructed, including: 1. Data cleaning mechanism based on physical constraints This application introduces physical constraints of drainage network operation (such as upper and lower limits of liquid level and flow capacity threshold) into the data cleaning process to identify and correct abnormal data, so that the cleaning results conform to the actual working conditions, rather than simply statistical filtering.
[0088] 2. Standardization Processing for Multivariable Modeling By standardizing data with different dimensions and fluctuation amplitudes, variables such as liquid level, flow rate, and rainfall can be compared and jointly modeled in the same numerical space, avoiding the dominance of a single high-amplitude variable in the model training process.
[0089] 3. Time-aligned data fusion mechanism To address the issue of inconsistent sampling frequencies among multiple data sources, this application uses time resampling and sliding window alignment to map data from different sources onto a unified time axis, forming synchronous multivariate time series samples. This enables the model to learn the temporal coupling relationships between the variables.
[0090] 4. Data Structure Restructuring for Prediction Tasks The fused data no longer exists in the form of "sensor data streams," but is reconstructed into a "historical input - future output" prediction sample structure, enabling it to directly serve the training and inference of the liquid level prediction model.
Claims
1. A sewer network liquid level online prediction method based on acuity platform, characterized in that, The method comprises the following steps: Step S1, liquid level data acquisition, transmission and preprocessing; Comprise: Step S1.1, real-time data acquisition through the embedded device of the acuity platform, obtaining data from each monitoring point in the drainage pipe network and transmitting the data to the data processing system of the acuity and X86 platforms; Step S1.2, data preprocessing, including cleaning, standardization and fusion; Step S2, using the X86 platform to establish a TimesNet deep learning-based online prediction model for the liquid level of the drainage pipe network, and training the online prediction model for the liquid level of the drainage pipe network, using an adaptive optimization algorithm to dynamically adjust the learning rate and weight parameters, and continuously minimizing the loss function through back propagation until the set training conditions are met; Step S3, acuity platform model deployment and inference acceleration; including model format conversion and quantization, model and engineering deployment, real-time data acquisition and preprocessing, NPU inference acceleration and prediction output, and finally realizing real-time prediction of the liquid level of the drainage pipe network to support the downstream intelligent scheduling or early warning system.
2. The sewer network liquid level online prediction method based on the acuity platform according to claim 1, characterized in that, The data preprocessing process in step S1.2 comprises: Step S1.2.1, data cleaning; using a method based on quartiles and interquartile range IQR to remove abnormal data and fill in missing values; Step S1.2.2, data standardization; unifying the formats of different types of monitoring data and performing unit conversion; Step S1.2.3, data fusion; integrating multi-source data to provide high-quality input for subsequent model training and prediction.
3. The method of claim 1, wherein, After the data preprocessing of step S1, the following step S1.3 is required: Step S1.3, tool development: preprocessing process solidification and coding implementation, solidifying the data preprocessing process and converting it into reusable tools for coding implementation to form library files.
4. The method of claim 3, wherein, The tool development: preprocessing process solidification and coding implementation specifically comprises: Step S1.3.1, solidify the preprocessing process; encapsulate each step of data preprocessing into a modular and reusable code library to ensure the efficiency and stability of the code; Step S1.3.2, operation acceleration; to improve the operation efficiency of the preprocessing process, use parallel computing and OpenBLAS high-efficiency mathematical operation library technology to optimize the data processing process and improve the processing speed; Step S1.3.3, library file generation; package all data preprocessing tools into library files for use when training models on the X86 platform and for calling when performing real-time inference on the Acuity platform.
5. The sewer network liquid level online prediction method based on the acuity platform according to claim 4, characterized in that, The specific process of step S2 comprises: Step S2.1, establishing a TimesNet deep learning-based online prediction model for the liquid level of the drainage pipe network; The multivariate input features of the prediction object, the liquid level time series of a monitoring point, are defined as follows: ; wherein: represents a liquid level value at a time instant ; represents a flow rate characteristic; represents a rainfall characteristic; represents a weather-related characteristic vector, including air temperature, humidity, and wind speed, etc. The model input-output relationship is constructed using a sliding time window method: ; wherein: is the historical input time step; is the prediction time step; is the future level prediction value for the time instant. The TimesNet model extracts multi-scale periodic features of the time series through frequency domain transformation, represents the time series as multiple periodic subsequences, and completes modeling of complex time series structures through a multi-scale feature fusion mechanism, thereby improving the prediction ability for long-period changes and sudden changes; Step S2.2, data loading and preprocessing; Step S2.3, training data organization; according to the requirements of the prediction task, select the appropriate input-output structure; further divide the data into training set, validation set and test set to ensure the representativeness and generalization ability of model training; According to the requirements of the liquid level prediction task, the following training sample set is constructed: ; And divided into: training set, validation set and test set in chronological order; Step S2.4, model training and parameter optimization; train the sewer network liquid level online prediction model on the X86 platform; use GPU or multi-thread parallel computing resources to speed up model parameter optimization; use adaptive optimization algorithm to dynamically adjust learning rate and weight parameters, and continuously minimize loss function through back propagation; Step S2.5, dynamic adjustment of training process; during the training process, continuously monitor the loss function on the training set and the validation set, and combine early stopping, dynamic learning rate adjustment and other mechanisms to avoid model overfitting or underfitting; Step S2.6, training result evaluation; after training, use common regression evaluation indicators to comprehensively evaluate the model performance, including but not limited to: mean square error MSE, root mean square error RMSE, mean absolute error MAE and determination coefficient R². Through the above indicators, the prediction accuracy and generalization ability of the model on the validation set and the test set are judged to ensure that the model meets the deployment requirements; After training, the following indicators are used to evaluate the performance of the model: Mean square error MSE: ; Root mean square error RMSE: ; Mean absolute error MAE: ; Determination coefficient R²: ; When the prediction error of the model on the test set meets the preset threshold requirements, it is considered that the model has engineering deployment conditions.
6. The sewer network liquid level online prediction method based on the acuity platform according to claim 5, characterized in that, The specific process of step S2.2 is: By calling the data preprocessing tool described in step S1.3.3, the following processing procedures are performed on the original monitoring data: Missing value processing: linear interpolation or sliding window mean is used to fill in missing data; Abnormal value correction: truncate or replace the liquid level and flow data that exceed the physical threshold; Normalization processing: standardize the transformation of each feature: ; wherein and are the mean and standard deviation of the training set, respectively; The preprocessed data is stored as a standardized multivariate time series sample in chronological order for model training and validation.
7. The sewer network liquid level online prediction method based on the acuity platform according to claim 5, characterized in that, The specific process of step S2.4 is: On the X86 architecture computing platform, use GPU or multi-thread CPU resources to train the model; The model parameters are optimized by minimizing the prediction error loss function, and the loss function is defined as: ; wherein: is the true liquid level value; is the model predicted liquid level value; Use the Adam adaptive optimization algorithm to update the model parameters: ; where: are model parameters; is a learning rate; , are first and second order momentum estimates.
8. The sewer network liquid level online prediction method based on the acuity platform according to claim 5, characterized in that, During the training process of step S2.5, the loss change of the training set and the validation set is monitored in real time. When the validation set loss no longer decreases in continuous training periods, the early stopping mechanism is triggered to terminate the training; at the same time, the learning rate is automatically adjusted according to the change of the validation set loss: ; wherein ; this mechanism effectively prevents model overfitting and improves model stability.
9. The sewer network liquid level online prediction method based on the acuity platform according to claim 4, characterized in that, The step S3 includes the following steps: Step S3.1, model format conversion and quantization; use the Acuity-toolkit tool to import and convert the.pt format model file generated by the X86 platform training, perform model quantization operation, and generate.np model file suitable for Acuity platform; Step S3.2, model and engineering deployment; import the.np model file and related engineering file into the Khadas VIM3 edge computing platform to realize the deployment of the model in the target hardware environment; ensure the compatibility of the model file, engineering configuration and running environment; Step S3.3, real-time data acquisition and preprocessing; through the Khadas VIM3 edge computing platform, real-time data acquisition is carried out in the field of drainage pipe network, and the data preprocessing library file generated in step S1.3.3 is called to standardize, clean and extract features from the collected multi-source raw data, so as to obtain processed data meeting the input requirements of the model; Step S3.4, NPU inference acceleration and prediction output; input the preprocessed data into the deployed model engineering, call the NPU of Khadas VIM3 platform to accelerate the model inference, realize real-time prediction of the liquid level of drainage pipe network; the system can output the prediction result in real time and provide support for the downstream intelligent scheduling or early warning system.
10. The sewer network liquid level online prediction method based on the acuity platform according to claim 1, characterized in that, The data collected in step S1.1 of each monitoring point in the drainage pipe network includes liquid level, flow and rainfall data.