A Hydrological Time Series Prediction Method and System Based on Dual Transmission of Causal Knowledge
By employing a dual causal knowledge transfer method and utilizing variational mode decomposition and causal consistency loss, a lightweight deployment and high-precision prediction of hydrological prediction models on edge devices were achieved. This solved the problems of physical consistency and privacy protection in hydrological prediction and adapted to the dynamic changes in watershed hydrological patterns.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HOHAI UNIV
- Filing Date
- 2026-04-25
- Publication Date
- 2026-07-31
AI Technical Summary
Existing hydrological prediction methods suffer from problems such as lack of physical consistency in data processing and modeling, insufficient privacy protection, and difficulty in deploying lightweight models, making them particularly unsuitable for remote mountainous areas and other environments with poor communication.
We employ a dual-transfer approach to causal knowledge, obtaining intrinsic mode function components through variational mode decomposition, learning global causal relationships in the cloud and training a teacher LSTM model, and deploying lightweight student LSTM models at edge nodes. By combining causal consistency loss and structured pruning, we achieve the internalization and solidification of causal knowledge.
It solves the problem of loss of physical consistency in hydrological forecasting, provides quantifiable privacy protection, improves the prediction accuracy and robustness of the model in resource-constrained environments, and adapts to the dynamic changes in watershed hydrological patterns.
Smart Images

