A salinity prediction optimization method and system

CN122903890APending Publication Date: 2026-10-13ZHEJIANG GUANGCHUAN ENG CONSULTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611022274.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0005]为了解决现有神经网络模型在超参数寻优过程中仍存在优化精度与收敛稳定性不足的问题,一定程度上限制模型预测效果的进一步提升的技术问题

Benefits of technology

[0008]本发明提供的技术方案带来的有益效果包括:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903890A_ABST
    Figure CN122903890A_ABST
Patent Text Reader

Abstract

The application provides a salinity prediction optimization method and system, and relates to the technical field of meteorology. The method comprises the following steps: obtaining time-series salinity related data of a target site; constructing a training sample set and a verification sample set based on the time-series salinity related data; optimizing network configuration parameters of a time-series feature network by improving a zebra optimization algorithm according to the training sample set and the verification sample set, and obtaining optimal network configuration parameters; configuring the time-series feature network according to the optimal network configuration parameters, and obtaining a salinity prediction network; inputting the training sample set into the salinity prediction network for training, and updating network parameters in the salinity prediction network; evaluating the salinity prediction network according to the verification sample set, and judging whether the salinity prediction network training meets a convergence condition; if yes, outputting the updated salinity prediction network after training as a final salinity prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of meteorological technology, and in particular to a method and system for salinity prediction optimization. Background Technology

[0002] Saltwater intrusion is a common natural hydrological phenomenon in tidal estuaries. Influenced by both climate change and human activities, the upstream process of saltwater intrusion in estuaries exhibits significant dynamic characteristics, impacting the water supply security of coastal cities, the stability of water use for industrial and agricultural production, and the health maintenance of estuarine ecosystems. Salinity, as a core indicator characterizing the degree of saltwater intrusion in estuaries, provides crucial data support for water source allocation, water environment management, and ecological protection through its spatiotemporal distribution and dynamic changes. Therefore, conducting research on accurate prediction of estuarine salinity has high engineering application value and scientific significance.

[0003] Existing salinity prediction research mostly employs data-driven models, relying on neural network architectures to uncover the nonlinear correlation between salinity and influencing factors. Commonly used models can integrate multi-source time-series data such as salinity, tidal range, runoff, and wind speed to fit and extrapolate salinity variation trends. These models, leveraging the feature extraction and time-series dependency capture capabilities of deep learning, provide an efficient technical approach for dynamic salinity prediction in estuaries and have been widely applied and continuously optimized in the field of tidal estuary hydrological prediction.

[0004] However, existing neural network models still suffer from insufficient optimization accuracy and convergence stability during hyperparameter optimization, which to some extent limits the further improvement of model prediction performance. Summary of the Invention

[0005] This addresses the technical challenge of insufficient optimization accuracy and convergence stability in existing neural network models during hyperparameter optimization, which to some extent limits the further improvement of model prediction performance.

[0006] The technical solution provided by this invention is as follows: A first aspect of this invention provides a salinity prediction optimization method, comprising: S1: Obtain time-series salinity data for the target location; S2: Based on time-series salinity-related data, construct training and validation sample sets; S3: Based on the training sample set and the validation sample set, the network configuration parameters of the time series feature network are optimized by improving the zebra optimization algorithm to obtain the optimal network configuration parameters; S4: Configure the temporal feature network according to the optimal network configuration parameters to obtain the salinity prediction network; S5: Input the training sample set into the salinity prediction network for training, and update the network parameters in the salinity prediction network; S6: Evaluate the salinity prediction network based on the validation sample set and determine whether the training of the salinity prediction network meets the convergence condition; if so, output the updated salinity prediction network as the final salinity prediction model; otherwise, return to step S5.

[0007] A second aspect of the present invention provides a salinity prediction optimization system, comprising: a processor and a memory; The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the salinity prediction optimization method as described in the first aspect.

[0008] The beneficial effects of the technical solution provided by this invention include: In this embodiment of the invention, to address the problem of insufficient accuracy and convergence stability in hyperparameter optimization of existing neural network models, a sample set is constructed by acquiring time-series salinity-related data. An improved zebra optimization algorithm is then used to optimize the network configuration parameters of the time-series feature network to obtain the optimal network configuration parameters. Based on the optimal parameters, a salinity prediction network is constructed and trained and evaluated. This significantly improves the accuracy and stability of hyperparameter optimization, effectively improves the model convergence effect, makes the salinity prediction more closely match the true value, reduces prediction bias, enhances the model's generalization ability and fitting effect, and achieves high-precision time-series salinity prediction. Attached Figure Description

