A tidal prediction method and system based on ISSA-AC-CNN-BiLSTM model

Through the ISSA-AC-CNN-BiLSTM model, combined with the improved sparrow search algorithm and attention mechanism, the parameter selection and complexity problems of the neural network model in tide prediction are solved, and tide prediction with high accuracy and strong generalization ability is achieved.

CN119986862BActive Publication Date: 2025-09-12POLAR RES INST OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510457565.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-09-12
Estimated Expiration
2045-04-14

AI Technical Summary

Technical Problem

Existing neural network models have problems in parameter selection uncertainty, low search efficiency and premature convergence in tidal height prediction. The complexity of tidal phenomena increases the computational complexity and inaccuracy of the model, affecting the accuracy of tidal prediction.

Method used

The ISSA-AC-CNN-BiLSTM model is adopted. By combining the improved sparrow search algorithm SSA with the AC-CNN-BiLSTM model, Latin hypercube sampling is used to initialize the sparrow population and sine function adaptive weights are added to optimize the model hyperparameters. The attention mechanism and multi-layer convolution kernel are combined to extract spatiotemporal features to enhance the tidal prediction ability.

Benefits of technology

The accuracy and generalization ability of tide prediction are improved, the difficulty of repeated experiments on hyperparameters in the training process of neural network models is overcome, and higher prediction accuracy and strong generalization ability are achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119986862B_ABST
    Figure CN119986862B_ABST
Patent Text Reader

Abstract

The present invention provides a tidal prediction method and system based on the ISSA-AC-CNN-BiLSTM model, relating to the technical field of applying deep learning models to tidal height prediction. The method comprises: constructing an AC-CNN-BiLSTM model based on an AC module; constructing an ISSA-AC-CNN-BiLSTM model by combining an improved sparrow search algorithm (SSA) algorithm with an AC-CNN-BiLSTM model; and performing tidal water level prediction based on tidal data using the constructed ISSA-AC-CNN-BiLSTM model to obtain a prediction result. The ISSA-AC-CNN-BiLSTM model provided by the present invention can achieve superior feature extraction capabilities and prediction effects, and has high accuracy and strong generalization capabilities when predicting tidal water levels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of applying deep learning models to tidal height prediction, and more specifically to a tidal prediction method and system based on the ISSA-AC-CNN-BiLSTM model. Background Art

[0002] Tidal level prediction has long been a key factor in ensuring the safe passage of ships into and out of ports, playing a crucial role in ensuring safe navigation. With the development and improvement of basic numerical models, many neural network models have been applied to accurately quantify tidal heights. However, the application of neural network models to accurately quantify tidal heights has several drawbacks, primarily stemming from their limitations and the complexity of tidal phenomena. For example, neural network models suffer from uncertainty in parameter selection, low search efficiency, premature convergence, and the presence of noise when training data is incomplete, inaccurate, or noisy. Tidal complexity also includes the multi-factor influence of tidal phenomena, significant temporal and spatial variability, and the significant impact of extreme weather events (such as storm surges and typhoons). Therefore, processing such highly complex and nonlinear data increases the complexity and computational effort of neural network models. Furthermore, due to inherent limitations in neural network model selection, low search efficiency, and premature convergence, the accuracy of tidal height predictions can be compromised.

[0003] To ensure the safe navigation of ships in the sea, timely and accurate tidal data is of vital importance to improving the safety of ships. Therefore, studying an efficient tidal prediction method has become an urgent problem to be solved. Summary of the Invention

[0004] In view of the technical problem that the prediction accuracy of tide height is low in the process of predicting tide height based on neural network models in the prior art, the present invention provides a tide prediction method and system based on the ISSA-AC-CNN-BiLSTM model.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is: a tidal prediction method based on the ISSA-AC-CNN-BiLSTM model, the method comprising:

[0006] Step 1: Build the AC-CNN-BiLSTM model based on the AC module;

[0007] Step 2: The improved sparrow search algorithm (SSA) is combined with the AC-CNN-BiLSTM model to construct the ISSA-AC-CNN-BiLSTM model.

[0008] Step 3: Based on the tidal data, the constructed ISSA-AC-CNN-BiLSTM model is used to predict the tidal water level and obtain the prediction results.

[0009] Furthermore, the AC-CNN-BiLSTM model in step 1 includes an input layer, a fusion feature extraction layer, a BiLSTM layer, a fully connected layer, and a prediction output layer.

[0010] Furthermore, the input layer obtains the time series subsequence by the sliding window. Each time the sliding window slides, a matrix sequence is obtained. The tidal water level element after the maximum moment of each sliding is used as the mapping result, that is, y t+k = x t+k,1 ,Will(( X t-L ,…, X t-1 , X t ), y t+k ) as a batch and put into the Attention-CNN parallel module;

