A hydro-meteorological sequence sample expansion method, device and equipment
By combining an improved LSTM model and the GR-CEEMD decomposition method with random sampling and a genetic algorithm, more representative hydrological and meteorological sequence samples are generated, which solves the problem of accuracy in hydrological frequency calculation and improves the reliability of water conservancy engineering design.
Patent Information
- Application Number
- CN202310310727.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-27
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2043-03-27
AI Technical Summary
The lack of representativeness and consistency of existing hydrological and meteorological sequence samples affects the accuracy of hydrological frequency calculations, leading to problems in the design and safety of water conservancy projects.
An improved LSTM-based Seq2seq model is used for endpoint extension. Combined with the GR-CEEMD decomposition method and the heuristic concepts of random sampling and genetic algorithm, multiple sets of new sequences with stable waveforms and monotonic trend terms are generated. The representativeness of the samples is improved by random crossover combination.
It significantly improves the accuracy of hydrological and meteorological frequency calculation results, and enhances the reliability and safety of water conservancy engineering design.
Smart Images

Figure CN116362291B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of hydrological frequency calculation, and in particular to a hydro-meteorological sequence sample expansion method, device and equipment. BACKGROUND
[0002] Hydro-meteorological frequency calculation mainly uses the measured hydro-meteorological sequence samples in a certain period to calculate the occurrence frequency of a certain hydrological variable, so as to predict the design value of the variable at a certain frequency, and thus to provide an important basis for flood control guarantee, water conservancy project operation, engineering hydrological design and the like. In recent years, due to water resource shortage, climate change and the intensification of human activities, the underlying surface conditions of each basin have changed significantly, so that the representativeness and consistency of the hydro-meteorological sequence samples cannot be guaranteed, thereby affecting the accuracy of subsequent frequency calculation and engineering hydrological design, and even affecting the construction and safety of water conservancy projects.
[0003] Researches show that reasonable sample expansion can effectively improve the representativeness of hydro-meteorological sequence. The commonly used sample expansion methods at present include Monte Carlo method, support vector machine and Bootstrap method. Among them, the Monte Carlo method is simple in principle, but has a relatively large error in the calculation of a very small sample; the support vector machine method can overcome the sensitivity of the model to the sample capacity in processing small sample data regression problems, and has relatively obvious advantages, but the accuracy is greatly affected by the parameters, and the optimization process of the parameters is very cumbersome; the Bootstrap method increases the sample quantity by repeated sampling without presetting the sample distribution, and is widely used in engineering practice, but since the value range of the expanded sample generated by the Bootstrap method is limited to the original small sample, the expanded sample distribution deviates from the true distribution of the original sample to some extent, the representativeness of the sample is limited, and therefore it is difficult to meet the needs of engineering hydrological design in practical engineering. Therefore, it is urgent to propose a more representative hydro-meteorological sequence sample expansion method, so as to improve the accuracy of the design value of the hydrological variable and lay a foundation for subsequent engineering hydrological design. SUMMARY
[0004] In view of the problems in the prior art, the present application provides a hydro-meteorological sequence sample expansion method, device and equipment, which can make the hydro-meteorological sequence sample more representative, and thus be conducive to significantly improving the accuracy of the hydro-meteorological frequency calculation result.
[0005] In order to solve the above technical problems, the present application is implemented by the following technical scheme:
[0006] A hydro-meteorological sequence sample expansion method, comprising:
[0007] obtaining an original hydro-meteorological sequence;
[0008] Determine whether the original hydrological and meteorological sequence follows a normal distribution. If not, perform normalization to obtain a hydrological and meteorological sequence that follows a normal distribution.
[0009] Determine whether a hydro-meteorological sequence that follows a normal distribution follows the same distribution. If not, eliminate the autocorrelation of the hydro-meteorological sequence that follows a normal distribution to obtain a normal hydro-meteorological sequence that follows the same distribution.
[0010] An improved LSTM-based Seq2seq model is used to extend the endpoints of the two ends of the normally distributed hydro-meteorological sequence, resulting in the extended sequence.
[0011] The improved GR-CEEMD decomposition method is used to decompose the endpoint extended sequence to obtain multiple sets of new sequences with stable waveforms and monotonic trend terms.
[0012] The new sequences were randomly cross-combined using the heuristic concepts of random sampling and genetic algorithms to obtain expanded hydrological and meteorological sequence samples.
[0013] Furthermore, the improved LSTM-based Seq2seq model is used to extend the endpoints of the normally distributed hydro-meteorological sequence to obtain the extended sequence, including:
[0014] The normally distributed hydro-meteorological sequence is assumed to contain n sets of data. These data are input sequentially into an encoder composed of single-layer LSTM units to generate hidden layer states {h1, h2, ..., h...} at different times. n The hidden layer state h generated at each time step t Both are the same as the hidden layer state h of the previous time step. t-1 The normal hydro-meteorological sequence x that corresponds to time t and follows the same distribution t related;
[0015] After n time steps of computation, the final state h is generated. n , stored in the intermediate vector c;
[0016] The intermediate vector c is input into the encoder of the Seq2seq model to perform operations on indefinite long-time sequences, and state values containing sequence prediction information are obtained.
[0017] The state value containing sequence prediction information is decoded using a Seq2seq decoder to obtain the predicted value of the sequence.
[0018] The extreme points of the predicted values that are closest to both ends of the normal hydro-meteorological sequence that follows the same distribution are added to both ends of the normal hydro-meteorological sequence that follows the same distribution to obtain the sequence after endpoint extension.
[0019] Further, the improved GR-CEEMD decomposition method is used to decompose the extended sequence to obtain a plurality of new sequences with stable waveforms and monotonic trend items, including:
[0020] The EMD decomposition method based on the GR stopping criterion is used to decompose the extended sequence m times to obtain m groups of first IMF components and m groups of first monotonic residual trend items, each group containing a plurality of first IMF components and a first monotonic residual trend item;
[0021] The first IMF components of each group are superimposed to generate a superimposed sequence D1(t);
[0022] The superimposed sequence D1(t) is subjected to complete empirical mode decomposition to obtain m groups of second IMF components and m groups of second monotonic residual trend items, each group containing a plurality of second IMF components and a second monotonic residual trend item;
[0023] The m groups of first monotonic residual trend items and the m groups of second IMF components are combined to obtain a plurality of new sequences D2(t) with stable waveforms and monotonic trend items.
[0024] Further, the heuristic concept of random sampling and genetic algorithm is used to randomly cross combine the new sequences to obtain an expanded hydro-meteorological sequence sample, including:
[0025] The new sequence D2(t) is regarded as a gene fragment in a biological population, and the new sequence is set to contain q groups of IMF1 components, IMF2 components, …, IMF k components and q groups of monotonic residual trend items, which means that the new sequence is composed of q chromosomes, each containing k+1 genes;
[0026] Using the random sampling principle, two chromosomes are randomly selected as parents each time, and the k+1 genes on the parent chromosomes are randomly crossed and recombined by combining the crossover algorithm;
[0027] During the random crossing process, the components at the same position in each group are not combined, but are combined with any component in the remaining components, and after multiple cycles, an expanded hydro-meteorological sequence sample is obtained.
[0028] Further, the KS test method is used to determine whether the original hydro-meteorological sequence is subject to normal distribution, including:
[0029] The original hydro-meteorological sequence containing n groups of data is sorted and recorded as M1 i <…<M n, and the statistical quantity T is used to calculate whether the original hydro-meteorological sequence is subject to normal distribution, and the calculation formula is as follows:
[0030]
[0031] T = max | G (x) - F n (x) |,
[0032] In the formula, F n (x) represents an empirical cumulative distribution function of the original hydro-meteorological sequence, and G (x) represents a cumulative distribution function of a normal distribution.
[0033] Under a preset significant level alpha, when the calculated T is greater than a critical value T (n, alpha) at this time, and the gradual significant value P is greater than alpha, the original hydro-meteorological sequence is subject to normal distribution.
[0034] Further, the Bayesian test method is used to judge whether the hydro-meteorological sequence subject to normal distribution is subject to the same distribution.
[0035] Further, after the hydro-meteorological sequence sample is obtained, the method further comprises:
[0036] If there is an abnormal value in the hydro-meteorological sequence sample, the abnormal value is removed.
[0037] Further, the method further comprises:
[0038] The method further comprises:
[0039] A hydro-meteorological sequence sample expansion device, comprising:
[0040] An acquisition module is configured to acquire an original hydro-meteorological sequence.
[0041] A normal distribution processing module is configured to judge whether the original hydro-meteorological sequence is subject to normal distribution, and if not, to perform normalization processing to obtain a hydro-meteorological sequence subject to normal distribution.
[0042] A same distribution processing module is configured to judge whether the hydro-meteorological sequence subject to normal distribution is subject to the same distribution, and if not, to eliminate the autocorrelation of the hydro-meteorological sequence subject to normal distribution to obtain a normal hydro-meteorological sequence subject to the same distribution.
[0043] An endpoint extension module is configured to use an improved LSTM-based Seq2seq model to perform endpoint extension on two ends of the normal hydro-meteorological sequence subject to the same distribution to obtain an extended sequence.
[0044] A decomposition module is configured to decompose the extended sequence by using an improved GR-CEEMD decomposition method, so as to obtain new sequences with stable waveforms and monotonic trend items;
[0045] A combination module is configured to randomly cross and combine the new sequences by using a heuristic concept of random sampling and genetic algorithm, so as to obtain the extended hydro-meteorological sequence samples.
[0046] An apparatus includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the hydro-meteorological sequence sample extension method when executing the computer program.
[0047] Compared with the prior art, the present application has at least the following beneficial effects:
[0048] The hydro-meteorological sequence sample extension method provided by the present application uses an improved LSTM-based Seq2seq model to extend the two ends of normal hydro-meteorological sequences subject to the same distribution, so as to obtain the extended sequences, that is, to use the improved LSTM-based Seq2seq model for end-point prediction, so that the length setting of the input and output of the prediction model is not limited, the short-term hydro-meteorological sequence prediction effect is good, and the influence of the end-point effect on the decomposition result is significantly eliminated; the improved GR-CEEMD decomposition method is used to decompose the extended sequences, so as to obtain new sequences with stable waveforms and monotonic trend items, the GR-EMD and CEEMD decomposition methods are combined, the mode aliasing problem of large and irregular IMF component fluctuations when using GR-EMD decomposition alone is overcome, so that the IMF component with stable waveform and the residual trend item with significant monotonicity can be obtained after decomposition; the heuristic concept of random sampling and genetic algorithm is combined to randomly cross and recombine each component and trend item in the new sequences generated after GR-CEEMD decomposition, so that the sample distribution after decomposition and cross is closer to the whole and has stronger representativeness, which is further conducive to significantly improving the accuracy of the hydro-meteorological frequency calculation result, and has good engineering application prospect.
[0049] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the following preferred embodiments are described in detail below, and the accompanying drawings are described as follows. BRIEF DESCRIPTION OF DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the specific embodiments of the present application, the following will briefly introduce the drawings needed to be used in the description of the specific embodiments. Obviously, the drawings described below are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0051] Figure 1 A flow chart of a hydro-meteorological sequence sample expansion method of the present application.
[0052] Figure 2 A structure diagram of a Seq2seq model based on LSTM of the present application.
[0053] Figure 3 A flow chart of a GR-CEEMD decomposition method of the present application.
[0054] Figure 4 A random cross combination diagram (taking two IMF components as an example) of the present application.
[0055] Figure 5 A time series change diagram of the original hydro-meteorological sequence in the embodiment of the present application.
[0056] Figure 6 A Bayesian mutation variation test diagram of the original hydro-meteorological sequence in the embodiment of the present application.
[0057] Figure 7 A scatter plot of the sequences before and after cross of the GR-CEEMD decomposition in the embodiment of the present application.
[0058] Figure 8 A violin plot of the sequences before and after cross of the GR-CEEMD decomposition in the embodiment of the present application. DETAILED DESCRIPTION
[0059] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be described below in detail with reference to the accompanying drawings. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0060] As a specific embodiment of the present application, as shown in Figure 1 , the present application provides a hydro-meteorological sequence sample expansion method, which specifically comprises the following steps:
[0061] S1, obtaining an original hydro-meteorological sequence;
[0062] S2, judging whether the original hydro-meteorological sequence is subject to a normal distribution, if not, performing normalizing processing to obtain a hydro-meteorological sequence subject to a normal distribution;
[0063] S3, judging whether the hydro-meteorological sequence subject to a normal distribution is subject to a same distribution, if not, eliminating the autocorrelation of the hydro-meteorological sequence subject to a normal distribution to obtain a normal hydro-meteorological sequence subject to a same distribution;
[0064] For example, the method of detrending or adding white noise is used to eliminate the autocorrelation of hydro-meteorological sequences subject to normal distribution.
[0065] S4, using a modified LSTM-based Seq2seq model to end-point extend the two ends of the normal hydro-meteorological sequences subject to the same distribution, to obtain the end-point extended sequences;
[0066] In the LSTM-based Seq2seq model, LSTM is a long short-term memory network, and Seq2seq is a sequence-to-sequence.
[0067] S5, using a modified GR-CEEMD decomposition method to decompose the end-point extended sequences, to obtain new sequences with multiple waveforms, stable and monotonic trend items;
[0068] S6, using the heuristic concept of random sampling and genetic algorithm to randomly cross combine the new sequences, to obtain the extended hydro-meteorological sequence samples.
[0069] On the basis of the above embodiment, as a more preferred embodiment, in step S2, the KS test method (Kolmogorov-Smirnov test) is used to determine whether the original hydro-meteorological sequence is subject to normal distribution, and the specific steps are as follows:
[0070] S21, sort the original hydro-meteorological sequence containing n groups of data and mark it as M1<M2<…<M i <…<M n , use the statistic T to calculate whether the original hydro-meteorological sequence is subject to normal distribution, and the calculation formula is as follows:
[0071]
[0072] T = max |G(x)-F n (x) |,
[0073] In the formula, F n (x) represents the empirical cumulative distribution function of the original hydro-meteorological sequence, and G(x) represents the cumulative distribution function of the normal distribution.
[0074] S22, under the preset significance level α, when the calculated T is greater than the critical value T(n, α) at this time, and the asymptotic significance P value is greater than α, the original hydro-meteorological sequence satisfies the normal distribution.
[0075] On the basis of the above-mentioned embodiments, as a more preferred embodiment, in step S3, it is judged whether the hydro-meteorological sequence subject to normal distribution is subject to the same distribution by using the Bayesian test method (i.e. the mutation point test of the hydro-meteorological sequence subject to normal distribution is carried out by using the Bayesian test method), and the specific steps are as follows:
[0076] S31, define the hydro-meteorological sequence subject to normal distribution to contain dependent variables Y1, Y2, …, Y n and independent variables X1, X2, …, X n , and establish a regression statistical model as follows:
[0077]
[0078] Wherein, β i is the regression coefficient, and ε is the random error term;
[0079] S32, assume that the hydro-meteorological sequence subject to normal distribution contains r mutation points, and the above-mentioned regression model is applicable to each pair of continuous mutation points between, and the mutation point position is recorded as C={C1, C2, …, C r}. If the data point set from i to j in the time sequence is recorded as Y i:j , the probability f(Y i:j ) of the data set Y i:j under the given regression model is calculated, and the calculation formula is as follows:
[0080] Y i:j ={Y i ,Y i+1 ,...,Y j-1 ,Y j},1≤i<j≤n
[0081]
[0082] In the formula, n is the total number of data points of the sequence; I is the unit matrix; k0 is the scale parameter for connecting the variance of the regression coefficient and the residual variance; ν0 is the pseudo data point; σ0 2 is the residual variance; n0 is the number of data points in the data set; ν n and s n are the posterior distribution parameters of the residual variance;
[0083] S33, record the probability density of the first j data containing r mutation points as P r (Y 1:j ), take r=1, multiply the probabilities of two non-overlapping data sets, and sum all possible positions of the mutation points, to find the prefix probability P1(Y 1:v ) of the data containing one mutation point;
[0084] S34, multiply the prefix probability P1(Y 1:v ) containing one mutation point and the probability density of a non-overlapping data set Y v+1:j , and then sum all possible positions of the second mutation point to calculate the prefix probability P2(Y 1:j ) of the time series with two mutation points, and the above operation is repeated until r takes the maximum number of allowed mutation points r max ;
[0085] S35, the prior distribution at the mutation point is regarded as a uniform distribution, and the posterior distribution of the mutation point is calculated, and the formula is as follows:
[0086]
[0087] S36, use Bayesian rule to extract probability samples of mutation points from a certain number of posterior distributions, and then recursively sample the positions, and finally, sample the parameters of the regression model between adjacent mutation points C i and C i+1 ;
[0088] S37, generate the prediction model and the posterior probability of the potential mutation point by the Bayesian algorithm, so as to judge whether the original sequence is mutated.
[0089] On the basis of the above embodiment, as a more preferred embodiment, as shown in Figure 2 , in step S4, the two ends of the normal hydro-meteorological sequence subject to the same distribution are extended by using the improved LSTM-based Seq2seq model, and the extended sequence is obtained, and the specific steps are as follows:
[0090] S41, set the normal hydro-meteorological sequence subject to the same distribution to contain n groups of data, and input it into the encoder composed of single-layer LSTM unit in time sequence to generate hidden layer state {h1, h2, …, h n} at different time, and the hidden layer state h t generated at each time is related to the hidden layer state h t-1 of the previous time and the normal hydro-meteorological sequence x t subject to the same distribution corresponding to t time;
[0091] S42, after n time operations, the final state h n is generated and stored in the intermediate vector c;
[0092] S43, input the intermediate vector c into the encoder of the Seq2seq model to perform indefinite length time sequence operation, and obtain the state value containing sequence prediction information;
[0093] S44, decoding the state value containing sequence prediction information through a Seq2seq decoder to obtain a predicted value of the sequence;
[0094] S45, adding extreme value points closest to both ends of the normal hydro-meteorological sequence conforming to the same distribution in the predicted value to both ends of the normal hydro-meteorological sequence conforming to the same distribution to obtain an extended sequence at both ends.
[0095] On the basis of the above-mentioned embodiments, as a more preferred embodiment, in combination with Figure 3 As shown in the figure, in step S5, the extended sequence at both ends is decomposed by using the improved GR-CEEMD decomposition method to obtain a plurality of new sequences with stable waveforms and monotonous trend items, and the specific steps are as follows:
[0096] S51, using an EMD decomposition method based on a GR stopping criterion to decompose the extended sequence at both ends m times to obtain m groups of first IMF components and m groups of first monotonous residual trend items, each group containing a plurality of first IMF components and a first monotonous residual trend item;
[0097] S52, superimposing the first IMF components of each group respectively to generate a superimposed sequence D1(t);
[0098] S53, performing complete empirical mode decomposition (CEEMD) on the superimposed sequence D1(t) to obtain m groups of second IMF components and m groups of second monotonous residual trend items, each group containing a plurality of second IMF components and a second monotonous residual trend item;
[0099] S54, combining the m groups of first monotonous residual trend items with the m groups of second IMF components to obtain a plurality of new sequences D2(t) with stable waveforms and monotonous trend items.
[0100] More specifically, the steps of the EMD decomposition method based on the GR stopping criterion are as follows:
[0101] a. performing EMD decomposition on the extended sequence at both ends, and stopping the decomposition when the GR stopping criterion is met to obtain m groups of first IMF components and m groups of first monotonous residual trend items, each group containing a plurality of first IMF components and a first monotonous residual trend item. The GR stopping criterion formula is as follows:
[0102]
[0103] In the formula, σ(t) is a judgment function of the IMF component in the screening process, f max is the upper envelope line of the decomposition generated data extreme value, f minTo decompose the lower envelope line generating data extreme value, two threshold values θ1, θ2 are given, when the calculated σ(t) is less than the given threshold value, stop screening.
[0104] More specifically, the steps of CEEMD decomposition are:
[0105] a. Add a pair of positive and negative Gaussian white noise w(t) in the superimposed sequence D1(t), and then calculate the intrinsic mode function IMF1(t) by EMD decomposition:
[0106]
[0107] In the formula, m is the total number of EMD decomposition; E1 is the first intrinsic mode function; λ is the signal-to-noise ratio coefficient of different screening stages.
[0108] b. Calculate the first-order residual r1(t), the formula is:
[0109] r1(t) = D1(t) - IMF1(t)
[0110] c. Continue to decompose and calculate IMF2(t), the formula is:
[0111]
[0112] d. According to the same method, the l-order residual and IMF l (t) can be obtained, the formula is:
[0113] r l (t) = r (l-1) (t) - IMF l (t),
[0114]
[0115] e. Repeat the above steps until the number of extreme points of the remaining components is less than or equal to 2, then complete the decomposition, and obtain m groups of second IMF components and m groups of second monotonic residual trend items.
[0116] On the basis of the above embodiment, as a more preferred embodiment, in step S6, the new sequence D2(t) is randomly crossed combined by using the heuristic concept of random sampling and genetic algorithm, to obtain an expanded hydro-meteorological sequence sample, the specific steps are as follows:
[0117] S61, the new sequence D2(t) is regarded as a gene fragment in a biological population, and the new sequence contains q groups of IMF1 components, IMF2 components, …, IMF k components and q groups of monotonic residual trend items, which is equivalent to that the new sequence is composed of q chromosomes, each chromosome contains k+1 genes;
[0118] For example, if the new sequence comprises 60 groups of IMF1 components, IMF2 components and monotonic residual trend items, it is equivalent to that the new sequence is composed of 60 chromosomes, each of which comprises 3 genes.
[0119] S62, two chromosomes are randomly selected from the q chromosomes as parents each time according to the random sampling principle, and then the k+1 genes on the parent chromosomes are randomly crossed and recombined by combining the crossover algorithm;
[0120] For example, two chromosomes are randomly selected from the 60 chromosomes as parents each time, and then the three genes on the parent chromosomes are randomly crossed and recombined by combining the crossover algorithm, and 8 different results can be obtained in one cycle, as shown in Figure 4 .
[0121] S63, in the random crossing process, the components at the same position in each group are not combined, but combined with any component in the remaining components, and the expanded hydro-meteorological sequence samples are obtained after multiple cycles.
[0122] For example, the IMF1 in a group cannot be combined with the IMF1 in the remaining groups, but can be combined with any component in the remaining IMF2-IMFs, and a new sequence with a length much larger than the original sample can be generated after multiple cycles.
[0123] On the basis of the above-mentioned embodiments, as a more preferred embodiment, if there are abnormal values in the expanded hydro-meteorological sequence samples, the abnormal values are removed. Specifically, due to the randomness of sampling, the same parent may be drawn, resulting in some repeated values, and the arbitrary crossing combination of each component may cause the superposition of several groups of extremely small components or extremely large components, which may further cause individual values to deviate significantly from the mean value, so it is necessary to remove the repeated values in the sequence after decomposition and crossing and the points higher than 3 times the standard deviation of the mean value.
[0124] Embodiment
[0125] Step 1. The research period is 1953-2012 for a total of 60 years, the research area is Shaoguan Station in the Pearl River Basin, and the original hydro-meteorological sequence is the annual maximum daily rainfall of the station. The data is as shown in Figure 5 , and the calculation shows that the average value of the original hydro-meteorological sequence is 200.04 mm, the variance is 5002.73 mm, and it shows a certain upward trend.
[0126] Taking the significance level a = 0.05, the KS test statistic T is 0.12, and the asymptotic significance P is 0.031, which is less than 0.05. It is judged that the original hydro-meteorological sequence does not completely belong to the normal distribution. Therefore, the original sequence is first normalized. The test statistic T of the sequence after normalization is 0.064, and the asymptotic significance P is 0.200, which is greater than 0.05. Therefore, the sequence after normalization obeys the normal distribution.
[0127] Step 2. Perform Bayesian mutation test on the hydro-meteorological sequence obeying the normal distribution, and the test result is as shown in Figure 6 The blue solid line represents the logarithmic time sequence, the green dashed line represents the average model generated by the Bayesian mutation test algorithm, and the red solid line represents the posterior probability of the change point. Among the 500 sampling solutions under the 0.05 significance level, no change point is found. Therefore, the hydro-meteorological sequence obeying the normal distribution does not have obvious variation, i.e., it obeys the same distribution, which meets the prerequisite condition of the GR-CEEMD decomposition cross method.
[0128] Step 3. The Seq2seq model based on LSTM is used to predict forward and backward for the two ends of the normal hydro-meteorological sequence obeying the same distribution. 20 values are predicted for each end. Then, the extreme value points closest to the two ends are added to the sequence to obtain the sequence after endpoint extension.
[0129] Step 4. The GR-EMD decomposition method based on the GR stopping criterion is used to decompose the sequence after endpoint extension to obtain 65 groups of intrinsic mode functions (IMF) and a monotonic trend term, each group containing 4 first IMF components and 1 first residual trend term. The 65 groups of first IMF components generated by GR-EMD decomposition are superimposed to generate the superimposed sequence D1(t). Then, the superimposed sequence D1(t) is subjected to complete empirical mode decomposition (CEEMD) to obtain 65 groups of second IMF components and 65 groups of second monotonic residual trend terms, each group containing 3 second IMF components and 1 second monotonic residual trend term. The 65 groups of first monotonic residual trend terms and the 65 groups of second IMF components are combined to obtain 65 groups of new sequences D2(t) with smooth waveforms and monotonic trend terms, which are the GR-CEEMD decomposition results.
[0130] Step 5. The 65 groups of new sequences D2(t) with smooth waveforms and monotonic trend terms generated by GR-CEEMD decomposition are regarded as gene fragments in biological populations, equivalent to 65 chromosomes, each containing four genes. According to the random sampling principle, two chromosomes are randomly selected as parents from the 65 chromosomes each time, and the four genes on the parent chromosomes are randomly crossed and recombined by using the crossover algorithm to obtain the extended hydro-meteorological sequence sample. In this embodiment, the number of cyclic sampling is 5000 times.
[0131] Step 6. Remove the repeated values in the extended hydro-meteorological sequence sample and the points higher than 3 times the standard deviation of the mean value, and obtain the final hydro-meteorological sequence sample extension result, which can reach 11170, significantly increasing the length of the original hydro-meteorological sequence. As shown in Figure 7 and Figure 8 , the mean value of the extended hydro-meteorological sequence obtained by the GR-CEEMD decomposition cross method is 200.32 mm, and the variance is 4668.75 mm. Compared with the original hydro-meteorological sequence, the mean value changes little, and the variance decreases significantly. As shown in Figure 7 , the sample points of the original hydro-meteorological sequence are completely contained in the extended hydro-meteorological sequence obtained by the GR-CEEMD decomposition cross method, and more new sample points are generated. As shown in Figure 8 , the maximum and minimum values of the extended hydro-meteorological sequence obtained by the GR-CEEMD decomposition cross method are extended. Therefore, the representative of the extended sequence generated by the GR-CEEMD decomposition cross method for hydrological frequency calculation is greatly improved.
[0132] Step 7. Calculate the annual maximum daily rainfall design value of the original hydro-meteorological sequence and the extended hydro-meteorological sequence obtained by the GR-CEEMD decomposition cross method using the P-III type curve fitting method. If P1 represents the return period of 100 years, and P2 represents the return period of 50 years, it can be calculated that the design values of the extended hydro-meteorological sequence obtained by the GR-CEEMD decomposition cross method under P1 and P2 are 402.19 mm and 370.77 mm, respectively, which are 6.32 mm and 4.48 mm less than the original sequence, respectively.
[0133] From the above calculation results, it can be seen that the hydro-meteorological sequence sample extension method based on GR-CEEMD decomposition cross proposed in the present application, (1) proposes to use the LSTM-based Seq2seq model for endpoint prediction, so that the length setting of the input and output of the prediction model is not limited, the short-term hydrological sequence prediction effect is good, and the influence of the endpoint effect on the decomposition result is significantly eliminated; (2) proposes to combine GR-EMD and CEEMD two decomposition methods, which overcomes the mode aliasing problem that the IMF component fluctuates greatly and irregularly when using GR-EMD decomposition alone, so that the IMF component and the residual trend item after decomposition are smooth and significantly monotonic; (3) Moreover, combining the heuristic concept of random sampling and genetic algorithm, the components and trend items in the new sequence generated after GR-CEEMD decomposition are randomly crossed and recombined, so that the sample distribution after decomposition and cross is closer to the whole, and also has stronger representativeness, which significantly improves the accuracy of the hydro-meteorological frequency calculation result, and has good engineering application prospect.
[0134] As a specific embodiment of the present application, the present application also provides a hydro-meteorological sequence sample expansion device, comprising:
[0135] An acquisition module is configured to acquire an original hydro-meteorological sequence.
[0136] A normal distribution processing module is configured to determine whether the original hydro-meteorological sequence conforms to a normal distribution, and if not, to perform normalization processing to obtain a hydro-meteorological sequence conforming to the normal distribution.
[0137] A same distribution processing module is configured to determine whether the hydro-meteorological sequence conforming to the normal distribution conforms to a same distribution, and if not, to eliminate autocorrelation of the hydro-meteorological sequence conforming to the normal distribution to obtain a normal hydro-meteorological sequence conforming to the same distribution.
[0138] An endpoint extension module is configured to perform endpoint extension on both ends of the normal hydro-meteorological sequence conforming to the same distribution by using an improved LSTM-based Seq2seq model to obtain an extended sequence.
[0139] A decomposition module is configured to decompose the extended sequence by using an improved GR-CEEMD decomposition method to obtain a plurality of new sequences with stable waveforms and monotonic trend items.
[0140] A combination module is configured to randomly cross-combine the new sequences by using a heuristic concept of random sampling and genetic algorithm to obtain an expanded hydro-meteorological sequence sample.
[0141] The hydro-meteorological sequence sample expansion device provided by the present application is used to implement the hydro-meteorological sequence sample expansion method described above, and therefore the specific embodiments of the hydro-meteorological sequence sample expansion device can be found in the embodiment part of the hydro-meteorological sequence sample expansion method described above.
[0142] The application provides a computer device in an embodiment, the computer device includes a processor and a memory, the memory is used for storing a computer program, the computer program includes program instructions, and the processor is used for executing the program instructions stored by the computer storage medium. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components and the like, which are the computing core and control core of the terminal, and are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions to implement a corresponding method flow or corresponding function; the processor in the embodiment of the application can be used to implement the operation of a hydro-meteorological sequence sample expansion method.
[0143] The hydro-meteorological sequence sample expansion method in the embodiment of the application can be stored in a computer readable storage medium if it is implemented in the form of a software function unit and sold or used as an independent product. Based on such understanding, all or part of the flow of the above-mentioned embodiment method can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer readable storage medium. The computer program can implement the steps of each method embodiment when the processor executes the computer program. The computer program includes computer program codes, and the computer program codes can be in the form of source code, object code, executable files or some intermediate forms and the like. The computer readable storage medium includes permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. The information can be computer readable instructions, data structures, program modules or other data.
[0144] The computer storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as a floppy disk, a hard disk, a magnetic tape, a magneto-optical disk (MO) and the like), an optical storage (such as a CD, a DVD, a BD, a HVD and the like), and a semiconductor storage (such as a ROM, an EPROM, an EEPROM, a non-volatile memory (NAND FLASH), a solid state disk (SSD)) and the like.
[0145] Those skilled in the art will appreciate that embodiments of the application can be readily used as a method, a system or a computer program product. Accordingly, the application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer-readable program code.
[0146] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0147] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0148] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0149] Finally, it should be noted that the above-described embodiments are merely specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, but not to limit the same. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that any person skilled in the art can still modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some of the technical features, within the technical scope disclosed by the present application. The modifications, changes or replacements do not cause the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for amplifying hydrological and meteorological sequence samples, characterized in that, include: Obtain the original hydrological and meteorological sequences; Determine whether the original hydrological and meteorological sequence follows a normal distribution. If not, perform normalization to obtain a hydrological and meteorological sequence that follows a normal distribution. Determine whether a hydro-meteorological sequence that follows a normal distribution follows the same distribution. If not, eliminate the autocorrelation of the hydro-meteorological sequence that follows a normal distribution to obtain a normal hydro-meteorological sequence that follows the same distribution. An improved LSTM-based Seq2seq model is used to extend the endpoints of the normally distributed hydro-meteorological sequences, resulting in extended sequences, including: The normally distributed hydro-meteorological series that are assumed to follow the same distribution include n The data is processed sequentially and input into an encoder composed of single-layer LSTM units to generate the hidden layer states at different times. h 1, h 2, ..., h n The hidden layer state generated at each time step. h t Both are the same as the hidden layer state at the previous time step. h t-1 and t Normal hydro-meteorological series corresponding to the same time point x t related; go through n The calculations at each time step generate the final state. h n Stored in intermediate vectors c middle; intermediate vector c The input is fed into the encoder of the Seq2seq model to perform operations on indefinite long-term sequences, resulting in state values containing sequence prediction information; The state value containing sequence prediction information is decoded using a Seq2seq decoder to obtain the predicted value of the sequence. The extreme points of the predicted values that are closest to both ends of the normal hydro-meteorological sequence that follows the same distribution are added to both ends of the normal hydro-meteorological sequence that follows the same distribution to obtain the sequence after endpoint extension; The improved GR-CEEMD decomposition method is used to decompose the endpoint-extended sequence, resulting in multiple sets of new sequences with stable waveforms and monotonic trend terms, including: The endpoint-extended sequence was processed using the EMD decomposition method based on the GR stopping criterion. m The next decomposition yields... m Group 1 IMF component and m Each group contains multiple first IMF components and one first monotonic residual trend term; The first IMF components of each group are superimposed to generate the superimposed sequence D1(t); Performing a complete empirical mode decomposition on the superimposed sequence D1(t) yields... m Group 2 IMF components and m The second monotonic residual trend term is grouped into multiple second IMF components and one second monotonic residual trend term. Will m Group 1 first monotonic residual trend term and m The second IMF component of the group is combined to obtain multiple new sequences D2(t) with stable waveforms and monotonic trend terms; The new sequences were randomly cross-combined using the heuristic concepts of random sampling and genetic algorithms to obtain expanded hydrological and meteorological sequence samples.
2. The method for amplifying hydrological and meteorological sequence samples according to claim 1, characterized in that, The method employs a heuristic concept of random sampling and genetic algorithms to randomly crossover and combine the new sequences, resulting in augmented hydrological and meteorological sequence samples, including: Considering the new sequence D2(t) as a gene fragment in a biological population, the new sequence is defined as containing... q Group IMF1 component, IMF2 component, ..., IMF k Quantity and q The group of monotonic residual trend terms is equivalent to the new sequence being composed of... q It consists of 10 chromosomes, each chromosome containing 10 chromosomes. k +1 gene; Using the principle of random sampling, each time from q Two chromosomes are randomly selected from the total number of chromosomes as parents. Then, using a crossover algorithm, the chromosomes of the parents are... k +1 gene undergoes random crossover and recombination; During the random crossover process, components at the same position in each group are not combined, but are combined with any of the other components. After multiple cycles, the expanded hydrological and meteorological sequence samples are obtained.
3. The method for amplifying hydrological and meteorological sequence samples according to claim 1, characterized in that, The KS test is used to determine whether the original hydrological and meteorological sequence follows a normal distribution, including: Will contain n The original hydrological and meteorological sequences of the data set were sorted and denoted as follows: M 1< M 2<…< M i <…< M n Using statistics T The formula for determining whether the original hydrological and meteorological sequence follows a normal distribution is as follows: , , In the formula, F n ( x ) represents the empirical cumulative distribution function of the original hydrological and meteorological series. G ( x ) represents the cumulative distribution function of the normal distribution; At the preset significance level α Below, when calculated T Greater than the critical value at this time T ( n , α (and asymptotic significance) P Value greater than α At that time, the original hydrological and meteorological sequence followed a normal distribution.
4. The method for amplifying hydrological and meteorological sequence samples according to claim 1, characterized in that, Bayes' test is used to determine whether hydrological and meteorological sequences that follow a normal distribution follow the same distribution.
5. The method for amplifying hydrological and meteorological sequence samples according to claim 1, characterized in that, After obtaining the amplified hydro-meteorological sequence sample, the method further includes: If outliers are found in the expanded hydrological and meteorological sequence samples, then the outliers are removed.
6. The method for amplifying hydrological and meteorological sequence samples according to claim 1, characterized in that, Eliminating the autocorrelation of the normally distributed hydro-meteorological series includes: Autocorrelation of hydrological and meteorological series that follow a normal distribution can be eliminated by detrending or adding white noise.
7. A hydro-meteorological sequence sample amplification device, characterized in that, include: The acquisition module is used to acquire raw hydrological and meteorological sequences; The normal distribution processing module is used to determine whether the original hydrological and meteorological sequence follows a normal distribution. If it does not, it performs normalization processing to obtain a hydrological and meteorological sequence that follows a normal distribution. The same distribution processing module is used to determine whether a hydro-meteorological sequence that follows a normal distribution follows the same distribution. If it does not, the autocorrelation of the hydro-meteorological sequence that follows a normal distribution is eliminated to obtain a normal hydro-meteorological sequence that follows the same distribution. The endpoint extension module is used to extend the two ends of the normally distributed hydro-meteorological sequence following the same distribution using an improved LSTM-based Seq2seq model, to obtain the endpoint-extended sequence, including: The normally distributed hydro-meteorological series that are assumed to follow the same distribution include n The data is processed sequentially and input into an encoder composed of single-layer LSTM units to generate the hidden layer states at different times. h 1, h 2, ..., h n The hidden layer state generated at each time step. h t Both are the same as the hidden layer state at the previous time step. h t-1 and t Normal hydro-meteorological series corresponding to the same time point x t related; go through n The calculations at each time step generate the final state. h n Stored in intermediate vectors c middle; intermediate vector c The input is fed into the encoder of the Seq2seq model to perform operations on indefinite long-term sequences, resulting in state values containing sequence prediction information; The state value containing sequence prediction information is decoded using a Seq2seq decoder to obtain the predicted value of the sequence. The extreme points of the predicted values that are closest to both ends of the normal hydro-meteorological sequence that follows the same distribution are added to both ends of the normal hydro-meteorological sequence that follows the same distribution to obtain the sequence after endpoint extension; The decomposition module is used to decompose the endpoint-extended sequence using an improved GR-CEEMD decomposition method, obtaining multiple sets of new sequences with stable waveforms and monotonic trend terms, including: The endpoint-extended sequence was processed using the EMD decomposition method based on the GR stopping criterion. m The next decomposition yields... m Group 1 IMF component and m Each group contains multiple first IMF components and one first monotonic residual trend term; The first IMF components of each group are superimposed to generate the superimposed sequence D1(t); Performing a complete empirical mode decomposition on the superimposed sequence D1(t) yields... m Group 2 IMF components and m The second monotonic residual trend term is grouped into multiple second IMF components and one second monotonic residual trend term. Will m Group 1 first monotonic residual trend term and m The second IMF component of the group is combined to obtain multiple new sequences D2(t) with stable waveforms and monotonic trend terms; The combination module is used to randomly cross-combine the new sequence using the heuristic concepts of random sampling and genetic algorithms to obtain the expanded hydrological and meteorological sequence sample.
8. An apparatus comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the hydro-meteorological sequence sample amplification method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Electroencephalogram signal recognition model training method, recognition method, device and equipment
CN114418026A
Knowledge enhancement-based text generation model and training method thereof
CN115345169A