A method and system for salinity prediction in a tidal river based on random forest and empirical mode decomposition

By combining random forest and empirical mode decomposition methods, the problem of processing complex nonlinear data in estuary salinity prediction was solved, achieving higher accuracy and more stable prediction results.

CN120449621BActive Publication Date: 2025-11-25SUN YAT SEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510261972.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-11-25
Estimated Expiration
2045-03-06

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively handle complex, nonlinear, and non-stationary time series data in estuary salinity prediction, resulting in low prediction accuracy and poor stability.

Method used

A method based on random forest and empirical mode decomposition was adopted. By acquiring data during the dry season, mutual information under different lag times was calculated to establish a salinity prediction model for tidal river sections. Empirical mode decomposition was used to extract different frequency components in the signal, and the model was built by combining it with the random forest algorithm.

Benefits of technology

It improves the accuracy and stability of estuary salinity prediction, effectively handles the multi-frequency components and lag time issues of complex signals, and enhances the prediction accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449621B_ABST
    Figure CN120449621B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a tidal river salinity prediction method and system based on a random forest and empirical mode decomposition, and belongs to the technical field of tidal river salinity prediction. The application can acquire dry season data; according to the dry season data, mutual information under different lag times is acquired; according to the dry season data and the mutual information under different lag times, a tidal river salinity prediction model is established; and according to the tidal river salinity prediction model, tidal river salinity prediction information is obtained. The application can effectively process the multi-frequency component and lag time problems of complex signals, and improve the stability and prediction accuracy of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of salinity prediction technology for tidal river sections, and in particular to a method and system for predicting salinity in tidal river sections based on random forest and empirical mode decomposition. Background Technology

[0002] While current techniques for predicting salinity in estuaries often employ a single optimal model, they suffer from significant drawbacks when handling non-stationary data. Traditional models, such as hydrodynamic and machine learning models, struggle to effectively handle complex, nonlinear, and non-stationary time-series data. These methods typically fail to effectively separate different frequency components (such as periodicity and noise) within the signal, resulting in low prediction accuracy and poor stability. Summary of the Invention

[0003] The main objective of this application is to provide a method and system for predicting salinity in tidal river sections based on random forest and empirical mode decomposition.

[0004] The technical solution adopted in this invention is:

[0005] On one hand, embodiments of the present invention provide a method for predicting salinity in tidal river sections based on random forest and empirical mode decomposition. This method includes the following steps:

[0006] Obtain data during the dry season;

[0007] Based on the dry season data, obtain mutual information under different lag times;

[0008] Based on the dry season data and the mutual information under different lag times, a salinity prediction model for tidal river sections is established.

[0009] Based on the salinity prediction model for tidal river sections, salinity prediction information for tidal river sections is obtained.

[0010] Furthermore, the acquisition of dry season data includes the following steps:

[0011] Collect historical data for the target site; the historical data includes historical tidal level factor data, historical wind speed data, historical upstream runoff data, and historical salinity data;

[0012] The historical tidal factor data includes daily average tide level, daily highest tide level, daily lowest tide level, and tidal range;

[0013] The historical wind speed data includes average wind speed, maximum wind speed, and extreme wind speed;

[0014] The historical data is organized into a daily scale, and the dry season data is selected; the dry season data includes dry season tidal level factor data, dry season wind speed data, dry season upstream runoff data, and dry season salinity data.

[0015] Furthermore, obtaining mutual information under different lag times based on the dry season data includes the following steps:

[0016] Based on the dry season data, input variables and output variables are obtained; the input variables include tide level, wind speed, and runoff; the output variable includes salinity.

[0017] Based on the input variables and the output variables, mutual information under different lag times is obtained; the mutual information under different lag times is used to determine the time dependency between the input variables and the output variables.

[0018] Furthermore, the formula used to obtain the mutual information under different lag times based on the input variables and the output variables includes:

[0019]

[0020] Where MI(x,y) represents mutual information; x is the input variable; y is the output variable; μ(x,y) represents the joint probability density function of the input variable and the output variable; u x (x) is the marginal probability density function of the input variable; μ y (y) is the marginal probability density function of the output variable.