[0011] The fusion feature extraction layer is an AC module that uses multi-layer and multi-scale convolution kernels to extract fine-grained temporal and spatial features. sigmoid Function to assign weights and use the Tensorflow framework multiply Function fusion branch features;

[0012] The BiLSTM layer is composed of multi-layer convolution and BiLSTM network. In this layer, multi-layer convolution kernels are used to extract the fused features. The fused features are then input into the CNNS-BiLSTM network to learn the temporal information between subsequences. The Dropout layer is used to prevent overfitting of the model. The output of the BiLSTM layer is used as the input vector of the fully connected layer. Finally, the Dense function outputs the tide prediction value.

[0013] Furthermore, the AC module in step 1 captures the correlation information between the context of the tidal sample data through the Attention branch and the CNN branch, and uses the attention mechanism to extract the temporal information in the tidal sequence to train the model; uses multi-layer multi-scale convolution kernels to extract fine-grained temporal features, and then uses Softmax The function assigns contribution weights to each moment.

[0014] Furthermore, the weighted form of the attention mechanism adopts the weighted form of multiplication attention, and the formula involved in the weighted summation process of multiplication attention is as follows:

[0015] (1);

[0016] (2);

[0017] (3);

[0018] (4);

[0019] in, s t , s t-1 Respectively t , t-1 The hidden state of the space corresponding to each moment; h j Indicates the j The hidden vector at the moment contains the information of the entire input subsequence, but focuses on the j a moment; T represents the input time step; α t,j represents the attention allocation coefficient, whose probability sum is 1; e t,j Indicates at time t and j Attention score between W e express t The weight matrix corresponding to the -1 moment.

[0020] Furthermore, in the CNN branch, high-level abstract feature information of the feature vector, i.e., spatial features, is extracted through a one-dimensional convolutional neural network. The convolution kernel moves along a certain direction. Assuming that the length of the convolution kernel is s , each time moving one square, the sequence length is L , then the output sequence length is L - s +1, and fill the borders to keep the output length consistent with the input length;

[0021] The convolution process is expressed as formula (5):

[0022] (5);

[0023] Where, C is the output feature of the convolutional layer, Z is the input feature, f(·) is the activation function, ☉ is the matrix inner product operation, W is the weight matrix corresponding to the convolution kernel, b is the bias term.

[0024] Furthermore, the temporal weight distribution structure of the Attention branch includes: first, transposing the temporal data, after which each row of the feature matrix is ​​the same feature, and these features are arranged in chronological order; then, the temporal change vector ( x t-L,k , x t-L+1,k , x t,3 ,…, x t,k ) Input one-dimensional convolution to extract temporal features, perform convolution operation by row, and pass the attention mechanism Softmax The function calculates the weight matrix, which is expressed as formula (7), and transposes the weight matrix. Finally, the weight matrix and the spatial feature matrix of the CNN branch are multiplied by corresponding elements, which are expressed as formulas (6) and (8) to give temporal feature information to the spatial features at different times.

[0025] (6);

[0026] (7);

[0027] (8);

[0028] in, C CNN is the spatial feature matrix of the CNN branch, α t,k For each row of features Softmax The output time weight matrix, C Mix is the spatiotemporal fusion feature, T is the transpose, For the matrix Hadamard Operation, can be a vector or matrix containing all features, and represents only a specific eigenvalue of the vector or matrix, D represents the set of input data, W CNN is the weight matrix in the convolutional neural network (CNN), b CNN is the bias term in the convolutional neural network, W t For time t The weight matrix at time t, b t is the bias term at time t.

[0029] Furthermore, the improved SSA algorithm in step 2 includes initializing the sparrow population using Latin hypercube sampling (LHS). The specific steps of the LHS are as follows: S201: determining the number of samples and the dimension of the vector space; S202: generating m non-overlapping partitions in each dimension so that each interval has the same probability; S203: selecting random data points in each partition to establish a sampling matrix; S204: randomly selecting a number in each column of the sampling matrix to form a vector.

[0030] Furthermore, the improved SSA algorithm in step 2 includes: adding a sine function dynamic adaptive weight to the sparrow finder position update formula to optimize the local exploration problem of the model. The finder position update formula of the improved SSA algorithm is (9) and (10):

[0031] (9);

[0032] (10);

[0033] In formula (9), Indicates in t In the +1 iteration, i The first sparrow j Position update value of each dimension; Indicates the i A sparrow in the j The current position in the dimension; represents the attenuation factor, where i is the number of iterations, a is a constant, T is the total number of iterations. This decay factor is used to control the amplitude of position updates to decrease gradually as the number of iterations increases. ST Represents a threshold value for R 2. Compare to determine the location update strategy; w is a weight or parameter used to adjust the moving step size of individual sparrows in the search space; R 2 is a random number in the range [0, 1], which is used to determine whether the sparrow individual adopts a local search strategy or a global search strategy in the current iteration; Q Used in R 2 ≥ ST Adjust the position of individual sparrows; L Represents a random step size or perturbation, which is used to introduce randomness in local search to prevent the algorithm from falling into local optimality;

