Tide level prediction method and system based on PSO-LSTM

The hyperparameters and structure of the tide level prediction model are optimized through the PSO-LSTM method, which solves the problems of limited tide level prediction accuracy and difficulty in model optimization in the existing technology, and achieves higher prediction accuracy and complex model processing capabilities.

CN118863137APending Publication Date: 2024-10-29CCCC FOURTH HARBOR ENG INST CO LTD +1
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410871798.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

Existing tide level prediction methods have limited prediction accuracy when dealing with fluctuations caused by non-astronomical tide factors, and it is difficult to optimize the parameters of the neural network model, which can easily lead to under-fitting or over-fitting.

Method used

The tide level prediction method based on PSO-LSTM is adopted, and the hyperparameters and network structure of the LSTM neural network are optimized through the particle swarm optimization algorithm to improve the prediction accuracy and the ability to handle complex models.

Benefits of technology

It improves the accuracy of tide level prediction and model performance, can better handle complex modeling tasks, and reduces the time and cost of neural network model parameter optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118863137A_ABST
    Figure CN118863137A_ABST
Patent Text Reader

Abstract

The invention provides a PSO-LSTM-based tide level prediction method and system, and belongs to the field of ocean engineering. The invention provides a tide level prediction method based on a PSO-LSTM (Particle Swarm Optimization Long Short-Term Memory Network) optimization model. And a system; the method has the advantages that hyper-parameters and a network structure are optimized, and the performance of the model is improved; a complex model can be processed, while a traditional prediction method may not well process a complex modeling task; compared with a single linear method and a single nonlinear method, the PSO-LSTM has the higher prediction precision; therefore, according to the sea level prediction method based on PSO-LSTM, under the neural network algorithm, the key parameters of the LSTM neural network model are automatically optimized through the PSO algorithm, so that sea level prediction with higher accuracy is realized, and the time and cost for optimizing the parameters of the neural network model can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of marine engineering, and in particular to a tide level prediction method and system based on PSO-LSTM. Background Art

[0002] The coastal and estuary areas have flat terrain, the locational advantage of being connected by land and sea, dense population, developed industry and agriculture. They are the economic center and transportation hub of a region, as well as a port with frequent foreign exchanges. They are one of the engines of social and economic development. However, the area is located in a tidal zone and is affected by tides all year round, which directly or indirectly affects people's normal production activities and poses a threat to people's lives and property.

[0003] Tide prediction is a scientific prediction method used to predict tidal changes at a specific time and place. Accurate tide forecasts are crucial for fields such as navigation, marine engineering and marine environmental protection, water security in coastal areas and scheduling of production operations. The more mature tide prediction methods currently available are mainly harmonic analysis methods, which are derived from considering the tidal force caused by the periodic motion of celestial bodies. By using a toolkit to extract the harmonic constants of the hourly tide data from tide gauges, analyze tidal characteristics, and compare the harmonic analysis results of tides in different time periods, its assumptions enable it to predict fluctuations caused by astronomical tides.

[0004] The harmonic analysis method is a classic tidal forecasting method. This method is derived from the consideration of the tidal force caused by the periodic motion of celestial bodies, which enables it to predict the fluctuations caused by astronomical tides. However, when predicting tide levels, the use of the harmonic analysis method requires a large amount of historical tide data and has high requirements for data quality. When the water level includes fluctuations caused by non-astronomical tide factors (such as meteorological and estuary runoff factors), the forecast accuracy of the harmonic analysis method will be affected and limited.

[0005] With the development of artificial intelligence technology, neural network models have gradually been introduced to predict tide levels, such as the long short-term memory (LSTM) neural network model. The LSTM neural network model can better explore the inherent laws of tide development and improve the accuracy of tide prediction. On the other hand, the LSTM neural network model is more complex than the traditional tide prediction method. In particular, improper selection of neural network model parameters will lead to underfitting or overfitting of the model, which will have a great impact on the prediction results.