[0021] Furthermore, the step of establishing a salinity prediction model for tidal river sections based on the dry season data and the mutual information under different lag times includes the following steps:

[0022] Based on the dry season data, model input variables and model prediction variables are obtained; the model input variables include tidal factor data, wind speed data, and upstream runoff data; the model prediction variables include salinity data.

[0023] Based on the mutual information under different lag times, the time delay information that affects salinity changes is identified, and the lag time provided for model training is selected.

[0024] A decomposition framework is established; the decomposition framework can obtain the intrinsic mode functions through empirical mode decomposition based on the model input variables and the model prediction variables.

[0025] Based on the decomposition framework, the lag time provided for model training, the model input variables, and the model prediction variables, a salinity prediction model for tidal river sections is obtained.

[0026] Furthermore, the decomposition framework can obtain intrinsic mode functions through empirical mode decomposition based on the model input variables and the model predictor variables, using formulas including:

[0027]

[0028] h(t)=x(t)-m(t) (3)

[0029] IMF k+1 (t)=h(t)=x k (t)-m k (t) (4)

[0030] Among them, IMF k+1 (t) is the intrinsic mode function; x(t) is the current input variable of the model or the current predictor variable of the model; e upper (t) is the upper envelope, which is formed by fitting all the maxima of x(t) using a cubic spline interpolation function; e lower (t) represents the lower envelope, which is formed by fitting all the minimum points of x(t) using a cubic spline interpolation function; m(t) is the mean line of the upper and lower envelopes of x(t); h(t) represents the detail components of the data sequence; x k (t) is the model input variable or the model predictor variable in the k-th iteration; m k (t) is x k The mean lines of the upper and lower envelopes corresponding to (t).

[0031] Furthermore, the establishment of the decomposition framework includes the following steps:

[0032] An X-frame is established; the X-frame is used to perform empirical mode decomposition on the model input variables, generate a first intrinsic mode function, and merge the first intrinsic mode function into a new input dataset. A random forest model is used to train the input dataset and the model prediction variables to obtain the prediction results of the X-frame.

[0033] A Y-framework is established; the Y-framework is used to perform empirical mode decomposition on the model prediction variables to generate second intrinsic mode functions, and a random forest model is set for each component of the second intrinsic mode function. The model input variables are used as the input of each random forest model for training. The training results of each random forest model are integrated by direct summation, multiple linear regression, and artificial neural network to obtain the prediction results of the Y-framework.

[0034] An XY framework is established; the XY framework is used to simultaneously perform empirical mode decomposition on the model input variables and the model prediction variables to generate third intrinsic mode functions, and to establish random forest models for each component of the third intrinsic mode function. The model input variables after empirical mode decomposition are used as the input of each random forest model for training. The training results of each random forest model are integrated by direct summation, multiple linear regression, and artificial neural network to obtain the prediction results of the XY framework.

[0035] The X-frame, the Y-frame, and the XY-frame are used as decomposition frames.

[0036] On the other hand, embodiments of the present invention also provide a salinity prediction system for tidal river sections based on random forest and empirical mode decomposition, the tidal river section salinity prediction system based on random forest and empirical mode decomposition comprising:

[0037] The first module is used to acquire data during the dry season;

[0038] The second module obtains mutual information under different lag times based on the dry season data.

[0039] The third module establishes a salinity prediction model for tidal river sections based on the dry season data and the mutual information under different lag times.

[0040] The fourth module obtains salinity prediction information for tidal river sections based on the salinity prediction model for the tidal river sections.

[0041] On the other hand, embodiments of the present invention also provide a salinity prediction device for tidal river sections based on random forest and empirical mode decomposition, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the salinity prediction method for tidal river sections based on random forest and empirical mode decomposition as described above.

[0042] On the other hand, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the salinity prediction method for tidal river sections based on random forest and empirical mode decomposition as described above.

