Ship meteorological data optimization method and device and electronic equipment

By constructing a three-dimensional tensor and convolutional neural network combined with a Transformer model to process ship navigation data, data processing problems in dynamic changes and complex environments are solved, and meteorological and marine data generation with high time resolution and accuracy is achieved, and navigation safety is improved.

CN120408050APending Publication Date: 2025-08-01WUHAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510426302.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The prior art is difficult to deal with dynamic changes and complex environmental ship navigation data, resulting in low navigation safety.

Method used

By constructing three-dimensional tensors and inputting them into the convolutional neural network model, spatial feature extraction is performed, and time-step jump pairing is combined with the Transformer model to generate high-temporal resolution meteorological and marine data, and to match the space-time attributes and transform directional features with the ship navigation data.

Benefits of technology

Improves the temporal resolution of meteorological and marine data and the accuracy and safety of ship navigation data, providing reliable data support for path optimization and real-time monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408050A_ABST
    Figure CN120408050A_ABST
Patent Text Reader

Abstract

The invention relates to a ship meteorological data optimization method and device, and electronic equipment, and belongs to the technical field of data optimization, and the method comprises the steps: constructing a three-dimensional tensor at a given time according to original meteorological marine information data, inputting the three-dimensional tensor into a fully trained convolutional neural network model, and carrying out the optimization of the three-dimensional tensor; outputting and obtaining spatial features of the meteorological ocean information data; performing time step jump pairing on the spatial features to obtain target time step features, and inputting the target time step features into a self-attention mechanism model to obtain high-time-resolution meteorological ocean data; and carrying out space-time attribute matching and direction feature conversion on the high-time-resolution meteorological ocean data and the ship navigation data, and determining optimized ship navigation data. According to the invention, the technical problem that ship navigation data with dynamic change and complex environment is difficult to process in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data optimization processing, and in particular, to a method, device and electronic device for optimizing ship meteorological data. Background Art

[0002] With the booming development of the global shipping industry, the safety and efficiency of ship navigation have become increasingly crucial, and the accurate and timely processing of meteorological and oceanographic data is the core element for ensuring navigation decisions.

[0003] Currently, traditional data processing technologies dominate the optimization processing of meteorological and oceanographic data. For example, simple interpolation methods or rule-based interpolation methods are inefficient in the face of data missing or outliers and are difficult to cope with complex environmental changes. For example, although traditional linear interpolation can improve the time resolution of meteorological and oceanographic data, under high-noise or extreme meteorological conditions, the prediction accuracy is poor and cannot meet the high requirements of ship navigation decisions. CNN and LSTM in deep learning models have been introduced for feature extraction of meteorological and oceanographic data and can extract spatial and temporal features.

[0004] However, in the prior art, when a single model processes data, it is easy to lose data features, and its ability to process complex environmental information is limited, which affects the accuracy and reliability of data analysis. Moreover, meteorological and oceanographic data change dynamically, and traditional methods are difficult to respond in real time, threatening the safety and efficiency of ship navigation. Summary of the Invention

[0005] In view of this, it is necessary to provide a method, device and electronic device for optimizing ship meteorological data to solve the technical problem in the prior art that it is difficult to process ship navigation data with dynamic changes and complex environments, resulting in low ship navigation safety.