[0006] In order to solve the above problems, this paper proposes a tide prediction method based on the PSO-LSTM (particle swarm optimization long short-term memory network) optimization model; PSO-LSTM optimizes hyperparameters and network structure through the particle swarm optimization algorithm, improves the prediction accuracy and the ability to handle complex models, and has better performance than traditional LSTM. Summary of the invention

[0007] The purpose of the present invention is to overcome the above problems existing in the prior art and greatly improve its technical effect on the basis of the original technology; firstly, the present invention provides a tide level prediction method based on PSO-LSTM, the method comprising:

[0008] 1. Data preprocessing: Obtain historical tide data and preprocess the data, and normalize the ocean tide data; After data preprocessing, divide the normalized tide data into training set, validation set and prediction set;

[0009] 2. PSO parameter optimization; PSO refers to particle swarm optimization algorithm; initialize LSTM neural network model parameters including the number of neurons, number of iterations, probability of discarding layers and learning rate; as the optimization object of PSO algorithm, initialize adaptive PSO algorithm and divide particle swarm;

[0010] 3. LSTM model construction: calculate the fitness value of each particle, build the LSTM model with the corresponding parameters of each particle, train it with the training set data, and predict it with the validation set data; take the root mean square error RMSE of the prediction result as the fitness value of each particle;

[0011] 4. Determine the global optimal particle position P according to the particle fitness value and population division results i t and the local optimal particle position P g t ;

[0012] 5. Update the positions of common particles and local optimal particles according to the PSO algorithm, and determine the termination conditions; if the termination conditions are met, return the optimal hyperparameter value; otherwise, return to step 2;

[0013] 6. Use the optimal hyperparameters to build an LSTM model; the model is trained through the training set and the validation set, and finally predicted through the prediction set to obtain the tide level prediction results.

[0014] The data preprocessing includes: the collected ocean tide data include the gravitational force of the moon and the sun, the rotation of the earth, the position of the earth in orbit, meteorological changes and tide height; the data preprocessing includes data missing value, duplicate value processing and normalization processing: the missing data missing value is interpolated by using the cubic polynomial interpolation method, and the duplicate data is deleted; the normalization processing includes: normalizing the other data except the tide height from 0 to 1, so that the other data sizes are all within the range of (0, 1), and the calculation formula is:

[0015]

[0016] Among them, λ is a value of an element in the ocean tide data, λ i is the i-th value of the corresponding element in the ocean tide data, i ranges from 1 to n, and n means there are n sample data in total; * is the corresponding data after λ normalization;

[0017] The normalized tide data is divided into a training set, a validation set and a prediction set, including: according to the extracted time series order, multiple elements in the normalized ocean tide data are combined into a vector that affects the ocean tide data, and the vector that affects the ocean tide data and the corresponding tide height are combined into a training set, a test set and a prediction set, and the prediction set is required to be the recent ocean tide data as much as possible.

[0018] The initialization of the LSTM neural network model parameters includes the number of neurons, the number of iterations, the probability of discarding the layer and the learning rate, and includes: using the PSO optimization algorithm to optimize and adjust the parameters of the LSTM model to improve the convergence speed and accuracy of the model; the PSO optimization algorithm includes a more effective particle update strategy and a more flexible parameter adjustment mechanism; the particle group is divided into the whole group, so that the group can quickly find the optimal solution, and conform to the LSTM neural network model parameter optimization structure and process; the PSO optimization algorithm includes: initializing the particle group, calculating the fitness, and updating the particle position and speed; assuming that there are N particles in the D-dimensional space to form a particle group X={X 1 , X 1 , …X N}, any particle x in the population i =[x i1 , x i2 , …x iD ], the velocity of the particle at time t is V i t =[V i1 t , V i2 t ,…V iD t ], position is X i t =[X i1 t , X i2 t , …X iD t ]; In each optimization iteration, the particle tracks the individual optimal position P i t =[P i1 t , P i2 t , …P iDt ] T , the global optimal position P g t =[P g1 t , P g2 t , …P gD t ] T , to update itself; the particle updated position and velocity formula is:

[0019]

[0020]

[0021] Among them, w represents the inertia weight, which ranges from 0.9 to 1.2. Since the PSO optimization algorithm needs to conform to the optimization process of LSTM parameters, the smaller the value of w, the better, and 0.9 is sufficient; c 1 is the inertia coefficient, ranging from 0 to 2, c 2 is the self-cognition coefficient, ranging from 0 to 2; r t 1 and r t 2 is a random number uniformly distributed in the range of 0 to 1; is the particle speed Quantity The component speed updated at the next moment, is the particle position Quantity The component position to be updated at the next moment.

[0022] The LSTM model construction includes: the LSTM is a long short-term memory neural network; based on the parameters optimized by the PSO algorithm, a long short-term memory neural network model is constructed; the long short-term memory neural network can better capture the time series information in the tide data and improve the accuracy of the prediction; the long short-term memory neural network is composed of three storage gates, namely, an input gate, a forget gate and an output gate; through the calculation of the three storage gates of the long short-term memory neural network, the connection between the tide data information at different time points can be established, and a prediction model for the future tide can be established.

[0023] The LSTM model construction includes: using the preprocessed tide data training set to train the constructed LSTM model so that the model learns and adapts to the temporal regularity of the tide data; after the model training is completed, using the trained LSTM model to verify the tide data verification set to test the performance of the model.

[0024] Determine the global optimal particle position P i t and the local optimal particle position Pg t Including: by dividing the particle group, determining the particle fitness value and the population division result, and finally determining the global optimal particle position P i t and the local optimal particle position P g t .

[0025] The updating of the positions of common particles and local optimal particles respectively according to the PSO algorithm and judging the termination conditions include: the termination conditions include: stipulating that the set upper limit of the number of iterations, the threshold of the objective function and the error tolerance can all meet the termination conditions.

[0026] The method of constructing an LSTM model using optimal hyperparameters includes: obtaining optimal hyperparameters through a PSO algorithm, training the LSTM model through the obtained optimal hyperparameters to obtain a trained LSTM model; then verifying the model through training on a validation set, and if it is determined through verification that the trained LSTM model meets the standards; then predicting by inputting the prediction set into the trained LSTM model to obtain a tide prediction result.

[0027] On the other hand, the present invention also establishes a tide prediction system based on PSO-LSTM, characterized in that the system includes: a tide data input module, an LSTM sequence modeling module, a PSO parameter optimization module and an evaluation prediction module; the tide data input module is connected to the PSO parameter optimization module and the LSTM sequence modeling module, and is used to preprocess the ocean tide data, and input the preprocessed data into the PSO parameter optimization module and the LSTM sequence modeling module; the LSTM sequence modeling module is connected to the tide data input module, the PSO parameter optimization module and the evaluation prediction module, and is used to train the tide data input received by the tide data input module, and optimize the parameters of the module training through the PSO parameter optimization module; the PSO parameter optimization module is connected to the tide data input module and the LSTM sequence modeling module, and is used to initialize the particle state of the tide data input module and optimize the parameters in the LSTM sequence modeling module, so that the established prediction model will be more accurate; the evaluation prediction module and the LSTM sequence modeling module are used to predict the tide results through the trained LSTM model, and predict whether the tide height is within a safe range.

[0028] The beneficial effects of the present invention are:

[0029] The present invention provides a tide level prediction method and system based on PSO-LSTM, which has the following advantages:

[0030] Optimizing hyperparameters and network structure: PSO-LSTM optimizes hyperparameters and LSTM network structure through particle swarm optimization algorithm, thus improving the performance of the model.

[0031] Handling complex models: PSO-LSTM is able to handle complex modeling tasks, while traditional prediction methods may not be able to handle complex modeling tasks well.