[0043] The embodiments of this application include at least the following beneficial effects: This application provides a method and system for predicting salinity in tidal river sections based on random forest and empirical mode decomposition. This invention can acquire dry season data; obtain mutual information at different lag times based on the dry season data; establish a salinity prediction model for tidal river sections based on the dry season data and the mutual information at different lag times; and obtain salinity prediction information for tidal river sections based on the salinity prediction model. This invention can effectively handle the multi-frequency components and lag time problems of complex signals, improving the stability and prediction accuracy of the model. Attached Figure Description

[0044] Figure 1 This is a flowchart of a method for predicting salinity in tidal river sections based on random forest and empirical mode decomposition, provided in an embodiment of the present invention.

[0045] Figure 2 This is a flowchart of the X framework provided in an embodiment of the present invention;

[0046] Figure 3 This is a flowchart of the Y-framework provided in an embodiment of the present invention;

[0047] Figure 4 This is a flowchart of the XY framework provided in an embodiment of the present invention. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying 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 those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0049] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”

[0050] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.

[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0052] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.

[0053] 1) Mutual information (MI) measures the degree of interdependence between two random variables;

[0054] 2) Empirical Mode Decomposition (EMD) is an adaptive signal processing method;

[0055] 3) Intrinsic Mode Function (IMF) is a component obtained through EMD decomposition;

[0056] 4) Random Forest (RF) is an ensemble learning method.

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

[0058] On one hand, embodiments of the present invention provide a method for predicting salinity in tidal river sections based on random forest and empirical mode decomposition, referring to... Figure 1 A method for predicting salinity in tidal river sections based on random forest and empirical mode decomposition includes the following steps:

[0059] S100, Obtain data during the dry season;

[0060] S200. Based on the dry season data, obtain mutual information under different lag times;

[0061] S300. Based on dry season data and mutual information under different lag times, establish a salinity prediction model for tidal river sections.

[0062] S400. Based on the salinity prediction model for tidal river sections, obtain the salinity prediction information for tidal river sections.

[0063] The S100 method for obtaining dry season data disclosed in this embodiment of the invention includes the following steps:

[0064] S110. Collect historical data for the target site; historical data includes historical tidal level factor data, historical wind speed data, historical upstream runoff data, and historical salinity data;

[0065] S120, historical tide level data includes daily average tide level, daily highest tide level, daily lowest tide level, and tidal range;

[0066] S130, historical wind speed data includes average wind speed, maximum wind speed, and extreme wind speed;

[0067] S140. Organize historical data into daily scale and filter out dry season data; dry season data includes dry season tidal level factor data, dry season wind speed data, dry season upstream runoff data, and dry season salinity data.

[0068] The S200 method disclosed in this embodiment of the invention obtains mutual information under different lag times based on dry season data, including the following steps:

[0069] S210. Based on the dry season data, obtain the input and output variables; the input variables include tide level, wind speed, and runoff; the output variable includes salinity.

[0070] S220. Based on the input and output variables, obtain the mutual information under different lag times; the mutual information under different lag times is used to determine the time dependency between the input and output variables.

[0071] As an optional implementation, mutual information (MI) is a measure used to quantify the dependency between two random variables. It measures the degree of information sharing between variables by calculating the difference between the joint probability distribution and the marginal probability distribution. In this embodiment, MI is used to determine the lag time of different influencing factors (such as tidal level, wind speed, upstream runoff, etc.) on salinity prediction. The lag time refers to the time delay between changes in influencing factors and changes in salinity.

[0072] The embodiment of the present invention discloses S220, which obtains mutual information under different lag times based on input and output variables, and the formula used includes:

[0073]

[0074] Where MI(x,y) represents mutual information; x is the input variable; y is the output variable; μ(x,y) represents the joint probability density function of the input and output variables; u x (x) is the marginal probability density function of the input variable; μ y (y) is the marginal probability density function of the output variable.

[0075] The S300 method disclosed in this embodiment of the invention establishes a salinity prediction model for tidal river sections based on dry season data and mutual information under different lag times, including the following steps:

[0076] S310. Based on the dry season data, obtain the model input variables and model prediction variables; the model input variables include tidal factor data, wind speed data, and upstream runoff data; the model prediction variables include salinity data.

[0077] S320. Based on the mutual information under different lag times, identify the time delay information that affects salinity changes and select the lag time to provide for model training.