[0006] To solve the above problems, in a first aspect, the present invention provides a method for optimizing ship meteorological data, including:[ Constructing a three-dimensional tensor at a given time according to the original meteorological and oceanographic information data, and inputting the three-dimensional tensor into a trained convolutional neural network model to output the spatial features of the meteorological and oceanographic information data; Performing time-step jump pairing on the spatial features to obtain target time-step features, and inputting the target time-step features into a Transformer model to output target meteorological and oceanographic data; Performing spatio-temporal attribute matching and direction feature transformation on the target meteorological and oceanographic data and ship navigation data to determine the optimized ship meteorological data.

[0007] In a possible implementation manner, the trained neural network model includes a tensor layer, a normalization layer, a convolutional layer, an activation function layer, an average pooling layer, a feature flattening layer, and a fully connected layer; The tensor layer is used to construct the original meteorological and oceanographic information data into a three-dimensional tensor at a given time; The normalization layer is used to perform normalization processing on the three-dimensional tensor to obtain normalized processing features; The convolutional layer is used to perform local area weighting processing on the normalized processing features to obtain a feature map; The activation function layer is used to perform non-linear processing on the feature map to obtain an activated feature map; The average pooling layer is used to perform downsampling on the activated feature map to obtain a second feature map; The feature flattening layer is used to flatten the second feature map into a one-dimensional vector; The fully connected layer is used to map the one-dimensional vector to the input of time series prediction to obtain the spatial features of meteorological and oceanographic information data.

[0008] In a possible implementation, after performing time step jump pairing on the spatial features, it further includes: Performing flattening mapping processing on the features of each time step to obtain time series vectors, and determining the target time step features according to multiple time series vectors; The target time step features are represented by the following formula:

[0009] Where and are the input features at the and moments, is the feature of the target time step.

[0010] In a possible implementation, the Transformer model includes a discontinuous attention calculation layer, a multi-head parallel attention calculation layer, a residual connection layer, an attention normalization layer, and a non-linear transformation layer; The discontinuous attention calculation layer is used to map the target time step features to a query matrix , a key matrix , and a value matrix , and calculate and determine the similarity of each time step pairing, and calculate the similarity between the query matrix and the key matrix; The multi-head parallel attention calculation layer is used to split the query matrix , the key matrix , and the value matrix into multiple heads, calculate the time step dependencies of different subspaces in parallel, and splice the outputs of all heads to obtain a splicing result; The residual connection layer is used to add the output of the multi-head parallel attention calculation layer to the input to obtain an addition result; The attention normalization layer is used to normalize the added result to obtain a processed result; The non-linear transformation layer is used to map the processed result to obtain predicted data.

[0011] In a possible implementation, obtaining the target meteorological and oceanographic data includes: Combining the predicted data with the original meteorological and oceanographic information data to obtain the target meteorological and oceanographic data.

[0012] In a possible implementation, the step of performing spatio-temporal attribute matching and direction feature transformation on the target meteorological and oceanographic data and the ship navigation data to determine the optimized ship meteorological data includes: Based on the time distance determination method, determining a subset of meteorological and oceanographic data in the target meteorological and oceanographic data that is closest to the time point of the ship navigation data; Using a preset bilinear interpolation method to map the meteorological and oceanographic data in the subset of meteorological and oceanographic data to the actual position of the ship to obtain the meteorological and oceanographic data at the target position; Converting the absolute direction of the meteorological and oceanographic data at the target position into a relative direction and performing a consistency process to obtain the optimized ship meteorological data.

[0013] In a possible implementation, before determining a subset of meteorological and oceanographic data in the target meteorological and oceanographic data that is closest to the time point of the ship navigation data, it further includes: Using a preset isolation forest anomaly detection method to perform anomaly detection on the initial ship navigation data to determine outliers; Based on dynamic matrix decomposition for outlier and missing value imputation, obtaining the ship navigation data.

[0014] In a second aspect, the present invention further provides a ship meteorological data optimization device, including: A spatial feature extraction module, configured to construct a three-dimensional tensor at a given time according to the original meteorological and oceanographic information data, and input the three-dimensional tensor into a trained convolutional neural network model to output the spatial features of the meteorological and oceanographic information data; A time feature extraction module, configured to perform time step jump pairing on the spatial features to obtain target time step features, and input the target time step features into a Transformer model to output the target meteorological and oceanographic data; A matching module, configured to perform spatio-temporal attribute matching and direction feature transformation on the target meteorological and oceanographic data and the ship navigation data to determine the optimized ship meteorological data.

[0015] In a third aspect, the present invention further provides an electronic device, including: a processor and a memory; A computer-readable program executable by the processor is stored in the memory; When the processor executes the computer-readable program, the steps in the ship meteorological data optimization method described above are implemented.

[0016] In a fourth aspect, the present invention also provides a computer-readable storage medium storing one or more programs, and the one or more programs are executable by one or more processors to implement the steps in the ship meteorological data optimization method described above.

[0017] The beneficial effects of the present invention are as follows: In order to solve the problem that it is difficult to process ship navigation data with dynamic changes and complex environments in the prior art and improve the timeliness and accuracy of ship ocean data, the present invention first constructs a three-dimensional tensor at a given time according to the original meteorological and ocean information data, and inputs the three-dimensional tensor into a trained convolutional neural network model to output the spatial features of the meteorological and ocean information data; Subsequently, the spatial features are paired by time-step jumps to obtain target time-step features, and the target time-step features are input into a self-attention mechanism model to obtain high-time-resolution meteorological and ocean data; thereby improving the time resolution of meteorological and ocean data and the data quality of ship navigation. Finally, the high-time-resolution meteorological and ocean data is subjected to spatio-temporal attribute matching, direction feature transformation and collaborative processing with ship navigation data, and an accurate and consistent data set can be generated, improving the application accuracy and safety of ship navigation data, and further providing reliable data support for path optimization, real-time monitoring and risk assessment in ocean transportation. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a flowchart of a method according to an embodiment of the ship meteorological data optimization method provided by the present invention; Figure 2 It is a structural architecture diagram of a convolutional neural network according to an embodiment of the ship meteorological data optimization method provided by the present invention; Figure 3 It is a schematic flowchart of step S104 according to an embodiment of the ship meteorological data optimization method provided by the present invention; Figure 4 It is a schematic flowchart of a method for preprocessing data according to an embodiment of the ship meteorological data optimization method provided by the present invention; Figure 5 It is a schematic diagram of an embodiment of the ship meteorological data optimization device provided by the present invention; Figure 6 It is a schematic diagram of an operating environment of an embodiment of the electronic device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0019] The preferred embodiments of the present invention will be specifically described below with reference to the accompanying drawings. The accompanying drawings form a part of this application and are used together with the embodiments of the present invention to explain the principles of the present invention, but are not used to limit the scope of the present invention.