[0032] Higher prediction accuracy: PSO-LSTM has higher prediction accuracy compared with single linear and nonlinear methods.

[0033] Therefore, the tide prediction method based on PSO-LSTM is based on the neural network algorithm, and then the key parameters of the above LSTM neural network model are automatically optimized through the particle swarm (PSO) algorithm, so as to achieve higher accuracy tide prediction and reduce the time and cost of neural network model parameter optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 :A flow chart of a tide prediction method based on PSO-LSTM of the present invention.

[0035] Figure 2 :Flowchart of another tide prediction method based on PSO-LSTM of the present invention.

[0036] Figure 3 : A schematic diagram of a tide prediction system based on PSO-LSTM of the present invention. DETAILED DESCRIPTION

[0037] The specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings; it should be understood that the specific embodiments given here are only used to illustrate and explain the present invention and cannot be used to limit the present invention.

[0038] It should be noted that many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention may also have other implementations and variations thereof. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0039] like Figure 1As shown, a flow chart of a tide prediction method based on PSO-LSTM according to an embodiment of the present invention includes: step S100, data preprocessing; obtaining tide historical data and preprocessing the data, and normalizing the ocean tide data; after data preprocessing, dividing the normalized tide data into a training set, a validation set and a prediction set; step S101, PSO parameter optimization; the PSO refers to a particle swarm optimization algorithm; initializing LSTM neural network model parameters including the number of neurons, the number of iterations, the probability of discarding the layer and the learning rate; as the optimization object of the PSO algorithm, initializing the adaptive PSO algorithm and dividing the particle swarm; step S102, LSTM model construction; calculating the fitness value of each particle, constructing an LSTM model with the corresponding parameters of each particle, training through the training set data, and predicting with the validation set data; taking the root mean square error RMSE of the prediction result as the fitness value of each particle; step S103, determining the global optimal particle position P according to the particle fitness value and the population division result i t and the local optimal particle position P g t ; Step S104, update the positions of ordinary particles and local optimal particles respectively according to the PSO algorithm, and judge the termination conditions; if the termination conditions are met, return the optimal hyperparameter value; otherwise, return to step S102; Step S105, build an LSTM model using the optimal hyperparameters; the model is trained through the training set and the validation set, and finally predicted through the prediction set to obtain the tide prediction result.

[0040] Step S100, data preprocessing: acquiring historical tide data and preprocessing the data, and normalizing the ocean tide data; after data preprocessing, dividing the normalized tide data into a training set, a validation set, and a prediction set.

[0041] In the above embodiment, specifically, the collected ocean tide data include the gravitational force of the moon and the sun, the rotation of the earth, the position of the earth in orbit, meteorological changes and tide height; data preprocessing includes data missing value, duplicate value processing and normalization processing: the missing data missing value is interpolated by using the cubic polynomial interpolation method, and the duplicate data is deleted; the normalization processing includes: normalizing the other data except the tide height from 0 to 1, so that the other data sizes are all within the range of (0, 1), and the calculation formula is:

[0042]

[0043] Among them, λ is a value of an element in the ocean tide data, λ iis the i-th value of the corresponding element in the ocean tide data, i ranges from 1 to n, and n means there are n sample data in total; * is the corresponding data after λ normalization.

[0044] The normalized tide data is divided into a training set, a validation set and a prediction set, including: according to the extracted time series order, multiple elements in the normalized ocean tide data are combined into a vector that affects the ocean tide data, and the vector that affects the ocean tide data and the corresponding tide height are combined into a training set, a test set and a prediction set, and the prediction set is required to be the recent ocean tide data as much as possible.

[0045] Step S101, PSO parameter optimization; the PSO refers to a particle swarm optimization algorithm; initializing the LSTM neural network model parameters including the number of neurons, the number of iterations, the probability of discarding a layer, and the learning rate; as the optimization object of the PSO algorithm, initializing an adaptive PSO algorithm, and dividing the particle swarm.

