A method, system, apparatus, and medium for chemical dosage control of a water treatment process

CN121974416BActive Publication Date: 2026-09-18SHEXIAN WATER SUPPLY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610157651.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-02-04
Publication Date
2026-09-18
Estimated Expiration
2046-02-04

AI Technical Summary

Technical Problem

[0004]本发明提供一种水处理过程的加药控制方法、系统、设备及介质,以解决现有技术存在水处理过程对时序数据的非线性动态特征捕捉能力有限的技术问题

Benefits of technology

[0016] The beneficial effects of this invention are as follows: This invention proposes a method, system, equipment, and medium for controlling chemical dosing in a water treatment process. It acquires historical water quality parameter data during the water treatment process and forms a corresponding standardized input sequence. The standardized input sequence is then subjected to discrete wavelet multi-scale decomposition to obtain low-frequency trend components reflecting long-term variation patterns and high-frequency detail components characterizing short-term fluctuations at multiple scales. Next, using a pre-trained prediction model, feature fusion and nonlinear mapping are performed on the low-frequency trend components, high-frequency detail components, and high-dimensional time-series features to obtain prediction coefficients for the fused features. These prediction coefficients represent the future trend of the fused features. Subsequently, the prediction coefficients of the fused features are recombined using inverse discrete wavelet transform to obtain the expected output sequence of water quality parameter data at future times. The instantaneous chemical dosing flow rate is extracted from the expected output sequence. The extracted instantaneous chemical dosing flow rate is used to control chemical dosing in the water treatment process, thereby improving the accuracy of predictive control of chemical dosing at future times.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121974416B_ABST
    Figure CN121974416B_ABST
Patent Text Reader

Abstract

The application provides a dosing control method, system, device and medium for a water treatment process, which comprises the following steps: performing multi-scale decomposition on a standardized input sequence by using a discrete wavelet transform to obtain a low-frequency trend component and a high-frequency detail component; inputting the standardized input sequence into a large language submodel of a pre-trained prediction model to obtain a high-dimensional time sequence feature; inputting the low-frequency trend component, the high-frequency detail component and the high-dimensional time sequence feature into the prediction model to generate a prediction coefficient of the fusion feature; performing inverse discrete wavelet transform and reorganization processing on the prediction coefficient of the fusion feature to obtain an expected output sequence of water quality parameter data at a future time; extracting an instantaneous dosing flow from the expected output sequence; and performing dosing control on the water treatment process according to the extracted instantaneous dosing flow. The application can improve the expected precise control of the dosing process at the future time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wastewater treatment technology, and in particular to a method, system, equipment and medium for controlling the dosing of chemicals in a water treatment process. Background Technology

[0002] In the water treatment process of waterworks, coagulation is one of the key processes. By adding coagulants such as polyaluminum chloride (PAC), colloids, suspended solids, and some dissolved pollutants in the water can be aggregated and settled, thereby improving the efficiency of subsequent filtration and disinfection. The rational control of PAC dosage has a significant impact on water quality stability, operating costs, and equipment load. However, existing waterworks still face many challenges in controlling PAC dosage.

[0003] Traditional control methods rely primarily on operator experience or simple rules based on conventional water quality indicators, making them ill-suited to rapid fluctuations in raw water quality. This can easily lead to insufficient or excessive chemical dosing, affecting the stability of the coagulation process and increasing chemical consumption. To improve prediction accuracy, some water treatment plants have attempted to introduce statistical models or traditional machine learning methods, such as linear regression, support vector machines, or shallow neural networks based on feature engineering. While these methods can utilize historical data for prediction to some extent, their ability to capture the nonlinear dynamic features of time-series data is limited, and they struggle to handle multi-scale fluctuations, resulting in unsatisfactory prediction accuracy. Summary of the Invention

[0004] This invention provides a method, system, equipment, and medium for controlling the dosing of chemicals in a water treatment process, in order to solve the technical problem that the existing technology has limited ability to capture the nonlinear dynamic characteristics of time-series data in water treatment processes.

[0005] This invention proposes a method for controlling chemical dosing in a water treatment process, comprising:

[0006] Historical water quality parameter data during the water treatment process is acquired, and the historical water quality parameter data is preprocessed to obtain a standardized input sequence; wherein, the water quality parameter data includes instantaneous chemical dosing flow rate; Discrete wavelet multi-scale decomposition is performed on the standardized input sequence to obtain low-frequency trend components that reflect long-term variation patterns and high-frequency detail components that characterize short-term fluctuations at multiple scales. The standardized input sequence is input into the large language sub-model of the pre-trained prediction model to obtain a set of prompt words, and global feature extraction is performed on the set of prompt words to obtain high-dimensional temporal features; The low-frequency trend component, the high-frequency detail component, and the high-dimensional temporal features are input into the cross-attention mechanism of the prediction model for feature fusion to obtain fused features; The fused features are nonlinearly mapped through the multilayer perceptron layer of the prediction model to generate prediction coefficients for the fused features; wherein, the prediction coefficients represent the changing trend of the fused features at future times. The predicted coefficients of the fusion features are recombined by discrete wavelet inverse transform to obtain the expected output sequence of water quality parameter data at future times. The instantaneous dosing flow rate in the expected output sequence is extracted, and the dosing control of the water treatment process is performed based on the extracted instantaneous dosing flow rate.

