A rapid response method for flood control equipment at subway entrances and exits based on water level situation analysis
By using inverse perspective transformation and image segmentation technology on subway entrance and exit surveillance videos, combined with the GRU model and Bayesian network, real-time monitoring and risk assessment of water level conditions at subway entrances and exits are achieved. This solves the problem of slow response in traditional methods, achieves a fast and accurate flood prevention response, and improves the safety and disaster resistance of the subway system.
Patent Information
- Application Number
- CN202411551049.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-11-01
AI Technical Summary
Traditional subway entrances and exits react slowly when floods come, lack advance prediction and warning of water level conditions, and are unable to effectively prevent flood backflow in a timely manner.
By collecting surveillance video images of subway entrances and exits, reading them frame by frame and performing inverse perspective transformation correction, combining image threshold segmentation and adaptive mean shift to enhance target tracking algorithm, identifying water level changes, using GRU model to analyze water level situation, combining seasonal cycle prediction and bidirectional Bayesian network risk assessment model, generating flood control decision tree for rapid response.
It realizes real-time and accurate monitoring and risk assessment of water levels at subway entrances and exits, and can automatically activate flood control equipment without human supervision, significantly reducing the delay and error risks caused by human intervention, and improving the disaster resistance and safety of the subway system.
Smart Images

