A method, device and electronic equipment for selecting floods of different magnitudes
Through the Hanpur filter and time series filtering processing technology, the abnormal and non-smoothing problems in runoff data are solved, and the re-peak floods are accurately identified, which improves the efficiency and accuracy of flood selection.
Patent Information
- Application Number
- CN202411102408.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-08-12
AI Technical Summary
In the prior art, runoff data and its first-order backward difference are not smooth, and the setting time of thresholds such as flood peaks are directly related to the accurate identification of floods, making it difficult to accurately identify floods.
The Hanpur filter is used to control runoff data quality, and the runoff data and first-order backward differential data are smoothed through time series filtering to determine the peak presentation time and start and end time, correct the flood peak flow, and combine the flood duration threshold and time. The interval threshold determines the re-peak flood, and finally selects the target flood based on the flood magnitude threshold.
It effectively solves the problem of flood difficulty in accurately identifying floods caused by abnormal runoff data and non-smoothing, improves the efficiency and accuracy of flood selection in sequence, and avoids the impact of premature setting of flood order threshold on flood selection.
Smart Images

Figure CN118626995B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of river basin flood forecasting, and in particular to a method for selecting floods of different magnitudes, a device for selecting floods of different magnitudes, an electronic device, and a computer-readable storage medium. Background Art
[0002] Flood selection refers to extracting flood processes from continuous runoff observation data to obtain information such as peak flow, peak time, start and end time of floods. Traditional flood selection methods mainly rely on manual empirical selection, and the selection results are relatively subjective, and the efficiency is low when the data volume is large. With the development of technology, the method of setting thresholds such as peak flow has provided a new idea for the automatic screening of floods. However, abnormal data, non-smoothness in runoff data, and premature setting of peak flow thresholds have made the above methods difficult to accurately implement. Summary of the invention
[0003] The embodiments of the present invention provide a method, device, electronic device and computer-readable storage medium for selecting floods of different magnitudes, so as to solve the problems in the prior art such as the non-smoothness of runoff data and its first-order backward difference, the setting time of flood peak and other thresholds, etc., which are directly related to the accurate identification of complex peak floods.
[0004] The embodiment of the present invention discloses a method for selecting floods of different magnitudes, the method comprising:
[0005] Obtain multiple runoff observation data with continuous time series;
[0006] Performing data quality control on the plurality of runoff observation data by using a Hampl filter to obtain a runoff data sequence; the Hampl filter is used to process abnormal data in the plurality of runoff observation data;
[0007] Performing time series filtering and smoothing processing on the runoff data sequence to obtain a smoothed data sequence;
[0008] Calculating the first-order backward difference of the smoothed data sequence, and performing time series filtering and smoothing processing on the first-order backward difference of the smoothed data sequence to obtain a smoothed first-order backward difference data sequence;
[0009] Determine a peak time set and a start and end time set according to the smoothed first-order backward difference data sequence;
[0010] Determine a plurality of first floods according to potential peak occurrence times in the peak occurrence time set, and determine the start and end times corresponding to the first floods in the start and end time set;
[0011] Correcting the peak time and peak flow corresponding to the first flood according to the runoff data sequence to obtain a corrected peak time and corrected peak flow corresponding to the first flood;
[0012] Determine whether there are at least two consecutive first floods among the multiple first floods that are complex-peak floods according to the flood duration threshold, the flood start and end threshold, and the time interval threshold;
[0013] If there are at least two consecutive first floods that are the complex-peak floods, the at least two consecutive first floods are merged into one second flood, and the corrected peak time, start and end time, and corrected flood peak flow corresponding to the second flood are determined;
[0014] A target flood is selected from multiple third floods according to a flood magnitude threshold; the third flood is the second flood, or the first flood except for the first flood used for merging to obtain the second flood; the corrected peak flow corresponding to the target flood is higher than the flood magnitude threshold.
[0015] Optionally, performing data quality control on the plurality of runoff observation data by using a Hampel filter to obtain a runoff data sequence includes:
[0016] Generate an observation window corresponding to the runoff observation data according to a window threshold;
[0017] Calculate the median and standard deviation corresponding to the observation window;
[0018] If the difference between the runoff observation data corresponding to the observation window and the median corresponding to the observation window exceeds a standard deviation threshold, the runoff observation data corresponding to the observation window is replaced by the median corresponding to the observation window to obtain the runoff data sequence;
[0019] The standard deviation threshold is determined according to the standard deviation corresponding to the observation window.
[0020] Optionally, performing time series filtering and smoothing processing on the runoff data sequence to obtain a smoothed data sequence includes:
[0021] Performing time series filtering and smoothing processing on a plurality of runoff data in the runoff data sequence to obtain a plurality of smoothed runoff data;
[0022] The smoothed data sequence is obtained according to a plurality of the smoothed runoff data and a plurality of second-order derivatives of the smoothed runoff data.
[0023] Optionally, the calculating the first-order backward difference of the smoothed data sequence and performing time series filtering and smoothing processing on the first-order backward difference of the smoothed data sequence to obtain a smoothed first-order backward difference data sequence includes:
[0024] Calculating and obtaining the first-order backward difference of the smoothed data sequence;
[0025] Performing time series filtering and smoothing processing on the first-order backward difference of the smoothed data sequence to obtain a plurality of smoothed first-order backward difference data;
[0026] The smoothed first-order backward difference data sequence is obtained according to a plurality of the smoothed first-order backward difference data and a plurality of second-order derivatives of the smoothed first-order backward difference data.
[0027] Optionally, determining a peak time set and a start and end time set according to the smoothed first-order backward difference data sequence includes:
[0028] Determining a plurality of potential peak occurrence times and a plurality of start and end times according to the smoothed first-order backward difference data in the smoothed first-order backward difference data sequence; the start and end times are start times or stop times;
[0029] Determine the peak occurrence time set according to the multiple potential peak occurrence times;
[0030] The start and end time set is determined according to the multiple start and end times.
[0031] Optionally, determining a plurality of potential peak occurrence times and a plurality of start and end times according to the smoothed first-order backward difference data in the smoothed first-order backward difference data sequence includes:
[0032] When the first target smoothed first-order backward difference data is greater than zero, the second target smoothed first-order backward difference data is greater than or equal to zero, the third target smoothed first-order backward difference data is less than zero, and the fourth target smoothed first-order backward difference data is less than or equal to zero, the time corresponding to the first target smoothed first-order backward difference data is determined as the potential peak time; the time corresponding to the second target smoothed first-order backward difference data is before the time corresponding to the first target smoothed first-order backward difference data, and the times corresponding to the third target smoothed first-order backward difference data and the fourth target smoothed first-order backward difference data are both after the time corresponding to the first target smoothed first-order backward difference data;
[0033] When the fifth target smoothed first-order backward difference data is less than zero, the sixth target smoothed first-order backward difference data is less than or equal to zero, the seventh target smoothed first-order backward difference data is greater than zero, and the eighth target smoothed first-order backward difference data is greater than or equal to zero, the time corresponding to the fifth target smoothed first-order backward difference data is determined as the start and end time; the time corresponding to the sixth target smoothed first-order backward difference data is before the time corresponding to the fifth target smoothed first-order backward difference data, and the time corresponding to the seventh target smoothed first-order backward difference data and the eighth target smoothed first-order backward difference data are both after the time corresponding to the first target smoothed first-order backward difference data.
[0034] Optionally, the peak occurrence time set includes multiple potential peak occurrence times, and determining multiple first floods according to the potential peak occurrence times in the peak occurrence time set, and determining the start and end times corresponding to the first floods in the start and end time set includes:
[0035] Determining the first flood corresponding to the potential peak occurrence time according to the potential peak occurrence time;
[0036] Determining the potential peak time as the peak time corresponding to the first flood;
[0037] The start and end times with the shortest time interval between the peak times corresponding to the first flood in the start and end time set are determined as the start and end times corresponding to the first flood.
[0038] Optionally, the start and end time include a start time and a stop time, and determining the start and end time with the shortest time interval between the peak time corresponding to the first flood in the start and end time set as the start and end time corresponding to the first flood includes:
[0039] Determine the start time corresponding to the first flood as the start time corresponding to the first flood, the start time and the end time having the shortest time interval with the peak time corresponding to the first flood in the start time set and being shorter than the peak time corresponding to the first flood;
[0040] The start and end times in the start and end time set that have the shortest time interval with the peak time corresponding to the first flood and are greater than the peak time corresponding to the first flood are determined as the stop time corresponding to the first flood.
[0041] Optionally, the step of correcting the peak time and peak flow corresponding to the first flood according to the runoff data sequence to obtain a corrected peak time and corrected peak flow corresponding to the first flood includes:
[0042] Correcting the peak time corresponding to the first flood to obtain a corrected peak time corresponding to the first flood;
[0043] The runoff data corresponding to the corrected peak time corresponding to the first flood determined in the runoff data sequence is determined as the corrected flood peak flow corresponding to the first flood.
[0044] Optionally, judging whether there are at least two consecutive first floods among the multiple first floods as complex-peak floods according to the flood duration threshold, the flood start and end threshold, and the time interval threshold includes:
[0045] Determine two consecutive first floods as a first target flood and a second target flood; the peak time corresponding to the first target flood is after the peak time corresponding to the second target flood;
[0046] Determine the corrected peak time and start and end time corresponding to the first target flood, and determine the corrected peak time and start and end time corresponding to the second target flood; the start and end time include the start time and the stop time;
[0047] Determine the smoothed data corresponding to the stop time corresponding to the first target flood in the smoothed data sequence as the end flow corresponding to the first target flood;
[0048] Determine the smoothed data corresponding to the start time corresponding to the second target flood in the smoothed data sequence as the start flow corresponding to the second target flood;
[0049] If the time interval between the stop time corresponding to the first target flood and the start time corresponding to the second target flood is less than or equal to the time interval threshold, and the time interval between the start time corresponding to the first target flood and the stop time corresponding to the second target flood is less than or equal to the flood duration threshold, and the end flow corresponding to the first target flood and the start flow corresponding to the second target flood are both greater than or equal to the flood start and end thresholds, then it is determined that the first target flood and the second target flood are two consecutive double-peak floods among multiple first floods.
[0050] Optionally, if there are at least two consecutive first floods that are the complex-peak floods, the at least two consecutive first floods are merged into one second flood, and the corrected peak time, start and end time, and corrected flood peak flow corresponding to the second flood are determined, including:
[0051] If the first target flood and the second target flood are two consecutive double-peak floods among multiple first floods, the first target flood and the second target flood are combined to obtain the second flood;
[0052] According to the corrected flood peak flow corresponding to the first target flood and the corrected flood peak flow corresponding to the second target flood, the corrected peak time, the start and end time and the corrected flood peak flow corresponding to the second flood are determined.
[0053] Optionally, determining the corrected peak time, start and end time, and corrected peak flow corresponding to the second flood according to the corrected peak flow corresponding to the first target flood and the corrected peak flow corresponding to the second target flood includes:
[0054] Determine the start time corresponding to the first target flood as the start time corresponding to the second flood, and determine the stop time corresponding to the second target flood as the stop time corresponding to the second flood;
[0055] When the corrected flood peak flow corresponding to the first target flood is less than or equal to the corrected flood peak flow corresponding to the second target flood, the corrected peak occurrence time corresponding to the second target flood is determined as the corrected peak occurrence time corresponding to the second flood, and the corrected flood peak flow corresponding to the second target flood is determined as the corrected flood peak flow corresponding to the second flood;
[0056] When the corrected peak flow corresponding to the first target flood is greater than the corrected peak flow corresponding to the second target flood, the corrected peak time corresponding to the first target flood is determined as the corrected peak time corresponding to the second flood, and the corrected peak flow corresponding to the first target flood is determined as the corrected peak flow corresponding to the second flood.
[0057] The embodiment of the present invention also discloses a device for selecting floods of different magnitudes, the device comprising:
[0058] A runoff observation data module is used to obtain multiple runoff observation data with continuous time series;
[0059] A runoff data sequence module, used for performing data quality control on the plurality of runoff observation data through a Hampl filter to obtain a runoff data sequence; the Hampl filter is used for processing abnormal data in the plurality of runoff observation data;
[0060] A smoothing data sequence module is used to perform time series filtering and smoothing processing on the runoff data sequence to obtain a smoothed data sequence;
[0061] A smoothed first-order backward difference data sequence module is used to calculate the first-order backward difference of the smoothed data sequence, and perform time series filtering and smoothing processing on the first-order backward difference of the smoothed data sequence to obtain a smoothed first-order backward difference data sequence;
[0062] A time set determination module, used to determine a peak time set and a start and end time set according to the smoothed first-order backward difference data sequence;
[0063] A first flood determination module, configured to determine a plurality of first floods according to potential peak occurrence times in the peak occurrence time set, and to determine the start and end times corresponding to the first floods in the start and end time set;
[0064] A correction module, configured to correct the peak time and peak flow corresponding to the first flood according to the runoff data sequence, to obtain a corrected peak time and corrected peak flow corresponding to the first flood;
[0065] A judgment module, used for judging whether there are at least two consecutive first floods among the multiple first floods as complex-peak floods according to a flood duration threshold, a flood start and end threshold, and a time interval threshold;
[0066] a merging module, configured to merge the at least two consecutive first floods into one second flood if there are at least two consecutive first floods that are the complex-peak floods, and determine the corrected peak time, start and end time, and corrected flood peak flow corresponding to the second flood;
[0067] A selection module is used to select a target flood from multiple third floods according to a flood magnitude threshold; the third flood is the second flood, or the first flood except for the first flood used to merge to obtain the second flood; the corrected peak flow corresponding to the target flood is higher than the flood magnitude threshold.
[0068] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0069] The memory is used to store computer programs;
[0070] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.
[0071] The embodiment of the present invention further discloses a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the embodiment of the present invention.
[0072] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.
[0073] The embodiments of the present invention include the following advantages:
[0074] In an embodiment of the present invention, a plurality of runoff observation data with continuous time series are acquired; data quality control is performed on the plurality of runoff observation data through a Hampl filter to obtain a runoff data sequence; the Hampl filter is used to process abnormal data in the plurality of runoff observation data; the runoff data sequence is subjected to time series filtering and smoothing processing to obtain a smoothed data sequence; the first-order backward difference of the smoothed data sequence is calculated, and the first-order backward difference of the smoothed data sequence is subjected to time series filtering and smoothing processing to obtain a smoothed first-order backward difference data sequence; a peak time set and a start and end time set are determined according to the smoothed first-order backward difference data sequence; multiple first floods are determined according to the potential peak time in the peak time set, and the start and end time corresponding to the first flood is determined in the start and end time set; The flow data sequence corrects the peak time and peak flow corresponding to the first flood to obtain the corrected peak time and corrected peak flow corresponding to the first flood; determines whether there are at least two consecutive first floods that are complex-peak floods among multiple first floods according to the flood duration threshold, flood start and end threshold, and time interval threshold; if there are at least two consecutive first floods that are complex-peak floods, merge the at least two consecutive first floods into one second flood, and determine the corrected peak time, start and end time, and corrected peak flow corresponding to the second flood; selects a target flood from multiple third floods according to the flood magnitude threshold; the third flood is the second flood, or the first flood except for the one used to merge to obtain the second flood; the corrected peak flow corresponding to the target flood is higher than the flood magnitude threshold.
[0075] In the embodiment of the present invention, a Hampel filter is used to perform quality control on runoff data, and a time series (Whittaker) filter is used to smooth the quality-controlled runoff data and the first-order backward difference of the quality-controlled runoff data, which can effectively solve the problem of difficulty in accurately identifying floods due to abnormal mutations and non-smoothness of runoff data. In addition, the final setting of the flood magnitude threshold can screen out high-magnitude floods, which can effectively avoid the influence of the premature setting of the flood magnitude threshold on the selection of complex peak floods, and effectively improve the efficiency and accuracy of flood selection. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 is a flow chart of steps of a method for selecting floods of different magnitudes provided in an embodiment of the present invention;
[0077] Figure 2 is a comparison diagram before and after data quality control provided in an embodiment of the present invention;
[0078] Figure 31 is a schematic diagram of comparison of a runoff data sequence provided in an embodiment of the present invention before and after Whittaker filter smoothing processing;
[0079] Figure 4 It is a schematic diagram of comparison before and after Whittaker filter smoothing processing of a first-order backward difference of a smoothed data sequence provided in an embodiment of the present invention;
[0080] Figure 5 is a schematic diagram of a first flood after correcting the peak time provided in an embodiment of the present invention;
[0081] Figure 6 is a schematic diagram of a third flood after a merged flood provided in an embodiment of the present invention;
[0082] Figure 7 is a target flood schematic diagram obtained after screening provided in an embodiment of the present invention;
[0083] Figure 8 It is a structural block diagram of a device for selecting floods of different magnitudes provided in an embodiment of the present invention;
[0084] Fig. 9 is a schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention;
[0085] Fig.10 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0086] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0087] Reference Figure 1 , shows a flowchart of a method for selecting floods of different magnitudes provided in an embodiment of the present invention, which may specifically include the following steps:
[0088] Step 101, obtaining a plurality of runoff observation data with a continuous time series;
[0089] In the embodiment of the present invention, firstly, the runoff observation data with continuous time series in the study area is obtained.
[0090] The study area usually refers to a geographical area selected for a specific research purpose in scientific research. In the embodiment of the present invention, the study area can specifically refer to a river basin that needs to be studied. Continuous time series data refers to a data set that is continuously recorded in chronological order over a period of time. These data are usually collected at fixed time intervals (such as every hour, every day, every month, etc.) to reflect trends or patterns that change over time. Runoff observation data refers to the measurement data of water flow in a water body, which may include information such as flow rate and flow velocity. In order to better identify floods in a river basin in the embodiment of the present invention, it is necessary to obtain runoff observation data with a continuous time series in the study area.
[0091] Step 102: Performing data quality control on the plurality of runoff observation data through a Hampl filter to obtain a runoff data sequence; the Hampl filter is used to process abnormal data in the plurality of runoff observation data;
[0092] In the embodiment of the present invention, the Hampel filter is used for data quality control. The original time series data of runoff is: , n is the total number of moments. Set The window threshold is k, around Generate observation windows on the left and right, where i=1~n, used to represent different observation times, the widths of the left and right sides are k respectively, and the width of the entire window is 2k+1 (including the center ), calculate the median of all runoff observation data in the window, and use the absolute value of the median to estimate the standard deviation of each runoff observation data to the median. If an observation data differs from the median by more than three standard deviations, the median is used to replace the observation data. Finally, the runoff data sequence that has passed data quality control is obtained, which is recorded as .
[0093] Reference Figure 2 , shows a comparison diagram before and after data quality control provided in an embodiment of the present invention, wherein the runoff data sequence, i.e., the runoff observation data, is obtained after data quality control. Figure 2 It can be seen that after the runoff observation data is quality controlled by the Hampel filter, the abnormal mutation values in the time series data can be effectively identified and corrected, which improves the quality and reliability of the data, thereby ensuring that subsequent analysis is based on more accurate and reliable data.
[0094] Step 103, performing time series filtering and smoothing processing on the runoff data sequence to obtain a smoothed data sequence;
[0095] In the embodiment of the present invention, the runoff series after quality control needs to be smoothed by Whittaker filter. Whittaker filter is an algorithm for smoothing time series data, which optimizes the representation of time series by balancing data smoothness and data fidelity. Specifically, by setting the parameters of Whittaker filter smoothing , the smoothed runoff data sequence is calculated according to the following formula (1), that is, the smoothed data sequence :
[0096]
[0097] in, represents the smoothed runoff data, represent The second-order derivative of Represents an operator that finds parameter values that minimize a function.
[0098] Reference Figure 3 , shows a schematic diagram of the comparison of a runoff data sequence provided in an embodiment of the present invention before and after Whittaker filtering and smoothing processing, wherein the smoothed data sequence is the data obtained after the runoff data sequence is smoothed by Whittaker filtering.
[0099] Step 104, calculating the first-order backward difference of the smoothed data sequence, and performing time series filtering and smoothing processing on the first-order backward difference of the smoothed data sequence to obtain a smoothed first-order backward difference data sequence;
[0100] In the embodiment of the present invention, after calculating the smoothed data sequence After that, we need to calculate the first-order backward difference of the smoothed data series, that is, Calculate the first-order backward difference and record it as the first-order backward difference of the smoothed data series , then, the first-order backward difference of the smoothed data series is required Perform Whittaker filter smoothing. At this time, the first-order backward difference of the smoothed data sequence is , set the Whittaker filter smoothing parameters to , the smoothed first-order backward difference data sequence is calculated according to the following formula (2), that is, the smoothed first-order backward difference data sequence :
[0101]
[0102] in, represents the smoothed first-order backward difference data, represent The second derivative of .
[0103] Reference Figure 4 , showing a schematic diagram of the comparison of the first-order backward difference of a smoothed data sequence provided in an embodiment of the present invention before and after Whittaker filtering and smoothing processing, wherein the smoothed first-order backward difference data sequence is the data obtained after the first-order backward difference of the smoothed data sequence is subjected to Whittaker filtering and smoothing processing.
[0104] Step 105: determining a peak time set and a start and end time set according to the smoothed first-order backward difference data sequence;
[0105] In the embodiment of the present invention, a smoothed first-order backward difference data sequence is used to find the potential peak time and start and end time of the flood. ,like , the judgment is as follows:
[0106] like , , ,
[0107] and , ,
[0108] Then j is determined as a potential peak time of a flood, and the peak time that meets the conditions is recorded as the peak time set PeakSet;
[0109] like , , ,
[0110] and , ,
[0111] Then j is determined as the start and end time of a flood, which may be the start time or the stop time. The start and end times that meet the above conditions are recorded as the start and end time set BottomSet.
[0112] Step 106: determining a plurality of first floods according to potential peak occurrence times in the peak occurrence time set, and determining the start and end times corresponding to the first floods in the start and end time set;
[0113] In the embodiment of the present invention, for each potential peak time, the corresponding flood can be determined, and the start and end time of the flood can be obtained according to the proximity principle. Specifically, for the peak time set PeakSet, take t as the peak time of a flood, and find the nearest point less than t in the start and end time set BottomSet. As the starting time of the flood, the nearest point greater than t As the time for this flood to stop.
[0114] Step 107: correcting the peak time and peak flow corresponding to the first flood according to the runoff data sequence to obtain a corrected peak time and corrected peak flow corresponding to the first flood;
[0115] In order to accurately identify and analyze the characteristics of flood events (such as peak time and peak flow), it is necessary to use runoff data series to correct the peak time and peak flow, as data smoothing can easily cause distortion of peak flow.
[0116] In the embodiment of the present invention, the peak time and peak flow of each flood are corrected by using the runoff data sequence to obtain the preliminary flood selection results. Specifically, for a flood with a start time of st and an end time of et, the peak time of the flood is calculated by the following formula (3), that is, the corrected peak time :
[0117]
[0118] in, represents the runoff data corresponding to the i-th moment in the runoff data sequence, and It is the peak flow corresponding to the flood, also known as the corrected peak flow.
[0119] Step 108: judging whether there are at least two consecutive first floods among the plurality of first floods as complex-peak floods according to the flood duration threshold, the flood start and end threshold, and the time interval threshold;
[0120] In the embodiment of the present invention, the flood duration threshold, the flood start and end threshold and the time interval threshold are used to determine whether two or more consecutive floods are complex-peak floods. If so, they are merged into one complex-peak flood.
[0121] Specifically, the flood start and end threshold is set as BaseFlowThreshold, the flood duration threshold is set as W, and the time interval threshold between two consecutive floods is set as T. For two consecutive floods, their peak times are recorded as ( ), the start time and stop time of the first flood are , the start time and stop time of the second flood are Here, the “first” and “second” are only used to describe the order of two consecutive floods. Considering that Whittaker smoothing only distorts the peak flow more seriously and has little effect on the starting flow and the ending flow, the peak flow of the first flood is recorded as , the end flow is , the peak flow of the second flood is , the starting flow is .in, , , , .
[0122] At this time, the judgment on whether two consecutive floods are complex floods is as follows:
[0123] like:
[0124]
[0125]
[0126]
[0127]
[0128] The two consecutive floods are judged to be a double-peak flood, and the two consecutive floods can be merged into one flood.
[0129] Step 109: If there are at least two consecutive first floods that are the complex-peak floods, merge the at least two consecutive first floods into one second flood, and determine the corrected peak time, start and end time, and corrected flood peak flow corresponding to the second flood;
[0130] In the embodiment of the present invention, the merged flood is the second flood, and the start time corresponding to the second flood is determined as , the stop time corresponding to the second flood is At this time, it is also necessary to determine the peak time and peak flow corresponding to the second flood.
[0131] 1) , then the peak time corresponding to the second flood is , the peak flow corresponding to the second flood is .
[0132] 2) , then the peak time corresponding to the second flood is , the peak flow corresponding to the second flood is .
[0133] In the embodiment of the present invention, after the data correction in step 107, the peak time and peak flow corresponding to the second flood are both corrected data, namely, the corrected peak time and the corrected peak flow.
[0134] Step 1010: selecting a target flood from multiple third floods according to a flood magnitude threshold; the third flood is the second flood, or the first flood except for the first flood used for merging to obtain the second flood; the corrected peak flow corresponding to the target flood is higher than the flood magnitude threshold.
[0135] In order to select floods of different magnitudes, it is necessary to set a flood magnitude threshold PeakFlowThreshold. In an embodiment of the present invention, it is necessary to screen out all floods with peak flows higher than PeakFlowThreshold. At this time, floods with peak flows higher than PeakFlowThreshold are determined as target floods.
[0136] In the embodiment of the present invention, high-level floods can be screened out by finally setting the flood magnitude threshold, which can effectively avoid the influence of premature setting of the flood magnitude threshold on the selection of complex-peak floods, and effectively improve the efficiency and accuracy of flood selection.
[0137] In one embodiment of the present invention, the step 102 of performing data quality control on the plurality of runoff observation data by using a Hampel filter to obtain a runoff data sequence includes:
[0138] Generate an observation window corresponding to the runoff observation data according to a window threshold;
[0139] Calculate the median and standard deviation corresponding to the observation window;
[0140] If the difference between the runoff observation data corresponding to the observation window and the median corresponding to the observation window exceeds a standard deviation threshold, the runoff observation data corresponding to the observation window is replaced by the median corresponding to the observation window to obtain the runoff data sequence;
[0141] The standard deviation threshold is determined according to the standard deviation corresponding to the observation window.
[0142] In the embodiment of the present invention, the Hampel filter is used for data quality control. The original time series data of runoff is: , n is the total number of moments. Set The window threshold is k, around Generate runoff observation data on the left and right The corresponding observation window has a width of 2k+1. The median of all runoff observation data in the window and the standard deviation of each runoff observation data to the median are calculated. The standard deviation of each runoff observation data to the median is usually estimated using the absolute value of the median. At this time, if an observation data differs from the median by more than three standard deviations, the observation data is replaced by the median, and finally the runoff data sequence that has passed data quality control is obtained, which is recorded as .
[0143] By using the Hampel filter to perform data quality control on runoff observation data, we can effectively identify and correct abnormal mutation values in time series data, improve the quality and reliability of the data, and ensure that subsequent analysis is based on more accurate and reliable data.
[0144] In one embodiment of the present invention, the step 103 of performing time series filtering and smoothing processing on the runoff data sequence to obtain a smoothed data sequence includes:
[0145] Performing time series filtering and smoothing processing on a plurality of runoff data in the runoff data sequence to obtain a plurality of smoothed runoff data;
[0146] The smoothed data sequence is obtained according to a plurality of the smoothed runoff data and a plurality of second-order derivatives of the smoothed runoff data.
[0147] In the embodiment of the present invention, by setting the parameters of Whittaker filter smoothing , according to the above formula (1) to calculate the smoothed data sequence :
[0148] In one embodiment of the present invention, the step 104, calculating the first-order backward difference of the smoothed data sequence, and performing time series filtering and smoothing processing on the first-order backward difference of the smoothed data sequence to obtain a smoothed first-order backward difference data sequence, includes:
[0149] Calculating and obtaining the first-order backward difference of the smoothed data sequence;
[0150] Performing time series filtering and smoothing processing on the first-order backward difference of the smoothed data sequence to obtain a plurality of smoothed first-order backward difference data;
[0151] The smoothed first-order backward difference data sequence is obtained according to a plurality of the smoothed first-order backward difference data and a plurality of second-order derivatives of the smoothed first-order backward difference data.
[0152] In the embodiment of the present invention, Calculate the first-order backward difference of the smoothed data series Then, by setting the Whittaker filter smoothing parameters to According to the above formula (2), the smoothed first-order backward difference data sequence is calculated .
[0153] In an embodiment of the present invention, a Hampel filter is used to perform quality control on runoff data, and a Whittaker filter is used to smooth the quality-controlled runoff data and the first-order backward difference of the quality-controlled runoff data, which can effectively solve the problem of difficulty in accurately identifying floods due to abnormal mutations and non-smoothness of runoff data.
[0154] In one embodiment of the present invention, the step 105 of determining a peak time set and a start and end time set according to the smoothed first-order backward difference data sequence includes:
[0155] Determining a plurality of potential peak occurrence times and a plurality of start and end times according to the smoothed first-order backward difference data in the smoothed first-order backward difference data sequence; the start and end times are start times or stop times;
[0156] Determine the peak occurrence time set according to the multiple potential peak occurrence times;
[0157] The start and end time set is determined according to the multiple start and end times.
[0158] In an embodiment of the present invention, the key time points of a flood event are identified by analyzing specific patterns of the data. Specifically, by analyzing a smoothed first-order backward difference data sequence, peaks and valleys in the data can be identified. The peaks usually correspond to the peak period of the flood, while the valleys may correspond to the start or stop time of the flood.
[0159] If the smoothed first-order backward difference data sequence meets certain conditions (such as four consecutive zero values followed by non-zero values), the time point j is determined as a potential peak time of a flood and is recorded in the peak time set PeakSet.
[0160] If the smoothed first-order backward difference data sequence meets another set of specific conditions (such as four consecutive zero values followed by non-zero values), the time point j is determined as the start and end time of a flood (which may be the start time or the stop time) and is recorded in the start and end time set BottomSet.
[0161] In one embodiment of the present invention, the determining of a plurality of potential peak occurrence times and a plurality of start and end times according to the smoothed first-order backward difference data in the smoothed first-order backward difference data sequence comprises:
[0162] When the first target smoothed first-order backward difference data is greater than zero, the second target smoothed first-order backward difference data is greater than or equal to zero, the third target smoothed first-order backward difference data is less than zero, and the fourth target smoothed first-order backward difference data is less than or equal to zero, the time corresponding to the first target smoothed first-order backward difference data is determined as the potential peak time; the time corresponding to the second target smoothed first-order backward difference data is before the time corresponding to the first target smoothed first-order backward difference data, and the times corresponding to the third target smoothed first-order backward difference data and the fourth target smoothed first-order backward difference data are both after the time corresponding to the first target smoothed first-order backward difference data;
[0163] When the fifth target smoothed first-order backward difference data is less than zero, the sixth target smoothed first-order backward difference data is less than or equal to zero, the seventh target smoothed first-order backward difference data is greater than zero, and the eighth target smoothed first-order backward difference data is greater than or equal to zero, the time corresponding to the fifth target smoothed first-order backward difference data is determined as the start and end time; the time corresponding to the sixth target smoothed first-order backward difference data is before the time corresponding to the fifth target smoothed first-order backward difference data, and the time corresponding to the seventh target smoothed first-order backward difference data and the eighth target smoothed first-order backward difference data are both after the time corresponding to the first target smoothed first-order backward difference data.
[0164] In the embodiment of the present invention, a smoothed first-order backward difference data sequence is used to find the potential peak time and start and end time of the flood.
[0165] Specifically, for , there are two cases:
[0166] 1) When determining the potential peak time:
[0167] Will As a first objective smooth the first-order backward difference data, , , As a second objective smooth the first-order backward difference data, As the third objective smooth the first-order backward difference data, , As the fourth objective smooth the first-order backward difference data, , , The corresponding times are Before the corresponding time, , , The corresponding times are After the corresponding time.
[0168] Therefore, in When , the specific judgment is as follows:
[0169] like , , ,
[0170] and , ,
[0171] At this time, time point j is determined as the potential peak time of a flood.
[0172] 2) When determining the start and end time:
[0173] Will As the fifth objective smooth the first-order backward difference data, , , , as the sixth objective to smooth the first-order backward difference data, As the seventh objective, smooth the first-order backward difference data, , As the eighth objective, smooth the first-order backward difference data, , , The corresponding times are Before the corresponding time, , , The corresponding times are After the corresponding time.
[0174] Therefore, in When , the specific judgment is as follows:
[0175] like , , ,
[0176] and , , At this time, the time point j is determined as the start and end time of a flood, which may be the start time or the stop time.
[0177] In an embodiment of the present invention, the peak occurrence time set includes multiple potential peak occurrence times, and the determining of multiple first floods according to the potential peak occurrence times in the peak occurrence time set, and determining the start and end times corresponding to the first floods in the start and end time set include:
[0178] Determining the first flood corresponding to the potential peak occurrence time according to the potential peak occurrence time;
[0179] Determining the potential peak time as the peak time corresponding to the first flood;
[0180] The start and end times with the shortest time interval between the peak times corresponding to the first flood in the start and end time set are determined as the start and end times corresponding to the first flood.
[0181] In an embodiment of the present invention, each potential peak time can be used as the peak time corresponding to a flood. At this time, if there are a potential peak times in the peak time set PeakSet, it can be determined that there are a first floods in the study area.
[0182] In the embodiment of the present invention, according to the principle of proximity, the start and end time closest to the peak time of the first flood is selected from the start and end time set. Specifically, the time interval between each start and end time in the start and end time set and the peak time of the first flood is calculated, and the start and end time with the shortest time interval is selected as the start and end time of the first flood.
[0183] For each potential peak time, find the nearest point greater than the peak time t in the start and end time set BottomSet as the end time of the flood. Find the nearest point less than the peak time t in the start and end time set BottomSet as the start time of the flood.
[0184] In an embodiment of the present invention, the start and end time include a start time and a stop time, and determining the start and end time with the shortest time interval between the peak time corresponding to the first flood in the start and end time set as the start and end time corresponding to the first flood includes:
[0185] Determine the start time corresponding to the first flood as the start time corresponding to the first flood, the start time and the end time having the shortest time interval with the peak time corresponding to the first flood in the start time set and being shorter than the peak time corresponding to the first flood;
[0186] The start and end times in the start and end time set that have the shortest time interval with the peak time corresponding to the first flood and are greater than the peak time corresponding to the first flood are determined as the stop time corresponding to the first flood.
[0187] In the embodiment of the present invention, after the peak time corresponding to the first flood is determined, the start and end times corresponding to the first flood may be acquired according to the proximity principle.
[0188] Specifically, for the peak time set PeakSet, take t as the peak time of a flood, and find the nearest point less than t in the start and end time set BottomSet. As the starting time of the flood, the nearest point greater than t As the time for this flood to stop.
[0189] In one embodiment of the present invention, the step 107 of correcting the peak time and peak flow corresponding to the first flood according to the runoff data sequence to obtain the corrected peak time and corrected peak flow corresponding to the first flood includes:
[0190] Correcting the peak time corresponding to the first flood to obtain a corrected peak time corresponding to the first flood;
[0191] The runoff data corresponding to the corrected peak time corresponding to the first flood determined in the runoff data sequence is determined as the corrected flood peak flow corresponding to the first flood.
[0192] In order to accurately identify and analyze the peak time and peak flow corresponding to floods, it is necessary to use the runoff data series to correct the peak time and peak flow, as data smoothing can easily cause distortion of the peak flow.
[0193] In the embodiment of the present invention, for a first flood with a start time of st and an end time of et, it is necessary to use the runoff data sequence to correct the peak time and peak flow of the first flood. Specifically, it is necessary to calculate the corrected peak time corresponding to the first flood using the above formula (3): , and then according to the corrected peak time corresponding to the first flood , the corrected peak flow corresponding to the first flood can be determined .
[0194] In an embodiment of the present invention, the step 108, judging whether there are at least two consecutive first floods among the multiple first floods as complex-peak floods according to the flood duration threshold, the flood start and end threshold, and the time interval threshold, includes:
[0195] Determine two consecutive first floods as a first target flood and a second target flood; the peak time corresponding to the first target flood is after the peak time corresponding to the second target flood;
[0196] Determine the corrected peak time and start and end time corresponding to the first target flood, and determine the corrected peak time and start and end time corresponding to the second target flood; the start and end time include the start time and the stop time;
[0197] Determine the smoothed data corresponding to the stop time corresponding to the first target flood in the smoothed data sequence as the end flow corresponding to the first target flood;
[0198] Determine the smoothed data corresponding to the start time corresponding to the second target flood in the smoothed data sequence as the start flow corresponding to the second target flood;
[0199] If the time interval between the stop time corresponding to the first target flood and the start time corresponding to the second target flood is less than or equal to the time interval threshold, and the time interval between the start time corresponding to the first target flood and the stop time corresponding to the second target flood is less than or equal to the flood duration threshold, and the end flow corresponding to the first target flood and the start flow corresponding to the second target flood are both greater than or equal to the flood start and end thresholds, then it is determined that the first target flood and the second target flood are two consecutive double-peak floods among multiple first floods.
[0200] In the embodiment of the present invention, the flood duration threshold, the flood start and end threshold and the time interval threshold are used to determine whether two or more consecutive floods are complex-peak floods. If so, they are merged into one complex-peak flood.
[0201] Specifically, the flood start and end threshold is set as BaseFlowThreshold, the flood duration threshold is set as W, and the time interval threshold between two consecutive floods is set as T. For two consecutive floods, their peak times are recorded as ( ), the start time and stop time of the first flood are , the start time and stop time of the second flood are Here, the “first” and “second” are only used to describe the order of two consecutive floods. Considering that Whittaker smoothing only distorts the peak flow more seriously and has little effect on the starting flow and the ending flow, the peak flow of the first flood is recorded as , the end flow is , the peak flow of the second flood is , the starting flow is .in, , , , .
[0202] At this time, the judgment on whether two consecutive floods are complex floods is as follows:
[0203] like:
[0204]
[0205]
[0206]
[0207]
[0208] The two consecutive floods are judged to be a double-peak flood, and the two consecutive floods can be merged into one flood.
[0209] In one embodiment of the present invention, the step 109, if there are at least two consecutive first floods that are the complex-peak floods, merging the at least two consecutive first floods into one second flood, and determining the corrected peak time, start and end time, and corrected flood peak flow corresponding to the second flood, includes:
[0210] If the first target flood and the second target flood are two consecutive double-peak floods among multiple first floods, the first target flood and the second target flood are combined to obtain the second flood;
[0211] According to the corrected flood peak flow corresponding to the first target flood and the corrected flood peak flow corresponding to the second target flood, the corrected peak time, the start and end time and the corrected flood peak flow corresponding to the second flood are determined.
[0212] In an embodiment of the present invention, it is necessary to determine whether there are at least two consecutive complex-peak floods among multiple first floods. If there are two consecutive floods, the two floods are marked as the first target flood and the second target flood respectively. If the first target flood and the second target flood are two consecutive complex-peak floods, the two consecutive complex-peak floods (the first target flood and the second target flood) can be merged into a new flood, called the second flood.
[0213] According to the merged flood characteristics, the start and end time of the second flood can be determined, and the corrected peak time corresponding to the second flood can also be determined. After determining the corrected peak time corresponding to the second flood, the corrected flood peak flow corresponding to the second flood can be further determined based on the corrected peak time corresponding to the second flood.
[0214] In addition, the "first target flood" and "second target flood" in the embodiment of the present invention are only used for examples. The embodiment of the present invention does not limit the specific number of consecutive multi-peak floods among multiple first floods. The specific judgment is made based on the actual situation. For example, there may be three consecutive floods. At this time, the "first target flood", "second target flood" and "third target flood" can be used as examples of these three floods.
[0215] In the embodiment of the present invention, by merging consecutive complex-peak floods, the analysis and management of flood events can be simplified, and at the same time, key parameters of the merged floods are provided, which is helpful for subsequent flood selection.
[0216] In one embodiment of the present invention, determining the corrected peak time, start and end time, and corrected peak flow corresponding to the second flood according to the corrected peak flow corresponding to the first target flood and the corrected peak flow corresponding to the second target flood includes:
[0217] Determine the start time corresponding to the first target flood as the start time corresponding to the second flood, and determine the stop time corresponding to the second target flood as the stop time corresponding to the second flood;
[0218] When the corrected flood peak flow corresponding to the first target flood is less than or equal to the corrected flood peak flow corresponding to the second target flood, the corrected peak occurrence time corresponding to the second target flood is determined as the corrected peak occurrence time corresponding to the second flood, and the corrected flood peak flow corresponding to the second target flood is determined as the corrected flood peak flow corresponding to the second flood;
[0219] When the corrected peak flow corresponding to the first target flood is greater than the corrected peak flow corresponding to the second target flood, the corrected peak time corresponding to the first target flood is determined as the corrected peak time corresponding to the second flood, and the corrected peak flow corresponding to the first target flood is determined as the corrected peak flow corresponding to the second flood.
[0220] In the embodiment of the present invention, it is assumed that the start time and stop time corresponding to the first flood are , the start time and stop time of the second flood are , the merged flood is the second flood. At this time, the starting time of the second flood can be determined as , the stop time corresponding to the second flood is .
[0221] The corrected peak flow corresponding to the first target flood is , the corrected peak flow corresponding to the second target flood is , then, the corrected peak time and corrected flood peak flow corresponding to the second flood can be determined by the following judgment:
[0222] 1) If , then the corrected peak time corresponding to the second flood is , the corrected peak flow corresponding to the second flood is .
[0223] 2) If , then the corrected peak time corresponding to the second flood is , the corrected peak flow corresponding to the second flood is .
[0224] By comparing the corrected peak flows of two consecutive compound-peak floods, the key parameters of the merged second flood can be determined, which will help with subsequent flood selection.
[0225] In the embodiment of the present invention, a Hampel filter is used to perform quality control on runoff data, and a Whittaker filter is used to smooth the quality-controlled runoff data and the first-order backward difference of the quality-controlled runoff data, which can effectively solve the problem of difficulty in accurately identifying floods due to abnormal mutations and non-smoothness of runoff data. In addition, the final setting of the flood magnitude threshold can screen out high-magnitude floods, which can effectively avoid the influence of the premature setting of the flood magnitude threshold on the selection of complex peak floods, and effectively improve the efficiency and accuracy of flood selection.
[0226] In order to enable those skilled in the art to better understand the embodiments of the present invention, a specific example is used for illustration below.
[0227] Obtain multiple runoff observation data with continuous time series in the study area , the runoff unit is , 3000 is the total number of moments, in h;
[0228] The Hampel filter is used to perform data quality control on multiple runoff observation data. At this time, the setting The window threshold is k=12, i=1~3000, and finally the runoff data sequence after data quality control is obtained, which is recorded as ;
[0229] The runoff data sequence after quality control is smoothed by Whittaker filter. At this time, the parameters of Whittaker filter smoothing are set. =2e4, the smoothed data sequence is calculated , i=1~3000;
[0230] Calculates smoothed data series The first-order backward difference of , j = 2~3000;
[0231] First-order backward difference of the smoothed data series Perform Whittaker filter smoothing. At this time, set the parameters of Whittaker filter smoothing. =2e4, the smoothed first-order backward difference data sequence is calculated , j = 2~3000;
[0232] The smoothed first-order backward difference data sequence is used to determine the following peak time set PeakSet and start and end time set BottomSet:
[0233] PeakSet={172, 245, 446, 563, 647, 763, 965, 1102, 1223, 1447, 1561, 1695, 1897, 2002, 2186, 2313, 2530, 2673}
[0234] BottomSet={101, 224, 274, 539, 594, 701, 882, 1064, 1145, 1380, 1500, 1654, 1850, 1954, 2101, 2247, 2429, 2622, 2936}
[0235] Among them, the peak time set PeakSet includes the potential peak times of multiple floods, and the start and end time set BottomSet includes the corresponding start and end times of multiple floods.
[0236] According to each potential peak time, the start and end time of the flood is obtained according to the principle of proximity, and a total of 18 first floods are obtained. The corresponding results are shown in Table 1 below:
[0237] Table 1 Peak time and start and end time of the first flood
[0238]
[0239] Use the runoff data series (data series after data quality control) to correct the peak time of each first flood, that is, the corrected peak time corresponding to the first flood , the results are shown in Table 2 below:
[0240] Table 2 Corrected peak time and start and end time of the first flood
[0241]
[0242] Corrected peak flow corresponding to the first flood It is determined based on the corrected peak time corresponding to the first flood.
[0243] Reference Figure 5 , shows a schematic diagram of a first flood after correcting the peak time provided in an embodiment of the present invention, which specifically includes the 18 first floods in Table 2 above.
[0244] The flood duration threshold W, flood start and end threshold BaseFlowThreshold and time interval threshold T are used to determine whether two or more consecutive floods are complex floods. If so, they are merged into one complex flood. Set the flood duration threshold W = 300h, the flood start and end threshold BaseFlowThreshold = 120 , the time interval threshold T=10h, then the two first floods corresponding to number 7 and number 8 are merged into one second flood, and the two first floods corresponding to number 10 and number 11 are merged into one second flood, and a total of 16 third floods are obtained, as shown in Table 3 below:
[0245] Table 3 Corrected peak time and start and end time of the third flood
[0246]
[0247] Reference Figure 6 , shows a schematic diagram of a third flood after a merged flood provided in an embodiment of the present invention, which specifically includes the 16 third floods in Table 3 above.
[0248] Set the flood level threshold PeakFlowThreshold=250 , filter out the corrected peak flows corresponding to all third floods There are 9 target floods with floods higher than PeakFlowThreshold, as shown in Table 4 below:
[0249] Table 4 Corrected peak time and start and end time of target flood
[0250]
[0251] Reference Figure 7 , shows a schematic diagram of a target flood obtained after screening provided in an embodiment of the present invention, which specifically includes the 9 target floods in Table 4 above.
[0252] In the embodiment of the present invention, the runoff data is quality controlled by using a Hampel filter, and the runoff data after quality control and the first-order backward difference of the runoff data after quality control are smoothed by a Whittaker filter, which can effectively solve the problem that floods are difficult to accurately identify due to abnormal mutations and non-smoothness of runoff data. In addition, the final setting of the flood magnitude threshold can screen out high-magnitude floods, which can effectively avoid the influence of the premature setting of the flood magnitude threshold on the selection of complex peak floods, and effectively improve the efficiency and accuracy of flood selection.
[0253] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0254] Reference Figure 8 , shows a structural block diagram of a device for selecting floods of different magnitudes provided in an embodiment of the present invention, which may specifically include the following modules:
[0255] The runoff observation data module 801 is used to obtain a plurality of runoff observation data with a continuous time series;
[0256] A runoff data sequence module 802 is used to perform data quality control on the plurality of runoff observation data through a Hampl filter to obtain a runoff data sequence; the Hampl filter is used to process abnormal data in the plurality of runoff observation data;
[0257] A smoothing data sequence module 803 is used to perform time series filtering and smoothing processing on the runoff data sequence to obtain a smoothed data sequence;
[0258] The smoothed first-order backward difference data sequence module 804 is used to calculate the first-order backward difference of the smoothed data sequence, and perform time series filtering and smoothing processing on the first-order backward difference of the smoothed data sequence to obtain a smoothed first-order backward difference data sequence;
[0259] A time set determination module 805, configured to determine a peak time set and a start and end time set according to the smoothed first-order backward difference data sequence;
[0260] A first flood determination module 806, configured to determine a plurality of first floods according to potential peak occurrence times in the peak occurrence time set, and determine the start and end times corresponding to the first floods in the start and end time set;
[0261] A correction module 807 is used to correct the peak time and peak flow corresponding to the first flood according to the runoff data sequence to obtain a corrected peak time and corrected peak flow corresponding to the first flood;
[0262] A judgment module 808 is used to judge whether there are at least two consecutive first floods among the multiple first floods that are complex-peak floods according to the flood duration threshold, the flood start and end threshold and the time interval threshold;
[0263] A merging module 809 is configured to merge the at least two consecutive first floods into one second flood if there are at least two consecutive first floods that are the complex-peak floods, and determine the corrected peak time, start and end time, and corrected flood peak flow corresponding to the second flood;
[0264] The selection module 8010 is used to select a target flood from multiple third floods according to a flood magnitude threshold; the third flood is the second flood, or the first flood except for the first flood used to merge to obtain the second flood; the corrected peak flow corresponding to the target flood is higher than the flood magnitude threshold.
[0265] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0266] In addition, an embodiment of the present invention further provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned method for selecting floods of different magnitudes are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0267] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned method for selecting floods of different magnitudes is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0268] An embodiment of the present invention also provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the various processes of the above-mentioned method for selecting floods of different magnitudes, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0269] Fig. 9 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0270] The electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, a processor 910, and a power supply 911. Those skilled in the art will appreciate that Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.
[0271] It should be understood that in the embodiment of the present invention, the radio frequency unit 901 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving downlink data from the base station, it is sent to the processor 910 for processing; in addition, uplink data is sent to the base station. Generally, the radio frequency unit 901 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 901 can also communicate with the network and other devices through a wireless communication system.
[0272] The electronic device provides users with wireless broadband Internet access through the network module 902, such as helping users to send and receive emails, browse web pages, and access streaming media.
[0273] The audio output unit 903 can convert the audio data received by the RF unit 901 or the network module 902 or stored in the memory 909 into an audio signal and output it as sound. Moreover, the audio output unit 903 can also provide audio output related to a specific function performed by the electronic device 900 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 903 includes a speaker, a buzzer, a receiver, etc.
[0274] The input unit 904 is used to receive audio or video signals. The input unit 904 may include a graphics processor (GPU) 9041 and a microphone 9042. The graphics processor 9041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 906. The image frame processed by the graphics processor 9041 can be stored in the memory 909 (or other storage medium) or sent via the radio frequency unit 901 or the network module 902. The microphone 9042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 901 in the case of a telephone call mode.
[0275] The electronic device 900 also includes at least one sensor 905, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 9061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 9061 and / or the backlight when the electronic device 900 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 905 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.
[0276] The display unit 906 is used to display information input by the user or information provided to the user. The display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0277] The user input unit 907 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 907 includes a touch panel 9071 and other input devices 9072. The touch panel 9071, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch panel 9071). The touch panel 9071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the processor 910, receives the command sent by the processor 910 and executes it. In addition, the touch panel 9071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 9071, the user input unit 907 may also include other input devices 9072. Specifically, other input devices 9072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.
[0278] Furthermore, the touch panel 9071 may be overlaid on the display panel 9061. When the touch panel 9071 detects a touch operation on or near it, it transmits the information to the processor 910 to determine the type of the touch event. Then, the processor 910 provides a corresponding visual output on the display panel 9061 according to the type of the touch event. Fig. 9 In the figure, the touch panel 9071 and the display panel 9061 are used as two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 9071 and the display panel 9061 can be integrated to realize the input and output functions of the electronic device, which is not limited here.
[0279] The interface unit 908 is an interface for connecting an external device to the electronic device 900. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 908 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 900 or may be used to transmit data between the electronic device 900 and an external device.
[0280] The memory 909 can be used to store software programs and various data. The memory 909 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 909 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0281] The processor 910 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 909, and calling data stored in the memory 909, so as to monitor the electronic device as a whole. The processor 910 may include one or more processing units; preferably, the processor 910 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 910.
[0282] The electronic device 900 may also include a power supply 911 (such as a battery) for supplying power to various components. Preferably, the power supply 911 may be logically connected to the processor 910 via a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0283] In addition, the electronic device 900 includes some functional modules not shown, which will not be described in detail here.
[0284] like Fig.10 As shown, in another embodiment provided by the present invention, a computer-readable storage medium 1001 is also provided, in which instructions are stored. When the computer-readable storage medium 1001 is run on a computer, the computer executes the method for selecting floods of different magnitudes described in the above embodiment.
[0285] It should be noted that, in this article, the terms "include", "comprises" or any other variations 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. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0286] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0287] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
[0288] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0289] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0290] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0291] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0292] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0293] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0294] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for selecting floods of different magnitudes, characterized in that: The method comprises: Obtain multiple runoff observation data with continuous time series; Performing data quality control on the plurality of runoff observation data by using a Hampl filter to obtain a runoff data sequence; the Hampl filter is used to process abnormal data in the plurality of runoff observation data; Performing time series filtering and smoothing processing on a plurality of runoff data in the runoff data sequence to obtain a plurality of smoothed runoff data; Obtaining a smoothed data sequence according to a plurality of the smoothed runoff data and a plurality of second-order derivatives of the smoothed runoff data; Calculating and obtaining the first-order backward difference of the smoothed data sequence; Performing time series filtering and smoothing processing on the first-order backward difference of the smoothed data sequence to obtain a plurality of smoothed first-order backward difference data; Obtaining a smoothed first-order backward difference data sequence according to a plurality of the smoothed first-order backward difference data and a plurality of second-order derivatives of the smoothed first-order backward difference data; Determine a peak time set and a start and end time set according to the smoothed first-order backward difference data sequence; Determine a plurality of first floods according to potential peak occurrence times in the peak occurrence time set, and determine the start and end times corresponding to the first floods in the start and end time set; Correcting the peak time and peak flow corresponding to the first flood according to the runoff data sequence to obtain a corrected peak time and corrected peak flow corresponding to the first flood; Determine whether there are at least two consecutive first floods among the multiple first floods that are complex-peak floods according to the flood duration threshold, the flood start and end threshold, and the time interval threshold; If there are at least two consecutive first floods that are the complex-peak floods, the at least two consecutive first floods are merged into one second flood, and the corrected peak time, start and end time, and corrected flood peak flow corresponding to the second flood are determined; A target flood is selected from multiple third floods according to a flood magnitude threshold; the third flood is the second flood, or the first flood except for the first flood used for merging to obtain the second flood; the corrected peak flow corresponding to the target flood is higher than the flood magnitude threshold.
2. The method according to claim 1, characterized in that The method of performing data quality control on the plurality of runoff observation data by using a Hampel filter to obtain a runoff data sequence includes: Generate an observation window corresponding to the runoff observation data according to a window threshold; Calculate the median and standard deviation corresponding to the observation window; If the difference between the runoff observation data corresponding to the observation window and the median corresponding to the observation window exceeds a standard deviation threshold, the runoff observation data corresponding to the observation window is replaced by the median corresponding to the observation window to obtain the runoff data sequence; The standard deviation threshold is determined according to the standard deviation corresponding to the observation window.
3. The method according to claim 1, characterized in that Determining a peak time set and a start and end time set according to the smoothed first-order backward difference data sequence includes: Determining a plurality of potential peak occurrence times and a plurality of start and end times according to the smoothed first-order backward difference data in the smoothed first-order backward difference data sequence; the start and end times are start times or stop times; Determine the peak occurrence time set according to the multiple potential peak occurrence times; The start and end time set is determined according to the multiple start and end times.
4. The method according to claim 3, characterized in that The step of determining a plurality of potential peak occurrence times and a plurality of start and end times according to the smoothed first-order backward difference data in the smoothed first-order backward difference data sequence comprises: When the first target smoothed first-order backward difference data is greater than zero, the second target smoothed first-order backward difference data is greater than or equal to zero, the third target smoothed first-order backward difference data is less than zero, and the fourth target smoothed first-order backward difference data is less than or equal to zero, the time corresponding to the first target smoothed first-order backward difference data is determined as the potential peak time; the time corresponding to the second target smoothed first-order backward difference data is before the time corresponding to the first target smoothed first-order backward difference data, and the times corresponding to the third target smoothed first-order backward difference data and the fourth target smoothed first-order backward difference data are both after the time corresponding to the first target smoothed first-order backward difference data; When the fifth target smoothed first-order backward difference data is less than zero, the sixth target smoothed first-order backward difference data is less than or equal to zero, the seventh target smoothed first-order backward difference data is greater than zero, and the eighth target smoothed first-order backward difference data is greater than or equal to zero, the time corresponding to the fifth target smoothed first-order backward difference data is determined as the start and end time; the time corresponding to the sixth target smoothed first-order backward difference data is before the time corresponding to the fifth target smoothed first-order backward difference data, and the time corresponding to the seventh target smoothed first-order backward difference data and the eighth target smoothed first-order backward difference data are both after the time corresponding to the first target smoothed first-order backward difference data.
5. The method according to claim 1, characterized in that The peak occurrence time set includes a plurality of potential peak occurrence times, determining a plurality of first floods according to the potential peak occurrence times in the peak occurrence time set, and determining the start and end times corresponding to the first floods in the start and end time set, comprises: Determining the first flood corresponding to the potential peak occurrence time according to the potential peak occurrence time; Determining the potential peak time as the peak time corresponding to the first flood; The start and end times with the shortest time interval between the peak times corresponding to the first flood in the start and end time set are determined as the start and end times corresponding to the first flood.
6. The method according to claim 5, characterized in that The start and end time include a start time and a stop time, and determining the start and end time with the shortest time interval between the peak time corresponding to the first flood in the start and end time set as the start and end time corresponding to the first flood includes: Determine the start time corresponding to the first flood as the start time corresponding to the first flood, the start time and the end time having the shortest time interval with the peak time corresponding to the first flood in the start time set and being shorter than the peak time corresponding to the first flood; The start and end times in the start and end time set that have the shortest time interval with the peak time corresponding to the first flood and are greater than the peak time corresponding to the first flood are determined as the stop time corresponding to the first flood.
7. The method according to claim 1, characterized in that The step of correcting the peak time and peak flow corresponding to the first flood according to the runoff data sequence to obtain the corrected peak time and peak flow corresponding to the first flood includes: Correcting the peak time corresponding to the first flood to obtain a corrected peak time corresponding to the first flood; The runoff data corresponding to the corrected peak time corresponding to the first flood determined in the runoff data sequence is determined as the corrected flood peak flow corresponding to the first flood.
8. The method according to claim 1, characterized in that The determining whether there are at least two consecutive first floods among the plurality of first floods as complex-peak floods according to the flood duration threshold, the flood start and end threshold, and the time interval threshold includes: Determine two consecutive first floods as a first target flood and a second target flood; the peak time corresponding to the first target flood is after the peak time corresponding to the second target flood; Determine the corrected peak time and start and end time corresponding to the first target flood, and determine the corrected peak time and start and end time corresponding to the second target flood; the start and end time include the start time and the stop time; Determine the smoothed data corresponding to the stop time corresponding to the first target flood in the smoothed data sequence as the end flow corresponding to the first target flood; Determine the smoothed data corresponding to the start time corresponding to the second target flood in the smoothed data sequence as the start flow corresponding to the second target flood; If the time interval between the stop time corresponding to the first target flood and the start time corresponding to the second target flood is less than or equal to the time interval threshold, and the time interval between the start time corresponding to the first target flood and the stop time corresponding to the second target flood is less than or equal to the flood duration threshold, and the end flow corresponding to the first target flood and the start flow corresponding to the second target flood are both greater than or equal to the flood start and end thresholds, then it is determined that the first target flood and the second target flood are two consecutive double-peak floods among multiple first floods.
9. The method according to claim 8, characterized in that If there are at least two consecutive first floods that are the complex-peak floods, the at least two consecutive first floods are merged into one second flood, and the corrected peak time, start and end time, and corrected flood peak flow corresponding to the second flood are determined, including: If the first target flood and the second target flood are two consecutive double-peak floods among multiple first floods, the first target flood and the second target flood are combined to obtain the second flood; According to the corrected flood peak flow corresponding to the first target flood and the corrected flood peak flow corresponding to the second target flood, the corrected peak time, the start and end time and the corrected flood peak flow corresponding to the second flood are determined.
10. The method according to claim 9, characterized in that The determining, according to the corrected flood peak flow corresponding to the first target flood and the corrected flood peak flow corresponding to the second target flood, the corrected peak time, the start and end time, and the corrected flood peak flow corresponding to the second flood comprises: Determine the start time corresponding to the first target flood as the start time corresponding to the second flood, and determine the stop time corresponding to the second target flood as the stop time corresponding to the second flood; When the corrected flood peak flow corresponding to the first target flood is less than or equal to the corrected flood peak flow corresponding to the second target flood, the corrected peak occurrence time corresponding to the second target flood is determined as the corrected peak occurrence time corresponding to the second flood, and the corrected flood peak flow corresponding to the second target flood is determined as the corrected flood peak flow corresponding to the second flood; When the corrected peak flow corresponding to the first target flood is greater than the corrected peak flow corresponding to the second target flood, the corrected peak time corresponding to the first target flood is determined as the corrected peak time corresponding to the second flood, and the corrected peak flow corresponding to the first target flood is determined as the corrected peak flow corresponding to the second flood.
11. A device for selecting floods of different magnitudes, characterized in that: The device comprises: A runoff observation data module is used to obtain multiple runoff observation data with continuous time series; A runoff data sequence module, used for performing data quality control on the plurality of runoff observation data through a Hampl filter to obtain a runoff data sequence; the Hampl filter is used for processing abnormal data in the plurality of runoff observation data; A smoothing data sequence module is used to perform time series filtering and smoothing processing on a plurality of runoff data in the runoff data sequence to obtain a plurality of smoothed runoff data; and obtain the smoothed data sequence according to the plurality of smoothed runoff data and the second-order derivatives of the plurality of smoothed runoff data; A smoothed first-order backward difference data sequence module is used to calculate the first-order backward difference of the smoothed data sequence; perform time series filtering and smoothing processing on the first-order backward difference of the smoothed data sequence to obtain a plurality of smoothed first-order backward difference data; and obtain the smoothed first-order backward difference data sequence according to the plurality of smoothed first-order backward difference data and the second-order derivatives of the plurality of smoothed first-order backward difference data; A time set determination module, used to determine a peak time set and a start and end time set according to the smoothed first-order backward difference data sequence; A first flood determination module, configured to determine a plurality of first floods according to potential peak occurrence times in the peak occurrence time set, and to determine the start and end times corresponding to the first floods in the start and end time set; A correction module, configured to correct the peak time and peak flow corresponding to the first flood according to the runoff data sequence, to obtain a corrected peak time and corrected peak flow corresponding to the first flood; A judgment module, used for judging whether there are at least two consecutive first floods among the multiple first floods as complex-peak floods according to a flood duration threshold, a flood start and end threshold, and a time interval threshold; a merging module, configured to merge the at least two consecutive first floods into one second flood if there are at least two consecutive first floods that are the complex-peak floods, and determine the corrected peak time, start and end time, and corrected flood peak flow corresponding to the second flood; A selection module is used to select a target flood from multiple third floods according to a flood magnitude threshold; the third flood is the second flood, or the first flood except for the first flood used to merge to obtain the second flood; the corrected peak flow corresponding to the target flood is higher than the flood magnitude threshold.
12. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 10 when executing the program stored in the memory.
13. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 10.