[0046] In the above embodiment, specifically, the initialization of the LSTM neural network model parameters including the number of neurons, the number of iterations, the probability of discarding the layer and the learning rate includes: using the PSO optimization algorithm to optimize and adjust the parameters of the LSTM model to improve the convergence speed and accuracy of the model; the PSO optimization algorithm includes a more effective particle update strategy and a more flexible parameter adjustment mechanism; the particle group is divided into the whole group, so that the group can quickly find the optimal solution, and conform to the LSTM neural network model parameter optimization structure and process; the PSO optimization algorithm includes: initializing the particle group, calculating the fitness, updating the particle position and speed; assuming that there are N particles in the D-dimensional space to constitute the particle group X = {X 1 , X 1 , …X N}, any particle x in the population i =[x i1 , x i2 , …x iD ], the velocity of the particle at time t is V i t =[V i1 t , V i2 t ,…V iD t ], position is X i t =[X i1 t , X i2 t , …X iD t ]; In each optimization iteration, the particle tracks the individual optimal position Pi t =[P i1 t , P i2 t , …P iD t ] T , the global optimal position P g t =[P g1 t , P g2 t , …P gD t ] T , to update itself; the particle updated position and velocity formula is:

[0047]

[0048]

[0049] Among them, w represents the inertia weight, which ranges from 0.9 to 1.2. Since the PSO optimization algorithm needs to conform to the optimization process of LSTM parameters, the smaller the value of w, the better, and 0.9 is sufficient; c 1 is the inertia coefficient, ranging from 0 to 2, c 2 is the self-cognition coefficient, ranging from 0 to 2; r t 1 and r t 2 is a random number uniformly distributed in the range of 0 to 1; is the particle speed Quantity The component velocity updated at the next moment is the particle position Quantity The component position updated at the next moment

[0050] Step S102, LSTM model construction; calculate the fitness value of each particle, construct the LSTM model with the corresponding parameters of each particle, train with the training set data, and predict with the validation set data; take the root mean square error RMSE of the prediction result as the fitness value of each particle.

[0051] In the above embodiment, specifically, a long short-term memory neural network model is constructed based on the parameters optimized by the PSO algorithm; the long short-term memory neural network can better capture the timing information in the tide data and improve the accuracy of the prediction; the long short-term memory neural network is composed of three storage gates, namely, an input gate, a forget gate and an output gate; through the calculation of the three storage gates of the long short-term memory neural network, the connection between the tide data information at different time points can be established, and a prediction model for future tides can be established.

[0052] In the above embodiment, specifically, the constructed LSTM model is trained using the preprocessed tide data training set so that the model can learn and adapt to the temporal rules of the tide data; after the model training is completed, the trained LSTM model is used to verify the tide data verification set to test the performance of the model.

[0053] In the above embodiment, specifically, the LSTM mechanism consists of three storage gates, namely, an input gate, a forget gate, and an output gate; the calculation formulas of the LSTM forget gate, the input gate, and the output gate are respectively:

[0054] LSTM forget gate calculation formula:

[0055] f t =σ(U f ×X t +W f ×h t-1 +bf)

[0056] Among them, f t is the output of the forget gate, σ is the sigmoid function, which locks the output result between 0 and 1; U f , W f is the weight matrix; X t For the newly entered information; t-1 is the output of the previous LSTM cell structure; b f is the offset.

[0057] LSTM input gate calculation formula:

[0058] i t =σ(U i ×X t +W i ×h t-1 +b i )

[0059]

[0060] Among them, i t The information that the new cell needs to save, is the output of the input gate, tanh is the hyperbolic tangent function, which can compress the result to -1 to 1; U i , W i , U c and W c is the weight matrix, X t is the newly input information, h t-1 is the output of the previous LSTM cell structure, bi and bc are offsets; C t is the new cell state, f t is the output of the forget gate, Ct-1 is the previous cell state.

[0061] LSTM output gate calculation formula:

[0062] O t =σ(U o ×X t +W o ×h t-1 +b o )

