Method for water supply forecasting of leaky integrate-and-fire reservoir networks with secondary modality reconstruction

By employing a leakage integral reservoir network method based on quadratic modal reconstruction, combined with time series decomposition and optimized echo state network, the problem of inaccurate water supply prediction in urban water supply systems is solved, enabling accurate prediction of daily urban water supply and supporting optimized scheduling of the water supply system.

CN116341743BActive Publication Date: 2026-06-02CHONGQING TECH & BUSINESS UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING TECH & BUSINESS UNIV
Filing Date
2023-03-28
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing technologies, urban water supply systems suffer from over- or under-supply of water during water supply scheduling, making it difficult to accurately predict urban water demand.

Method used

A leakage integral reservoir network method based on quadratic modal reconstruction is adopted. Through data acquisition, time series decomposition, modal component reconstruction and prediction value integration, the echo state network optimized by attention mechanism and invasive weed optimization algorithm is used to predict water supply.

Benefits of technology

It enables accurate prediction of daily urban water supply, provides a basis for water supply scheduling decisions, and improves the optimization efficiency of the water supply system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116341743B_ABST
    Figure CN116341743B_ABST
Patent Text Reader

Abstract

The application relates to the field of water supply quantity prediction, and discloses a water supply quantity prediction method of a leakage integral reservoir pool network with secondary mode reconstruction, which comprises the following steps: 1) data acquisition; 2) decomposing a water supply quantity time sequence x(t) by using a time sequence decomposition CEEMDAN method; 3) reconstructing and combining mode components to obtain a high-frequency subsequence, a medium-frequency subsequence and a low-frequency subsequence; 4) inputting each sequence as an input quantity into an echo state network to respectively obtain prediction values of the high-frequency subsequence, the medium-frequency subsequence and the low-frequency subsequence; and 5) integrating the prediction results of each subsequence to obtain a final prediction result. The prediction mode of the leakage integral reservoir pool network with secondary mode reconstruction is adopted to solve the low-precision problem of city daily water supply quantity prediction, the city daily water supply quantity can be accurately predicted, and the prediction can provide a basis and technical support for optimization of city water supply scheduling decision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water supply prediction, and in particular to a method for predicting water supply in a leakage integral reservoir network based on secondary mode reconstruction. Background Technology

[0002] In recent years, due to the continuous advancement of urbanization and rapid socio-economic development, urban water consumption has increased significantly, as has the complexity of urban water supply. Therefore, meeting urban water demand is a top priority for water supply systems, posing a challenge to their optimization. Predicting urban water demand is fundamental to optimizing urban water supply system planning, enabling water companies to make decisions on optimal water resource allocation while conserving energy, thereby improving water resource utilization and simultaneously meeting customer water needs.

[0003] Due to historical reasons, technological limitations, and other factors, most small and medium-sized cities still rely on traditional experience to make water supply scheduling decisions, which can easily lead to problems of over- or under-supply. Therefore, accurate prediction of urban water supply is one of the key issues facing water companies.

[0004] Therefore, those skilled in the art are dedicated to developing a method for predicting water supply in urban water supply using a leakage integral reservoir network with secondary mode reconstruction, in order to accurately predict urban water demand. Summary of the Invention

[0005] In view of the above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is to provide a method for predicting water supply in urban water supply using a leakage integral reservoir network based on secondary mode reconstruction, so as to accurately predict urban water demand.

[0006] To achieve the above objectives, this invention provides a method for predicting the water supply of a leakage integral reservoir network based on quadratic mode reconstruction, comprising the following steps:

[0007] 1) Data collection: Collect historical water supply data for all users in the target area to form a water supply time series x(t);

[0008] 2) The CEEMDAN time series decomposition method is used to decompose the water supply time series x(t) into a series of modal components with different characteristic scales. Where k = 1, 2, …;

[0009] 3) For modal components Reconstruction is performed by merging different modal components based on their entropy values, and then fusing the common characteristics exhibited by different modes to obtain high-frequency subsequences T1, T2, ..., T. o The mid-frequency subsequence M and the low-frequency subsequence L;

[0010] 4) Reconstruct the high-frequency subsequences T1, T2, ..., T1 obtained in step 3) respectively. o The mid-frequency subsequence M and the low-frequency subsequence L are used as inputs to an echo state network with leakage coefficients, optimized using an intrusive weeds optimization algorithm based on an attention mechanism, to obtain the high-frequency subsequences T1, T2, ..., T. o The predicted values ​​Y1, Y2, ..., Y o The predicted value Y of the intermediate frequency subsequence M M And the predicted value Y of the low-frequency subsequence L L ;