[0020] Before presenting the embodiments, the following terms are explained.

[0021] Meteorological and oceanographic grid data: Meteorological and oceanographic grid data are structured numerical data released by international meteorological agencies (such as ECMWF, NOAA), covering the global or regional scope in the form of regular grids, including time, space dimensions, and multi-parameter meteorological and oceanographic observation / forecast values.

[0022] Meteorological and oceanographic information data: Meteorological and oceanographic information data are data after preprocessing and feature extraction, containing the key spatio-temporal patterns of the original grid data, and are used as inputs to deep learning models to generate high-resolution predictions.

[0023] Jump pairing: Jump pairing is a non-continuous time series modeling method that combines the features of non-adjacent time steps as inputs to predict the data of the target time step to capture long-range dependencies and mutation events.

[0024] A specific embodiment of the present invention discloses a method for optimizing ship meteorological data. Please refer to Figure 1 , including: S101. Construct a three-dimensional tensor at a given time based on the original meteorological and oceanographic information data, and input the three-dimensional tensor into a trained convolutional neural network model to output the spatial features of the meteorological and oceanographic information data; It should be noted that the original meteorological and oceanographic information data is meteorological and oceanographic information data that is spatio-temporally matched based on standard term ocean grid data. Spatio-temporal precise matching based on standard term ocean grid data can reduce the spatio-temporal error between the ship's navigation trajectory and meteorological data as low as possible, and data extraction based on complete grid data can fill in the missing values to ensure the data integrity.

[0025] S102. Perform time step jump pairing on the spatial features to obtain target time step features, and input the target time step features into a Transformer model to output the target meteorological and oceanographic data; It should be noted that the jump input constructs a data set according to a non-continuous time series. In this embodiment, the spatial features at the and moments are used as input features to predict the target data at the moment. The defined input sequence is:

[0026] Among them, and are the input features at the and moments, and

[0027] S103. Perform spatio-temporal attribute matching and direction feature transformation on the target meteorological and oceanographic data and the ship navigation data to determine the optimized ship meteorological data.

[0028] It should be noted that through the data collaborative processing of spatio-temporal attribute matching and direction feature transformation of the high-time-resolution meteorological and oceanographic data and the ship navigation data, the accuracy and consistency of the data can be significantly improved.

[0029] In this embodiment, in order to solve the problem of difficult processing of ship navigation data with dynamic changes and complex environments in the prior art and improve the timeliness and accuracy of ship oceanographic data, the present invention first constructs a three-dimensional tensor at a given time according to the original meteorological and oceanographic information data, and inputs the three-dimensional tensor into a trained convolutional neural network model to output the spatial features of the meteorological and oceanographic information data; then performs time-step jump pairing on the spatial features to obtain target time-step features, and inputs the target time-step features into a self-attention mechanism model to obtain high-time-resolution meteorological and oceanographic data; thereby improving the time resolution of the meteorological and oceanographic data and the data quality of ship navigation. Finally, performing spatio-temporal attribute matching, direction feature transformation and collaborative processing on the high-time-resolution meteorological and oceanographic data and the ship navigation data can generate an accurate and consistent data set, improve the application accuracy and safety of ship navigation data, and further provide reliable data support for path optimization, real-time monitoring and risk assessment in ocean transportation.