[0009] Figure 1 A schematic flowchart of a salinity prediction optimization method provided in an embodiment of the present invention; Figure 2 A schematic diagram comparing the predicted salinity value and the measured salinity value of a salinity prediction model provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a salinity prediction and optimization system provided in an embodiment of the present invention. Detailed Implementation

[0010] Reference manual attached Figure 1 The diagram shows a flowchart of a salinity prediction optimization method provided by an embodiment of the present invention.

[0011] This invention provides a method for salinity prediction optimization, which may include the following steps: S1: Obtain time-series salinity data for the target location.

[0012] The target location is the geographical location where salinity measurements are taken, and the time-series salinity data is the salinity data of the target location and its influencing factors recorded in chronological order.

[0013] Specifically, taking Hangzhou Bay as an example, the funnel-shaped topography of the target location leads to a significant impact of tidal dynamics on salinity changes. Tidal range is used to quantify this impact. The runoff is mainly from the Qiantang River, which provides freshwater input. The effective wind speed is east-west, which can effectively drive the longitudinal advection transport of salinity.

[0014] Furthermore, the time-series salinity data specifically includes salinity, tidal range, runoff, and effective wind speed at the target location. These variables cover the main dynamic factors affecting salinity changes, providing a complete physical basis for model learning.

[0015] S2: Based on time-series salinity-related data, construct training and validation sample sets.

[0016] The training sample set is the dataset used to train the salinity prediction network, while the validation sample set is the dataset used to evaluate the training effect.

[0017] In one possible implementation, S2 specifically includes sub-steps S201 and S202: S201: Normalize the time-series salinity data and scale the data values ​​to a preset range.

[0018] Normalization involves scaling the original salinity and related factor data to a uniform range to improve the stability of model training.

[0019] It should be noted that those skilled in the art can set the size of the preset range according to actual needs, and this invention does not limit this.

[0020] Furthermore, the raw data is stored in an Excel file containing multiple columns of data. First, the multiple columns of data are converted into a single column for processing. Then, the data is normalized, scaling the values ​​to the range of -1 to 1 to improve the stability of model training.

[0021] S202: Based on normalized time-series salinity data, a training sample set and a validation sample set containing continuous time steps are constructed using the sliding window technique.

[0022] Among them, the sliding window technique is a method to generate continuous sample sequences on time series data at fixed time steps, where continuous time steps are sequence data at adjacent time points.

[0023] For example, the window size is set to 24, the step size is 1, and each window contains 24 consecutive data points, which are used to generate training sample sequences and associate them with the corresponding sample salinity.

[0024] In this embodiment of the invention, training and validation sample sets are constructed based on time-series salinity-related data, and the data is scaled to a uniform range through normalization, which can significantly improve the stability of model training. Combined with the sliding window technique to generate continuous time step sample sequences, the temporal dependencies of time-series data can be fully preserved, and the dynamic change characteristics of hydrological data can be effectively extracted. This provides high-quality and standardized sample support for subsequent network parameter optimization and model training, thereby improving the overall learning effect.

[0025] S3: Based on the training and validation sample sets, the network configuration parameters of the time-series feature network are optimized by improving the zebra optimization algorithm to obtain the optimal network configuration parameters.

[0026] Among them, the improved zebra optimization algorithm is a metaheuristic optimization method based on the simulation of zebra foraging and defense behavior. The network configuration parameters are the adjustable parameter combinations that need to be optimized in the time-series feature network. The optimal network configuration parameters are the parameter combinations obtained through algorithm optimization.

[0027] Furthermore, the zebra optimization algorithm includes a foraging phase and a defense phase. In the foraging phase, the pioneer zebras guide the movement of the herd, while in the defense phase, different avoidance strategies are adopted according to the type of predator.

[0028] Specifically, the temporal feature network is composed of a convolutional neural network (CNN) module and a bidirectional gated recurrent unit (BiGRU) module. The CNN module is used to extract local spatiotemporal features, and the BiGRU module is used to learn the long-term temporal dependencies of the sequence.

