Frame difference method-based automatic identification and early warning method and system for water inrush in tunnels
By combining frame difference method and deep learning technology with high-definition cameras and neural network models, automatic identification and early warning of tunnel water inrush disasters have been achieved, solving the problems of danger and lack of real-time monitoring in traditional manual monitoring, and improving the safety and efficiency of tunnel construction.
Patent Information
- Application Number
- PCT/CN2025/120137
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-09-14
- Filing Date
- 2025-09-09
- Publication Date
- 2026-03-19
AI Technical Summary
Traditional monitoring of sudden water inrush disasters in tunnels relies on manual operation, which has problems such as environmental hazards, unclear images, and poor real-time performance, making it difficult to effectively identify and warn of sudden water inrush disasters.
By combining frame difference method with machine vision and deep learning technology, high-definition cameras monitor tunnel video in real time, and neural network models predict the number, amount and water quality changes of water inrush points. The system then calculates warning scores to automatically identify and issue warnings.
It enables automatic identification and accurate early warning of sudden water inrush disasters in tunnels, reduces construction risks, improves the safety and real-time performance of monitoring, and reduces labor costs.
Smart Images

Figure CN2025120137_19032026_PF_FP_ABST
Abstract
Description
Frame difference method for automatic identification and early warning of tunnel water inrush disaster and system
[0001] Cross-reference to Related Applications
[0002] The present application claims priority to the Chinese patent application No. 202411294191.7, filed on September 14, 2024, and entitled "Frame difference method for automatic identification and early warning of tunnel water inrush disaster and system", the entire contents of which are incorporated herein by reference and form a part of the present application for all purposes. TECHNICAL FIELD
[0003] The present application relates to the technical field of tunnel and underground engineering, in particular to a frame difference method for automatic identification and early warning of tunnel water inrush disaster and system. BACKGROUND
[0004] The statements in this section merely provide background information related to the present application and do not necessarily constitute the prior art.
[0005] Due to the relatively complex environment of groundwater in karst areas, the current construction of tunnels and underground projects is facing construction difficulties such as strong karst, high water pressure, large burial depth, high stress, and long tunnel line. Among them, the sudden gushing water disaster has become a very serious geological disaster affecting the construction of tunnels and underground projects. Tunnel sudden gushing water disasters often have high concealment and strong destructive power. Once the disaster occurs, it may cause light flooding of the tunnel and interruption of construction, or heavy casualties, economic losses, and forced suspension or relocation of the project, posing a serious challenge to the safety of construction. Therefore, monitoring and early warning of sudden gushing water during tunnel excavation has become an indispensable part.
[0006] However, the basic operation of traditional video monitoring of sudden gushing water is still mainly manual monitoring, which is very dangerous. In addition, due to many limitations of hardware, the monitored images are sometimes not clear, especially when there are many construction personnel and vehicles during tunnel construction. In some cases, effective information may not be obtained. At this time, relying solely on video monitoring personnel to identify monitoring images or videos and make corresponding judgments will bring great challenges to the real-time and accuracy of sudden gushing water information. SUMMARY
[0007] In order to solve the problems of the prior art, the present application provides a frame difference method for automatic identification and early warning of tunnel water inrush disaster and system, which can monitor the number of gushing points, the amount of sudden gushing water, and the quality of gushing water in real time, making up for the shortcomings of manual tunnel sudden gushing water disaster monitoring, solving the problems of poor tunnel environment, low monitoring video precision, and poor real-time performance in manual monitoring, reducing labor costs, and more effectively ensuring the safety of construction.
[0008] In order to achieve the above object, the present application adopts the following technical solutions:
[0009] In a first aspect, the present application provides a tunnel water inrush disaster frame difference method automatic identification and early warning method.
[0010] A tunnel water inrush disaster frame difference method automatic identification and early warning method comprises the following processes:
[0011] An image of adjacent video frames is acquired, the gray scale values of the image of adjacent video frames are subtracted pixel by pixel to obtain a difference image, the pixel points in the difference image are subjected to binaryzation processing to obtain a binaryzation image, the binaryzation image is subjected to connectivity processing to further obtain a target image of a moving target after excluding worker or mobile device intrusion, and a target image sequence in the video is further obtained;
[0012] The number of water inrush points at the current time and at a plurality of times before the current time of the target image sequence is acquired, a time series-based neural network model is used to predict the change in the number of water inrush points, and when the number of water inrush points at a certain time after the current time is greater than a first set threshold value, an early warning of an increase in the number of water inrush points is performed.
[0013] As a further limitation of the first aspect of the present application, according to the target image, the outline and area of the water inrush are calculated, the size of the water inrush volume is estimated based on the calculated outline and area of the water inrush, the water inrush flow is equivalent to a cylindrical body, and the water inrush volume is obtained.
[0014] The water inrush volume at the current time and at a plurality of times before the current time of the target image sequence is acquired, a time series-based neural network model is used to predict the change in the water inrush volume, and when the water inrush volume at a certain time after the current time is greater than a second set threshold value, an early warning of an increase in the water inrush volume is performed.
[0015] As a still further limitation of the first aspect of the present application, according to the target image, a water inrush region image is extracted, color information of the water inrush region in each video frame is extracted, the extracted color information in each frame is compared with the color information of a reference frame, and a color difference metric is calculated.
[0016] The color difference metric at the current time and at a plurality of times before the current time of each video frame is acquired, a time series-based neural network model is used to predict the change in the color difference metric, and when the color difference metric at a certain time after the current time is greater than a third set threshold value, an early warning of water quality change is performed.
[0017] As a still further limitation of the first aspect of the present application, the water inrush point number, the water inrush volume, and the water quality change are comprehensively warned, and a comprehensive early warning score S is calculated, including:
[0018] S=f1*ω1+f2*ω2+f3*ω3, wherein ω1, ω2 and ω3 are weight parameters, f1 is a first set threshold value, f2 is a second set threshold value, and f3 is a third set threshold value;
[0019] The current moment and the moments before the current moment of the target image sequence are acquired, a neural network model based on time series is used to predict the comprehensive early warning score S of a certain moment after the current moment, and the early warning levels are divided into low water inrush risk, medium water inrush risk and high water inrush risk according to the comprehensive early warning score S.
[0020] In a second aspect, the present application provides a tunnel water inrush disaster frame difference method automatic identification and early warning system.
[0021] A tunnel water inrush disaster frame difference method automatic identification and early warning system comprises:
[0022] The image processing unit is configured to acquire images of adjacent video frames, subtract the gray values of the images of adjacent video frames pixel by pixel to obtain a difference image, perform binaryzation processing on the pixel points in the difference image to obtain a binaryzation image, and perform connectivity processing on the binaryzation image to obtain a target image of a moving target after excluding worker or mobile device intrusion, and further obtain a target image sequence in the video.
[0023] The water inrush point quantity early warning unit is configured to acquire the water inrush point quantities of the current moment and the moments before the current moment of the target image sequence, use a neural network model based on time series to predict the water inrush point quantity change, and perform early warning of water inrush point quantity increase when the water inrush point quantity at a certain moment after the current moment is greater than a first set threshold value.
[0024] As a further limitation of the second aspect of the present application, the water inrush volume early warning unit is configured to calculate the outline and area of the water inrush based on the target image, estimate the size of the water inrush volume based on the calculated outline and area of the water inrush, equivalent the water inrush flow to a cylinder to obtain the water inrush volume, acquire the water inrush volumes of the current moment and the moments before the current moment of the target image sequence, use a neural network model based on time series to predict the water inrush volume change, and perform early warning of water inrush volume increase when the water inrush volume at a certain moment after the current moment is greater than a second set threshold value.
[0025] The water inrush quality early warning unit is configured to: extract a water inrush area image according to the target image, extract color information of the water inrush area in each frame of video, compare the color information extracted in each frame with color information of a reference frame, calculate a color difference metric, obtain the color difference metric at a current time and at a plurality of times before the current time, use a neural network model based on a time sequence to predict changes in the color difference metric, and when the color difference metric at a certain time after the current time is greater than a third set threshold, perform early warning of water quality changes.
[0026] The comprehensive early warning unit is configured to: perform comprehensive early warning of the number of water inrush points, the sudden inrush water volume and water quality changes, calculate a comprehensive early warning score S, including: S = f1*ω1 + f2*ω2 + f3*ω3, wherein ω1, ω2 and ω3 are weight parameters, f1 is a first set threshold, f2 is a second set threshold, and f3 is a third set threshold, obtain the comprehensive early warning indicator S at the current time and at a plurality of times before the current time of the target image sequence, use a neural network model based on a time sequence to predict the comprehensive early warning score S, and divide the early warning level into low water inrush risk, medium water inrush risk and high water inrush risk according to the comprehensive early warning score S.
[0027] In a third aspect, the present application provides a tunnel water inrush disaster frame difference method automatic identification and early warning system.
[0028] A tunnel water inrush disaster frame difference method automatic identification and early warning system comprises:
[0029] A high-definition camera and a control terminal in communication with the high-definition camera, the control terminal being configured to execute the tunnel water inrush disaster frame difference method automatic identification and early warning method of the first aspect of the present application;
[0030] The high-definition camera comprises a high-definition camera body, a high-definition camera top cover, an inclined lens protection lens, a camera lens, an array type infrared light supplementing lamp panel, a camera angle adjusting mechanism, a camera mounting bottom plate and a heating wire;
[0031] The high-definition camera top cover is fixed on the top of the high-definition camera body, the inclined lens protection lens is arranged on the outside of the camera lens, the lens protection lens and the camera lens are arranged on the lower part of the high-definition camera top cover, the array type infrared light supplementing lamp panel is arranged beside the camera lens, the high-definition camera body is connected with the camera mounting bottom plate through the camera angle adjusting mechanism, and the periphery of the lens protection lens is provided with the heating wire.
[0032] In a fourth aspect, the present application provides a computer device, comprising: a processor and a computer readable storage medium;
[0033] The processor is adapted to execute a computer program;
[0034] A computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and the computer program is executed by the processor to implement the tunnel water inrush disaster frame difference method automatic identification and early warning method according to the first aspect of the present application.
[0035] In a fifth aspect, the present application provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and the computer program is adapted to be loaded and executed by the processor to implement the tunnel water inrush disaster frame difference method automatic identification and early warning method according to the first aspect of the present application.
[0036] In a sixth aspect, the present application provides a computer program product, characterized in that the computer program product comprises a computer program, and the computer program is executed by the processor to implement the tunnel water inrush disaster frame difference method automatic identification and early warning method according to the first aspect of the present application.
[0037] Compared with the prior art, the present application has the following beneficial effects:
[0038] The corresponding device of the present application collects information such as water gushing point, water gushing amount and water gushing quality in the tunnel, analyzes and processes the information by the method of machine vision, determines whether the water inrush disaster occurs in the tunnel and the size of the disaster, and comprehensively determines the different degrees of early warning, thereby greatly reducing the construction risk, providing strong basis and guarantee for safe construction, and effectively avoiding the water inrush disaster in the tunnel construction process.
[0039] The advantages of the additional aspects of the present application will be partially given in the following description, partially become obvious from the following description, or be known by the practice of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0040] The drawings accompanying the specification of the present application serve to provide further understanding of the present application, and the illustrative embodiments of the present application and the description thereof serve to explain the present application, and do not constitute improper limitations on the present application.
[0041] Fig. 1 is an implementation flowchart of the tunnel water inrush disaster frame difference method automatic identification and early warning method provided by the embodiment 1 of the present application;
[0042] Fig. 2 is a front view of the high-definition camera provided by the embodiment 1 of the present application;
[0043] Fig. 3 is a side view of the high-definition camera provided by the embodiment 1 of the present application;
[0044] Fig. 4 is a schematic diagram of the installation of the high-definition camera in the tunnel provided by the embodiment 1 of the present application;
[0045] Fig. 5 is a schematic diagram of the tunnel water inrush disaster frame difference method automatic identification and early warning system provided by the embodiment 2 of the present application;
[0046] Fig. 6 is a schematic diagram of a computer device according to an embodiment of the present application;
[0047] 1, high-definition camera top cover; 2, lens protection lens; 3, high-performance camera lens; 4, array type infrared light supplement lamp plate; 5, camera angle adjusting device; 6, camera mounting bottom plate; 7, heating wire; 8, high-definition camera body. DETAILED DESCRIPTION
[0048] The application will be further described below in conjunction with the drawings and embodiments.
[0049] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the application. Unless otherwise indicated, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the application belongs.
[0050] In the case of no conflict, the embodiments in the application and the features in the embodiments can be combined with each other.
[0051] Embodiment 1:
[0052] As introduced in the background, sudden water disaster has become one of the most dangerous geological disasters in tunnel and underground engineering construction process due to its strong suddenness, high risk and difficult predictability, and once it occurs, it often causes significant casualties and property losses. Therefore, in the process of tunnel construction, monitoring and early warning of tunnel sudden water disaster has become an effective means and important way to achieve active prevention and control of sudden water disaster and avoid life and property losses.
[0053] In order to solve the above engineering problems, the application provides a frame difference method for automatic identification and early warning of tunnel water disaster, wherein the automatic identification and early warning method is based on machine vision and deep learning, adopts frame difference method which is one of the methods of motion target video monitoring, detection and tracking, and is realized by python algorithm based on OpenCV library to meet the monitoring effect of automatic identification and early warning of sudden water disaster in tunnel and underground engineering.
[0054] In the automatic identification and early warning method based on frame difference method of the present implementation, the video files collected by the high-definition camera in the tunnel are converted into gray images in real time, and are processed frame by frame. The previous frame image and the current frame image are collected, and after gray processing, the gray values of the corresponding pixel points of the adjacent two frames are recorded as f n (x,y) and f n-1 (x,y), the gray values of the corresponding pixel points of the two frames are subtracted, and the absolute value is taken to obtain the difference image D n (x,y) : D n (x,y) = |fn (x,y)-f n-1 (x,y)| (1);
[0055] Static objects appear on the difference image are all 0, and moving objects, especially the contours of moving objects, are non-0 due to the existence of gray scale changes; preferably, corresponding threshold T is set, and the pixels in the image are processed one by one to obtain a binary image R' n (x,y), wherein the points with a gray scale value of 255 are foreground (moving target) points, i.e., the occurrence of sudden gushing water is detected, and the points with a gray scale value of 0 are background points; the image R' n (x,y) is subjected to connectivity analysis, and finally an image R containing a complete moving target is obtained n .
[0056] The motion characteristics of a video or image sequence are analyzed by judging whether the absolute value of the gray scale difference of each pixel between two frames in the video is greater than a set threshold, to determine whether there is object motion in the image sequence, so as to realize the monitoring function of the moving target in the monitoring video.
[0057] In the implementation mode, preferably, the interference caused by construction personnel or equipment in the construction process of the tunnel or underground engineering is eliminated to determine the occurrence of sudden gushing water. Specifically, it is judged whether it is an invasion of workers or mobile equipment: since the height-width ratio of a normal human body is certain, a relatively simple criterion is that the slope of the moving area is used to identify a person, and it is assumed that the person in the channel can only walk towards the camera. According to experience, when the slope is less than 0.48, it can be determined that it is a person invasion, and greater than 0.48 is non-personnel invasion. Since the construction vehicles and other equipment are relatively large in size, false recognition is avoided by limiting the size of the edge frame in edge detection, and the edge of the moving object is set to be less than a certain value.
[0058] In the implementation mode, preferably, the binary image R' n (x,y) is subjected to edge detection, specifically, the image obtained after image binarization is composed of 0 or 1, so the highest point, the lowest point, the leftmost point, and the rightmost point of the image are found to determine the edge of the sudden gushing water, and the profile of the sudden gushing water target edge is obtained from the above steps, thereby realizing the monitoring function of the sudden gushing water.
[0059] After determining that the moving object in the video is sudden gushing water, a judgment standard for sudden gushing water is established: the number of gushing water points, the size of the gushing water amount, and the identification algorithm of the sudden gushing water quality, and the warning index of the sudden gushing water disaster grade is set.
[0060] The water gushing point quantity early warning includes: based on the inter-frame difference, the water gushing condition and the change of the water gushing point quantity in the video are obtained, machine learning processing and early warning publishing are carried out, the motion characteristics of the video or the image sequence are analyzed by judging whether the absolute value of the gray difference of each pixel point between two frames in the video is greater than the set threshold, to determine whether there is a water gushing condition in the image sequence, the specific water gushing condition is recorded in the background, and the number of the water gushing part at each moment is counted;
[0061] The machine learning method based on time series neural network is used to predict the change of the counted water gushing part quantity, the video monitoring data samples collected on site are trained, the corresponding threshold of the water gushing point quantity in the video is set based on the training result, if the water gushing point increases at the next moment or at a certain moment after the current moment, that is, the water gushing part in the video increases beyond the threshold range, the early warning of the increase of the water gushing point quantity is carried out.
[0062] The water gushing quantity size early warning includes: the inter-frame difference is used to carry out difference calculation on adjacent two frames or adjacent multiple frames in the image sequence, the water inrush part in the tunnel monitoring video is extracted, and the contour and area of the water inrush part are integrated and calculated; the water gushing quantity size is estimated based on the water gushing contour area calculated above, the water flow is approximately equivalent to a cylinder, and the size of the water gushing volume is approximately obtained; the feature extraction, feature matching, geometric calculation and volume measurement calculation of the preprocessed video image are carried out, and the specific implementation is as follows:
[0063] The feature extraction is to select the "edge" and "contour" as the features of the measured water inrush in the preprocessed video image, and the Canny edge detection algorithm is used to extract the water inrush contour;
[0064] The feature matching is to match the measured water inrush contour with the known size calibration object in the tunnel after the water inrush contour is extracted, to establish the relationship between the measured water inrush and the known size, so as to realize the measurement of the water inrush contour;
[0065] The geometric calculation is to calculate the actual size of the measured water inrush by using the integral method based on the proportional relationship between the objects after the feature matching, the pixel distance between the feature points or the feature contour can be converted into the actual length or area size through geometric calculation; finally, the actual water inrush area is obtained according to the pixel distance between the feature points and the geometric calculation; the water flow is approximately equivalent to a cylinder, and the size of the water gushing volume is approximately obtained;
[0066] The water inrush volume early warning mode is similar to the water inrush point number increase early warning mode. The water inrush volume is calculated and then statistically analyzed based on time. A machine learning method based on time series neural network is used to predict the water inrush volume. Video monitoring data samples collected on site are used for training. Corresponding thresholds are set based on the training results. If the water inrush volume at the next moment or at a certain moment after the current moment increases, that is, the water inrush part in the video increases beyond the threshold range, a water inrush volume increase early warning is given.
[0067] The water inrush quality change early warning includes: based on the different color depths of different water quality water inrush reflected in the monitoring video, water quality identification is performed. For the water inrush target extracted by the frame difference method, a pixel difference detection algorithm in computer vision technology is used to check whether the color of a part of the area in the video changes. If the difference exceeds the preset threshold, it is considered that the color changes obviously, and the corresponding water inrush quality change is obtained. The specific implementation is as follows:
[0068] The water inrush area obtained by the frame difference method is extracted alone. The pixel difference detection algorithm is realized by using the OpenCV library to extract the color information of the water inrush area in each frame image. The color change metric is calculated. The color information extracted in each frame is compared with the reference frame (clear water flow), and the color difference metric is calculated, such as the number of color pixel differences, color histogram difference, etc.
[0069] A large amount of monitoring video collected on site and indoor simulation experiments are used for machine learning algorithm training. The color change threshold is set according to the machine training results. The color change metric of each frame of the video is calculated and compared with the set threshold to determine whether the color change of the frame is obvious. If the difference exceeds the preset threshold, it is considered that the color changes obviously, and the corresponding water inrush quality change is obtained. Early warning information of water inrush quality change is issued.
[0070] In the present embodiment, preferably, the above three types of indexes are fused for early warning by using the data fusion theory. According to the number of water inrush points, the size of water inrush volume, and different grade thresholds of sudden water inrush quality, the influence weight of the above three indexes on the water inrush grade is determined by using the analytic hierarchy process method. The risk grade score of the water inrush state is determined by combining the weights of the parts and the expert evaluation. The specific implementation is as follows:
[0071] The water inrush risk grade score is shown as follows, where F is the threshold of three grades set for the three types of indexes, W is the influence weight of the above three types of indexes on the water inrush risk determined by the analytic hierarchy process method, and the sum of the two is the sudden water inrush risk comprehensive evaluation index S: F=[f1,f2,f3] (3); W=[ω1,ω2,ω3] T (4); S=F·ω (5);
[0072] According to the on-site video monitoring result or the video monitoring model test data of sudden gushing water, samples are constructed for training, the SVM support vector machine method in the machine learning algorithm is used for training, the score condition of the comprehensive evaluation index S in different degrees of gushing water state is obtained, the influence of the three kinds of index fusion on the sudden gushing water disaster is determined, and three kinds of thresholds are divided, which are gushing water low risk, gushing water medium risk and gushing water high risk.
[0073] The present embodiment determines the early warning index of different sudden gushing water disaster levels according to the above results, carries out the early warning of sudden gushing water disaster in the tunnel, uses the machine learning and deep learning method, trains based on the existing video, obtains the accurate threshold, and realizes the early warning function; the sudden gushing water disaster video early warning is specifically using the machine learning and deep learning method, combining the convolutional neural network, continuously training and learning the algorithm for video monitoring, realizing more accurate automatic identification and early warning function of sudden gushing water disaster; in the present embodiment, the man-machine interaction program is designed by using java web GUI programming, the tunnel disaster monitoring and early warning platform is created, the webpage version and the client are adopted, the monitoring personnel can realize real-time viewing of the monitoring video from the computer or the mobile phone, can realize real-time viewing of the related data of each monitoring equipment, and receives the alarm information.
[0074] Through the alarm information sent by the tunnel disaster monitoring and early warning platform, the monitoring personnel can more accurately perceive whether the sudden gushing water disaster occurs in the interested tunnel monitoring position (region) and / or specific monitoring position (region), such as the face, sidewall and vault region from the tunnel secondary lining arch support trolley to the front thereof until the excavation position, and can implement corresponding disaster risk emergency measures according to the disaster risk level output in the early warning information, such as strengthening the lining, grouting, adjusting the tunnel excavation construction parameters, or implementing the emergency measures for the disaster.
[0075] As shown in FIGS. 2, 3 and 4, in the present embodiment, the monitoring equipment is installed in the tunnel monitoring section, the high-definition camera is installed on the tunnel secondary lining arch support trolley by using the expansion screw fixing method, and the front is directly viewed to ensure that the face, sidewall and vault from the front thereof until the excavation position can be clearly seen, so that better monitoring effect of the occurrence of sudden gushing water disaster can be realized.
[0076] Preferably, in view of the dark environment in the tunnel, the floating dust is more, the high-definition camera has the function of accurate identification in this kind of environment. Specifically, the high-definition camera has the ability to work normally in dark environment and shoot clearly, the high-definition camera chip, its lamp panel should have an array of infrared lamp panel, characterized in that, in the dark environment in the tunnel, the lens is provided with auxiliary light source, so that the lens can sense the infrared light and become image, can shoot accurate water surge video, in order to analyze the monitoring video in real time by algorithm, realize the automatic identification and early warning function of water disaster.
[0077] The high-definition camera of the present embodiment should have the ability to work normally in the environment with more floating dust and shoot clearly. Specifically, in the design of high-definition camera, the protective glass sheet of the lens is designed to be inclined at an angle with the camera, the angle is 10°-30°, which can effectively prevent dust from adsorbing and accumulating on the camera glass sheet through mechanical analysis, so that the camera can shoot clearly even in high floating dust environment for a long time. At the same time, through optical analysis, it can be found that the reflection of light in this range of glass inclination has little effect on the clarity of the camera shooting video, which can also ensure the clarity of shooting and prevent the problem of reflection or unclear shooting caused by light reflection.
[0078] The high-definition camera of the present embodiment is fixed on a lens seat, which is firmly fixed on the tunnel two lining trolley or tunnel side wall through expansion screws, so as to monitor long-term without affecting other work in the tunnel.
[0079] As shown in Figure 3, the top cover 1 of high-definition camera prevents dust in the tunnel from affecting the lens; the lens protection lens 2 is arranged obliquely to effectively prevent dust in the tunnel from accumulating on the lens and affecting the shooting effect; the high-performance camera lens 3 is arranged outside the lens protection lens 2; the array infrared light supplement lamp panel 4 provides supplementary light source in dark environment of the tunnel; the high-definition camera body 8 is fixed on the camera mounting bottom plate 6 through the camera angle adjusting device 5, the camera mounting bottom plate 6 is used to fix the high-definition camera body 8 on the trolley; the heating wire 7 prevents the lens from producing water mist in the water surge tunnel, ensuring the clarity of shooting.
[0080] The video data collected by the camera of the present implementation is processed by an algorithm and uploaded (using a 4G or 5G network or a local area network) through a data acquisition box (with a control terminal) to the corresponding tunnel disaster monitoring and early warning platform or client, and is identified accordingly. If the water inrush meets the real-time monitoring and early warning of the sudden situation, it can be viewed by the monitoring personnel in real time.
[0081] The present application studies the occurrence and positioning of tunnel water inrush disasters by a video monitoring and early warning method, proposes corresponding equipment to collect information such as water inrush points, water inrush volume, and water inrush quality in the tunnel, analyzes and processes the information by a machine vision method, determines whether a water inrush disaster occurs in the tunnel and the size of the disaster, and comprehensively determines different degrees of warning, greatly reducing the construction risk and providing strong basis and protection for safe construction, effectively avoiding water inrush disasters during tunnel construction.
[0082] The present application can automatically identify water inrush disasters, solve the problem that manual participation is required in traditional water inrush monitoring, overcome the extremely dangerous characteristics of sudden disasters for monitoring personnel compared with traditional manual monitoring, increase the machine vision algorithm compared with conventional manual video monitoring, solve the problem that people need to constantly watch the video during conventional video monitoring, realize real-time monitoring and early warning of water inrush disasters, realize high-definition unmanned monitoring and early warning in a relatively poor environment such as dim dust in the tunnel, and more accurately realize accurate identification and early warning of water inrush disasters by combining machine vision and deep learning neural networks. Moreover, the camera of the present application still has the function of high-definition video shooting in a dim, dusty, and humid environment.
[0083] Embodiment 2
[0084] As shown in FIG. 5, the present implementation provides a tunnel water inrush disaster frame difference method automatic identification and early warning system, which includes:
[0085] The image processing unit is configured to: acquire images of adjacent video frames, subtract the gray values of the images of adjacent video frames pixel by pixel to obtain a difference image, perform binaryzation processing on the pixel points in the difference image to obtain a binaryzation image, perform connectivity processing on the binaryzation image to obtain a target image of a moving target after excluding worker or mobile device intrusion, and further obtain a target image sequence in the video;
[0086] The water inrush point quantity early warning unit is configured to: acquire the water inrush point quantity of the target image sequence at a current time and at a plurality of times before the current time, predict the change in the water inrush point quantity by using a neural network model based on time series, and perform early warning of an increase in the water inrush point quantity when the water inrush point quantity at a certain time after the current time is greater than a first set threshold.
[0087] The water inrush volume early warning unit is configured to: calculate the contour and area of the water inrush according to the target image, estimate the size of the water inrush volume based on the calculated contour and area of the water inrush, equivalently convert the water inrush flow into a cylinder to obtain the water inrush volume, obtain the water inrush volume at the current time and at multiple times before the current time of the target image sequence, predict the change in the water inrush volume by using a neural network model based on time series, and perform early warning of an increase in the water inrush volume when the water inrush volume at a time after the current time is greater than a second set threshold.
[0088] The water inrush quality early warning unit is configured to: extract a water inrush region image according to the target image, extract color information of the water inrush region in each video frame, compare the extracted color information in each frame with color information of a reference frame, calculate a color difference metric, obtain the color difference metric at the current time and at multiple times before the current time of each video frame, predict the change in the color difference metric by using a neural network model based on time series, and perform early warning of a change in water quality when the color difference metric at a time after the current time is greater than a third set threshold.
[0089] The comprehensive early warning unit is configured to comprehensively early warn the number of water inrush points, the water inrush volume, and the change in water quality, calculate a comprehensive early warning score S, including: S = f1*ω1 + f2*ω2 + f3*ω3, where ω1, ω2, and ω3 are weight parameters, f1 is a first set threshold, f2 is a second set threshold, and f3 is a third set threshold, obtain the comprehensive early warning indicator S at the current time and at multiple times before the current time of the target image sequence, predict the comprehensive early warning score S by using a neural network model based on time series, and divide early warning levels into low water inrush risk, medium water inrush risk, and high water inrush risk according to the comprehensive early warning score S.
[0090] It can be understood that the above-mentioned units can be combined into one or several other units to constitute, or some of the units can be further split into a plurality of units with smaller functions to constitute, which can achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions, and the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the tunnel water inrush disaster frame difference method automatic identification system can also include other units, and these functions can also be assisted by other units in actual application, and can be implemented by multiple units in cooperation.
[0091] According to another embodiment of the present application, the system described in the embodiment can be constructed and the tunnel water inrush disaster frame difference method automatic identification and early warning method of the embodiments of the present application can be implemented by running a computer program (including program codes) capable of performing each step involved in the corresponding method described in Embodiment 1 on a general computing device such as a computer including processing elements and storage elements such as a Central Processing Unit (CPU), a Random Access Memory (RAM), a Read Only Memory (ROM), and the like, the computer program can be recorded on a computer readable recording medium for example, and loaded into the above-mentioned computing device through the computer readable recording medium and run therein.
[0092] Embodiment 3:
[0093] As shown in FIG. 6, the present implementation provides an electronic device including a processor 1001, a communication interface 1002, and a computer readable storage medium 1003. Wherein the processor 1001, the communication interface 1002 and the computer readable storage medium 1003 can be connected through a bus or other means.
[0094] Wherein the communication interface 1002 is used for receiving and sending data, the computer readable storage medium 1003 can be stored in the memory of the electronic device, the computer readable storage medium 1003 is used for storing computer programs, the computer programs include program instructions, and the processor 1001 is used for executing the program instructions stored in the computer readable storage medium 1003.
[0095] The processor 1001 (or CPU (Central Processing Unit)) is the computing core and control core of the electronic device, which is suitable for implementing one or more instructions, and is particularly suitable for loading and executing one or more instructions to realize the corresponding method flow or corresponding function.
[0096] The processor 1001 is configured to perform the following process:
[0097] Obtaining the image of the adjacent video frame, subtracting the gray value of the adjacent video frame pixel by pixel to obtain the difference image, performing binaryzation processing on the pixel points in the difference image to obtain the binaryzation image, performing connectivity processing on the binaryzation image to obtain the target image of the moving target after excluding the invasion of workers or mobile devices, and further obtaining the target image sequence in the video;
[0098] Obtaining the number of water inrush points at the current time and a plurality of times before the current time of the target image sequence, using a neural network model based on time series to predict the change of the number of water inrush points, when the number of water inrush points at a certain time after the current time is greater than a first set threshold, the increase of the number of water inrush points is warned.
[0099] According to the target image, the contour and area of the sudden water inrush are calculated, the size of the water inrush flow is estimated based on the calculated contour and area of the sudden water inrush, and the sudden water inrush flow is equivalent to a cylindrical body to obtain the volume of the sudden water inrush;
[0100] Obtaining the volume of the sudden water inrush at the current time and a plurality of times before the current time of the target image sequence, using a neural network model based on time series to predict the change of the volume of the sudden water inrush, when the volume of the sudden water inrush at a certain time after the current time is greater than a second set threshold, the increase of the volume of the sudden water inrush is warned.
[0101] According to the target image, the water inrush region image is extracted, the color information of the water inrush region in each frame of video frame is extracted, the color information extracted in each frame is compared with the color information of the reference frame, and the color difference measure is calculated.
[0102] Obtaining the color difference measure at the current time and a plurality of times before the current time of each video frame, using a neural network model based on time series to predict the change of the color difference measure, when the color difference measure at a certain time after the current time is greater than a third set threshold, the change of water quality is warned.
[0103] The water inrush point number, the sudden water inrush volume and the water quality change are comprehensively warned, and a comprehensive warning score S is calculated, including:
[0104] S=f1*ω1+f2*ω2+f3*ω3, wherein ω1, ω2 and ω3 are weight parameters, f1 is the first set threshold, f2 is the second set threshold, and f3 is the third set threshold.
[0105] Obtaining the comprehensive warning index S at the current time and a plurality of times before the current time of the target image sequence, using a neural network model based on time series to predict the comprehensive warning score S, and dividing the warning level according to the comprehensive warning score S into low risk of water inrush, medium risk of water inrush and high risk of water inrush.
[0106] Embodiment 4:
[0107] The present implementation provides a computer readable storage medium (Memory), which is a memory device in an electronic device, used to store programs and data. It can be understood that the computer readable storage medium herein can include a built-in storage medium in the electronic device, and of course can also include an extended storage medium supported by the electronic device. The computer readable storage medium provides a storage space which stores the processing system of the electronic device.
[0108] And in the storage space, one or more instructions suitable for being loaded and executed by the processor are also stored, which can be one or more computer programs (including program codes). It should be noted that the computer readable storage medium herein can be a high-speed RAM memory, or a non-volatile memory such as at least one disk memory; optionally, it can also be at least one computer readable storage medium located away from the aforementioned processor.
[0109] In one embodiment, the computer readable storage medium stores one or more instructions; the processor loads and executes the one or more instructions stored in the computer readable storage medium to implement the following processes:
[0110] Obtain the image of the adjacent video frame, subtract the gray value of the adjacent video frame pixel by pixel to obtain the difference image, perform binaryzation processing on the pixel points in the difference image to obtain the binaryzation image, perform connectivity processing on the binaryzation image to obtain the target image of the moving target after excluding the invasion of workers or mobile devices, and further obtain the target image sequence in the video;
[0111] Obtain the number of water inrush points at the current time and at a plurality of times before the current time of the target image sequence, predict the change of the number of water inrush points by using a neural network model based on time sequence, and when the number of water inrush points at a time after the current time is greater than a first set threshold, a warning of an increase in the number of water inrush points is given.
[0112] According to the target image, the outline and area of the sudden water inrush are calculated and integrated, the size of the water inrush amount is estimated based on the calculated outline and area of the sudden water inrush, the water inrush flow is equivalent to a cylinder to obtain the volume of the sudden water inrush.
[0113] Obtain the volume of the sudden water inrush at the current time and at a plurality of times before the current time of the target image sequence, predict the change of the volume of the sudden water inrush by using a neural network model based on time sequence, and when the volume of the sudden water inrush at a time after the current time is greater than a second set threshold, a warning of an increase in the volume of the sudden water inrush is given.
[0114] According to the target image, a water gushing area image is extracted, color information of the water gushing area in each frame of video frame is extracted, the color information extracted in each frame is compared with color information of a reference frame, and a color difference measure is calculated;
[0115] The color difference measures of each video frame at the current time and at a plurality of times before the current time are obtained, a neural network model based on time series is used to predict the color difference measure change, and when the color difference measure at a time after the current time is greater than a third set threshold, a water quality change warning is performed.
[0116] The water gushing point number, the sudden gushing water volume, and the water quality change are comprehensively warned, and a comprehensive warning score S is calculated, including:
[0117] S = f1*ω1+f2*ω2+f3*ω3, wherein ω1, ω2, and ω3 are weight parameters, f1 is a first set threshold, f2 is a second set threshold, and f3 is a third set threshold;
[0118] The comprehensive warning indicators S of the target image sequence at the current time and at a plurality of times before the current time are obtained, a neural network model based on time series is used to predict the comprehensive warning score S, and according to the comprehensive warning score S, the warning level is divided into a water gushing low risk, a water gushing medium risk, and a water gushing high risk.
[0119] Embodiment 5:
[0120] The present implementation provides a computer program product or computer program, which includes computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to make the electronic device execute the following processes:
[0121] An image of a neighboring video frame is obtained, the image gray values of the neighboring video frames are subtracted pixel by pixel to obtain a difference image, the pixel points in the difference image are binarized to obtain a binarized image, the binarized image is subjected to connectivity processing to obtain a target image of a moving target after excluding worker or mobile device intrusion, and then a target image sequence in the video is obtained;
[0122] The water gushing point numbers of the target image sequence at the current time and at a plurality of times before the current time are obtained, a neural network model based on time series is used to predict the water gushing point number change, and when the water gushing point number at a time after the current time is greater than a first set threshold, a water gushing point number increase warning is performed.
[0123] According to the target image, the outline and area of the gushing water are calculated by integration, the size of the gushing water flow is estimated based on the calculated outline and area of the gushing water, the gushing water flow is equivalent to a cylindrical body, and the volume of the gushing water is obtained;
[0124] The volumes of the gushing water at the current time and at multiple times before the current time of the target image sequence are obtained, the change in the volume of the gushing water is predicted using a neural network model based on time series, and when the volume of the gushing water at a certain time after the current time is greater than a second set threshold, an early warning of an increase in the volume of the gushing water is performed.
[0125] According to the target image, a gushing water region image is extracted, color information of the gushing water region in each video frame is extracted, and the color information extracted in each frame is compared with color information of a reference frame to calculate a color difference metric;
[0126] The color difference metrics of each video frame at the current time and at multiple times before the current time are obtained, the change in the color difference metric is predicted using a neural network model based on time series, and when the color difference metric at a certain time after the current time is greater than a third set threshold, an early warning of a change in water quality is performed.
[0127] The number of gushing points, the volume of the gushing water, and the change in water quality are comprehensively warned, and a comprehensive early warning score S is calculated, including:
[0128] S = f1*ω1 + f2*ω2 + f3*ω3, wherein ω1, ω2, and ω3 are weight parameters, f1 is a first set threshold, f2 is a second set threshold, and f3 is a third set threshold;
[0129] The comprehensive early warning indicators S at the current time and at multiple times before the current time of the target image sequence are obtained, the comprehensive early warning score S is predicted using a neural network model based on time series, and the early warning level is divided into low risk of gushing water, medium risk of gushing water, and high risk of gushing water according to the comprehensive early warning score S.
[0130] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in the present application can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0131] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in or transmitted by a computer readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired (for example, coaxial cable, optical fiber, digital line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data processing device such as a server, data center, etc. integrated with one or more available media. The available media can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, solid state disk (SSD)) and the like.
[0132] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A tunnel water inrush disaster frame difference method automatic identification early warning method, characterized in that, The method comprises the following steps: obtaining the images of adjacent video frames, subtracting the gray values of the images of adjacent video frames pixel by pixel to obtain a difference image, performing binaryzation processing on the pixel points in the difference image to obtain a binaryzation image, performing connectivity processing on the binaryzation image to obtain a target image of a moving target after excluding the invasion of workers or mobile devices, and further obtaining a target image sequence in the video; obtaining the number of water inrush points at the current time and at multiple times before the current time of the target image sequence, predicting the change of the number of water inrush points by using a neural network model based on time sequence, and performing early warning of the increase of the number of water inrush points when the number of water inrush points at a certain time after the current time is greater than a first set threshold value.
2. The tunnel water inrush disaster frame difference method automatic identification and early warning method according to claim 1, wherein: the contour and area of the water inrush are calculated by integral according to the target image, the size of the water inrush volume is estimated based on the calculated contour and area of the water inrush, the water inrush flow is equivalent to a cylindrical body to obtain the water inrush volume; the water inrush volume at the current time and at multiple times before the current time of the target image sequence is obtained, the change of the water inrush volume is predicted by using a neural network model based on time sequence, and early warning of the increase of the water inrush volume is performed when the water inrush volume at a certain time after the current time is greater than a second set threshold value.
3. The tunnel water inrush disaster frame difference method automatic identification and early warning method according to claim 2, wherein: the water inrush region image is extracted according to the target image, the color information of the water inrush region in each video frame is extracted, the extracted color information in each frame is compared with the color information of a reference frame, and the color difference metric is calculated; the color difference metric at the current time and at multiple times before the current time of each video frame is obtained, the change of the color difference metric is predicted by using a neural network model based on time sequence, and early warning of the change of water quality is performed when the color difference metric at a certain time after the current time is greater than a third set threshold value.
4. The tunnel water inrush disaster frame difference method automatic identification and early warning method according to claim 3, wherein: the water inrush point number, the water inrush volume and the change of water quality are comprehensively warned, and a comprehensive early warning score S is calculated, including: S = f1*ω1 + f2*ω2 + f3*ω3, wherein ω1, ω2 and ω3 are weight parameters, f1 is the first set threshold value, f2 is the second set threshold value, and f3 is the third set threshold value; the comprehensive early warning index S at the current time and at multiple times before the current time of the target image sequence is obtained, the comprehensive early warning score S is predicted by using a neural network model based on time sequence, and the warning level is divided into low water inrush risk, medium water inrush risk and high water inrush risk according to the comprehensive early warning score S.
5. A tunnel water inrush disaster frame difference method automatic identification early warning system, characterized in that, The method comprises the following steps: An image processing unit is configured to: acquire images of adjacent video frames, subtract the image gray values of adjacent video frames pixel by pixel to obtain a difference image, perform binaryzation processing on the pixel points in the difference image to obtain a binary image, perform connectivity processing on the binary image to obtain a target image of a moving target after excluding worker or mobile device intrusion, and further obtain a target image sequence in the video; A water inrush point quantity early warning unit is configured to: acquire the water inrush point quantity at the current time and at multiple times before the current time of the target image sequence, predict the water inrush point quantity change by using a neural network model based on time series, and perform early warning of water inrush point quantity increase when the water inrush point quantity at a certain time after the current time is greater than a first set threshold value.
6. The tunnel water inrush disaster frame difference method automatic identification and early warning system of claim 5, wherein A water inrush volume early warning unit is configured to: calculate the contour and area of the water inrush based on the target image, estimate the size of the water inrush volume based on the calculated contour and area of the water inrush, equivalently regard the water inrush flow as a cylinder to obtain the water inrush volume, acquire the water inrush volume at the current time and at multiple times before the current time of the target image sequence, predict the water inrush volume change by using a neural network model based on time series, and perform early warning of water inrush volume increase when the water inrush volume at a certain time after the current time is greater than a second set threshold value; A water inrush water quality early warning unit is configured to: extract the water inrush region image based on the target image, extract the color information of the water inrush region in each video frame, compare the extracted color information in each frame with the color information of a reference frame, calculate the color difference metric, acquire the color difference metric at the current time and at multiple times before the current time of each video frame, predict the color difference metric change by using a neural network model based on time series, and perform early warning of water quality change when the color difference metric at a certain time after the current time is greater than a third set threshold value; A comprehensive early warning unit is configured to: comprehensively early warn the water inrush point quantity, the water inrush volume, and the water quality change, calculate a comprehensive early warning score S, including: S = f1*ω1 + f2*ω2 + f3*ω3, wherein ω1, ω2, and ω3 are weight parameters, f1 is the first set threshold value, f2 is the second set threshold value, and f3 is the third set threshold value, acquire the comprehensive early warning index S at the current time and at multiple times before the current time of the target image sequence, predict the comprehensive early warning score S by using a neural network model based on time series, and divide the early warning level into low water inrush risk, medium water inrush risk, and high water inrush risk according to the comprehensive early warning score S.
7. A tunnel water inrush disaster frame difference method automatic identification early warning system, characterized in that, The system comprises: a high-definition camera and a control terminal in communication with the high-definition camera, wherein the control terminal is configured to perform the tunnel water inrush disaster frame difference method automatic identification and early warning method of any one of claims 1-4. The high-definition camera comprises a high-definition camera body, a high-definition camera top cover, an inclined lens protection lens, a camera lens, an array infrared light supplement lamp plate, a camera angle adjusting mechanism, a camera mounting bottom plate and a heating wire. The high-definition camera top cover is fixed on the top of the high-definition camera body, the inclined lens protection lens is arranged outside the camera lens, the lens protection lens and the camera lens are arranged on the lower part of the high-definition camera top cover, the array infrared light supplement lamp plate is arranged beside the camera lens, the high-definition camera body is connected with the camera mounting bottom plate through the camera angle adjusting mechanism, and the periphery of the lens protection lens is provided with the heating wire.
8. A computer device, comprising: It comprises: a processor and a computer readable storage medium; a processor adapted to execute a computer program; a computer readable storage medium having a computer program stored therein, the computer program being executed by the processor to implement the tunnel water inrush disaster frame difference method automatic identification and early warning method according to any one of claims 1 to 4.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is adapted to be loaded and executed by the processor to implement the tunnel water inrush disaster frame difference method automatic identification and early warning method according to any one of claims 1 to 4.
10. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is executed by the processor to implement the tunnel water inrush disaster frame difference method automatic identification and early warning method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Tunnel leakage level identification method and device, storage medium and electronic device
CN110689042A
Tunnel leakage rate prediction method based on neural network
CN111141653A
Tunnel face underground water outlet feature intelligent identification method and underground water state grading method
CN113269865A
Method and system for identifying abnormal form in tunnel based on machine vision
CN116994172A
Tunnel water inrush dynamic prediction method and system based on intelligent visual monitoring
CN118379663A
Cited By
Evaluation model construction method for road slope disaster prevention and reduction
CN121982456A