An intelligent water level early warning method for water conservancy projects

By constructing a water level line identification model and calculating the wave stability coefficient, and adjusting the water level line measurement value using the STL algorithm, the problem of difficult to describe the dynamic water surface change characteristics is solved, and a stable water level warning effect is achieved.

CN120183144BActive Publication Date: 2025-08-05WUHAN YIMIJING TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510667804.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-08-05
Estimated Expiration
2045-05-23

AI Technical Summary

Technical Problem

The prior art is difficult to accurately describe the characteristics of dynamic water surface changes, resulting in delayed water level warning or high false alarm rate.

Method used

By collecting real-time water level images, building a water level line recognition model, calculating wave stability coefficient and change coefficient, using the STL algorithm to obtain trend coefficients, and adjusting the water level line measurement value to achieve stable water level warning.

Benefits of technology

It improves the robustness of water level warning, ensures the accuracy and stability of water level measurement, and reduces the false alarm rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120183144B_ABST
    Figure CN120183144B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of water level early warning, and discloses an intelligent water level early warning method for water conservancy projects. The method comprises: collecting real-time water level images, constructing a water level line recognition model, and obtaining a real-time water level line; continuously collecting real-time water level lines at multiple moments, and calculating the wave stability coefficient at each moment by utilizing the volatility of the real-time water level line; performing linear fitting on the real-time water level line at each moment, and utilizing the variation of the linear fitting results at consecutive moments to obtain the variation coefficient of the real-time water level line at each moment; obtaining the trend coefficient of the first moment based on the trend of the variation coefficient of the real-time water level line at consecutive moments; obtaining the mean of the horizontal coordinate values of the real-time water level line data, and obtaining the water level line measurement value using the trend coefficient as a weight; and completing the intelligent water level early warning method based on the water level line measurement value. The present invention can obtain a stable water level early warning result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of water level early warning, and in particular to an intelligent water level early warning method for water conservancy projects. Background Art

[0002] Water level monitoring in water conservancy projects is crucial for flood prevention and disaster reduction, water resource scheduling, and project safety. With the advancement of computer vision technology, image-based, non-contact water level monitoring has become a research hotspot. However, dynamic water surface fluctuations make it difficult to accurately reflect the true average water level.

[0003] Existing time-series prediction algorithms use surface motion models to compensate for fluctuation errors. However, due to the non-stationary nature of water surface fluctuations, these models struggle to accurately describe surface variations, leading to delayed warnings and increased false alarm rates in continuously fluctuating water conditions. Summary of the Invention

[0004] In order to solve the technical problem that it is difficult to obtain effective water level measurement results due to the above-mentioned dynamic water surface fluctuations, the present invention provides solutions in the following aspects.

[0005] In a first aspect, a water level intelligent early warning method for a water conservancy project comprises:

[0006] Collect the real-time water level image at the first moment, obtain the horizontal coordinate value of the warning line in the real-time water level image, build a water level recognition model, and use the water level recognition model to obtain the real-time water level;

[0007] Continuously collect real-time water level lines at multiple moments, obtain the volatility of the real-time water level lines, and calculate the wave stability coefficient at each moment;

[0008] Perform linear fitting on the real-time water level line at each moment to obtain the linear fitting result at each moment, and obtain the variation coefficient at each moment according to the change of the linear fitting result at consecutive moments;

[0009] According to the trend of the coefficient of change at consecutive moments, the trend coefficient at the first moment is obtained;

[0010] The mean of the horizontal coordinate value of the real-time water level line is obtained, and the mean of the horizontal coordinate value of the real-time water level line data is adjusted with the trend coefficient as the weight to obtain the water level line measurement value. According to the water level line measurement value, the water level intelligent early warning method is completed.

[0011] Preferably, the horizontal coordinate value of the warning line in the real-time water level image includes:

[0012] The camera coordinate system and the real coordinate system are spatially calibrated using the chessboard calibration method to obtain the horizontal coordinate value of the warning line in the real world in the camera imaging.

[0013] Preferably, the real-time water level line includes:

[0014] By setting an RGB camera above the water surface to collect water level lines, a real-time water level image is obtained. The collected real-time water level image is input into the trained water level recognition model to obtain the water level recognition result. The water level recognition result is preprocessed to obtain the real-time water level line.

[0015] Preferably, the wave stability coefficient includes:

[0016] The upper and lower envelope sequences of the real-time water level are obtained, the variance values corresponding to the horizontal coordinate data in the upper and lower envelope sequences are calculated, and the mean of the two variances is obtained as the wave stability coefficient of the real-time water level.

[0017] Preferably, the coefficient of variation at each moment includes:

[0018] Perform linear fitting on the real-time water level line at each moment, obtain the linear fitting result at each moment, and calculate the variation coefficient of the linear fitting result corresponding to the real-time water level images at two consecutive moments:

[0019] ; Express Traversal of values; For the Linear fitting results at time; for The corresponding linear fitting function The slope value of For the Linear fitting results at time; for The corresponding linear fitting function The slope value of express The cosine similarity between is a step function;

[0020] Will As The coefficient of change at each moment is obtained.

[0021] Preferably, the trend coefficient at the first moment includes:

[0022] The variation coefficient at each moment is obtained by using the STL algorithm and then decomposed to obtain the trend term in the STL decomposition result;

[0023] Obtain the coefficient of variation at each moment, obtain the wave stability coefficient at each moment, and normalize the inverse of the wave stability coefficient at all acquisition moments;

[0024] Using the normalized value of the wave stability coefficient at each moment, a linear weighted fitting is performed on the variation coefficient at each moment to obtain a fitted linear function, and a slope value of the linear function is obtained;

[0025] Get the angle value corresponding to the slope value, calculate the ratio of the angle value to 90 degrees, multiply the ratio by the hyperparameter to adjust the comparison value, and subtract the adjusted ratio from 1 as the trend coefficient at the first moment.

[0026] Preferably, the normalization includes:

[0027] Obtain the sum of the reciprocals of the wave stability coefficients collected at all moments, calculate the ratio of the reciprocal of the wave stability coefficient at each moment to the sum of the reciprocals of all wave stability coefficients, and use this ratio as the normalized value of the wave stability coefficient at each moment. The numerator of the ratio is the reciprocal of the wave stability coefficient at each moment, and the denominator is the sum of the reciprocals of the wave stability coefficients at all moments.

[0028] Preferably, the water level intelligent early warning includes:

[0029] Calculate the mean abscissa of the water level data at the first moment, and multiply the obtained mean abscissa by the trend coefficient at the first moment to obtain the water level measurement result in the image;

[0030] When the water level measurement result in the image is less than the horizontal coordinate value corresponding to the warning line, a water situation alarm is issued, completing the water level intelligent warning method.

[0031] Compared with the prior art, the intelligent water level early warning method for water conservancy projects according to the embodiment of the present invention has the following beneficial effects:

[0032] The dynamic water surface stability assessment of the present invention: by quantifying the degree of water surface fluctuation, a wave stability coefficient is proposed, and the trend coefficient is calculated by weighted combination with the trend change of the horizontal surface, so that stable and effective water surface measurement results can be obtained, thereby improving the robustness of water level warning. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 This is a method flow chart of steps S1 to S5 in a water level intelligent early warning method for a water conservancy project according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The following embodiments of the present invention are described in further detail with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention but are not intended to limit the scope of the present invention.

[0035] like Figure 1 As shown, an intelligent water level early warning method for water conservancy projects in a preferred embodiment of the present invention is specifically as follows:.

[0036] S1: Collect the real-time water level image at the first moment, obtain the horizontal coordinate value of the warning line in the real-time water level image, build a water level recognition model, and use the water level recognition model to obtain the real-time water level.