[0011] 5) Integrate the prediction results obtained from each subsequence to obtain the final prediction result.

[0012] Preferably, in step 1), the water supply time series x(t) is at least a year's worth of daily water supply data.

[0013] Preferably, in step 2), the CEEMDAN method for time series decomposition of water supply includes the following steps:

[0014] 21) Using the Empirical Mode Decomposition (EMD) algorithm to analyze the signal Perform I-th decomposition, where I ranges from 50 to 100, and calculate the first modal component using the mean:

[0015]

[0016] in For amplitude, This represents the white noise sequence with a standard normal distribution added in the i (i = 1, 2, …, I) experiments. This is the first EMD component obtained in the i-th experiment;

[0017] 22) Subtracting from the original time series x(t) yields the first residual signal. Using EMD to analyze signals Perform a first decomposition and obtain the second modal component by calculating the mean:

[0018]

[0019] in This represents the first modal component extracted using the EMD algorithm;

[0020] 23) will From the first margin signal Subtracting from the middle yields the second residual signal. Using EMD to analyze signals Perform two decompositions and obtain the third modal component by calculating the mean:

[0021]

[0022] 24) From the (k-1)th (k=3, 4, …) residual signal Subtracting from the middle, we obtain the k-th residual signal. Using EMD to analyze signals Perform k decompositions and calculate the (k+1)th modal component using the mean:

[0023]

[0024] 25) Determine if the number of extreme points of the residual signal is less than or equal to two. If yes, stop; if no, proceed to step 24).

[0025] When the algorithm terminates, it obtains k+1 modal components and 1 residual signal. Let K = k+1+1, so the original data can be decomposed into K modal components using the CEEMDAN algorithm.

[0026]

[0027] The first K-1 are (k=1,2,…,K-1), where the Kth signal is the margin signal. .

[0028] Preferably, the empirical mode decomposition method includes the following steps:

[0029] 211) Let the original time series be... ,Sure Connect all local extrema with cubic spline curves to form an upper envelope, and connect all local minima to form a lower envelope. Calculate the average value m1 of the upper and lower envelopes, and then find the difference between the original data and m1. Determine whether h1 satisfies the IMF condition; the IMF condition is that the number of extreme points and zero-crossing points are equal or at most differ by 1 and m1 = 0; if yes, proceed to step 212); if no, proceed to step 213).

[0030] 212) Then h1 is The first IMF component is denoted as c1;

[0031] 213) Using h1 as the original data, proceed to step 211) e (e=1, 2, …) times, until h 1e = h 1(e-1) – m1e The conditions for satisfying the IMF are: the number of extreme points and the number of zero-crossing points are equal or differ by at most 1; m1 = 0, where h 1(e-1) For the original data of the e-th repetition process, m 1e Let c1 = h be the average of the upper and lower envelopes of the e-th repetition. 1e Then c1 is a signal The first IMF component;

[0032] 214) Remove c1 from the original time series Subtracting from the middle yields the first residual signal. (Taking r1 as the original data into step 211), we get... The second IMF component c2;

[0033] 215) Subtract c2 from the first residual signal r1 to obtain the second residual signal. (Taking r2 as the original data into step 211), we get... The third IMF component, c3;

[0034] 216) c n From the (n-1)th (n=3, 4, …) residual signal r n-1 Subtracting from the middle yields the nth residual signal. , will r n As the raw data, it enters step 211), and we obtain... The (n+1)th IMF component c n+1 ;

[0035] 217) Determine whether the residual signal is a monotonic function and whether IMFs that meet the following conditions can be extracted: the number of extreme points and zero-crossing points are equal or differ by at most 1; m1 = 0; if yes, stop; if no, proceed to step 216); when the algorithm terminates, n+1 EMD modal components and 1 residual signal are obtained.

[0036] Preferably, step 3) includes step 31) primary reconstruction and step 32) secondary reconstruction.

[0037] Preferably, step 31) a single reconstruction includes:

[0038] 311) The modal components obtained in step 2) (k = 1, 2, …, K) is used as the input vector, denoted as u(g), and the fuzzy entropy of each component is calculated; Construct a set of b-dimensional vectors in sequence. b) Choose 2~5, that is

[0039]

[0040] Where u0(g) is the mean, i.e.

[0041] ;

[0042] 312) Take the vector group Two distinct vectors in (g = 1, 2, …, K-b+1) and Let g1, g2 = 1, 2, …, K-b+1 and g1 ≠ g2. Calculate the vector. and The maximum distance between the two elements, i.e.

[0043]

[0044] 313) Using fuzzy functions To calculate and similarity between ,

[0045]