[0007] In one embodiment of the present invention, the standardized input sequence is subjected to discrete wavelet multi-scale decomposition to obtain low-frequency trend components reflecting long-term variation patterns and high-frequency detail components characterizing short-term multi-scale fluctuations. The low-frequency trend component and the high-frequency detail component satisfy: ; in, This represents a one-dimensional discrete wavelet decomposition mapping. Represented as the final decomposition scale The obtained low-frequency trend components; Represented as the first The high-frequency detail components corresponding to each decomposition scale It represents the total decomposition scale corresponding to the high-frequency detail components, and is a non-zero constant; It is represented as a standardized input sequence.

[0008] In one embodiment of the present invention, the predicted coefficients of the fused features are subjected to discrete wavelet inverse transform recombination processing to obtain the expected output sequence of water quality parameter data at future times. The instantaneous dosing flow rate is extracted from the expected output sequence, and the dosing control of the water treatment process is performed based on the extracted instantaneous dosing flow rate. The expected output sequence ,satisfy: , ; in, Represented as the inverse transform of one-dimensional discrete wavelet decomposition, It is represented as the prediction coefficient corresponding to the fused feature obtained by fusing the features corresponding to the low-frequency trend component and the high-dimensional time series features; Represented as by the first The features corresponding to the high-frequency detail components and the high-dimensional temporal features are fused to obtain the prediction coefficients corresponding to the fused features.

[0009] In one embodiment of the present invention, the step of inputting the standardized input sequence into the large language sub-model of a pre-trained prediction model to obtain a set of prompt words, and performing global feature extraction on the set of prompt words to obtain high-dimensional temporal features, includes: The standardized input sequence is input into the large language sub-model of the pre-trained prediction model, and the large language sub-model calculates the corresponding trend value based on the sequence value of the standardized input sequence. The large language sub-model constructs a set of prompt words based on the sequence values ​​and corresponding trend values ​​of the standardized input sequence, and performs global feature extraction on the set of prompt words to generate high-dimensional temporal features; Among them, trend values ,satisfy: ; , Represented as the standardized input sequence of the th , The sequence values ​​at each time point, This represents the total number of time points in the standardized input sequence. High-dimensional time series features ,satisfy: ,in, Represented as the first Feature vectors at each time point This is represented by the mapping function of the large language sub-model. Represented as The parameter set; Represented as a set of prompt words, Represented as arrive The entire sequence of prompt words, This represents the total length of the set of prompt words.

[0010] In one embodiment of the present invention, the step of fusing the low-frequency trend component, the high-frequency detail component, and the high-dimensional temporal features into the prediction model via a cross-attention mechanism to obtain fused features includes: The low-frequency trend component and the high-frequency detail component are input into the cross-attention mechanism of the prediction model. The low-frequency trend component and the high-frequency detail component are divided into data blocks to obtain corresponding low-frequency trend component data blocks and high-frequency detail component data blocks. Feature extraction is performed on the low-frequency trend component data blocks and the high-frequency detail component data blocks to obtain low-frequency trend component features and high-frequency detail component features. The high-dimensional temporal features and the low-frequency trend component features are fused using the cross-attention mechanism to obtain global trend fusion features, and the high-dimensional temporal features and the high-frequency detail component features are fused to obtain local detail fusion features. Among them, the global trend fusion feature and the local detail fusion feature satisfy: ; , ; Represented as high-dimensional temporal features, This is represented as a low-frequency trend component feature. Represented as the first High-frequency detail component features; This is expressed as the total number of high-frequency detail component features; Represented as low-frequency trend component features The corresponding global trend fusion features Represented as the first High-frequency detail component features Corresponding local detail fusion features This is represented as a mapping function for the cross-attention mechanism.

[0011] In one embodiment of the present invention, the step of nonlinearly mapping the fused features through the multilayer perceptron layer of the prediction model to generate prediction coefficients for the fused features includes: The prediction model uses a multi-layer perceptron layer to perform a non-linear mapping on the global trend fusion features to generate prediction coefficients for the global trend fusion features, and performs a non-linear mapping on the local detail fusion features to generate prediction coefficients for the local detail fusion features. The prediction coefficients of the global trend fusion feature and the prediction coefficients of the local detail fusion feature satisfy the following: , , ; Represented as global trend fusion feature The corresponding prediction coefficients, Represented as the first Local detail fusion features The corresponding prediction coefficients; Represented as global trend fusion feature The corresponding mapping function, Represented as the first Local detail fusion features The corresponding mapping function.

[0012] In one embodiment of the present invention, the global trend fusion feature Corresponding mapping function , No. Local detail fusion features Corresponding mapping function ,satisfy: , ; in, and Global trend fusion features The corresponding mapping parameter matrix, and Represented as the first Local detail fusion features The corresponding mapping parameter matrix, It is represented as a nonlinear activation operator.