[0037] In one embodiment, the water level line is collected by setting an RGB camera above the water surface. To ensure that the RGB camera can collect the water level line, when setting the RGB camera, the RGB camera is facing the junction of the sea surface and the water level gauge, so that the RGB camera can capture the water level gauge and the water surface.

[0038] After the RGB camera acquires the real-time water level image, it transmits the acquired image to the data processing center via wireless transmission to obtain the acquired real-time water level image, wherein the moment corresponding to the latest real-time water level image acquired in real time is the first moment.

[0039] When using a camera for water level warning in a water conservancy project, it is necessary to spatially calibrate the camera coordinate system and the real coordinate system using the chessboard calibration method, and then obtain the horizontal coordinate value of the warning line in the real world in the camera imaging. In the real-time water level image collected, the upper left corner is the image coordinate origin, the horizontal coordinate is from top to bottom, and the vertical coordinate is from left to right.

[0040] An instance segmentation model is constructed as a water level recognition model. The instance segmentation model can choose to use an instance segmentation network model such as a fast-rcnn network model or a u-net network model. When performing water level recognition, the instance segmentation model is a pixel-level image segmentation recognition. Therefore, when constructing a data set for the water level recognition model, the pixels belonging to the water level in the data set need to be marked as 1, and the pixels not belonging to the water level are marked as 0. After the data set is labeled, the instance segmentation model is trained on the labeled data set to obtain a trained water level recognition model. The instance segmentation model training process is well known and will not be described in detail in the present invention.

[0041] Input the real-time water level image at the first moment into the trained water level recognition model to obtain the recognition result of the water level at the first moment, and obtain the coordinate sequence of the pixel points belonging to the water level in the recognition result of the water level at the first moment. , t represents the tth moment, the first moment is the latest moment, so t=1, is the coordinate sequence of the water level pixel points at time t, so It is a two-dimensional data consisting of the horizontal coordinate and vertical coordinate of each pixel point in the water level pixel point.

[0042] Since water level lines are often difficult to distinguish in water level recognition, it may lead to the problem that the same horizontal coordinate value corresponds to multiple vertical coordinates. When there are multiple ordinates corresponding to the same abscissa value, the mean of the multiple ordinate values in the same abscissa value is calculated as the unique mean corresponding to the single abscissa, and the ordinate corresponding to the abscissa is used to obtain a sequence of abscissas and ordinates with a one-to-one correspondence between the abscissas and ordinates, which is recorded as .

[0043] right Perform data preprocessing to obtain a complete and smooth water level line. Specifically: The data is interpolated using the least squares method, so that the missing water level data can be supplemented when the water level is missing, and then the interpolated horizontal and vertical coordinates are obtained. The interpolated horizontal and vertical coordinates are smoothed using the mean filter to obtain the smoothed horizontal and vertical coordinates as the real-time water level at time t. , is the real-time water level line data sequence of the current real-time water level image, so is a two-dimensional data, Each data point consists of a horizontal coordinate and a vertical coordinate with a one-to-one correspondence.

[0044] S2: Continuously collect the real-time water level line at multiple moments, obtain the volatility of the real-time water level line, and calculate the wave stability coefficient at each moment.

[0045] In one embodiment, Finally, because the water level is not necessarily stable during measurement, but fluctuates continuously, if we directly If the mean value of the vertical coordinate in is used as the water level measurement result, there will often be a large measurement error when the horizontal surface is not calm, thus affecting the accuracy of water level warning in water conservancy projects.

[0046] In order to reduce the impact of unstable water surface conditions on water level measurement, the water surface stability can be evaluated and weighted according to the overall change trend of the water surface, so that stable water level measurement results can be obtained when measuring the water surface, which is used to improve the accuracy of water level measurement.

[0047] right Using the peak point detection method, we can get The peak sequence and trough sequence of The first data point and the last data point in the sequence and the corresponding peak sequence The upper envelope sequence of .