[0046] Where a is the gradient and s1 is the similarity tolerance;

[0047] 314) Calculate the average membership degree of all members except itself.

[0048]

[0049] 315) Construct a b+1 dimensional vector, that is, replace b in the formula with b+1, to obtain

[0050]

[0051] 316) Define fuzzy entropy as

[0052]

[0053] Since K is a finite number, the above formula can be expressed as:

[0054] ;

[0055] 317) Based on the above steps, calculate each modal component. The fuzzy entropy values ​​are calculated, and intervals are divided according to the order of magnitude of the fuzzy entropy values. Entropy values ​​greater than or equal to 0.5 are considered high-frequency components t1, t2, ..., t3. jIf the entropy value is between [0.2, 0.5), the subsequences are merged into a mid-frequency subsequence M; if the entropy value is less than 0.2, they are merged into a low-frequency subsequence L. This is used to obtain the high-frequency components t1, t2, ..., t... j , mid-frequency subsequence M and low-frequency subsequence L.

[0056] Preferably, step 32) secondary reconstruction includes:

[0057] 321) The high-frequency components t1, t2, ..., t obtained from the first reconstruction are... j As the input vector, denoted as v(l), its sample entropy is calculated; Construct a set of c-dimensional vectors in sequence. c) Choose 1 or 2, with preference given to 2.

[0058]

[0059] 322) Take the vector group Two distinct vectors in (l = 1, 2, …, j-c+1) and Let l1, l2 = 1, 2, …, j-c+1 and l1 ≠ l2. Calculate the vector. and The maximum distance between the two elements, i.e.

[0060]

[0061] 323) Given a similarity tolerance s2 (s2>0), for each value of l, calculate With other vectors besides itself The distance between (p = 1, 2, …, j-c+1 and p ≠ l) ,statistics The number of distances is calculated, and then the ratio of this ratio to the total number of distances jc is denoted as . ,Right now

[0062]

[0063] 324) Calculation average ,Right now

[0064]

[0065] 325) For dimension c+1, that is, replacing c in the formula with c+1, we get

[0066]

[0067] 326) Calculate the sample entropy

[0068]

[0069] Since j is a finite number, the above formula can be expressed as

[0070] ;

[0071] 327) Based on the above steps, calculate the high-frequency components t1, t2, ..., t3. j Based on the sample entropy values, the intervals are divided according to the order of magnitude of the entropy values, and the resulting intervals are merged to obtain the high-frequency subsequences T1, T2, ..., T. o ( o <j )。

[0072] Preferably, step 4) includes:

[0073] 41) Using the attention mechanism, reconstruct the high-frequency subsequences T1, T2, ..., T obtained in step 3). o The mid-frequency subsequence M and the low-frequency subsequence L are used as input quantities, respectively. , … , , The input and the response through the attention mechanism are vectors. , … , , It has the same dimension as the input:

[0074]

[0075] in It is an activation function, specifically using the sigmoid function as the activation function, that is... ; W is the input layer weight matrix, and W is the reservoir weight matrix. The LiESN inputs adjusted by the attention mechanism are as follows:

[0076]

[0077] in Element-level multiplication;

[0078] 42) The steps of using the LiESN algorithm to optimize invasive weeds are as follows:

[0079] 421) Initialize the population. The five parameters that LiESN needs to optimize are spectral radius SR, number of neurons N, input unit scale IS, connection sparsity SD, and embedding dimension q; define the solution space range of the five parameters during initialization.

[0080] 422) Calculate the fitness function for each seed. The fitness function is:

[0081]

[0082] Where len is the length of the water supply time series. and represent the actual water supply data and the predicted water supply data at time w, respectively, and H is the length of the output vector;

[0083] 423) Seeds grow into weeds, and weeds produce new seeds. The number of new seeds produced... for:

[0084]

[0085] floor() is the floor function. , These are the maximum and minimum fitness values ​​in the current population, respectively. , The maximum and minimum number of seeds that a single weed can produce are given, and the offspring spread to the vicinity of the parent in a normal distribution to calculate the new fitness value.

[0086] 424) Determine if the population size has reached the maximum limit. If all weeds are sorted from highest to lowest fitness value, retain the top 5 individuals. When the maximum number of generations is reached, or If the optimization is complete, output the optimal values ​​of these 5 parameters to the LiESN network; otherwise, proceed to steps 423) and 424 again.

[0087] 43) The steps for achieving prediction using the AM-IWO-LiESN echo state network with leakage coefficient optimized by the invading weeds optimization algorithm based on the attention mechanism specifically include the following steps:

[0088] Let the input layer vectors of the network at time t through the attention mechanism be: , … , , The reserve pool vector is The output layer vector is , … , , Then the state equations of the LiESN network's reservoir at time t+1 are as follows:

[0089]

[0090] Where C is the time constant, α is the leakage rate, and ρ is the spectral radius. The activation function of the reservoir is represented; the prediction of the target value at time t+1 using LiESN can be obtained from the following equations:

[0091]

[0092] in, This represents the activation function of the output layer. Using this formula, the predicted values ​​of each reconstructed subsequence can be obtained.

[0093] Preferably, the integration in step 5) refers to integrating the high-frequency subsequences T1, T2, ..., T obtained in step 4). o The predicted values ​​Y1, Y2, ..., Y o The predicted value Y of the intermediate frequency subsequence M M And the predicted value Y of the low-frequency subsequence L L Sum the results to get the final predicted value.

[0094] The beneficial effects of this invention are: This invention uses a prediction method based on a leakage integral reservoir network with secondary mode reconstruction to solve the problem of low accuracy in predicting daily urban water supply. It can accurately predict daily urban water supply and provide a basis and technical support for optimizing urban water supply scheduling decisions. Attached Figure Description

[0095] Figure 1 This is a flowchart illustrating a specific embodiment of the present invention. Detailed Implementation

[0096] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0097] like Figure 1 As shown, a method for predicting water supply in a leakage integral reservoir network based on quadratic mode reconstruction is characterized by the following steps:

[0098] 1) Data collection: Collect historical water supply data of all users in the target area to form a water supply time series x(t); the water supply data x(t) in step 1) is at least one year of daily water supply data.

[0099] 2) The CEEMDAN time series decomposition method is used to decompose the water supply time series x(t) into a series of modal components with different characteristic scales. ; where k = 1, 2, ….

[0100] Step 2) of the CEEMDAN method for time series decomposition of water supply includes the following steps:

[0101] 21) Using the Empirical Mode Decomposition (EMD) algorithm to analyze the signal Perform I-th decomposition, where I ranges from 50 to 100, and calculate the first modal component using the mean:

[0102]

[0103] in For amplitude, This represents the white noise sequence with a standard normal distribution added in the i (i = 1, 2, …, I) experiments. This is the first EMD component obtained in the i-th experiment.

[0104] The empirical mode decomposition method includes the following steps:

[0105] 211) Let the original time series be... ,Sure Connect all local extrema with cubic spline curves to form an upper envelope, and connect all local minima to form a lower envelope. Calculate the average value m1 of the upper and lower envelopes, and then find the difference between the original data and m1. Determine whether h1 satisfies the IMF condition; the IMF condition is that the number of extreme points and zero-crossing points are equal or at most differ by 1 and m1 = 0; if yes, proceed to step 212); if no, proceed to step 213).

[0106] 212) Then h1 is The first IMF component is denoted as c1;

[0107] 213) Using h1 as the original data, proceed to step 211) e (e=1, 2, …) times, until h 1e = h 1(e-1) – m 1e The conditions for satisfying the IMF are: the number of extreme points and the number of zero-crossing points are equal or differ by at most 1; m1 = 0. Where h 1(e-1) For the original data of the e-th repetition process, m 1e Let c1 = h be the average of the upper and lower envelopes of the e-th repetition. 1e Then c1 is a signal The first IMF component;

[0108] 214) Remove c1 from the original time series Subtracting from the middle yields the first residual signal. (Taking r1 as the original data into step 211), we get... The second IMF component c2;

[0109] 215) Subtract c2 from the first residual signal r1 to obtain the second residual signal. (Taking r2 as the original data into step 211), we get... The third IMF component, c3;

[0110] 216) c n From the (n-1)th (n=3, 4, …) residual signal r n-1 Subtracting from the middle yields the nth residual signal. , will r n As the raw data, it enters step 211), and we obtain... The (n+1)th IMF component c n+1 ;

[0111] 217) Determine whether the residual signal is a monotonic function and whether IMFs that meet the following conditions can be extracted: the number of extreme points and zero-crossing points are equal or differ by at most 1; m1 = 0; if yes, stop; if no, proceed to step 216); when the algorithm terminates, n+1 EMD modal components and 1 residual signal are obtained.

[0112] 22) Subtracting from the original time series x(t) yields the first residual signal. Using EMD to analyze signals Perform a first decomposition and obtain the second modal component by calculating the mean:

[0113]

[0114] in This represents the first modal component extracted using the EMD algorithm;

[0115] 23) will From the first margin signal Subtracting from the middle yields the second residual signal. Using EMD to analyze signals Perform two decompositions and obtain the third modal component by calculating the mean:

[0116]

[0117] 24) From the (k-1)th (k=3, 4, …) residual signal Subtracting from the middle, we obtain the k-th residual signal. Using EMD to analyze signals Perform k decompositions and calculate the (k+1)th modal component using the mean:

[0118]

[0119] 25) Determine if the number of extreme points of the residual signal is less than or equal to two. If yes, stop; if no, proceed to step 24).

[0120] When the algorithm terminates, it obtains k+1 modal components and 1 residual signal. Let K = k+1+1, so the original data can be decomposed into K modal components using the CEEMDAN algorithm.

[0121]

[0122] The first K-1 are (k=1,2,…,K-1), where the Kth signal is the margin signal. .

[0123] 3) For modal components Reconstruction is performed by merging different modal components based on their entropy values, and then fusing the common characteristics exhibited by different modes to obtain high-frequency subsequences T1, T2, ..., T. o , mid-frequency subsequence M and low-frequency subsequence L.

[0124] Step 3) includes step 31) a first-stage reconstruction and step 32) a second-stage reconstruction.

[0125] Among them, step 31) a single reconstruction includes:

[0126] 311) The modal components obtained in step 2) (k = 1, 2, …, K) is used as the input vector, denoted as u(g), and the fuzzy entropy of each component is calculated; Construct a set of b-dimensional vectors in sequence. b can be selected from 2 to 5, that is

[0127]

[0128] Where u0(g) is the mean, i.e.

[0129] ;

[0130] 312) Take the vector group Two distinct vectors in (g = 1, 2, …, K-b+1) and Let g1, g2 = 1, 2, …, K-b+1 and g1 ≠ g2. Calculate the vector. and The maximum distance between the two elements, i.e.

[0131]

[0132] 313) Using fuzzy functions To calculate and similarity between ,

[0133]

[0134] Where a is the gradient and s1 is the similarity tolerance;

[0135] 314) Calculate the average membership degree of all members except itself.

[0136]

[0137] 315) Construct a b+1 dimensional vector, that is, replace b in the formula with b+1, to obtain

[0138]

[0139] 316) Define fuzzy entropy as

[0140]

[0141] Since K is a finite number, the above formula can be expressed as:

[0142] ;

[0143] 317) Based on the above steps, calculate each modal component. The fuzzy entropy values ​​are divided into intervals according to their orders of magnitude. Entropy values ​​greater than or equal to 0.5 are considered high-frequency components t1, t2, ..., t... j If the entropy value is between [0.2, 0.5), the subsequences are merged into a mid-frequency subsequence M; if the entropy value is less than 0.2, they are merged into a low-frequency subsequence L. This is used to obtain the high-frequency components t1, t2, ..., t... j , mid-frequency subsequence M and low-frequency subsequence L.

[0144] Step 32) Secondary reconstruction includes:

[0145] 321) The high-frequency components t1, t2, ..., t obtained from the first reconstruction are... j As the input vector, denoted as v(l), its sample entropy is calculated; Construct a set of c-dimensional vectors in sequence. c. Choose 1 or 2, with preference given to 2.

[0146]

[0147] 322) Take the vector group Two distinct vectors in (l = 1, 2, …, j-c+1) and Let l1, l2 = 1, 2, …, j-c+1 and l1 ≠ l2. Calculate the vector. and The maximum distance between the two elements, i.e.

[0148]

[0149] 323) Given a similarity tolerance s2 (s2>0), for each value of l, calculate With other vectors besides itself The distance between (p = 1, 2, …, j-c+1 and p ≠ l) ,statistics The number of distances is calculated, and then the ratio of this ratio to the total number of distances jc is denoted as . ,Right now

[0150]

[0151] 324) Calculation average ,Right now

[0152]

[0153] 325) For dimension c+1, that is, replacing c in the formula with c+1, we get

[0154]

[0155] 326) Calculate the sample entropy

[0156]

[0157] Since j is a finite number, the above formula can be expressed as

[0158] ;

[0159] 327) Based on the above steps, calculate the high-frequency components t1, t2, ..., t3. j Based on the sample entropy values, the intervals are divided according to the order of magnitude of the entropy values, and the resulting intervals are merged to obtain the high-frequency subsequences T1, T2, ..., T. o ( o <j )。

[0160] 4) Reconstruct the high-frequency subsequences T1, T2, ..., T1 obtained in step 3) respectively. oThe mid-frequency subsequence M and the low-frequency subsequence L are used as inputs to an echo state network with leakage coefficients, optimized using an intrusive weeds optimization algorithm based on an attention mechanism, to obtain the high-frequency subsequences T1, T2, ..., T. o The predicted values ​​Y1, Y2, ..., Y o The predicted value Y of the intermediate frequency subsequence M M And the predicted value Y of the low-frequency subsequence L L Specifically, it includes the following steps:

[0161] 41) Using the attention mechanism, reconstruct the high-frequency subsequences T1, T2, ..., T obtained in step 3). o The mid-frequency subsequence M and the low-frequency subsequence L are used as input quantities, respectively. , … , , The input and the response through the attention mechanism are vectors. , … , , It has the same dimension as the input:

[0162]

[0163] in It is an activation function, specifically using the sigmoid function as the activation function, that is... ; W is the input layer weight matrix, and W is the reservoir weight matrix. The LiESN inputs adjusted by the attention mechanism are as follows:

[0164]

[0165] in Element-level multiplication;

[0166] 42) The steps of using the LiESN algorithm to optimize invasive weeds are as follows:

[0167] 421) Initialize the population. The five parameters that LiESN needs to optimize are spectral radius SR, number of neurons N, input unit scale IS, connection sparsity SD, and embedding dimension q; define the solution space range of the five parameters during initialization.

[0168] 422) Calculate the fitness function for each seed. The fitness function is:

[0169]

[0170] Where len is the length of the water supply time series. and represent the actual water supply data and the predicted water supply data at time w, respectively, and H is the length of the output vector;

[0171] 423) Seeds grow into weeds, and weeds produce new seeds. The number of new seeds produced... for:

[0172]

[0173] floor() is the floor function. , These are the maximum and minimum fitness values ​​in the current population, respectively. , The maximum and minimum number of seeds that a single weed can produce are given, and the offspring spread to the vicinity of the parent in a normal distribution to calculate the new fitness value.

[0174] 424) Determine if the population size has reached the maximum limit. If all weeds are sorted from highest to lowest fitness value, retain the top 5 individuals. When the maximum number of generations is reached, or If the optimization is complete, output the optimal values ​​of these 5 parameters to the LiESN network; otherwise, proceed to steps 423) and 424 again.

[0175] 43) The steps for achieving prediction using the AM-IWO-LiESN echo state network with leakage coefficient optimized by the invading weeds optimization algorithm based on the attention mechanism specifically include the following steps:

[0176] Let the input layer vectors of the network at time t through the attention mechanism be: , … , , The reserve pool vector is The output layer vector is , … , , Then the state equations of the LiESN network's reservoir at time t+1 are as follows:

[0177]

[0178] Where C is the time constant, α is the leakage rate, and ρ is the spectral radius. The activation function of the reservoir is represented; the prediction of the target value at time t+1 using LiESN can be obtained from the following equations:

[0179]

[0180] in, This represents the activation function of the output layer. Using this formula, the predicted values ​​of each reconstructed subsequence can be obtained.

[0181] 5) Integrate the prediction results obtained from each subsequence to obtain the final prediction result.

[0182] Specifically, this refers to the high-frequency subsequences T1, T2, ..., T obtained in step 4). o The predicted values ​​Y1, Y2, ..., Y o The predicted value Y of the intermediate frequency subsequence M M And the predicted value Y of the low-frequency subsequence L L Sum the results to get the final predicted value.

[0183] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.

Claims