[0063] h t =O t ×tanh(C t )

[0064] Among them, U o and W o is the weight matrix, X t is the newly input information, h t-1 is the output of the previous LSTM cell structure, σ is the activation function, C t is the new cell state, O t The scale parameter retained for the new cell state, b o is the offset, h t is the output of the current cell.

[0065] Step S103: Determine the global optimal particle position P according to the particle fitness value and the population division result. i t and the local optimal particle position P g t .

[0066] In the above embodiment, specifically, the determination of the global optimal particle position P i t and the local optimal particle position P g t Including: by dividing the particle group, determining the particle fitness value and the population division result, and finally determining the global optimal particle position P i t and the local optimal particle position P g t .

[0067] Step S104, update the positions of common particles and local optimal particles respectively according to the PSO algorithm, and determine the termination condition; if the termination condition is met, return the optimal hyperparameter value; otherwise, return to step S101.

[0068] In the above embodiment, specifically, the method for determining the termination condition is as follows: the termination condition can be met if one of the set upper limit of the number of iterations, the threshold of the objective function or the error tolerance is reached.

[0069] Step S105, constructing an LSTM model using optimal hyperparameters; the model is trained using a training set and a validation set, and finally predicted using a prediction set to obtain a tide level prediction result.

[0070] In the above embodiment, specifically, the optimal hyperparameters are obtained through the PSO algorithm, and the LSTM model is trained with the obtained optimal hyperparameters to obtain a trained LSTM model; then the model is verified by training with a validation set, and if it is determined through verification that the trained LSTM model meets the standards; then the prediction set is input into the trained LSTM model for prediction to obtain a tide prediction result.

[0071] like Figure 2 As shown: a flow chart of another tide prediction method based on PSO-LSTM of the present invention; the flow chart includes: firstly, preprocessing operation of ocean tide data is performed, and the particle population is initialized on the preprocessed data by using the PSO algorithm; then, model training is performed on the preprocessed tide data by using the LSTM model, and the fitness of the particles in the LSTM model is calculated by the PSO algorithm, and the fitness of the particles is compared to determine the optimal fitness of the individual and the group, and the speed and position of the particles are updated according to the fitness function; the speed and position of the particles are continuously updated through the above steps, and update iterations are performed to determine whether the maximum number of iterations is reached; if the maximum number of iterations is not reached, the step of training the LSTM model to calculate the particle fitness is returned; if the maximum number of iterations is reached, the optimal parameters are output, and the model is trained based on the optimal parameters until the final model is obtained, and the tide data is predicted through the prediction set by the final model to predict the tide height.

[0072] like Figure 3As shown: is a schematic diagram of a tide prediction system based on PSO-LSTM of the present invention; the system is used to implement a tide prediction method based on PSO-LSTM from step S100 to step S105; the schematic diagram includes: a tide data input module S200, an LSTM sequence modeling module S300, a PSO parameter optimization module S400 and an evaluation prediction module S500; the tide data input module S200 is connected with the PSO parameter optimization module S400 and the LSTM sequence modeling module S300, and is used to pre-process the ocean tide data, and input the pre-processed data into the PSO parameter optimization module S400 and the LSTM sequence modeling module S300; the LSTM sequence modeling module S300 is connected with the tide data input module S200, the PSO parameter optimization module S400 and the evaluation prediction module S500, and is used to train the tide data input by the tide data input module S200, and train the parameters of the module training through the PSO parameter optimization module S400. The PSO parameter optimization module S400 is connected with the tide data input module S200 and the LSTM sequence modeling module S300, and is used to initialize the particle state of the tide data input module S200 and optimize the parameters in the LSTM sequence modeling module S300, so that the established prediction model will be more accurate; the evaluation prediction module S500 and the LSTM sequence modeling module S300 are used to predict the tide results through the trained LSTM model to predict whether the tide height is within a safe range.