[0078] S330. Establish a decomposition framework; the decomposition framework can obtain the intrinsic mode functions through empirical mode decomposition based on the model input variables and model prediction variables.

[0079] S340. Based on the decomposition framework, the lag time provided for model training, the model input variables, and the model prediction variables, the salinity prediction model for tidal river sections is obtained.

[0080] As an optional implementation, the Empirical Mode Decomposition (EMD) of this invention decomposes the input signal (such as tidal factor, wind speed, runoff, etc.) or the output signal (salinity data) into a series of intrinsic mode functions (IMFs). These IMFs represent different frequency components in the signal, and the decomposition process reveals the potential high-frequency and low-frequency variation patterns in the data, making the data clearer at multiple scales.

[0081] In this embodiment of the invention, under different decomposition frameworks (such as the X framework, Y framework, and XY framework), the role of EMD is to capture different levels of features in the signal by decomposing the input or output data (salinity data) into multiple IMFs. In the X framework, only the input variable is decomposed, and the generated IMFs are input together with the original salinity data into a random forest model for training. In the Y framework, the salinity data is decomposed into IMFs and synthesized using different prediction methods. The XY framework decomposes both the input and output data simultaneously, ensuring that more complex relationships between the input and output are captured.

[0082] As a core component of EMD decomposition, IMF is an important input for model training. IMF can effectively remove noise from the data, allowing the Random Forest model to be trained on clearer and more regular input data, thereby improving the model's prediction accuracy.

[0083] The decomposition framework in S330 of this invention can obtain intrinsic mode functions through empirical mode decomposition based on model input variables and model predictor variables. The formulas used include:

[0084]

[0085] h(t)=x(t)-m(t) (3)

[0086] IMF k+1 (t)=h(t)=x k (t)-m k (t) (4)

[0087] Among them, IMF k+1 (t) is the intrinsic mode function; x(t) is the current model input variable or the current model predictor variable; e upper (t) is the upper envelope, which is formed by fitting all the maxima of x(t) using a cubic spline interpolation function; e lower x(t) is the lower envelope, which is formed by fitting all the minimum points of x(t) using a cubic spline interpolation function; m(t) is the mean line of the upper and lower envelopes of x(t); h(t) is the detail component of the data sequence; x k (t) is the model input variable or model predictor variable in the k-th iteration; m k (t) is x k The mean lines of the upper and lower envelopes corresponding to (t).

[0088] The S330 method for establishing a decomposition framework disclosed in this embodiment of the invention includes the following steps:

[0089] S331. Establish the X-framework; The X-framework is used to perform empirical mode decomposition on the model input variables, generate the first intrinsic mode function, and merge the first intrinsic mode functions into a new input dataset. The random forest model is used to train the input dataset and the model prediction variables to obtain the prediction results of the X-framework.

[0090] S332. Establish the Y-framework; The Y-framework is used to perform empirical mode decomposition on the model's predictive variables, generate second intrinsic mode functions, and set a random forest model for each component of the second intrinsic mode function. The model's input variables are used as the input of each random forest model for training. The training results of each random forest model are integrated using direct summation, multiple linear regression, and artificial neural networks to obtain the prediction results of the Y-framework.

[0091] S333. Establish the XY framework; The XY framework is used to simultaneously perform empirical mode decomposition on the model input variables and model prediction variables to generate third intrinsic mode functions. Random forest models are built for each component of the third intrinsic mode function. The model input variables after empirical mode decomposition are used as the input of each random forest model for training. The training results of each random forest model are integrated by direct summation, multiple linear regression, and artificial neural network to obtain the prediction results of the XY framework.

[0092] S334. Use X-frame, Y-frame, and XY-frame as decomposition frames.

[0093] The purpose of this invention is to address the shortcomings of existing technologies by proposing a real-time salinity prediction method for tidal estuaries based on a combination of empirical mode decomposition (EMD) and random forest. By using EMD for preprocessing non-stationary time series to extract intrinsic mode functions, and combining this with random forest modeling, the accuracy and stability of estuarine salinity prediction are improved.

