Water level anomaly detection and early warning method based on machine learning

Through the early warning method of water level abnormality detection and warning in the existing technology, the problem of water level changes caused by the melting of ice and snow in winter and the difference in river locations is solved, and the refined distinction of river channels and intelligent prediction of water levels is realized, and the monitoring and early warning efficiency is improved. .

CN118552852BInactive Publication Date: 2024-11-29LOUDI WATER RESOURCES & HYDROPOWER ENG CONSTR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410664920.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-11-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing water level monitoring and early warning technologies cannot accurately predict the short-term water level rise caused by the melting of ice and snow in winter, and the difference in water level changes caused by differences in different river locations, resulting in inaccurate predictions.

Method used

Using machine learning-based water level anomaly detection and warning method, we use meteorological information, historical logs and land hydrological maps, as well as image data and environmental information around the river, divide river channels, analyze river relations parameters and risk coefficients, and predict future water levels based on meteorological information. Change, calculate trend index and provide early warning.

Benefits of technology

It realizes refined river channels and intelligent water level prediction, and improves the efficiency and accuracy of water level monitoring and early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552852B_ABST
    Figure CN118552852B_ABST
Patent Text Reader

Abstract

The present invention discloses a water level anomaly detection and early warning method based on machine learning, which belongs to the field of water level early warning technology. First, by collecting meteorological information, historical logs and land hydrological maps, as well as image data and environmental information around rivers in a specified area, the rivers are divided into river channels in the land hydrological map, and a training set is extracted from the historical log using a machine learning algorithm, and the relationship parameters and risk coefficients of each river channel are analyzed; secondly, the abnormal river channel and the marked river channel are divided according to the risk coefficient, the image data and environmental information around the marked river channel are analyzed and a relationship formula is established, and the water level change amplitude of the abnormal river channel in the future period is predicted in combination with meteorological information, so as to calculate the trend index of the abnormal river channel; finally, the information of all river channels is displayed through a data center, water level records are generated regularly and stored in the historical log, an index threshold is set, and an early warning is issued when the trend index of the abnormal river channel is greater than the index threshold.
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 warning, and in particular to a water level anomaly detection and warning method based on machine learning. Background Art

[0002] Abnormal water levels refer to abnormal fluctuations, sudden changes or phenomena beyond the normal range of water levels. With the intensification of global climate change and human activities, this phenomenon has gradually increased in recent years and has attracted widespread attention. Studying the causes and laws of abnormal water levels and seeking effective monitoring and early warning methods are of great significance to improving the efficiency of water resource utilization and protecting the ecological environment.

[0003] At present, automated monitoring and meteorological warning are usually used for water level monitoring or early warning. The water level information collected in real time by monitoring equipment is combined with the rainfall information of future meteorological forecasts for early warning. This method has certain disadvantages: on the one hand, frequent rain and snow in winter cause a large amount of ice and snow to adhere to both sides of the river. When the temperature rises, these ice and snow melt into water and flow into the river, causing the water level to rise in a short time. This situation cannot be predicted in advance. On the other hand, the water level change amplitude caused by the different riverbed heights or widths at different locations of the river varies, and the water level change amplitude between the downstream river channel and the upstream river channel also varies. Only the water level information collected by each monitoring device is analyzed independently without considering the possible differences caused by the location, which will lead to inaccurate predictions. Therefore, at this stage, a more efficient and intelligent water level monitoring and early warning technical solution is needed to solve the above problems. Summary of the invention

[0004] The purpose of the present invention is to provide a water level anomaly detection and early warning method based on machine learning to solve the problems raised in the above background technology.

[0005] In order to solve the above technical problems, the present invention provides the following technical solution: a water level anomaly detection and early warning method based on machine learning, the method comprising the following steps:

[0006] S100, collecting meteorological information, historical logs and land hydrological maps, as well as image data and environmental information around rivers in a designated area.

[0007] S200. Divide rivers into channels in the land hydrological map, use machine learning algorithms to extract training sets from historical logs, analyze the relationship parameters and risk factors of each channel, and divide abnormal channels and marked channels according to the risk factors.