[0013] This invention also proposes a dosing control system for a water treatment process, comprising: The preprocessing unit is used to acquire historical water quality parameter data during the water treatment process, preprocess the historical water quality parameter data to obtain a standardized input sequence; wherein, the water quality parameter data includes instantaneous chemical dosing flow rate; The decomposition unit is used to perform discrete wavelet multi-scale decomposition on the standardized input sequence to obtain low-frequency trend components that reflect long-term variation patterns and high-frequency detail components that characterize multi-scale short-term fluctuations. The global feature acquisition unit is used to input the standardized input sequence into the large language sub-model of the pre-trained prediction model, obtain the prompt word set, and perform global feature extraction on the prompt word set to obtain high-dimensional temporal features; The feature fusion acquisition unit is used to input the low-frequency trend component, the high-frequency detail component, and the high-dimensional temporal features into the cross-attention mechanism of the prediction model for feature fusion to obtain fused features; The prediction coefficient acquisition unit is used to perform nonlinear mapping on the fused features through the multilayer perceptron layer of the prediction model to generate prediction coefficients for the fused features; wherein, the prediction coefficients represent the changing trend of the fused features at future times; The recombination unit is used to perform discrete wavelet inverse transform recombination processing on the predicted coefficients of the fusion features to obtain the expected output sequence of water quality parameter data at future times, extract the instantaneous dosing flow rate from the expected output sequence, and control the dosing of water treatment process based on the extracted instantaneous dosing flow rate.

[0014] The present invention also proposes an electronic device, the electronic device comprising: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the electronic device to implement the dosing control method for the water treatment process as described in any of the preceding claims.

[0015] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer processor, causes the computer to perform the dosing control method for any of the above-described water treatment processes.

[0016] The beneficial effects of this invention are as follows: This invention proposes a method, system, equipment, and medium for controlling chemical dosing in a water treatment process. It acquires historical water quality parameter data during the water treatment process and forms a corresponding standardized input sequence. The standardized input sequence is then subjected to discrete wavelet multi-scale decomposition to obtain low-frequency trend components reflecting long-term variation patterns and high-frequency detail components characterizing short-term fluctuations at multiple scales. Next, using a pre-trained prediction model, feature fusion and nonlinear mapping are performed on the low-frequency trend components, high-frequency detail components, and high-dimensional time-series features to obtain prediction coefficients for the fused features. These prediction coefficients represent the future trend of the fused features. Subsequently, the prediction coefficients of the fused features are recombined using inverse discrete wavelet transform to obtain the expected output sequence of water quality parameter data at future times. The instantaneous chemical dosing flow rate is extracted from the expected output sequence. The extracted instantaneous chemical dosing flow rate is used to control chemical dosing in the water treatment process, thereby improving the accuracy of predictive control of chemical dosing at future times. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0018] In the attached diagram: Figure 1 This is a schematic diagram of the steps of a chemical dosing control method for a water treatment process provided in an embodiment of the present invention.

[0019] Figure 2 This is a structural block diagram of a prediction model provided in an embodiment of the present invention.

[0020] Figure 3 This is a structural block diagram of a chemical dosing control system for a water treatment process provided in an embodiment of the present invention.

[0021] Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0022] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0023] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. The drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0024] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.

[0025] Please see Figures 1 to 4 This invention proposes a method, system, equipment, and medium for controlling chemical dosing in water treatment processes, applicable to municipal water supply and wastewater treatment, industrial water treatment, and smart water management and process intelligence. Specifically, this invention can be applied to water treatment processes in waterworks by capturing the nonlinear dynamic characteristics of time-series data and leveraging multi-scale fluctuations in historical water quality parameters during the treatment process to improve the accuracy of predicting instantaneous chemical dosing flow rates for future moments. Detailed descriptions are provided below using specific embodiments.

[0026] Please see Figure 1 and Figure 2 In one embodiment of the present invention, a method for controlling the dosing of chemicals in a water treatment process is proposed, which may include the following steps.

[0027] Step S10: Obtain historical water quality parameter data during the water treatment process, preprocess the historical water quality parameter data to obtain a standardized input sequence; wherein, the water quality parameter data includes instantaneous chemical dosing flow rate.

[0028] Specifically, raw water quality parameter data is first collected from the historical operational database of the coagulation process at the waterworks. This water quality parameter data typically comes from online monitoring instruments and is recorded and stored at fixed time intervals (e.g., hourly). The collected water quality parameter data includes, but is not limited to: instantaneous flow rate, turbidity, pressure, residual chlorine concentration, pH value, and the instantaneous dosing flow rate of polyaluminum chloride (PAC) currently being added.

[0029] Because the raw water quality parameter data collected may contain outliers, missing values, or isolated points caused by sensor noise, communication interruptions, or maintenance operations, data preprocessing is necessary to ensure data quality. The preprocessing process mainly includes three steps. First, data cleaning involves identifying and removing outlier data points that clearly exceed the process's limits by setting reasonable threshold ranges, for example, based on the statistical characteristics of historical data or process knowledge. Second, missing value handling involves filling in missing data points by linear interpolation based on data from preceding and following time points, or by using typical values ​​of the parameter at the same time on adjacent dates to ensure temporal continuity. Third, data normalization is performed. Considering the significant differences in the numerical range and dimensions of various water quality parameters, such as flow rate, turbidity, and pH, to eliminate the influence of dimensions and accelerate the convergence of subsequent model training, the values ​​of each type of parameter need to be mapped to the interval [0, 1] or [-1, 1] through linear transformation.

[0030] After completing the above preprocessing, a clean and scale-uniform standardized input sequence is obtained, consisting of multiple water quality parameter data at multiple consecutive time points. This standardized input sequence is the basis for all subsequent analysis and modeling steps.