[0030] In some embodiments of the present invention, as Figure 2 shown, the trained neural network model includes a tensor layer, a normalization layer, a convolutional layer, an activation function layer, an average pooling layer, a feature flattening layer and a fully connected layer; The tensor layer is used to construct the original meteorological and oceanographic information data into a three-dimensional tensor at a given time; The normalization layer is used to perform normalization processing on the three-dimensional tensor to obtain normalized processing features; The convolutional layer is used to perform local area weighting processing on the normalized processing features to obtain a feature map; The activation function layer is used to perform non-linear processing on the feature map to obtain an activation feature map; The average pooling layer is used to perform downsampling on the activation feature map to obtain a second feature map; The feature flattening layer is used to flatten the second feature map into a one-dimensional vector; The fully connected layer is used to map the one-dimensional vector into the input for time series prediction, obtaining the spatial features of meteorological and oceanographic information data.

[0031] It should be noted that to ensure the efficient input of meteorological and oceanographic data into the CNN, the data is first organized in the form of a multi-dimensional tensor. The tensor layer includes data over a given time The input tensor form is:

[0032] where and are the height and width of the grid respectively, represents the number of channels (such as wind speed, wave height).

[0033] It should be noted that the normalization layer is used to normalize the data to prevent the adverse effects of inconsistent feature scales on the model:

[0034] where and are the mean and standard deviation of the data. The normalization process ensures that each dimension of the data has the same magnitude, thereby improving the stability and convergence speed of model training.

[0035] It should be noted that the convolutional layer uses a sliding window to scan the input tensor through convolutional operations and captures the spatial features of the local regions of meteorological and oceanographic data. For a given convolutional kernel and bias term , the convolutional operation of the th layer is:

[0036] where, is the output value of the th convolutional layer at position . is the weight at position in the th convolutional kernel. The input value at position in the th feature map.

[0037] It should be noted that to enhance the model's fitting ability for complex patterns, an activation function layer is added after each convolutional operation, and its definition is as follows:

[0038] where Is the activation value output by the convolutional layer.

[0039] It should be noted that by downsampling the feature map, the size of the feature map is reduced while important information is retained. Using an average pooling layer to downsample the feature map can smoothly extract the spatial features of meteorological and oceanographic data and capture the continuous changes of data variables. The average pooling is defined as follows:

[0040] Where, Represents the average pooling output value within the pooling window The average pooling output value within the pooling window. Is the size of the pooling window. Is the position value of the original feature map within the window.

[0041] It should be noted that after the convolution and pooling operations are completed, the extracted feature map is flattened into a one-dimensional vector by a feature flattening layer, and then a final high-dimensional mapping is performed through a fully connected layer:

[0042] Where, Is the output of the fully connected layer. Is the weight matrix of the fully connected layer. Is the bias term. Is to flatten the output of the pooling layer into a one-dimensional vector. The fully connected layer is responsible for integrating the high-dimensional features extracted by the convolutional network, capturing the complex patterns of meteorological and oceanographic data, obtaining the spatial features of meteorological and oceanographic information data, and providing input for subsequent time series prediction.

[0043] It should be noted that the training of the convolutional neural network is carried out in a conventional manner, which is not limited herein.

[0044] In some embodiments of the present invention, the Transformer model includes a discontinuous attention calculation layer, a multi-head parallel attention calculation layer, a residual connection layer, an attention normalization layer, and a non-linear transformation layer; The discontinuous attention calculation layer is used to map the target time step feature into a query matrix 、a key matrix and a value matrix , calculate and determine the similarity of each time step pair, and calculate the similarity between the query matrix and the key matrix; The multi-head parallel attention calculation layer is used to split the query matrix 、the key matrix and the value matrix into multiple heads, calculate the time step dependencies of different subspaces in parallel, and splice the outputs of all heads to obtain a splicing result; The residual connection layer is used to add the output of the multi-head parallel attention calculation layer to the input to obtain an addition result; The attention normalization layer is used to perform normalization processing on the addition result to obtain a processed result; The non-linear transformation layer is used to perform mapping processing on the processed result to obtain prediction data.