[0048] Will The first data point and the last data point in the series and the corresponding trough sequence The lower envelope sequence of .

[0049] After obtaining the upper and lower envelope sequences of the real-time water level at time t, since the water surface appears wavy when it moves irregularly, the mean of the two variance values corresponding to the upper and lower envelope sequences of the real-time water level is calculated as the wave stability coefficient of the real-time water level image, which represents the water surface stability assessment result.

[0050] Get and The variance values corresponding to the horizontal coordinate data and ,calculate and The mean of the two variances is used as the wave stability coefficient at the current moment t .

[0051] S3: Perform linear fitting on the real-time water level line at each moment to obtain the linear fitting result at each moment, and obtain the variation coefficient at each moment according to the change of the linear fitting result at consecutive moments.

[0052] In one embodiment, after obtaining the wave stability coefficient of the real-time water level image, since the water surface fluctuation is unstable, when performing water level measurement for water level warning, a stable water level measurement result is required to improve the stability of the water level warning.

[0053] The overall trend change of the water surface can be obtained, and the overall trend change is weighted according to the wave stability coefficient to obtain a stable water level change trend. According to the water level change trend, a stable water level measurement result is obtained.

[0054] In order to obtain a stable horizontal plane at time t, the real-time water level at time t is Perform linear fitting as the stable horizontal plane at the tth moment, so Use the least squares method to perform linear fitting and get the fitting function ,Will Substitute the horizontal coordinates in the fitting function The linear fitting result is obtained .in, For a slope-intercept function, there exists a slope value and intercept

[0055] Since the water surface is not actually horizontal when it is moving, Although linear, It is not parallel to the absolute horizontal line, which makes it impossible to directly Used to calculate water surface measurement results, and then used for accurate water surface measurement based on stable water surface changes.

[0056] Before acquisition Linear fitting results at time ,in An empirical value of 20 is used, which can be adjusted by the implementer according to the specific implementation method.

[0057] In order to obtain the changes in the linear fitting results corresponding to the real-time water level images at two consecutive moments, it represents the overall upward trend or overall downward trend of the water surface.

[0058] Calculate the variation coefficient of the linear fitting result corresponding to the real-time water level image at two consecutive moments, where and The variation coefficient of the linear fitting result corresponding to the real-time water level images at two consecutive moments :

[0059]

[0060] Express The traversal of the value, so The value range is .

[0061] For the The linear fitting result at the moment indicates The flat horizontal surface corresponding to the real-time water level image collected at all times.

[0062] for The corresponding linear fitting function The slope value of The inclination of the flat horizontal surface corresponding to the real-time water level image collected at each moment.

[0063] For the The linear fitting result at the moment is expressed as The flat horizontal surface corresponding to the real-time water level image collected at all times.

[0064] for The corresponding linear fitting function The slope value of The inclination of the flat horizontal surface corresponding to the real-time water level image collected at each moment.

[0065] express The cosine similarity between The similarity between two sets of data sequences, The larger the The smaller the difference between the two, the smaller the change in the linear fitting results between two consecutive moments, and the real-time water level lines between two consecutive moments are relatively stable. , completing the negative correlation mapping.

[0066] is a step function, when hour, -1 means that the real-time water level line at two consecutive moments is in a downward trend.

[0067] when hour, When it is 0, it means that the real-time water level line at two consecutive moments is a stable trend.

[0068] when hour, If it is 1, it means that the real-time water level lines at two consecutive moments follow the above trend.

[0069] get The coefficient of variation between two consecutive moments .

[0070] Among them, since the water level measurement is time series data, and in order to facilitate subsequent data processing, As Coefficient of variation at time , Similarly, obtain the variation coefficients corresponding to the remaining moments and form a variation coefficient sequence.

[0071] S4: According to the trend of the variation coefficient at consecutive moments, the trend coefficient at the first moment is obtained.