[0031] Standardized input sequence , can be represented as ,in, The length of the input sequence is represented as the normalized sequence length. , .in, Expressed as the instantaneous flow rate of the water body, Expressed as turbidity, Indicated as pressure, Expressed as residual chlorine concentration, Expressed as pH value, This is expressed as the instantaneous drug delivery rate.

[0032] Step S20: Perform discrete wavelet multi-scale decomposition on the standardized input sequence to obtain low-frequency trend components that reflect long-term variation patterns and high-frequency detail components that characterize short-term fluctuations at multiple scales.

[0033] Specifically, a one-dimensional discrete wavelet transform (DWT) is performed on the obtained standardized input sequence. The discrete wavelet transform is a time-frequency analysis tool that can decompose the original time-series signal into different scales (frequency) and time positions. Specifically, a suitable wavelet basis function is selected, such as the Daubechies wavelet or the Haar wavelet, and the number of decomposition levels is set. Using a standardized input sequence as the original signal input, the discrete wavelet transform algorithm yields a low-frequency approximation component and a high-frequency detail component at each decomposition level. The low-frequency approximation component captures the main contour and long-term trend of the signal at that scale, while the high-frequency detail component contains the local variations and short-term fluctuations of the signal at that scale.

[0034] go through After layer decomposition, a low-frequency trend component at the final scale will be obtained. ,as well as Different scales (from layer 1 to layer 2) High-frequency detail components corresponding to the layer Among them, high-frequency components with larger scales (such as...) This corresponds to more refined (shorter period) fluctuations, while smaller-scale high-frequency components (such as...) This corresponds to relatively smooth short- to medium-term fluctuations. In this way, the original complex water quality time-series signal containing information at multiple time scales is resolved into a set of sub-signal components with clearer structure and more focused features, laying the foundation for subsequent modeling of features at different scales.

[0035] Specifically, the low-frequency trend component and the high-frequency detail component satisfy the following: ; in, This represents a one-dimensional discrete wavelet decomposition mapping. Represented as the final decomposition scale The obtained low-frequency trend components; Represented as the first The high-frequency detail components corresponding to each decomposition scale It represents the total decomposition scale corresponding to the high-frequency detail components, and is a non-zero constant; It is represented as a standardized input sequence.

[0036] Step S30: Input the standardized input sequence into the large language sub-model of the pre-trained prediction model to obtain the prompt word set, and perform global feature extraction on the prompt word set to obtain high-dimensional temporal features.