1. A method for predicting water supply in a leakage integral reservoir network based on quadratic mode reconstruction, characterized by: Includes the following steps: 1) Data collection: Collect historical water supply data for all users in the target area to form a water supply time series x(t); 2) The CEEMDAN time series decomposition method is used to decompose the water supply time series x(t) into a series of modal components with different characteristic scales. Where k = 1, 2, …; 3) For modal components Reconstruction is performed by merging different modal components based on their entropy values, and then fusing the common characteristics exhibited by different modes to obtain high-frequency subsequences T1, T2, ..., T. o The mid-frequency subsequence M and the low-frequency subsequence L; 4) Reconstruct the high-frequency subsequences T1, T2, ..., T1 obtained in step 3) respectively. o The mid-frequency subsequence M and the low-frequency subsequence L are used as inputs to an echo state network with leakage coefficients, optimized using an intrusive weeds optimization algorithm based on an attention mechanism, to obtain the high-frequency subsequences T1, T2, ..., T. o The predicted values ​​Y1, Y2, ..., Y o The predicted value Y of the intermediate frequency subsequence M M And the predicted value Y of the low-frequency subsequence L L ; 5) Integrate the prediction results obtained from each subsequence to obtain the final prediction result; Step 3) includes step 31) primary reconstruction and step 32) secondary reconstruction; Step 31) One reconstruction includes: 311) The modal components obtained in step 2) (k = 1, 2, …, K) is used as the input vector, denoted as u(g), and the fuzzy entropy of each component is calculated; Construct a set of b-dimensional vectors in sequence. b can be selected from 2 to 5, that is Where u0(g) is the mean, i.e. ; 312) Take the vector group Two distinct vectors in (g = 1, 2, …, K-b+1) and Let g1, g2 = 1, 2, …, K-b+1 and g1 ≠ g2. Calculate the vector. and The maximum distance between the two elements, i.e. 313) Using fuzzy functions To calculate and similarity between , Where a is the gradient and s1 is the similarity tolerance; 314) Calculate the average membership degree of all members except itself. 315) Construct a b+1 dimensional vector, that is, replace b in the formula with b+1, to obtain 316) Define fuzzy entropy as Since K is a finite number, the above formula can be expressed as: ; 317) Based on the above steps, calculate each modal component. The fuzzy entropy values ​​are divided into intervals according to their orders of magnitude. Entropy values ​​greater than or equal to 0.5 are considered high-frequency components t1, t2, ..., t... j If the entropy value is between [0.2, 0.5), the subsequences are merged into a mid-frequency subsequence M; if the entropy value is less than 0.2, the subsequences are merged into a low-frequency subsequence L. This is used to obtain the high-frequency components t1, t2, ..., t... j The mid-frequency subsequence M and the low-frequency subsequence L; Step 32) Secondary reconstruction includes: 321) The high-frequency components t1, t2, ..., t obtained from the first reconstruction are... j As the input vector, denoted as v(l), its sample entropy is calculated; Construct a set of c-dimensional vectors in sequence. c can be either 1 or 2, that is 322) Take the vector group Two distinct vectors in (l = 1, 2, …, j-c+1) and Let l1, l2 = 1, 2, …, j-c+1 and l1 ≠ l2. Calculate the vector. and The maximum distance between the two elements, i.e. 323) Given a similarity tolerance s2 (s2>0), for each value of l, calculate With other vectors besides itself The distance between (p = 1, 2, …, j-c+1 and p ≠ l) ,statistics The number of distances is calculated, and then the ratio of this ratio to the total number of distances jc is denoted as . ,Right now 324) Calculation average ,Right now 325) For dimension c+1, that is, replacing c in the formula with c+1, we get 326) Calculate the sample entropy Since j is a finite number, the above formula can be expressed as ; 327) Based on the above steps, calculate the high-frequency components t1, t2, ..., t3. j The sample entropy values ​​are used to divide the data into intervals according to their order of magnitude, and then merged to obtain high-frequency subsequences T1, T2, ..., T. o ( o <j )。 2. The water supply prediction method for a leakage integral reservoir network based on quadratic mode reconstruction as described in claim 1, characterized in that: In step 1), the water supply time series x(t) is at least one year's worth of daily water supply data.

3. The water supply prediction method for a leakage integral reservoir network based on quadratic mode reconstruction as described in claim 1, characterized in that, In step 2), the CEEMDAN method for time series decomposition of water supply includes the following steps: 21) Using the Empirical Mode Decomposition (EMD) algorithm to analyze the signal Perform I-th decomposition, where I ranges from 50 to 100, and obtain the first modal component by calculating the mean: in For amplitude, This represents the white noise sequence with a standard normal distribution added in the i (i = 1, 2, …, I) experiments. This is the first EMD component obtained in the i-th experiment; 22) Subtracting from the original time series x(t) yields the first residual signal. Using EMD to analyze signals Perform a first decomposition and obtain the second modal component by calculating the mean: in This represents the first modal component extracted using the EMD algorithm; 23) will From the first margin signal Subtracting from the middle yields the second residual signal. Using EMD to analyze signals Perform two decompositions and obtain the third modal component by calculating the mean: 24) From the (k-1)th (k=3, 4, …) residual signal Subtracting from the middle, we obtain the k-th residual signal. Using EMD to analyze signals Perform k decompositions and calculate the (k+1)th modal component using the mean: 25) Determine if the number of extreme points of the residual signal is less than or equal to two. If yes, stop; if no, proceed to step 24). When the algorithm terminates, it obtains k+1 modal components and 1 residual signal. Let K = k+1+1, so the original data can be decomposed into K modal components using the CEEMDAN algorithm. The first K-1 are (k=1, 2, …, K-1), where the Kth signal is the margin signal. .