[0072] In one embodiment, after obtaining the variation coefficient sequence, a trend analysis is performed on the variation coefficient to obtain the overall upward trend or overall downward trend of the water surface.

[0073] The variation coefficient sequence is decomposed using the STL algorithm to obtain seasonality, trend terms and residuals in the STL decomposition results. Among them, seasonality represents the short-term cycle of water surface fluctuations, and the trend term represents the overall rising and falling trends of the water surface.

[0074] However, if the wave stability coefficient collected at a single moment is larger, it means that the real-time water level line at a single moment is inaccurate. Therefore, when using the trend line of the variation coefficient sequence to analyze the overall trend change of the water surface, the trend item corresponding to the wave stability coefficient can be used for weighted linear fitting to obtain the fitting function. The slope value of the fitting function is scaled and used as the trend coefficient at a single moment.

[0075] Specifically, obtain the coefficient of change at each moment, obtain the wave stability coefficient at each moment, The inverse of all wave stability coefficients at the moment is normalized.

[0076] The normalization method is: obtain the sum of the reciprocals of the wave stability coefficients at all times, calculate the ratio of the reciprocal of each wave stability coefficient to the sum of the reciprocals of all wave stability coefficients, and use it as the weight value of the wave stability coefficient at each moment. The numerator of the ratio is the reciprocal of each wave stability coefficient, and the denominator is the sum of the reciprocals of all wave stability coefficients.

[0077] The normalized value of the wave stability coefficient at each moment is used as the linear fitting weight at each moment. The linear weighted fitting algorithm is used to perform linear weighted fitting on the variation coefficient collected at each moment to obtain the fitted linear function and the slope value of the linear function.

[0078] The inverse tangent function is used to calculate the angle value corresponding to the slope value, and the ratio of the angle value to 90 degrees is calculated. The ratio is multiplied by the hyperparameter 1.2 to adjust the contrast value. The adjusted ratio is subtracted from 1 to obtain the trend coefficient at the first moment.

[0079] Among them, the hyperparameter 1.2 is an empirical value and can be adjusted by the implementer according to the specific implementation scenario. The purpose of subtracting the adjusted ratio from 1 is to adjust the range of the trend coefficient. In addition, since the upper left corner of the image is the origin of the image coordinates, when the overall horizontal plane trend is decreasing, the ratio is negative, and the trend coefficient is greater than 1. When the overall horizontal plane trend is increasing, the ratio is positive, and the trend coefficient is less than 1.

[0080] S5: Obtain the mean of the horizontal coordinate values of the real-time water level line data, adjust the mean of the horizontal coordinate values of the real-time water level line data using the trend coefficient as the weight, obtain the water level line measurement value, and complete the water level intelligent early warning method based on the water level line measurement value.

[0081] In one embodiment, after obtaining the trend coefficient at the first moment, the real-time water level line data at the first moment is obtained, the horizontal coordinate mean of the water level line data is calculated, and the obtained horizontal coordinate mean is multiplied by the trend coefficient at the first moment to obtain the water level line measurement result in the image.

[0082] When the water level measurement result in the image is less than the horizontal coordinate value corresponding to the warning line, a water situation alarm is issued, completing the water level intelligent warning method.

[0083] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary counting personnel in this technical field, several improvements and substitutions can be made without departing from the counting principle of the present invention. These improvements and substitutions should also be regarded as the scope of protection of the present invention.

Claims