[0073] It should be understood that the above-mentioned embodiments are one or more embodiments of the present invention, and there are many other embodiments and variations thereof based on the present invention; the variations and modifications made by ordinary technicians in this industry through the present invention without making pioneering innovations all fall within the scope of protection of the present invention.

Claims

1. A tide prediction method based on PSO-LSTM, It is characterized in that The method comprises: 1) Data preprocessing: Obtain historical tide data and preprocess the data, and normalize the ocean tide data; After data preprocessing, divide the normalized tide data into training set, validation set and prediction set; 2) PSO parameter optimization; PSO refers to particle swarm optimization algorithm; initialization of LSTM neural network model parameters including the number of neurons, number of iterations, probability of discarding layers and learning rate; as the optimization object of PSO algorithm, initialization of adaptive PSO algorithm and division of particle swarm; 3) LSTM model construction: calculate the fitness value of each particle, construct the LSTM model with the corresponding parameters of each particle, train it with the training set data, and predict it with the validation set data; take the root mean square error RMSE of the prediction result as the fitness value of each particle; 4) Determine the global optimal particle position P according to the particle fitness value and population division results i t and the local optimal particle position P g t ; 5) According to the PSO algorithm, the positions of ordinary particles and local optimal particles are updated respectively, and the termination conditions are determined; if the termination conditions are met, the optimal hyperparameter value is returned; otherwise, return to step 3); 6) Build an LSTM model using the optimal hyperparameters; the model is trained using the training set and validation set, and finally predicted using the prediction set to obtain tide level prediction results.

2. According to a tidal level prediction method based on PSO-LSTM according to claim 1, It is characterized in that The data preprocessing includes: the collected ocean tide data include the gravitational force of the moon and the sun, the rotation of the earth, the position of the earth in orbit, meteorological changes and tide height; the data preprocessing includes data missing value, duplicate value processing and normalization processing: the missing data missing value is interpolated by using the cubic polynomial interpolation method, and the duplicate data is deleted; the normalization processing includes: normalizing the other data except the tide height from 0 to 1, so that the other data sizes are all within the range of (0, 1), and the calculation formula is: Among them, λ is a value of an element in the ocean tide data, λ i is the i-th value of the corresponding element in the ocean tide data, i ranges from 1 to n, and n means there are n sample data in total; * is the corresponding data after λ normalization; The normalized tide data is divided into a training set, a validation set and a prediction set, including: according to the extracted time series order, multiple elements in the normalized ocean tide data are combined into a vector that affects the ocean tide data, and the vector that affects the ocean tide data and the corresponding tide height are combined into a training set, a test set and a prediction set, and the prediction set is required to be the recent ocean tide data as much as possible.

3. According to a tidal level prediction method based on PSO-LSTM according to claim 1, It is characterized in that The initialization of the LSTM neural network model parameters includes the number of neurons, the number of iterations, the probability of discarding the layer and the learning rate, and includes: using the PSO optimization algorithm to optimize and adjust the parameters of the LSTM model to improve the convergence speed and accuracy of the model; the PSO optimization algorithm includes a more effective particle update strategy and a more flexible parameter adjustment mechanism; the particle group is divided into the whole group, so that the group can quickly find the optimal solution, and conform to the LSTM neural network model parameter optimization structure and process; the PSO optimization algorithm includes: initializing the particle group, calculating the fitness, and updating the particle position and speed; assuming that there are N particles in the D-dimensional space to form a particle group X={X 1 , X 1 , …X N }, any particle x in the population i =[x i1 , x i2 , …x iD ], the velocity of the particle at time t is V i t =[V i1 t , V i2 t ,…V iD t ], position is X i t =[X i1 t , X i2 t , …X iD t ]; In each optimization iteration, the particle tracks the individual optimal position P i t =[P i1 t , P i2 t , …P iD t ] T , the global optimal position P g t =[P g1 t , P g2 t , …P gD t ] T , to update itself; the particle updated position and velocity formula is: Among them, w represents the inertia weight, which ranges from 0.9 to 1.