[0029] Optionally, the improved zebra optimization algorithm specifically includes: Latin hypercube sampling initialization, Brownian motion perturbation update during the foraging phase, and adaptive weighted strategy update during the defense phase.

[0030] Among them, Latin hypercube sampling initialization is a strategy to generate a uniformly distributed initial solution in the parameter space, Brownian motion perturbation update during the foraging phase is a method to increase the random search capability of the population, and adaptive weighted strategy update is a strategy to adjust the convergence magnitude of the population parameters in the later stage of iteration.

[0031] Optionally, the temporal feature network is specifically a convolutional-bidirectional gated recurrent unit fusion network.

[0032] Among them, the Convolutional Bidirectional Gated Recurrent Unit Fusion Network is a deep learning model that combines convolutional neural networks and bidirectional gated recurrent unit (GRU) networks to capture local and long-term dependency features of time-series salinity data through convolution.

[0033] Optionally, the network configuration parameters of the temporal feature network specifically include the number of hidden layers, the number of recurrent unit layers, the learning rate, and the random inactivation rate.

[0034] Here, the number of hidden layers is the number of hidden layers in the network, the number of recurrent unit layers is the number of GRU layers, the learning rate is the step size for updating model parameters, and the random inactivation rate is the proportion of neurons randomly dropped during training to prevent overfitting.

[0035] In one possible implementation, S3 specifically includes sub-steps S301 to S307: S301: The range of network configuration parameters based on temporal feature networks is initialized by Latin hypercube sampling to generate initial population parameters.

[0036] The initial population parameters are the set of network configuration parameters generated at the start of the optimization algorithm, which are used to iteratively search for the optimal solution.

[0037] Specifically, Latin hypercube sampling is used to generate uniformly distributed initial solutions in the parameter space, ensuring that the initial population covers the entire solution space, thus providing a basis for subsequent foraging and defense iterations.

[0038] S302: Calculate the initial fitness values ​​corresponding to the initial population parameters based on the training sample set and the validation sample set.

[0039] Among them, the fitness value is an indicator that measures the performance of network configuration parameters in prediction.

[0040] It should be noted that the fitness value is determined by the root mean square error between the model's predicted values ​​and the actual salinity values. The smaller the root mean square error, the better the fitness of the corresponding parameter combination.

[0041] S303: During the foraging phase, the initial population parameters are updated by Brownian motion perturbation during the foraging phase to obtain the first candidate network configuration parameters.

[0042] The first candidate network configuration parameters are a combination of parameters generated by updating the initial population parameters through random perturbation.

[0043] It should be noted that during the foraging phase, the positions of each zebra are updated based on the state of the optimal lead zebra, using the Brownian motion perturbation vector, to obtain the first candidate state. (Brownian motion perturbation vector) ξ t The calculation formula is:

[0044] in, ξ t Indicates the first t Brownian motion perturbation vector of the order. σ Indicates the scale factor. t Indicates the current iteration number. T Indicates the maximum number of iterations. Z~N(0,1) represents a standard normal distribution random vector with a mean of 0 and a variance of 1, used to generate random disturbances.

[0045] During the foraging phase, the first i Only zebras j The new state of the dimension is calculated using the foraging phase formula, as follows:

[0046]

[0047] in, Indicates the first i Only zebras in the first j A new state in the dimension is used to generate the first candidate state. x i,j Indicates the first i Only zebras in the first j The current state of the dimension. r This represents a uniformly distributed random number in the interval [0,1], used to adjust the search step size. P Z,j This indicates that the best pioneer zebra is in the th order. j The state of a dimension, I This represents the influencing parameter, used to control the magnitude of state updates.

[0048] Specifically, Brownian motion can enhance the algorithm's local search capability and prevent the iterative process from getting trapped in local optima.

[0049] S304: Based on the initial fitness value and the preset comparison rules, compare the configuration parameters of the first candidate network with the current network configuration parameters to determine the population parameters after foraging update.

[0050] Among them, the preset comparison rule is the algorithm rule used to select parameters with better fitness, and the population parameters after foraging and updating are the set of network parameters after comparison and selection.