[0008] S300, analyzing the image data and environmental information around the marked river channel and establishing a relationship formula, combining meteorological information to predict the water level change range of the abnormal river channel in the future, thereby calculating the trend index of the abnormal river channel.

[0009] S400. The data center displays the information of all rivers, generates water level records regularly and stores them in the historical log, sets the index threshold, and issues an early warning when the trend index of the abnormal river is greater than the index threshold.

[0010] In S100, meteorological information refers to the temperature in the future period of time, and temperature refers to air temperature. The historical log refers to the water level record of the river, and each water level record includes the identifier of the monitoring device, the collection time and the water level. The land hydrological map represents the distribution map of rivers in a specified area. The image data refers to the video collected by the monitoring equipment installed at different positions of the river, and the environmental information refers to the temperature and water level collected by the monitoring equipment installed at different positions of the river.

[0011] In S200, the specific steps are as follows:

[0012] S201. Analyze the positions of all bifurcations of the river in the land hydrological map. After connecting adjacent bifurcations, divide the river into different channels, ensuring that there is no bifurcation in each channel and only one inlet and outlet are connected. Analyze the direction of the river, and regard all other channels connected to the inlet of channel h as the upper channels of h. According to the direction of the river, regard all other channels upstream of the inlet of channel h as the upstream channels of h.

[0013] A river bifurcation is a geographical phenomenon where a river splits into two or more channels at a certain location and flows in different directions. A river bifurcation is formed when the flow is unevenly concentrated or the river channel gradually expands due to the influence of topography or geology. The formation of a river bifurcation causes the river to flow in different directions, and each river channel has a large difference in water flow and water level due to the different riverbed height or width. Monitoring equipment is installed at different locations in the river, and there is at least one monitoring device in each river channel.

[0014] The upper river channel of river channel h refers to all other river channels whose outflow is connected to the inflow of river channel h. The upstream river channel of river channel h refers to all other river channels that are upstream of river channel h according to the river direction. All upstream river channels include all upper river channels.

[0015] S202, obtain the identifiers of all water level records in the historical log, analyze the river channel where the monitoring device corresponding to each identifier is located, and classify the water level records according to the different river channels. Analyze the collection time in each type of water level record, and calculate the average water level in each water level record at the same collection time to obtain the average water level. Create a record set for each river channel, and put the collection time and average water level of each type into the corresponding record set.

[0016] The average water level refers to the average value of the water levels collected by all monitoring devices belonging to the same river channel at the collection time. Each record set represents a river channel. The record set stores several collection times and the average water level at the collection time.

[0017] S203. Associate the record set of the river channel with the record set of its upper river channel, package all the average water levels at the same collection time in the associated set as a training set, use a machine learning algorithm to fit and analyze the relationship parameters of each river channel according to different training sets, calculate the risk coefficient of each river channel through relationship parameter analysis, set a coefficient threshold, and identify the river channel with a risk coefficient greater than the coefficient threshold as an abnormal river channel, and mark all upper river channels of the abnormal river channel.

[0018] Each river channel corresponds to several upper river channels, so there are two or more record sets in the associated set.

[0019] In S203, the specific analysis steps of the relationship parameters are as follows:

[0020] S2031, collect the river records JH n With all its upper river records JH all Perform correlation and statistics JH n The number of elements in the set is L and L samples are established. Get all the average water levels corresponding to each collection time in the associated set and convert them into JH n The average water level is taken as the dependent variable, belonging to JH all The average water level is used as the independent variable, and the dependent variable and independent variable at the same collection time are put into the sample. After all are put in, all samples are packaged as a training set.

[0021] S2032. Input the training set of each river channel into the multivariate linear regression model for training to obtain the impact prediction model of each river channel. Specifically, it includes: using all independent variables of each sample in the training set as the input value of the multivariate linear regression model, calculating the difference between the output result and the dependent variable of the corresponding sample, setting the error threshold, and when the difference is less than the error threshold, marking the corresponding sample and calculating the next sample. In other cases, adjust the parameters of the regression coefficient to obtain a new multivariate linear regression model, re-input the unlabeled samples into the new multivariate linear regression model for calculation, until all samples are labeled and the current multivariate linear regression model is used as the prediction model. Among them, the expression of the multivariate linear regression model y is:

[0022] y=β0+β1SW1+β2SW2+...+β i SW i

[0023] In the formula, β i is the i-th regression coefficient, SWi is the ith independent variable; let β1, β2, ..., β i As the relationship parameter of the corresponding river channel.

[0024] First, sum up the water levels collected by all monitoring devices in the same river at the current time and calculate the average value to get the current water level of the river. Set the maximum water level Then sum up all the relationship parameters under the same river channel to get the total parameter Substitute the formula to calculate the risk factor for each river channel:

[0025]

[0026] Where, FXX e is the risk coefficient of river e, α and f are constants, R is the number of all upstream rivers of river e, and s is the number of all rivers.

[0027] The risk factor is affected by the current water level, total parameters and the number of upstream rivers. The higher the current water level, the greater the risk factor. The total parameter indicates the degree to which the river is affected by the change in the water level of the upper river. The greater the total parameter, the smaller the impact and the smaller the risk factor. The more upstream rivers there are, the closer the river is to the downstream and is more susceptible to the combined impact of all upstream rivers. The greater the impact, the greater the risk factor.

[0028] In S300, the specific steps are as follows:

[0029] S301, obtain a video of the surrounding area of ​​the marked river, use OpenCV technology to decompose the video into single-frame images, screen all single-frame images, and use edge detection method to remove blurred single-frame images. Use convolutional neural network algorithm to identify the ice and snow covered areas in the remaining single-frame images, sum up the areas of all ice and snow covered areas identified in the single-frame images, and divide them by the total area of ​​the single-frame images to obtain the ice and snow coverage rate.

[0030] S302, analyzing the shooting time corresponding to each single-frame image, and sorting all single-frame images in the order of shooting time. Obtaining the temperature and water level at different shooting times in the environmental information, classifying the single-frame images at the same temperature into the same category according to the arrangement order, dividing the extreme difference of the ice and snow coverage rate in all single-frame images in each category by the extreme difference of the shooting time as the ablation speed, and the average value of the water level at the corresponding shooting time of all single-frame images in each category as the adjusted water level corresponding to the ablation speed.

[0031] The melting rate indicates the rate at which the snow cover rate decreases over a period of time when the temperature remains constant. The adjusted water level indicates the average value of the water level over a period of time when the temperature remains constant. The temperature, melting rate and adjusted water level are directly proportional. The higher the temperature, the greater the melting rate and the higher the adjusted water level.

[0032] S303. The ablation speed and adjusted water level of the marked river at different temperatures are used as training sets, and the linear regression model is used to train the training sets, and the relationship formulas between temperature and ablation speed, and between ablation speed and adjusted water level are established respectively. Each marked river has two relationship formulas. The temperature in the meteorological data is substituted into the relationship formula of each marked river to calculate the adjusted water level, and then the adjusted water level is substituted into the impact prediction model of the abnormal river to calculate the predicted water level of the abnormal river, and the trend index is calculated according to the predicted water level change amplitude.

[0033] Due to the differences in riverbed height, width or geographical location, the melting speed and adjusted water level of each marked river channel will be different even at the same temperature.

[0034] In S303, the ablation speed of the marked river channel at different temperatures is obtained, with the temperature as the independent variable and the ablation speed as the dependent variable. The independent variable is used as the input value of the linear regression model, and the output result is compared with the dependent variable. The relationship formula between the temperature and the ablation speed is finally obtained by continuously adjusting the parameters of the regression coefficient. The adjusted water level of the marked river channel at different ablation speeds is obtained, with the ablation speed as the independent variable and the adjusted water level as the dependent variable. The independent variable is used as the input value of the linear regression model, and the output result is compared with the dependent variable. The relationship formula between the ablation speed and the adjusted water level is finally obtained by continuously adjusting the parameters of the regression coefficient.

[0035] The steps to calculate the trend index are as follows:

[0036] S3031, set the prediction time set {t1, t2, ..., t u}, obtain {t1,t2,...,t u The temperature at the moment of} is substituted into the relationship formula between the temperature and ablation rate of each marked river channel, and the calculation result is again substituted into the relationship formula between the ablation rate and the adjusted water level to calculate the adjusted water level of different marked river channels at each moment.

[0037] S3032, obtain the impact prediction model of each abnormal river channel, automatically substitute the adjusted water level of all marked rivers at each time, calculate the predicted water level of the abnormal river channel at each time, and respectively convert {t1, t2, ..., t u The predicted water level at the time is substituted into step S203 to calculate the risk coefficient {FXX1, FXX2, ..., FXX u}. Substitute into the formula to calculate the trend index of each abnormal river channel:

[0038]

[0039] Where QXZ is the trend index.

[0040] In S400, the water level and risk index of all rivers in the specified area are displayed in real time on the data center visualization screen. All monitoring devices generate water level records at fixed intervals and store them in the historical log. Set the index threshold, and when the trend index of an abnormal river is greater than the index threshold, issue an early warning and notify the staff to handle it.

[0041] Compared with the prior art, the beneficial effects achieved by the present invention are:

[0042] 1. Refined differentiation of river channels: The present invention differentiates river channels according to bifurcations, analyzes the upstream channel and upper channel of each river channel, and calculates the risk factor of the river channel based on a comprehensive analysis of the ratio of the current water level to the highest water level, the degree of influence of the upper channel water level, and the number of upstream channels. This is more refined than the traditional method of analyzing the river as a whole.

[0043] 2. Intelligent water level prediction: The present invention first uses a machine learning algorithm to analyze the relationship between the water level of each river channel and the water level of the upper river channel to establish a prediction model, and then analyzes historical data, fits the relationship formula between temperature, ablation rate and adjusted water level, and substitutes the temperature in the meteorological information to realize water level prediction. Compared with the traditional prediction method based solely on rainfall, it is more intelligent.

[0044] In summary, compared with traditional technologies, the present invention has the advantages of fine-grained river channel differentiation and intelligent water level prediction, and can improve the efficiency of water level monitoring and early warning. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0046] Figure 1 It is a flow chart of the water level anomaly detection and early warning method based on machine learning of the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] See also Figure 1 The present invention provides a water level anomaly detection and early warning method based on machine learning, the method comprising the following steps:

[0049] S100, collecting meteorological information, historical logs and land hydrological maps, as well as image data and environmental information around rivers in a designated area.

[0050] S200. Divide rivers into channels in the land hydrological map, use machine learning algorithms to extract training sets from historical logs, analyze the relationship parameters and risk factors of each channel, and divide abnormal channels and marked channels according to the risk factors.

[0051] S300, analyzing the image data and environmental information around the marked river channel and establishing a relationship formula, combining meteorological information to predict the water level change range of the abnormal river channel in the future, thereby calculating the trend index of the abnormal river channel.

[0052] S400. The data center displays the information of all rivers, generates water level records regularly and stores them in the historical log, sets the index threshold, and issues an early warning when the trend index of the abnormal river is greater than the index threshold.

[0053] In S100, meteorological information refers to the temperature in the future period of time, and temperature refers to air temperature. The historical log refers to the water level record of the river, and each water level record includes the identifier of the monitoring device, the collection time and the water level. The land hydrological map represents the distribution map of rivers in a specified area. The image data refers to the video collected by the monitoring equipment installed at different positions of the river, and the environmental information refers to the temperature and water level collected by the monitoring equipment installed at different positions of the river.

[0054] In S200, the specific steps are as follows:

[0055] S201. Analyze the positions of all bifurcations of the river in the land hydrological map. After connecting adjacent bifurcations, divide the river into different channels, ensuring that there is no bifurcation in each channel and only one inlet and outlet are connected. Analyze the direction of the river, and regard all other channels connected to the inlet of channel h as the upper channels of h. According to the direction of the river, regard all other channels upstream of the inlet of channel h as the upstream channels of h.