[0094] As an optional implementation, this embodiment of the invention provides a method for real-time prediction of estuarine salinity based on random forest and empirical mode decomposition, the steps of which include:

[0095] Step 1: Data Collection and Variable Selection. Historical data for the target station is collected, primarily including four types: tidal factor data (T), including daily average tide level, daily highest tide level, daily lowest tide level, and tidal range; wind speed data (W), including average wind speed, maximum wind speed, and extreme wind speed; upstream runoff data (R); and salinity data (S). The above data is then organized into daily scales, and data for the dry season (October 1st of the current year to March 31st of the following year) is selected.

[0096] Step 2: Determine the lag time of the influencing factors and salinity. By calculating the mutual information (MI) at different lag times, find the position with the largest information content, and thus deduce the lag time. Transform the time series accordingly. The MI of two continuous random variables x and y is represented by equation (1):

[0097]

[0098] In the formula: μ(x, y) represents the joint probability density function of x and y, while u x (x) and μ y (y) is their marginal probability density function. MI equals zero if and only if the two variables are completely independent, while a larger MI value indicates a stronger dependency between the variables. In this embodiment of the invention, x includes tidal level, wind speed, and runoff, and y includes salinity.

[0099] Step 3: Data Preprocessing and Model Building. Empirical Mode Decomposition (EMD) is performed on the model input variables (including tidal factor data, wind speed data, and upstream runoff data) and the model prediction variable (salinity data). This decomposes the complex original signal into a finite number of Intrinsic Mode Functions (IMFs). IMFs have two assumptions: the number of extrema and the number of zero-crossings must be equal or differ by no more than one throughout the entire data segment; and at any given time, the average of the upper envelope formed by local maxima and the lower envelope formed by local minima is zero, meaning the upper and lower envelopes are locally symmetrical with respect to the time axis.

[0100] The core of EMD is the sifting process, which iteratively extracts the IMF (Integrated Feature Matrix). Specifically, for the current signal x(t), all the maxima of x(t) are found, and a cubic spline interpolation function is used to fit the upper envelope e of the original data. upper (t); Similarly, find all the local minima and fit all the local minima to form the lower envelope e of the data using a cubic spline interpolation function. lower The mean lines of the upper and lower envelopes (see equation (2)) are denoted as m(t). The mean envelope m(t) is subtracted from the original data sequence to obtain a new data sequence detail component h(t). If the extracted detail component h(t) does not satisfy the definition of IMF, then h(t) is used as a new signal (see equation (3)). The above envelope construction and detail component extraction process is repeated until h(t) satisfies the conditions of IMF, and then it is extracted as an IMF component. This process can be represented by equation (4). The extracted IMF is stripped from the original signal to obtain the residual signal. The above steps are repeated for the residual signal until the residual signal becomes a monotonic function or a very low frequency signal.

[0101]

[0102] h(t)=x(t)-m(t) (3)

[0103] IMF k+1 (t)=h(t)=x k (t)-m k (t) (4)

[0104] Where, x k (t) is the signal of the kth iteration, m k (t) is the corresponding mean line.

[0105] As an optional implementation, in this embodiment of the invention, when performing EMD decomposition on dry season data, there are the following three decomposition frameworks:

[0106] (1)Reference Figure 2 The X-framework process is as follows: EMD decomposition is performed only on the model input variables, and the generated IMFs (First Eigenmode Functions) are merged into a new input dataset. The model prediction variables are not processed, and a random forest model is built for training (this model is called X-Only EMD).

[0107] (2)Reference Figure 3 The Y-framework process involves decomposing only the model's predictor variables. A random forest model is built for each IMF (Second Eigenmode Function) component after decomposition. The input variables are left unprocessed and used as input for each model. The predictions from each model are then integrated using three methods: Direct Addition (DA), Multiple Linear Regression (MLR), and Artificial Neural Network (ANN). In the DA method, the prediction result is obtained by directly summing all predictor components (the model is called Y-DA). In the MLR and ANN methods, MLR and ANN models are trained to capture the relationship between the predictor components and the original target variables in the training set, and the generated models are applied to generate predictions on the test set (the models are called Y-MLR and Y-ANN, respectively).