[0034] In formula (10), represents the independent variable of the sine function, where t is the current iteration number, T is the total number of iterations, this expression ensures that w Changes periodically during the iteration process; b’ Is a correction parameter used to adjust w The value range is set to 1 to ensure w The value of is in the interval [0,1].

[0035] Furthermore, the step 2 further comprises: using Rosenbrock Function simulation experiments are used to verify the convergence effect of the improved SSA algorithm. Rosenbrock The function expression is formula (11):

[0036] (11).

[0037] Furthermore, step 2 further includes: using BiLSTM to train separately RMSE 、 MAE 、 R ² is the optimization range of the evaluation criteria limit parameters.

[0038] The present application also provides a tide prediction system based on the ISSA-AC-CNN-BiLSTM model, which includes a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the system is triggered to execute the above-mentioned tide prediction method based on the ISSA-AC-CNN-BiLSTM model.

[0039] Compared with the prior art, the present invention has the following advantages:

[0040] This novel AC-CNN-BiLSTM tide prediction model employs an AC (Attention-CNN fusion module) to extract spatiotemporal features from both the time and feature dimensions. The spatiotemporal features are then fused using the Hadamard operation, enhancing the ability to capture both global and temporal information. Finally, the CNN-BiLSTM model learns the temporal correlations between the fused features to map tide heights. The present invention also employs the sparrow search algorithm (SSA) to optimize the parameters of the AC-CNN-BiLSTM model, constructing an ISSA-AC-CNN-BiLSTM tide prediction model. This model overcomes the challenge of repeated experimentation with hyperparameters during neural network training. The ISSA algorithm improves upon the SSA algorithm's population initialization method by employing Latin Hypercube Sampling (LHS), allocating random numbers with equal probability across the solution domain. Furthermore, a sinusoidal function adaptive weight is added to the sparrow finder position, allowing the sparrow population to vary its search range at different iterations, avoiding local optima. The ISSA-AC-CNN-BiLSTM model can achieve better feature extraction capabilities and prediction effects, and the prediction accuracy is also greatly improved. The model has high accuracy and strong generalization ability when predicting tide height. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram of the one-dimensional convolution process structure provided by an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of the AC model structure provided in an embodiment of the present invention;

[0043] Figure 3 Flowchart of the ISSA algorithm provided by an embodiment of the present invention;

[0044] Figure 4 A comparison chart of Random initialization and Latin Hypercube sampling initialization provided by an embodiment of the present invention;

[0045] Figure 5 A diagram showing the change of the sine function with the number of iterations provided by an embodiment of the present invention;

[0046] Figure 6 A diagram showing the relationship between the number of hidden nodes and epochs provided in an embodiment of the present invention;

[0047] Figure 7 Flowchart of the ISSA-AC-CNN-BiLSTM model provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention, so as to more clearly understand the purposes, features and advantages of the present invention. It should be understood that the embodiments shown in the drawings are not limitations on the scope of the present invention, but are only intended to illustrate the essential spirit of the technical solutions of the present invention. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative work should fall within the scope of protection of the present invention.

[0049] Unless the context requires otherwise, throughout the specification and claims, the word "comprise" and variations such as "include" and "have" should be construed in an open, inclusive sense, that is, should be interpreted to mean "including, but not limited to."

[0050] Reference throughout this specification to "one embodiment" or "some embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, the appearances of "in one embodiment" or "in some embodiments" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any manner in one or more embodiments.

[0051] As used in this specification and the appended claims, the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. It should be noted that the term "or" is generally employed in its sense including "and / or" unless the context clearly dictates otherwise.

[0052] The implementation details of this embodiment are described in detail below with reference to the accompanying drawings. The following content is only provided for ease of understanding and is not necessary for implementing this solution.

[0053] In the process of studying tidal data based on neural networks in the prior art, the training method of the attention mechanism is relatively simple. In tidal data with strong periodicity and more high-frequency data, although the data changes in each time interval are very small, there will be certain confusion in the prediction of the deep learning model. How to accurately locate the critical moment and fuse the characteristics of the data itself while giving special weights to the critical moment to avoid confusion in the model is more important. This application first builds an AC-CNN-BiLSTM model, which is composed of an AC (Attention-CNN) fusion module and a CNN-BiLSTM model. The AC module solves the problem of data feature extraction at the critical moment by fusing features of different data dimensions. CNN (Convolutional Neural Networks) is a convolutional neural network; BiLSTM (Bidirectional Long Short-term Memory) is a bidirectional long short-term memory network model.