[0056] A river bifurcation is a geographical phenomenon where a river splits into two or more channels at a certain location and flows in different directions. A river bifurcation is formed when the flow is unevenly concentrated or the river channel gradually expands due to the influence of topography or geology. The formation of a river bifurcation causes the river to flow in different directions, and each river channel has a large difference in water flow and water level due to the different riverbed height or width. Monitoring equipment is installed at different locations in the river, and there is at least one monitoring device in each river channel.

[0057] The upper river channel of river channel h refers to all other river channels whose outflow is connected to the inflow of river channel h. The upstream river channel of river channel h refers to all other river channels that are upstream of river channel h according to the river direction. All upstream river channels include all upper river channels.

[0058] S202, obtain the identifiers of all water level records in the historical log, analyze the river channel where the monitoring device corresponding to each identifier is located, and classify the water level records according to the different river channels. Analyze the collection time in each type of water level record, and calculate the average water level in each water level record at the same collection time to obtain the average water level. Create a record set for each river channel, and put the collection time and average water level of each type into the corresponding record set.

[0059] The average water level refers to the average value of the water levels collected by all monitoring devices belonging to the same river channel at the collection time. Each record set represents a river channel. The record set stores several collection times and the average water level at the collection time.

[0060] S203. Associate the record set of the river channel with the record set of its upper river channel, package all the average water levels at the same collection time in the associated set as a training set, use a machine learning algorithm to fit and analyze the relationship parameters of each river channel according to different training sets, calculate the risk coefficient of each river channel through relationship parameter analysis, set a coefficient threshold, and identify the river channel with a risk coefficient greater than the coefficient threshold as an abnormal river channel, and mark all upper river channels of the abnormal river channel.

[0061] Each river channel corresponds to several upper river channels, so there are two or more record sets in the associated set.

[0062] In S203, the specific analysis steps of the relationship parameters are as follows:

[0063] S2031, collect the river records JH n With all its upper river records JH all Perform correlation and statistics JH n The number of elements in the set is L and L samples are established. Get all the average water levels corresponding to each collection time in the associated set and convert them into JH n The average water level is taken as the dependent variable, belonging to JH all The average water level is used as the independent variable, and the dependent variable and independent variable at the same collection time are put into the sample. After all are put in, all samples are packaged as a training set.

[0064] S2032. Input the training set of each river channel into the multivariate linear regression model for training to obtain the impact prediction model of each river channel. Specifically, it includes: using all independent variables of each sample in the training set as the input value of the multivariate linear regression model, calculating the difference between the output result and the dependent variable of the corresponding sample, setting the error threshold, and when the difference is less than the error threshold, marking the corresponding sample and calculating the next sample. In other cases, adjust the parameters of the regression coefficient to obtain a new multivariate linear regression model, re-input the unlabeled samples into the new multivariate linear regression model for calculation, until all samples are labeled and the current multivariate linear regression model is used as the prediction model. Among them, the expression of the multivariate linear regression model y is:

[0065] y=β0+β1SW1+β2SW2+...+β i SW i

[0066] In the formula, β i is the i-th regression coefficient, SW i is the ith independent variable; let β1, β2, ..., β i As the relationship parameter of the corresponding river channel.

[0067] First, sum up the water levels collected by all monitoring devices in the same river at the current time and calculate the average value to get the current water level of the river. Set the maximum water level Then sum up all the relationship parameters under the same river channel to get the total parameter Substitute the formula to calculate the risk factor for each river channel:

[0068]

[0069] Where, FXX e is the risk coefficient of river e, α and f are constants, R is the number of all upstream rivers of river e, and s is the number of all rivers.

[0070] The risk factor is affected by the current water level, total parameters and the number of upstream rivers. The higher the current water level, the greater the risk factor. The total parameter indicates the degree to which the river is affected by the change in the water level of the upper river. The greater the total parameter, the smaller the impact and the smaller the risk factor. The more upstream rivers there are, the closer the river is to the downstream and is more susceptible to the combined impact of all upstream rivers. The greater the impact, the greater the risk factor.

[0071] In S300, the specific steps are as follows:

[0072] S301, obtain a video of the surrounding area of ​​the marked river, use OpenCV technology to decompose the video into single-frame images, screen all single-frame images, and use edge detection method to remove blurred single-frame images. Use convolutional neural network algorithm to identify the ice and snow covered areas in the remaining single-frame images, sum up the areas of all ice and snow covered areas identified in the single-frame images, and divide them by the total area of ​​the single-frame images to obtain the ice and snow coverage rate.

[0073] S302, analyzing the shooting time corresponding to each single-frame image, and sorting all single-frame images in the order of shooting time. Obtaining the temperature and water level at different shooting times in the environmental information, classifying the single-frame images at the same temperature into the same category according to the arrangement order, dividing the extreme difference of the ice and snow coverage rate in all single-frame images in each category by the extreme difference of the shooting time as the ablation speed, and the average value of the water level at the corresponding shooting time of all single-frame images in each category as the adjusted water level corresponding to the ablation speed.

[0074] The melting rate indicates the rate at which the snow cover rate decreases over a period of time when the temperature remains constant. The adjusted water level indicates the average value of the water level over a period of time when the temperature remains constant. The temperature, melting rate and adjusted water level are directly proportional. The higher the temperature, the greater the melting rate and the higher the adjusted water level.

[0075] S303. The ablation speed and adjusted water level of the marked river at different temperatures are used as training sets, and the linear regression model is used to train the training sets, and the relationship formulas between temperature and ablation speed, and between ablation speed and adjusted water level are established respectively. Each marked river has two relationship formulas. The temperature in the meteorological data is substituted into the relationship formula of each marked river to calculate the adjusted water level, and then the adjusted water level is substituted into the impact prediction model of the abnormal river to calculate the predicted water level of the abnormal river, and the trend index is calculated according to the predicted water level change amplitude.

[0076] Due to the differences in riverbed height, width or geographical location, the melting speed and adjusted water level of each marked river channel will be different even at the same temperature.

[0077] In S303, the ablation speed of the marked river channel at different temperatures is obtained, with the temperature as the independent variable and the ablation speed as the dependent variable. The independent variable is used as the input value of the linear regression model, and the output result is compared with the dependent variable. The relationship formula between the temperature and the ablation speed is finally obtained by continuously adjusting the parameters of the regression coefficient. The adjusted water level of the marked river channel at different ablation speeds is obtained, with the ablation speed as the independent variable and the adjusted water level as the dependent variable. The independent variable is used as the input value of the linear regression model, and the output result is compared with the dependent variable. The relationship formula between the ablation speed and the adjusted water level is finally obtained by continuously adjusting the parameters of the regression coefficient.

[0078] The steps to calculate the trend index are as follows:

[0079] S3031, set the prediction time set {t1, t2, ..., t u}, obtain {t1,t2,...,t u The temperature at the moment of} is substituted into the relationship formula between the temperature and ablation rate of each marked river channel, and the calculation result is again substituted into the relationship formula between the ablation rate and the adjusted water level to calculate the adjusted water level of different marked river channels at each moment.

