A dam early warning method based on abnormal evolution trend
By processing the R, G, and B channels of dam images, calculating and correcting the evolutionary variation coefficients, and combining this with neural network analysis, the problem of misjudgment caused by changes in illumination and environmental interference in dam early warning methods was solved, achieving higher-precision early warning.
Patent Information
- Application Number
- CN202610992205.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-06
- Publication Date
- 2026-11-20
AI Technical Summary
Existing dam safety monitoring and early warning methods are easily affected by factors such as changes in lighting and environmental interference, resulting in low early warning accuracy and the occurrence of misjudgments.
A dam early warning method based on abnormal evolution trends is adopted. By acquiring the relative change maps of R, G, and B channels, the evolution variation coefficient is calculated, and the risk point ratio is combined for correction. The dam channel fusion neural network is used to process the multi-channel enhanced change map to identify the abnormal evolution area of the dam.
This improves the accuracy and reliability of dam early warning systems, enabling more precise identification of minor early-stage anomalies in the dam body, reducing false warnings and omissions of genuine anomalies, and enhancing the stability and precision of early warning judgments.
Smart Images

Figure CN123142138A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically to a dam early warning method based on abnormal evolution trends. Background Technology
[0002] In current dam safety monitoring and early warning systems, a common method is to use dam images captured by visible light from fixed locations. This technology has been widely adopted in various dam monitoring applications due to its advantages of convenient deployment, stable monitoring, controllable cost, and guaranteed image consistency. Specifically, this technology involves strategically deploying high-definition visible light cameras at fixed locations in key monitoring areas such as the dam slope, dam crest, and dam abutments. A unified shooting cycle, shooting parameters, and imaging standards are pre-set to acquire dam surface images at different times, from the same angle, and with the same resolution. This effectively avoids problems such as shooting angle deviations and inconsistent imaging standards, ensuring image comparability. After image acquisition, the system automatically preprocesses the images, including denoising, grayscale conversion, and image alignment, to eliminate the impact of factors such as lighting changes and environmental interference on image contrast. Then, an image difference algorithm is used to process the preprocessed dam images at adjacent time points. By calculating the grayscale difference between two images pixel by pixel, a grayscale difference image is generated. Based on a preset grayscale difference threshold, areas with differences greater than the threshold are identified as suspected abnormal change areas, thus initially identifying obvious change areas on the dam surface. Finally, based on simple indicators such as the area and difference of the suspected abnormal areas, it is determined whether to issue an early warning signal.
[0003] Existing image interpolation methods have significant technical limitations. The core issue lies in their weak resilience to external factors such as changes in lighting and environmental interference, making them prone to misjudgments. Although the system performs preprocessing operations such as denoising and alignment on the acquired images, it is difficult to completely eliminate the influence of complex environmental factors such as differences in light intensity at different times, changes in weather, dust obstruction, and water vapor interference. These interferences directly cause false fluctuations in image grayscale values. Therefore, existing technologies suffer from low accuracy in dam early warning systems. Summary of the Invention
[0004] To address the aforementioned shortcomings in existing technologies, this invention provides a dam early warning method based on abnormal evolution trends, which solves the problem of low accuracy in dam early warning in existing technologies.
[0005] To achieve the above-mentioned objectives, the technical solution adopted by this invention is: a dam early warning method based on abnormal evolution trends, comprising the following steps:
[0006] S1. Based on the difference between dam images at adjacent time points, obtain the relative change map of the R, G, and B channels;
[0007] S2. Add the relative change graphs of the same channel at multiple consecutive time points to obtain the cumulative change graphs of channels R, G, and B;
[0008] S3. Based on the relative change map of the same channel at each time point, obtain the evolution variation coefficient of each pixel in the R, G, and B channels. The evolution variation coefficient is used to quantify the degree of deviation of the current change of a single pixel relative to the historical normal fluctuation.
[0009] S4. Calculate the proportion of risk points in channels R, G, and B, and correct the evolution variation coefficients of the corresponding channels.
[0010] S5. Based on the evolution variation coefficients of the corrected R, G, and B channels, the cumulative variation map of the R, G, and B channels is enhanced to obtain the enhanced variation map of the R, G, and B channels.
[0011] S6. The enhanced variation map of the R, G, and B channels is processed by the dam channel fusion neural network to obtain the abnormal evolution area of the dam and to carry out early warning processing.
[0012] Furthermore, S1 includes the following sub-steps:
[0013] S11. Split the dam image into R, G, and B channel images;
[0014] S12. Based on the difference between the R channel images at adjacent time points, obtain the relative change value of the R channel to get the relative change map of the R channel.
[0015] S13. Based on the difference between G-channel images at adjacent time points, obtain the relative change value of the G-channel to obtain the relative change map of the G-channel.
[0016] S14. Based on the difference between B channel images at adjacent time points, obtain the relative change value of B channel to get the relative change map of B channel.
[0017] Furthermore, S12, S13, and S14 all include: employing the first The channel image at time 1 The channel value of the i-th pixel and the i-th The channel image at time 1 Subtract the channel value of the nth pixel from the channel value to obtain the channel difference. Then, subtract the channel difference from the nth pixel. The channel image at time 1 The ratio of the channel values of each pixel is used as the relative change value of the corresponding channel. The pixel number, This is the time number.
[0018] Furthermore, S3 includes the following sub-steps:
[0019] S31. On the same channel, add up the relative change values of the same pixel on the channel relative change map at multiple consecutive time points, and take the average value to obtain the average relative change value of the corresponding pixel.
[0020] S32. On the same channel, calculate the standard deviation of the relative change value of the same pixel on the channel relative change map at multiple consecutive time points, and obtain the standard deviation of the corresponding pixel.
[0021] S33. On the same channel, take the difference between the relative change value and the relative change mean of the same pixel point, and take the absolute value of the ratio of the difference of the same pixel point to the standard deviation as the evolution variation coefficient, and obtain the evolution variation coefficient of each pixel point in the R, G and B channels respectively.
[0022] Furthermore, S4 includes the following sub-steps:
[0023] S41. When the evolutionary variation coefficient of the R channel of a pixel is greater than the evolutionary variation threshold, the corresponding pixel is marked as the first risk point; when the evolutionary variation coefficient of the G channel of a pixel is greater than the evolutionary variation threshold, the corresponding pixel is marked as the second risk point; when the evolutionary variation coefficient of the B channel of a pixel is greater than the evolutionary variation threshold, the corresponding pixel is marked as the third risk point.
[0024] S42. Taking the first risk point as the center, under a large-scale window, calculate the proportion of the neighborhood containing the first risk point; taking the second risk point as the center, under a large-scale window, calculate the proportion of the neighborhood containing the second risk point; taking the third risk point as the center, under a large-scale window, calculate the proportion of the neighborhood containing the third risk point.
[0025] S43. Based on the proportion of the first risk point, the evolution variation coefficient of the first risk point of the center is corrected to obtain the corrected evolution variation coefficient of the R channel; based on the proportion of the second risk point, the evolution variation coefficient of the second risk point of the center is corrected to obtain the corrected evolution variation coefficient of the G channel; based on the proportion of the third risk point, the evolution variation coefficient of the third risk point of the center is corrected to obtain the corrected evolution variation coefficient of the B channel.
[0026] Furthermore, the correction formulas in S43 are all:
[0027] ,
[0028] in, For the first The first moment The evolutionary variation coefficient of the X channel after correction for each risk point. For the first The first moment The evolutionary variation coefficient of the X channel for each risk point. In the first Time with the first The proportion of risk points when each risk point is the center. The risk point is numbered. Let X be the time number, where X∈{R, G, B}.
[0029] Furthermore, S5 includes the following sub-steps:
[0030] S51. Map the modified R, G, and B channel evolution variation coefficients of each pixel to the range of 0 to 1 to obtain the evolution variation factors of the R, G, and B channels.
[0031] S52. Take the average value of the channel values in the cumulative change graph for each channel to obtain the channel average value;
[0032] S53. Subtract the channel value on the cumulative change graph of each channel from the corresponding channel mean to obtain the channel difference;
[0033] S54. The absolute value of the ratio of the channel difference to the corresponding channel mean is taken as the evolution intensity of the corresponding pixel, and the evolution intensity of the R, G, and B channels are obtained respectively.
[0034] S55. On the same channel, the evolution intensity is enhanced by the evolution variation factor, and the enhanced variation diagrams of the R, G and B channels are obtained respectively.
[0035] Furthermore, the enhancement formula in S55 is:
[0036] ,
[0037] in, For the first The first moment The enhancement evolution intensity of the X channel of each pixel For the first The first moment The evolution variation factor of the X channel of each pixel. For the first The cumulative change of the X channel at time 1 on the graph The evolution intensity of the X channel of a pixel, where i is the pixel number. Let X be the time number, where X∈{R, G, B}.
[0038] Furthermore, S6 includes the following sub-steps:
[0039] S61. Extract features from the enhanced change maps of R, G, and B channels respectively through convolutional channels to obtain the change features of R channel, G channel, and B channel.
[0040] S62. Input the R-channel variation features, G-channel variation features and B-channel variation features into the three-channel shared attention generation unit to obtain shared attention;
[0041] S63. Multiply the shared attention with the R-channel variation features element-wise using multiplier M1 to obtain the R-channel weighted features;
[0042] S64. Multiply the shared attention with the G-channel variation features element-wise using multiplier M2 to obtain the G-channel weighted features;
[0043] S65. Multiply the shared attention with the B-channel variation features element by element using multiplier M3 to obtain the B-channel weighted features;
[0044] S66. The first Concat layer is used to concatenate the weighted features of the R channel, the weighted features of the G channel, and the weighted features of the B channel to obtain the three-channel weighted features;
[0045] S67. Multi-scale feature fusion discrimination unit is used to process the three-channel weighted features to obtain the dam abnormal evolution area and carry out early warning processing.
[0046] Furthermore, the expression for the three-channel shared attention generation unit in S62 is:
[0047] ,
[0048] in, To share attention, For activation function, The characteristics of R-channel variation. The characteristics of G-channel variation The characteristics of channel B change. This is element-wise multiplication.
[0049] In another aspect, embodiments of this specification provide an electronic device, including a processor and a memory;
[0050] The processor is connected to the memory;
[0051] The memory is used to store executable program code;
[0052] The processor runs a program corresponding to the executable program code stored in the memory to perform the methods described in one or more embodiments.
[0053] On the other hand, embodiments of this specification provide a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the target retrieval method for air-ground collaborative security monitoring described above.
[0054] The beneficial effects of this invention are as follows:
[0055] 1. This invention employs a multi-channel processing approach, using R, G, and B channels respectively. By acquiring relative change maps for each channel, it can more comprehensively capture the changing characteristics of the dam image. Compared to a single grayscale channel, multi-channel data can effectively reduce false grayscale fluctuations caused by non-abnormal factors such as changes in illumination, dust obstruction, and water vapor interference. This reduces the impact of environmental interference on early warning judgment from the data source, avoids false early warnings and omissions of real anomalies, and improves the accuracy and reliability of early warning judgment.
[0056] 2. This invention obtains a cumulative change map by accumulating the relative change maps of the same channel at multiple consecutive time points, which enables the cumulative analysis of dam changes. Compared with the limitations of existing technologies that can only capture the intuitive differences between adjacent time points, this invention can clearly present the cumulative state of dam changes. At the same time, by calculating the evolutionary change coefficient of each pixel in each channel, the dynamic evolution law of the pixel is quantified, which can accurately identify the small abnormal changes in the early stage of the dam and capture the trend of abnormal evolution of the dam in a timely manner.
[0057] 3. This invention uses statistical analysis of the risk point proportions in the R, G, and B channels to specifically correct the evolution variation coefficients. This optimizes data weights based on the risk differences of each channel, avoiding the impact of single-channel data bias on the early warning results. Subsequently, the cumulative change map is enhanced using the corrected evolution variation coefficients, further highlighting the characteristics of abnormal areas in the dam body and weakening irrelevant interference information, making abnormal areas easier to identify. Finally, a dam channel fusion neural network is used to process the multi-channel enhanced change map, which can fully integrate the effective information from each channel, locate the abnormal evolution area of the dam, and improve the accuracy of dam early warning. Attached Figure Description
[0058] Figure 1 A flowchart of a dam early warning method based on abnormal evolution trends;
[0059] Figure 2 This is a schematic diagram of the structure of a multi-scale feature fusion discrimination unit;
[0060] Figure 3 This is a schematic diagram of the structure of the first multi-scale module and the second multi-scale module;
[0061] Figure 4 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this specification. Detailed Implementation
[0062] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0063] As used herein, the term "comprising" and its variations are open terms meaning "including but not limited to". The term "based on" means "at least partially based on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one other embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other definitions, whether explicit or implicit, may be included below. Unless explicitly indicated by the context, the definition of a term shall remain consistent throughout the specification.
[0064] like Figure 1 As shown, a dam early warning method based on abnormal evolution trends includes the following steps:
[0065] S1. Based on the difference between dam images at adjacent time points, obtain the relative change map of the R, G, and B channels;
[0066] S2. Add the relative change graphs of the same channel at multiple consecutive time points to obtain the cumulative change graphs of channels R, G, and B;
[0067] S3. Based on the relative change map of the same channel at each time point, obtain the evolution change coefficient of each pixel in the R, G, and B channels.
[0068] S4. Calculate the proportion of risk points in channels R, G, and B, and correct the evolution variation coefficients of the corresponding channels.
[0069] S5. Based on the evolution variation coefficients of the corrected R, G, and B channels, the cumulative variation map of the R, G, and B channels is enhanced to obtain the enhanced variation map of the R, G, and B channels.
[0070] S6. The enhanced variation map of the R, G, and B channels is processed by the dam channel fusion neural network to obtain the abnormal evolution area of the dam and to carry out early warning processing.
[0071] In this embodiment, S1 includes the following sub-steps:
[0072] S11. Split the dam image into R, G, and B channel images;
[0073] S12. Based on the difference between the R channel images at adjacent time points, obtain the relative change value of the R channel to get the relative change map of the R channel.
[0074] S13. Based on the difference between G-channel images at adjacent time points, obtain the relative change value of the G-channel to obtain the relative change map of the G-channel.
[0075] S14. Based on the difference between B channel images at adjacent time points, obtain the relative change value of B channel to get the relative change map of B channel.
[0076] In this embodiment, images of the dam at multiple times are captured and then split to obtain R-channel, G-channel, and B-channel images corresponding to the multiple times.
[0077] In this embodiment, S12, S13, and S14 all include: employing the first... The channel image at time 1 The channel value of the i-th pixel and the i-th The channel image at time 1 Subtract the channel value of the nth pixel from the channel value to obtain the channel difference. Then, subtract the channel difference from the nth pixel. The channel image at time 1 The ratio of the channel values of each pixel is used as the relative change value of the corresponding channel. The pixel number, The time intervals are numbered. Using the R-channel images at T time intervals, we obtain the relative change map of the R-channel at T-1 time intervals; using the G-channel images at T time intervals, we obtain the relative change map of the G-channel at T-1 time intervals; and using the B-channel images at T time intervals, we obtain the relative change map of the B-channel at T-1 time intervals.
[0078] The expression for the relative change graph of the X channel is:
[0079] ,
[0080] in, For the first The relative change of the X channel at time 1 on the graph The relative change value of the X channel of each pixel. For the first The X-channel image at time 1 The X channel value of each pixel For the first The X-channel image at time 1 The X channel value of each pixel, X∈{R,G,B}.
[0081] This invention splits the dam image into three channels, R, G, and B, for independent processing. Compared with a single grayscale channel, it can capture the image change features more comprehensively. This invention obtains the relative change value by the difference of the channel values of the same pixel at adjacent times, thus quantifying the degree of channel change of each pixel.
[0082] In this embodiment, S2 includes: starting from the current time, adding the relative change values of the R channel for the same pixel in the relative change maps of the R channel at multiple consecutive historical times to obtain the cumulative change map of the R channel at the current time; adding the relative change values of the G channel for the same pixel in the relative change maps of the G channel at multiple consecutive historical times to obtain the cumulative change map of the G channel at the current time; and adding the relative change values of the B channel for the same pixel in the relative change maps of the B channel at multiple consecutive historical times to obtain the cumulative change map of the B channel at the current time. Starting from the current time, the relative change maps of the channels at multiple times within a historical half hour or one hour can be added together.
[0083] Step S2 of this invention generates a cumulative change map for each of the R, G, and B channels by accumulating the relative change values of multiple consecutive historical moments. This allows for the cumulative quantification of pixel changes in the dam body, effectively highlighting real anomalies that are continuously developing, weakening random fluctuations caused by instantaneous environmental interference, and improving the stability of anomaly features.
[0084] In this embodiment, S3 includes the following sub-steps:
[0085] S31. On the same channel, sum the relative change values of the same pixel on the channel relative change map at multiple consecutive time points, and take the average value to obtain the average relative change value of the corresponding pixel:
[0086] ,
[0087] in, For the first The mean relative change of the X channel of each pixel For the first The relative change of the X channel at time 1 on the graph The relative change value of the X channel of each pixel. Let X be the duration of time, where X ∈ {R, G, B};
[0088] S32. On the same channel, calculate the standard deviation of the relative change value of the same pixel on the channel relative change map at multiple consecutive time points, and obtain the standard deviation of the corresponding pixel.
[0089] S33. On the same channel, take the difference between the relative change value and the relative change mean of the same pixel, and use the absolute value of the ratio of the difference value of the same pixel to the standard deviation as the evolution variation coefficient. Obtain the evolution variation coefficient of each pixel in the R, G, and B channels respectively:
[0090] ,
[0091] in, For the first The first moment The evolution variation coefficient of the X channel of each pixel. For the first The relative change of the X channel at time 1 on the graph The relative change value of the X channel of each pixel. For the first The mean relative change of the X channel of each pixel For the first The standard deviation of the X channel of each pixel, || is the absolute value.
[0092] The time range of consecutive moments selected in S31 and S32 is consistent with the time range of accumulating multiple consecutive historical moments in S2.
[0093] This invention quantifies the degree of deviation of the current change of a single pixel from the historical normal fluctuation by using the evolution variation coefficient. It can filter out random small disturbances caused by factors such as lighting and environment, and accurately highlight the abnormal change characteristics of sudden changes, thereby more stably identifying the true abnormal evolution trend of the dam body.
[0094] In this embodiment, step S3 obtains the evolution variation coefficients of the R, G, and B channels for each pixel at the current time, i.e., the evolution variation coefficient distribution images of the R channel, G channel, and B channel at the current time are obtained. Step S4 obtains the proportion of risk points on the evolution variation coefficient distribution image at the current time, and then corrects the evolution variation coefficient distribution image at the current time. S4 includes the following sub-steps:
[0095] S41. At the current moment, when the evolutionary variation coefficient of the R channel of a pixel is greater than the evolutionary variation threshold, the corresponding pixel is marked as the first risk point; when the evolutionary variation coefficient of the G channel of a pixel is greater than the evolutionary variation threshold, the corresponding pixel is marked as the second risk point; when the evolutionary variation coefficient of the B channel of a pixel is greater than the evolutionary variation threshold, the corresponding pixel is marked as the third risk point.
[0096] S42. Taking the first risk point as the center, under a large-scale window, calculate the proportion of the neighborhood where the first risk point exists. The neighborhood is the spatial neighborhood of the corresponding position (pixel grid) of the pixel. Taking the second risk point as the center, under a large-scale window, calculate the proportion of the neighborhood where the second risk point exists. Taking the third risk point as the center, under a large-scale window, calculate the proportion of the neighborhood where the third risk point exists.
[0097] S43. Based on the proportion of the first risk point, the evolution variation coefficient of the first risk point at the center is corrected to obtain the corrected evolution variation coefficient of the R channel; based on the proportion of the second risk point, the evolution variation coefficient of the second risk point at the center is corrected to obtain the corrected evolution variation coefficient of the G channel; based on the proportion of the third risk point, the evolution variation coefficient of the third risk point at the center is corrected to obtain the corrected evolution variation coefficient of the B channel. The evolution variation coefficients of other pixels remain unchanged. That is, when the first risk point is corrected using the R channel, the second and third risk points remain unchanged; when the second risk point is corrected using the G channel, the first and third risk points remain unchanged; when the third risk point is corrected using the B channel, the first and second risk points remain unchanged.
[0098] S41, S42, and S43 are all performed on the evolutionary variation coefficient distribution images of the R channel, the G channel, and the B channel at the current time.
[0099] The corrected formulas in S43 are all:
[0100] ,
[0101] in, For the first The first moment The evolutionary variation coefficient of the X channel after correction for each risk point. For the first The first moment The evolutionary variation coefficient of the X channel for each risk point. In the first Time with the first The proportion of risk points when each risk point is the center. The risk point is numbered. Let X be the time number, where X∈{R,G,B}.
[0102] In this embodiment, the large-scale window is set to 9×9. The proportion of risk points is the ratio of the number of risk points within the large-scale window to the number of pixels within the large-scale window.
[0103] In this embodiment, the threshold value set for the evolution variation coefficient is the mean of the evolution variation coefficient of the corresponding channel plus three times the standard deviation. This can effectively distinguish between normal fluctuations and abnormal mutations, and improve the accuracy of risk point marking.
[0104] This invention effectively eliminates spurious fluctuations caused by environmental interference and reduces the possibility of misjudgment by marking and statistically analyzing risk points on different channels (R, G, B) and correcting the evolutionary variation coefficient based on the proportion of risk points in the neighborhood. This invention achieves this by... The evolution variation coefficient of pixels with risk points in the neighborhood is further enhanced. By utilizing the spatial clustering characteristics of risk points, higher weights are given to real outliers that are distributed in clusters, while the influence of isolated noise points is weakened.
[0105] In this embodiment, S5 includes the following sub-steps:
[0106] S51. Map the modified R, G, and B channel evolution variation coefficients of each pixel to the range of 0 to 1 to obtain the evolution variation factors of the R, G, and B channels.
[0107] S52. Take the average value of the channel values in the cumulative change map for each channel (the average value of the channel values of all pixels in the cumulative change map) to obtain the channel average value;
[0108] S53. Subtract the channel value on the cumulative change graph of each channel from the corresponding channel mean to obtain the channel difference;
[0109] S54. The absolute value of the ratio of the channel difference to the corresponding channel mean is taken as the evolution intensity of the corresponding pixel, and the evolution intensity of the R, G, and B channels are obtained respectively.
[0110] S55. On the same channel, the evolution intensity is enhanced by the evolution variation factor, and the enhanced variation diagrams of the R, G and B channels are obtained respectively.
[0111] In this embodiment, the formula for the evolutionary variation factor in S51 is:
[0112] ,
[0113] in, For the first The first moment The evolution variation factor of the X channel of each pixel. For the first The first moment The evolution variation coefficient of the X channel after correction for each pixel.
[0114] In this embodiment, the formula for calculating the evolution intensity in S52 is:
[0115] ,
[0116] in, For the first The cumulative change of the X channel at time 1 on the graph The evolution intensity of the X channel of each pixel. For the first The cumulative change of the X channel at time 1 on the graph The X channel value of each pixel For the first The mean value of the X-channel in the cumulative change graph of the X-channel at time t.
[0117] In this embodiment, the strengthening formula in S55 is: ,in, For the first The first moment The enhancement evolution intensity of the X channel of each pixel For the first The first moment The evolution variation factor of the X channel of each pixel. For the first The cumulative change of the X channel at time 1 on the graph The evolution intensity of the X channel of a pixel, where i is the pixel number. Let X be the time number, where X∈{R,G,B}.
[0118] On the one hand, this invention utilizes evolutionary variation factors to highlight real anomalies that are spatially clustered, suppressing the interference of isolated noise points and improving the stability of anomaly features. On the other hand, it quantifies the relative deviation of pixels in the cumulative change map of channels by using evolutionary intensity, preserving the long-term cumulative anomaly evolution trend. Finally, the two are multiplied to obtain an enhanced change map, which takes into account both the cumulative change in the time dimension and strengthens the anomaly clustering characteristics in the spatial dimension, providing high-quality and high-discrimination feature input for subsequent neural network to accurately identify dam anomaly evolution areas and determine early warning levels.
[0119] The S6 dam channel fusion neural network includes: a first convolutional channel, a second convolutional channel, a third convolutional channel, a three-channel shared attention generation unit, multipliers M1, M2, and M3, a first concat layer, and a multi-scale feature fusion discrimination unit.
[0120] S6 processes the enhanced change map of the R, G, and B channels at the current moment to obtain the abnormal evolution area of the dam and the corresponding warning level at the current moment. Therefore, S2, S3, S4, and S5 all need to obtain the quantity at the current moment, and finally input the enhanced change map of the R, G, and B channels at the current moment into the neural network.
[0121] In this embodiment, S6 includes the following sub-steps:
[0122] S61. Extract features from the enhanced change maps of R, G, and B channels respectively through convolutional channels to obtain the change features of R channel, G channel, and B channel.
[0123] S62. Input the R-channel variation features, G-channel variation features and B-channel variation features into the three-channel shared attention generation unit to obtain shared attention;
[0124] S63. Multiply the shared attention with the R-channel variation features element-wise using multiplier M1 to obtain the R-channel weighted features;
[0125] S64. Multiply the shared attention with the G-channel variation features element-wise using multiplier M2 to obtain the G-channel weighted features;
[0126] S65. Multiply the shared attention with the B-channel variation features element by element using multiplier M3 to obtain the B-channel weighted features;
[0127] S66. The first Concat layer is used to concatenate the weighted features of the R channel, the weighted features of the G channel, and the weighted features of the B channel to obtain the three-channel weighted features;
[0128] S67. Multi-scale feature fusion discrimination unit is used to process the three-channel weighted features to obtain the dam abnormal evolution area and carry out early warning processing.
[0129] In this embodiment, S61 specifically includes: extracting features from the R-channel enhanced variation map through the first convolutional channel to obtain R-channel variation features; extracting features from the G-channel enhanced variation map through the second convolutional channel to obtain G-channel variation features; and extracting features from the B-channel enhanced variation map through the third convolutional channel to obtain B-channel variation features.
[0130] This invention extracts features from the enhanced variation maps of the R, G, and B channels separately, enabling better capture of detailed information in each channel. A shared attention mechanism ensures coordinated processing of variation features across different channels, allowing the model to more accurately focus on important regions and features, thereby reducing interference from redundant information. Multiplying the shared attention with the variation features of each channel using a multiplier weights important variation information across different channels, further enhancing the expressive power of the features. Multi-scale feature fusion after concatenation, combining information from different scales, helps analyze dam deformation from multiple dimensions and more comprehensively identify areas of abnormal evolution.
[0131] In this embodiment, the expression for the three-channel shared attention generation unit in S62 is:
[0132] ,
[0133] in, To share attention, The activation function generates an attention for each element after multiplication, resulting in shared attention. The scale is the same as the scale of the R-channel variation characteristics, G-channel variation characteristics, and B-channel variation characteristics. The characteristics of R-channel variation. The characteristics of G-channel variation The characteristics of channel B change. This is element-wise multiplication.
[0134] The shared attention of this invention is generated by multiplying the three-channel variation features element-wise and activating them with Sigmoid. It can effectively mine common anomalous features consistent across the R, G, and B channels, highlight the real dam anomalies in the joint response of multiple channels, and suppress independent anomalous responses caused by single-channel random noise or environmental interference, making the generated shared attention more reliable. At the same time, it can be used for weighting the features of each channel to achieve adaptive enhancement of anomalous features, further improving the accuracy of subsequent feature fusion and anomaly discrimination.
[0135] like Figure 2 As shown, the multi-scale feature fusion discrimination unit in S67 includes: a first convolutional layer, a second convolutional layer, a max pooling layer, an average pooling layer, a first multi-scale module, a second multi-scale module, an upsampling layer, a fully connected layer, and an adder A1;
[0136] The input of the first convolutional layer is used to input the three-channel weighted features, and its output is connected to the input of the max pooling layer and the input of the average pooling layer, respectively.
[0137] The output of the max pooling layer is connected to the input of the first multi-scale module; the output of the average pooling layer is connected to the input of the second multi-scale module.
[0138] The input of adder A1 is connected to the output of the first multi-scale module and the output of the second multi-scale module, and its output is connected to the input of the second convolutional layer.
[0139] The output of the second convolutional layer is connected to the input of the upsampling layer;
[0140] The input of the fully connected layer is connected to the output of the upsampling layer, and its output serves as the output of the multi-scale feature fusion discrimination unit.
[0141] like Figure 3 As shown, the first multi-scale module and the second multi-scale module have the same structure, both including: a third convolutional layer, a fourth convolutional layer, a fifth convolutional layer, and a second concat layer;
[0142] The input of the third convolutional layer is connected to the input of the fourth convolutional layer and the input of the fifth convolutional layer, respectively; the input of the second concat layer is connected to the output of the third convolutional layer, the output of the fourth convolutional layer and the output of the fifth convolutional layer, respectively, and its output serves as the output of the first multi-scale module and the second multi-scale module.
[0143] The first, second, and third convolutional channels have the same structure, each including a first convolutional block and a second convolutional block, which are connected sequentially. Both the first and second convolutional blocks include a convolutional layer, a batch normalization (BN) layer, and a ReLU layer. The convolutional kernels of both the first and second convolutional blocks are 3×3, with a stride of 1 and padding of 1.
[0144] The kernel size of the first convolutional layer is 1×1, which is used to map the 3×H×W three-channel weighted features to 1×H×W features, where H is the height and W is the width.
[0145] The pooling window size of the max pooling layer is 2×2, the pooling window size of the average pooling layer is 2×2, the kernel size of the third convolutional layer is 3×3, the kernel size of the fourth convolutional layer is 5×5, the kernel size of the fifth convolutional layer is 7×7, the kernel size of the second convolutional layer is 1×1, and the scale of the upsampling layer is 2 times.
[0146] Both the max pooling and average pooling layers employ 2×2 pooling windows, effectively compressing feature dimensions and preserving key anomaly features. Simultaneously, the two pooling methods capture local saliency and statistical information of the features respectively. Combined with structurally identical first and second multi-scale modules, and utilizing combinations of 3×3, 5×5, and 7×7 convolutional kernels, anomaly features at different scales are extracted. These features are then concatenated and fused through a Concat layer, comprehensively capturing the details of anomaly evolution at different scales of the dam body, avoiding the problem of missing minute anomalies or ignoring large-scale anomalies due to single-scale features. Adder A1 fuses the features processed by the two pooling and multi-scale modules, taking into account both local and global anomaly features. The second convolutional layer uses a 1×1 convolutional kernel to further integrate and fuse features and reduce dimensions. A 2x upsampling layer accurately restores the feature space size to the original input size, ensuring the spatial accuracy of anomaly region localization. Finally, a fully connected layer outputs the dam anomaly evolution region.
[0147] The fully connected layer receives the features fused from multiple scales, and through mapping, outputs the anomaly confidence of each pixel. The region with a confidence higher than the threshold is the dam's abnormal evolution region. At the same time, combined with the size of the dam's abnormal evolution region, an early warning is issued, and the area of the abnormal evolution region is broadcast.
[0148] This invention addresses the shortcomings of existing image interpolation methods, which are susceptible to external factors such as changes in lighting, weather conditions, dust obstruction, and moisture interference, leading to false fluctuations in image grayscale values and consequently causing misjudgments and low accuracy in dam early warning systems. The invention first extracts the relative change maps of the dam image across the R, G, and B channels at adjacent time points. Then, it accumulates the relative change maps of the same channel across multiple consecutive time points to obtain a cumulative change map for each channel. Simultaneously, based on the single-channel relative change maps at each time point, it calculates the evolutionary variation coefficient of each pixel across the three channels and corrects this coefficient by considering the proportion of risk points in each channel. The corrected evolutionary variation coefficients are then used to perform targeted enhancement processing on the cumulative change maps of each channel to highlight genuine anomalies and suppress false changes caused by environmental interference. Finally, a dam channel fusion neural network is used to process the enhanced change maps of the three channels, accurately identifying the actual anomaly evolution areas of the dam and achieving reliable early warning. This effectively eliminates false grayscale fluctuations caused by complex environmental factors, significantly reduces the probability of misjudgment, and solves the problem of low accuracy in existing dam early warning technologies.
[0149] See Figure 4 It shows a schematic diagram of the structure of an electronic device according to an embodiment of this specification, which can be used to implement... Figure 1 The method in the illustrated embodiment. (As shown) Figure 4 As shown, the electronic device 400 may include: at least one central processing unit 401, at least one network interface 404, user interface 403, memory 405, and at least one communication bus 402.
[0150] The communication bus 402 is used to enable communication between these components.
[0151] The user interface 403 may include a display screen and a camera. Optionally, the user interface 403 may also include a standard wired interface and a wireless interface.
[0152] The network interface 404 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0153] The processor 401 may include one or more processing cores. The processor 401 connects to various parts within the electronic device 400 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 405, and by calling data stored in the memory 405. Optionally, the processor 401 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 401 may integrate one or a combination of several of the following: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip, without being integrated into the processor 401.
[0154] The memory 405 may include random access memory (RAM) or read-only memory. Optionally, the memory 405 may include a non-transitory computer-readable storage medium. The memory 405 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 405 may also be at least one storage system located remotely from the aforementioned processor 401. Figure 4 As shown, the memory 405, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and program instructions.
[0155] exist Figure 4In the electronic device 400 shown, the user interface 403 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 401 can be used to call the image-based interactive application stored in the memory 405.
[0156] It should be noted that, in order to simplify the descriptions disclosed herein and thus aid in the understanding of one or more embodiments of the invention, the foregoing description of embodiments of this specification may sometimes combine multiple features into a single embodiment, drawing, or description thereof. However, this method of disclosure does not imply that the subject matter of this specification requires more features than those mentioned in the claims. In fact, the embodiments contain fewer features than all the features of a single embodiment disclosed above.
[0157] Finally, it should be understood that the embodiments described in this specification are merely illustrative of the principles of the embodiments described herein. Other variations may also fall within the scope of this specification. Therefore, alternative configurations of the embodiments described herein are intended to be illustrative rather than limiting, and should be considered consistent with the teachings of this specification. Accordingly, the embodiments described herein are not limited to those explicitly introduced and described herein.
[0158] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A dam early warning method based on abnormal evolution trends, characterized in that, Includes the following steps: S1. Based on the difference between dam images at adjacent time points, obtain the relative change map of the R, G, and B channels; S2. Add the relative change graphs of the same channel at multiple consecutive time points to obtain the cumulative change graphs of channels R, G, and B; S3. Based on the relative change map of the same channel at each time point, obtain the evolution variation coefficient of each pixel in the R, G, and B channels. The evolution variation coefficient is used to quantify the degree of deviation of the current change of a single pixel relative to the historical normal fluctuation. S4. Calculate the proportion of risk points in channels R, G, and B, and correct the evolution variation coefficients of the corresponding channels. S5. Based on the evolution variation coefficients of the corrected R, G, and B channels, the cumulative variation map of the R, G, and B channels is enhanced to obtain the enhanced variation map of the R, G, and B channels. S6. The enhanced variation map of the R, G, and B channels is processed by the dam channel fusion neural network to obtain the abnormal evolution area of the dam and to carry out early warning processing.
2. The dam early warning method based on abnormal evolution trends according to claim 1, characterized in that, S1 includes the following steps: S11. Split the dam image into R, G, and B channel images; S12. Based on the difference between the R channel images at adjacent time points, obtain the relative change value of the R channel to get the relative change map of the R channel. S13. Based on the difference between G-channel images at adjacent time points, obtain the relative change value of the G-channel to obtain the relative change map of the G-channel. S14. Based on the difference between B channel images at adjacent time points, obtain the relative change value of B channel to get the relative change map of B channel.
3. The dam early warning method based on abnormal evolution trends according to claim 2, characterized in that, S12, S13, and S14 all include: employing the first... The channel image at time 1 The channel value of the i-th pixel and the i-th The channel image at time 1 Subtract the channel value of the nth pixel from the channel value to obtain the channel difference. Then, subtract the channel difference from the nth pixel. The channel image at time 1 The ratio of the channel values of each pixel is used as the relative change value of the corresponding channel. The pixel number, This is the time number.
4. The dam early warning method based on abnormal evolution trends according to claim 2, characterized in that, S3 includes the following steps: S31. On the same channel, add up the relative change values of the same pixel on the channel relative change map at multiple consecutive time points, and take the average value to obtain the average relative change value of the corresponding pixel. S32. On the same channel, calculate the standard deviation of the relative change value of the same pixel on the channel relative change map at multiple consecutive time points, and obtain the standard deviation of the corresponding pixel. S33. On the same channel, take the difference between the relative change value and the relative change mean of the same pixel point, and take the absolute value of the ratio of the difference of the same pixel point to the standard deviation as the evolution variation coefficient, and obtain the evolution variation coefficient of each pixel point in the R, G and B channels respectively.
5. The dam early warning method based on abnormal evolution trends according to claim 1, characterized in that, S4 includes the following sub-steps: S41. When the evolution variation coefficient of the R channel of a pixel is greater than the evolution variation threshold, the corresponding pixel is marked as the first risk point. When the evolution variation coefficient of the G channel of a pixel is greater than the evolution variation threshold, the corresponding pixel is marked as the second risk point. When the evolution variation coefficient of the B channel of a pixel is greater than the evolution variation threshold, the corresponding pixel is marked as the third risk point. S42. Taking the first risk point as the center, under a large-scale window, calculate the proportion of neighborhoods where the first risk point exists; Centered on the second risk point, within a large-scale window, the proportion of neighborhoods containing the second risk point is statistically analyzed; Centered on the third risk point, within a large-scale window, the proportion of neighborhoods containing the third risk point is statistically analyzed; S43. Based on the proportion of the first risk point, the evolution variation coefficient of the first risk point in the center is corrected to obtain the corrected evolution variation coefficient of the R channel. Based on the proportion of the second risk point, the evolution variation coefficient of the second risk point at the center is corrected to obtain the corrected evolution variation coefficient of the G channel. Based on the proportion of the third risk point, the evolution variation coefficient of the third risk point in the center is corrected to obtain the corrected evolution variation coefficient of channel B.
6. The dam early warning method based on abnormal evolution trends according to claim 5, characterized in that, The correction formulas in S43 are all: , in, For the first The first moment The evolutionary variation coefficient of the X channel after correction for each risk point. For the first The first moment The evolutionary variation coefficient of the X channel for each risk point. In the first Time with the first The proportion of risk points when each risk point is the center. The risk point is numbered. Let X be the time number, where X∈{R,G,B}.
7. The dam early warning method based on abnormal evolution trends according to claim 1, characterized in that, S5 includes the following steps: S51. Map the modified R, G, and B channel evolution variation coefficients of each pixel to the range of 0 to 1 to obtain the evolution variation factors of the R, G, and B channels. S52. Take the average value of the channel values in the cumulative change graph for each channel to obtain the channel average value; S53. Subtract the channel value on the cumulative change graph of each channel from the corresponding channel mean to obtain the channel difference; S54. The absolute value of the ratio of the channel difference to the corresponding channel mean is taken as the evolution intensity of the corresponding pixel, and the evolution intensity of the R, G, and B channels are obtained respectively. S55. On the same channel, the evolution intensity is enhanced by the evolution variation factor, and the enhanced variation diagrams of the R, G and B channels are obtained respectively.
8. The dam early warning method based on abnormal evolution trends according to claim 7, characterized in that, The strengthening formula in S55 is: , in, For the first The first moment The enhancement evolution intensity of the X channel of each pixel For the first The first moment The evolution variation factor of the X channel of each pixel. For the first The cumulative change of the X channel at time 1 on the graph The evolution intensity of the X channel of a pixel, where i is the pixel number. Let X be the time number, where X∈{R,G,B}.
9. The dam early warning method based on abnormal evolution trends according to claim 1, characterized in that, S6 includes the following sub-steps: S61. Extract features from the enhanced change maps of R, G, and B channels respectively through convolutional channels to obtain the change features of R channel, G channel, and B channel. S62. Input the R-channel variation features, G-channel variation features and B-channel variation features into the three-channel shared attention generation unit to obtain shared attention; S63. Multiply the shared attention with the R-channel variation features element-wise using multiplier M1 to obtain the R-channel weighted features; S64. Multiply the shared attention with the G-channel variation features element-wise using multiplier M2 to obtain the G-channel weighted features; S65. Multiply the shared attention with the B-channel variation features element by element using multiplier M3 to obtain the B-channel weighted features; S66. The first Concat layer is used to concatenate the weighted features of the R channel, the weighted features of the G channel, and the weighted features of the B channel to obtain the three-channel weighted features; S67. Multi-scale feature fusion discrimination unit is used to process the three-channel weighted features to obtain the dam abnormal evolution area and carry out early warning processing.
10. The dam early warning method based on abnormal evolution trends according to claim 9, characterized in that, The expression for the three-channel shared attention generation unit in S62 is: , in, To share attention, For activation function, The characteristics of R-channel variation. The characteristics of G-channel variation The characteristics of channel B change. This is element-wise multiplication.