[0108] (3)Reference Figure 4 The XY framework process involves simultaneously decomposing the model input variables and model predictor variables, building a random forest model for each IMF (third intrinsic mode function) component after decomposition, using the decomposed model predictor variables as the input of each model, and integrating the prediction results using three methods: DA, MLR, and ANN (the models are called XY-DA, XY-MLR, and XY-ANN).

[0109] To train and test the model, the original dry season time series data was randomly divided into two parts: 80% of the data was used as the training set and the remaining 20% ​​as the test set. The parameters of each model are shown in Table 1.

[0110] Table 1. Hyperparameter settings for RF and ANN models

[0111]

[0112] Step 4, Result Evaluation. The model's performance is evaluated based on two metrics: the coefficient of determination (R²). 2 R and root mean square error (RMSE). 2The statistic measures the proportion of variance in the observed data explained by the model; the closer the value is to 1, the better the model fits (see Equation (5)). RMSE quantifies the average deviation between the predicted and observed values; the smaller the value, the higher the prediction accuracy (see Equation (6)).

[0113]

[0114] In the formula, y i Represents the observed value. Indicates the predicted value. This represents the average value of the observed values.

[0115] The following are practical application examples of this invention, using the Pearl River Delta region of China as the research area:

[0116] Step 1: Data collection and variable selection.

[0117] (1) The data collected in this case are daily scale data of the dry season (from October 1st of each year to March 1st of the following year) from 2006 to 2022. The data are shown in Table 2 below.

[0118] Table 2. Research Data

[0119]

[0120]

[0121] Step 2: Determine the lag time between influencing factors and salinity.

[0122] To determine the optimal lag time between the influencing factor and chloride content (results are shown in Table 3), the following steps need to be performed:

[0123] (1) Calculate the inter-influence factor (MI) between salinity time series with different lag times (usually 1 to 7 days) to assess the dependency between variables at each lag time.

[0124] (2) The optimal lag time is determined by selecting the lag time with the highest MI value.

[0125] (3) Transform the time series data by adjusting the lag time of the influencing factors to make it consistent with the determined optimal lag.

[0126] Table 3. Lag Effects of Influencing Factors of Guangchang Pumping Station

[0127] variable abbreviation MI maximum value Lag time (d) Average daily tide level (m) <![CDATA[T mean ]]> 0.0723 0 Daily highest tide level (m) <![CDATA[T max ]]> 0.0527 3 Daily lowest tide level (m) <![CDATA[T min ]]> 0.0832 1 Tidal range (m) <![CDATA[T range ]]> 0.0755 2 Average wind speed (m / s) <![CDATA[W mean ]]> 0.0339 2 Maximum wind speed (m / s) <![CDATA[W max ]]> 0.0328 2 Maximum wind speed (m / s) <![CDATA[W extreme ]]> 0.0338 2 Flow rate (m / s) R 0.41 1

[0128] Step 3: Data preprocessing and model building.

[0129] The PyEMD package in the Python environment is directly called to perform EMD decomposition on the transformed model input variables and model predictor variables using three frameworks, and then models are built and trained separately.

[0130] Step 4, Result Evaluation.

[0131] Compared to traditional RF models, the XY-ANN model is the most robust method for predicting estuarine salinity, followed by the XY-DA and XY-MLR models. By combining the frequency components of two variable types, the XY framework enables the model to better capture the implicit features and complex patterns of the model's input variables, while providing more accurate predictions of the low-frequency components (long-term trends) of the output variables. This dual decomposition method enhances the model's ability to utilize the structured and meaningful information extracted from the input signals and effectively addresses the fluctuations in the target output over time. The evaluation of the model's prediction results is shown in Table 4.

[0132] Table 4. Evaluation metrics for the seven models under the three frameworks and the traditional RF model

[0133] Model <![CDATA[R 2 ]]> RMSE X-Only-EMD 0.85 642.48 Y-DA 0.64 1003.55 Y-MLR 0.63 1022.03 Y-ANN 0.62 1029.48 XY-DA 0.87 606.43 XY-MLR 0.88 574.58 XY-ANN 0.89 555.56 RF 0.64 1008.84