[0054] Secondly, during the training of a neural network model, model hyperparameters are often determined by observing the loss function curve. Relying on experience and repeated experiments, parameter optimization algorithms are an effective solution for finding the optimal model. To address the problem of optimizing model hyperparameters, this application builds the ISSA-AC-CNN-BiLSTM model. First, the Latin Hypercube Sampling (LHS) method is used to initialize the average probability of the sparrow population in the Sparrow Search Algorithm (SSA). Then, based on the different positioning of the sparrow roles, a sinusoidal function adaptive weight is added to the discoverer position update, allowing the sparrow population to dynamically search for food. Finally, the improved sparrow search algorithm (ISSA) is used to optimize the number of hidden nodes in the neural network to explore the optimal model.

[0055] In summary, this application combines the attention mechanism, the BiLSTM neural network model, and a swarm intelligence algorithm to construct a novel tide prediction model. The construction of this novel tide prediction model is divided into two phases. In the first phase, an AC-CNN-BiLSTM model is constructed, in which the AC extracts spatiotemporal features from both the time and feature dimensions. The spatiotemporal features are then fused using the Hadamard operation to enhance the ability to capture global and temporal information. Finally, the CNN-BiLSTM model learns the temporal correlation between the fused features to map tide heights. In the second phase, an improved sparrow search algorithm (SSA) is used to optimize the parameters of the AC-CNN-BiLSTM model, resulting in the ISSA-AC-CNN-BiLSTM tide prediction model.

[0056] The first stage of building the new tide prediction model is to build the AC-CNN-BiLSTM model as follows:

[0057] The AC-CNN-BiLSTM model consists of an input layer, a fusion feature extraction layer, a BiLSTM layer, a fully connected layer, and a prediction output layer.

[0058] Among them, (1) the input layer is to obtain the time series subsequence by the sliding window. Each time the sliding window slides, a matrix sequence is obtained. The tidal water level element after the maximum moment of each sliding is used as the mapping result, that is, y t+k = x t+k,1 ,Will(( X t-L ,…, X t-1 , X t ), y t+k ) as a batch and put into the Attention-CNN parallel module.

[0059] (2) The fusion feature extraction layer is an AC module that uses multi-layer and multi-scale convolution kernels to extract fine-grained temporal and spatial features. sigmoid Function to assign weights and use the Tensorflow framework multiply Function fusion branch features.

[0060] (3) The BiLSTM layer is composed of multi-layer convolution and BiLSTM network. In this layer, multi-layer convolution kernel is used to extract the fusion features. Then the fusion features are input into the CNN-BiLSTM network to learn the temporal information between subsequences. The Dropout layer is used to prevent the overfitting of the model. The output of the BiLSTM layer is used as the input vector of the fully connected layer. Finally, Dense The function outputs the tide prediction value.

[0061] During the training process of the AC-CNN-BiLSTM model, the above parameters are all adjusted by the model's error back propagation algorithm to minimize the deviation.

[0062] The AC module of the fusion feature extraction layer consists of:

[0063] The AC module captures the correlation information between the context of tide sample data through the Attention branch and the CNN branch, and uses the attention mechanism to extract the temporal information in the tide sequence. Considering the characteristics of the attention mechanism and the data characteristics, a soft attention mechanism is used to train the model. Multi-layer and multi-scale convolution kernels are used to extract fine-grained temporal features, and then Softmax The function assigns contribution weights to each moment, so that the model pays attention to the contribution of different moments to the model prediction during training, and highlights the influence of the periodicity of tidal data. In addition, the weighted form of the attention mechanism is divided into different alignment methods. Since the feature dimension may be low, multiplicative attention is used. The mathematical representation of multiplicative attention involves formulas (1), (2), (3), and (4), where s t , s t-1 Respectively t , t-1 The hidden state of the space corresponding to each moment; h j Indicates the j The hidden vector at the moment contains the information of the entire input subsequence, but focuses on the j a moment; e t,j Indicates at time t and j Attention score between T represents the input time step; α t,j represents the attention allocation coefficient, whose probability sum is 1, W e express t The weight matrix corresponding to the -1 moment:

[0064] (1);

[0065] (2);

[0066] (3);

[0067] (4);

[0068] In the CNN branch, a one-dimensional convolutional neural network is used to extract high-level abstract feature information of the feature vector, namely spatial features. The purpose is to enhance the spatial feature learning ability of the model, thereby deeply learning the hidden associations in the data. The convolution kernel moves along a certain direction. Assuming that the length of the convolution kernel is s , each time moving one square (step_size=1), the sequence length is L , then the output sequence length isL - s +1, and fill the borders to keep the output length consistent with the input length, such as Figure 1 As shown. The convolution process expression is as (5), C is the output feature of the convolutional layer, Z is the input feature, f(·) is the activation function, ☉ is the matrix inner product operation, W is the weight matrix corresponding to the convolution kernel, b is the bias term.

[0069] (5)