[0080] S3032, obtain the impact prediction model of each abnormal river channel, automatically substitute the adjusted water level of all marked rivers at each time, calculate the predicted water level of the abnormal river channel at each time, and respectively convert {t1, t2, ..., t u The predicted water level at the time is substituted into step S203 to calculate the risk coefficient {FXX1, FXX2, ..., FXX u}. Substitute into the formula to calculate the trend index of each abnormal river channel:

[0081]

[0082] Where QXZ is the trend index.

[0083] In S400, the water level and risk index of all rivers in the specified area are displayed in real time on the data center visualization screen. All monitoring devices generate water level records at fixed intervals and store them in the historical log. Set the index threshold, and when the trend index of an abnormal river is greater than the index threshold, issue an early warning and notify the staff to handle it.

[0084] Embodiment 1:

[0085] Assume that the current water level of river h1 is 1.8m, the highest water level is 2.5m, α is 1, f is 2, the number of all river channels is 8, the number of upstream river channels of river h1 is 2, the total parameter is 3, and the sum of the total parameters of all river channels is 9. Substitute the formula to calculate the risk coefficient of river h1:

[0086]

[0087] The risk coefficient of river h1 is 0.63. When the coefficient threshold is 0.5, river h1 is regarded as an abnormal river.

[0088] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0089] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A water level anomaly detection and early warning method based on machine learning, characterized by: The method comprises the following steps: S100, collecting meteorological information, historical logs and land hydrological maps, as well as image data and environmental information around rivers in a designated area; S200, dividing rivers into channels in the land hydrological map, extracting training sets from historical logs using a machine learning algorithm, analyzing the relationship parameters and risk coefficients of each channel, and dividing abnormal channels and marked channels according to the risk coefficients; S300, analyzing the image data and environmental information around the marked river channel and establishing a relationship formula, combining meteorological information to predict the water level change amplitude of the abnormal river channel in the future, thereby calculating the trend index of the abnormal river channel; S400, the data center displays the information of all rivers, generates water level records regularly and stores them in the historical log, sets the index threshold, and issues an early warning when the trend index of an abnormal river is greater than the index threshold; In S200, the specific steps are as follows: S201, analyzing the positions of all bifurcations of the river in the land hydrological map, and after connecting adjacent bifurcations, dividing the river into different channels, ensuring that there is no bifurcation in each channel and only one inlet and outlet are connected; analyzing the direction of the river, and taking all other channels connected to the inlet of the channel h as the upper channels of h, and taking all other channels upstream of the inlet of the channel h as the upstream channels of h according to the direction of the river; S202, obtaining identifiers of all water level records in the historical log, analyzing the river channel where the location of the monitoring device corresponding to each identifier is located, and classifying the water level records according to the different river channels; analyzing the collection time in each type of water level record, respectively calculating the average water level in each water level record at the same collection time to obtain the average water level; establishing a record set for each river channel, and putting the collection time and average water level of each type into the corresponding record set; S203, associating the record set of the river channel with the record set of its upper river channel, packaging all the average water levels at the same collection time in the associated set as a training set, using a machine learning algorithm to fit and analyze the relationship parameters of each river channel according to different training sets, calculating the risk coefficient of each river channel through relationship parameter analysis, setting a coefficient threshold, and treating the river channel with a risk coefficient greater than the coefficient threshold as an abnormal river channel, and marking all upper river channels of the abnormal river channel; In S203, the specific analysis steps of the relationship parameters are as follows: S2031, collect the river records JH n With all its upper river records JH all Perform correlation and statistics JH n The number of elements in the set is L and L samples are established; all the average water levels corresponding to each collection time in the associated set are obtained, and the water levels belonging to JH n The average water level is taken as the dependent variable, belonging to JH all The average water level is used as the independent variable, and the dependent variable and the independent variable at the same collection time are put into the sample. After all the samples are put in, all the samples are packaged into the training set. S2032, inputting the training set of each river channel into the multiple linear regression model for training, and obtaining the impact prediction model of each river channel; specifically including: taking all the independent variables of each sample in the training set as the input value of the multiple linear regression model, calculating the difference between the output result and the dependent variable of the corresponding sample, setting the error threshold, and when the difference is less than the error threshold, marking the corresponding sample and calculating the next sample; in other cases, adjusting the parameters of the regression coefficient to obtain a new multiple linear regression model, re-inputting the unmarked samples into the new multiple linear regression model for calculation, until all samples are marked and the current multiple linear regression model is used as the prediction model; wherein, the expression of the multiple linear regression model y is: y=β0+β1SW1+β2SW2+...+β i SW i ; In the formula, β i is the i-th regression coefficient, SW i is the ith independent variable; let β1, β2, ..., β i As the relation parameter of the corresponding river channel; In S203, the water levels collected by all monitoring devices in the same river at the current time are summed up and the average value is calculated to obtain the current water level of the river. Set the maximum water level Then sum up all the relationship parameters under the same river channel to get the total parameter Substitute the formula to calculate the risk factor for each river channel: Where, FXX e is the risk coefficient of river e, α and f are constants, R is the number of all upstream rivers of river e, and s is the number of all rivers.