[0134] The key points of the embodiments of the present invention are:

[0135] (1) Maximum Mutual Information (MI) for Calculating Lag Time: This invention employs the Maximum Mutual Information (MI) method to calculate the lag time between input and output variables. Compared to traditional methods, the MI method is better suited to the time series of factors influencing saline intrusion, especially when dealing with nonlinear and complex time series dependencies. The MI method can more accurately identify the optimal lag time between variables, thereby significantly improving the accuracy and stability of predictions. Traditional methods may not consider lag time or may only select lags based on simple linear relationships, resulting in limited prediction accuracy.

[0136] (2) Innovative application of the XY framework: This invention employs the XY framework, which performs EMD decomposition on both input and output variables simultaneously, extracting more meaningful low-frequency and high-frequency components. Compared to decomposing only input or output variables, the XY framework more effectively captures the complex nonlinear relationship between input and output, improving the model's predictive ability.

[0137] (3) Hybrid model framework combining EMD and RF: This invention proposes a method for predicting estuarine salinity by combining Empirical Mode Decomposition (EMD) and Random Forest (RF). By simultaneously performing EMD decomposition on the input and output variables, different frequency components in the time series data are extracted, which solves the shortcomings of existing technologies in processing non-stationary data. Then, the RF model is used for modeling, which improves the accuracy and stability of the prediction.

[0138] This invention combines data preprocessing with machine learning techniques, employing a hybrid model for estuarine salinity prediction, which offers advantages over single machine learning models. Traditional single machine learning methods (such as support vector machines, artificial neural networks, and random forests) often have limitations when handling non-stationary data. This invention, however, effectively addresses the multi-frequency components and lag time issues of complex signals by calculating lag time using maximum mutual information (MI) and combining Empirical Mode Decomposition (EMD) with a random forest (RF) model, thereby improving model stability and prediction accuracy.

[0139] On the other hand, embodiments of the present invention also provide a salinity prediction system for tidal river sections based on random forest and empirical mode decomposition. The system includes:

[0140] The first module is used to acquire data during the dry season;

[0141] The second module obtains mutual information under different lag times based on dry season data;

[0142] The third module establishes a salinity prediction model for tidal river sections based on dry season data and mutual information under different lag times.

[0143] The fourth module obtains salinity prediction information for tidal river sections based on the salinity prediction model for tidal river sections.

[0144] On the other hand, embodiments of the present invention also provide a salinity prediction device for tidal river sections based on random forest and empirical mode decomposition, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the salinity prediction method for tidal river sections based on random forest and empirical mode decomposition as described above.

[0145] The processor and memory can be connected via a bus or other means. Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0146] On the other hand, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the aforementioned method for predicting salinity in tidal river sections based on random forest and empirical mode decomposition.

[0147] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0148] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for predicting salinity in tidal river sections based on random forest and empirical mode decomposition, characterized in that, The method for predicting salinity in tidal river sections based on random forest and empirical mode decomposition includes the following steps: Obtain data during the dry season; Based on the dry season data, obtain mutual information under different lag times; Based on the dry season data and the mutual information under different lag times, a salinity prediction model for tidal river sections is established. Based on the salinity prediction model for tidal river sections, salinity prediction information for tidal river sections is obtained; The step of establishing a salinity prediction model for tidal river sections based on the dry season data and the mutual information under different lag times includes the following steps: Based on the dry season data, model input variables and model prediction variables are obtained; the model input variables include tidal factor data, wind speed data, and upstream runoff data; the model prediction variables include salinity data. Based on the mutual information under different lag times, the time delay information that affects salinity changes is identified, and the lag time provided for model training is selected. A decomposition framework is established; the decomposition framework can obtain the intrinsic mode functions through empirical mode decomposition based on the model input variables and the model prediction variables. Based on the decomposition framework, the lag time provided for model training, the model input variables, and the model prediction variables, a salinity prediction model for tidal river sections is obtained. The establishment of the decomposition framework includes the following steps: An X-frame is established; the X-frame is used to perform empirical mode decomposition on the model input variables, generate a first intrinsic mode function, and merge the first intrinsic mode function into a new input dataset. A random forest model is used to train the input dataset and the model prediction variables to obtain the prediction results of the X-frame. A Y-framework is established; the Y-framework is used to perform empirical mode decomposition on the model prediction variables to generate second intrinsic mode functions, and a random forest model is set for each component of the second intrinsic mode function. The model input variables are used as the input of each random forest model for training. The training results of each random forest model are integrated by direct summation, multiple linear regression, and artificial neural network to obtain the prediction results of the Y-framework. An XY framework is established; the XY framework is used to simultaneously perform empirical mode decomposition on the model input variables and the model prediction variables to generate third intrinsic mode functions, and to establish random forest models for each component of the third intrinsic mode function. The model input variables after empirical mode decomposition are used as the input of each random forest model for training. The training results of each random forest model are integrated by direct summation, multiple linear regression, and artificial neural network to obtain the prediction results of the XY framework. The X-frame, the Y-frame, and the XY-frame are used as decomposition frames.