[0070] AC modules such as Figure 2 As shown, the left side is the time series data of a single batch taken out, the horizontal axis represents features (Features), and the vertical axis represents the input step (Time_step). Figure 3 The upper branch is a CNN structure, which transforms the input feature vector ( x t,1 , x t,2 , x t,3 ,…, x t,n ) are respectively put into one-dimensional convolution for spatial feature extraction. At this time, the vertical coordinate of the extracted spatial feature layer represents Time_step, and the horizontal coordinate represents Features.

[0071] Figure 2 The lower half of the branch is the Attention time series weight distribution structure. First, the time series data is transposed according to Figure 2 It can be seen that after transposition, each row of the feature matrix is ​​the same feature. These features are arranged in chronological order, and then the time series change vector of each feature ( x t-L,k , x t-L+1,k , x t,3 ,…, x t,k ) One-dimensional convolution is used to extract time features. The vertical coordinate of the time feature represents Features, and the horizontal coordinate represents Time_step. Then the convolution operation is performed row by row, and the time feature is extracted through the Attention mechanism. SoftmaxThe function calculates the weight matrix. In order to make the ordinate and abscissa of the weight matrix consistent with the feature layer of the CNN branch, the transposition operation is performed again. Next, the weight matrix of the Attention temporal weight distribution structure and the spatial feature matrix of the CNN branch are multiplied by the corresponding elements. The purpose of this is to give temporal feature information to spatial features at different times, so that the moments with greater contributions are assigned greater weights, enhance the temporal attention of different spatial features, suppress the influence of spatial features at non-important moments, and more effectively obtain the context information of the subsequence. The specific expressions are as follows (6), (7), and (8). C CNN is the spatial feature matrix of the CNN branch, α t,k For each row of features Softmax The output time weight matrix, C Mix is the spatiotemporal fusion feature, T is the transpose, For the matrix Hadamard Operation, can be a vector or matrix containing all features, and represents only a specific eigenvalue of the vector or matrix, D represents the set of input data, W CNN is the weight matrix in the convolutional neural network (CNN), b CNN is the bias term in the convolutional neural network, W t For time t The weight matrix at time t, b t is the bias term at time t.

[0072] (6);

[0073] (7);

[0074] (8);

[0075] The above is the first stage of the construction of a new tide prediction model. Based on the convolutional neural network and the attention mechanism, a fused convolution model AC-CNN-BiLSTM suitable for tide prediction tasks is proposed. Next, based on the sparrow search algorithm, the ISSA-AC-CNN-BiLSTM combination model is constructed, which is the second stage of the construction of the new tide prediction model. This second stage aims at the AC-CNN-BiLSTM model hyperparameter optimization problem and improves the sparrow search algorithm SSA. The Latin hypercube sampling LHS method is used to initialize the sparrow population so that the sparrow individuals are more evenly distributed in the solution domain. In addition, the sine function adaptive weight is added to the process of the sparrow individual searching for things, so that the sparrow individual searches for food dynamically, avoiding the sparrow individual falling into the local optimum when searching for food. The ISSA algorithm process is as follows Figure 3 shown.

[0076] Population initialization is the initial state of the swarm intelligence optimization algorithm, which dominates the convergence speed and optimization accuracy of the optimization algorithm. When there are few samples or a large number of optimization parameters, the distribution of random numbers will have greater randomness. The traditional method of initializing the population cannot achieve good results. Therefore, this application uses Latin Hypercube Sampling (LHS) to initialize the population.

[0077] Taking m samples in an n-dimensional vector space as an example, the specific steps of LHS are as follows: (1) Determine the number of samples and the dimension of the vector space. (2) Generate m non-overlapping partitions in each dimension so that each interval has the same probability. (3) Select random data points in each partition to establish a sampling matrix. (4) Randomly select a number in each column of the sampling matrix to form a vector. In the sparrow search algorithm, the Latin hypercube sampling method is used to initialize the sparrow population. m represents the number of sparrow populations and can be manually customized. n represents the variable parameter dimension, which is determined by the number of parameters that the model needs to optimize. Figure 4 As shown in Figure 1, (a) generates a sparrow search algorithm based on a random function. It can be seen that the randomly generated population is not evenly distributed, and clustering and clumping frequently occur in the initial population, which can cause the sparrow search to fall into a local optimum. (b) LHS forms a more evenly distributed population with a wider distribution, resulting in a higher probability of obtaining solutions with good diversity and convergence.

[0078] In some embodiments, the sparrow search algorithm, like other common swarm intelligence optimization algorithms, is prone to falling into local optimality. In the later stages of the traditional SSA algorithm iteration, the positions of the three sparrows will be updated in a small range near the optimal point, which can easily lead to stagnation of position updates within a small range. Based on this problem, this application also proposes an improved SSA algorithm, namely the ISSA algorithm, which adds a sine function dynamic adaptive weight to the sparrow finder position update formula to optimize the local exploration problem of the model. The ISSA finder position update formula is (9) and (10).

[0079] (9);

[0080] (10);

