A tailrace tunnel water gushing prediction and early warning method, device, equipment and medium
By using video flow estimation and multi-scale time attention mechanism processing, the problems of coverage and response time in tailrace tunnel water inflow monitoring have been solved, achieving high-precision water inflow prediction and timely early warning, thus improving the safety and stability of tailrace tunnel operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTHWEST ENGINEERING CORPORATION LIMITED
- Filing Date
- 2026-02-28
- Publication Date
- 2026-07-03
AI Technical Summary
Existing tailrace tunnel water inflow monitoring methods suffer from limited monitoring point coverage, response time delay, high equipment maintenance costs, and insufficient prediction accuracy. In particular, they have limited effectiveness in processing water flow characteristics in closed environments and are difficult to adapt to the dynamic evolution of seepage channels.
Real-time flow sequences are generated by estimating flow through monitoring video. Adjacency matrices are constructed by combining seepage pressure data and seepage paths. A multi-scale time attention mechanism is introduced for processing, and the predicted inflow results are output. Early warning strategies are then output based on early warning standards.
It enables comprehensive perception of the tailrace tunnel flow status, improves the stability and accuracy of flow velocity estimation, reduces maintenance costs, significantly improves the accuracy and generalization ability of inflow prediction, and ensures timely early warning response.
Smart Images