[0051] Specifically, the comparison is based on the initial fitness value and the preset selection rules to select the set of parameters with better performance.

[0052] It should be noted that those skilled in the art can set preset comparison rules according to actual needs, and this invention does not limit such rules.

[0053] S305: During the defense phase, the population parameters after foraging are updated through the adaptive weighted strategy update during the defense phase, and the second candidate network configuration parameters are obtained.

[0054] The second candidate network configuration parameters are the set of network parameters adjusted by applying an adaptive weighting strategy during the defense phase.

[0055] Furthermore, the adaptive weighting strategy allows random perturbations in the early stages of iteration to maintain population diversity, and suppresses oscillations through weight decay in the later stages of iteration.

[0056] During the defense phase, each zebra's new state is calculated using the following formula:

[0057] in, Indicates the foraging stage i The first candidate state for each zebra, that is, the candidate position generated by each zebra during the foraging phase. Indicates the first i The fitness of the zebra's first candidate state is used to measure the quality of that state. F i Indicates the first i The fitness of the zebra in its current state. X i Indicates the first i The zebra's current state.

[0058] It should be noted that when the first i If the fitness of the zebra's first candidate state is less than the fitness of the current state, the first candidate state is updated to the current state; otherwise, the original state is left unchanged. This operation ensures that the population converges to a better region.

[0059] Furthermore, the formula for updating the state of each zebra based on the adaptive weighted strategy to obtain the second candidate state is as follows:

[0060]