4. The water supply prediction method for a leakage integral reservoir network based on quadratic mode reconstruction as described in claim 3, characterized in that, The empirical mode decomposition method includes the following steps: 211) Let the original time series be... ,Sure Connect all local extrema with cubic spline curves to form an upper envelope, and connect all local minima to form a lower envelope. Calculate the average value m1 of the upper and lower envelopes, and then find the difference between the original data and m1. Determine whether h1 satisfies the IMF condition; the IMF condition is that the number of extreme points and zero-crossing points are equal or at most differ by 1 and m1 = 0; if yes, proceed to step 212); if no, proceed to step 213). 212) Then h1 is The first IMF component is denoted as c1; 213) Using h1 as the original data, proceed to step 211) e (e=1, 2, …) times, until h 1e = h 1(e-1) – m 1e The conditions for satisfying the IMF are: the number of extreme points and the number of zero-crossing points are equal or differ by at most 1; m1 = 0; where h 1(e-1) For the original data of the e-th repetition process, m 1e Let c1 = h be the average of the upper and lower envelopes of the e-th repetition. 1e Then c1 is a signal The first IMF component; 214) Remove c1 from the original time series Subtracting from the middle yields the first residual signal. (Taking r1 as the original data into step 211), we get... The second IMF component c2; 215) Subtract c2 from the first residual signal r1 to obtain the second residual signal. (Taking r2 as the original data into step 211), we get... The third IMF component, c3; 216) c n From the (n-1)th (n=3, 4, …) residual signal r n-1 Subtracting from the middle yields the nth residual signal. , will r n As the raw data, it enters step 211), and we obtain... The (n+1)th IMF component c n+1 ; 217) Determine whether the residual signal is a monotonic function and whether IMFs that meet the following conditions can be extracted: the number of extreme points and zero-crossing points are equal or differ by at most 1; m1 = 0; if yes, stop; if no, proceed to step 216); when the algorithm terminates, n+1 EMD modal components and 1 residual signal are obtained.

5. The water supply prediction method for a leakage integral reservoir network based on quadratic mode reconstruction as described in claim 1, characterized in that, Step 4) includes: 41) Using the attention mechanism, reconstruct the high-frequency subsequences T1, T2, ..., T obtained in step 3). o The mid-frequency subsequence M and the low-frequency subsequence L are used as input quantities, respectively. , … , , The input and the response through the attention mechanism are vectors. , … , , It has the same dimension as the input: in It is an activation function, specifically using the sigmoid function as the activation function, that is... ; W is the input layer weight matrix, and W is the reservoir weight matrix. The LiESN inputs adjusted by the attention mechanism are as follows: in Element-level multiplication; 42) The steps of using the LiESN algorithm to optimize invasive weeds are as follows: 421) Initialize the population. The five parameters that LiESN needs to optimize are spectral radius SR, number of neurons N, input unit scale IS, connection sparsity SD, and embedding dimension q; define the solution space range of the five parameters during initialization. 422) Calculate the fitness function for each seed. The fitness function is: Where len is the length of the water supply time series. and represent the actual water supply data and the predicted water supply data at time w, respectively, and H is the length of the output vector; 423) Seeds grow into weeds, and weeds produce new seeds. The number of new seeds produced... for: floor() is the floor function. , These are the maximum and minimum fitness values ​​in the current population, respectively. , The maximum and minimum number of seeds that a single weed can produce are given, and the offspring spread to the vicinity of the parent in a normal distribution to calculate the new fitness value. 424) Determine if the population size has reached the maximum limit. If all weeds are sorted from highest to lowest fitness value, retain the top 5 individuals. When the maximum number of generations is reached, or If the optimization is complete, output the optimal values ​​of these 5 parameters to the LiESN network; otherwise, proceed to steps 423) and 424 again. 43) The steps for achieving prediction using the AM-IWO-LiESN echo state network with leakage coefficient optimized by the invading weeds optimization algorithm based on the attention mechanism specifically include the following steps: Let the input layer vectors of the network at time t through the attention mechanism be: , … , , The reserve pool vector is The output layer vector is , … , , Then the state equations of the LiESN network's reservoir at time t+1 are as follows: Where C is the time constant, α is the leakage rate, and ρ is the spectral radius. The activation function of the reservoir is represented; the prediction of the target value at time t+1 using LiESN can be obtained from the following equations: in, This represents the activation function of the output layer. Using this formula, we can obtain the predicted values ​​of each subsequence obtained from the reconstruction.

6. The water supply prediction method for a leakage integral reservoir network based on quadratic mode reconstruction as described in claim 1, characterized in that, The integration in step 5) refers to combining the high-frequency subsequences T1, T2, ..., T obtained in step 4). o The predicted values ​​Y1, Y2, ..., Y o The predicted value Y of the intermediate frequency subsequence M M And the predicted value Y of the low-frequency subsequence L L Sum the results to get the final predicted value.