2. Since the PSO optimization algorithm needs to conform to the optimization process of LSTM parameters, the smaller the value of w, the better, and 0.9 is sufficient; c 1 is the inertia coefficient, ranging from 0 to 2, c 2 is the self-cognition coefficient, ranging from 0 to 2; r t 1 and r t 2 is a random number uniformly distributed in the range of 0 to 1; is the particle speed Quantity The component speed updated at the next moment, is the particle position Quantity The component position to be updated at the next moment.

4. According to a tidal level prediction method based on PSO-LSTM according to claim 1, It is characterized in that The LSTM model construction includes: the LSTM is a long short-term memory neural network; based on the parameters optimized by the PSO algorithm, a long short-term memory neural network model is constructed; the long short-term memory neural network can better capture the time series information in the tide data and improve the accuracy of the prediction; the long short-term memory neural network is composed of three storage gates, namely, an input gate, a forget gate and an output gate; through the calculation of the three storage gates of the long short-term memory neural network, the connection between the tide data information at different time points can be established, and a prediction model for the future tide can be established.

5. According to a tidal level prediction method based on PSO-LSTM according to claim 1, It is characterized in that The LSTM model construction includes: using the preprocessed tide data training set to train the constructed LSTM model so that the model learns and adapts to the temporal regularity of the tide data; after the model training is completed, using the trained LSTM model to verify the tide data verification set to test the performance of the model.

6. According to a tidal level prediction method based on PSO-LSTM according to claim 1, It is characterized in that Determine the global optimal particle position P i t and the local optimal particle position P g t Including: by dividing the particle group, determining the particle fitness value and the population division result, and finally determining the global optimal particle position P i t and the local optimal particle position P g t .

7. According to the PSO-LSTM-based tide prediction method of claim 1, It is characterized in that The updating of the positions of common particles and local optimal particles respectively according to the PSO algorithm and judging the termination conditions include: the termination conditions include: stipulating that the set upper limit of the number of iterations, the threshold of the objective function and the error tolerance can all meet the termination conditions.

8. According to the PSO-LSTM-based tide prediction method of claim 1, It is characterized in that The method of constructing an LSTM model using optimal hyperparameters includes: obtaining optimal hyperparameters through a PSO algorithm, training the LSTM model through the obtained optimal hyperparameters to obtain a trained LSTM model; then verifying the model through training on a validation set, and if it is determined through verification that the trained LSTM model meets the standards; then predicting by inputting the prediction set into the trained LSTM model to obtain a tide prediction result.

9. A tide prediction system based on PSO-LSTM, It is characterized in that The system comprises: a tide data input module, an LSTM sequence modeling module, a PSO parameter optimization module and an evaluation and prediction module; the tide data input module is connected with the PSO parameter optimization module and the LSTM sequence modeling module, and is used for preprocessing the ocean tide data, and inputting the preprocessed data into the PSO parameter optimization module and the LSTM sequence modeling module; the LSTM sequence modeling module is connected with the tide data input module, the PSO parameter optimization module and the evaluation and prediction module, and is used for training the tide data received from the tide data input module, and optimizing the parameters of the module training through the PSO parameter optimization module; the PSO parameter optimization module is connected with the tide data input module and the LSTM sequence modeling module, and is used for initializing the particle state of the tide data input module and optimizing the parameters in the LSTM sequence modeling module, so that the established prediction model will be more accurate; the evaluation and prediction module and the LSTM sequence modeling module are used for predicting the tide results through the trained LSTM model, and predicting whether the tide height is within a safe range.

Citation Information

Cited By

  • Ocean tide level simulation method and device based on hybrid neural network model

    CN120354749A

  • A method and device for simulating ocean tide level based on hybrid neural network model

    CN120354749B

  • Real-time handwriting recognition method based on deep neural network

    CN120766298A

  • Real-time handwriting recognition method based on deep neural networks

    CN120766298B