2. The method for predicting salinity in tidal river sections based on random forest and empirical mode decomposition according to claim 1, characterized in that, The process of obtaining dry season data includes the following steps: Collect historical data for the target site; the historical data includes historical tidal level factor data, historical wind speed data, historical upstream runoff data, and historical salinity data; The historical tidal factor data includes daily average tide level, daily highest tide level, daily lowest tide level, and tidal range; The historical wind speed data includes average wind speed, maximum wind speed, and extreme wind speed; The historical data is organized into a daily scale, and the dry season data is selected; the dry season data includes dry season tidal level factor data, dry season wind speed data, dry season upstream runoff data, and dry season salinity data.

3. The method for predicting salinity in tidal river sections based on random forest and empirical mode decomposition according to claim 1, characterized in that, The step of obtaining mutual information under different lag times based on the dry season data includes the following steps: Based on the dry season data, input variables and output variables are obtained; the input variables include tide level, wind speed, and runoff; the output variable includes salinity. Based on the input variables and the output variables, mutual information under different lag times is obtained; the mutual information under different lag times is used to determine the time dependency between the input variables and the output variables.

4. The method for predicting salinity in tidal river sections based on random forest and empirical mode decomposition according to claim 3, characterized in that, The formula used to obtain mutual information under different lag times based on the input variables and the output variables includes: ; in, For mutual information; For the input variables; For the output variable; This represents the joint probability density function of the input variable and the output variable; Let be the marginal probability density function of the input variable; Let be the marginal probability density function of the output variable.

5. The method for predicting salinity in tidal river sections based on random forest and empirical mode decomposition according to claim 1, characterized in that, The decomposition framework can obtain intrinsic mode functions through empirical mode decomposition based on the model input variables and the model predictor variables. The formulas used include: ; ; ; in, These are intrinsic modulo functions; Input variables for the current model or predict variables for the current model; The upper envelope is defined as follows: All the maxima were obtained by fitting a cubic spline interpolation function; The lower envelope is defined as the lower envelope line. All local minima were obtained by fitting a cubic spline interpolation function. for The mean lines of the upper envelope and the lower envelope; For data sequence detail components; It is the first k The model input variables or the model prediction variables in the next iteration; yes The corresponding upper and lower envelope mean lines.

6. A salinity prediction system for tidal river sections based on random forest and empirical mode decomposition, used to implement the method as described in any one of claims 1 to 5, characterized in that, The salinity prediction system for tidal river sections based on random forest and empirical mode decomposition includes: The first module is used to acquire data during the dry season; The second module obtains mutual information under different lag times based on the dry season data. The third module establishes a salinity prediction model for tidal river sections based on the dry season data and the mutual information under different lag times. The fourth module obtains salinity prediction information for tidal river sections based on the salinity prediction model for the tidal river sections.

7. A device for predicting salinity in tidal river sections based on random forest and empirical mode decomposition, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method for predicting salinity of tidal river sections based on random forest and empirical mode decomposition as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the method for predicting salinity in tidal river sections based on random forest and empirical mode decomposition as described in any one of claims 1 to 5.