[0081] In formula (9), Indicates in t In the +1 iteration, i The first sparrow j Position update value of each dimension; Indicates the i A sparrow in the j The current position in the dimension; represents the attenuation factor, where i is the number of iterations, a is a constant, T is the total number of iterations. This decay factor is used to control the amplitude of position updates to decrease gradually as the number of iterations increases. ST Represents a threshold value for R 2. Compare to determine the location update strategy; w is a weight or parameter used to adjust the moving step size of individual sparrows in the search space; R 2 is a random number in the range [0, 1], which is used to determine whether the sparrow individual adopts a local search strategy or a global search strategy in the current iteration; Q Used in R 2 ≥ ST Adjust the position of individual sparrows; L Represents a random step size or perturbation, which is used to introduce randomness in local search to prevent the algorithm from falling into local optimality;

[0082] In formula (10), represents the independent variable of the sine function, where t is the current iteration number, T is the total number of iterations, this expression ensures that w Changes periodically during the iteration process;b’ Is a correction parameter used to adjust w The value range is set to 1 to ensure w The value of is in the interval [0,1].

[0083] like Figure 5 It can be seen that w As the number of iterations continues to change, the sine function will w The range is controlled within the value range of [-1,0], by modifying the parameters b’ adjust w This application will modify the parameter b’ Set to 1, w The range is limited to the interval [0,1], giving the discoverer a greater weight in the early stage of the algorithm iteration w , which is conducive to global search, in the later stage of algorithm search, w Slow descent, ample time for local exploration, and due to w The value decreases slightly, and a relatively large weight can be obtained in the later stage of iteration, thereby speeding up the local exploration and, to a certain extent, speeding up the overall convergence of the algorithm.

[0084] In some embodiments, using Rosenbrock Function simulation experiments are carried out to verify the convergence effect of the improved ISSA algorithm. When it is a binary function, Rosenbrock The function expression is as shown in formula (11);

[0085] (11).

[0086] This application is for Rosenbrock The function performs independent fitness convergence training. Within 500 iterations, SSA reaches convergence at 27 iterations, and the converged fitness value accuracy reaches 10e-7, while ISSA reaches convergence at 41 iterations, and the converged fitness value accuracy reaches 10e-23. The fitness convergence accuracy is much higher than that of SSA, which shows that the improved ISSA algorithm is much higher than the ordinary SSA algorithm in terms of convergence fitness accuracy.

[0087] Although it has been verified that the ISSA search algorithm has a higher optimization effect than the SSA search algorithm, considering the time efficiency and model accuracy of ISSA algorithm parameter optimization, a too large optimization range will lead to a long model training time, and a too small optimization range will lose model accuracy, so it is necessary to limit the optimization range of the parameters.

[0088] In the CNN-BiLSTM model, this application uses three BiLSTM layers to deeply extract time series sample features. The BiLSTM model contains many hyperparameters, among which the hyperparameters that have a greater impact on the accuracy of tide prediction are: the number of hidden units in the first layer G 1. Number of hidden units in the second layer G 2. Number of hidden units in the third layer G 3. The batch size of each training is batch_size, which has a great impact on the accuracy of the network model and the training speed. Therefore, this application uses BiLSTM to train separately. RMSE 、 MAE 、 R ² is the evaluation criterion for the number of hidden units G i , batch_size, these four parameters limit the optimization range. RMSE 、 MAE The smaller the result, the higher the accuracy of tidal water level prediction. R The larger the value, the better the model, that is, the better the model fit.

[0089] like Figure 6 As shown in Figure 2, (a) is the relationship between the loss function curve and the hidden unit (Hidden_nodes). It can be seen that with the increase in the number of training times and the increase in the number of Hidden_nodes, the loss function curve converges faster and the fitting degree becomes smoother. (b)(c)(d) are the relationship between the number of Hidden_nodes and the loss function curve. RMSE 、 MAE 、 R From the histogram of the relationship between the two nodes, we can see that as the number of Hidden_nodes increases, the histogram shows a V-shaped trend. RMSE 、 MAE When the number is 5 and 100, there are two low evaluation indicators. R ² is higher, so these two Hidden_nodes values ​​are better during the training process. However, in order to ensure the optimization speed of SSA and the training speed of the model, this application will abandon the range search when the number of Hidden_nodes is 100. In order to ensure that the model accurately searches for the optimal parameter position, the number of Hidden_nodes is set to a step-like shape, and the number of hidden units in the first layer is set to G The value range of 1 is set to [10,80], and the number of hidden units in the second layer is G 2 is set to [30,70], the number of hidden units in the third layer G3 is set to [40,60]. The batch_size setting should not be too large or too small. Therefore, mini-batch is the most commonly used in actual projects, and the size is usually set to dozens or hundreds. Therefore, the range of batch_size is limited to [16,64].

