A saltwater tide upstream ensemble forecasting method and system based on classification regression analysis
Through the method based on classification regression analysis, the optimal delay time of the influencing factor data is obtained and the salt tide upward ensemble forecast model is constructed, which solves the problems of high cost of salt tide upward prediction and unsatisfactory results in the existing technology, and achieves higher prediction stability and accuracy.
Patent Information
- Application Number
- CN202410444987.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-15
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-04-15
AI Technical Summary
The existing salt tide traceability prediction methods have high cost and unsatisfactory results, and most of them only consider a single machine learning method, which fails to effectively utilize the optimal time delay of the influencing factor.
A salt tide upward ensemble forecasting method based on classification regression analysis is proposed. By obtaining the actual measured saltiness data and impact factor data of the target site, the optimal delay time of the impact factor data is obtained based on the machine learning algorithm, and a salt tide upward ensemble forecasting model is constructed for prediction.
It improves the stability and accuracy of salt tide trace prediction, can more effectively use historical data for prediction, and integrates multiple machine learning methods to improve the reliability of prediction results.
Smart Images

Figure CN118468689B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of saltwater tide upstream forecasting, and in particular to a saltwater tide upstream ensemble forecasting method and system based on classification regression analysis. Background Art
[0002] At present, the prediction and forecasting methods of saltwater tide mainly include physical experimental observation, numerical model calculation and empirical statistical analysis. However, physical experiments require specific experimental facilities and equipment, which are costly, and sometimes it is difficult to fully reproduce the complex factors under natural conditions. The experimental results may differ from the actual situation due to factors such as model scale and boundary condition setting. The numerical model calculation and empirical statistical analysis calculation process require high-performance computers, which are costly. In addition, the existing regression analysis or machine learning algorithms are often used to seek empirical relationships to realize the upstream prediction of saltwater tide. However, most of them only consider a single machine learning method, and do not consider finding the optimal time lag of each influencing factor, resulting in unsatisfactory final analysis results.
[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a saltwater tide upstream ensemble forecasting method and system based on classification regression analysis, which can effectively use historical data to predict future saltwater tide conditions and thus improve the stability and accuracy of saltwater tide upstream prediction.
[0005] To achieve the above purpose, an embodiment of the present application proposes a saltwater tide upstream ensemble forecasting method based on classification regression analysis, the method comprising:
[0006] Obtaining measured water inlet salinity data of a target site and influencing factor data of the target site, wherein the influencing factor data includes flow influencing factor, tide level influencing factor and wind influencing factor;
[0007] Based on a machine learning algorithm, obtaining an optimal lag time for the impact factor data;
[0008] According to the optimal lag time of the influencing factor data and the measured water intake salinity data of the target site, the water intake salinity exceeding the standard is predicted by a classification prediction model to obtain a prediction result;
[0009] A saltwater upstream ensemble forecasting model is constructed to perform forecast processing on the forecast results to obtain the salinity forecast value of the water intake of the target site.
[0010] In some embodiments, the obtaining of the optimal lag time of the impact factor data based on a machine learning algorithm includes:
[0011] Obtaining an optimal lag data set of the impact factor data;
[0012] A random forest machine learning algorithm is selected to construct a saltwater tide prediction model and a prediction process is performed on the time-lag data set of the influencing factor data to obtain a predicted value of the salinity of the water intake;
[0013] Iteratively optimizing the saltwater tide prediction model according to the difference between the predicted value of the water intake salinity and the measured water intake salinity data of the target site, and selecting the optimal saltwater tide prediction model;
[0014] Based on the optimal saltwater tide prediction model, the optimal lag of the influencing factor data is outputted corresponding to the lag data set of the influencing factor data.
[0015] In some embodiments, the obtaining of the optimal lag data set of the impact factor data includes:
[0016] Set the hysteresis search range;
[0017] The flow influencing factor and the tide influencing factor are fixed, and the wind influencing factor is sequentially changed with a lag based on the lag search range, and the performance index of the saltwater tide prediction model under different lags is evaluated, and the lag corresponding to the optimal index model is selected to obtain the current optimal wind influencing factor feature set;
[0018] The flow influencing factor is fixed, combined with the current optimal wind influencing factor feature set, the tidal level influencing factor is sequentially changed with a lag based on the lag search range, and the performance index of the saltwater tide prediction model under different lags is evaluated, and the lag corresponding to the optimal index model is selected to obtain the current optimal tidal level influencing factor feature set;
[0019] Based on the current optimal wind influencing factor feature set and the current optimal tide influencing factor feature set, the flow influencing factor is sequentially changed with a lag according to the lag search range, and the performance index of the saltwater tide prediction model under different lags is evaluated, and the lag corresponding to the optimal index model is selected to obtain the current optimal flow influencing factor feature set;
[0020] Based on the current optimal wind influence factor feature set, the current optimal tidal influence factor feature set and the current optimal flow influence factor feature set, the above step of obtaining the current optimal influence factor feature set is repeated until a preset termination iteration loop condition is met, and the wind influence factor feature set, the tidal influence factor feature set and the flow influence factor feature set are output;
[0021] The wind influencing factor feature set, the tidal level influencing factor feature set and the flow influencing factor feature set are integrated to obtain an optimal time-lag data set of the influencing factor data.
[0022] In some embodiments, the expression for the predicted value of the water intake salinity is specifically as follows:
[0023]
[0024] In the above formula, represents the predicted value of water intake salinity, D(T) represents the time-lag data set of influencing factor data, represents the feature set of traffic influencing factors, represents the characteristic set of tide level influencing factors, represents the characteristic set of wind influencing factors, and h(·) represents the relationship function between salinity prediction and influencing factors.
[0025] In some embodiments, the expression of the long sequence data of the water intake of the target site is specifically as follows:
[0026]
[0027] In the above formula, Y represents the long sequence classification data of the water intake salinity of the target site, Y i It represents the measured salinity value of the target site, and n represents the total number of long sequence data of the water intake.
[0028] In some embodiments, the step of constructing a saltwater upstream ensemble forecasting model to perform forecast processing on the forecast results to obtain a forecast value of the water intake salinity of the target site includes:
[0029] Selecting a machine learning prediction model for saltwater tide upstream based on a machine learning method, wherein the machine learning prediction model includes a discrete wavelet transform model, an artificial neural network model, a support vector machine model, and a random forest algorithm model;
[0030] Selecting the long sequence classification data of the water intake salinity of the target site to obtain the salt tide upstream data set;
[0031] Inputting the saltwater tide tracing data set into the machine learning prediction model, and performing a performance evaluation on the machine learning prediction model by a cross-validation method to obtain an evaluation result;
[0032] Based on the evaluation results, the machine learning prediction model with the best performance in the evaluation results is selected as the saltwater upstream classification prediction model;
[0033] Based on the saltwater tide upstream classification forecast model, the saltwater tide upstream data set is classified and processed to obtain the excessive salinity of the water intake at the target site;
[0034] According to the excessive salinity of the water intake at the target site and the machine learning prediction model, the optimal lag data set of the influencing factor data is introduced to construct a saltwater tide retrogression regression prediction model;
[0035] Based on the evaluation results, the saltwater tide upstream regression prediction model is weighted by using the Bayesian average method to construct a saltwater tide upstream ensemble prediction model;
[0036] The forecast result is forecasted based on the saltwater upstream ensemble forecast model to obtain a predicted value of salinity at the water intake of the target site.
[0037] In some embodiments, based on the evaluation result, the saltwater tide upward regression prediction model is weighted by a Bayesian average method to construct a saltwater tide upward ensemble prediction model, including:
[0038] Select the data set corresponding to the value 1 in the long sequence data of the water intake of the target site to obtain the excessive salt tide upstream data set;
[0039] The excessive saltwater tide tracing data set is input into the machine learning prediction model, and the performance of the saltwater tide tracing regression prediction model is evaluated by cross-validation method to obtain an evaluation result;
[0040] Based on the evaluation result, obtaining the prior probability of the saltwater tide upward regression prediction model and the likelihood function of the saltwater tide upward regression prediction model;
[0041] According to the prior probability of the saltwater tide upward regression prediction model and the likelihood function of the saltwater tide upward regression prediction model, the posterior probability of the saltwater tide upward regression prediction model is obtained by using the Bayesian average method;
[0042] Normalizing the posterior probability of the saltwater tide upward regression prediction model to obtain the weight of the saltwater tide upward regression prediction model;
[0043] The saltwater tide upstream regression prediction model is combined according to the weights to obtain the saltwater tide upstream ensemble prediction model.
[0044] In some embodiments, the expression of the prior probability of the regression prediction model is specifically as follows:
[0045]
[0046] In the above formula, p(m i ) represents the prior probability of the regression prediction model, perf i Represents the performance index evaluation result of the regression prediction model, m i represents the i-th regression prediction model, and M represents the total number of models.
[0047] In some embodiments, the expression of the saltwater upstream ensemble forecast model is specifically as follows:
[0048]
[0049] In the above formula, F represents the predicted value of the saltwater upstream ensemble forecast model, F(m i ) represents the predicted value of the i-th regression prediction model, w i Represents the weight of the i-th regression prediction model.
[0050] To achieve the above object, another aspect of the embodiment of the present application proposes a saltwater tide upstream ensemble forecasting system based on classification regression analysis, the system comprising:
[0051] The first module is used to obtain the measured water intake salinity data of the target site and the influencing factor data of the target site, wherein the influencing factor data includes flow influencing factor, tide level influencing factor and wind influencing factor;
[0052] The second module is used to obtain the optimal lag time of the impact factor data based on a machine learning algorithm;
[0053] The third module is used to predict the excessive salinity of the water intake through a classification prediction model according to the optimal lag time of the influencing factor data and the measured water intake salinity data of the target site, and obtain a prediction result;
[0054] The fourth module is used to construct a saltwater upstream ensemble forecast model to perform forecast processing on the forecast results to obtain the salinity forecast value of the water intake of the target site.
[0055] The embodiments of the present application include at least the following beneficial effects: The present application provides a saltwater tide upstream ensemble forecasting method and system based on classification regression analysis. The scheme obtains the measured water intake salinity data of the target site and the influencing factor data of the target site, and further obtains the optimal lag of the influencing factor data based on a machine learning algorithm, that is, the optimal time difference between the influencing factor and the salinity of the water intake. It can more effectively use historical data to predict future saltwater tide conditions. According to the optimal lag of the influencing factor data and the measured water intake salinity data of the target site, a saltwater tide upstream ensemble forecasting model is constructed to forecast the long sequence data of the water intake of the target site, and multiple machine learning methods are integrated to establish an ensemble forecasting model. At the same time, the classification problem of whether the water intake can draw water and the specific salinity level are considered. By establishing a machine learning classification model and a regression model, more comprehensive forecasting information is provided, and the stability and accuracy of the forecast are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a flow chart of a saltwater tide upstream ensemble forecasting method based on classification regression analysis provided in an embodiment of the present application;
[0057] Figure 2It is a structural schematic diagram of a saltwater upstream ensemble forecasting system based on classification regression analysis provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of systems and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0059] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0060] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0062] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0063] Salt tide, also known as salt tide upstream or salt water intrusion, when the flow of rivers flowing into the sea is not enough to resist the tidal force, seawater will flow back into the estuary, causing the water in the upstream river to become salty and form a salt tide. When the salinity of the water source at the water intake is greater than 250 mg / L, the water intake will not be able to take water. This situation occurs more frequently in the dry season. The upstream of the salt tide poses a serious threat to the water supply security of the estuary city. Accurate salt tide upstream prediction and forecasting is crucial to the water supply security of coastal cities. At present, the prediction and forecasting methods of salt tide mainly include physical experimental observation, numerical model calculation and empirical statistical analysis. Physical experiments simulate natural conditions and observe salt tide phenomena in a controlled environment, which helps to intuitively understand the mechanism and process of salt tide generation. Experiments can be repeated to verify the reliability of the results. However, physical experiments require specific experimental facilities and equipment, which are costly, and sometimes it is difficult to fully reproduce the complex factors under natural conditions. The experimental results may differ from the actual situation due to factors such as model scale and boundary condition setting. Numerical models can be run on computers, taking into account a variety of environmental factors (such as topography, hydrology, meteorology, etc.), and can provide more detailed and dynamic prediction results with strong flexibility and adjustability. However, the establishment and operation of numerical models rely on a large amount of actual observation data, including topography, hydrology, tide level and water salinity. Building an accurate and effective numerical model requires a lot of professional knowledge and experience. The model is difficult to promote quickly, and the calculation process requires high-performance computers, which is costly. Statistical analysis is generally based on historical observation data to construct an empirical relationship between the salinity of the water intake and influencing factors such as upstream runoff, tide level, wind speed, etc., to find out the laws and trends of saltwater tides, and then predict possible future situations through the observed values of the current influencing factors.
[0064] At present, regression analysis or machine learning algorithms are often used to seek empirical relationships to achieve saltwater tide upstream prediction, such as discrete wavelet transform (DWT), artificial neural network (ANN), support vector machine (SVM), random forest (RF), etc. These methods are simple and easy to use and do not require complex equipment and technology, but different types of statistical analysis methods have different characteristics, resulting in a certain degree of uncertainty in the type of statistical method. However, there are still the following problems in the statistical model. First, whether the water intake can draw water usually only needs to judge whether the salinity of the water source exceeds 250mg / L, but general empirical statistical analysis only focuses on salinity prediction, and does not consider whether the water intake can draw water (whether the salinity is greater than 250mg / L). The influence of various influencing factors on whether to draw water is not considered sufficiently; second, the impact of factors such as runoff from upstream hydrological stations and tidal levels at offshore tidal stations on the observed salinity of a specific water intake has a certain time lag in physical laws, but general empirical statistical analysis does not consider finding the optimal time lag for each influencing factor, and its analysis effect is greatly reduced; third, different machine learning algorithms have different evaluation and prediction effects for different time steps or different influencing factors. In some cases, one of them predicts very well, while the other may predict very poorly. General empirical statistical analysis only uses a certain machine learning algorithm, and its prediction results may be good in some cases and very poor in some cases. There is a certain uncertainty in the selection of statistical analysis methods.
[0065] Based on this, the embodiment of the present invention can more effectively capture the relationship between influencing factors and water intake conditions by determining the optimal lag time. Based on the classification regression model, it fully considers the impact of each influencing factor on whether water is taken or not, and integrates multiple machine learning methods to establish an ensemble prediction model to improve the stability and accuracy of the prediction.
[0066] Reference Figure 1 , Figure 1 A flow chart of a saltwater tide upstream ensemble forecasting method based on classification regression analysis provided by an embodiment of the present invention, referring to Figure 1 , the method comprises the following steps:
[0067] S100, obtaining measured water inlet salinity data of a target site and influencing factor data of the target site, wherein the influencing factor data includes flow influencing factor, tide level influencing factor and wind influencing factor;
[0068] It should be noted that in some specific embodiments, data collection and preprocessing are first performed to collect and obtain the measured runoff data of the upstream station of the river where the target station is located at the same period, and the measured tide level, wind speed and direction data of other related stations. The data is preprocessed, including cleaning outliers, filling missing values, normalization, etc.
[0069] S200, based on machine learning algorithm, obtains the optimal lag time of impact factor data;
[0070] It should be noted that, in some embodiments, step S200 may include: S210, obtaining the optimal lag data set of the influencing factor data; S220, selecting a random forest machine learning algorithm to construct a saltwater tide prediction model and performing predictive processing on the lag data set of the influencing factor data to obtain a predicted value of the salinity of the water intake; S230, iteratively optimizing the saltwater tide prediction model according to the difference between the predicted value of the salinity of the water intake and the measured salinity data of the water intake of the target site, and selecting the optimal saltwater tide prediction model; S240, based on the optimal saltwater tide prediction model, corresponding to the lag data set of the influencing factor data, outputting the optimal lag of the influencing factor data.
[0071] Among them, it should be noted that, in some embodiments, step S210 may include: S211, setting a hysteresis search range; S212, fixing the flow influence factor and the tidal influence factor, and changing the hysteresis of the wind influence factor in sequence based on the hysteresis search range, and evaluating the performance indicators of the saltwater tide prediction model under different hysteresis times, selecting the hysteresis corresponding to the optimal indicator model, and obtaining the current optimal wind influence factor feature set; S213, fixing the flow influence factor, combining the current optimal wind influence factor feature set, and changing the hysteresis of the tidal influence factor in sequence based on the hysteresis search range, and evaluating the performance indicators of the saltwater tide prediction model under different hysteresis times, selecting the hysteresis corresponding to the optimal indicator model, and obtaining the current optimal tidal influence factor feature set; S214, based on the current optimal wind influence factor feature set and the current optimal tidal influence factor feature set, according to the lag search range, the flow influence factor is changed in sequence with a lag, and the performance index of the saltwater tide prediction model under different lags is evaluated, and the lag corresponding to the optimal index model is selected to obtain the current optimal flow influence factor feature set; S215, based on the current optimal wind influence factor feature set, the current optimal tidal influence factor feature set and the current optimal flow influence factor feature set, the above-mentioned steps of obtaining the current optimal influence factor feature set are repeated until the preset termination iteration loop condition is met, and the wind influence factor feature set, the tidal influence factor feature set and the flow influence factor feature set are output; S216, the wind influence factor feature set, the tidal influence factor feature set and the flow influence factor feature set are integrated to obtain the optimal lag data set of the influence factor data.
[0072] In some specific embodiments, a machine learning model is first constructed. Upstream flow, tide level, and wind force (wind direction and wind speed) influencing factors are used as model inputs, and water intake salinity data is used as model output to establish discrete wavelet transform (DWT), artificial neural network (ANN), support vector machine (SVM), and random forest (RF) machine models.
[0073] Furthermore, search for the optimal time delay. Optimize and determine the optimal time delay of the impact of upstream flow, tide level, wind force (wind direction and wind speed) on the salinity of water intake at the target site, that is, determine the optimal time difference between the impact factor and the salinity of water intake at the target site. Propose different time delays, obtain data sets corresponding to different time delays, input the corresponding data sets into the machine learning model, and select the optimal time delay through the size of the model accuracy evaluation index. The specific steps are as follows:
[0074] 1) Set the lag range. According to experience and actual conditions, set a reasonable lag time range and set a lag search range for each influencing factor. Let T be the lag time. According to experience, it can be set to T = [0,7]. If T = 7, the characteristic value of the upstream flow will be 7 days ahead of the salinity data of the target site. D(T) is the feature set of the influencing factor corresponding to the lag time T. The expression of the feature set of the influencing factor is:
[0075]
[0076] In the above formula, Indicates the initial lag time corresponding to the flow influencing factor Datasets, Indicates the initial lag time corresponding to the tide level influencing factor Datasets, Indicates the initial lag time corresponding to the wind force impact factor data set, D(T) represents the feature set of influencing factors corresponding to lag T.
[0077] 2) Iteratively obtain the lag data set of the influencing factor data. For the first iteration, first fix the initial lag time of the tide factor Z and the wind factor W. The hysteresis of sequentially changing flow rate Q Obtain the influencing factor feature set after the lag effect. After the model is established, the lag corresponding to the optimal indicator is selected as the optimal lag of the current iterative flow Q by evaluating the model performance. Its expression is:
[0078]
[0079] The lag time of the fixed flow factor Q is the optimal lag time of the current iteration obtained in the previous step and the initial lag of the wind factor W The hysteresis of the tide factor Z changes successively Obtain the characteristic set of influencing factors after the hysteresis effect. After establishing the model, the hysteresis corresponding to the optimal indicator is selected as the optimal hysteresis of the current iterative tide level Z by evaluating the model performance. Its expression is:
[0080]
[0081] The lag time of the fixed flow factor Q and tide level factor Z is the optimal lag time of the current iteration obtained in the previous two steps. The hysteresis of the wind force factor W changes successively Obtain the influencing factor feature set after the lag effect. After the model is established, the lag corresponding to the optimal indicator is selected as the optimal lag of the current iterative wind force W by evaluating the model performance. Its expression is:
[0082]
[0083] 3) Repeat the above process for the nth iteration (n = 1, 2, ..., N), first fix the lag time of the tide level factor Z and the wind force factor W to the optimal lag time obtained in the previous iteration. The hysteresis of sequentially changing flow rate Q Obtain the influencing factor feature set after the lag effect. After the model is established, the lag corresponding to the optimal indicator is selected as the optimal lag of the current iterative flow Q by evaluating the model performance. Its expression is:
[0084]
[0085] The lag time of the fixed flow factor Q is the optimal lag time of the current iteration obtained in the previous step The lag time of the wind factor W is the optimal lag time obtained in the previous iteration The hysteresis of the tide factor Z changes successively Obtain the characteristic set of influencing factors after the hysteresis effect. After establishing the model, the hysteresis corresponding to the optimal indicator is selected as the optimal hysteresis of the current iterative tide level Z by evaluating the model performance. Its expression is:
[0086]
[0087] The lag time of the fixed flow factor Q and tide level factor Z is the optimal lag time of the current iteration obtained in the previous two steps. The hysteresis of sequentially changing wind factor W Obtain the influencing factor feature set after the lag effect. After the model is established, the lag corresponding to the optimal indicator is selected as the optimal lag of the current iterative wind force W by evaluating the model performance. Its expression is:
[0088]
[0089] 4) The model performance evaluation process is as follows: based on different lags, the corresponding lag data set D(T) is obtained, the random forest machine learning algorithm is selected to construct a saltwater tide prediction model, and the predicted values of the salinity of the water intake are predicted respectively.
[0090]
[0091] In the above formula, represents the predicted value of water intake salinity, D(T) represents the time-lag data set of influencing factor data, represents the feature set of traffic influencing factors, represents the characteristic set of tide level influencing factors, represents the characteristic set of wind influencing factors, and h(·) represents the relationship function between salinity prediction and influencing factors.
[0092] Select the model accuracy evaluation index, such as the determination coefficient R 2 , mean square error (MSE), mean absolute error (MAE), deviation (BIAS), etc., according to the salinity prediction values and actual salinity observation values corresponding to different lags, calculate the size of each accuracy evaluation index under different lag conditions, so as to evaluate the impact of different lags, and select the lag corresponding to the Pareto optimal solution as the optimal lag.
[0093] Among them, the coefficient of determination R 2 , mean square error MSE, mean absolute error MAE and deviation BIAS are shown as follows:
[0094]
[0095]
[0096]
[0097]
[0098] Among them, SSR represents the regression sum of squares, SST represents the total sum of squares; Y i represents the i-th observed value of water salinity at the target site, represents the i-th predicted value of the water salinity at the target site, R 2 represents the coefficient of determination function, MSE represents the mean square error function, MAE represents the mean absolute error function, and BIAS represents the bias function.
[0099] Coefficient of determination R 2 The closer it is to 1, the closer the mean square error (MSE) is to 0, and the smaller the mean absolute error (MAE), which means that the corresponding lagged model fits the observed data better and the prediction accuracy is higher.
[0100] 5) Confirm the optimal lag time and repeat the above iterative process until the optimal lag time before and after two iterations is consistent, that is:
[0101]
[0102]
[0103]
[0104] Through the above iterative process, the optimal lag time is found for each influencing factor, ensuring that the optimal lag time of each factor is the optimal choice under the current optimal lag time state of other factors, thus getting closer to the global optimal solution.
[0105] S300, predicting the salinity exceeding the standard at the water intake through a classification prediction model according to the optimal lag time of the influencing factor data and the measured water intake salinity data of the target site, and obtaining a prediction result;
[0106] It should be noted that in some specific embodiments, a 0-1 classification prediction model based on machine learning is constructed to determine whether water can be drawn from the target water intake point. The corresponding target site measured salinity value, and the classification is performed according to salinity ≥ 250mg / L. If the salinity is ≥ 250mg / L, the value is assigned to 1, indicating that there is a salt tide upstream and water cannot be drawn; if the salinity is < 250mg / L, the value is assigned to 0, indicating that there is no salt tide upstream and water can be drawn. Thus, a long sequence data of whether water can be drawn from the target site is generated, and its expression is:
[0107]
[0108] Using discrete wavelet transform (DWT), artificial neural network (ANN), support vector machine (SVM), random forest (RF) machine model, the optimal lag corresponding to different variables is introduced, and its expression is:
[0109]
[0110] The classification task is achieved by learning and predicting the values of zero and one variables. The cross-validation method is used to evaluate each model and the performance indicators of each model are recorded, such as accuracy, F1 score, etc. The best performing model is selected as the final classification model based on the performance indicators.
[0111] Performance indicators can be calculated using accuracy, recall, precision and F1 score according to the following formula:
[0112] The calculation expression of accuracy is:
[0113]
[0114] The calculation expression of recall is:
[0115]
[0116] The calculation expression of precision is:
[0117]
[0118] The calculation expression of F1 score (F1Score) is:
[0119]
[0120] Among them, TP is a true positive example (TruePositives), TN is a true negative example (TrueNegatives), FP is a false positive example (FalsePositives), and FN is a false negative example (FalseNegatives).
[0121] Compare the performance metrics of different models during the cross-validation process. Select the model with the highest F1 score, because the F1 score is the harmonic mean of precision and recall, which comprehensively considers the model's ability to correctly identify positive examples and correctly reject negative examples.
[0122] Based on the results of model comparison, the model with the best performance is selected as the final classification model. If there are multiple models with similar performance, a comprehensive judgment is made by considering the model calculation efficiency.
[0123] S400, constructing a saltwater tide upstream ensemble forecasting model to perform forecast processing on the forecast result to obtain a salinity forecast value of the water intake of the target site;
[0124] It should be noted that, in some embodiments, step S400 may include: S410, selecting a machine learning prediction model for saltwater tide tracing based on a machine learning method, the machine learning prediction model including a discrete wavelet transform model, an artificial neural network model, a support vector machine model and a random forest algorithm model; S420, selecting the long sequence classification data of the salinity of the water intake of the target site to obtain a saltwater tide tracing data set; S430, inputting the saltwater tide tracing data set into the machine learning prediction model, and performing a performance evaluation on the machine learning prediction model by a cross-validation method to obtain an evaluation result; S440, based on the evaluation result, selecting the machine learning prediction model with the best performance in the evaluation result As a classification forecast model for upstream saltwater tide; S450, based on the classification forecast model for upstream saltwater tide, the upstream saltwater tide data set is classified and processed to obtain the salinity exceeding standard of the water intake of the target site; S460, according to the salinity exceeding standard of the water intake of the target site and the machine learning prediction model, the optimal lag data set of the influencing factor data is introduced to construct a saltwater tide upstream regression prediction model; S470, based on the evaluation result, the saltwater tide upstream regression prediction model is weighted by the Bayesian averaging method to construct a saltwater tide upstream ensemble forecast model; S480, the prediction result is forecasted based on the saltwater tide upstream ensemble forecast model to obtain the salinity prediction value of the water intake of the target site.
[0125] Among them, it should be noted that, in some embodiments, step S440 may include: S441, selecting the data set corresponding to the value assigned to 1 in the long sequence data of the water intake of the target site, and obtaining the excessive saltwater tide traceback data set; S442, inputting the excessive saltwater tide traceback data set into the machine learning prediction model, and performing performance evaluation on the saltwater tide traceback regression prediction model by cross-validation method to obtain an evaluation result; S443, based on the evaluation result, obtaining the prior probability of the saltwater tide traceback regression prediction model and the likelihood function of the saltwater tide traceback regression prediction model; S444, according to the prior probability of the saltwater tide traceback regression prediction model and the likelihood function of the saltwater tide traceback regression prediction model, obtaining the posterior probability of the saltwater tide traceback regression prediction model by Bayesian averaging method; S445, normalizing the posterior probability of the saltwater tide traceback regression prediction model to obtain the weight of the saltwater tide traceback regression prediction model; S446, combining the weights of the saltwater tide traceback regression prediction model to obtain the saltwater tide traceback ensemble forecasting model.
[0126] In some specific embodiments, the first step is to build a regression prediction model for saltwater tide tracing based on machine learning. The results of the 0-1 classification prediction model for judging whether water can be taken are used to filter out the data set where water cannot be taken, that is, 1, and introduce the optimal hysteresis. The saltwater tide tracing regression prediction model is constructed based on discrete wavelet transform (DWT), artificial neural network (ANN), support vector machine (SVM), and random forest (RF) algorithm training.
[0127] For each model, parameter optimization strategies such as grid search or random search are applied to find the optimal parameter combination within the predetermined parameter range. Cross-validation is used to evaluate the performance of the model under different parameters. The training data is divided into K subsets, and one subset is set aside each time as the validation set, and the remaining K-1 subsets are combined as the training set. This process is repeated K times, and the validation set is changed each time. The best performing parameters are selected based on the performance indicators. Common performance indicators include mean square error (MSE), root mean square error (RMSE) and mean absolute error (MAE). Taking RMSE as an example, its calculation formula is:
[0128]
[0129] Among them, Y i Indicates the actual value of water salinity at the target site. It represents the predicted value of water salinity at the target site, and n is the number of samples.
[0130] For each model, the parameter combination with the lowest RMSE is selected as the optimal parameter of the model for the final model training and prediction, thereby completing the construction of a saltwater tide upstream regression prediction model based on five machine learning algorithms: discrete wavelet transform (DWT), artificial neural network (ANN), support vector machine (SVM), and random forest (RF).
[0131] Then, an ensemble prediction model is constructed. The individual machine learning models generated by training are synthesized, and the Bayesian average method is used to generate the saltwater tide upstream ensemble prediction model, which is expressed as follows:
[0132]
[0133] In the above formula, F is the predicted value of the ensemble forecast model, F(m i ) is the predicted value of the i-th model, and the Bayesian average method is used to calculate the weight w of each machine learning model i .w i is the prediction weight of the ith model, reflecting the relative contribution of the ith model to the forecast results during the training period, and the sum of their values is equal to 1, that is,
[0134] First, calculate the historical performance of each model. For each machine learning model, compare its predicted value with the actual value, calculate the coefficient of determination R2 or mean square error MSE as the performance indicator, and use perf i express.
[0135] Calculate the prior probability and calculate the prior probability F(m i ), and ensure that their sum is 1, the calculation expression of the prior probability is:
[0136]
[0137] Calculate the likelihood. For the current data set, calculate the likelihood function p(D|m i ), indicating how well each model fits the observed data.
[0138] Apply Bayes' theorem to calculate the posterior probability. Use Bayes' theorem to associate prior probability and likelihood to calculate the posterior probability. The calculation expression is:
[0139]
[0140] where p(D|m i ) is the likelihood function, p(m i ) is the prior probability, and p(D) is the marginal probability of data D.
[0141]
[0142] Normalize the posterior probability to get the weight. Normalize the posterior probability to get the weight of each model. The calculation expression is:
[0143]
[0144] Finally, the model is verified. Based on the optimal lag, the data on whether water can be taken and the corresponding runoff, tide level, wind speed and direction corresponding to the optimal lag are sorted out, and divided into the rate period and the test period. Generally, three quarters of the data are selected as the rate period and one quarter of the data are selected as the test period. Run the constructed saltwater tide retrospective ensemble forecast model, input the data of the optimal lag corresponding to each influencing factor in the test period, calculate and output the predicted situation of the water salinity of the target site, and compare and verify it with the measured value. If the error between the salinity prediction value calculated by the model and the measured value reaches the set expected value, the model is successfully constructed and can be used to predict the water salinity of the site.
[0145] See also Figure 2 The embodiment of the present application also provides a saltwater tide upstream ensemble forecasting system based on classification regression analysis, which can implement the above-mentioned saltwater tide upstream ensemble forecasting method based on classification regression analysis, and the system includes:
[0146] The first module is used to obtain the measured water intake salinity data of the target site and the influencing factor data of the target site, wherein the influencing factor data includes flow influencing factor, tide level influencing factor and wind influencing factor;
[0147] The second module is used to obtain the optimal lag time of the impact factor data based on a machine learning algorithm;
[0148] The third module is used to predict the excessive salinity of the water intake through a classification prediction model according to the optimal lag time of the influencing factor data and the measured water intake salinity data of the target site, and obtain a prediction result;
[0149] The fourth module is used to construct a saltwater upstream ensemble forecast model to perform forecast processing on the forecast results to obtain the salinity forecast value of the water intake of the target site.
[0150] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0151] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A saltwater tide upstream ensemble forecasting method based on classification regression analysis, characterized in that: The method comprises: Obtaining measured water intake salinity data of a target site and influencing factor data of the target site, wherein the influencing factor data includes flow influencing factor, tide level influencing factor and wind influencing factor; Set the hysteresis search range; The flow influencing factor and the tide influencing factor are fixed, and the wind influencing factor is sequentially changed with a lag based on the lag search range, and the performance index of the saltwater tide prediction model under different lags is evaluated, and the lag corresponding to the optimal index model is selected to obtain the current optimal wind influencing factor feature set; The flow influencing factor is fixed, combined with the current optimal wind influencing factor feature set, the tidal level influencing factor is sequentially changed with a lag based on the lag search range, and the performance index of the saltwater tide prediction model under different lags is evaluated, and the lag corresponding to the optimal index model is selected to obtain the current optimal tidal level influencing factor feature set; Based on the current optimal wind influencing factor feature set and the current optimal tide influencing factor feature set, the flow influencing factor is sequentially changed with a lag according to the lag search range, and the performance index of the saltwater tide prediction model under different lags is evaluated, and the lag corresponding to the optimal index model is selected to obtain the current optimal flow influencing factor feature set; Based on the current optimal wind influence factor feature set, the current optimal tidal influence factor feature set and the current optimal flow influence factor feature set, the above step of obtaining the current optimal influence factor feature set is repeated until a preset termination iteration loop condition is met, and the wind influence factor feature set, the tidal influence factor feature set and the flow influence factor feature set are output; Integrate the wind influencing factor feature set, the tide influencing factor feature set and the flow influencing factor feature set to obtain an optimal time-lag data set of the influencing factor data; A random forest machine learning algorithm is selected to construct a saltwater tide prediction model and a prediction process is performed on the time-lag data set of the influencing factor data to obtain a predicted value of the salinity of the water intake; Iteratively optimizing the saltwater tide prediction model according to the difference between the predicted value of the water intake salinity and the measured water intake salinity data of the target site, and selecting the optimal saltwater tide prediction model; Based on the optimal saltwater tide prediction model, corresponding to the lag data set of the influencing factor data, output the optimal lag of the influencing factor data; According to the optimal lag time of the influencing factor data and the measured water intake salinity data of the target site, the water intake salinity exceeding the standard is predicted by a classification prediction model to obtain a prediction result; A saltwater upstream ensemble forecasting model is constructed to perform forecast processing on the forecast results to obtain the salinity forecast value of the water intake of the target site.
2. The method according to claim 1, characterized in that The expression of the predicted value of the water intake salinity is specifically as follows: In the above formula, represents the predicted value of water intake salinity, D(T) represents the time-lag data set of influencing factor data, represents the feature set of traffic influencing factors, represents the characteristic set of tide level influencing factors, represents the characteristic set of wind influencing factors, and h(·) represents the relationship function between salinity prediction and influencing factors.
3. The method according to claim 1, characterized in that The expression for predicting the result of the excessive salinity at the water intake is as follows: In the above formula, Y represents the long sequence classification data of the water intake salinity of the target site, Y i It represents the measured salinity value of the target site, and n represents the total number of long sequence data of the water intake.
4. The method according to claim 1, characterized in that: The method of constructing a saltwater upstream ensemble forecasting model to perform forecast processing on the forecast result to obtain a forecast value of the water intake salinity of the target site includes: Selecting a machine learning prediction model for saltwater tide upstream based on a machine learning method, wherein the machine learning prediction model includes a discrete wavelet transform model, an artificial neural network model, a support vector machine model, and a random forest algorithm model; Selecting the long sequence classification data of the water intake salinity of the target site to obtain the salt tide upstream data set; Inputting the saltwater tide tracing data set into the machine learning prediction model, and performing a performance evaluation on the machine learning prediction model by a cross-validation method to obtain an evaluation result; Based on the evaluation results, the machine learning prediction model with the best performance in the evaluation results is selected as the saltwater upstream classification prediction model; Based on the saltwater tide upstream classification forecast model, the saltwater tide upstream data set is classified and processed to obtain the excessive salinity of the water intake at the target site; According to the excessive salinity of the water intake at the target site and the machine learning prediction model, the optimal lag data set of the influencing factor data is introduced to construct a saltwater tide retrogression regression prediction model; Based on the evaluation results, the saltwater tide upstream regression prediction model is weighted by using the Bayesian average method to construct a saltwater tide upstream ensemble prediction model; The forecast result is forecasted based on the saltwater upstream ensemble forecast model to obtain a predicted value of salinity at the water intake of the target site.
5. The method according to claim 4, characterized in that Based on the evaluation result, the saltwater tide upward regression prediction model is weighted by a Bayesian average method to construct a saltwater tide upward ensemble prediction model, including: Select the data set corresponding to the value 1 in the long sequence data of the water intake of the target site to obtain the excessive salt tide upstream data set; The excessive saltwater tide tracing data set is input into the machine learning prediction model, and the performance of the saltwater tide tracing regression prediction model is evaluated by cross-validation method to obtain an evaluation result; Based on the evaluation result, obtaining the prior probability of the saltwater tide upward regression prediction model and the likelihood function of the saltwater tide upward regression prediction model; According to the prior probability of the saltwater tide upward regression prediction model and the likelihood function of the saltwater tide upward regression prediction model, the posterior probability of the saltwater tide upward regression prediction model is obtained by using the Bayesian average method; Normalizing the posterior probability of the saltwater tide upward regression prediction model to obtain the weight of the saltwater tide upward regression prediction model; The saltwater tide upstream regression prediction model is combined according to the weights to obtain the saltwater tide upstream ensemble prediction model.
6. The method according to claim 5, characterized in that The expression of the prior probability of the regression prediction model is specifically as follows: In the above formula, p(m i ) represents the prior probability of the regression prediction model, perf i Represents the performance index evaluation result of the regression prediction model, m i represents the i-th regression prediction model, and M represents the total number of models.
7. The method according to claim 5, characterized in that The expression of the saltwater upstream ensemble forecast model is specifically as follows: In the above formula, F represents the predicted value of the saltwater upstream ensemble forecast model, F(m i ) represents the predicted value of the i-th regression prediction model, w i Represents the weight of the i-th regression prediction model.
8. A saltwater tide upstream ensemble forecasting system based on classification regression analysis, characterized in that: The system comprises: The first module is used to obtain the measured water intake salinity data of the target site and the influencing factor data of the target site, wherein the influencing factor data includes flow influencing factor, tide level influencing factor and wind influencing factor; The second module is used to set the hysteresis search range; The flow influencing factor and the tide influencing factor are fixed, and the wind influencing factor is sequentially changed with a lag based on the lag search range, and the performance index of the saltwater tide prediction model under different lags is evaluated, and the lag corresponding to the optimal index model is selected to obtain the current optimal wind influencing factor feature set; The flow influencing factor is fixed, combined with the current optimal wind influencing factor feature set, the tidal level influencing factor is sequentially changed with a lag based on the lag search range, and the performance index of the saltwater tide prediction model under different lags is evaluated, and the lag corresponding to the optimal index model is selected to obtain the current optimal tidal level influencing factor feature set; Based on the current optimal wind influencing factor feature set and the current optimal tide influencing factor feature set, the flow influencing factor is sequentially changed with a lag according to the lag search range, and the performance index of the saltwater tide prediction model under different lags is evaluated, and the lag corresponding to the optimal index model is selected to obtain the current optimal flow influencing factor feature set; Based on the current optimal wind influence factor feature set, the current optimal tidal influence factor feature set and the current optimal flow influence factor feature set, the above step of obtaining the current optimal influence factor feature set is repeated until a preset termination iteration loop condition is met, and the wind influence factor feature set, the tidal influence factor feature set and the flow influence factor feature set are output; Integrate the wind influencing factor feature set, the tide influencing factor feature set and the flow influencing factor feature set to obtain an optimal time-lag data set of the influencing factor data; A random forest machine learning algorithm is selected to construct a saltwater tide prediction model and a prediction process is performed on the time-lag data set of the influencing factor data to obtain a predicted value of the salinity of the water intake; Iteratively optimizing the saltwater tide prediction model according to the difference between the predicted value of the water intake salinity and the measured water intake salinity data of the target site, and selecting the optimal saltwater tide prediction model; Based on the optimal saltwater tide prediction model, corresponding to the lag data set of the influencing factor data, output the optimal lag of the influencing factor data; The third module is used to predict the excessive salinity of the water intake through a classification prediction model according to the optimal lag time of the influencing factor data and the measured water intake salinity data of the target site, and obtain a prediction result; The fourth module is used to construct a saltwater upstream ensemble forecast model to perform forecast processing on the forecast results to obtain the salinity forecast value of the water intake of the target site.
Citation Information
Patent Citations
Salt tide upstream forecasting system and method coupled with large-scale circulation climate information
CN113609783A