[0061] in, Indicates the defensive phase i Only zebras in the first j A new state in the dimension is used to generate a second candidate state. ω ( t () represents the adaptive weighting function, which controls the perturbation amplitude at different iteration stages. x i,j Indicates the first i Only zebras in the first j The current state of the dimension. R This represents a constant used to amplify or reduce the amplitude of Brownian perturbations. r This represents a uniformly distributed random number in the interval [0,1], used to adjust the search step size. t Indicates the current iteration number. T Indicates the maximum number of iterations. P sThis represents the probability of policy selection randomly generated in the interval [0,1], used to determine which update policy to adopt. A Z,j The zebra that was attacked was in the j The state of a dimension is used for localized development during the defense phase. I This represents the influencing parameter, used to control the magnitude of state updates. cos Represents the cosine function. π It represents pi (π).

[0062] It should be noted that this formula describes the update mechanism of the adaptive weighted strategy in the defense phase, which is used to enhance local search capabilities and ensure the convergence and stability of the prediction model.

[0063] S306: Based on the fitness value and the preset comparison rules, compare the configuration parameters of the second candidate network with the population parameters after foraging update to determine the population parameters after defense update.

[0064] Among them, the population parameters after the defense update are the set of network parameters selected after the final iteration, which are used for the next step of network configuration.

[0065] For example, the defense update population parameters are the final set of network parameters selected after the iteration, used to configure the Convolutional-Bidirectional Gated Recurrent Unit Fusion (CNN-BiGRU) network.

[0066] S307: Iteratively execute the parameter update process until the preset iteration conditions are met, and output the updated defense population parameters as the optimal network configuration parameters.

[0067] Among them, the preset iteration condition is the termination criterion of the training or optimization process, and the optimal network configuration parameters are the parameter combination used for the final network training.

[0068] It should be noted that those skilled in the art can set preset iteration conditions according to actual needs, and this invention does not limit such settings.

[0069] In this embodiment of the invention, an improved zebra optimization algorithm is used to optimize the network configuration parameters of the temporal feature network. Through Latin hypercube sampling initialization, Brownian motion perturbation update during the foraging stage, and adaptive weighted strategy update during the defense stage, a good balance can be maintained between global exploration and local exploitation. The adaptive weights can suppress oscillations in the later stages of iteration, improve the accuracy of parameter optimization and convergence stability, accurately obtain the optimal network configuration parameters, and provide reliable parameter guarantees for building a high-performance salinity prediction network.

[0070] S4: Configure the temporal feature network according to the optimal network configuration parameters to obtain the salinity prediction network.

[0071] The salinity prediction network is a deep learning network that uses optimal network configuration parameters and is used for salinity prediction tasks.

[0072] The salinity prediction network is a deep learning network that uses optimal network configuration parameters to perform salinity prediction tasks.

[0073] Specifically, the optimal network configuration parameters include convolutional layer parameters, bidirectional recurrent unit layer parameters, learning rate, and hidden layer structure, which are used to determine the CNN-BiGRU network structure.

[0074] In one possible implementation, S4 specifically includes sub-steps S401 and S402: S401: Input the optimal network configuration parameters into the temporal feature network to determine the parameters of the convolutional layer and the bidirectional recurrent unit layer.

[0075] Among them, the parameters of the convolutional layer are the convolutional kernel and its configuration, and the parameters of the bidirectional recurrent unit layer are the weights and biases of the GRU units.

[0076] For example, a 3×3 kernel can be used, and the GRU hidden layer has 64 units to extract local spatiotemporal features.

[0077] S402: Based on the parameters, configure the input layer, convolutional layer, pooling layer, fully connected layer, and output layer to obtain the salinity prediction network.

[0078] The input layer is where the network receives training samples, the pooling layer is used for feature dimensionality reduction, the fully connected layer is used to map the extracted features, and the output layer is used to generate salinity prediction values.

[0079] Specifically, the input layer accepts sample sequences at 24 time steps, and the output layer generates the predicted salinity value for the next time point.

[0080] In this embodiment of the invention, the temporal feature network is configured according to the optimal network configuration parameters, which can accurately determine the parameters of the convolutional layer, the bidirectional recurrent unit layer and each structural layer. This fully leverages the advantages of CNN in extracting local features and BiGRU in learning long-term temporal dependencies, making the salinity prediction network structure reasonable and its feature extraction capability strong. It can efficiently process nonlinear and non-stationary salinity temporal data, providing a stable and reliable network foundation for subsequent accurate prediction.

[0081] S5: Input the training sample set into the salinity prediction network for training and update the network parameters in the salinity prediction network.

[0082] Among them, network parameters refer to trainable parameters of the model such as convolutional kernel weights, GRU weights, and biases.

[0083] Specifically, the training process includes forward propagation to calculate the predicted values ​​and loss, and backpropagation to update the network parameters.

[0084] In one possible implementation, S5 specifically includes sub-steps S501 to S504: S501: Perform forward propagation based on the training sample set to calculate the predicted salinity value.

[0085] Forward propagation refers to the process by which a network receives input and calculates the predicted output value.

[0086] For example, the input 24 consecutive steps of data are processed by convolution and BiGRU modules to generate the 25th step of salinity prediction.

[0087] S502: Calculate the loss function value based on the predicted salinity value and the actual salinity value of the training sample set.

[0088] The loss function is a function that measures the deviation between the predicted value and the actual value.

[0089] For example, this embodiment uses mean squared error (MSE) as the loss function.

[0090] S503: Based on the loss function value, update the network parameters in the salinity prediction network through the optimizer.

[0091] The optimizer is an algorithmic tool used to calculate gradients based on the loss function and update network parameters.

[0092] For example, the Adaptive Moment Estimation (Adam) optimizer is used to automatically adjust the convolution and GRU weights to minimize MSE.

[0093] S504: Repeat steps S501 to S503 until the updated network parameters converge or the preset number of rounds is reached.

[0094] Convergence refers to the network parameters updating at a smaller rate and the performance stabilizing. The preset number of rounds is the upper limit of the training iterations.

[0095] It should be noted that those skilled in the art can set the size of the preset rounds according to actual needs, and this invention does not limit this.

[0096] Specifically, after each round of training, the root mean square error (RMSE) is calculated on the validation set to monitor model performance.

[0097] In this embodiment of the invention, the training sample set is input into the salinity prediction network for iterative training. The predicted value is calculated through forward propagation, the deviation is measured by mean square error, and the network parameters are updated using the Adam optimizer. This continuously optimizes the model weights and biases, allowing the model to gradually approach the true salinity distribution pattern. At the same time, the error changes are monitored in real time on the validation set to ensure that the training process is stable and controllable, effectively improving the model's fitting ability and generalization performance.

[0098] S6: Evaluate the salinity prediction network based on the validation sample set and determine whether the training of the salinity prediction network meets the convergence condition. If yes, output the updated salinity prediction network as the final salinity prediction model. Otherwise, return to step S5.

[0099] The convergence condition refers to the network's prediction error being stable on the validation set and meeting the performance metrics.

[0100] Specifically, if the convergence condition is met, the updated salinity prediction network is output as the final salinity prediction model. Otherwise, return to S5 to continue training.

[0101] In one possible implementation, S6 specifically includes sub-steps S601 to S603: S601: Calculate the root mean square evaluation error of the salinity prediction network based on the validation sample set.

[0102] Among them, the root mean square evaluation error is an indicator for evaluating the prediction accuracy of the network.

[0103] For example, the smaller the RMSE, the closer the predicted value is to the true salinity value, and the higher the accuracy of the model prediction. It can also be evaluated by combining the mean absolute error (MAE) and the coefficient of determination (R²).

[0104] S602: Update and improve the relevant parameters in the Zebra optimization algorithm based on the root mean square evaluation error.

[0105] Among them, relevant parameters refer to network configuration parameters or control parameters of optimization algorithms, which are used to adjust the training process.

[0106] Specifically, during the defense phase, an adaptive weighting strategy is used to update network parameters, allowing random perturbations in the early stages and suppressing oscillations in the later stages by weight decay.

[0107] S603: Based on the update results, determine whether the current training meets the convergence condition. If yes, output the updated salinity prediction network as the final salinity prediction model. Otherwise, return to step S5 to continue training.

[0108] The final salinity prediction model is the network model after training, which can be used to predict new salinity data.

[0109] For example, if the validation set RMSE is lower than the historical best value and the network parameters converge after multiple iterations, then the final model is output. Otherwise, return to step S5 to continue iterative training.

[0110] Specifically, the final salinity prediction model can output salinity prediction values. When compared with the measured salinity values, the trends are highly consistent, accurately reflecting the dynamic changes in salinity.

[0111] Reference manual attached Figure 2 This diagram illustrates a comparison between the predicted salinity value and the measured salinity value of a salinity prediction model provided in an embodiment of the present invention.

[0112] Specifically, in Figure 2, the blue curve represents the measured salinity value, and the orange curve represents the predicted salinity value. The vertical axis represents the salinity value, ranging from 0 to 5, and the horizontal axis represents the time series sampling time. The two curves together contain multiple sets of periodic peak and trough time series segments with high and low fluctuations, completely covering the low concentration baseline range and the high salinity peak range.

[0113] Furthermore, in terms of inclusion, Figure 2 comprises five main components: a vertical salinity scale, a horizontal time series axis, measured salinity curves, predicted salinity curves, and legend labels. In terms of connectivity, the vertical salinity scale and the horizontal time series axis intersect perpendicularly to form a two-dimensional coordinate plane. Both the measured and predicted salinity curves are mapped onto this coordinate plane, extending synchronously with the horizontal time series axis. Each time series node corresponds to the same vertical salinity value, and the legend labels correspond one-to-one with the blue measured curve and the orange predicted curve, respectively.

[0114] It should be noted that Figure 2 visually demonstrates the high degree of synchronization between the predicted curve and the measured curve, with peak and trough values ​​aligned synchronously. This can intuitively verify that the model of this scheme can accurately capture the periodic variation pattern of estuary salinity, significantly reduce the deviation between the predicted and actual salinity, and intuitively prove that the combination model of the optimization algorithm and CNN-BiGRU has excellent fitting and generalization capabilities.

[0115] In this embodiment of the invention, the root mean square error is calculated based on the validation sample set and the model performance is evaluated. The relevant parameters of the optimization algorithm are updated according to the evaluation results and the convergence condition is determined. This enables dynamic adjustment and precise termination of the training process, ensuring that the final output salinity prediction model has high prediction accuracy and good stability, and can truly reflect the salinity change trend, providing reliable support for estuarine saltwater intrusion monitoring and water supply security.

[0116] Reference manual attached Figure 3 The diagram shows a structural schematic of a salinity prediction and optimization system provided in an embodiment of the present invention.

[0117] This invention provides a salinity prediction optimization system 20, including: a processor 201 and a memory 202; The memory 202 stores programs or instructions that can run on the processor 201. When the program or instructions are executed by the processor 201, they implement the steps of the above-described salinity prediction optimization method and achieve the same technical effect. To avoid repetition, the present invention will not elaborate further.

[0118] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. The scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for salinity prediction and optimization, characterized in that, include: S1: Obtain time-series salinity data for the target location; S2: Based on the aforementioned time-series salinity-related data, construct a training sample set and a validation sample set; S3: Based on the training sample set and the validation sample set, the network configuration parameters of the time series feature network are optimized by improving the zebra optimization algorithm to obtain the optimal network configuration parameters; S4: Configure the temporal feature network according to the optimal network configuration parameters to obtain the salinity prediction network; S5: Input the training sample set into the salinity prediction network for training, and update the network parameters in the salinity prediction network; S6: Evaluate the salinity prediction network based on the verification sample set and determine whether the training of the salinity prediction network meets the convergence condition; if so, output the updated salinity prediction network as the final salinity prediction model; otherwise, return to step S5.

2. The salinity prediction and optimization method according to claim 1, characterized in that, S2 specifically includes: S201: Normalize the time-series salinity-related data and scale the data values ​​to a preset range; S202: Based on the normalized time-series salinity correlation data, a training sample set and a validation sample set containing continuous time steps are constructed using the sliding window technique.

3. The salinity prediction and optimization method according to claim 1, characterized in that, The improved zebra optimization algorithm specifically includes: Latin hypercube sampling initialization, Brownian motion perturbation update during the foraging phase, and adaptive weighted strategy update during the defense phase.

4. The salinity prediction and optimization method according to claim 1, characterized in that, The temporal feature network is specifically a convolutional-bidirectional gated recurrent unit fusion network.

5. The salinity prediction and optimization method according to claim 1, characterized in that, The network configuration parameters of the temporal feature network specifically include the number of hidden layers, the number of recurrent unit layers, the learning rate, and the random inactivation rate.

6. The salinity prediction and optimization method according to claim 3, characterized in that, S3 specifically includes: S301: Based on the network configuration parameter range of the time-series feature network, the initial population parameters are generated through Latin hypercube sampling initialization; S302: Calculate the initial fitness value corresponding to the initial population parameters based on the training sample set and the validation sample set; S303: During the foraging phase, the initial population parameters are updated by Brownian motion perturbation during the foraging phase to obtain the first candidate network configuration parameters; S304: Based on the initial fitness value and the preset comparison rule, compare the first candidate network configuration parameters with the current network configuration parameters to determine the population parameters after foraging update; S305: During the defense phase, the population parameters after the foraging update are updated through the adaptive weighted strategy update of the defense phase to obtain the second candidate network configuration parameters; S306: Based on the fitness value and the preset comparison rule, compare the second candidate network configuration parameters with the foraging population parameters after the foraging update to determine the defense population parameters after the defense update; S307: Iteratively execute the parameter update process until the preset iteration conditions are met, and output the updated defense population parameters as the optimal network configuration parameters.

7. The salinity prediction and optimization method according to claim 1, characterized in that, S4 specifically includes: S401: Input the optimal network configuration parameters into the temporal feature network to determine the parameters of the convolutional layer and the bidirectional recurrent unit layer; S402: Based on the parameters, configure the input layer, convolutional layer, pooling layer, fully connected layer, and output layer to obtain the salinity prediction network.

8. The salinity prediction and optimization method according to claim 1, characterized in that, S5 specifically includes: S501: Perform forward propagation based on the training sample set to calculate the predicted salinity value; S502: Calculate the loss function value based on the predicted salinity value and the actual salinity value of the training sample set; S503: Based on the loss function value, update the network parameters in the salinity prediction network through the optimizer; S504: Repeat steps S501 to S503 until the updated network parameters converge or the preset number of rounds is reached.

9. The salinity prediction and optimization method according to claim 1, characterized in that, S6 specifically includes: S601: Calculate the root mean square evaluation error of the salinity prediction network based on the validation sample set; S602: Update the relevant parameters in the improved zebra optimization algorithm based on the root mean square evaluation error; S603: Based on the update results, determine whether the current training meets the convergence condition; if so, output the updated salinity prediction network as the final salinity prediction model; otherwise, return to step S5 to continue training.

10. A salinity prediction and optimization system, characterized in that, include: Processor and memory; The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the salinity prediction optimization method as described in any one of claims 1 to 9.