[0090] The tide prediction model, ISSA-AC-CNN-BiLSTM, combines an improved SSA algorithm with the AC-CNN-BiLSTM neural network model for training. The training process first initializes the sparrow population, then uses the CNN-BiLSTM model to calculate its fitness. The fitness function is set as the root mean square error (RMSE) during network model training. Each training session aims to find a position that minimizes the RMSE. Based on the fitness value, the positions of the sparrow spotters, followers, and sentinels are updated until the training termination criteria are met. Finally, the neural network model with the optimal parameters is used to predict tide levels and tested on a validation set.

[0091] like Figure 7 The figure shows the flow chart of the tide prediction model. Based on the ISSA-AC-CNN-BiLSTM model, the tide level is predicted on the original tide data processed by the data processing module to obtain the prediction results.

[0092] The present invention also provides a tide prediction system based on the ISSA-AC-CNN-BiLSTM model, which includes a memory for storing computer program instructions and a processor for executing the program instructions. When the computer program instructions are executed by the processor, the system is triggered to execute the aforementioned tide prediction method based on the ISSA-AC-CNN-BiLSTM model.

[0093] In summary, the ISSA-AC-CNN-BiLSTM model proposed in this paper leverages the effectiveness of the AC module to construct an AC-CNN-BiLSTM model. This model optimizes hyperparameters using a sparrow search algorithm and improves the basic sparrow search algorithm. Latin hypercube sampling is used to initialize the initial population of sparrows with equal probability, resulting in a more uniform distribution of sparrows. A sinusoidal function adaptive weighting formula is also incorporated, allowing individual sparrows to dynamically search at different iteration stages as the number of iterations increases. Finally, the Rosenbrock function is used to verify the search capability of the improved sparrow search algorithm. Based on this, the ISSA-AC-CNN-BiLSTM model is constructed, achieving superior feature extraction and prediction performance, with high accuracy and strong generalization capabilities for tidal level prediction.

[0094] It should be noted that the system of the present invention may further include one or more of the following components: a processor and a memory.

[0095] Optionally, the processor utilizes various interfaces and circuits to connect various components within the autonomous device. It executes instructions, programs, code sets, or instruction sets stored in memory, as well as accesses data stored in memory, to perform various functions and process data within the autonomous device. Optionally, the processor can be implemented in at least one hardware form factor selected from the group consisting of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a neural network processing unit (NPU). The CPU primarily handles the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing content displayed on the touchscreen display; and the NPU implements artificial intelligence (AI) capabilities.

[0096] The memory may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory includes non-transitory computer-readable storage medium. The memory may be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing each of the above method embodiments, etc.; the data storage area may store data generated by the use of the autonomous operating device, etc.

[0097] The present disclosure also provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to be executed by a processor to implement the positioning control method for the autonomous operating equipment as described in the above embodiment.

[0098] Although the present invention has been described in detail with reference to the accompanying drawings and in conjunction with preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and such modifications or substitutions shall be within the scope of the present invention or any person skilled in the art who can easily conceive of changes or substitutions within the technical scope disclosed in the present invention shall be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A tide prediction method based on ISSA-AC-CNN-BiLSTM model, characterized in that: The method includes: Step 1: Build the AC-CNN-BiLSTM model based on the AC module; Step 2: The improved sparrow search algorithm (SSA) is combined with the AC-CNN-BiLSTM model to construct the ISSA-AC-CNN-BiLSTM model. Step 3: Based on the tidal data, the constructed ISSA-AC-CNN-BiLSTM model is used to predict the tidal water level and obtain the prediction results; The AC module captures the correlation information between the context of tide sample data through the Attention branch and the CNN branch, and uses the attention mechanism to extract the temporal information in the tide sequence to train the model; uses multi-layer multi-scale convolution kernels to extract fine-grained temporal features, and then uses Softmax The function assigns contribution weights to each moment; The temporal weight distribution structure of the Attention branch includes: first, transposing the temporal data. After the transposition, each row of the feature matrix is ​​the same feature, and these features are arranged in chronological order; then, the temporal change vector ( x t-L,k , x t-L+1,k , x t,3 ,…, x t,k ) is put into one-dimensional convolution for time feature extraction, convolution operation is performed row by row, and the attention mechanism is used to extract the time feature. Softmax The function calculates the weight matrix, which is expressed as formula (7), and transposes the weight matrix. Finally, the weight matrix and the spatial feature matrix of the CNN branch are multiplied by corresponding elements, which are expressed as formulas (6) and (8) to give temporal feature information to the spatial features at different times. (6); (7); (8); in, C CNN is the spatial feature matrix of the CNN branch, α t,k For each row of features Softmax The output time weight matrix, C Mix is the spatiotemporal fusion feature, T is the transpose, ⊗ is the matrix Hadamard Operation, X t-L is a vector or matrix containing all features, and X t-L,k represents only a specific eigenvalue of the vector or matrix, D represents the set of input data, W CNN is the weight matrix in CNN, b CNN is the bias term in CNN, W t For time t The weight matrix at time t, b t is the bias term at time t.