[0045] It should be noted that in order to extract effective temporal dependencies from non-consecutive inputs, the input features are mapped to a query matrix , a key matrix and a value matrix , which are respectively used to measure the similarity between different time steps:

[0046] Among them, , , is a trainable projection matrix that maps the input features from dimensions to dimensions. Each time pair will be calculated separately to capture the dependencies between non-consecutive time points.

[0047] Subsequently, through the self-attention mechanism, the similarity between the query matrix and the key matrix is calculated to determine the importance of each pair of inputs in the prediction at the target time step:

[0048] Each element in the attention matrix represents the importance of input and and in the prediction at time step . The scaling factor

[0049] prevents the similarity value from being too large, and the Softmax function normalizes the result to weights.

[0050]

[0051] Each head calculates the dependencies of the input time steps in different subspaces, then concatenates the outputs of all heads, and maps them back to the original space through .

[0052] Further, residual connection and normalization are performed on the output of each layer to ensure the smooth propagation of gradients between non-consecutive time steps:

[0053] Among them, is the input pairing feature, is the output of the multi-head attention. Layer normalization helps to stabilize the training process.

[0054] The feature after passing through the multi-head attention is input into the feed-forward network for non-linear transformation, and the target time step is predicted:

[0055] Among them and are weight matrices, and are bias terms, is the hidden layer dimension.

[0056] It should be noted that it is optimized by minimizing the mean squared error (MSE) loss function:

[0057] Among them, is the feature of the predicted target time step, is the true feature. The MSE loss function measures the error between the predicted value and the true value, and the model is continuously optimized through gradient descent.

[0058] In this embodiment, through this design, the prediction data generated by the model based on the jump pairing time step is merged with the original data to obtain meteorological and oceanographic data with high time resolution.

[0059] In some embodiments of the present invention, for the spatio-temporal attribute matching and direction feature transformation of the target meteorological and oceanographic data and the ship navigation data, and determining the optimized ship meteorological data, please refer to Figure 3 and includes: S301. Based on the time distance determination method, determine the subset of meteorological and oceanographic data in the target meteorological and oceanographic data that is closest to the time point of the ship navigation data; It should be noted that first, a subset of meteorological and oceanographic data that is closest to the time point of the ship navigation data is selected from the high-resolution meteorological and oceanographic data through the time distance judgment method.

[0060] S302. Adopt the preset bilinear interpolation method to map the meteorological and oceanographic data in the subset of meteorological and oceanographic data to the actual position of the ship to obtain the meteorological and oceanographic data at the target position; It should be noted that the meteorological and oceanographic data is mapped to the actual position of the ship through the bilinear interpolation method. For the given ship coordinate position , the corresponding meteorological and oceanographic data grid point values are respectively , the meteorological and oceanographic data at the target location is as follows:

[0061] Among them, , , and are the coordinates corresponding to the meteorological grid points. Through the spatio-temporal attribute matching method, the ship navigation data and the meteorological and oceanographic data are processed collaboratively to obtain the meteorological and oceanographic data at the target location.

[0062] S303. Convert the absolute direction of the meteorological and oceanographic data at the target location into a relative direction and perform a consistency process to obtain the optimized ship meteorological data.

[0063] It should be noted that based on the preliminary collaborative feature dataset, the absolute direction of some vector meteorological and oceanographic data is converted into a relative direction. Let the heading of the ship be , and the direction of the vector meteorological and oceanographic data be . The converted relative direction is:

[0064] Furthermore, by performing a consistency process on data with different features, it is converted into a high-quality collaborative feature dataset. Let be the original feature dataset, be the data point to be converted, and the feature value of the data point after feature space mapping is:

[0065] Finally, the optimized ship navigation data of the ship navigation data and the meteorological and oceanographic data is obtained.

[0066] In some embodiments of the present invention, before determining the subset of meteorological and oceanographic data closest to the time point of the ship navigation data in the target meteorological and oceanographic data, please refer to Figure 4 , it further includes: S401. Use a preset isolation forest anomaly detection method to perform anomaly detection on the initial ship navigation data to determine the outliers; It should be noted that the ship navigation data includes AIS data and voyage report data, specifically including information such as MMSI number, timestamp, geographical coordinates, course over ground, ship speed, etc.

[0067] It should be noted that the isolation forest constructs multiple binary trees to isolate each data sample one by one, and calculates the anomaly score of each data point based on the average path length of the sample in the tree structure :

