Long-term prediction method of sound velocity profile based on Transformer
Through the long-term prediction method of sound velocity profile based on Transformer, using technologies such as parallel processing and attention mechanism, the problems of low timeliness and insufficient accuracy of sound velocity profile inversion in the existing technology have been solved, and accurate long-term prediction and high efficiency of ocean sound velocity profile have been achieved. predict.
Patent Information
- Application Number
- CN202411060107.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-08-05
AI Technical Summary
The existing technology has the problems of low timeliness, insufficient accuracy and high complexity of model training in the sound velocity profile inversion method, making it difficult to achieve long-term prediction of ocean sound velocity profile.
The long-term prediction method of sound speed profile based on Transformer is adopted. By learning the spatiotemporal change rules of historical sound speed profile time series, parallel processing, attention mechanism, position coding and time information coding are introduced to build a Semi-Transformer model for prediction.
It significantly improves the accuracy and time performance of sound velocity profile prediction, enables long-term prediction of future full-ocean depth sound velocity profiles, and enhances the reliability and prediction efficiency of the model.
Smart Images

Figure CN118586447B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of ocean observation, and in particular, relates to a Transformer-based long-term prediction method for a sound velocity profile. Background Art
[0002] A research team from the University of California, San Diego, USA, proposed a sound velocity profile inversion method based on dictionary learning. The focus of this method is to sparsely express the sound velocity profile to reduce the number of eigenvectors and coefficients, and to optimize the resolution of the sound velocity profile by generating a function dictionary, thereby reducing the inversion error. However, this method belongs to the category of matching field processing of classical inversion methods, and its process of searching for matching items is very complex, resulting in insufficient inversion accuracy and poor inversion timeliness. In order to improve the speed of searching for matching items in matching field processing, Professor Huang Yiwang and others from Harbin Engineering University proposed an improved sound velocity profile inversion algorithm using a perturbation method. This algorithm increases the sound velocity perturbation by fine-tuning the average sound velocity profile, thereby increasing the amount of perturbation of the sound velocity perturbation on the propagation time of the sound line, reducing the impact of the timing error on the inversion algorithm, and improving the sensitivity of the inversion algorithm to the sound velocity perturbation. In addition, this algorithm converts the sound velocity profile inversion problem from a nonlinear optimization problem to the form of a linear equation system, which improves the timeliness of the inversion at the expense of some accuracy. However, although the improved algorithm improves the timeliness of sound velocity profile inversion to a certain extent, it does not substantially improve the accuracy of inversion, nor does it solve the problem of predicting the sound velocity profile in the time dimension.
[0003] In order to solve the shortcomings of traditional sound speed profile inversion methods in inversion accuracy, Zhou Jianbo and others from Northwestern Polytechnical University introduced machine learning methods into the task of sound speed profile construction and proposed a nonlinear sound speed profile inversion method based on self-organizing map neural network (SOM). This method uses the sea surface temperature and sea surface height anomaly data obtained from satellite observations and combines the empirical orthogonal coefficients of Argo data to generate training maps. The sound speed profile is inverted by matching the best neurons, so that the relationship between sea surface and underground parameters can be better expressed. Compared with traditional methods such as matching field processing, this method has improved inversion accuracy. However, the above methods are all based on spatial sound speed profile inversion, which can only reflect the sound speed profile situation in the past or current moment, and are highly dependent on real-time sonar observation data, making it difficult to accurately predict future sound speed profiles. In order to realize the prediction function of ocean sound speed profiles in the time dimension and fill the gap in sound speed prediction methods, Huang Wei and others from Ocean University of China proposed a sound speed profile prediction method based on hierarchical long short-term memory neural network. This method regards the historical sound speed distribution of different ocean depth layers as multiple time series, and establishes corresponding prediction models for each depth layer, so as to achieve accurate prediction of the full-sea depth sound speed profile. Although this method successfully achieves the prediction function of future sound speed profiles, its training process is relatively complicated, and the time complexity of the hierarchical training processing method is high, which limits the prediction efficiency of the model and makes long-term prediction of sound speed profiles difficult.
[0004] In summary, although the above-mentioned related studies have generally achieved relatively reliable spatial sound speed profile inversion and time prediction, there are generally problems such as low timeliness, insufficient accuracy and high complexity of model training, which limits the scope of application. In current marine scientific research, the difficulty in observing ocean sound speed information, the poor real-time performance of sound speed data and the scarcity of data are particularly common. Therefore, achieving long-term prediction of sound speed profiles is a major trend in future research in the field of ocean acoustics. Summary of the invention
[0005] The purpose of this application is to provide a Transformer-based long-term prediction method for sound velocity profile to make up for the shortcomings of the existing technology.
[0006] The present invention mainly makes long-term forecasts of future sound speed profiles by learning the spatiotemporal variation laws and inherent dependencies of the time series of historical sound speed profiles at different sea depths. The parallel processing method is used to improve the time efficiency of the prediction. The attention mechanism, position encoding and time information encoding are introduced to further enhance the model's ability to extract the spatiotemporal dependencies of historical sound speed data.
[0007] To achieve the above objectives, this application is implemented through the following technical solutions:
[0008] A Transformer-based long-term prediction method for sound velocity profile includes the following specific steps:
[0009] S1: Collect the monthly or daily average sound speed profile data of the sea area and perform data preprocessing;
[0010] S2: Perform position encoding on the model input data after data preprocessing;
[0011] S3: Encode the time information of the input data after the position encoding is completed, and record the model input after the position encoding and time information encoding as ;
[0012] S4: Build a Semi-Transformer model, in which: an X-dimensional sequence input layer is used, an L-head multi-head attention layer is introduced, and a feed-forward network FFN is added after the multi-head attention layer; in addition, the model adopts an N-layer stacking structure, and a linear fully connected layer is added at the output end of the model;
[0013] S5: Using the encoded training set Train the Semi-Transformer model;
[0014] S6: During the training process, the convergence of the Semi-Transformer model is verified;
[0015] S7: Use the trained Semi-Transformer model to perform long-term prediction of the sound speed profile and output the prediction results.
[0016] Furthermore, the S1 is specifically:
[0017] S1-1: Taking the monthly average as an example, the data set contains 12M sound velocity profiles. After time sorting, the sorted data set is expressed as:
[0018] (1);
[0019] in, ~ It represents 12M sound velocity profiles sorted by time;
[0020] Each sound velocity profile is further represented as a spatial vertical distribution sound velocity value data vector, Take this as an example (the representation of the spatial vertical distribution of other sound velocity profiles is similar):
[0021] (2);
[0022] in, It indicates the sound velocity value of the first sound velocity profile at a sea depth of F meters, where F represents the full ocean depth (usually F>2000m);
[0023] S1-2: The full-sea depth sound velocity profile is stratified at unequal intervals according to its typical four-layer structure (surface isothermal layer, seasonal jump layer, main jump layer, deep sea isothermal layer), and is divided into K layers. In the deep sea isothermal layer, the influence of temperature on the propagation velocity of underwater sound is weakened, and it is mainly affected by pressure, showing a linear change trend. Therefore, the sea depth below 2000 meters is divided into the last layer. The data set after stratification is expressed as:
[0024] (3);
[0025] in, It indicates the sound velocity value of the 12Mth sound velocity profile in the Kth depth layer sorted by time, 12M is the time index, is the depth layer index; the dataset S is normalized:
[0026] (4);
[0027] The normalized data set is divided. Taking the prediction of 12 monthly average sound speed profiles in the next year as an example, the data of the first M-1 years of the data set are used as the training set of the model, and the data of the Mth year are used as the validation set. If the sound speed profiles of many consecutive years in the future need to be predicted, the division method is similar.
[0028] Furthermore, in S2, the position coding is specifically performed as follows:
[0029] (5);
[0030] (6);
[0031] Among them, pos represents the position of the data to be encoded, i represents the dimension, Represents the dimension of the embedding vector.
[0032] Furthermore, in S3, the specific encoding method is as follows:
[0033] (7);
[0034] in, is the time information encoding value, Represents the index value of the sound speed sequence arranged in chronological order, ,' ' indicates remainder processing. Taking the sound speed time series of January as an example, the indexes are 0, 12, 24, ..., 12 (M-2), and the remainder 12 is 0. Finally, the time code information of January is -1. Similarly, the time information codes of February to December are -9 / 11, -7 / 11, -5 / 11, -3 / 11, -1 / 11, 1 / 11, 3 / 11, 5 / 11, 7 / 11, 9 / 11, 1. That is, the time information encoding operation fixes the month information at [-1,1].
[0035] Furthermore, in S4, the multi-head attention layer in the model is implemented based on the self-attention mechanism, and the specific calculation method of self-attention is as follows:
[0036] Input the model after position encoding and time information encoding Through three weight matrices , , Perform matrix transformation to obtain the Q, K, and V matrices required to calculate the self-attention value:
[0037] (8);
[0038] (9);
[0039] (10);
[0040] Using Q, K, and V obtained by matrix transformation, calculate the self-attention value:
[0041] (11);
[0042] in, is the transpose of the K matrix, is the dimension of the K matrix.
[0043] Multi-head attention is composed of multiple independently running self-attention layers, that is, using multiple groups of , , Multiple sets of Q, K, and V matrices are obtained, and the self-attention value of each attention head is calculated respectively. Then, the multiple results are weightedly combined, and finally the output of the multi-head attention is formed through linear transformation.
[0044] The specific calculation method is as follows:
[0045] (12);
[0046] (13);
[0047] in, , is the number of multi-head attention heads; It is The output of an attention head; They are Q, K, V matrices corresponding to the attention heads; is the linear transformation matrix.
[0048] The calculation method of the masked multi-head attention layer is the same as that of the multi-head attention layer. The only difference is that a mask is added on the basis of the multi-head attention to ensure that the speed of sound information at future moments cannot be seen during model training. In addition, after passing through the multi-head attention layer and FFN in the stacking module, the input data is not directly passed to the next layer, but is processed by the residual block and layer normalization. The purpose is to prevent model degradation during training, speed up training, and improve training stability.
[0049] Furthermore, in S5, during the training process, a batch training method is adopted to divide the training data into small batches, and a part of the data is input into the model for training each time, which can reduce the computational burden and make better use of computing resources. At the same time, an adaptive learning rate adjustment strategy is adopted to dynamically adjust the learning rate according to the performance of the model during the training process, so that the model can better adapt to the training conditions at different stages, thereby improving the stability and efficiency of the training. In addition, in order to improve the time performance of the sound speed profile prediction, the model training process is carried out in an offline manner.
[0050] Furthermore, in S6, during the model training process, the training status of the model is monitored to ensure that the performance of the model on the sound speed training set reaches the expected level. Determine whether the trained model has reached convergence. When the loss function Loss value during the training process tends to be stable, it can be determined that the model has converged. If the Loss value is still decreasing after the model training is completed, it means that the model has not converged and there is still room for improvement. If the model converges, go to S7 to predict the sound speed profile; if the model does not converge, return to S4, fine-tune the constructed model and retrain; repeat this process until the model reaches the expected convergence state.
[0051] Furthermore, in S7, the data of the target task at the current time (i.e., the sound speed data before the prediction time) is first used as the input of the model, and a multi-step prediction is performed and a denormalization process is performed to obtain the monthly average layered sound speed profile for the next year (i.e., the Mth year):
[0052] (14);
[0053] here, ~ It means January to December of the next year. It indicates the predicted sound velocity value of the sound velocity profile at the Kth depth layer in January of the next year;
[0054] Perform linear interpolation on the layered sound velocity profile to obtain the full sea depth sound velocity profile for the next year:
[0055] (15)
[0056] here, It represents the predicted sound speed value of the sound speed profile at a sea depth of F meters in the next January.
[0057] Compared with the prior art, the present invention has the following beneficial effects:
[0058] The present invention solves the problem of long-term prediction of ocean sound speed profile in time, and uses the characteristic information of historical sound speed time series to accurately predict the sound speed profile for a period of time in the future. The present invention fully captures the distribution law of sound speed time series at different sea depths through parallel processing and attention mechanism, thereby realizing the long-term prediction of the full sea depth sound speed profile in the future; by introducing position coding and time information coding, the model's ability to extract the spatiotemporal dependency between historical sound speed data is further enhanced, thereby improving the prediction accuracy of the full sea depth sound speed profile. These improvements significantly improve the prediction accuracy of the full sea depth sound speed profile, thereby enhancing the reliability of the model in long-term prediction of the sound speed profile.
[0059] Compared with other existing sound speed profile prediction methods, the present invention incorporates time information into the sound speed sequence prediction problem for the first time, significantly improving the prediction accuracy and time performance of the model, and providing important guiding significance for subsequent ocean acoustic research. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 This is a schematic diagram of the long-term prediction method of ocean sound speed profile based on Semi-Transformer.
[0061] Figure 2 It is a structural diagram of the Semi-Transformer model.
[0062] Figure 3 This is a schematic diagram comparing the predicted full-sea depth sound speed profile for a certain month in the next year with the actual sound speed profile (taking December as an example), where (a) is the predicted result for the Pacific Ocean (152.5°E, 18.5°N), (b) is the predicted result for the Atlantic Ocean (44.5°W, 24.5°N), (c) is the predicted result for the Indian Ocean (65.5°E, 20°N), and (d) is the predicted result for the South China Sea (116.5°E, 15.5°N).
[0063] Figure 4This is a schematic diagram comparing the predicted sound speed change trend of a certain depth layer in the next year with the actual change trend (taking the 6th depth layer as an example, corresponding to 40 meters sea depth). Among them, (a) is the prediction result for the Pacific Ocean (152.5°E, 18.5°N), (b) is the prediction result for the Atlantic Ocean (44.5°W, 24.5°N), (c) is the prediction result for the Indian Ocean (65.5°E, 20°N), and (d) is the prediction result for the South China Sea (116.5°E, 15.5°N). DETAILED DESCRIPTION
[0064] The present invention is further described below through specific embodiments in conjunction with the accompanying drawings.
[0065] Embodiment 1:
[0066] A Transformer-based long-term prediction method for sound velocity profile is implemented as follows: Figure 1 As shown:
[0067] Step 1: Data preprocessing:
[0068] First, a large amount of monthly average sound speed profile data of four sea areas over a 10-year history (2013-2022) was obtained from the global Argo public data set, each of which contains 120 sound speed profiles. The specific locations of the four sea areas are: Pacific Ocean (152.5°E, 18.5°N), Atlantic Ocean (44.5°W, 24.5°N), Indian Ocean (65.5°E, 20.5°S), and South China Sea (116.5°E, 15.5°N).
[0069] Secondly, the sound speed data is sorted by time. The sorted data set can be expressed as follows, taking the Pacific Ocean as an example:
[0070] ;
[0071] here, ~ Represents 120 monthly average sound velocity profiles in 10 years sorted by time.
[0072] Each sound velocity profile is further represented as a spatial vertical distribution sound velocity value data vector, For example:
[0073] ;
[0074] here, It represents the sound velocity value of the first sound velocity profile at a sea depth of 2000 meters, where 2000 meters approximately represents the full ocean depth. The spatial vertical distribution of the remaining sound velocity profiles is represented in a similar way.
[0075] Since the distribution patterns of sound velocity time series at different sea depths are different, it is necessary to input the full sea depth sound velocity data in parallel. However, if the parallel input data is too large, it will lead to problems such as increased computing resource requirements and decreased model computing power. In order to improve the efficiency of the model, the full sea depth sound velocity profile is layered at unequal intervals according to its typical four-layer structure (surface isothermal layer, seasonal jump layer, main jump layer, deep sea isothermal layer). Small intervals are used for shallow waters, and large intervals are used for deep seas, with a total of 58 layers. In the deep sea isothermal layer, the speed of underwater sound propagation is less affected by temperature and is mainly affected by pressure, showing a linear change trend. Therefore, all sea depths below 2000 meters are classified as the last layer.
[0076] The Pacific dataset after layering can be expressed as:
[0077] ;
[0078] here, It indicates the sound velocity value of the first sound velocity profile in the first layer sorted by time. The first subscript 1 is the time index. is the depth level index.
[0079] For the dataset Perform normalization:
[0080] ;
[0081] By analogy, the preprocessed data sets of the Atlantic Ocean, Indian Ocean, and South China Sea can be expressed as:
[0082] ;
[0083] ;
[0084] ;
[0085] Finally, the data from the first 9 years (2013-2021) of the dataset are used as the training set of the model, and the data from the last year (2022) are used as the validation set.
[0086] After data preprocessing is completed, proceed to step 2.
[0087] Step 2: Positional encoding:
[0088] Since the long-term prediction of ocean sound speed profiles requires processing a long input sequence, and the time series of sound speeds at different depths have different changing patterns, a parallel input strategy is adopted. That is, the model needs to process multiple sound speed time series data at the same time, thereby improving the ability to capture the spatiotemporal characteristics of ocean sound speed. In ocean sound speed prediction, it is particularly important to positionally encode the sound speed time series. Sound speed profile data usually has a strict vertical distribution and has continuous changes in time, so position encoding can help the model understand the sequential relationship between time series data at different depths.
[0089] The preprocessed model input data is positionally encoded. The specific implementation of position encoding is as follows:
[0090] ;
[0091] ;
[0092] Here, pos represents the position of the data to be encoded, i represents the dimension, Represents the dimension of the embedding vector.
[0093] After the position encoding is completed, go to step 3.
[0094] Step 3: Time information encoding:
[0095] The role of position encoding in step 2 in the prediction of the sound speed profile time series is similar to the contextual relationship in the natural language processing task, which ensures that the time order of the sound speed data is correctly represented. Considering that the sound speed distribution is significantly affected by temperature, temperature changes in different seasons will lead to large differences in the sound speed data. Therefore, the same location will show stronger similarities in the same month of different years, especially in the shallow sea part which is more affected by temperature, the similarity of sound speed distribution is more significant.
[0096] The purpose of encoding time information is to embed specific time information into the time series data of the sound velocity profile, similar to classifying data into time units such as years, months, and days. For example, if the monthly average sound velocity data is used, the interval of time information encoding is "month". The historical sound velocity data set contains the monthly average data of M-1 years, which are arranged in chronological order, and the index is sorted from 0. By encoding time information, it is ensured that the model can take into account the sequence and specific time information when learning the sound velocity data, thereby improving the prediction ability of the model.
[0097] After the position encoding is completed, the input data is encoded with time information. The specific encoding method is as follows:
[0098] ;
[0099] here, is the time information encoding value, Represents the index value of the sound speed sequence arranged in chronological order, ,' ' indicates remainder processing. Taking the sound speed time series of January as an example, the indexes are 0, 12, 24, ..., 96, and the remainder 12 is 0. Finally, the time code information of January is -1. Similarly, the time information codes of February to December are -9 / 11, -7 / 11, -5 / 11, -3 / 11, -1 / 11, 1 / 11, 3 / 11, 5 / 11, 7 / 11, 9 / 11, 1. That is, the time information encoding operation fixes the month information at [-1, 1].
[0100] The model input after position encoding and time information encoding is recorded as .
[0101] After the time information encoding is completed, go to step 4.
[0102] Step 4: Build a Semi-Transformer model and use an X-dimensional sequence input layer so that the model can process the speed of sound sequence data of all depth layers in parallel. Next, introduce an L-head multi-head attention layer to help the model learn the correlation between speed of sound data from different angles. To enhance the expressiveness of the model, a feed forward net (FFN) is added after the multi-head attention layer, which contains The model uses an N-layer stacking structure, and increasing the depth of the model helps improve its learning and generalization capabilities. Finally, a linear fully connected layer is added to the output of the model to map the features learned by the model to the sound speed values of all depth layers at future moments, thereby completing the long-term prediction task of the ocean sound speed profile.
[0103] The network model is built according to the characteristics of the input sound speed data. The general structure of the Semi-Transformer model is as follows: Figure 2 In the model, a 58-dimensional sequence input layer is used, and an 8-head multi-head attention layer is introduced. To enhance the expressiveness of the model, a feed forward net (FFN) is added after the multi-head attention layer. The number of neurons is , the model stacking layer number N=4, and finally add a linear fully connected layer at the output of the model.
[0104] The specific calculation method of self-attention is as follows, taking the Pacific Ocean data as an example, the calculation of other sea areas is similar:
[0105] Input the model after position encoding and time information encoding Through three weight matrices , , Perform matrix transformation to obtain the Q, K, and V matrices required to calculate the self-attention value:
[0106] ;
[0107] ;
[0108] ;
[0109] Using Q, K, and V obtained by matrix transformation, calculate the self-attention value:
[0110] ;
[0111] here, is the transpose of the K matrix, is the dimension of the K matrix.
[0112] Multi-head attention is composed of multiple independently running self-attention layers, that is, using multiple groups of , , Multiple sets of Q, K, and V matrices are obtained, and the self-attention value of each attention head is calculated respectively. Then, the multiple results are weightedly combined, and finally the output of the multi-head attention is formed through linear transformation.
[0113] The specific calculation method is as follows:
[0114] ;
[0115] ;
[0116] here, , that is, the number of multi-head attention heads; It is The output of an attention head; They are Q, K, V matrices corresponding to the attention heads; is the linear transformation matrix.
[0117] The calculation method of the masked multi-head attention layer is the same as that of the multi-head attention layer. The difference is that it adds a mask processing on the basis of the multi-head attention to ensure that the speed of sound information at future moments cannot be seen during model training. In addition, after passing through the multi-head attention layer and FFN in the stacking module, the input data is not directly passed to the next layer, but is processed by the residual block and layer normalization.
[0118] After the model is built, go to step 5.
[0119] Step 5: Model training:
[0120] After completing the model building, use the encoded training set The models are fully trained separately so that they can fully learn the relationship between the historical sound speed data input from different sea areas. Batch training is used during training ( ) and adaptive learning rate adjustment strategy (every 100 training times, the learning rate becomes 50% of the original learning rate), the initial learning rate is set to , number of training ,The training process of the model is carried out in an offline way.
[0121] After the model training is completed, go to step 6.
[0122] Step 6: Model convergence verification:
[0123] During the model training process, the training status of the model is monitored to ensure that the performance of the model on the speed of sound training set reaches the expected level. Determine whether the trained model has reached convergence. When the loss function Loss value during training tends to be stable, the model can be judged to have converged. If the Loss value is still decreasing after the model training is completed, it means that the model has not converged and there is still room for improvement.
[0124] If the model converges, go to step 7 to predict the sound velocity profile; if the model does not converge, return to step 4 to fine-tune the built model and retrain it. Repeat this process until the model reaches the expected convergence state.
[0125] In this embodiment, the models of the four sea areas all reach a convergence state.
[0126] Step 7: Long-term prediction of sound speed profile:
[0127] When predicting the sound velocity profile, firstly, the current data of the four regional target tasks (i.e., the sound velocity data before the prediction time) are used as the input of the model, and multi-step prediction is performed and denormalization is performed to obtain the monthly average layered sound velocity profile for the next year (2022):
[0128] ;
[0129] ;
[0130] ;
[0131] ;
[0132] Here, the subscript It means January to December of the next year. It indicates the predicted sound velocity value at the 58th depth layer of the sound velocity profile in January of the next year.
[0133] Perform linear interpolation on the layered sound velocity profile to obtain the full sea depth sound velocity profile for the next year:
[0134] ;
[0135] ;
[0136] ;
[0137] ;
[0138] here, It represents the predicted sound speed value of the sound speed profile at a sea depth of 2000 meters in the next January.
[0139] After the full-sea-depth sound velocity profile prediction is completed, proceed to step 8.
[0140] Step 8: Error calculation:
[0141] In order to verify the reliability of the sound velocity profile prediction model, the root mean square error (RMSE), mean absolute error (MAE), mean square error (MSE) and other indicators are used as the evaluation criteria of the model. The smaller the RMSE, MAE and MSE, the higher the prediction accuracy. The specific calculation method is as follows, taking the prediction of the future January as an example:
[0142] ;
[0143] ;
[0144] ;
[0145] here, and The predicted sound velocity profile in January 2022 and the actual sound velocity profile in January 2022 at sea depth are The speed of sound at meters.
[0146] Table 1 Predicted errors of 12 monthly average sound speed profiles in the four sea areas in the next year
[0147] .
[0148] The predicted errors of 12 monthly average sound speed profiles in the four sea areas in the next year are shown in Table 1. It can be seen that the present invention performs well in the prediction tasks of multiple sea areas. The evaluation results show that the deviation between the predicted sound speed profile and the actual sound speed profile is small, and the prediction accuracy far exceeds the existing advanced sound speed prediction methods. This further confirms the high reliability of the present invention in the long-term prediction of ocean sound speed profiles.
[0149] Figure 3 The comparison between the full-sea-depth sound speed profiles predicted by the Semi-Transformer model in four sea areas and the actual sound speed profiles is shown. Here, the results in December are taken as an example. It can be clearly seen that the full-sea-depth sound speed profiles predicted in the four sea areas almost perfectly match the actual sound speed profiles, and the fitting effect is excellent. The predicted sound speed profiles accurately reflect the characteristic information of the actual sound speed profiles, showing the powerful ability of the model in sound speed prediction.
[0150] also, Figure 4 The predicted sound speed change trend of the sound speed profile at the 6th depth layer (40 meters deep) in the four sea areas in the next year is also compared with the actual sound speed data change trend. The dotted line represents the predicted sound speed change trend, while the solid line represents the actual change trend of the depth layer. It can be seen that the proposed sound speed profile prediction model can accurately capture the dynamic change law of sound speed in different regions in the future, further demonstrating the superior performance of the model in long-term prediction of sound speed profile.
[0151] The present invention is mainly to solve the long-term prediction problem of ocean sound speed profile, so as to realize accurate prediction of sound speed distribution in multiple sea areas in the future, improve the prediction efficiency of sound speed distribution, and thus meet the requirements of underwater acoustic positioning system for real-time performance and high precision. The temporal and spatial distribution of ocean sound speed has an important influence on the propagation mode of underwater acoustic signals. Therefore, it is very important to estimate and predict the ocean sound speed distribution quickly and accurately, which is of great significance for providing underwater positioning, navigation and timing services.
[0152] Finally, although this specification is described according to implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
Claims
1. A Transformer-based long-term prediction method for sound velocity profile, comprising the following specific steps: S1: Collect the monthly or daily average sound velocity profile data of the sea area and perform data preprocessing; the data preprocessing include: The sound velocity profile data is processed by time sorting, each sound velocity profile is further represented as a spatial vertical distribution sound velocity value data vector, and then layered processing is performed, and finally normalization processing is performed; the S1 is specifically: S1-1: Taking the monthly average as an example, the data set contains 12M sound velocity profiles. After time sorting, the sorted data set is expressed as: S={S 1 ,S 2 ,…,S i },i=1,2,...,12M (1); Among them, S 1 ~S i It represents 12M sound velocity profiles sorted by time; Each sound velocity profile is further represented as a spatial vertical distribution sound velocity value data vector, S 1 For example: Among them, s 1,dF It represents the sound velocity value of the first sound velocity profile at a sea depth of F meters, where F represents the full ocean depth; S1-2: The full-sea-depth sound velocity profile is stratified at different intervals according to the surface isotherm, seasonal jump layer, main jump layer, and deep-sea isotherm, and is divided into K layers. The data set after stratification is expressed as: Among them, S 12M,lK It represents the sound velocity value of the 12Mth sound velocity profile sorted by time at the Kth depth layer, 12M is the time index, and lK is the depth layer index; the data set S is normalized: S2: Perform position encoding on the model input data after data preprocessing; the specific implementation method of position encoding is as follows: Among them, pos represents the position of the data to be encoded, i represents the dimension, and d model represents the dimension of the embedding vector; S3: Encode the time information of the input data after the position encoding is completed, and record the model input after the position encoding and time information encoding as The specific encoding method is as follows: Among them, TE is the time information encoding value, index represents the sound speed sequence index value arranged in chronological order, index=(0,1,2,...,12(M-1)-1), % means remainder processing; S4: Build a Semi-Transformer model. In this model: an X-dimensional sequence input layer is used, an L-head multi-head attention layer is introduced, and a feedforward network FFN is added after the multi-head attention layer; in addition, the model adopts an N-layer stacking structure, and a linear fully connected layer is added at the output end of the model; the multi-head attention layer in the model is implemented based on the self-attention mechanism, and the specific calculation method of self-attention is as follows: Input the model after position encoding and time information encoding Through three weight matrices W Q , W K , W V Perform matrix transformation to obtain the Q, K, and V matrices required to calculate the self-attention value: Using Q, K, and V obtained by matrix transformation, calculate the self-attention value: Among them, K T is the transpose of the K matrix, d k is the dimension of the K matrix; Multi-head attention is composed of multiple independently running self-attention layers, that is, using multiple groups of W Q , W K , W V Get multiple sets of Q, K, and V matrices, calculate the self-attention value of each attention head respectively, then perform weighted combination of the multiple results, and finally form the output of the multi-head attention through linear transformation; the specific calculation method is as follows: H i =SelfAttention(Q i ,K i ,V i ) (12); MultiHead(Q,K,V)=Concat(H 1 ,...,H n )W 0 (13); Where i = 1, 2, ..., n, n is the number of multi-head attention heads; H i is the output of the i-th attention head; Q i , K i , V i are the Q, K, and V matrices corresponding to the i-th attention head; W 0 is the linear transformation matrix; The calculation method of the masked multi-head attention layer is the same as that of the multi-head attention layer. The only difference is that it adds a mask processing on the basis of the multi-head attention. In addition, the input data is not directly passed to the next layer after passing through the multi-head attention layer and FFN in the stacking module, but is processed by the residual block and layer normalization. S5: Using the encoded training set Train the Semi-Transformer model; S6: During the training process, the convergence of the Semi-Transformer model is verified; S7: Use the trained Semi-Transformer model to perform long-term prediction of the sound speed profile and output the prediction results.
2. The method for long-term prediction of sound velocity profile according to claim 1, It is characterized in that In S5, during the training process, a batch training method is adopted, and an adaptive learning rate adjustment strategy is adopted to dynamically adjust the learning rate according to the performance of the model during the training process; in addition, in order to improve the time performance of the sound speed profile prediction, the model training process is carried out in an offline manner.
3. The method for long-term prediction of sound velocity profile according to claim 1, It is characterized in that In S6, it is determined whether the trained model has reached convergence. When the loss function Loss value during the training process tends to be stable, the model can be determined to have converged. If the Loss value is still decreasing after the model training is completed, it means that the model has not converged and there is still room for improvement. If the model converges, it goes to S7 to predict the sound velocity profile. If the model does not converge, return to S4 to fine-tune the built model and then retrain; Repeat this process until the model reaches the expected convergence state.
4. The method for long-term prediction of sound velocity profile according to claim 1, It is characterized in that In S7, the data of the target task at the current moment is first used as the input of the model, and a multi-step prediction is performed and a denormalization process is performed to obtain the monthly average layered sound velocity profile for the next year: Among them, t+1~t+12 means January to December of the next year. It indicates the predicted sound velocity value of the sound velocity profile at the Kth depth layer in January of the next year; Perform linear interpolation on the layered sound velocity profile to obtain the full ocean depth sound velocity profile for the next year: in, It represents the predicted sound speed value of the sound speed profile at a sea depth of F meters in the next January.
Citation Information
Patent Citations
An electric heating distribution transformer load prediction method and device
CN109636059A
Acoustic array circuit system
CN111427043A
Flight-crossing type sounding data profile sound velocity correction method combining historical profile sound velocity and actually measured surface sound velocity
CN113191087A
Voice recognition method and system based on audio and video dual modes
CN114974215A
Self-adaptive cloud service quality dynamic prediction method and device
CN115713263A