1. A water level intelligent early warning method for water conservancy projects, characterized in that: include: Collect the real-time water level image at the first moment, obtain the horizontal coordinate value of the warning line in the real-time water level image, build a water level recognition model, and use the water level recognition model to obtain the real-time water level; Continuously collect real-time water level lines at multiple moments, obtain the volatility of the real-time water level lines, and calculate the wave stability coefficient at each moment; The moment corresponding to the latest real-time water level image is collected in real time as the first moment; the variation coefficient of each moment is obtained by the STL algorithm and then decomposed to obtain the trend item in the STL decomposition result; the variation coefficient of each moment is obtained, the wave stability coefficient of each moment is obtained, and the inverse of the wave stability coefficient of all collected moments is normalized; Using the normalized value of the wave stability coefficient at each moment, a linear weighted fit is performed on the variation coefficient at each moment to obtain a fitted linear function, and the slope value of the linear function is obtained; the angle value corresponding to the slope value is obtained, and the ratio of the angle value to 90 degrees is calculated. The ratio is multiplied by the hyperparameter to adjust the contrast value, and the adjusted ratio is subtracted from 1 to obtain the trend coefficient at the first moment; Perform linear fitting on the real-time water level line at each moment to obtain the linear fitting result at each moment, and obtain the variation coefficient at each moment according to the change of the linear fitting result at consecutive moments; The mean of the horizontal coordinate value of the real-time water level line is obtained, and the mean of the horizontal coordinate value of the real-time water level line data is adjusted with the trend coefficient as the weight to obtain the water level line measurement value. According to the water level line measurement value, the water level intelligent early warning method is completed.

2. The water level intelligent early warning method for water conservancy projects according to claim 1, characterized in that: The horizontal coordinate values of the warning line in the real-time water level image include: The camera coordinate system and the real coordinate system are spatially calibrated using the chessboard calibration method to obtain the horizontal coordinate value of the warning line in the real world in the camera imaging.

3. The intelligent water level early warning method for water conservancy projects according to claim 1, characterized in that: Real-time water level lines include: By setting an RGB camera above the water surface to collect water level lines, a real-time water level image is obtained. The collected real-time water level image is input into the trained water level recognition model to obtain the water level recognition result. The water level recognition result is preprocessed to obtain the real-time water level line.

4. The intelligent water level early warning method for water conservancy projects according to claim 1, characterized in that: Wave stability factors include: The upper and lower envelope sequences of the real-time water level are obtained, the variance values corresponding to the horizontal coordinate data in the upper and lower envelope sequences are calculated, and the mean of the two variances is obtained as the wave stability coefficient of the real-time water level.

5. The intelligent water level early warning method for water conservancy projects according to claim 1, characterized in that: The coefficient of variation at each moment includes: Perform linear fitting on the real-time water level line at each moment, obtain the linear fitting result at each moment, and calculate the variation coefficient of the linear fitting result corresponding to the real-time water level images at two consecutive moments: Express Traversal of values; For the Linear fitting results at time; for The corresponding linear fitting function The slope value of For the Linear fitting results at time; for The corresponding linear fitting function The slope value of express The cosine similarity between is a step function; Will As The coefficient of change at each moment is obtained.

6. The water level intelligent early warning method for water conservancy projects according to claim 1, characterized in that: Normalization includes: Obtain the sum of the reciprocals of the wave stability coefficients collected at all moments, calculate the ratio of the reciprocal of the wave stability coefficient at each moment to the sum of the reciprocals of all wave stability coefficients, and use this ratio as the normalized value of the wave stability coefficient at each moment. The numerator of the ratio is the reciprocal of the wave stability coefficient at each moment, and the denominator is the sum of the reciprocals of the wave stability coefficients at all moments.

7. The intelligent water level early warning method for water conservancy projects according to claim 1, characterized in that: Water level intelligent warning includes: Calculate the mean abscissa of the water level data at the first moment, and multiply the obtained mean abscissa by the trend coefficient at the first moment to obtain the water level measurement result in the image; When the water level measurement result in the image is less than the horizontal coordinate value corresponding to the warning line, a water situation alarm is issued, completing the water level intelligent warning method.

Citation Information

Patent Citations

  • Self-adaptive environment water level identification method, device and equipment

    CN116129430A

  • KR1025196060000B1