[0068] wherein is a normalization coefficient. The higher the anomaly score, the more likely the data point is to deviate from the normal pattern. By setting a threshold , adaptively identify the anomaly points in the data and mark them as objects to be corrected.

[0069] S402. Based on the interpolation of outliers and missing values by dynamic matrix decomposition, obtain the ship navigation data.

[0070] It should be noted that for the interpolation of outliers and missing values based on dynamic matrix decomposition. For the data marked as abnormal or missing, introduce the dynamic matrix decomposition method. First, organize the navigation data into a matrix , wherein , represents the observation value of the th feature at time . Matrix decomposition represents as the sum of a low-rank matrix and a sparse matrix , that is . Among them, represents the main structure of the data, capturing the overall trend, while captures the noise and abnormal terms. By solving the following optimization problem, extract the low-rank matrix :

[0071] wherein, represents the nuclear norm of the matrix, used to ensure low rank; is the L1 norm, encouraging the sparsity of abnormal terms. The low-rank matrix obtained through optimization is used to further reconstruct the data. Specifically, for a certain missing or abnormal value , it can be filled by the value at the corresponding position in the reconstructed matrix to ensure that the interpolated data conforms to the overall trend.

[0072] In this embodiment, high-quality ship navigation data sets are obtained through data cleaning, providing a solid foundation for subsequent data collaborative processing.

[0073] Based on the above ship meteorological data optimization method, an embodiment of the present invention further provides a ship meteorological data optimization device. Please refer to Figure 5 , including: A spatial feature extraction module 510, configured to construct a three-dimensional tensor at a given time according to the original meteorological and oceanographic information data, and input the three-dimensional tensor into a trained convolutional neural network model to output the spatial features of the meteorological and oceanographic information data; The time feature extraction module 520 is configured to perform time-step jump pairing on the spatial features to obtain target time-step features, and input the target time-step features into a Transformer model to output target meteorological and oceanographic data; The matching module 530 is configured to perform spatio-temporal attribute matching and direction feature transformation on the target meteorological and oceanographic data and the ship navigation data to determine optimized ship meteorological data.

[0074] As Figure 6 shown, based on the above ship meteorological data optimization method, the present invention also correspondingly provides an electronic device, which may be a computing electronic device such as a mobile terminal, a desktop computer, a notebook, a palm computer, and a server. The electronic device includes a processor 610, a memory 620, and a display 630. Figure 6 Only some components of the electronic device are shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components may be alternatively implemented.

[0075] The memory 620 may be an internal storage unit of the electronic device in some embodiments, such as a hard disk or memory of the electronic device. The memory 620 may also be an external storage electronic device of the electronic device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device. Further, the memory 620 may also include both an internal storage unit and an external storage electronic device of the electronic device. The memory 620 is used to store application software installed on the electronic device and various types of data, such as program codes installed on the electronic device. The memory 620 may also be used to temporarily store data that has been output or will be output. In one embodiment, a ship meteorological data optimization program 640 is stored on the memory 620, and the ship meteorological data optimization program 640 can be executed by the processor 610 to implement the ship meteorological data optimization method of various embodiments of the present application.

[0076] The processor 610 may be a central processing unit (CPU), a microprocessor, or other data processing chips in some embodiments, and is used to run program codes stored in the memory 620 or process data, such as executing the ship meteorological data optimization method.

[0077] The display 630 may be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode) toucher, etc. in some embodiments. The display 630 is used to display the information of the marine meteorological data optimization electronic device and to display a visual user interface. The components 610-630 of the electronic device communicate with each other through the system bus.

[0078] Those skilled in the art can understand that all or part of the processes of implementing the methods of the above embodiments can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium is a magnetic disk, an optical disk, a read-only memory, or a random access memory, etc.

[0079] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention.

Claims

1. A method for optimizing ship meteorological data, characterized in that, Including: Construct a three-dimensional tensor at a given time based on the original meteorological and oceanographic information data, and input the three-dimensional tensor into a trained convolutional neural network model to output the spatial features of the meteorological and oceanographic information data; Perform time-step jump pairing on the spatial features to obtain target time-step features, and input the target time-step features into a Transformer model to output target meteorological and oceanographic data; Perform spatio-temporal attribute matching and direction feature transformation on the target meteorological and oceanographic data and the ship navigation data to determine the optimized ship meteorological data.