Figure CN122491576A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of hydrological forecasting and artificial intelligence technology, specifically relating to a hydrological time series prediction method and system based on the dual transmission of causal knowledge. Background Technology
[0002] Accurate forecasting of hydrological time series data (such as river flow, water level, and rainfall) is a core technological support for flood control and disaster reduction, water resource allocation, and water security. With the popularization of Internet of Things (IoT) technology, a large number of hydrological monitoring sensors have been deployed in the basin, providing a rich data foundation for data-driven forecasting models.
[0003] However, existing hydrological prediction methods face the following shortcomings in engineering applications: 1) Lack of physical consistency between data processing and modeling: Hydrological sequences have strong non-stationarity and multi-scale coupling characteristics. Existing research introduces variational mode decomposition (VMD) to form a "decomposition-prediction-integration" paradigm, but generally treats the intrinsic mode function (IMF) components after decomposition as independent variables, ignoring the dynamic causal relationship between components. At the same time, pure data-driven models lack physical constraints and are prone to producing prediction results that violate hydrological physics. 2) The dual contradiction between communication efficiency and privacy protection: Traditional centralized architectures require uploading raw hydrological data, resulting in high communication overhead and the risk of data leakage; although federated learning only uploads model gradients, the gradients can be used to infer the original data, resulting in incomplete privacy protection. Moreover, gradient transmission still brings considerable communication overhead, making it difficult to apply in remote mountainous areas and other scenarios with poor communication. 3) The challenge of adapting lightweight models to edge deployment: High-performance deep learning models have a large number of parameters and cannot be directly deployed on resource-constrained edge monitoring devices; existing model compression methods (such as blind pruning and quantization) often come at the cost of loss of prediction accuracy and do not take into account hydrological and physical laws, so the compressed model is prone to losing core features. Summary of the Invention
[0004] The purpose of this invention is to provide a hydrological time series prediction method and system based on the dual transmission of causal knowledge, in order to solve the above-mentioned technical problems.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: A hydrological time series forecasting method based on dual causal knowledge transfer includes the following steps: Step S1: Each edge node performs variational mode decomposition on the locally collected hydrological time series data to obtain n intrinsic mode function (IMF) components, denoted as IMF. i,j Where i is the edge node number and j is the IMF component number, j=1,2,...,n; Step S2: The cloud server collects the IMF components uploaded by each edge node, uses the PCMCI causal discovery algorithm to learn the global static causal relationships between the IMF components, and constructs a causal directed acyclic graph. and the causal coupling matrix M; the elements M of the causal coupling matrix M p,q M represents the strength of the causal influence of IMF component p on IMF component q. p,q Calculated based on partial correlation coefficient; Step S3: The cloud server trains the teacher LSTM model based on all component sequences and the causal coupling matrix M. The causal coupling matrix M serves as the prior weights of the attention mechanism to guide the teacher LSTM model in learning. The teacher LSTM model outputs continuous prediction values for future time moments as soft labels. Step S4: Internalization of Causal Knowledge: Deploy a lightweight student LSTM model at each edge node, and learn the predicted values output by the teacher LSTM model through knowledge distillation (using mean squared error); at the same time, introduce causal consistency loss to force the student LSTM model to learnable local component coupling matrix M. local The submatrix M corresponding to the local node in the global causal coupling matrix M provided by the approximation teacher LSTM model sub This allows global causal knowledge to be passed to the student LSTM model in the form of soft constraints; Step S5: Consolidation of causal knowledge: Based on the global causal directed acyclic graph obtained in step S2, the student LSTM model is structurally pruned. For any IMF component j, if the component is not a cause of any other component (i.e., there are no outgoing edges), all its corresponding input connection weights are reset to zero and fixed; otherwise, they are retained, so that the internalized causal knowledge is consolidated into the physical connection architecture of the student LSTM model in the form of hard rules. Step S6: Each edge node uses the pruned student LSTM model to make real-time predictions of local hydrological time series, outputs the prediction results, and compares the prediction results with the preset warning threshold to trigger tiered warnings; Step S7: The cloud server periodically retrains the teacher's LSTM model using newly added global hydrological historical data, and distributes the updated soft label distribution and corresponding causal coupling matrix to each edge node to realize continuous updating of causal knowledge and dynamic optimization of the student's LSTM model.
[0006] Further optimization, step S1 specifically includes: Step S11: Each edge node collects local hydrological time series data X at a preset sampling frequency using integrated flow, water level, and rainfall sensors. raw (t) The data is subjected to outlier removal, linear interpolation completion, moving average filtering, and normalization preprocessing in sequence to obtain the preprocessed data X. norm(t); Step S12: Use the variational mode decomposition (VMD) algorithm with customized parameters to analyze X. norm (t) is decomposed, and the VMD algorithm parameters include: number of decomposed modes n, penalty factor α1, convergence threshold ε1, and maximum number of iterations Nmax; by initializing the center frequency ωk and weight vector uk of each IMF component, uk and ωk are iteratively updated until the convergence condition is met, and n mutually orthogonal intrinsic mode functions (IMF) components are output, denoted as IMF. i,j Where i is the unique identifier of the edge node, j is the IMF component number, j∈[1,n], and each IMF i,j The hydrophysical process corresponds to a single frequency, and its dimension is consistent with the original sequence.
[0007] Further optimization, the iterative update process of the VMD algorithm is as follows: S121: Fix the center frequency ωk of each IMF component, construct the objective function of the variational problem, minimize the bandwidth weighted sum of each IMF component, and solve to update each IMF component uk; S122: Fix the updated IMF component uk, and update the center frequency ωk of each component to the centroid of its power spectrum; S123: Calculate the mean square error of each IMF component before and after iteration. If the mean square error is less than the convergence threshold ε1 or the number of iterations reaches the maximum number of iterations N, then... max Stop the iteration and output n IMF components; otherwise, return to step S121 to continue the iteration.
[0008] Further optimization, step S2 specifically includes: Step S21: Each edge node performs an analysis of the IMF component generated in step S1. i,j Perform differential privacy perturbation: Preset privacy budget ε2, calculate the global sensitivity Δf = max(IMF) of the IMF component. i,j )−min(IMF i,j The Laplace noise scaling parameter λ is determined based on λ=Δf / ε2. Independent and identically distributed Laplace noise L(0,λ) is added to the IMF component data at each time stamp to obtain the perturbation component. The retention rate of the core frequency characteristics of the components was verified by power spectrum analysis.
[0009] Step S22: Each edge node will The data is uploaded to the cloud server via an HTTPS / TLS 1.3 encrypted channel. The cloud server verifies the data format, time series length, and number of components. It then performs time series interpolation and alignment on all components based on the unified timestamp of the watershed and calculates the global mean μ of IMF components with the same number. j and global standard deviation σ jZ-score standardization yields: ; Step S23: The cloud server uses the PCMCI causal discovery algorithm to mine... The global causal relationship specifically includes: Step S231: PC phase: Set the maximum lag order τ max =5 hours, using the partial correlation coefficient as the test statistic and the significance level α2=0.05, perform conditional independence tests on any two IMF components, screen the potential causal parent set of each component and simplify it; Step S232: MCI stage: Perform a permutation test on the conditional independence of the potential causal components at the execution time to determine the causal direction; calculate the causal strength through the partial correlation coefficient, and take the maximum absolute value of the partial correlation coefficient under different lags as the causal strength.
[0010] Step S24: The cloud server constructs a global causal directed acyclic graph (DAG) based on the PCMCI results, ensuring that the graph structure is acyclic and conforms to the unidirectional causal logic of hydrophysical processes; the DAG is then transformed into an n×n causal coupling matrix M, where M... p,q The partial correlation coefficient causal strength of IMF component p with respect to q is calculated, and the submatrix M corresponding to each edge node is extracted. sub,i This completes the preparation for storing and distributing the causal structure.
[0011] Further optimization, step S3 specifically includes: Step S31: Construct a teacher LSTM model with an encoder-decoder architecture on the cloud server: the input layer dimension matches the number of IMF components n; the encoder LSTM layer is set to a single layer with a hidden layer dimension of 64 and dropout=0.2; the decoder LSTM layer is set to a single layer with a hidden layer dimension of 64 and dropout=0.2; the output layer dimension is equal to the number of stations and the activation function is linear; the input sequence length is T. in Set to 24 hours, output sequence length T out Set to 1 hour.
[0012] Step S32: Normalize the M rows of the causal coupling matrix generated in step S2 to obtain the causal attention prior weights W. causal =softmax(M), which sets the hidden state H output by the encoder LSTM layer. enc and Matrix multiplication yields the hidden state H of the fused causal prior. fusion During training, W is allowed causal The learning rate was slightly adjusted to 0.001.
[0013] Step S33: Divide the standardized full IMF component sequence into training set, validation set and test set in an 8:1:1 ratio, use AdamW optimization, train the model with mean squared error as the loss function, and enable the early stopping strategy based on validation loss.
[0014] Step S34: After the teacher model is trained, it outputs continuous predicted values for the test set samples. These continuous predicted values serve as soft labels for subsequent knowledge distillation in the student model. The soft labels are stored in NumPy array format.
[0015] Further optimization, step S4 specifically includes: Step S41: Each edge node deploys the lightweight student LSTM model to the edge computing unit in ONNX format. The model architecture is as follows: the input layer dimension matches the number of local IMF components n, the LSTM layer is set to a single layer, the hidden layer dimension is 128, dropout=0.1, a lightweight causal attention layer with a dimension of n×128 is added, the output layer dimension is 1 and the activation function is linear; INT8 quantization compression is enabled to ensure that the model inference latency is ≤100ms.
[0016] Step S42: The edge node splits the locally normalized IMF components into a 24-hour input window and a 1-hour output window, aligning them with the time window of the teacher model soft label matrix SL distributed from the cloud. The distillation loss uses the mean squared error (MSE), calculating the MSE between the student model's predicted value and the teacher's soft label. The teacher model parameters are fixed, and training is performed with the goal of minimizing the distillation loss.
[0017] Step S43: Edge nodes learn the local component coupling matrix M through a causal attention layer. local The dimension is n×n, and the local node receives the submatrix M corresponding to the global causal coupling matrix M sent from the cloud. sub Calculate causal consistency loss And this loss is backpropagated to the causal attention layer; in M is the Frobenius norm. local M is the local component coupling matrix estimated by the student LSTM model through the causal attention layer. sub is the submatrix in the global causal coupling matrix M corresponding to the local node.
[0018] Step S44: Construct the total loss function L total =λ1L MSE +λ2L distill +λ3L causal Where λ1 is the mean square error of the hard label L MSE The weight, λ 2、λ3 is the balance coefficient; lightweight Adam optimization is adopted, the batch size is set to 64, the training epochs are 300, and early stopping based on validation loss (stopping if the validation loss does not decrease for 50 consecutive epochs) is used to realize the internalization of global causal knowledge in the form of soft constraints.
[0019] Further optimization is achieved by the following specific process for structured pruning in step S5: Step S51: Pruning Mask Generation: Based on the global causal directed acyclic graph G, generate a binary mask matrix Ω with the same dimension as the LSTM input weight matrix W, where the matrix element Ωj=1 if and only if the IMF component j has an outgoing edge (i.e., j is a factor of any other component), otherwise Ωj=0.
[0020] Step S52: Weight Freeze: Multiply the mask matrix Ω element-wise with the input weight matrix W of the student LSTM model LSTM unit to obtain the pruned weight matrix W′=Ω⊙W, where ⊙ is the element-wise multiplication operation, and the weights set to zero are fixed and do not participate in the calculation in subsequent inference.
[0021] Step S53: During the subsequent inference and fine-tuning of the model, the gradient of the zero weights is forced to be 0 and does not participate in parameter updates; the pruned model is compressed into TensorRT format to verify the pruning effect: the number of parameters ≤ 40% before pruning, the local prediction NSE decreases by ≤ 2%, and the causal matching degree is ≥ 95%. If the verification is successful, the causal knowledge is solidified in the form of hard rules.
[0022] Further optimization includes the following sub-steps in step S6: S61: Each edge node performs lightweight preprocessing on the raw hydrological data acquired in real time, and uses a lightweight VMD algorithm with preloaded parameters to quickly decompose and obtain the latest 24-hour local IMF components. .
[0023] S62: Will Input the pruned student model, enable TensorRT inference acceleration, output the hydrological time series prediction value and 95% confidence interval for the next hour, and denormalize the prediction value to the real physical dimensions. The single inference latency is ≤50ms.
[0024] S63: Compare the inverse normalized predicted value with the preset multi-level warning thresholds (blue / yellow / orange / red), and trigger the corresponding level of warning according to the principle of "choosing the higher threshold".
[0025] S64: Edge nodes output early warning information locally via audible and visual alarms and LCD screens, while simultaneously uploading the early warning information to the cloud monitoring platform and storing early warning records for the past 7 days locally, thus completing real-time prediction and tiered early warning.
[0026] A hydrological time series prediction system based on dual transmission of causal knowledge is used to implement the above method, including an edge monitoring node layer and a cloud collaboration layer.
[0027] The edge monitoring node layer contains multiple edge monitoring nodes, each node including: The data acquisition and VMD decomposition module is used to acquire local hydrological time series data in real time and perform variational mode decomposition to obtain intrinsic mode function (IMF) components. The student LSTM model module is used to deploy a lightweight student LSTM model for real-time hydrological time series prediction based on local IMF components. The causal knowledge internalization module is used to introduce causal consistency loss during the knowledge distillation training process, enabling the student LSTM model to learn the global causal structure and achieve the internalization of causal knowledge. The causal knowledge solidification module is used to perform structured pruning on the student LSTM model based on the global causal directed acyclic graph issued by the cloud collaboration layer, thereby solidifying causal knowledge; the hierarchical early warning module is used to compare the prediction results of the student LSTM model with the preset early warning threshold, and trigger the corresponding level of hydrological early warning based on the comparison results.
[0028] The cloud-based collaboration layer is deployed on the central server and includes: The PCMCI causal discovery module is used to collect the IMF components uploaded by each edge monitoring node, run the PCMCI causal discovery algorithm, learn the global static causal relationship between each IMF component, and construct a causal directed acyclic graph and a causal coupling matrix. The teacher LSTM model module is used to train a teacher LSTM model based on all component sequences and the causal coupling matrix, and output the soft label distribution of the predicted values at future time points. The causal knowledge distribution module is used to distribute the soft label distribution of the teacher's LSTM model and the corresponding causal coupling matrix to each edge monitoring node; The model update management module is used to control the periodic retraining of the teacher's LSTM model, as well as the updating and distribution of global causal knowledge; The communication layer connects the edge monitoring node layer and the cloud collaboration layer to enable data interaction. The transmitted data includes the IMF components uploaded by the edge monitoring nodes, the soft tag distribution and causal coupling matrix distributed by the cloud collaboration layer; the original hydrological time series data and model gradients do not leave the local edge monitoring node.
[0029] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the above-described method.
[0030] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention proposes a dual causal knowledge transfer mechanism of "internalization first, then solidification". By using causal consistency loss, global causal knowledge is integrated into the student model parameters in the form of soft constraints, allowing the model to understand hydrophysical laws. Then, through causal-guided structured pruning, causal knowledge is solidified into the physical connection architecture of the model in the form of hard rules, forming a complete causal knowledge transfer chain. This solves the problem of physical consistency loss in the existing decomposition-prediction framework and ensures that the lightweight model strictly follows hydrophysical laws.
[0031] 2. This invention provides quantifiable privacy protection by uploading only the IMF components perturbed by differential privacy (the frequency domain abstraction of the original data, which is difficult to invert) at the edge nodes, and the perturbation process strictly satisfies the ε-differential privacy definition; the cloud only sends the causal coupling matrix and soft label matrix, without any original data information, and the original hydrological data and model gradients do not leave the local edge nodes throughout the process. Compared with the gradient transmission method of federated learning, the level of privacy protection is greatly improved.
[0032] 3. In the S4 internalization stage, the present invention retains all weighted connections through the student model, which can fully learn the unique features of local data and conform to the global hydrophysical laws under the constraint of causal consistency loss. In the S5 pruning stage, only weighted connections without causal significance and value are deleted, realizing the organic combination of global laws and local features. This allows the model to still have good generalization ability and robustness when local data is limited, data quality is degraded, or hydrological series are non-stationary. The prediction accuracy is significantly better than that of traditional baseline models.
[0033] 4. This invention retrains the teacher model in the cloud using an incremental training method at a preset cycle, updates global causal knowledge and soft labels, and transmits them to edge nodes in an incremental manner; the edge nodes only perform lightweight fine-tuning on the non-zero weights in the student model, avoiding the overwriting of causal knowledge, so that the model always adapts to the dynamic changes of the watershed hydrological laws and ensures the stability of long-term prediction accuracy.
[0034] 5. The present invention features a clear edge-cloud collaborative architecture with decoupled functional modules, eliminating the need for large-scale replacement of existing hydrological monitoring hardware. Only software upgrades to the edge computing unit and cloud server are required, reducing the cost of engineering application and deployment. Furthermore, the core causal knowledge dual transmission mechanism and frequency domain-knowledge dual-layer privacy protection method are not only applicable to hydrological time series prediction but can also be directly extended to other non-stationary spatiotemporal series prediction fields such as power load, traffic flow, and air quality, demonstrating broad application prospects. Attached Figure Description
[0035] Figure 1 This is an overall flowchart of the hydrological time series prediction method based on the dual transmission of causal knowledge of the present invention; Figure 2This is an architecture diagram of the hydrological time series prediction system based on the dual transmission of causal knowledge of the present invention; Figure 3 A schematic diagram of the IMF components of VMD decomposition at each site; Figure 4 This is an example of a causal directed acyclic graph; Figure 5 This is a heatmap of the causal coupling matrix; Figure 6 Loss curve for training the teacher model; Figure 7 The training loss for student models at each site; Figure 8 A comparison chart of predictions for each site; Figure 9 This is a schematic diagram of a cause-and-effect guided structured pruning process, in which... Figure 9 (a) is an example of a cause-effect graph. Figure 9 (b) is a schematic diagram of the mask matrix. Figure 9 (c) is a schematic diagram of the weight matrix after pruning; Figure 10 This is a comparison chart of the prediction accuracy of the method of the present invention and existing comparative methods; Detailed Implementation
[0036] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. These embodiments are implemented based on the technical solution of the present invention, providing specific implementation methods and operating procedures; however, the scope of protection of the present invention is not limited to the following embodiments.
[0037] Example 1: This example uses hydrological time-series forecasting of the main stream and major tributaries of the Yangtze River as an example, employing a hydrological time-series forecasting method based on the dual transfer of causal knowledge, such as... Figure 1 , 2 As shown, the specific implementation steps are as follows: Step S1: Local data preprocessing and VMD decomposition at edge nodes Each edge node performs variational mode decomposition (VMD) on the locally acquired raw hydrological sequence, decomposing the sequence into: ; in, i Number the edge nodes. j For IMF component numbering, IMF i,j (t) is the th i The node j eigenmode components, This is a residual term.
[0038] In this embodiment, representative hydrological stations on the main stream and major tributaries of the Yangtze River are selected. Based on relevant research in the Daqing River basin, selecting eight hydrometeorological factors (air pressure, water temperature, relative humidity, precipitation, sunshine duration, ground temperature, wind speed, and water level) as input variables and flow rate as the output variable can effectively predict river flow. This embodiment selects five stations with good data integrity from the dataset, ensuring that each station has continuous water level and flow rate records from 2020 to 2022. The stations are distributed across different sections of the upper, middle, and lower reaches of the Yangtze River to reflect the spatial heterogeneity of the basin's hydrological characteristics. One edge node is deployed for each hydrological station, with a one-to-one correspondence between the two.
[0039] Data from 2020-2021 was used for model training, and data from 2022 was used for testing and validation. A sliding window method was used to construct the samples: the input window length T... in =24 hours, prediction window length T out =1 hour. Before performing variational mode decomposition on the original flow sequence, normalization is performed to map the data to the [0,1] interval.
[0040] Based on the characteristics of the hydrological sequence, the mode number n=5, the penalty factor α1=2000, and the convergence threshold ε1=10 are set. -6 The maximum number of iterations, N_max, is 500. The decomposition yields 5 sets of mutually orthogonal IMF components, arranged in descending order of frequency. To clearly demonstrate the decomposition effect, Figure 3 Taking site 0 as an example, the curves for its five IMF components are shown, with subplots (a) to (e) corresponding to the first through fifth IMF components of site 0, respectively. As can be seen from the figures, the IMF... 0,1 and IMF 0,2 These are high-frequency components, corresponding to a rapid response in rainfall-runoff; IMF 0,3 and IMF 0,4 The mid-frequency component reflects the watershed confluence process; IMF 0,5 The low-frequency trend component reflects seasonal variation. The components are orthogonal to each other, effectively separating hydrological processes at different time scales. The IMF components for the remaining stations exhibit similar multi-scale characteristics, which will not be presented individually due to space limitations.
[0041] Step S2: Cloud-based causal discovery and causal coupling matrix construction Each edge node to IMF i,j Differential privacy protection is achieved by adding Laplace noise with a privacy budget of ε². The components are then uploaded to a cloud server, specifically including: First, calculate the global sensitivity of a single component: Δf = max(IMF) i,j )-min(IMF i,j ); Next, determine the noise scale: λ = Δf / ε²; The privacy budget ε2 = 1.0 is used to add independent and identically distributed Laplace noise L(0,λ) at each time point of the component sequence, resulting in the perturbation component IMF. i,j noise (t).
[0042] After receiving the perturbation data in the cloud, it performs Z-score standardization: IMF i,j std (t)=(IMF i,j noise (t)-μ j ) / σ j ; In the formula μ j Let σ be the global mean of the j-th order IMF component. j This represents the global standard deviation.
[0043] Subsequently, the cloud-based PCMCI causal discovery algorithm was used to learn the global static causal relationships between the components. The maximum lag order τ was set to 5 hours, and the significance level α² = 0.05. Causal parent sets were selected through partial correlation conditional independence tests. Partial correlation coefficients were calculated in the MCI stage, and the maximum absolute value of the partial correlation coefficients at different lag orders was taken as the causal strength. An n×n causal coupling matrix M was constructed, with matrix elements defined as follows: ; in Z is the partial correlation coefficient, and Z is the condition set (historical values of other IMF components).
[0044] Finally, a global causal directed acyclic graph is obtained. Figure 4 ) and causal coupling matrix ( Figure 5 ).in, Figure 4 This demonstrates the global causal relationships among 25 IMF components (5 sites × 5 IMFs). For example, IMF0,0 represents the 0th high-frequency IMF component at site 0, and IMF4,4 represents the 4th low-frequency IMF component at site 4. Figure 4As can be seen, there is a bidirectional causal relationship between upstream stations (0, 1) and downstream stations (2, 3, 4). This includes both dominant edges where the upstream influences the downstream (e.g., IMF0,0→IMF1,2, IMF1,0→IMF2,0) and feedback edges where the downstream points back to the upstream (e.g., IMF2,0→IMF1,0, IMF4,0→IMF0,0). Furthermore, cross-frequency coupling is prevalent among IMF components of different frequencies within each station (e.g., IMF0,2→IMF0,3), and cross-station and cross-frequency interactions are widespread (e.g., IMF0,0→IMF1,2). This causal network conforms to hydrophysical laws and captures the feedback and multi-scale characteristics of the actual system, providing reliable prior knowledge for subsequent models.
[0045] Figure 5 This is a heatmap of the causal coupling matrix, with 25 nodes on both the horizontal and vertical axes. The vertical axis is arranged from top to bottom as follows: stations IMF0,0~IMF0,4, stations IMF1,0~IMF1,4, ..., stations IMF4,0~IMF4,4. Every 5 nodes are labeled (i.e., IMF0 for each station) to maintain readability. Lighter colors indicate stronger causal strength, and the diagonal is 0 (excluding self-causality). According to the coupling matrix values, the strongest causal edge appears between IMF1,2 and IMF4,1 (both with a bidirectional strength of 0.064), indicating a strong mutual influence of mid-frequency components between midstream and downstream stations. Furthermore, the causal effects of upstream stations on downstream stations (e.g., IMF0,0→IMF1,2 strength 0.042, IMF1,0→IMF2,0 strength 0.040) and the low-frequency influence on high-frequency influence within a station (e.g., IMF0,4→IMF0,0 strength 0.045) are all shown in significantly darker colors. This matrix provides reliable prior knowledge for subsequent attention guidance in the teacher model and causal constraints in the student model.
[0046] Step S3: Cloud-based teacher model training and soft tag generation The cloud server trains an encoder-decoder architecture teacher LSTM model based on all component sequences and the causal coupling matrix M, with the historical input T as the input. in =24-hour component data, output future T out =1-hour prediction results.
[0047] The causal coupling matrix M obtained in step 2 is normalized and embedded as an attention prior weight into the model's hidden layer. This guides the model to prioritize learning feature interactions with physical causal relationships, improving the physical plausibility of the predictions. The causal coupling matrix is then fused with the LSTM hidden state as attention weights to output continuous predicted values as soft labels.
[0048] The training objective of the teacher model is to minimize the mean squared error loss. ; in These are the model's predicted values. This represents the actual traffic volume.
[0049] The training process employs an early stopping strategy to ensure the model has high generalization performance. Figure 6 The graph shows the loss curves during the training of the teacher model. The horizontal axis represents the number of training epochs, and the vertical axis represents the loss value. As can be seen from the graph, both the training loss and validation loss decrease rapidly in the first 50 training epochs; afterwards, they tend to converge smoothly, with the validation loss eventually stabilizing at a low level (approximately 3800). Furthermore, the difference between the training loss and validation loss is small, indicating no significant overfitting. This demonstrates that the teacher model has fully learned the global hydrological features and can provide high-quality soft labels for subsequent student models. After training, the teacher model outputs continuous prediction values, which serve as soft labels for knowledge distillation in subsequent student models.
[0050] To quantitatively evaluate the predictive performance of the teacher model, this embodiment adopts standard evaluation indicators from the field of hydrological forecasting, specifically: 1) Nash efficiency coefficient (NSE): reflects the model's prediction accuracy, and is calculated using the following formula: ; The NSE value ranges from [-∞, 1], and the closer it is to 1, the more accurate the prediction.
[0051] 2) Root Mean Square Error (RMSE): Reflects the magnitude of prediction error; the calculation formula is: ; RMSE has the same dimensions as the original data; the smaller the value, the smaller the error.
[0052] 3) Mean Absolute Error (MAE): Reflects the absolute error of the prediction, and is calculated using the following formula: .
[0053] The evaluation results of the prediction accuracy of the teacher models at each site are shown in Table 1.
[0054] Table 1 Prediction accuracy for each site
[0055] Table 1 lists the prediction accuracy of each station on the test set. All stations have positive NSE values (0.0761~0.4318), indicating that the prediction performance of the method of this invention is better than simply using historical averages at all stations. Station 4 showed the best prediction performance (NSE=0.4318), while station 3 had a relatively lower NSE (NSE=0.0761), but it was still positive, indicating that the method has universality and stability. Considering that the hydrological data range is 0~100, the RMSE and MAE values are within a reasonable range, and the prediction error is acceptable.
[0056] To verify the effectiveness of the method described in this invention, three sets of comparison methods were set up under a unified dataset, unified input / output window, and unified evaluation index: Method 1. Baseline LSTM: The LSTM model is trained directly based on the original flow sequence without using VMD decomposition.
[0057] Method 2. VMD-LSTM: IMF components are obtained by VMD decomposition, and LSTM models are trained for each component to make predictions and then superimposed.
[0058] Method 3. The method described in this invention: adopts a complete technical solution of VMD decomposition, PCMCI causal discovery, and causal knowledge internalization and solidification.
[0059] By comparison, such as Figure 10 As shown in the figure, the vertical axis represents the Nash efficiency coefficient (NSE), used to measure the accuracy of hydrological prediction. It can be seen from the figure that the baseline LSTM and VMD-LSTM have negative NSE values (-1.178 to -18.665) at all stations, indicating that their prediction performance is worse than the simple historical average. In contrast, the method of this invention achieves positive NSE values (0.076 to 0.432) at all stations, with station 4 showing the best prediction performance (0.432). The results show that this invention significantly improves prediction accuracy through a dual causal knowledge transfer mechanism and outperforms the comparative methods at all test stations.
[0060] Step S4: Internalization of causal knowledge (first level of transmission) A lightweight student LSTM model is deployed at each edge node. Through knowledge distillation and causal constraints, causal knowledge internalization is achieved, enabling the student model to learn global physical laws at the parameter level. Its input consists only of the five IMF components of the local node. The student model structure is a simplified LSTM: 128 hidden layers. .
[0061] The student model is trained using a knowledge distillation framework, and the loss function consists of three parts: ; in: Hard label mean square error (measured value constraint): ; Distillation loss mean square error (teacher knowledge distillation): ; Causal consistency loss (global causality constraint): ; In the formula M is the Frobenius norm. local M is the local component coupling matrix estimated by the student LSTM model through the causal attention layer. sub is the submatrix in the global causal coupling matrix M corresponding to the local node.
[0062] In this embodiment, λ1 = 1.0, λ2 is set to 0.6, and λ3 is set to 0.8. During the student model training process, the teacher model parameters are fixed, and only the student model parameters are updated to complete the internalization of causal knowledge. Figure 7 The loss curves for student models at each site are shown, with the horizontal axis representing the training epoch and the vertical axis representing the loss value. Figures (a) to (e) correspond to the student model training loss curves for sites 0 to 4, respectively, including the training loss (blue curve) and validation loss (orange curve). The loss curves for each site show that the loss value at all sites decreases rapidly in the early stages of training, then gradually stabilizes, eventually converging to a low level. The difference between the training loss and the validation loss is small, and there is no significant increase in the validation loss, indicating that the model has not overfitted. Among them, sites 2 and 4 show the fastest rate of loss decrease and the lowest loss value after convergence, consistent with the high prediction accuracy of these two sites (NSE 0.3140 and 0.4318, respectively). The loss decrease at sites 0, 1, and 3 is slightly slower, and the loss value after convergence is slightly higher, but the overall trend is stable. Overall, the loss curves for all sites verify the effectiveness of the causal knowledge internalization training strategy, and the student models have successfully learned the global causal structure.
[0063] Step S5: Consolidation of causal knowledge (secondary transmission) Based on the global causal directed acyclic graph G obtained in step S2, the student LSTM model is structurally pruned to solidify the internalized causal knowledge into the physical connection architecture of the model in the form of hard rules. The specific process is as follows: Based on the global causal directed acyclic graph G, generate a binary mask matrix Ω with the same dimension as the LSTM input weight matrix W, where the matrix elements satisfy: Ωj=1 if and only if the IMF component j has an outgoing edge, i.e., j is a factor of any other component, otherwise Ωj=0.
[0064] The mask matrix Ω is multiplied element-wise with the input weight matrix W of the LSTM unit of the student LSTM model to obtain the pruned weight matrix W′=Ω⊙W, where ⊙ represents the element-wise multiplication operation.
[0065] The pruning operation is performed after the distillation training in step S4. After pruning, the weights set to zero are fixed at 0; only weights with physical causal significance are retained and do not participate in subsequent calculations and updates. For example... Figure 9 As shown, Figure 9 This is a schematic diagram of a cause-and-effect guided structured pruning process, in which... Figure 9 (a) is an example of a causal graph, showing the causal direction between input features (e.g., IMF1 points to IMF2 and IMF3). Figure 9 (b) is a schematic diagram of the mask matrix. The binary mask is generated based on the cause-effect graph. White represents retention and black represents pruning, which reflects the pruning strategy of "retaining input features with outgoing edges". Figure 9 (c) is a schematic diagram of the pruned weight matrix. After multiplying the mask matrix element-wise with the original weights, the pruned weights are reset to zero, retaining only connections with physical causal significance. This reduces the number of model parameters while ensuring that the model structure strictly follows hydrophysical laws. After solidification, the number of model parameters is significantly reduced, and the model strictly follows hydrophysical laws, avoiding noise interference caused by meaningless connections.
[0066] Step S6: Real-time forecasting and tiered early warning Edge nodes utilize a lightweight student model that has undergone pruning and solidified causal knowledge to perform real-time hydrological time series forecasts. Inputting the latest 24-hour local IMF components, the model outputs the predicted flow rate and confidence interval for the next hour. Figure 8 The diagram shows a comparison between the actual and predicted values for the first 200 time steps on the test set for each station. Subplots (a) to (e) correspond to the prediction comparisons for stations 0 to 4, with the horizontal axis representing time steps and the vertical axis representing flow values. It should be noted that, to more clearly illustrate the trend of the sequence, both the actual and predicted value curves in the diagrams have been smoothed using moving averages (smoothing window = 20) to filter out some high-frequency noise. As can be seen from the diagrams, the predicted curve (orange) reflects the overall trend of the actual flow (blue), and is in phase synchronization for most periods, but there is a certain degree of numerical deviation. This is mainly attributed to the strong randomness and non-stationarity of the hydrological sequence, as well as the noise and random causal effects introduced into the simulation data, making accurate point-by-point prediction inherently difficult. Nevertheless, the Nash efficiency coefficient (NSE) for all stations is positive (0.076–0.432), indicating that the prediction performance is better than the simple historical average; and significantly better than the baseline LSTM and VMD-LSTM (both with negative NSE). The predicted curves for stations 2 and 4 showed good agreement with the actual values, with NSE values of 0.3140 and 0.4318, respectively. The predicted trends for stations 0, 1, and 3 were correct, with errors within an acceptable range. In summary, the method of this invention effectively learns the dynamic patterns of the hydrological sequence and outperforms the comparative methods in both prediction accuracy and physical consistency.
[0067] After being denormalized to its true physical dimensions, the data is compared with a preset warning threshold, and the corresponding warning level is triggered according to the principle of "choosing the higher threshold." The warning level is determined based on historical flood frequency analysis, and the specific settings are as follows: Blue alert: Forecast traffic flow exceeds the 5-year return period standard; Yellow alert: Forecasted flow exceeds the 10-year return period standard; Orange alert: Forecasted flow exceeds the 20-year return period standard; Red alert: The predicted flow rate exceeds the 50-year return period standard.
[0068] Overall performance comparison: The methods were validated on the same test set. The results showed that the baseline LSTM model did not consider the non-stationary characteristics of the hydrological sequence and had low prediction accuracy. The VMD-LSTM model improved some performance through multi-scale decomposition, but did not incorporate physical causal constraints. The method of this invention relies on the dual transfer mechanism of causal knowledge. While ensuring lightweight deployment, the prediction accuracy and physical consistency are significantly better than traditional methods, and the overall performance is the best.
[0069] Step S7: Regularly update the cloud-based teacher model. To ensure the model continuously adapts to the dynamic changes in the watershed's hydrological patterns, the cloud server employs an incremental learning strategy. Each month, it retrains the teacher's LSTM model using newly added global historical hydrological data, updating the global causal structure, causal coupling matrix, and soft labels. This updated knowledge is then distributed to each edge node. Edge nodes only perform lightweight fine-tuning on the non-frozen weights, optimizing the model while preserving the already solidified causal knowledge. This achieves dynamic iteration of causal knowledge and stable long-term prediction accuracy.
[0070] Example 2: A hydrological time series prediction system based on dual causal knowledge transfer, used to implement the method in Example 1, including an edge monitoring node layer and a cloud collaboration layer.
[0071] The edge monitoring node layer contains multiple edge monitoring nodes, each node including: The data acquisition and VMD decomposition module is used to acquire local hydrological time series data in real time and perform variational mode decomposition to obtain intrinsic mode function (IMF) components. The student LSTM model module is used to deploy a lightweight student LSTM model for real-time hydrological time series prediction based on local IMF components. The causal knowledge internalization module is used to introduce causal consistency loss during the knowledge distillation training process, enabling the student LSTM model to learn the global causal structure and achieve the internalization of causal knowledge. The causal knowledge solidification module is used to perform structured pruning on the student LSTM model based on the global causal directed acyclic graph issued by the cloud collaboration layer, thereby solidifying causal knowledge; the hierarchical early warning module is used to compare the prediction results of the student LSTM model with the preset early warning threshold, and trigger the corresponding level of hydrological early warning based on the comparison results.
[0072] The cloud-based collaboration layer is deployed on the central server and includes: The PCMCI causal discovery module is used to collect the IMF components uploaded by each edge monitoring node, run the PCMCI causal discovery algorithm, learn the global static causal relationship between each IMF component, and construct a causal directed acyclic graph and a causal coupling matrix. The teacher LSTM model module is used to train a teacher LSTM model based on all component sequences and the causal coupling matrix, and output the soft label distribution of the predicted values at future time points. The causal knowledge distribution module is used to distribute the soft label distribution of the teacher's LSTM model and the corresponding causal coupling matrix to each edge monitoring node; The model update management module is used to control the periodic retraining of the teacher's LSTM model, as well as the updating and distribution of global causal knowledge; The communication layer connects the edge monitoring node layer and the cloud collaboration layer to enable data interaction. The transmitted data includes the IMF components uploaded by the edge monitoring nodes, the soft tag distribution and causal coupling matrix distributed by the cloud collaboration layer; the original hydrological time series data and model gradients do not leave the local edge monitoring node.
[0073] Example 3: A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.
[0074] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A hydrological time-series forecasting method based on dual causal knowledge transfer, characterized in that, Includes the following steps: Step S1: Each edge node performs variational mode decomposition on the locally collected hydrological time series data to obtain n intrinsic mode function (IMF) components, denoted as IMF. i,j Where i is the edge node number and j is the IMF component number, j=1,2,...,n; Step S2: The cloud server collects the IMF components uploaded by each edge node, uses the PCMCI causal discovery algorithm to learn the global static causal relationships between the IMF components, and constructs a causal directed acyclic graph. and the causal coupling matrix M; the elements M of the causal coupling matrix M p,q M represents the strength of the causal influence of IMF component p on IMF component q. p,q Calculated based on partial correlation coefficient; Step S3: The cloud server trains the teacher LSTM model based on all component sequences and the causal coupling matrix M, and outputs continuous prediction values for future time moments as soft labels. Step S4: Internalization of Causal Knowledge: Deploy a lightweight student LSTM model at each edge node to learn the predicted values output by the teacher LSTM model through knowledge distillation; simultaneously, introduce causal consistency loss to force the student LSTM model to learn the local component coupling matrix M. local Approximate the submatrix M corresponding to the local node in the global causal coupling matrix M. sub This allows global causal knowledge to be passed to the student LSTM model in the form of soft constraints; Step S5: Consolidation of causal knowledge: Based on the global causal directed acyclic graph G obtained in step S2, the student LSTM model is structurally pruned. For any IMF component j, if the component is not a cause of any other component, i.e. there are no outgoing edges, then all the corresponding input connection weights are reset to zero and fixed; otherwise, they are retained, so that the internalized causal knowledge is consolidated into the physical connection architecture of the student LSTM model in the form of hard rules. Step S6: Each edge node uses the pruned student LSTM model to make real-time predictions of local hydrological time series, outputs the prediction results, and compares the prediction results with the preset warning threshold to trigger tiered warnings; Step S7: The cloud server periodically retrains the teacher's LSTM model using newly added global hydrological historical data, and distributes the updated soft label distribution and corresponding causal coupling matrix to each edge node to realize continuous updating of causal knowledge and dynamic optimization of the student's LSTM model.
2. The hydrological time-series prediction method based on causal knowledge dual transfer as described in claim 1, characterized in that, Step S1 specifically includes: Step S11: Each edge node collects local hydrological time series data X at a preset sampling frequency using integrated flow, water level, and rainfall sensors. raw (t) The data is subjected to outlier removal, linear interpolation completion, moving average filtering, and normalization preprocessing in sequence to obtain the preprocessed data X. norm (t); Step S12: Use the variational mode decomposition (VMD) algorithm with customized parameters to analyze X. norm (t) is decomposed, and the VMD algorithm parameters include: number of decomposition modes n, penalty factor α1, convergence threshold ε1, and maximum number of iterations N. max By initializing the center frequency ωk and weight vector uk of each IMF component, iteratively updating uk and ωk until the convergence condition is met, and outputting n mutually orthogonal IMF components, denoted as IMF. i,j , j∈[1, n], each IMF i,j The components correspond to the frequency characteristics of different hydrophysical processes.
3. The hydrological time-series prediction method based on dual causal knowledge transfer according to claim 2, characterized in that, The iterative update process of the VMD algorithm is as follows: S121: Fix the center frequency ωk of each IMF component, construct the objective function of the variational problem, minimize the bandwidth weighted sum of each IMF component, and solve to update each IMF component uk; S122: Fix the updated IMF component uk, and update the center frequency ωk of each component to the centroid of its power spectrum; S123: Calculate the mean square error of each IMF component before and after iteration. If the mean square error is less than the convergence threshold ε1 or the number of iterations reaches the maximum number of iterations N, then... max Stop the iteration and output n IMF components; otherwise, return to step S121 to continue the iteration.
4. The hydrological time-series prediction method based on dual causal knowledge transfer according to claim 1, characterized in that, Step S2 specifically includes: Step S21: Each edge node performs an analysis of the IMF component generated in step S1. i,j Perform differential privacy perturbation: Preset privacy budget ε2, calculate the global sensitivity Δf = max(IMF) of the IMF component. i,j )−min(IMF i,j The Laplace noise scaling parameter λ is determined based on λ=Δf / ε2. Independent and identically distributed Laplace noise L(0,λ) is added to the IMF component data at each time stamp to obtain the perturbation component. The retention rate of the core frequency characteristics of the components was verified by power spectrum analysis. Step S22: Each edge node will The data is uploaded to the cloud server via an HTTPS / TLS 1.3 encrypted channel. The cloud server verifies the data format, time series length, and number of components. It then performs time series interpolation and alignment on all components based on the unified timestamp of the watershed and calculates the global mean μ of IMF components with the same ID. j and global standard deviation σ j Z-score standardization yields: ; Step S23: The cloud server uses the PCMCI causal discovery algorithm to mine... The global causal relationship specifically includes: Step S231: PC phase: Set the maximum lag order τ, use the partial correlation coefficient as the test statistic and the significance level α2=0.05, perform conditional independence tests on any two IMF components, screen the potential causal parent set of each component and simplify it; Step S232: MCI stage: Perform a permutation test on the conditional independence of the potential causal components at the execution time to determine the causal direction; calculate the causal strength using the partial correlation coefficient, and take the maximum absolute value of the partial correlation coefficient under different lags as the causal strength; Step S24: The cloud server constructs a global causal directed acyclic graph (DAG) based on the PCMCI results, ensuring that the graph structure is acyclic and conforms to the unidirectional causal logic of hydrophysical processes; the DAG is then transformed into an n×n causal coupling matrix M, where M... p,q The partial correlation coefficient causal strength of IMF component p with respect to q is calculated, and the submatrix M corresponding to each edge node is extracted. sub,i This completes the preparation for storing and distributing the causal structure.
5. The hydrological time-series prediction method based on causal knowledge dual transfer as described in claim 1, characterized in that, Step S3 specifically includes: Step S31: Construct a teacher LSTM model with an encoder-decoder architecture on the cloud server: the input layer dimension matches the number of IMF components n; the encoder LSTM layer is set to a single layer with a hidden layer dimension of 64 and dropout=0.2; the decoder LSTM layer is set to a single layer with a hidden layer dimension of 64 and dropout=0.2; the output layer dimension is equal to the number of stations and the activation function is linear; the input sequence length is T. in Set to 24 hours, output sequence length T out Set to 1 hour; Step S32: Normalize the M rows of the causal coupling matrix generated in step S2 to obtain the causal attention prior weights W. causal =softmax(M), which sets the hidden state H output by the encoder LSTM layer. enc and Matrix multiplication yields the hidden state H of the fused causal prior. fusion During training, W is allowed causal Make minor adjustments with a learning rate of 0.001; Step S33: Divide the standardized full IMF component sequence into training set, validation set and test set in an 8:1:1 ratio, use AdamW optimization, train the model with mean squared error as the loss function, and enable the early stopping strategy based on validation loss. Step S34: After the teacher model is trained, it outputs continuous prediction values for the test set samples. These continuous prediction values are used as soft labels for knowledge distillation of the student model. The soft labels are stored in NumPy array format.
6. The hydrological time-series prediction method based on dual causal knowledge transfer according to claim 1, characterized in that, Step S4 specifically includes: Step S41: Each edge node deploys the lightweight student LSTM model to the edge computing unit in ONNX format. The model architecture is as follows: the input layer dimension matches the local IMF component number n, the LSTM layer is set to a single layer, the hidden layer dimension is 128, dropout=0.1, a lightweight causal attention layer with a dimension of n×128 is added, the output layer dimension is 1 and the activation function is linear; INT8 quantization compression is enabled to ensure that the model inference latency is ≤100ms. Step S42: The edge node divides the local standardized IMF components into an input window of 24 hours and an output window of 1 hour, aligning them with the time window of the teacher model soft label matrix SL distributed from the cloud; the distillation loss uses mean squared error (MSE), and the MSE between the student model prediction and the teacher soft label is calculated; the teacher model parameters are fixed, and training is performed with the goal of minimizing the distillation loss. Step S43: Edge nodes learn the local component coupling matrix M through a causal attention layer. local The dimension is n×n, and the local node receives the submatrix M corresponding to the global causal coupling matrix M sent from the cloud. sub Calculate causal consistency loss And this loss is backpropagated to the causal attention layer; in M is the Frobenius norm. local M is the local component coupling matrix estimated by the student LSTM model through the causal attention layer. sub This is the submatrix in the global causal coupling matrix M corresponding to the local node; Step S44: Construct the total loss function L total =λ1L MSE +λ2L distill +λ3L causal Where λ1 is the mean square error of the hard label L MSE The weight, λ 2、 λ3 is the balance coefficient; lightweight Adam optimization is adopted, the batch size is set to 64, the training epochs are 300, and early stopping based on validation loss is used to realize the internalization of global causal knowledge in the form of soft constraints.
7. The hydrological time-series prediction method based on dual causal knowledge transfer according to claim 1, characterized in that, In step S5, the specific process of structured pruning is as follows: Step S51: Pruning Mask Generation: Based on the global causal directed acyclic graph G, generate a binary mask matrix Ω with the same dimension as the LSTM input weight matrix W. The matrix element Ωj=1 if and only if the IMF component j has an outgoing edge, i.e., j is a factor of any other component; otherwise, Ωj=0. Step S52: Weight Freeze: Multiply the mask matrix Ω element-wise with the input weight matrix W of the LSTM unit of the student LSTM model to obtain the pruned weight matrix W′=Ω⊙W, where ⊙ is the element-wise multiplication operation, and the weights set to zero are fixed and do not participate in the calculation in subsequent inference. Step S53: During the subsequent inference and fine-tuning of the model, the gradient of the zero weights is forced to be 0 and does not participate in parameter updates; the pruned model is compressed into TensorRT format to verify the pruning effect: the number of parameters ≤ 40% before pruning, the local prediction NSE decreases by ≤ 2%, and the causal matching degree is ≥ 95%. If the verification is successful, the causal knowledge is solidified in the form of hard rules.
8. The hydrological time-series prediction method based on dual causal knowledge transfer according to claim 1, characterized in that, Step S6 specifically includes the following sub-steps: S61: Each edge node performs lightweight preprocessing on the raw hydrological data acquired in real time, and uses a lightweight VMD algorithm with preloaded parameters to quickly decompose and obtain the latest 24-hour local IMF components. ; S62: Will Input the pruned student model, enable TensorRT inference acceleration, output the hydrological time series prediction value and 95% confidence interval for the next hour, and inverse normalize the prediction value to the real physical dimensions. The single inference latency is ≤50ms. S63: Compare the inverse normalized predicted value with the preset multi-level warning threshold, and trigger the corresponding level of warning according to the principle of "choosing the higher threshold"; S64: Edge nodes output early warning information locally via audible and visual alarms and LCD screens, while simultaneously uploading the early warning information to the cloud monitoring platform and storing early warning records for the past 7 days locally, thus completing real-time prediction and tiered early warning.
9. A hydrological time-series prediction system based on dual causal knowledge transfer, used to implement the method described in any one of claims 1 to 8, characterized in that, include: The edge monitoring node layer contains multiple edge monitoring nodes, each node including: The data acquisition and VMD decomposition module is used to acquire local hydrological time series data in real time and perform variational mode decomposition to obtain intrinsic mode function (IMF) components. The student LSTM model module is used to deploy a lightweight student LSTM model for real-time hydrological time series prediction based on local IMF components. The causal knowledge internalization module is used to introduce causal consistency loss during the knowledge distillation training process, enabling the student LSTM model to learn the global causal structure and achieve the internalization of causal knowledge. The causal knowledge solidification module is used to perform structured pruning on the student LSTM model based on the global causal directed acyclic graph issued by the cloud collaboration layer, thereby solidifying causal knowledge; the hierarchical early warning module is used to compare the prediction results of the student LSTM model with the preset early warning threshold, and trigger the corresponding level of hydrological early warning based on the comparison results. The cloud-based collaboration layer is deployed on the central server and includes: The PCMCI causal discovery module is used to collect the IMF components uploaded by each edge monitoring node, run the PCMCI causal discovery algorithm, learn the global static causal relationship between each IMF component, and construct a causal directed acyclic graph and a causal coupling matrix. The teacher LSTM model module is used to train a teacher LSTM model based on all component sequences and the causal coupling matrix, and output the soft label distribution of the predicted values at future time points. The causal knowledge distribution module is used to distribute the soft label distribution of the teacher's LSTM model and the corresponding causal coupling matrix to each edge monitoring node; The model update management module is used to control the periodic retraining of the teacher's LSTM model, as well as the updating and distribution of global causal knowledge; The communication layer connects the edge monitoring node layer and the cloud collaboration layer to enable data interaction. The transmitted data includes the IMF components uploaded by the edge monitoring nodes, the soft tag distribution and causal coupling matrix distributed by the cloud collaboration layer; the original hydrological time series data and model gradients do not leave the local edge monitoring node.
10. A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method as described in any one of claims 1 to 8.