2. The method according to claim 1, characterized in that The AC-CNN-BiLSTM model in step 1 includes an input layer, a fusion feature extraction layer, a BiLSTM layer, a fully connected layer, and a prediction output layer; The input layer obtains the time series subsequence by the sliding window. Each time the sliding window slides, a matrix sequence is obtained. The tidal water level element after the maximum moment of each sliding is used as the mapping result, that is, y t+k = x t+k,1 ,Will(( X t-L ,…, X t-1 , X t ), y t+k ) as a batch and put into the Attention-CNN parallel module; The fusion feature extraction layer is an AC module that uses multi-layer and multi-scale convolution kernels to extract fine-grained temporal and spatial features. sigmoid Function to assign weights and use the Tensorflow framework multiply Function fusion branch features; The BiLSTM layer is composed of multi-layer convolution and BiLSTM network. Multi-layer convolution kernels are used in the BiLSTM layer to extract the fused features. The fused features are then input into the CNNS-BiLSTM network to learn the temporal information between subsequences. The Dropout layer is used to prevent overfitting of the model. The output of the BiLSTM layer is used as the input vector of the fully connected layer. Finally, the Dense function outputs the tide prediction value.

3. The method according to claim 1, characterized in that The weighted form of the attention mechanism adopts the weighted form of multiplication attention. The formula involved in the weighted summation process of multiplication attention is as follows: (1); (2); (3); (4); in, s t , s t-1 Respectively t , t-1 The hidden state of the space corresponding to each moment; h j Indicates the j The hidden vector at the moment contains the information of the entire input subsequence, but focuses on the j a moment; T represents the input time step; α t,j represents the attention allocation coefficient, whose probability sum is 1; e t,j Indicates at time t and j Attention score between W e express t The weight matrix corresponding to the -1 moment.

4. The method according to claim 3, characterized in that In the CNN branch, a one-dimensional convolutional neural network is used to extract high-level abstract feature information of the feature vector, namely, spatial features. The convolution kernel moves along a certain direction. Assuming that the length of the convolution kernel is s , each time moving one square, the sequence length is L , then the output sequence length is L - s +1, and fill the boundaries to keep the output length consistent with the input length; The convolution process is expressed as formula (5): (5); Where, C is the output feature of the convolutional layer, Z is the input feature, f(·) is the activation function, ☉ is the matrix inner product operation, W is the weight matrix corresponding to the convolution kernel, b is the bias term.

5. The method according to claim 4, characterized in that The improved SSA algorithm in step 2 includes initializing the sparrow population using Latin hypercube sampling (LHS). The specific steps of the LHS are as follows: S201: determining the number of samples and the dimension of the vector space; S202: generating m non-overlapping partitions in each dimension so that each interval has the same probability; S203: selecting random data points in each partition to establish a sampling matrix; S204: randomly selecting a number in each column of the sampling matrix to form a vector.

6. The method according to claim 5, characterized in that The improved SSA algorithm in step 2 includes: adding a sine function dynamic adaptive weight to the sparrow finder position update formula to optimize the local exploration problem of the model. The finder position update formula of the improved SSA algorithm is (9) and (10): (9); (10); In formula (9), Indicates in t In the +1 iteration, i The first sparrow j Position update value of each dimension; Indicates the i A sparrow in the j The current position in the dimension; represents the attenuation factor, where i is the number of iterations, a is a constant, T is the total number of iterations. This decay factor is used to control the amplitude of position updates to decrease gradually as the number of iterations increases. ST Represents a threshold value for R 2. Compare to determine the location update strategy; w is a weight or parameter used to adjust the moving step size of individual sparrows in the search space; R 2 is a random number in the range of [0,1], which is used to determine whether the sparrow individual adopts a local search strategy or a global search strategy in the current iteration; Q Used in R 2≥ ST Adjust the position of individual sparrows; L Represents a random step size or perturbation, which is used to introduce randomness in local search to prevent the algorithm from falling into local optimality; In formula (10), represents the independent variable of the sine function, where t is the current iteration number, T is the total number of iterations, this expression ensures that w Changes periodically during the iteration process; b’ Is a correction parameter used to adjust w The value range is set to 1 to ensure w The value of is in the range [0,1].

7. The method according to claim 1, characterized in that The step 2 further comprises: using Rosenbrock Function simulation experiments are used to verify the convergence effect of the improved SSA algorithm. Rosenbrock The function expression is formula (11): (11); The step 2 further includes: using BiLSTM to train separately RMSE 、 MAE 、 R ² is the optimization range of the evaluation criteria limit parameters.

8. A tide prediction system based on the ISSA-AC-CNN-BiLSTM model, the system comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein: When the computer program instructions are executed by the processor, the system is triggered to execute the tide prediction method based on the ISSA-AC-CNN-BiLSTM model described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • CNN-BiLSTM-ATTENTION-based tide level prediction method and system

    CN118656643A