2. The ship meteorological data optimization method according to claim 1, characterized in that The trained neural network model includes a tensor layer, a normalization layer, a convolutional layer, an activation function layer, an average pooling layer, a feature flattening layer, and a fully connected layer; The tensor layer is used to construct the original meteorological and oceanographic information data into a three-dimensional tensor at a given time; The normalization layer is used to perform normalization processing on the three-dimensional tensor to obtain normalized processing features; The convolutional layer is used to perform local area weighting processing on the normalized processing features to obtain a feature map; The activation function layer is used to perform non-linear processing on the feature map to obtain an activated feature map; The average pooling layer is used to perform downsampling on the activated feature map to obtain a second feature map; The feature flattening layer is used to flatten the second feature map into a one-dimensional vector; The fully connected layer is used to map the one-dimensional vector to the input of time series prediction to obtain the spatial features of the meteorological and oceanographic information data.

3. The method for optimizing ship meteorological data according to claim 1, characterized in that, After performing time-step jump pairing on the spatial features, it further includes: Perform flattening mapping processing on the features of each time step to obtain time series vectors, and determine the target time-step features according to multiple time series vectors; The target time-step features are represented by the following formula: Among them, and are the input features at the and moments, and is the feature at the target time step.

4. The method for optimizing ship meteorological data according to claim 3, characterized in that The Transformer model includes a discontinuous attention calculation layer, a multi-head parallel attention calculation layer, a residual connection layer, an attention normalization layer, and a non-linear transformation layer; The discontinuous attention calculation layer is used to map the target time step features into a query matrix , a key matrix and a value matrix , calculate and determine the similarity of each time step pair, and calculate the similarity between the query matrix and the key matrix; The multi-head parallel attention calculation layer is used to split the query matrix , the key matrix and the value matrix into multiple heads, calculate the time-step dependencies in different subspaces in parallel, and splice the outputs of all heads to obtain a splicing result; The residual connection layer is used to add the output of the multi-head parallel attention calculation layer and the input to obtain an added result; The attention normalization layer is used to perform normalization processing on the added result to obtain a processed result; The non-linear transformation layer is used to perform mapping processing on the processed result to obtain prediction data.

5. The ship meteorological data optimization method according to claim 4, characterized in that, The obtaining of the target meteorological and oceanographic data includes: Merge the prediction data with the original meteorological and oceanographic information data to obtain the target meteorological and oceanographic data.

6. The ship meteorological data optimization method according to claim 1, characterized in that The performing of spatio-temporal attribute matching and direction feature transformation on the target meteorological and oceanographic data and the ship navigation data to determine the optimized ship meteorological data includes: Based on the time distance determination method, determine the subset of meteorological and oceanographic data in the target meteorological and oceanographic data that is closest to the time point of the ship navigation data; Use a preset bilinear interpolation method to map the meteorological and oceanographic data in the subset of meteorological and oceanographic data to the actual position of the ship to obtain the meteorological and oceanographic data at the target position; Convert the absolute direction of the meteorological and oceanographic data at the target position into a relative direction and perform consistency processing to obtain the optimized ship meteorological data.

7. The method for optimizing ship meteorological data according to claim 6, characterized in that Before determining the subset of meteorological and oceanographic data that is closest in time to the ship navigation data in the target meteorological and oceanographic data, it further includes: Using a preset isolation forest anomaly detection method to perform anomaly detection on the initial ship navigation data to determine outliers; Based on dynamic matrix decomposition for outlier and missing value imputation, obtaining the ship navigation data.

8. A ship meteorological data optimization device, characterized in that, It includes: A spatial feature extraction module, configured to construct a three-dimensional tensor at a given time according to the original meteorological and oceanographic information data, and input the three-dimensional tensor into a trained convolutional neural network model to output the spatial features of the meteorological and oceanographic information data; A temporal feature extraction module, configured to perform temporal step jump pairing on the spatial features to obtain target temporal step features, and input the target temporal step features into a Transformer model to output the target meteorological and oceanographic data; A matching module, configured to perform spatio-temporal attribute matching and direction feature transformation on the target meteorological and oceanographic data and the ship navigation data to determine the optimized ship meteorological data.

9. An electronic device, characterized in that, It includes: A processor and a memory; The memory stores a computer-readable program executable by the processor; When the processor executes the computer-readable program, it implements the steps in the ship meteorological data optimization method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the ship meteorological data optimization method according to any one of claims 1-7.