[0037] Specifically, the pre-trained prediction model 10 and its large language sub-model 11 are used to extract global semantic features from the time-series data. First, the obtained standardized input sequence needs to be constructed into a "cue word" text form that the large language sub-model 11 can understand. The specific construction method is as follows: identify the start and end times of the sequence, and the sequence values ​​of the water quality parameters corresponding to each time node within that time period. Simultaneously, calculate the trend value of the entire sequence, defined as the cumulative sum of the differences between values ​​at adjacent time nodes in the sequence, to summarize the overall direction of change in the sequence. Then, this information is organized into a structured natural language description; the cue word set is, for example, the following text: "From a certain year, month, day, hour (…)" On a certain day and time in a certain month of a certain year ( ), the corresponding sequence value is [ The sampling frequency between sequence values ​​is 1 hour, and the overall trend value of the sequence is... 。

[0038] Next, this set of prompt words is input into the pre-trained prediction model 10's large language sub-model 11. The large language sub-model 11 is a large-scale temporal coding model, such as the open-source GPT-2, and has been pre-trained on large-scale temporal data or related text corpora, possessing powerful sequence pattern recognition and semantic understanding capabilities. The large language sub-model 11 encodes the input prompt words, processing them layer by layer through its internal cross-attention mechanism and feedforward network, ultimately outputting a high-dimensional vector representation sequence, i.e., high-dimensional temporal features. These features not only encode the information of the original numerical sequence but also contain potential global semantic information learned by the model from a large amount of data, such as long-term dependencies, periodic patterns, and mutation modes in the time series, providing rich contextual guidance for subsequent steps.

[0039] In one embodiment of the present invention, step S30 may include the following steps.

[0040] Step S310: Input the standardized input sequence into the large language sub-model of the pre-trained prediction model, and the large language sub-model calculates the corresponding trend value based on the sequence value of the standardized input sequence.

[0041] Step S320: The large language sub-model constructs a set of prompt words based on the sequence values ​​of the standardized input sequence and the corresponding trend values, and performs global feature extraction on the set of prompt words to generate high-dimensional temporal features.

[0042] Among them, trend values ,satisfy: ; , Represented as the standardized input sequence of the th , The sequence values ​​at each time point, This represents the total number of time points in the standardized input sequence.

[0043] High-dimensional time series features ,satisfy: ,in, Represented as the first Feature vectors at each time point This is represented by the mapping function of the large language sub-model 11. Represented as The parameter set; Represented as a set of prompt words, Represented as arrive The entire sequence of prompt words, This represents the total length of the set of prompt words.

[0044] Step S40: Input the low-frequency trend component, the high-frequency detail component, and the high-dimensional temporal features into the cross-attention mechanism of the prediction model for feature fusion to obtain fused features.

[0045] In one embodiment of the present invention, step S40 may include the following steps.

[0046] Step S410: Input the low-frequency trend component and the high-frequency detail component into the cross-attention mechanism 12 of the prediction model 10, divide the low-frequency trend component and the high-frequency detail component into data blocks respectively, obtain corresponding low-frequency trend component data blocks and high-frequency detail component data blocks, and extract features from the low-frequency trend component data blocks and the high-frequency detail component data blocks to obtain low-frequency trend component features and high-frequency detail component features.

[0047] Specifically, it requires deep fusion of the multi-scale local features obtained from the decomposition with the extracted global semantic features. Specifically, firstly, it is necessary to process each obtained frequency component, including low-frequency trend components... and various high-frequency detail components Further processing is performed to extract more refined local structural features. This is typically achieved by dividing the coefficient sequence of each component into a series of consecutive and potentially overlapping local data blocks (called patches), each containing a small segment of consecutive coefficient values. Feature extraction is then performed on these local patches, for example, through a small convolutional layer or linear projection, to obtain the feature representation corresponding to each component, i.e., the low-frequency trend component features. and high-frequency detail component features .

[0048] Step S420: The high-dimensional temporal features and the low-frequency trend component features are fused using the cross-attention mechanism to obtain global trend fusion features, and the high-dimensional temporal features and the high-frequency detail component features are fused to obtain local detail fusion features.

[0049] Among them, the global trend fusion feature and the local detail fusion feature satisfy: ; , ; Represented as high-dimensional temporal features, This is represented as a low-frequency trend component feature. Represented as the first High-frequency detail component features; This is expressed as the total number of high-frequency detail component features; Represented as low-frequency trend component features The corresponding global trend fusion features Represented as the first High-frequency detail component features Corresponding local detail fusion features This is represented as a mapping function for the cross-attention mechanism.

[0050] Specifically, a cross-attention mechanism is used for feature fusion. In the cross-attention mechanism, the obtained high-dimensional temporal features are... As a "query", the features at each local scale ( and various These are used as "keys" and "values," respectively. The cross-attention mechanism 12 calculates global features. The relevance weights between each local feature are calculated, and then the local features are summed based on these weights. This process allows global semantic information to dynamically and selectively guide the model to focus on the parts of local features at different scales that are most relevant to the current prediction task. Finally, for low-frequency trend components, they are fused with global features to generate global trend fusion features. For the first Each high-frequency detail component, when fused with global features, generates a local detail fusion feature. Through this fusion approach, the model achieves refined alignment and collaborative modeling of global long-term trends and multi-scale local fluctuation information.

[0051] Step S50: The fused features are nonlinearly mapped through the multilayer perceptron layer of the prediction model to generate prediction coefficients for the fused features; wherein the prediction coefficients represent the changing trend of the fused features at future times.

[0052] Specifically, each set of features needs to be predicted separately to generate its coefficient sequence over a future period. To this end, the prediction model is equipped with multiple independent multilayer perceptron (MLP) layers, each MLP layer specifically responsible for processing the fused features corresponding to a specific frequency component. The multilayer perceptron layer is a neural network structure composed of fully connected layers and nonlinear activation functions, possessing strong nonlinear fitting capabilities.

[0053] Specifically, integrating global trends with features The input is fed into the corresponding MLP_L network. After multiple transformations of the network's weight matrix and the application of nonlinear activation functions, the final output is a sequence of predicted coefficients for several future time points, denoted as... Similarly, each local detail is fused into a feature. The inputs are fed into their respective dedicated MLP_(H_j) networks to obtain their corresponding future prediction coefficient sequences, denoted as... The "prediction coefficients" here can be understood as the future trend and intensity of signal component changes in a specific frequency domain. Each MLP network, through the learned parameters, captures the complex nonlinear relationship between the fusion characteristics of its corresponding frequency components and future changes, providing component-specific, future-oriented information for the final reconstruction of the complete predicted signal.

[0054] In one embodiment of the present invention, step S50 may include the following steps.

[0055] The prediction model uses a multilayer perceptron layer 13 to perform a nonlinear mapping on the global trend fusion features to generate prediction coefficients for the global trend fusion features, and performs a nonlinear mapping on the local detail fusion features to generate prediction coefficients for the local detail fusion features.

[0056] The prediction coefficients of the global trend fusion feature and the prediction coefficients of the local detail fusion feature satisfy the following: , , ; Represented as global trend fusion feature The corresponding prediction coefficients, Represented as the first Local detail fusion features The corresponding prediction coefficients; Represented as global trend fusion feature The corresponding mapping function, Represented as the first Local detail fusion features The corresponding mapping function.

[0057] In one embodiment of the present invention, the global trend fusion feature Corresponding mapping function , No. Local detail fusion features Corresponding mapping function ,satisfy: , ; in, and Global trend fusion features The corresponding mapping parameter matrix, and Represented as the first Local detail fusion features The corresponding mapping parameter matrix, It is represented as a nonlinear activation operator.

[0058] Step S60: Perform discrete wavelet inverse transform reorganization processing on the prediction coefficients of the fusion features to obtain the expected output sequence of water quality parameter data at future times, extract the instantaneous dosing flow rate from the expected output sequence, and control the dosing of water treatment process based on the extracted instantaneous dosing flow rate.

[0059] In one embodiment of the present invention, step S60 includes the following steps.

[0060] Step S610: Perform discrete wavelet inverse transform reorganization processing on the prediction coefficients of the global trend fusion feature and the local detail fusion feature to obtain the expected output sequence of water quality parameter data at future times.

[0061] Step S620: Extract the instantaneous dosing flow rate from the expected output sequence, and control the dosing of chemicals in the water treatment process based on the extracted instantaneous dosing flow rate.

[0062] Wherein, the expected output sequence ,satisfy: , ; in, Represented as the inverse transform of one-dimensional discrete wavelet decomposition, Represented as the feature corresponding to the low-frequency trend component and the high-dimensional temporal features Perform feature fusion to obtain global trend fusion features The corresponding prediction coefficient; Represented as by the first Features corresponding to each of the high-frequency detail components and the high-dimensional temporal features Feature fusion is performed to obtain local detail fused features. The corresponding prediction coefficients.

[0063] Specifically, multiple sets of prediction coefficients for the future trends of different frequency components. These coefficients are represented in the wavelet transform domain. To obtain a complete future prediction sequence of water quality parameters in the original time domain, these coefficients need to be subjected to a discrete wavelet inverse transform. The discrete wavelet inverse transform is the inverse process of the wavelet forward transform. Based on given low-frequency approximation coefficients and high-frequency detail coefficients at each layer, it can accurately reconstruct the original time domain signal through a specific wavelet reconstruction algorithm. By taking each set of prediction coefficients as input and performing a one-dimensional discrete wavelet inverse transform, a multi-dimensional expected output sequence can be reconstructed. This sequence predicts the changes in all water quality parameters (instantaneous flow rate, turbidity, pressure, residual chlorine, pH, instantaneous chemical dosing rate, etc.) over a future period, such as the next few hours.

[0064] The core prediction objective of this embodiment is the dosage of PAC (Potentially Acidic Chemicals). Therefore, from the reconstructed multidimensional expected output sequence, the data of the "instantaneous dosing flow rate" dimension is specifically extracted to obtain the PAC dosing prediction sequence for future time points. Finally, based on this dosing prediction sequence, a dosing control strategy can be formulated or adjusted. For example, the predicted instantaneous dosing flow rate at the first future time point can be directly sent as a control command to the dosing pump for real-time dosing. Alternatively, combined with more advanced optimization algorithms, the optimal dosing control trajectory can be calculated using the dosing prediction sequences for multiple future time points to achieve the dual goals of water quality stability and chemical saving, thereby completing the intelligent and precise control of the dosing process in the coagulation stage of water treatment.

[0065] Therefore, this invention, through multi-scale data patch decomposition based on wavelet transform, divides water quality time-series signals into local features of different frequencies and time scales. It then fuses these local frequency features at each scale with the global semantics (Embedding) extracted from the large model, achieving effective alignment of semantic information with dynamic water quality features at appropriate scales, thus improving the modeling capability for complex water quality change patterns. Furthermore, the adaptive feature fusion mechanism based on cross-attention allows semantic information to selectively act on different frequency components and local data patch features, avoiding information redundancy or interference caused by coarse-grained semantic information injection, thereby enhancing the model's robustness and interpretability. In addition, by predicting and reconstructing the output results for low-frequency trend components and multi-scale high-frequency detail components respectively, the impact of water quality changes at different time scales on PAC dosage is clearly expressed, resulting in more stable and accurate dosing prediction under complex operating conditions.

[0066] Please see Figure 3 In one embodiment of the present invention, a dosing control system 100 for a water treatment process is proposed, which may include a pretreatment unit 110, a decomposition unit 120, a global feature acquisition unit 130, a fusion feature acquisition unit 140, a prediction coefficient acquisition unit 150, and a recombination unit 160.

[0067] The preprocessing unit 110 is used to acquire historical water quality parameter data during the water treatment process, preprocess the historical water quality parameter data, and obtain a standardized input sequence; wherein, the water quality parameter data includes instantaneous chemical dosing flow rate.

[0068] The decomposition unit 120 is used to perform discrete wavelet multi-scale decomposition on the standardized input sequence to obtain low-frequency trend components that reflect long-term variation patterns and high-frequency detail components that characterize multi-scale short-term fluctuations.

[0069] The global feature acquisition unit 130 is used to input the standardized input sequence into the large language sub-model of the pre-trained prediction model, obtain the prompt word set, and perform global feature extraction on the prompt word set to obtain high-dimensional temporal features.

[0070] The feature fusion acquisition unit 140 is used to input the low-frequency trend component, the high-frequency detail component and the high-dimensional time series feature into the cross-attention mechanism of the prediction model to perform feature fusion and obtain fused features.

[0071] The prediction coefficient acquisition unit 150 is used to perform nonlinear mapping on the fused features through the multilayer perceptron layer of the prediction model to generate prediction coefficients for the fused features; wherein, the prediction coefficients represent the changing trend of the fused features at future times.

[0072] The recombination unit 160 is used to perform discrete wavelet inverse transform recombination processing on the prediction coefficients of the fusion features to obtain the expected output sequence of water quality parameter data at future times, extract the instantaneous dosing flow rate from the expected output sequence, and control the dosing of water treatment process based on the extracted instantaneous dosing flow rate.

[0073] Please see Figure 4 In one embodiment of the present invention, an electronic device 200 is proposed. The electronic device 200 may include a memory 210, a processor 220 and a bus, and may also include a computer program stored in the memory 210 and executable on the processor 220, such as a power battery capacity correction program.

[0074] The memory 210 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 210 can be an internal storage unit of the electronic device 200, such as the portable hard drive of the electronic device 200. In other embodiments, the memory 210 can be an external storage device of the electronic device 200, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device 200. Furthermore, the memory 210 can include both internal and external storage units of the electronic device 200. The memory 210 can be used not only to store application software and various types of data installed on the electronic device 200, such as dosing control code for water treatment processes, but also to temporarily store data that has been output or will be output.

[0075] In some embodiments, processor 220 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. Processor 220 is the control unit of the electronic device 200, connecting various components of the electronic device 200 via various interfaces and lines. It executes programs or modules stored in the memory 210 (e.g., dosing control programs for water treatment processes) and calls data stored in the memory 210 to perform various functions and process data of the electronic device 200.

[0076] The processor 220 executes the operating system of the electronic device 200 and various installed application programs. The processor 220 executes the application programs to implement the steps in the dosing control method of the above-described water treatment process.

[0077] For example, the computer program may be divided into one or more modules, which are stored in the memory 210 and executed by the processor 220 to complete this application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the electronic device 200. For example, the computer program may be divided into a preprocessing unit 110, a decomposition unit 120, a global feature acquisition unit 130, a fusion feature acquisition unit 140, a prediction coefficient acquisition unit 150, and a reconstruction unit 160.

[0078] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium, which can be non-volatile or volatile. The software functional module, stored in the storage medium, includes several instructions to cause a computer device (which may be a personal computer, computer equipment, or network device, etc.) or processor to execute some functions of the dosing control method for the water treatment process described in the various embodiments of this application.

[0079] In summary, this invention proposes a method, system, equipment, and medium for chemical dosing control in water treatment processes. It acquires historical water quality parameter data during the water treatment process and forms a corresponding standardized input sequence. The standardized input sequence is then subjected to discrete wavelet multi-scale decomposition to obtain low-frequency trend components reflecting long-term variation patterns and high-frequency detail components characterizing short-term fluctuations at multiple scales. Next, using a pre-trained prediction model, feature fusion and nonlinear mapping are performed on the low-frequency trend components, high-frequency detail components, and high-dimensional time-series features to obtain prediction coefficients for the fused features. These prediction coefficients represent the future trend of the fused features. Subsequently, the prediction coefficients of the fused features are recombined using inverse discrete wavelet transform to obtain the expected output sequence of water quality parameter data at future times. The instantaneous chemical dosing flow rate is extracted from the expected output sequence. The extracted instantaneous chemical dosing flow rate is used to control the chemical dosing in the water treatment process, thereby improving the accuracy of predictive control of chemical dosing at future times.

[0080] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A method for controlling chemical dosing in a water treatment process, characterized in that, include: Historical water quality parameter data during the water treatment process is acquired, and the historical water quality parameter data is preprocessed to obtain a standardized input sequence; wherein, the water quality parameter data includes instantaneous chemical dosing flow rate; Discrete wavelet multi-scale decomposition is performed on the standardized input sequence to obtain low-frequency trend components that reflect long-term variation patterns and high-frequency detail components that characterize short-term fluctuations at multiple scales. The standardized input sequence is input into the large language sub-model of the pre-trained prediction model to obtain a set of prompt words, and global feature extraction is performed on the set of prompt words to obtain high-dimensional temporal features; The low-frequency trend component, the high-frequency detail component, and the high-dimensional temporal features are input into the cross-attention mechanism of the prediction model for feature fusion to obtain fused features; The fused features are nonlinearly mapped through the multilayer perceptron layer of the prediction model to generate prediction coefficients for the fused features; wherein, the prediction coefficients represent the changing trend of the fused features at future times. The predicted coefficients of the fusion features are recombined by discrete wavelet inverse transform to obtain the expected output sequence of water quality parameter data at future times. The instantaneous dosing flow rate in the expected output sequence is extracted, and the dosing control of the water treatment process is performed based on the extracted instantaneous dosing flow rate.

2. The dosing control method for water treatment process according to claim 1, characterized in that, The standardized input sequence is subjected to discrete wavelet multi-scale decomposition to obtain low-frequency trend components reflecting long-term variation patterns and high-frequency detail components characterizing short-term fluctuations at multiple scales. The low-frequency trend component and the high-frequency detail component satisfy: ; in, This represents a one-dimensional discrete wavelet decomposition mapping. Represented as the final decomposition scale The obtained low-frequency trend components; Represented as the first The high-frequency detail components corresponding to each decomposition scale It represents the total decomposition scale corresponding to the high-frequency detail components, and is a non-zero constant; It is represented as a standardized input sequence.

3. The dosing control method for water treatment process according to claim 1, characterized in that, The predicted coefficients of the fused features are recombined using discrete wavelet inverse transform to obtain the expected output sequence of water quality parameter data at future times. The instantaneous dosing flow rate is then extracted from the expected output sequence, and the dosing control for the water treatment process is based on the extracted instantaneous dosing flow rate. The expected output sequence ,satisfy: , ; in, Represented as the inverse transform of one-dimensional discrete wavelet decomposition, It is represented as the prediction coefficient corresponding to the fused feature obtained by fusing the features corresponding to the low-frequency trend component and the high-dimensional time series features; Represented as by the first The features corresponding to the high-frequency detail components and the high-dimensional temporal features are fused to obtain the prediction coefficients corresponding to the fused features.

4. The dosing control method for water treatment process according to claim 1, characterized in that, The process involves inputting the standardized input sequence into the large language sub-model of a pre-trained prediction model to obtain a set of prompt words, and then performing global feature extraction on the prompt word set to obtain high-dimensional temporal features, including: The standardized input sequence is input into the large language sub-model of the pre-trained prediction model, and the large language sub-model calculates the corresponding trend value based on the sequence value of the standardized input sequence. The large language sub-model constructs a set of prompt words based on the sequence values ​​and corresponding trend values ​​of the standardized input sequence, and performs global feature extraction on the set of prompt words to generate high-dimensional temporal features; Among them, trend values ,satisfy: ; , Represented as the standardized input sequence of the th , The sequence values ​​at each time point, This represents the total number of time points in the standardized input sequence. High-dimensional time series features ,satisfy: ,in, Represented as the first Feature vectors at each time point This is represented by the mapping function of the large language sub-model. Represented as The parameter set; Represented as a set of prompt words, Represented as arrive The entire sequence of prompt words, This represents the total length of the set of prompt words.

5. The dosing control method for water treatment process according to claim 1, characterized in that, The feature fusion is achieved by inputting the low-frequency trend component, the high-frequency detail component, and the high-dimensional temporal features into the prediction model via a cross-attention mechanism, resulting in fused features, including: The low-frequency trend component and the high-frequency detail component are input into the cross-attention mechanism of the prediction model. The low-frequency trend component and the high-frequency detail component are divided into data blocks to obtain corresponding low-frequency trend component data blocks and high-frequency detail component data blocks. Feature extraction is performed on the low-frequency trend component data blocks and the high-frequency detail component data blocks to obtain low-frequency trend component features and high-frequency detail component features. The high-dimensional temporal features and the low-frequency trend component features are fused using the cross-attention mechanism to obtain global trend fusion features, and the high-dimensional temporal features and the high-frequency detail component features are fused to obtain local detail fusion features. Among them, the global trend fusion feature and the local detail fusion feature satisfy: ; , ; Represented as high-dimensional temporal features, This is represented as a low-frequency trend component feature. Represented as the first High-frequency detail component features; This is expressed as the total number of high-frequency detail component features; Represented as low-frequency trend component features The corresponding global trend fusion features Represented as the first High-frequency detail component features Corresponding local detail fusion features This is represented as a mapping function for the cross-attention mechanism.

6. The dosing control method for water treatment process according to claim 5, characterized in that, The step of performing a nonlinear mapping on the fused features through the multilayer perceptron layer of the prediction model to generate prediction coefficients for the fused features includes: The prediction model uses a multi-layer perceptron layer to perform a non-linear mapping on the global trend fusion features to generate prediction coefficients for the global trend fusion features, and performs a non-linear mapping on the local detail fusion features to generate prediction coefficients for the local detail fusion features. The prediction coefficients of the global trend fusion feature and the prediction coefficients of the local detail fusion feature satisfy the following: , , ; Represented as global trend fusion feature The corresponding prediction coefficients, Represented as the first Local detail fusion features The corresponding prediction coefficients; Represented as global trend fusion feature The corresponding mapping function, Represented as the first Local detail fusion features The corresponding mapping function.

7. The dosing control method for water treatment process according to claim 6, characterized in that, The global trend fusion feature Corresponding mapping function , No. Local detail fusion features Corresponding mapping function ,satisfy: , ; in, and Global trend fusion features The corresponding mapping parameter matrix, and Represented as the first Local detail fusion features The corresponding mapping parameter matrix, It is represented as a nonlinear activation operator.

8. A dosing control system for a water treatment process, characterized in that, include: The preprocessing unit is used to acquire historical water quality parameter data during the water treatment process, preprocess the historical water quality parameter data to obtain a standardized input sequence; wherein, the water quality parameter data includes instantaneous chemical dosing flow rate; The decomposition unit is used to perform discrete wavelet multi-scale decomposition on the standardized input sequence to obtain low-frequency trend components that reflect long-term variation patterns and high-frequency detail components that characterize multi-scale short-term fluctuations. The global feature acquisition unit is used to input the standardized input sequence into the large language sub-model of the pre-trained prediction model, obtain the prompt word set, and perform global feature extraction on the prompt word set to obtain high-dimensional temporal features; The feature fusion acquisition unit is used to input the low-frequency trend component, the high-frequency detail component, and the high-dimensional temporal features into the cross-attention mechanism of the prediction model for feature fusion to obtain fused features; The prediction coefficient acquisition unit is used to perform nonlinear mapping on the fused features through the multilayer perceptron layer of the prediction model to generate prediction coefficients for the fused features; wherein, the prediction coefficients represent the changing trend of the fused features at future times; The recombination unit is used to perform discrete wavelet inverse transform recombination processing on the predicted coefficients of the fusion features to obtain the expected output sequence of water quality parameter data at future times, extract the instantaneous dosing flow rate from the expected output sequence, and control the dosing of water treatment process based on the extracted instantaneous dosing flow rate.

9. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the dosing control method for the water treatment process as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by the computer's processor, causes the computer to perform the dosing control method for the water treatment process according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Infrared and visible light image fusion method based on T-WavKAN and C-Corr

    CN119963965A

  • System and method for enhanced future prediction using reservoir transformer

    US20250363331A1