2. The water level anomaly detection and early warning method based on machine learning according to claim 1 is characterized by: In S100, meteorological information refers to the temperature in the future period of time; historical log refers to the water level record of the river, each water level record includes the identifier of the monitoring equipment, the collection time and the water level; the land hydrological map represents the distribution map of rivers in the specified area; image data refers to the video collected by the monitoring equipment installed at different positions of the river, and environmental information refers to the temperature and water level collected by the monitoring equipment installed at different positions of the river.

3. The water level anomaly detection and early warning method based on machine learning according to claim 1 is characterized by: In S300, the specific steps are as follows: S301, obtaining a video of the surrounding area of ​​the marked river channel, decomposing the video into single-frame images using OpenCV technology, screening all single-frame images, and removing blurred single-frame images using edge detection method; using a convolutional neural network algorithm to identify the ice and snow covered areas in the remaining single-frame images, summing up the areas of all ice and snow covered areas identified in the single-frame images, and dividing the sum by the total area of ​​the single-frame images to obtain the ice and snow coverage rate; S302, analyzing the shooting time corresponding to each single-frame image, and sorting all single-frame images in the order of shooting time; obtaining the temperature and water level at different shooting times in the environmental information, and classifying the single-frame images at the same temperature into the same category according to the arrangement order, dividing the range of ice and snow coverage in all single-frame images in each category by the range of shooting time as the ablation speed, and the average value of the water level at the corresponding shooting time of all single-frame images in each category as the adjusted water level corresponding to the ablation speed; S303. The ablation speed and adjusted water level of the marked river channel at different temperatures are used as training sets, and the linear regression model is used to train the training sets. The relationship formulas between temperature and ablation speed, and between ablation speed and adjusted water level are respectively established. Each marked river channel has two relationship formulas. The temperature in the meteorological data is substituted into the relationship formula of each marked river channel to calculate the adjusted water level, and then the adjusted water level is substituted into the impact prediction model of the abnormal river channel to calculate the predicted water level of the abnormal river channel, and the trend index is calculated according to the predicted water level change amplitude.

4. The water level anomaly detection and early warning method based on machine learning according to claim 3 is characterized by: In S303, the ablation speed of the marked river channel at different temperatures is obtained, with temperature as the independent variable and ablation speed as the dependent variable; the independent variable is used as the input value of the linear regression model, the output result is compared with the dependent variable, and the relationship formula between temperature and ablation speed is finally obtained by continuously adjusting the parameters of the regression coefficient; the adjusted water level of the marked river channel at different ablation speeds is obtained, with ablation speed as the independent variable and adjusted water level as the dependent variable; the independent variable is used as the input value of the linear regression model, the output result is compared with the dependent variable, and the relationship formula between ablation speed and adjusted water level is finally obtained by continuously adjusting the parameters of the regression coefficient.

5. The water level anomaly detection and early warning method based on machine learning according to claim 3 is characterized by: In S303, the trend index calculation steps are as follows: S3031, set the prediction time set {t1, t2, ..., t u }, obtain {t1,t2,...,t u }, and substitute the temperature at the time into the relationship formula between the temperature and the ablation rate of each marked river channel, and then substitute the calculated result into the relationship formula between the ablation rate and the adjusted water level to calculate the adjusted water level of different marked river channels at each time; S3032, obtain the impact prediction model of each abnormal river channel, automatically substitute the adjusted water level of all marked rivers at each time, calculate the predicted water level of the abnormal river channel at each time, and respectively convert {t1, t2, ..., t u The predicted water level at the time is substituted into step S203 to calculate the risk coefficient {FXX1, FXX2, ..., FXX u }; Substitute into the formula to calculate the trend index of each abnormal river channel: Where QXZ is the trend index.

6. The water level anomaly detection and early warning method based on machine learning according to claim 3 is characterized by: In S400, the water level and risk index of all rivers in the specified area are displayed in real time on the data center visualization screen; all monitoring devices generate water level records at fixed intervals and store them in historical logs; an index threshold is set, and when the trend index of an abnormal river is greater than the index threshold, an early warning is issued to notify staff to handle the situation.

Citation Information

Patent Citations

  • Water conservancy model cloud computing method and system based on model combination

    CN116822969A

  • Intelligent flood prevention early warning method and platform based on artificial intelligence

    CN117875500A