Figure CN119558452B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of deep learning and artificial intelligence, and in particular to a rapid response method for flood control equipment at subway entrances and exits based on water level situation analysis. Background Art
[0002] With global climate change and the frequent occurrence of extreme weather events, urban flooding is becoming increasingly serious, especially at subway entrances and exits. Due to their low terrain, heavy rainfall can easily lead to backflow, posing a significant threat to subway operations and public transportation. Against this backdrop, it is crucial to design and implement a rapid response method for subway entrance and exit flood control equipment based on water level analysis. In recent years, my country's urbanization has accelerated, and the safe operation of subways, as an integral part of urban transportation, is crucial. However, flood control at subway entrances and exits has long been a key weakness in safe subway operations. Statistics show that flooding backflow has occurred at subway entrances and exits in many Chinese cities during extreme weather events, resulting in suspension of subway operations, damage to facilities, and even casualties. To more rapidly respond to flood disasters at subway entrances and exits, a more timely and effective solution is needed.
[0003] In recent years, the rapid development of machine learning and artificial intelligence technologies, particularly the application of deep learning in image processing, has provided new insights and methods for water level situation analysis. The Gated Recurrent Unit (GRU), an emerging deep learning model, has demonstrated its powerful time series processing capabilities in fields such as traffic flow forecasting and weather prediction. The Bow-Tie model is a risk management tool that graphically analyzes and displays the causes and consequences of accidents, as well as how to mitigate risks through preventive measures and emergency response. By capturing temporal correlations in data, the GRU effectively handles temporal dependencies in sequential data, enabling dynamic and complex data analysis. Furthermore, the GRU can update model state in real time, enabling rapid response to the latest data changes and providing timely data forecasts. Applying the GRU to subway entrance and exit water level forecasting, combined with seasonal attributes, leverages its advantages in processing time series data and its real-time performance to capture risk signals from multiple dimensions, including historical water level data and seasonal characteristics. Specifically, the seasonal cycle prediction model can conduct in-depth analysis of subway entrance and exit water level data to identify potential flood risk factors and risk transmission pathways. By learning the complex temporal and spatial interactions of water level data, the seasonal cycle prediction model can predict water level trends at subway entrances and exits over time. Combined with the Bow-tie model, this model provides decision support for subway operations management, helping the system develop more effective flood control strategies and response measures. Furthermore, the subway entrance and exit water level prediction method based on the seasonal cycle prediction model exhibits strong generalization and adaptability. It can handle subway entrance and exit water level data from different regions and climate conditions, and even adapt to the needs of subway systems of varying sizes. By continuously learning from meteorological changes and water level dynamics at subway entrances and exits, the seasonal cycle prediction model can continuously optimize the prediction model, improving the accuracy and reliability of water level predictions. This subway entrance and exit water level prediction method based on the seasonal cycle prediction model is not only a technological innovation but also an inevitable product that adapts to the trends of urban waterlogging control and smart city development. As more and more cities begin to recognize and apply this method, rapid response of subway entrance and exit flood control equipment based on water level situation analysis is expected to become a key tool for flood control management in subway systems, providing strong support for safe subway operations. Through the advanced predictive capabilities of the seasonal cycle prediction model, water level risks at subway entrances and exits are effectively monitored, thereby ensuring the travel safety of citizens and improving the overall disaster resistance of the subway system. Summary of the Invention
[0004] Traditional methods often rely on manual judgment and manipulation, resulting in a slow response to flooding and an inability to effectively prevent backflow. Furthermore, traditional methods only take action after a flood has already occurred or is about to occur, lacking advance prediction and early warning of water level conditions, making it impossible to prevent flooding before it occurs. In light of this, the present invention aims to provide a rapid response method for flood control equipment at subway entrances and exits based on water level situation analysis, addressing the slow response and lack of predictability of traditional subway entrances and exits to water level conditions.
[0005] The purpose of the present invention is achieved through the following technical solutions:
[0006] The method for rapid response of subway entrance and exit flood control equipment based on water level situation analysis includes the following steps:
[0007] Step S1: Collect and obtain surveillance video images of different subway entrances and exits, read the video images frame by frame, and obtain a water level image sequence at different times;
[0008] Step S2: Apply the inverse perspective transformation method of point-to-point control to correct the distorted image;
[0009] Step S3: performing target area extraction and threshold segmentation operations on the corrected water level image;
[0010] Step S4: extract the water level position of each frame from the processed image sequence, and analyze the water level situation based on the position change of the water level;
[0011] Step S5: Generate a flood control decision tree model based on the water level situation, which is divided into different risk levels. Flood control equipment takes corresponding flood control measures according to the level.
[0012] Furthermore, the step S1 specifically includes:
[0013] Step S101: Acquire surveillance video images of multiple subway entrances and exits;
[0014] Step S102: reading the collected surveillance videos of subway entrances and exits frame by frame using a dynamic synchronous frame extraction method;
[0015] Step S103: dividing the read video image into water level image sequences at different moments according to time;
[0016] Furthermore, the step S2 specifically includes:
[0017] Step S201: randomly determining four points in the three-dimensional space to record the position coordinates of four feature points in the water level image;
[0018] Step S202: Based on the position coordinates determined in S201, specify its real position coordinates under the normal viewing angle, and calculate the correspondence between the two sets of position coordinates;
[0019] Step S203: converting the monitoring imaging coordinate system into an abstract pixel coordinate system;
[0020] The specific method of transforming the pixel coordinate system in step S203 is as follows: First, select the four pixel points at the outermost edge of the image as feature points, and record the coordinates of these four control points, which are recorded as ( x 1, y 1), ( x 2, y 2), ( x 3, y 3), ( x 4, y 4), and its corresponding actual coordinates ( u 1, v 1), ( u 2, v 2) ( u 3, v 3) ( u 4, v 4) As a known quantity; use perspective transformation to transform the target image into another plane image. The transformation process is calculated using the following formula:
[0021]
[0022]
[0023] in,( x , y ) is the pixel coordinate of the perspective distortion image, ( u , v ) is the pixel coordinate of the rectified image, a , b , c , d , e , f , p , q is the perspective transformation parameter. To facilitate calculation, we need to convert the mathematical formula into a matrix form to obtain the corresponding perspective transformation matrix. The rewritten matrix form is as follows:
[0024] Then, the coordinates of the four sets of feature points are brought into the matrix formula to obtain:
[0025]
[0026] Let this matrix be:
[0027] UV = A × M
[0028] According to the above formula, the perspective transformation matrix can be obtained as:
[0029] M = A -1 UV
[0030] Finally, using the obtained perspective transformation matrix M Each pixel in the target image is processed to obtain the corrected water level image.
[0031] Further, the step S3 includes:
[0032] Step S301: Manually calibrate the coordinates of the four corner points of the backboard above the water surface based on the corrected water level image. The trapezoidal area enclosed by the four corner points is the backboard portion of the water level gauge above the water surface. The two waistlines of the trapezoidal area are longitudinally extended to the bottom of the image to obtain the complete backboard area.
[0033] Step S302: Based on the complete backplane area obtained in step S301, convert the RGB format image into the HSV color space to obtain an HSV format image;
[0034] The specific method for converting the RGB format image to the HSV format in step S302 is as follows: First, the RGB values are normalized to the range of 0 to 1 by dividing the value of each color by 255. The specific formula is as follows:
[0035]
[0036] Find the maximum of three normalized values C max =max( R n’ , G n’ , B n’ ) and minimum value C min =min( R n’ , G n’ , B n’ ),according to C max and C minCalculate the hue H, saturation S, and brightness V. The calculation method of H, S, and V depends on which color channel contains the maximum value. The specific calculation method is as follows:
[0037]
[0038] Step S303: performing color threshold segmentation and positioning on the water level image in HSV format;
[0039] The method of color threshold segmentation and positioning of the water level image in step S303 is as follows: first, based on the features of the water level image that are different from other background colors, the image after the target area is extracted is threshold segmented based on red to obtain a binary image. M ( x , y ); blur the red range to: H [0-10&156-180], S [43-255], V [46-255], by setting the HSV three channels, according to H The image is segmented by the threshold of the channel to obtain a binary image containing all the red spot areas. The threshold segmentation method for the red area is as follows:
[0040]
[0041] Since the red light spots reflected by subway entrances and exits are relatively shallow, in order to accurately identify the light spots, S The scope of the channel is appropriately widened;
[0042] Then, use m × n Neighborhood average calculation method for binary images M ( x , y ) is used to calculate the mean value to reduce the small red part in the background and obtain the final binary image :
[0043]
[0044] Finally, the image Perform horizontal and vertical projections to determine the position of the water level line in the image;
[0045] Further, the step S4 includes:
[0046] Step S401: Extract target light spots with changing image backgrounds from the water level image processed in S3, calculate and identify them using a target tracking algorithm based on adaptive mean shift enhancement, extract the number, size, shape, and movement information of the light spots in the image sequence, and obtain a time series of water levels at different subway entrances and exits;
[0047] The specific steps of the adaptive mean shift enhanced target tracking algorithm in step S401 are as follows:
[0048] First, select the target area to be tracked and use the target area detected by the previous target area matching. The target area should meet the requirement of completely enclosing the target object. m Grayscale histogram to describe the target model, target template q μ The probability density of can be described as:
[0049]
[0050] in, μ is the color index of the histogram; m is the number of pixels in the target model; η is the normalization coefficient, so that , is a kernel function, and the smaller the distance to the target area, the larger the pixel weight. h Represents the bandwidth of the kernel function. The larger its value, the smoother the function and the smaller the gradient. x 0 is the center of the rectangular area, x i Indicates the i pixel positions; express x i The pixel value corresponding to the pixel position, that is, the quantized sequence number of the pixel point in the quantized feature space; is the matching weight function with the target model;
[0051] Assuming that the size and shape of the target object in each frame of the water level image sequence follow the same rules of the same directional characteristics, let y =( y 1 , y 2 ) T , x i =( x i 1 , x i 2 ) T Represents the coordinates of the pixel point, NRepresents the number of pixels, then the pixels should satisfy:
[0052]
[0053] Then the probability density function q μ It can be expressed as:
[0054]
[0055] in, μ =1, 2, 3, …, m , η is the normalized coefficient, is the kernel function; a is the semi-major axis length of the elliptical area of the detected image, b is the semi-minor axis length of the elliptical area of the measured image;
[0056] Then, in the frame image to be detected, match the position y The coordinates of nearby pixels are expressed as xi Indicates that i =1, 2,3, …, N , the kernel function bandwidth is h , μ =1, 2, 3,…, m , then the probability density function of the image in the elliptical area is:
[0057]
[0058]
[0059] in, h is the kernel function bandwidth, m Represents the number of pixels of the target model in the elliptical area, calculated using Riemann integral η h Approximate value of
[0060] Then, the Hellinger distance is used to calculate the model similarity in the above two steps, and the obtained coefficients ρ ( y , h ) After adding scale estimation, the similarity between the image to be detected and the target image is expressed as:
[0061]
[0062] For any kernel bandwidth h 0 and h 1 should satisfy:
[0063]
[0064] Finally, in order to get ρ ( y , h ), for ρ ( y , h )beg y and h The partial derivative of , so the target position in the current frame and scale factor h 1 are:
[0065]
[0066]
[0067] Among them, the weight of the pixel value in the candidate model in the current frame w i , the weight of the pixel value of the objective function G and in kernel bandwidth h The location of the target image 0 m k ( y 0, h 0) is as follows:
[0068]
[0069] Will w i use w i bg Replace, it can be expressed as:
[0070]
[0071] in, Represents the weight of the background histogram of pixels near the target area;
[0072] In order to make the described model to be detected better describe the changes in the shape of the target object, the algorithm adds two regularization terms to the description of the model to be detected re and rf , re Influence prior assumptions, the formula is expressed as:
[0073] in, ζ is the scaling factor;
[0074] rf Indicates that the search window contains background pixels. The formula is:
[0075]
[0076] in, y and ζ represent the target position and scaling factor respectively, σ is the percentage of weighted background pixels contained in the search window, B ( y , h ) is defined as:
[0077]
[0078] In the image to be detected, the position y i The calculation scale is g ,if , then calculate the position in the previous frame image y i The target scale is denoted as g b ;if , then the scale at this time s t for:
[0079]
[0080] if ,but:
[0081]
[0082] in, s t-1 express y t-1 The scale of the location, s 0 means the default scale, s t express y t the scale of the location;
[0083] Step S402: Check the stability of the subway inlet and outlet water level data, perform seasonal difference processing on the unstable monthly water level data, and design a seasonal change periodicity prediction model. The model consists of seasonal autoregressive values, seasonal difference values, and error terms. The autoregressive part introduces seasonal parameters to obtain seasonal autoregressive values:
[0084]
[0085] in, σ ( A ) describes the relationship between water level data and its own hysteresis value; σ i is the autoregressive order g The corresponding coefficients are,A i Lag i An operator of time units, used to represent time lags; Indicates water level data and its lag i The relationship between data of different time units;
[0086] Introducing seasonal parameters into the difference part can obtain seasonal difference values (1- A s ) d :
[0087]
[0088] Among them, (1- A ) d Used to convert non-stationary time series into stationary time series, d Indicates the difference order, that is, the number of times the water level data is differentiated; (1- A s ) d Used to convert non-stationary time series with seasonal characteristics into stationary time series. d is the seasonal difference order, that is, the number of times the water level data are seasonally differenciated; s is the seasonal parameter;
[0089] The established seasonal change periodicity prediction model Ω is:
[0090]
[0091] in, c is a constant term used to represent the average trend of water level; α i is the error term, which is used to represent the random fluctuation of water level;
[0092] Step S403: Establish a seasonal cycle prediction model Ψ, and calculate the sum of squares of the seasonal change periodicity prediction model Ω and the seasonal cycle prediction model Ψ respectively. e j , based on the principle of minimizing the sum of squared errors, the weights of the prediction models are assigned, and a combined model for predicting the water level at the subway entrances and exits is obtained; j The combined weight of the models is:
[0093]
[0094] The Ψ model established in step S403 consists of three parts: a season reset gate, a season update gate, and a season hidden state. The specific method is as follows:
[0095] First, the season update gateZ t It is determined by the state value at the previous moment and the input value at the current moment. When the value of the seasonal update gate is larger, it means that the current input neuron needs to retain more information, and the information at the previous moment is retained less. The specific expression is as follows:
[0096]
[0097] in, x t is the input sequence, h t is the state of the hidden layer, h t-1 is the state of the hidden layer in the last second, w xz is the weight matrix from the input layer to the seasonal update gate, w hz represents the weight matrix of the recurrent connection, represents the Sigmoid function, b z Update the gate bias for the seasons, which adapts to different input data by adjusting the threshold of the activation function. This improves the gradient flow in backpropagation, helps avoid network symmetry, and allows each neuron to learn unique features, thereby improving the network's representation ability and training effect.
[0098] Then, the season resets the gate r t It is determined by the state value at the previous moment and the input gate at the current moment. When the value of the reset gate is larger, it means that more information from the previous moment is retained. The specific calculation formula is as follows:
[0099]
[0100] in, w xr Reset the weight matrix of the gate for the input layer to seasons, w hr represents the weight matrix of the recurrent connection, Represents the Sigmoid function;
[0101] Finally, the output of the memory unit can be obtained o t for:
[0102]
[0103] in, c t is the gating signal, h t is the hidden layer state, wxc is the weight matrix from the input layer to the candidate state, w hc represents the weight matrix of the recurrent connection, represents element-wise multiplication, represents the Tanh function;
[0104] Step S404: Input historical subway entrance and exit water level data into the established combined model, and obtain future water level data based on seasonal attributes for subsequent flood control equipment analysis;
[0105] Further, the step S5 includes:
[0106] Step S501: Define a risk quantification formula based on the future water level data predicted in S4 to quantitatively assess the risk of flooding. The formula is as follows:
[0107]
[0108] in, E i is the flood event to be calculated currently; P ( E i ) is an event E i Probability of occurrence; I ( E i ) is an event E i the extent of the impact when it occurs; V ( E i ) is an event E i the vulnerability to occurrence, i.e. the sensitivity of the model to events; B is the risk adjustment factor, which can be expressed as: B =1+ ε ,in ε is the risk preference coefficient; α and β is the weight factor of the impact probability and impact degree, which is obtained by studying the probability and impact degree of flooding events at subway entrances and exits;
[0109] Step S502: define four risk levels: low risk, medium risk, high risk, and extremely high risk, and set a two-way Bayesian decision model for each entrance and exit to analyze the cause of the accident and the possible hazards, so that the model can generate pre-accident preventive measures and post-accident control measures.
[0110] The bidirectional Bayesian risk model established in step S502 is a risk assessment model based on the Bow-Tie-Bayesian network and is specifically as follows:
[0111] First, construct an accident tree. The specific method is as follows: determine the upper-level events, intermediate events, and lower-level events, and use logic gates to connect the upper and lower-level events. If all lower-level events must occur simultaneously to cause the upper-level event to occur, use an AND gate to connect them. Conversely, if only one or some of the lower-level events can cause the upper-level event to occur, use an OR gate to connect them.
[0112] Then, the event tree is constructed, specifically by determining the initial event, determining the safety function and drawing the event tree;
[0113] Furthermore, the structural importance in the bidirectional Bayesian decision model is calculated. By counting the number of occurrences of each lower-level event in the minimum cut set, the structural importance of each lower-level event is determined, and the minimum cut set of the fault tree is obtained, which is the minimum combination of events that leads to the occurrence of the upper-level event. Structural importance analysis can evaluate the reliability and safety of the model and help determine which safety measures to prioritize to improve the safety of the model. The calculation formula for structural importance is as follows:
[0114]
[0115] in, q represents the total number of minimal cut sets, r i Indicates the i A minimal cut set, t i Expressed as i The number of lower-level events of a minimal cut set, n '' represents the number of minimum cut sets;
[0116] Finally, the probability of the upper-level events of the model is calculated so that the flood control equipment can respond quickly. The specific method is: replace all events in the original event tree with events in the minimum cut set to obtain a new equivalent tree. In the equivalent tree, the upper-level events are equal to the union of the minimum cut sets, that is, all events in the minimum cut set must occur at the same time to cause the occurrence of the upper-level events. It is known that there are r Minimal cut sets: E 1. E 2. ... E k 、 E r , then the upper-level event is expressed as:
[0117]
[0118] The probability of the upper event is expressed as:
[0119]
[0120] in, p i Indicates the underlying event i The probability of occurrence, k 、 l 、 r Indicates the sequence number of the minimum cut set, and the sequence number size relationship is k < l < r ; i ≤ k ≤ l ≤ r represents the minimum cut set k 、 l The combination order of two cut sets, x i ∈ E k Indicates that it belongs to k The minimum cut set i A lower level event.
[0121] The beneficial effects of the present invention include:
[0122] (1) This invention collects surveillance video images of subway entrances and exits, reads and extracts water level image sequences frame by frame, and combines them with inverse perspective transformation technology based on point-to-point control to accurately correct image perspective distortion. This technology ensures accurate identification of water levels in images, thereby providing reliable data support for the rapid response of flood control equipment. Compared with traditional methods that rely on manual judgment, this invention significantly improves the automation level and recognition accuracy of water level monitoring;
[0123] (2) In the pre-processing stage, the present invention can accurately separate the water level line from the background and other interfering elements through image threshold segmentation technology, effectively eliminate the interference of noise information, and improve the accuracy of water level line position identification. Combined with the dynamic monitoring of water level changes, the present invention can effectively avoid the errors that occur when traditional water level monitoring equipment identifies water levels in complex environments. In addition, the use of advanced machine learning algorithms (i.e., adaptive mean shift enhanced target tracking algorithm) can further optimize the image processing process, so that the system can improve the automated response speed and efficiency of subway flood control equipment while continuously learning and adapting to environmental changes;
[0124] (3) The present invention introduces the GRU (Gated Recurrent Unit Neural Network) model, which has powerful time series prediction capabilities through deep learning analysis of historical water level data and real-time meteorological information. The GRU model can effectively capture the temporal correlation of water level data, update the water level situation in real time, and accurately predict future water level trends. In addition, the GRU has a self-learning function and can dynamically optimize the prediction model based on meteorological changes and historical data. It has adaptability in different regions and climate conditions, improving the system's ability to respond to various extreme weather conditions;
[0125] (4) The present invention uses a bidirectional Bayesian network risk assessment model combined with water level situation data to achieve quantitative analysis and graded warning of flood control risks at subway entrances and exits. The model can accurately analyze and estimate the potential risk levels of subway entrances and exits (such as low risk, medium risk, high risk, and extremely high risk), and formulate corresponding flood prevention measures by accurately identifying the causes of accidents. This data-driven risk management method can not only improve the safety of the subway system under extreme weather conditions, but also provide a reference for subsequent urban flood control systems, further strengthening the overall disaster resistance of urban infrastructure;
[0126] (5) The present invention realizes a highly integrated intelligent flood control equipment system through the combination of automated monitoring, intelligent analysis and rapid response, which can operate independently without human supervision. When a flood comes, the system can quickly analyze the water level changes and automatically start the corresponding flood control equipment according to the risk level, significantly reducing the delay and error risks caused by human intervention, and providing a strong guarantee for the safe operation of the subway system. Other advantages, objectives and features of the present invention will be explained to some extent in the subsequent description, and to some extent, will be obvious to those skilled in the art based on the following investigation and research, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the following description and the aforementioned claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0127] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:
[0128] Figure 1 This is a flow chart of a method for rapid response of subway exit flood control equipment based on water level situation analysis according to the present invention;
[0129] Figure 2 This is a subway water level map after image processing and threshold segmentation operations according to an embodiment of the present invention;
[0130] Figure 3 A diagram of a bidirectional Bayesian network risk assessment model established for an embodiment of the present invention;
[0131] Figure 4 An event tree diagram of the water level situation at a subway entrance and exit constructed for an embodiment of the present invention;
[0132] Figure 5 The fault tree diagram of the water level situation at the subway entrance and exit constructed for the embodiment of the present invention;
[0133] Figure 6 This is the subway water level identification table according to an embodiment of the present invention; Figure 7 This is a table showing the meaning of each event in the event tree of an embodiment of the present invention. DETAILED DESCRIPTION
[0134] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the preferred embodiments are only for illustrating the present invention, and are not intended to limit the scope of protection of the present invention.
[0135] The present invention provides a rapid response method for subway entrance and exit flood control equipment based on subway water level situation analysis, such as Figure 1 As shown, the specific steps of the above method will be further described below through a specific embodiment.
[0136] Step S1: Collect and obtain surveillance video images of different subway entrances and exits, read the video images frame by frame, and obtain a water level image sequence at different times;
[0137] Step S1 specifically includes the following sub-steps:
[0138] Step S101: Acquire surveillance video images of multiple subway entrances and exits;
[0139] Step S102: Read the collected surveillance videos of subway entrances and exits frame by frame using a dynamic synchronization frame extraction method;
[0140] Step S103: dividing the read video image into water level image sequences at different moments according to time;
[0141] Step S2: applying an inverse perspective transformation method based on point-to-point control to correct the distorted image;
[0142] Step S2 specifically includes the following sub-steps:
[0143] Step S201: Randomly determine four points in the three-dimensional space to record the position coordinates of four feature points in the water level image ( x 1, y 1), ( x 2, y 2), ( x 3, y 3), (x 4, y 4), the specific corresponding coordinate values are (100, 100), (200, 100), (100, 200), (200, 200); the corresponding actual coordinates ( u 1, v 1), ( u 2, v 2) ( u 3, v 3) ( u 4, v 4) The specific coordinate values are (0, 0), (1, 0), (0, 1), (1, 1). Substituting them into the perspective transformation formula, the target image is transformed into another plane image. The conversion process is calculated using the mathematical formula as follows:
[0144]
[0145]
[0146] in,( x , y ) is the pixel coordinate of the perspective distorted image, ( u , v ) are the pixel coordinates of the rectified image, a , b , c , d , e , f , p , q is the perspective transformation parameter, calculated a =100, b =0, c =0, d =100, e =0, f =0, p =0.5, q =0.5;
[0147] To facilitate calculation, the mathematical formula needs to be converted into a matrix form to obtain the corresponding perspective transformation matrix. The rewritten matrix form is as follows:
[0148]
[0149] Substitute the coordinates of the four sets of feature points into the matrix formula to obtain:
[0150]
[0151] Let this matrix be:
[0152] UV = A × M
[0153] That is, the perspective transformation matrix is:
[0154] M = A -1 UV
[0155] The inverse transformation matrix is calculated as follows:
[0156]
[0157] Finally, the perspective transformation matrix M The corrected water level image can be obtained by processing each pixel in the target image.
[0158] Step S3: performing target area extraction and threshold segmentation operations on the corrected water level image;
[0159] The image obtained after target extraction and threshold segmentation in this embodiment is as follows Figure 2 As shown, the following operations are included: converting the original image into an HSV format spot image, field average filtering, morphological processing, and threshold segmentation.
[0160] Step S3 specifically includes the following sub-steps:
[0161] Step S301: Manually calibrate the coordinates of the four corner points of the backboard above the water surface based on the corrected water level image. The trapezoidal area enclosed by these points is the backboard portion above the water surface. The two waistlines of this trapezoidal area are longitudinally extended to the bottom of the image to obtain the complete backboard area.
[0162] Step S302: Based on the complete backplane area obtained in step S301, convert the RGB format image into the HSV color space to obtain an HSV format image;
[0163] Step S303: performing color threshold segmentation and positioning on the water level image in HSV format;
[0164] Step S4: Extract the water level position of each frame from the processed image sequence. Analyze the water level situation based on the position change of the water level;
[0165] The water level prediction in this embodiment is as follows Figure 6 As shown,
[0166] Step S4 specifically includes the following sub-steps:
[0167] Step S401: extracting target light spots with changing image backgrounds from the water level image processed in S3, and performing calculations and identification using a target tracking algorithm based on adaptive mean shift enhancement. The number, size, shape, and movement information of the light spots in the image sequence are extracted to obtain a time series of water levels at different subway entrances and exits.
[0168] First, calculate the target model probability density q μ and the candidate model probability density p μ ; The number of pixels of the target model in this embodiment N =1, kernel function bandwidth h =5, normalization coefficient C =1, regularization parameter ( re , rf , ζ )=(0.1, 0.2,0.05); the center pixel coordinate of the target model ( x 0, y 0)=(100, 100); pixel coordinates and eigenvalues ( x i , b i )=(101, 0.8),(102, 0.7),(103, 0.9),…,(110, 0.6); target model size ( a , b )=(10, 10); the center pixel coordinates of the candidate model ( x 1, y 1)=(110, 110); pixel coordinates and eigenvalues ( x i , b i )=(111, 0.7), (112, 0.8), (113, 0.9), …, (120, 0.5); the target model density value and candidate model density value calculated by the candidate model are shown in the following table:
[0169]
[0170] Then, the similarity between the models is calculated according to the formula:
[0171]
[0172] Calculate the similarity between the target model and the candidate model ρ [ ρ ( y , h ), q ] = 0.4113;
[0173] Furthermore, according to the Hellinger distance ρ Perform target position adjustment and scale adjustment, then the target position of the current frame y 0=(101, 100), the target position is based on m 0( y 0, h 0)Adjust to y 1=(101.4113, 100.4113), according to the initial scale h =0.5, the scale of the target position is h 1=0.9113, and repeat the above steps until y 1 convergence;
[0174] Finally, the processed water level image sequence is input into the combined water level prediction model, and the seasonal weight matrix is assigned according to the time in the water level image sequence. Specifically, the size of the seasonal weight matrix is set to 0.5< w x <1, the size of the seasonal weight matrix is set to 0 during the dry season (such as November-February) w x <0.5, through the combined model prediction, the future water level data is obtained for the rapid response of flood control equipment.
[0175] Step S5: Generate a flood control decision tree model based on the water level situation, which is divided into different risk levels, and flood control equipment takes corresponding flood control measures according to the level;
[0176] The decision tree model of the correlation water level situation and the corresponding flood control measures generated in this embodiment is as follows: Figure 3 shown.
[0177] Step S5 specifically includes the following steps:
[0178] Step S501: defining a risk quantification formula based on the future water level data predicted in S4 to quantitatively assess the risk;
[0179] Step S501 defines a risk quantification formula based on the future water level data predicted in step S4 to quantitatively assess the risk. The specific method is as follows:
[0180] First, construct the event tree of subway entrance and exit as follows Figure 4 As shown, find the minimum cut set of the event tree, that is, the minimum event combination that causes the upper-level event to occur. The meaning of each event is as follows Figure 7 As shown in the figure, there are 12 minimum cut sets in total. The specific formula is as follows:
[0181] T= A 1+ A 2+ A 3= X 1 X 2+ X 3 X 4 X 5+ X 3 X 4 X 6+ X 3 X 4 X 7+ X 3 X 4 X 8+ X 3 X 4 X 9+ X 3 X 4 X 10 + X 3 X 4 X 11 + X 12 + X 13 + X 14 + X 15;
[0182] Then, the structural importance of each lower-level event is calculated, and the result reflects the relative importance of each lower-level event in affecting the upper-level event.
[0183]
[0184] The order of structural importance is: X 3= X 4> X 12 = X 13 = X 14 = X 15 > X 1= X 2> X 5= X 6= X 7= X 8= X 9= X 10 = X 11。
[0185] Through the structural importance analysis, it can be found that the top structural importance rankings are: extreme rainstorm ( X 3) Urban flooding ( X 4), subway failure ( X 12 ), emergency management chaos ( X 13 ), the emergency plan is not perfect ( X 14 ), the accuracy of rainstorm warning is low ( X 15 ), inappropriate self-rescue behavior ( X 1), low rescue efficiency ( X 2) These lower-level events have a significant impact on subway flooding disasters. Therefore, by analyzing the structural importance of each lower-level event, we can effectively identify which events play a key role in the disaster. This not only helps us clarify the emergency events of the accident, but also provides a scientific basis for taking measures, thereby improving the safety of the entire subway system. By focusing on events with high structural importance, flood control equipment can strengthen the safety of weak links in the outdoor area;
[0186] Then, construct the accident tree of subway entrance and exit, such as Figure 5 As shown in the table, by conducting a detailed analysis of the causes of disasters, the frequency and probability of each underlying event are calculated. This process not only helps to understand the patterns of disaster occurrence, but also quantifies the impact of each underlying event on the disaster, thereby providing a basis for formulating disaster prevention and mitigation measures. Through statistical analysis of frequency and probability, the potential risk of disasters can be more accurately assessed, and high-frequency, high-risk underlying events can be identified. This not only provides a quantitative scientific basis for disaster management, but also helps flood control equipment more effectively optimize resource allocation and focus on resolving the most critical safety hazards. The frequency and probability of each underlying event are shown in the table below:
[0187]
[0188] Therefore, according to the upper probability formula, the probability of the upper event subway flood disaster is 0.103. In this embodiment, the Bayesian network can perform forward prediction and backward diagnosis, thereby quantitatively analyzing the accident. When the risk result is determined, the reverse reasoning algorithm of the Bayesian network is used to determine the probability of the subway flood disaster as 100%, and the direction of the arrows between the nodes in the network is reversed. The Bayesian formula is as follows:
[0189]
[0190] in, P ( X i ) is the lower level eventX i The prior probability, P( X i | T ) is a known subway flood disaster T Lower level events when they occur X i The probability of occurrence, that is X i The posterior probability of P ( T ) is the probability of subway flood disaster;
[0191] Based on the probability of subsequent occurrence of lower-level events and the degree of their impact on upper-level events, the importance of each lower-level event can be comprehensively evaluated and determined. This analysis method not only considers the possibility of lower-level events, but also their role and contribution in the entire system failure or accident chain. Through comprehensive evaluation, it is possible to clarify which lower-level events are critical to triggering upper-level events, thereby providing a more accurate reference for disaster and flood control equipment safety management and prevention. Determining the importance of lower-level events is conducive to prioritizing the most threatening factors in risk management, optimizing protective measures, enhancing system reliability and improving risk resistance, and then adopting effective emergency strategies. The specific formula for establishing key importance is as follows:
[0192]
[0193] in, P ( T Happen| X i Occurrence) represents the probability of the upper event occurring under the condition that the lower event occurs; P ( T Happen| X i The conditional probability of the upper-level event occurring under the condition that the lower-level event does not occur) represents the probability of the upper-level event occurring. The critical importance can integrate the prior and posterior probabilities of the lower-level events, eliminating the impact of one-sided analysis of disaster-causing factors and possessing a strong comprehensiveness. Through this method, flood control equipment can clearly grasp the complexity and diversity of disaster factors, thereby formulating more precise prevention and control measures. This highly comprehensive analytical method greatly enhances the depth and accuracy of disaster risk assessments and helps to comprehensively improve the safety and stability of the system. The specific conditional probabilities and critical importance of each lower-level event are shown in the following table:
[0194]
[0195] It can be seen that the most influential factors in subway flood disasters are: backflow of water in the station ( X5) The subway entrance and exit are low in height ( X 6) The drainage system in the station is paralyzed ( X 7) Retaining wall failure ( X 11 ); medium-impact disaster factors include: low rescue efficiency ( X 2) Extreme rainstorms ( X 3) Urban waterlogging ( X 4) Poor anti-leakage performance within the station ( X 8) Insufficient flood control supplies ( X 10 ), emergency management chaos ( X 13 ), the emergency plan is not perfect ( X 14 ), low accuracy of rainstorm warning ( X 15 ); the disaster-causing factors with less impact include: inappropriate self-rescue behavior ( X 1) Power outage or leakage in the station ( X 9) Subway failure ( X 12 When one or more of the key disaster-causing factors occur, the possibility of subway flooding disasters is relatively high, and subway flood control equipment needs to respond quickly to these key disaster-causing factors.
[0196] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0197] Those skilled in the art will understand that all or part of the steps of the method for implementing the above-mentioned embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, which, when executed, includes one of the steps of the method embodiment or a combination thereof.
[0198] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.
[0199] The storage medium mentioned above may be a read-only memory, a magnetic disk, or an optical disk, etc. Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present invention may be modified or replaced with equivalents without departing from the spirit and scope of the present technical solutions, and all such modifications should be included in the scope of the claims of the present invention.
Claims
1. A rapid response method for flood control equipment at subway entrances and exits based on water level situation analysis, characterized by: The method comprises the following steps: Step S1: Collect and obtain surveillance video images of different subway entrances and exits, read the video images frame by frame, and obtain a water level image sequence at different times; Step S2: Apply the inverse perspective transformation method of point-to-point control to correct the distorted image; Step S3: performing target area extraction and threshold segmentation operations on the corrected water level image; Step S3 includes: Step S301: Manually calibrate the coordinates of the four corner points of the backboard above the water surface based on the corrected water level image. The trapezoidal area enclosed by the four corner points is the backboard portion of the water level gauge above the water surface. The two waistlines of the trapezoidal area are longitudinally extended to the bottom of the image to obtain the complete backboard area. Step S302: Based on the complete backplane area obtained in step S301, the RGB format image is converted to the HSV color space to obtain an HSV format image. The specific method of converting the RGB format image to the HSV format in step S302 is as follows: First, normalize the RGB values to the range of 0 to 1 by dividing the value of each color by 255. The specific formula is as follows: Rn’ = R / 255, G n’ = G / 255, B n’ = B / 255 Find the maximum of three normalized values C max =max( R n’ , G n’ , B n’ ) and minimum value C min =min( R n’ , G n’ , B n’ ),according to C max and C min Calculate the hue H, saturation S, and brightness V. The calculation method of H, S, and V depends on which color channel contains the maximum value. The specific calculation method is as follows: Step S303: performing color threshold segmentation and positioning on the water level image in HSV format; In step S303, the specific steps of color threshold segmentation and positioning of the water level image are as follows: first, based on the features of the water level image that are different from other background colors, the image after the target area is extracted is threshold segmented based on red to obtain a binary image. M ( x , y ); blur the red range to: H [0-10&156-180], S [43-255], V [46-255], by setting the HSV three channels, according to H The image is segmented by the threshold of the channel to obtain a binary image containing all the red spot areas. The threshold segmentation method for the red area is as follows: Then, use m × n Neighborhood average calculation method for binary image M ( x , y ) is used to calculate the mean value to reduce the small red part in the background and obtain the final binary image : Finally, the image Perform horizontal and vertical projections to determine the position of the water level line in the image; Step S4: extract the water level position of each frame from the processed image sequence, and analyze the water level situation based on the position change of the water level; Step S5: Generate a flood control decision tree model based on the water level situation, which is divided into different risk levels. Flood control equipment takes corresponding flood control measures according to the level.
2. The rapid response method for subway entrance and exit flood control equipment based on water level situation analysis according to claim 1 is characterized by: The step S1 specifically includes: Step S101: Acquire surveillance video images of multiple subway entrances and exits; Step S102: reading the collected surveillance videos of subway entrances and exits frame by frame using a dynamic synchronous frame extraction method; Step S103: Divide the read video image into water level image sequences at different moments according to time.
3. The method for rapid response of subway entrance and exit flood control equipment based on water level situation analysis according to claim 1 is characterized by: The step S2 comprises: Step S201: randomly determining four points in the three-dimensional space to record the position coordinates of four feature points in the water level image; Step S202: Based on the position coordinates determined in S201, specify the real position coordinates under the normal viewing angle, and calculate the correspondence between the two sets of position coordinates; Step S203: converting the monitoring imaging coordinate system into an abstract pixel coordinate system; The specific method of converting the pixel coordinate system in step S203 is as follows: First, select the four pixels at the outermost edge of the image as feature points, and record the coordinates of these four control points as ( x 1, y 1), ( x 2, y 2), ( x 3, y 3), ( x 4, y 4), and its corresponding actual coordinates ( u 1, v 1), ( u 2, v 2) ( u 3, v 3) ( u 4, v 4) As a known quantity; use perspective transformation to transform the target image into another plane image. The transformation process is calculated using the following formula: in,( x , y ) is the pixel coordinate of the perspective distortion image, ( u , v ) is the pixel coordinate of the rectified image, a , b , c , d , e , f , p , q is the perspective transformation parameter. To facilitate calculation, we need to convert the mathematical formula into a matrix form to obtain the corresponding perspective transformation matrix. The rewritten matrix form is as follows: Then, the coordinates of the four sets of feature points are brought into the matrix formula to obtain: Let this matrix be: UV = A × M According to the above formula, the perspective transformation matrix can be obtained as: M = A -1 UV Finally, using the obtained perspective transformation matrix M Each pixel in the target image is processed to obtain the corrected water level image.
4. The method for rapid response of subway entrance and exit flood control equipment based on water level situation analysis according to claim 1 is characterized by: The step S4 comprises: Step S401: extracting target light spots with changing image backgrounds from the water level image processed in S3, and performing calculations and identification using a target tracking algorithm based on adaptive mean shift enhancement. The number, size, shape, and movement information of the light spots in the image sequence are extracted to obtain a time series of water levels at different subway entrances and exits. Step S402: Check the stability of the subway inlet and outlet water level data, perform seasonal difference processing on the unstable monthly water level data, and design a seasonal change periodicity prediction model. The model consists of seasonal autoregressive values, seasonal difference values, and error terms. The autoregressive part introduces seasonal parameters to obtain seasonal autoregressive values: in, σ ( A ) describes the relationship between water level data and its own hysteresis value; σ i is the autoregressive order g The corresponding coefficients are, A i Lag i An operator of time units, used to represent time lags; σ i * A i Indicates water level data and its lag i The relationship between data of different time units; Introducing seasonal parameters into the difference part can obtain seasonal difference values (1- A s ) d : Among them, (1- A ) d Used to convert non-stationary time series into stationary time series, d Indicates the difference order, that is, the number of times the water level data is differentiated; (1- A s ) d Used to convert non-stationary time series with seasonal characteristics into stationary time series. d is the seasonal difference order, that is, the number of times the water level data are seasonally differenciated; s is the seasonal parameter; The established seasonal change periodicity prediction model Ω is: in, c is a constant term used to represent the average trend of water level; α i is the error term, which is used to represent the random fluctuation of water level; Step S403: Establish a seasonal cycle prediction model Ψ, and calculate the sum of squares of the seasonal change periodicity prediction model Ω and the seasonal cycle prediction model Ψ respectively. e j , based on the principle of minimizing the sum of squared errors, the weights of the prediction models are assigned, and a combined model for predicting the water level at the subway entrances and exits is obtained; j The combined weight of the models is: Step S404: Input historical subway entrance and exit water level data into the established combined model, and obtain future water level data based on seasonal attributes for subsequent flood control equipment analysis.
5. The method for rapid response of subway entrance and exit flood control equipment based on water level situation analysis according to claim 4 is characterized by: The target tracking algorithm based on adaptive mean shift enhancement in step S401 specifically describes the histogram of the area to be detected respectively, and performs iterative calculations in a repetitive manner, traversing the entire image through the process of movement convergence. When the calculation converges to a movement interval less than a set threshold, the recognition of the detection target is completed, and the result of this time is passed to the next frame image as the result of the search, and this cycle is repeated until the function of the image to be detected converges.
6. The method for rapid response of subway entrance and exit flood control equipment based on water level situation analysis according to claim 4 is characterized by: The Ψ model established in step S403 consists of three parts: a season reset gate, a season update gate, and a season hidden state. The specific method is as follows: First, the season update gate Zt It is determined by the state value at the previous moment and the input value at the current moment. When the value of the seasonal update gate is larger, it means that the current input neuron needs to retain more information, and the information at the previous moment is retained less. The specific expression is as follows: in, x t is the input sequence, h t is the state of the hidden layer, h t-1 is the state of the hidden layer in the last second, w xz is the weight matrix from the input layer to the seasonal update gate, w hz represents the weight matrix of the recurrent connection, σ (∙) represents the Sigmoid function, b z Update the gate bias for the seasons, which adapts to different input data by adjusting the threshold of the activation function. This improves the gradient flow in backpropagation, helps avoid network symmetry, and allows each neuron to learn unique features, thereby improving the network's representation ability and training effect. Then, the season resets the gate r t It is determined by the state value at the previous moment and the input gate at the current moment. When the value of the reset gate is larger, it means that more information from the previous moment is retained. The specific calculation formula is as follows: in, w xr Reset the weight matrix of the gate for the input layer to seasons, w hr represents the weight matrix of the recurrent connection, σ (∙) represents the Sigmoid function, b r Indicates the bias of the seasonal reset gate; Finally, the output of the memory unit can be obtained o t for: in, c t is the gating signal, h t is the hidden layer state, w xc is the weight matrix from the input layer to the candidate state, w hc represents the weight matrix of the recurrent connection, ⊗ represents element multiplication, φ (∙) represents the Tanh function.
7. The method for rapid response of subway entrance and exit flood control equipment based on water level situation analysis according to claim 1 is characterized by: The step S5 comprises: Step S501: Define a risk quantification formula based on the future water level data predicted in S4 to quantitatively assess the risk of flooding. The formula is as follows: in, E i is the flood event to be calculated currently; P ( E i ) is an event Ei Probability of occurrence; I ( E i ) is an event Ei the extent of the impact when it occurs; V ( E i ) is an event Ei the vulnerability to occurrence, i.e. the sensitivity of the model to events; B is the risk adjustment factor, which can be expressed as: B =1+ ε ,in ε is the risk preference coefficient; α and β is the weight factor of the impact probability and impact degree, which is obtained by studying the probability and impact degree of flooding events at subway entrances and exits; Step S502: define four risk levels: low risk, medium risk, high risk, and extremely high risk, and set a two-way Bayesian decision model for each entrance and exit to analyze the cause of the accident and the possible hazards, so that the model can generate pre-accident preventive measures and post-accident control measures.
8. The method for rapid response of subway entrance and exit flood control equipment based on water level situation analysis according to claim 7, characterized in that: The two-way Bayesian decision model established in step S502 comprises the following steps: First, construct an accident tree. The specific method is as follows: determine the upper-level events, intermediate events, and lower-level events, and use logic gates to connect the upper and lower-level events. If all lower-level events must occur simultaneously to cause the upper-level event to occur, use an AND gate to connect them. Conversely, if only one or some of the lower-level events can cause the upper-level event to occur, use an OR gate to connect them. Then, the event tree is constructed, specifically by determining the initial event, determining the safety function and drawing the event tree; Furthermore, the structural importance in the bidirectional Bayesian decision model is calculated. By counting the number of occurrences of each lower-level event in the minimum cut set, the structural importance of each lower-level event is determined, and the minimum cut set of the fault tree is obtained, which is the minimum combination of events that leads to the occurrence of the upper-level event. Structural importance analysis can evaluate the reliability and safety of the model and help determine which safety measures to prioritize to improve the safety of the model. The calculation formula for structural importance is as follows: ,in, t i ∈ r i; in, q represents the total number of minimal cut sets, r i Indicates the i A minimal cut set, t i Expressed as i The number of lower-level events of a minimal cut set, n’’ represents the number of minimal cut sets; Finally, the probability of the upper-level events of the model is calculated so that the flood control equipment can respond quickly. The specific method is: replace all events in the original event tree with events in the minimum cut set to obtain a new equivalent tree. In the equivalent tree, the upper-level events are equal to the union of the minimum cut sets, that is, all events in the minimum cut set must occur at the same time to cause the occurrence of the upper-level events. It is known that there are r Minimal cut sets: E 1. E 2. ... E k 、 E r , then the upper-level event is expressed as: The probability of the upper event is expressed as: in, p i Indicates the underlying event i The probability of occurrence, k 、 l 、 r Indicates the sequence number of the minimum cut set, and the sequence number size relationship is k < l < r ; i ≤ k ≤ l ≤ r represents the minimum cut set k 、 l The combination order of two cut sets, x i ∈ E k Indicates that it belongs to k The minimum cut set i A lower level event.
Citation Information
Patent Citations
Hazardous chemical substance loading and unloading safety risk assessment method based on multi-source information fusion
CN112183979A
Urban infrastructure waterlogging disaster monitoring system and method
CN114089442A
Correction method of field wheat ear image at side overlook angle
CN114708153A
Lane line detection and fitting method based on visual features and mathematical model
CN117893987A
Water level prediction method based on time sequence analysis
CN118504729A