Figure CN121743791B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing and prediction technology, and more specifically, to a method, apparatus, equipment, and medium for predicting and warning of tailrace tunnel water inflow. Background Technology
[0002] Pumped storage power stations, as key facilities for peak shaving and valley filling in the power system and for the consumption of new energy sources, are directly related to the reliable power supply of the power grid through their safe and stable operation. The tailrace tunnel, as the core hydraulic structure connecting the underground powerhouse and the lower reservoir inlet / outlet of the pumped storage power station, operates in a complex environment and is subject to multiple factors such as seepage from the surrounding rock, changes in groundwater level, and fluctuations in reservoir water level. Abnormal water inflow phenomena occur frequently, which can affect the normal operation of the power station. Therefore, dynamic prediction and early warning of tailrace tunnel inflow is a crucial link in ensuring the safe operation of the power station and has significant practical engineering value.
[0003] Currently, tunnel water inflow monitoring mainly relies on fixed flow meters or manual inspections. In terms of water inflow prediction, traditional methods often employ empirical formulas or numerical simulations. Some technical solutions construct spatiotemporal multi-source databases, combine hydrodynamic constraints to determine water connectivity, and build dynamic prediction models for water diversion flow based on bidirectional long short-term memory networks and attention mechanisms. Furthermore, although there has been some progress in tunnel water inflow prediction in recent years, related models still adhere to specific technical paths in practical applications. However, monitoring methods using fixed flow meters and manual inspections suffer from limitations such as limited coverage of monitoring points, time delays in responding to abnormal water inflow, and high equipment maintenance and labor costs. Traditional empirical formulas simplify hydrogeological conditions, while numerical simulation methods require extensive geological parameter calibration, making them unsuitable for the complex dynamic evolution of seepage channels. Technical solutions for evaluating the connectivity of small hydropower stations rely on remote sensing imagery and water presence frequency matrices for water body identification, which is suitable for open water systems and differs from the flow characteristics of the closed environment inside the tailrace tunnel. Furthermore, related prediction models focus on the correlation between water diversion flow and water system connectivity, and their effectiveness in processing complex optical features such as surface ripples in the low-light, high-humidity environment of the tailrace tunnel is limited, leading to insufficient stability in velocity estimation results. Most existing tunnel water inflow prediction models treat each monitoring point as an independent sample, failing to fully utilize the spatial topological relationships between monitoring points and the physical constraints of seepage paths. The predictive models have limited ability to mine this correlational information, thus restricting their prediction accuracy and generalization ability. Summary of the Invention
[0004] The present invention aims to solve at least one of the above-mentioned problems.
[0005] To address the aforementioned problems, this invention provides a method, apparatus, equipment, and medium for predicting and warning of tailrace tunnel water inflow.
[0006] In a first aspect, the present invention provides a method for predicting and warning of tailrace tunnel inrush, comprising:
[0007] Flow is estimated based on monitoring video of the tailrace tunnel node, and a real-time flow sequence is generated;
[0008] Based on the real-time flow sequence, the seepage pressure data from the seepage pressure monitoring points, and the seepage path, an adjacency matrix is constructed. Based on the adjacency matrix, a multi-scale time attention mechanism is introduced for processing, and the predicted result of the inflow is output.
[0009] Based on the prediction results and preset early warning standards, an early warning strategy is output.
[0010] Optionally, the step of estimating the flow rate and generating a real-time flow sequence based on the monitoring video of the tailrace tunnel node includes:
[0011] A pre-trained instance segmentation network is used to extract water flow region masks in surveillance videos. Specifically, an improved Mask R-CNN architecture is adopted, a feature pyramid network is introduced to construct an initial segmentation network, and the instance segmentation network is trained based on historical tailrace hole annotation data.
[0012] Based on the mask, the velocity field is estimated using the time-consistent regularized optical flow method.
[0013] The instantaneous flow rate is calculated by combining the velocity field and the pre-measured geometric parameters of the cross-section, and the real-time flow sequence is generated based on the time series.
[0014] Optionally, constructing an adjacency matrix based on the real-time flow sequence, the pressure data from the pressure monitoring points, and the seepage path includes:
[0015] An initial matrix is constructed based on the real-time flow sequence, the seepage pressure data, and the seepage path.
[0016] An adaptive adjacency matrix learning mechanism is introduced to obtain an adaptive matrix based on the real-time flow sequence and the seepage pressure data;
[0017] The final adjacency matrix is obtained by weighting and combining the initial matrix and the adaptive matrix.
[0018] Optionally, the step of processing the adjacency matrix using a multi-scale temporal attention mechanism to output the predicted inflow rate includes:
[0019] Perform convolution operations on the final adjacency matrix in both spatial and temporal dimensions;
[0020] A gated temporal convolutional unit is used to filter noise from the final adjacency matrix after the convolution operation.
[0021] A multi-scale temporal attention mechanism is introduced to process the filtered final adjacency matrix and output the prediction result.
[0022] Optionally, after processing the filtered final adjacency matrix using the multi-scale temporal attention mechanism, the following steps are included:
[0023] A multimodal feature fusion strategy is used to encode meteorological forecast data for future time periods into meteorological feature vectors, and then fuse them with the final adjacency matrix processed by the multi-scale time attention mechanism.
[0024] The prediction result is output based on the final adjacency matrix after fusion.
[0025] Optionally, the prediction result includes the predicted inflow range and the probability of exceeding the preset warning standard; the step of outputting the prediction result based on the fused final adjacency matrix includes:
[0026] Based on the final adjacency matrix after fusion, the quantile regression method is used to output the predicted water inflow interval.
[0027] Based on the predicted water inflow range and the preset early warning standard, the probability of exceeding the limit is approximately calculated using a piecewise linear interpolation method.
[0028] Optionally, the step of outputting an early warning strategy based on the prediction results and preset early warning criteria includes:
[0029] The warning strategy is triggered based on the ratio of the predicted water inflow range to the normal baseline value or the range of the probability of exceeding the limit, and the warning level is matched with the preset warning standard.
[0030] Secondly, the present invention provides a tailrace tunnel inrush prediction and early warning device, comprising:
[0031] The flow estimation module is used to estimate the flow based on the monitoring video of the tailrace tunnel node and generate a real-time flow sequence;
[0032] The spatiotemporal graph neural network prediction module is used to construct an adjacency matrix based on the real-time flow sequence, the seepage pressure data of the seepage pressure monitoring point, and the seepage path. Based on the adjacency matrix, a multi-scale time attention mechanism is introduced for processing, and the predicted result of the inflow is output.
[0033] The early warning decision module is used to output an early warning strategy based on the prediction results and preset early warning standards.
[0034] Thirdly, the present invention provides an electronic device, including a memory and a processor;
[0035] The memory is used to store computer programs;
[0036] The processor is configured to implement the tailrace tunnel inrush prediction and early warning method as described in the first aspect when executing the computer program.
[0037] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the tailrace tunnel inrush prediction and early warning method as described in the first aspect.
[0038] The beneficial effects of the tailrace tunnel inrush prediction and early warning method of the present invention are as follows: flow rate is estimated and real-time flow sequence is generated by monitoring video of tailrace tunnel nodes. With the wide coverage of video monitoring, the location limitation of fixed flow meters is overcome, and a comprehensive perception of the water flow status of key nodes in the tailrace tunnel is achieved. At the same time, complex optical features such as water surface ripples can be specifically processed during the flow estimation process, which is adapted to the closed environment of low illumination and high humidity inside the tailrace tunnel, improving the stability and accuracy of flow velocity estimation. Moreover, it does not require a large number of manual inspections, reducing maintenance and labor costs and shortening the response time to water inrush anomalies. An adjacency matrix is constructed based on real-time flow sequences, seepage pressure monitoring data, and seepage paths. This fully integrates multi-source data related to water inrush, accurately depicting the coupling relationship between the evolution of seepage channels and surrounding rock seepage pressure and water inrush volume. By incorporating a multi-scale time attention mechanism into the adjacency matrix, it can deeply mine the spatial topological relationships between monitoring points and the physical constraints of seepage paths. Simultaneously, it captures the lag correlation between factors such as reservoir water level changes and water inrush volume response, effectively adapting to the complex conditions of dynamic seepage channel evolution and significantly improving the accuracy and generalization ability of water inrush volume prediction. Furthermore, this processing does not rely on extensive geological parameter calibration, simplifying the prediction process and further optimizing prediction efficiency. Based on the prediction results and preset early warning standards, an early warning strategy is output. This transforms accurate water inrush volume prediction results into early warning schemes that can directly guide practice, providing clear and explicit decision-making basis for operation and management personnel. This ensures that targeted measures can be taken promptly when water inrush risks occur, preventing the risks from escalating.
[0039] This invention optimizes the entire chain of tailrace tunnel water inflow monitoring, accurate prediction, and scientific early warning. It not only improves the comprehensiveness and real-time nature of water inflow monitoring and the accuracy and adaptability of prediction, but also ensures the timeliness and effectiveness of response through a clear early warning strategy. This significantly enhances the safety and stability of tailrace tunnel operation and provides strong support for the reliable operation of pumped storage power stations, demonstrating significant engineering practical value. Attached Figure Description
[0040] Figure 1 This is a flowchart illustrating the tailrace tunnel inrush prediction and early warning method according to an embodiment of the present invention.
[0041] Figure 2 This is a schematic diagram of the tailrace tunnel inrush prediction and early warning device according to an embodiment of the present invention;
[0042] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0043] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the accompanying drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0044] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0045] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to"; the term "based on" means "at least partially based on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; and the term "optionally" means "optional embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first," "second," etc., mentioned in this invention are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0046] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0047] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0048] like Figure 1As shown in the figure, an embodiment of the present invention provides a tailrace tunnel inrush prediction and early warning method, comprising:
[0049] Step S1: Estimate the flow rate based on the monitoring video of the tailrace tunnel node and generate a real-time flow rate sequence.
[0050] Specifically, tailrace tunnel nodes include flow monitoring nodes and seepage pressure monitoring nodes, typically located at bends and cross-sectional changes within the tailrace tunnel. Infrared-enhanced industrial cameras, with a resolution of at least 1920×1080 pixels and a frame rate of 25fps, are deployed at these nodes to adapt to the low-light, high-humidity environment inside the tailrace tunnel and continuously collect video monitoring of water flow at each node. Anti-fog and waterproof lenses can also be used to adapt to the complex environment of low light, high humidity, and high dust levels inside the tailrace tunnel, continuously collecting dynamic video monitoring of water flow at each node. A YOLOv8 network can be used to process the monitoring video frames frame by frame, outputting a pixel-level binary mask of the water flow area to accurately delineate the boundaries between water flow and non-water flow areas. The water flow velocity field can be estimated based on bidirectional optical flow matching combined with spatiotemporal constraint regularization methods. Combining high-precision geometric parameters of the cross-section obtained beforehand through scanning, including cross-sectional contour curves, cross-sectional area, longitudinal slope, and roughness coefficient of drainage ditches, an adaptive grid discretization method can be used to calculate the instantaneous flow rate. Based on the distribution characteristics of water flow across the cross-section, the cross-section is adaptively discretized into grid cells of varying sizes. An interpolation algorithm is used to obtain the normal velocity component of each cell. The product of the velocity and cell area is calculated, and then summed using a velocity correction coefficient dynamically adjusted based on the cross-section location and water depth (range 0.82-0.96) to obtain the instantaneous flow rate. Finally, instantaneous flow rate data from each node is continuously collected and output at a configurable time resolution, forming a continuous and complete real-time flow rate sequence, providing high-fidelity basic data support for subsequent prediction steps.
[0051] Step S2: Construct an adjacency matrix based on the real-time flow sequence, the seepage pressure data from the seepage pressure monitoring points, and the seepage path. Based on the adjacency matrix, introduce a multi-scale time attention mechanism for processing and output the predicted result of the inflow.
[0052] Specifically, the tailrace tunnel nodes in the tailrace tunnel drainage system, such as flow monitoring nodes and seepage pressure monitoring nodes, are treated as graph nodes, and the seepage path is treated as graph edges, with the edge direction pointing from upstream to downstream, thus constructing an initial matrix. Then, a spatiotemporal fusion network is constructed to predict the inflow volume based on the initial matrix. The network structure may include a three-layer spatiotemporal fusion network, each layer containing a spatial feature aggregation unit and a temporal feature extraction unit, with output feature dimensions of 128, 64, and 32 respectively. The convolution kernel size of the temporal feature extraction unit is set to 5. A multi-scale temporal attention mechanism based on mutual information is introduced into the spatiotemporal fusion network, setting multiple time scales, such as 24-hour, 48-hour, and 72-hour attention windows. By calculating the mutual information value between historical data and the current prediction target at different time scales, attention weights are assigned, and the different scale lag periods of various factors on the inflow volume are automatically identified. Then, a stacked fully connected network combined with an interval regression method is used to output the hourly inflow volume prediction results for future periods, and the prediction results can be specific numerical values.
[0053] Step S3: Output an early warning strategy based on the prediction results and preset early warning standards.
[0054] Specifically, the preset early warning standard can be multiple early warning levels and corresponding preset early warning thresholds. The prediction results are compared with the preset early warning thresholds to determine the corresponding early warning level and execute the corresponding early warning prompts. For example, a complete early warning strategy including early warning signals, handling procedures, division of responsibilities, and emergency resource allocation suggestions can be generated and prompted to the operators.
[0055] This invention estimates flow rate and generates real-time flow sequences by monitoring video of tailrace tunnel nodes. Leveraging the wide coverage of video monitoring, it overcomes the location limitations of fixed flow meters, enabling comprehensive perception of the water flow status at key nodes in the tailrace tunnel. Simultaneously, the flow estimation process can specifically address complex optical features such as water surface ripples, adapting to the low-light, high-humidity enclosed environment inside the tailrace tunnel, improving the stability and accuracy of flow velocity estimation. Furthermore, it eliminates the need for extensive manual inspections, reducing maintenance and labor costs, and shortening the response time to abnormal water inflow. An adjacency matrix is constructed based on real-time flow sequences, seepage pressure monitoring data, and seepage paths. This fully integrates multi-source data related to water inrush, accurately depicting the coupling relationship between the evolution of seepage channels and surrounding rock seepage pressure and water inrush volume. By incorporating a multi-scale time attention mechanism into the adjacency matrix, it can deeply mine the spatial topological relationships between monitoring points and the physical constraints of seepage paths. Simultaneously, it captures the lag correlation between factors such as reservoir water level changes and water inrush volume response, effectively adapting to the complex conditions of dynamic seepage channel evolution and significantly improving the accuracy and generalization ability of water inrush volume prediction. Furthermore, this processing does not rely on extensive geological parameter calibration, simplifying the prediction process and further optimizing prediction efficiency. Based on the prediction results and preset early warning standards, an early warning strategy is output. This transforms accurate water inrush volume prediction results into early warning schemes that can directly guide practice, providing clear and explicit decision-making basis for operation and management personnel. This ensures that targeted measures can be taken promptly when water inrush risks occur, preventing the risks from escalating.
[0056] This invention optimizes the entire tailrace tunnel water inflow process, from monitoring and sensing to accurate prediction and scientific early warning. It not only improves the comprehensiveness and real-time performance of water inflow monitoring and the accuracy and adaptability of prediction, but also ensures the timeliness and effectiveness of response through a clear early warning strategy. This significantly enhances the safety and stability of tailrace tunnel operation and provides strong support for the reliable operation of pumped storage power stations, demonstrating significant engineering practical value.
[0057] Optionally, the step of estimating the flow rate and generating a real-time flow sequence based on the monitoring video of the tailrace tunnel node includes:
[0058] A pre-trained instance segmentation network is used to extract water flow region masks from surveillance videos. Specifically, an improved MaskR-CNN architecture is adopted, and a feature pyramid network is introduced to construct an initial segmentation network. The instance segmentation network is then trained based on historical tailrace hole annotation data.
[0059] Specifically, an initial segmentation network was first constructed, based on Mask R-CNN architecture, with ResNet-101 selected as the backbone network to extract low-level texture, mid-level contour, and high-level semantic features from the image. A feature pyramid network was introduced to integrate feature maps of different scales through top-down feature transfer and lateral connections, ensuring effective identification of both small and large-scale water flow areas, thus forming the initial segmentation network. Image data of the tailrace tunnel under three typical operating conditions—normal flow, high flow, and low flow—covering different lighting intensities and water mist concentrations, with a total of no less than 5000 images. Manual annotation was used to clearly label the categories of water flow areas, water surface reflection areas, etc., in each image, forming an labeled dataset, which was divided into training, validation, and test sets in a 7:2:1 ratio. The training set was input into the initial segmentation network for training. The performance of the trained instance segmentation network was validated using the test set, meeting the segmentation accuracy requirements for the tailrace tunnel scene, ultimately resulting in a usable instance segmentation network. The monitoring video of key nodes in the tailrace tunnel is decomposed into static images frame by frame and input into the trained instance segmentation network. The network outputs a pixel-level binary mask of the water flow area in each image, where pixels in the water flow area are marked as valid pixels and pixels in the non-water flow area are marked as invalid pixels, thus achieving accurate separation of the water flow area and the interference area.
[0060] Based on the mask, the velocity field is estimated using the time-consistent regularized optical flow method.
[0061] Specifically, traditional optical flow methods are easily affected by factors such as ripples and reflections when processing water flow surfaces, leading to significant fluctuations in flow velocity estimation results. To address this issue, this invention designs a time-consistent regularized optical flow method, forcing flow velocity changes between adjacent frames to satisfy hydraulic continuity constraints. The loss function of the time-consistent regularized optical flow method includes photometric consistency loss terms, spatial smoothness loss terms, time consistency loss terms, and hydraulic constraint loss terms, expressed by the following formula:
[0062] ,
[0063] Among them, L total Let L be the loss function for time-consistent regularized optical flow. photo The photometric consistency loss term measures the brightness difference between corresponding pixels in adjacent frames. It is calculated using the inverse mapping difference of image grayscale values. Specifically, the Charbonnier robust function is used in the calculation to reduce the impact of outliers. smooth The spatial smoothness loss term is used to constrain the spatial continuity of the optical flow field. It is obtained by calculating the gradient norm of the optical flow vector in the horizontal and vertical directions, and an edge-sensitive weighting strategy is adopted to apply a strong smoothing constraint in uniform regions with small image gradients. The edge sensitivity parameter is set to 50, L.temporal L is the time consistency loss term. hydro For hydraulic constraint loss terms, λ s λ is the spatial smoothness weighting coefficient. t λ is the time consistency weighting coefficient. h λ represents the hydraulic constraint weighting coefficient. s The value is 0.1, λ t The value is 0.5, λ h The value is set to 0.3. This parameter configuration has been verified through extensive experiments and can effectively suppress noise interference caused by ripples while ensuring the accuracy of flow velocity estimation. At the same time, it supports dynamic adaptive adjustment of the weighting coefficient. When the water flow is highly turbulent, the time consistency weighting coefficient is automatically increased based on the change in optical flow between adjacent iterations, with an adjustment factor of 0.2. When the water depth changes significantly, the hydraulic constraint weighting coefficient is automatically increased based on the rate of change of water depth, with an adjustment factor of 0.15.
[0064] The time consistency loss term is expressed as follows:
[0065] ,
[0066] Among them, L temporal The time consistency loss term is N, where N is the total number of pixels within the water flow region, and v i (t) Let v be the optical flow vector at the i-th pixel in the t-th frame. i (t-1) Let I be the optical flow vector at the i-th pixel in the (t-1)-th frame. i (t) Let σ be the image gradient at the i-th pixel in the t-th frame. g For gradient sensitivity parameters,
[0067] || ||2 represents the norm operation. Where N and v... i (t) v i (t-1) 、▽I i (t) This formula is derived from a mask. The physical meaning of this formula is that in flat regions with small image gradients, the change in optical flow between adjacent frames should be small; while in edge regions with large image gradients, larger changes in optical flow are allowed to adapt to the dynamic characteristics of water flow.
[0068] The formula for the hydraulic constraint loss term is expressed as:
[0069] ,
[0070] Among them, L hydro The term represents the hydraulic constraint loss, where M is the total number of control volume elements in the velocity field.
[0071] ▽•v j Let h be the velocity divergence within the j-th control element. j Let the water depth be within the j-th control element. Let be the partial derivative of water depth with respect to time. This formula forces the optical flow field to satisfy the mass conservation equation, making the velocity estimation results consistent with actual hydraulic laws. By minimizing the total loss function using the gradient descent method, the initial optical flow vector is iteratively optimized until the loss function converges, ultimately yielding a stable and accurate water flow velocity field.
[0072] The instantaneous flow rate is calculated by combining the velocity field and the pre-measured geometric parameters of the cross-section, and the real-time flow sequence is generated based on the time series.
[0073] Specifically, a combination of on-site 3D laser scanning and manual verification was used to measure the geometric parameters of the cross-section of key nodes in the tailrace tunnel. Cross-sectional profile curve data was acquired, and the cross-sectional area was calculated. The longitudinal slope of the cross-section was measured using a level. The roughness coefficient was determined based on the material of the drainage ditch, forming a complete geometric parameter dataset, which was stored in the system database. Based on the measured geometric parameters of the cross-section, the cross-section was uniformly discretized into K micro-units. The area of each unit was calculated by integrating the cross-sectional profile curve, ensuring that the discrete units completely covered the entire cross-section and that the unit size met the accuracy requirements for flow calculation. The normal velocity component of each discrete unit was extracted from the velocity field, and the flow contribution value of each unit was calculated based on the unit area. A velocity correction coefficient was determined for each unit based on the roughness coefficient of the drainage ditch and the water depth, and the flow contribution value of each unit was corrected. The corrected flow contribution values of all units were summed to obtain the instantaneous flow rate Q(t) at time t. This can be expressed by the formula:
[0074] ,
[0075] Where Q(t) is the instantaneous flow rate at time t, A is the cross-sectional area of the water passage, and v n (x, y, t) represents the normal velocity component at position (x, y) on the cross-section at time t, K is the total number of elements after discretization of the cross-section, and v n,k (t) represents the normal velocity component of the k-th unit at time t, ΔA k Let α be the area of the k-th unit. k This is the velocity correction factor for the k-th unit. The velocity correction factor is used to correct the difference between the surface velocity and the cross-sectional average velocity. Its value is determined based on the roughness of the drainage ditch and the water depth. Preferably, α... k The value range is 0.80-0.95.
[0076] Set the sampling time resolution for traffic data, continuously calculate the instantaneous traffic at each time interval according to this time interval, and arrange all instantaneous traffic data in chronological order to form a real-time traffic sequence.
[0077] Optionally, constructing an adjacency matrix based on the real-time flow sequence, the pressure data from the pressure monitoring points, and the seepage path includes:
[0078] An initial matrix is constructed based on the real-time flow sequence, the seepage pressure data, and the seepage path.
[0079] An adaptive adjacency matrix learning mechanism is introduced to obtain an adaptive matrix based on the real-time flow sequence and the seepage pressure data;
[0080] Specifically, the adaptive adjacency matrix learning mechanism is represented as follows:
[0081] ,
[0082] Among them, A adapt For an adaptive adjacency matrix, E1∈R Nv×de and E2∈R Nv×de A learnable node embedding matrix, corresponding to real-time flow sequences and seepage pressure data, N v d represents the total number of nodes in the graph. e For the embedding dimension, ReLU is the modified linear unit activation function, softmax is the normalized exponential function, and T represents the matrix transpose operation. Through backpropagation during training, the node embedding matrix can automatically capture the implicit spatial dependencies in the data, compensating for potential incompleteness in the initial adjacency matrix. The adaptive adjacency matrix learning mechanism, through a data-driven approach, overcomes the limitations of traditional reliance on physical surveys, automatically capturing potential spatial dependencies between monitoring points and compensating for omissions in the initial adjacency matrix regarding hidden seepage channels or dynamic correlations. Learning based on real-time flow sequences and seepage pressure data enables the matrix to reflect dynamic correlation changes during actual operation, improving the adaptability of the adjacency matrix to complex working conditions and providing a more comprehensive correlation basis for subsequent accurate mining of spatiotemporal dependencies.
[0083] The final adjacency matrix is obtained by weighting and combining the initial matrix and the adaptive matrix.
[0084] Specifically, based on the operating characteristics of the tailrace tunnel and data reliability analysis, weight coefficients for the initial adjacency matrix and the adaptive adjacency matrix are set. Multiplying the initial adjacency matrix by its corresponding weight coefficient yields a weighted matrix representing physical prior associations; multiplying the adaptive adjacency matrix by its corresponding weight coefficient yields a weighted matrix representing implicit data associations; and summing the two weighted matrices element-wise yields the final adjacency matrix, represented as:
[0085] ,
[0086] Where A represents the final adjacency matrix, β is the combination weight coefficient, preferably β is 0.6, A init This represents the initial adjacency matrix.
[0087] The final adjacency matrix is normalized to ensure that the values of each element are uniformly between 0 and 1. This avoids significant numerical differences that could negatively impact the computational stability of the subsequent spatiotemporal graph convolutional network, ensuring that the matrix can be directly input into the network for spatial feature aggregation. By combining the physical prior advantages of the initial adjacency matrix with the data-driven advantages of the adaptive adjacency matrix through weighted combination, the final adjacency matrix conforms to the actual physical laws of the tailrace tunnel drainage system while also encompassing undiscovered potential correlations, achieving a comprehensive representation of physical laws and implicit data relationships. Normalization ensures the computational adaptability of the matrix, providing high-quality input for the spatiotemporal graph convolutional network to aggregate seepage pressure information from upstream and downstream nodes, uncover spatial topological relationships of monitoring points, and understand physical constraints of seepage paths in the spatial dimension. This significantly improves the accuracy and generalization ability of subsequent inflow prediction.
[0088] Optionally, the step of processing the adjacency matrix using a multi-scale temporal attention mechanism to output the predicted inflow rate includes:
[0089] Perform convolution operations on the final adjacency matrix in both spatial and temporal dimensions.
[0090] A gated temporal convolutional unit is used to filter noise from the final adjacency matrix after the convolution operation.
[0091] Specifically, the spatial graph convolution operation is represented as:
[0092] ,
[0093] in, This is the final adjacency matrix of the (l+1)th layer. Let N be the final adjacency matrix of the l-th layer. v T represents the total number of nodes in the graph. 长 d is the length of the time series. l Let l be the feature dimension of the l-th layer. Let I be the final adjacency matrix after adding self-loops, and let I be the identity matrix. for The degree matrix, Let be the learnable weight matrix of the l-th layer, and σ be the activation function. This formula indicates that the feature update of each node not only considers its own historical information but also aggregates the information of its neighboring nodes, thereby realizing the spatial transfer of seepage pressure information between upstream and downstream nodes.
[0094] Temporal convolution operations use gated temporal convolution units, represented as:
[0095] ,
[0096] ,
[0097] ,
[0098] Where P is the output feature of the temporal convolution, G is the gating signal, and its value ranges from 0 to 1. It controls the pass-through ratio of the temporal features. When the gating signal is close to 1, it indicates that the feature at that moment is highly correlated with the water inrush prediction and should be fully preserved. When the gating signal is close to 0, it indicates that the feature at that moment is noise and should be filtered out. W p and W g For the temporal convolution kernel, b p and b g The terms are bias terms; * indicates a causal convolution operation in the time dimension; ⊙ indicates element-wise multiplication; tanh is the hyperbolic tangent activation function; and σ is an activation function such as the sigmoid activation function. This is the feature matrix after temporal convolution. The gating mechanism can selectively retain temporal features related to inflow prediction while filtering out noise information.
[0099] A multi-scale temporal attention mechanism is introduced to process the filtered final adjacency matrix and output the prediction result.
[0100] Specifically, to capture the hysteretic correlation between reservoir water level changes and inflow response, this invention introduces a multi-scale temporal attention mechanism into a spatiotemporal graph convolutional network. Three time-scale windows are set to cover short, medium, and long-term time dependencies. The noise-filtered feature matrix is converted into query vectors, key vectors, and value vectors. Initial attention weights are obtained by calculating the similarity between the query vector and the key vectors at different time scales. The initial attention weights are then subjected to softmax normalization to obtain normalized attention weights at each time scale; larger weight values indicate a more significant impact of the features at the corresponding time step on the prediction result. The normalized attention weights at each time scale are weighted and summed with the corresponding value vectors to fuse key features from different time scales, outputting the final adjacency matrix after multi-scale attention weighting. The final adjacency matrix is input into a multilayer perceptron, and the inflow prediction result for the future preset time period is calculated and output through a quantile regression model.
[0101] Optionally, after processing the filtered final adjacency matrix using the multi-scale temporal attention mechanism, the following steps are included:
[0102] A multimodal feature fusion strategy is adopted to encode meteorological forecast data for future time periods into meteorological feature vectors, and then fuse them with the final adjacency matrix processed by the multi-scale time attention mechanism.
[0103] Specifically, the core weather forecast period is defined as the future timeframe, such as 24 hours. Three key meteorological parameters—rainfall, temperature, and air pressure—are selected. Hourly forecast data for the corresponding timeframe is obtained in real-time from the meteorological service platform through a standardized interface, ensuring the timeliness and completeness of the data. Preprocessing operations are performed on the acquired weather forecast data. For example, Z-score standardization is used to eliminate dimensional differences between different meteorological parameters, converting the parameter values to a unified range. For any missing data, linear interpolation is used to complete the data, preventing data loss from affecting subsequent processing. A single-layer fully connected neural network is constructed as the feature encoding network, and the preprocessed weather forecast data is input into this network. The network input dimension is the number of meteorological parameter types, and the output dimension is set to be consistent with the dimension of the features processed by the multi-scale time attention mechanism. The weight parameters are optimized through network training, mapping the multi-dimensional weather forecast data into a fixed-dimensional one-dimensional meteorological feature vector, achieving feature condensation and format adaptation of the meteorological data.
[0104] Meteorological characteristics are represented as follows:
[0105] ,
[0106] Among them, H fused H is the final adjacency matrix after fusion. stgcn H is the final adjacency matrix of the spatiotemporal graph convolutional network. weather Let W be a meteorological feature vector, [ , ] denotes the feature concatenation operation, and W fuse To fuse the weight matrix, b fuse This is a bias term.
[0107] By screening key meteorological parameters and performing standardized preprocessing, the problems of dimensional interference and missing data in meteorological data were eliminated, ensuring data quality. The feature encoding network transforms the raw meteorological forecast data into feature vectors of a unified dimension, achieving format compatibility between meteorological data and features processed by multi-scale time attention mechanisms. This lays the foundation for subsequent multi-source feature fusion. At the same time, the condensed meteorological feature vectors can accurately preserve the influence of meteorological factors on water inflow, improving the efficiency of feature representation.
[0108] Optionally, the prediction result includes the predicted inflow range and the probability of exceeding the preset warning standard; the step of outputting the prediction result based on the fused final adjacency matrix includes:
[0109] Based on the final adjacency matrix after fusion, the quantile regression method is used to output the predicted water inflow interval.
[0110] Specifically, a multilayer perceptron is constructed as the quantile regression prediction network. The input layer dimension of the network is consistent with the feature dimension of the fused final adjacency matrix, while the output layer dimension corresponds to the preset number of quantiles. The hidden layer uses the ReLU activation function to enhance the network's nonlinear expression capability, ensuring it can fit complex water flow prediction mapping relationships. A preset set of quantiles is defined, where the 10th quantile corresponds to a water flow with a 10% probability of being lower than that value, the 50th quantile corresponds to a water flow with a 50% probability of being lower or higher than that value, and the 90th quantile corresponds to a water flow with a 90% probability of being lower than that value. These three quantiles comprehensively cover the high-probability range of water flow values. The feature data corresponding to the fused final adjacency matrix and the actual water flow data are used as training samples. The quantile loss function is used to measure the prediction error, and an optimizer such as Adam is selected for network training. The network weight parameters are continuously optimized through backpropagation until the quantile loss function converges, ensuring that the network can accurately output the predicted water flow value corresponding to each quantile. The final adjacency matrix after fusing the time periods to be predicted is input into the trained quantile regression network. The network outputs the predicted water volume corresponding to the 10th, 50th, and 90th quantiles, respectively. The three together constitute the water volume interval prediction result, which fully presents the probability distribution range of future water volume.
[0111] The loss function for quantile prediction is expressed as:
[0112] ,
[0113] Among them, L quantile For quantile loss, N s Let y be the number of training samples, q be the quantile, Q be a preset set of quantiles, preferably Q = {0.1, 0.5, 0.9}, and y be the number of training samples. i For the i-th sample, Let ρ be the predicted value of the i-th sample at quantile q. q This is the quantile loss function.
[0114] The quantile loss function is defined as follows:
[0115] ,
[0116] Where, ρ q (u) is the quantile loss function of u, where u is the prediction residual, and l u<0 This is an indicator function; it takes the value 1 when u < 0, and 0 otherwise.
[0117] Quantile regression overcomes the limitations of traditional point prediction, which can only output a single value. By generating interval results through multi-quantile prediction, it effectively quantifies the uncertainty of inflow prediction and provides operation and management personnel with a more comprehensive risk reference. The combination of multilayer perceptron and quantile loss function enables the model to accurately fit the complex nonlinear relationship between inflow and multi-source features. The output interval prediction results not only include the high-probability range of inflow values but also clarify the core trend through the median prediction value. Compared with traditional prediction methods, the practicality and reference value of the prediction results are significantly improved, laying a solid foundation for subsequent calculation of exceedance probability and early warning decision-making.
[0118] Based on the predicted water inflow range and the preset early warning standard, the probability of exceeding the limit is approximately calculated using a piecewise linear interpolation method.
[0119] Specifically, the preset early warning standards include early warning levels and preset early warning thresholds corresponding to each level. This clarifies the quantile prediction values in the inflow interval prediction results and the preset early warning thresholds for the corresponding early warning levels, verifying data integrity to ensure no missing or outlier values affect the calculation results. Assuming the inflow is uniformly distributed between the 10th and 90th quantiles, the probability of exceeding limits is calculated using a linear mapping relationship. Based on the relative position of the preset early warning thresholds within the inflow interval prediction results, a linear correspondence is established between the corresponding quantile intervals and the probability interval (10%-90%). The probability of exceeding limits is calculated using an interpolation formula. When the 90th quantile prediction value is less than the preset early warning threshold, the probability of exceeding limits is 0; when the 10th quantile prediction value is greater than the preset early warning threshold, the probability of exceeding limits is 1, ensuring that the results reflect the correlation between the position of the preset early warning threshold within the interval and the risk of exceeding limits.
[0120] The piecewise linear interpolation method achieves accurate estimation of the probability of exceeding limits based on quantile prediction results. It is logically simple, computationally efficient, and can quickly transform interval prediction results into intuitive risk probability indicators. By combining scenario-based judgment with interpolation calculations, it ensures the reasonableness of the probability of exceeding limits in extreme cases (thresholds exceeding the 10%-90% quantile range) while accurately depicting the risk gradient changes when the threshold is within a high-probability range, avoiding the limitations of single-threshold judgments. The output probability of exceeding limits provides a quantitative risk basis for early warning decisions, making the determination of early warning levels more scientific and objective, effectively reducing the probability of false alarms and missed alarms, and improving the reliability of early warning decisions.
[0121] Optionally, the step of outputting an early warning strategy based on the prediction results and preset early warning criteria includes:
[0122] The warning strategy is triggered based on the ratio of the predicted water inflow range to the normal baseline value or the range of the probability of exceeding the limit, and the warning level is matched with the preset warning standard.
[0123] Specifically, when setting the normal benchmark value, historical operating data of the tailrace tunnel without any abnormal water inflow over the past three years can be collected. After removing extreme values, the arithmetic mean is taken and calibrated in combination with the maximum allowable safe flow rate, such as 60%, to finally determine the normal benchmark value and ensure that it conforms to the actual safe operating threshold of the tailrace tunnel.
[0124] The preset early warning standards include four warning levels, and the triggering conditions are set as follows:
[0125] Blue alert: A blue alert is triggered when the 50th percentile (median) of the predicted water inflow range exceeds 120% but not 150% of the normal baseline value, or when the probability of exceeding the limit is greater than 30% but not 50%.
[0126] Yellow alert: A yellow alert is triggered when the 50th percentile of the predicted water inflow range exceeds 150% but does not exceed 200% of the normal baseline value, or when the probability of exceeding the limit is greater than 50% but does not exceed 70%.
[0127] Orange alert: An orange alert is triggered when the 50th percentile of the predicted inflow range exceeds 200% but not 300% of the normal baseline value, or when the probability of exceeding the limit is greater than 70% but not 90%.
[0128] Red alert: A red alert is triggered when the 50th percentile of the predicted water inflow range exceeds 300% of the normal baseline value, or when the probability of exceeding the limit is greater than 90%.
[0129] Establish an adaptive adjustment mechanism for early warning standards, with a one-month adjustment cycle. Based on historical water inrush data, seasonal precipitation characteristics, and changes in surrounding rock seepage, dynamically correct the trigger thresholds for early warning at all levels. The adjustment range shall not exceed 20% of the baseline threshold to ensure that the early warning standards are adapted to different operating conditions.
[0130] By combining historical data calibration with design parameters to determine normal baseline values, the rationality and scientific nature of early warning judgments are ensured. The four-level tiered early warning system enables refined management of water inrush risk, avoiding over- or under-response issues caused by relying on single threshold judgments. A dynamic adjustment mechanism allows early warning standards to adapt to changes in the tailrace tunnel operating environment, improving the adaptability and flexibility of the standards and laying the foundation for subsequent precise early warning triggering strategies.
[0131] From the output of the spatiotemporal graph neural network prediction module, the ratio of the 50th percentile predicted value of the inflow interval to the corresponding warning threshold, as well as the specific value of the exceedance probability, are extracted. The "largest-case principle" is adopted for warning level determination; that is, candidate warning levels are determined based on the inflow ratio and exceedance probability, and the higher level is selected as the final warning level. This ensures that a matching high-level warning is triggered when any indicator is abnormal, avoiding the risk of missed detections. Based on the final warning level, a preset response measure library is invoked to generate a targeted warning strategy.
[0132] Blue alert strategy: Increase monitoring frequency and notify on-duty personnel to pay attention to changes in water inrush trends;
[0133] Yellow alert strategy: Activate emergency duty, check the operation status of drainage facilities, and prepare pumping and drainage equipment;
[0134] Orange alert strategy: Initiate emergency drainage, restrict personnel from entering dangerous areas, and notify higher authorities;
[0135] Red alert strategy: Initiate emergency drainage, restrict personnel from entering dangerous areas, and notify higher authorities.
[0136] Once the early warning strategy is generated, the early warning signal and handling suggestions are simultaneously pushed through multiple channels such as visualization platforms, mobile apps, SMS, and industrial control terminals to ensure that relevant personnel receive and respond in a timely manner.
[0137] The early warning strategy is generated by comprehensively considering two factors: the predicted inflow range and the probability of exceeding the limit. The decision rule is expressed as follows:
[0138] ,
[0139] Among them, W level The warning level is set at [level]. For the predicted water inflow interval, P exceed For the out-of-limit probability, when the threshold is between the 10% and 90% quantile predictions, the corresponding out-of-limit probability, f, is calculated using linear interpolation. Q and f p These are the level mapping functions based on the inflow rate and the probability of exceeding the limit, respectively.
[0140] like Figure 2 As shown, an embodiment of the present invention provides a tailrace tunnel inrush prediction and early warning device 200, comprising:
[0141] The flow estimation module 210 is used to estimate the flow based on the monitoring video of the tailrace tunnel node and generate a real-time flow sequence.
[0142] The spatiotemporal graph neural network prediction module 220 is used to construct an adjacency matrix based on the real-time flow sequence, the seepage pressure data of the seepage pressure monitoring point, and the seepage path. Based on the adjacency matrix, a multi-scale time attention mechanism is introduced for processing, and the predicted result of the inflow is output.
[0143] The early warning decision module 230 is used to output an early warning strategy based on the prediction results and preset early warning standards.
[0144] like Figure 3 As shown, an electronic device 300 provided in this embodiment of the invention includes a memory 310 and a processor 320; the memory 310 is used to store a computer program; the processor 320 is used to implement the tailrace tunnel inrush prediction and early warning method as described above when the computer program is executed.
[0145] Alternatively, an electronic device 300 includes a memory 310 and a processor 320 coupled to the memory 310; the memory 310 is configured to store a computer program; and the processor 320 is configured to perform the following operations when the computer program is executed:
[0146] Flow is estimated based on monitoring video of the tailrace tunnel node, and a real-time flow sequence is generated;
[0147] Based on the real-time flow sequence, the seepage pressure data from the seepage pressure monitoring points, and the seepage path, an adjacency matrix is constructed. Based on the adjacency matrix, a multi-scale time attention mechanism is introduced for processing, and the predicted result of the inflow is output.
[0148] Based on the prediction results and preset early warning standards, an early warning strategy is output.
[0149] This invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the tailrace tunnel inrush prediction and early warning method as described above.
[0150] Alternatively, a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the following operations:
[0151] Flow is estimated based on monitoring video of the tailrace tunnel node, and a real-time flow sequence is generated;
[0152] Based on the real-time flow sequence, the seepage pressure data from the seepage pressure monitoring points, and the seepage path, an adjacency matrix is constructed. Based on the adjacency matrix, a multi-scale time attention mechanism is introduced for processing, and the predicted result of the inflow is output.
[0153] Based on the prediction results and preset early warning standards, an early warning strategy is output.
[0154] The present invention will now be described an electronic device 300 that can serve as a server or client of the present invention, which is an example of a hardware device that can be applied to various aspects of the present invention. Electronic device 300 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 300 can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0155] Electronic device 300 includes a computing unit that can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) or a computer program loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The computing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0156] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. In this application, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention according to actual needs. Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units.
[0157] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.
Claims
1. A tailrace tunnel water inflow prediction and early warning method, characterized in that, include: Traffic flow is estimated based on monitoring video of the tailrace tunnel node, generating a real-time traffic sequence, including: A pre-trained instance segmentation network is used to extract water flow region masks in surveillance videos. Specifically, an improved Mask R-CNN architecture is used, a feature pyramid network is introduced to construct an initial segmentation network, and the instance segmentation network is trained based on historical tailrace hole annotation data. Based on the mask, the velocity field is estimated using the time-consistent regularized optical flow method. The instantaneous flow rate is calculated by combining the velocity field and the pre-measured geometric parameters of the cross-section, and the real-time flow rate sequence is generated based on the time series. Based on the real-time flow sequence, the seepage pressure data from the seepage pressure monitoring points, and the seepage path, an adjacency matrix is constructed. Based on the pre-trained convolutional network and the adjacency matrix, a multi-scale time attention mechanism is introduced for processing, and the predicted result of the inflow is output. The construction of an adjacency matrix based on the real-time flow sequence, seepage pressure data from seepage monitoring points, and seepage paths includes: An initial matrix is constructed based on the real-time flow sequence, the seepage pressure data, and the seepage path. An adaptive adjacency matrix learning mechanism is introduced to obtain an adaptive matrix based on the real-time flow sequence and the seepage pressure data; The final adjacency matrix is obtained by weighting and combining the initial matrix and the adaptive matrix. Based on the prediction results and preset early warning standards, an early warning strategy is output.
2. The tailrace flood prediction and warning method according to claim 1, characterized in that, The pre-trained convolutional network and the adjacency matrix are processed using a multi-scale temporal attention mechanism to output the predicted water inflow, including: Based on the convolutional network, convolution operations are performed on the final adjacency matrix in both spatial and temporal dimensions. A gated temporal convolutional unit is used to filter noise from the final adjacency matrix after the convolution operation. A multi-scale temporal attention mechanism is introduced to process the filtered final adjacency matrix and output the prediction result.
3. The tailrace tunnel inrush prediction and early warning method according to claim 2, characterized in that, After the multi-scale temporal attention mechanism is introduced to process the filtered final adjacency matrix, the following steps are included: A multimodal feature fusion strategy is used to encode meteorological forecast data for future time periods into meteorological feature vectors, and then fuse them with the final adjacency matrix processed by the multi-scale time attention mechanism. The prediction result is output based on the final adjacency matrix after fusion.
4. The tailrace tunnel inrush prediction and early warning method according to claim 3, characterized in that, The prediction results include the predicted inflow range and the probability of exceeding the preset warning standard; the step of outputting the prediction results based on the fused final adjacency matrix includes: Based on the final adjacency matrix after fusion, the quantile regression method is used to output the predicted water inflow interval. Based on the predicted water inflow range and the preset early warning standard, the probability of exceeding the limit is approximately calculated using a piecewise linear interpolation method.
5. The tailrace tunnel inrush prediction and early warning method according to claim 4, characterized in that, The early warning strategy based on the prediction results and preset early warning standards includes: The warning strategy is triggered based on the ratio of the predicted water inflow range to the normal baseline value or the range of the probability of exceeding the limit, and the warning level is matched with the preset warning standard.
6. A tailrace tunnel inrush prediction and early warning device, characterized in that, include: The flow estimation module is used to estimate the flow rate based on the monitoring video of the tailrace tunnel node and generate a real-time flow sequence. This includes: extracting a water flow region mask from the monitoring video using a pre-trained instance segmentation network; employing an improved MaskR-CNN architecture, introducing a feature pyramid network to construct an initial segmentation network, and training the initial segmentation network based on historical tailrace tunnel annotation data to obtain the instance segmentation network; estimating the velocity field based on the mask using a time-consistent regularized optical flow method; calculating the instantaneous flow rate by combining the velocity field with pre-measured cross-sectional geometric parameters, and generating the real-time flow sequence based on the time series. The spatiotemporal graph neural network prediction module is used to construct an adjacency matrix based on the real-time flow sequence, seepage pressure data from seepage monitoring points, and seepage paths. Based on a pre-trained convolutional network and the adjacency matrix, a multi-scale temporal attention mechanism is introduced for processing, outputting the predicted inflow rate. The construction of the adjacency matrix based on the real-time flow sequence, seepage pressure data from seepage monitoring points, and seepage paths includes: constructing an initial matrix based on the real-time flow sequence, the seepage pressure data, and the seepage path; introducing an adaptive adjacency matrix learning mechanism to obtain an adaptive matrix based on the real-time flow sequence and the seepage pressure data; and performing a weighted combination of the initial matrix and the adaptive matrix to obtain the final adjacency matrix. The early warning decision module is used to output an early warning strategy based on the prediction results and preset early warning standards.
7. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to implement the tailrace tunnel inrush prediction and early warning method as described in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the tailrace tunnel inrush prediction and early warning method as described in any one of claims 1 to 5.