Sea wave height prediction method and device, storage medium and electronic device
By using high-resolution cameras and a dynamic prediction model with a sliding window and LSTM network, the method addresses the high cost and complexity of traditional buoy-based sea wave monitoring, achieving cost-effective and accurate sea wave height prediction.
Patent Information
- Application Number
- CN202510314588.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-07-15
AI Technical Summary
While traditional buoy monitoring methods can provide high-precision wave height measurements, they are expensive, resulting in high deployment and maintenance costs.
A high-resolution camera is used to collect wave videos, and the wave image feature vector is extracted through a pre-trained target encoder, and a dynamic prediction model, including sliding windows and long and short-term memory networks, is used to predict wave height.
It reduces the cost of wave height prediction while maintaining high prediction accuracy, which is suitable for safety and efficiency requirements of offshore operations.
Smart Images

Figure CN120318291A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of marine monitoring, and more particularly, to a method and device for predicting wave height, a storage medium, and an electronic device. Background Art
[0002] Offshore operations, especially activities such as offshore wind power, oil exploration, and marine scientific research, have extremely high requirements for real-time and accurate marine environment monitoring. Among them, the monitoring of wave height is one of the key parameters to ensure the safe operation and efficient operation of offshore facilities. Traditionally, the monitoring of wave height mainly relies on buoy monitoring methods. Although this method can provide high-precision measurement results, its high cost and deployment complexity have become a major challenge.
[0003] In the related art, there is no effective solution to the problem that the traditional buoy monitoring method for monitoring wave height has high accuracy but high cost. Summary of the Invention
[0004] Embodiments of the present application provide a method and device for predicting wave height, a storage medium, and an electronic device, so as to at least solve the problem in the prior art that the traditional buoy monitoring method for monitoring wave height has high accuracy but high cost.
[0005] According to an embodiment of the embodiments of the present application, a method for predicting wave height is provided, including: acquiring a real-time wave video collected by a high-resolution camera, where the positions where the high-resolution camera is deployed include at least: an offshore wind turbine tower; extracting a feature vector of each frame of wave image in the real-time wave video through a pre-trained target encoder; inputting the feature vector into a dynamic prediction model connected to the target encoder to predict the wave height corresponding to the real-time wave video through the dynamic prediction model, where the dynamic prediction model includes: a sliding window connected to an output interface of the target encoder, and a long short-term memory network connected to the sliding window.
[0006] In an exemplary embodiment, before extracting the feature vector of each frame of wave image in the real-time wave video through a pre-trained target encoder, the method further includes: constructing an autoencoder, where the autoencoder includes: an input layer, an encoder, and a decoder; training the autoencoder through a first training set to obtain the target encoder, where the first training set includes: unlabeled wave images, and the target encoder is the trained encoder.
[0007] In an exemplary embodiment, training the autoencoder with a first training set to obtain the target encoder includes: compressing the unlabeled ocean wave images into low-dimensional feature representations by the encoder in the autoencoder; restoring the low-dimensional feature representations into original images approximated to the unlabeled ocean wave images by the decoder in the autoencoder; calculating the reconstruction error between the original images and the unlabeled ocean wave images; and updating the autoencoder with the reconstruction error to obtain the target encoder.
[0008] In an exemplary embodiment, inputting the feature vectors into a dynamic prediction model connected to the target encoder to predict the ocean wave height corresponding to the real-time ocean wave video by the dynamic prediction model includes: inputting the feature vectors into the sliding window in chronological order to obtain the time series data corresponding to the feature vectors, where the chronological order is determined by the timestamps of each frame of ocean wave images corresponding to the feature vectors; and inputting the time series data into the long short-term memory network and taking the output result of the long short-term memory network as the ocean wave height.
[0009] In an exemplary embodiment, before extracting the feature vectors of each frame of ocean wave images in the real-time ocean wave video by the pre-trained target encoder, the method further includes: splitting the real-time ocean wave video into single-frame images; normalizing the pixel values of the single-frame images; and performing median filtering and contrast enhancement on the normalized single-frame images to obtain each frame of ocean wave images.
[0010] In an exemplary embodiment, after inputting the feature vectors into a dynamic prediction model connected to the target encoder to predict the ocean wave height corresponding to the real-time ocean wave video by the dynamic prediction model, the method further includes: transmitting the ocean wave height to a monitoring platform and instructing the monitoring platform to generate a dynamic ocean wave height curve corresponding to the ocean wave height; and instructing the monitoring platform to trigger an alarm when any point on the dynamic ocean wave height curve exceeds a safety threshold.
[0011] According to another embodiment of the embodiments of the present application, there is also provided a device for predicting sea wave height, including: an acquisition module, configured to acquire a real-time sea wave video collected by a high-resolution camera, where the positions where the high-resolution camera is deployed at least include: an offshore wind power tower; an extraction module, configured to extract a feature vector of each frame of sea wave image in the real-time sea wave video through a pre-trained target encoder; an input module, configured to input the feature vector into a dynamic prediction model connected to the target encoder, so as to predict the sea wave height corresponding to the real-time sea wave video through the dynamic prediction model, where the dynamic prediction model includes: a sliding window connected to an output interface of the target encoder, and a long short-term memory network connected to the sliding window.
[0012] According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the above method when running.
[0013] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the above processor executes the above method through the computer program.
[0014] According to another aspect of the embodiments of the present application, there is also provided a computer program product, including a computer program, where the computer program implements the steps in any one of the above method embodiments when executed by a processor.
[0015] In the embodiments of the present application, a real-time sea wave video collected by a high-resolution camera is acquired, where the positions where the high-resolution camera is deployed at least include: an offshore wind power tower; a feature vector of each frame of sea wave image in the real-time sea wave video is extracted through a pre-trained target encoder; the feature vector is input into a dynamic prediction model connected to the target encoder, so as to predict the sea wave height corresponding to the real-time sea wave video through the dynamic prediction model, where the dynamic prediction model includes: a sliding window connected to an output interface of the target encoder, and a long short-term memory network connected to the sliding window. Through the above embodiments, the problem in the prior art that the traditional buoy monitoring method for monitoring sea wave height has high accuracy but high cost is solved, and the prediction cost of sea wave height is reduced. Description of the Drawings
[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0017] Figure 1It is a hardware structure block diagram of a computer terminal for a method of predicting sea wave height according to an embodiment of the present application;
[0018] Figure 2 It is a flowchart of a method for predicting sea wave height according to an embodiment of the present application;
[0019] Figure 3 It is a structure block diagram of a device for predicting sea wave height according to an embodiment of the present application. Detailed implementation manners
[0020] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices; "a plurality" means two or more.
[0022] The method embodiments provided by the embodiments of the present application can be executed on a computer terminal or a similar computing device or a cloud platform or an independent physical server or a software platform, where the above-mentioned software platform runs through one or more servers. Taking running on a computer terminal as an example, Figure 1 It is a hardware structure block diagram of a computer terminal for a method of predicting sea wave height according to an embodiment of the present application. As Figure 1 shown, the computer terminal may include one or more ( Figure 1 only one is shown in Figure 1 ) processors 102 and a memory 104 for storing data. In an exemplary embodiment, the above-mentioned computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Among them, the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA. Those of ordinary skill in the art can understand,Figure 1 The structure shown is only schematic and does not limit the structure of the above computer terminal. For example, the computer terminal may further include more or fewer components than those shown in Figure 1 , or have different configurations with the same functions as those shown in Figure 1 or more functions than those shown in Figure 1 .
[0023] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the computer terminal through a network. Examples of the above networks include, but are not limited to, the Internet, enterprise intranets, local area networks, mobile communication networks, and combinations thereof.
[0024] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the computer terminal. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0025] In this embodiment, a method for predicting the sea wave height is provided, which is applied to the above computer terminal. Figure 2 is a flowchart of the method for predicting the sea wave height according to the embodiment of the present application. The process includes the following steps:
[0026] Step S202, obtaining a real-time sea wave video collected by a high-resolution camera, where the positions where the high-resolution camera is deployed include at least: an offshore wind turbine tower;
[0027] Step S204, extracting a feature vector of each frame of sea wave image in the real-time sea wave video through a pre-trained target encoder;
[0028] Step S206: Input the feature vector into a dynamic prediction model connected to the target encoder to predict the wave height corresponding to the real-time wave video through the dynamic prediction model. The dynamic prediction model includes a sliding window connected to the output interface of the target encoder and a long short-term memory network connected to the sliding window.
[0029] Through the above steps, a real-time wave video collected by a high-resolution camera is obtained. The positions where the high-resolution camera is deployed include at least: an offshore wind turbine tower. Extract the feature vector of each frame of wave image in the real-time wave video through a pre-trained target encoder. Input the feature vector into a dynamic prediction model connected to the target encoder to predict the wave height corresponding to the real-time wave video through the dynamic prediction model. The dynamic prediction model includes a sliding window connected to the output interface of the target encoder and a long short-term memory network connected to the sliding window. Through the above embodiments, the problem in the prior art that the traditional buoy monitoring method for monitoring wave height has high accuracy but high cost is solved, and the prediction cost of wave height is reduced.
[0030] In an exemplary embodiment, before extracting the feature vector of each frame of wave image in the real-time wave video through a pre-trained target encoder, the method further includes: constructing an autoencoder, where the autoencoder includes an input layer, an encoder, and a decoder; training the autoencoder with a first training set to obtain the target encoder, where the first training set includes unlabeled wave images, and the target encoder is the trained encoder.
[0031] Further, training the autoencoder with the first training set to obtain the target encoder includes: compressing the unlabeled wave image into a low-dimensional feature representation through the encoder in the autoencoder; restoring the low-dimensional feature representation to an original image approximate to the unlabeled wave image through the decoder in the autoencoder; calculating the reconstruction error between the original image and the unlabeled wave image; and updating the autoencoder with the reconstruction error to obtain the target encoder.
[0032] In the embodiment of the present application, the role of the autoencoder is to automatically learn and extract key image features from wave images without manual annotation or direct specification of features, which greatly simplifies the feature extraction process and reduces the costs of data preparation and model training.
[0033] The structure of the autoencoder includes an input layer, an encoder, and a decoder. The size of the input layer should match the size of the input image (i.e., the ocean wave image). The encoder is responsible for compressing the input image into a low-dimensional feature vector, and the decoder attempts to reconstruct the original image based on these feature vectors. The encoder and decoder are usually composed of multiple layers of convolutional neural networks (CNNs), using convolutional and deconvolutional operations to achieve feature compression and decompression.
[0034] The autoencoder is trained using the first training set. The training objective is to make the image reconstructed by the decoder as close as possible to the original input image, that is, to minimize the reconstruction error. During the training process, the parameters of the encoder and decoder (such as weights and biases) are adjusted through the backpropagation algorithm and optimization methods (such as Stochastic Gradient Descent SGD or Adam) until the model reaches the predetermined performance metrics or the number of training epochs.
[0035] After training is completed, the encoder part will be able to effectively extract key features from the input image and compress them into low-dimensional feature vectors. This trained encoder is the "target encoder" and will be used for feature extraction of each frame image in the real-time ocean wave video.
[0036] In the process of constructing and training the autoencoder, the model can automatically learn how to identify important features such as wave crests and wave troughs from ocean wave images and represent these features as compact, low-dimensional feature vectors. These feature vectors not only contain the key information of the ocean wave images but also remove redundancy and noise, making them very suitable for time series analysis and dynamic prediction, such as predicting the ocean wave height using an LSTM network later.
[0037] In an exemplary embodiment, inputting the feature vector into a dynamic prediction model connected to the target encoder to predict the ocean wave height corresponding to the real-time ocean wave video includes: inputting the feature vector into the sliding window in chronological order to obtain the time series data corresponding to the feature vector, where the chronological order is determined by the timestamps of each frame of ocean wave image corresponding to the feature vector; inputting the time series data into the long short-term memory network, and taking the output result of the long short-term memory network as the ocean wave height.
[0038] In the sliding window part, all feature vectors can be organized in chronological order according to the timestamps of each frame of ocean wave image corresponding to the feature vector. The timestamps ensure the timeliness of the data. Then, the sliding window technique is used to process these feature vectors to construct time series data. The length of the sliding window is usually set according to the time span to be predicted and the characteristics of ocean wave dynamics. For example, if the ocean wave height in the next 5 seconds is to be predicted, the length of the sliding window should also cover at least 5 seconds of feature vector data.
[0039] The sliding window technique can help the model understand the temporal dependence in the data. Specifically, the feature vectors within the window are regarded as a time series sample for capturing the continuous changes in the dynamics of ocean waves at a short time scale. The data of each sliding window is input into the LSTM model to predict the ocean wave height at the next moment when the current window ends.
[0040] The constructed time series data is input into the LSTM network connected to the target encoder. At each time step, the LSTM network updates its internal state based on the current input time series feature vector, as well as the hidden state and cell state at the previous time step, and outputs a predicted value. This predicted value represents the prediction of the LSTM network for the ocean wave height at the next moment. Since the LSTM can consider historical data, its prediction results are usually more accurate than methods that rely only on the current image data.
[0041] The output result of the LSTM network can be directly used as the predicted ocean wave height value. In practical applications, to improve the stability of the prediction, the multiple prediction results within the sliding window can be averaged, or more complex methods can be adopted, such as weighted averaging or using other time series prediction models (such as the time series average model or the exponential smoothing model) in combination with the LSTM to further optimize the prediction results.
[0042] By combining the feature vectors extracted by the target encoder with the LSTM network, the limitations of traditional buoy monitoring methods, such as high cost and deployment complexity, are overcome, and at the same time, the inaccuracy problem of predicting ocean wave height based on a single image is solved, providing strong technical support for the safety and efficiency of offshore operations.
[0043] Optionally, before extracting the feature vectors of each frame of the ocean wave image in the real-time ocean wave video through the pre-trained target encoder, the method further includes: splitting the real-time ocean wave video into single-frame images; normalizing the pixel values of the single-frame images; performing median filtering and contrast enhancement on the normalized single-frame images to obtain each frame of the ocean wave image.
[0044] That is to say, for the collected real-time ocean wave video, before inputting it into the target encoder, it can be optionally split into single-frame images, and preprocessing operations such as normalization and median filtering are performed on the single-frame images, so as to obtain each frame of the ocean wave image that can be input into the target encoder.
[0045] Optionally, after inputting the feature vector into a dynamic prediction model connected to the target encoder to predict the wave height corresponding to the real-time wave video through the dynamic prediction model, the method further includes: transmitting the wave height to a monitoring platform, and instructing the monitoring platform to generate a dynamic wave height curve corresponding to the wave height; and instructing the monitoring platform to trigger an alarm when any point on the dynamic wave height curve exceeds a safety threshold.
[0046] To better understand the process of the above-mentioned method for predicting wave height, the following further describes the method for predicting wave height in combination with optional embodiments, but does not limit the technical solutions of the embodiments of the present application.
[0047] An optional embodiment of the present application proposes a method for monitoring wave height based on an autoencoder combined with time series analysis (equivalent to the method for predicting wave height in the above embodiment). The autoencoder has powerful unsupervised learning capabilities, does not require a large amount of labeled data, and can automatically extract deep features from unlabeled wave images. Time series analysis helps to model the dynamic changes of wave height. The method provided by the optional embodiment of the present application separates image feature extraction and dynamic prediction, making the system highly adaptable and scalable to the monitoring of other ocean environmental parameters. It has significant advantages in processing non-linear and multi-variable data, and at the same time does not require a large amount of labeled data, reducing the development cost.
[0048] The optional embodiment of the present application predicts the wave height through the following steps:
[0049] Step 1: Data collection and preprocessing.
[0050] Step 1.1: Video data collection. Install high-resolution cameras on offshore wind turbine towers, buoys or the shore to collect real-time wave videos. The video frame rate is set to 30fps to capture the dynamic details of the waves, and the duration is adjusted according to the monitoring target, usually 24 hours a day.
[0051] Step 1.2: Data preprocessing.
[0052] Frame decomposition: Split the video into single-frame images for subsequent feature extraction.
[0053] Normalization processing: Normalize the pixel values of the images to eliminate the influence of different acquisition conditions (such as lighting, contrast).
[0054] Noise reduction and contrast enhancement: Use median filtering and histogram equalization processing to optimize the quality of the wave images and enhance the ripple details.
[0055] Step 2: Feature extraction, application of the autoencoder.
[0056] An autoencoder is an unsupervised neural network that can compress high-dimensional data and extract deep features in low dimensions.
[0057] Step 2.1: Autoencoder architecture.
[0058] Input layer: Input the preprocessed ocean wave images.
[0059] Encoder part: Compress the original image into a low-dimensional feature representation through multiple layers of convolutional and pooling operations.
[0060] Decoder part: Restore the low-dimensional features to an approximate original image for calculating the reconstruction error.
[0061] Step 2.2: Model training.
[0062] The training objective is to minimize the image reconstruction error:
[0063]
[0064] where \(x\) i is the original image, is the reconstructed image, and \(N\) is the number of samples.
[0065] Use a large number of unlabeled ocean wave images for training to ensure that the encoder part can effectively extract the main features of the waves (such as the shapes of wave crests and wave troughs).
[0066] Step 2.3: Feature vector generation. The trained encoder part (equivalent to the target encoder in the above embodiment) outputs the feature vectors as the feature representation of each frame of the image, with a significantly reduced dimension (for example, compressed from 256×256 to 64).
[0067] Step 3: Dynamic feature modeling, time series analysis.
[0068] Use time series analysis methods to model the change of ocean wave height over time, and combine the feature vectors extracted by the encoder to construct a dynamic prediction model.
[0069] Step 3.1: Sliding window technique.
[0070] Construct sliding windows for the continuous feature vectors in chronological order, and set the length of each window to \(T\) (such as 5 seconds).
[0071] The feature vectors within the sliding window are used to capture the short-term dynamic changes of the ocean waves.
[0072] Step 3.2: Long short-term memory network (LSTM) modeling.
[0073] Use the LSTM network to process the time series features and predict the ocean wave height at the next moment.
[0074] The LSTM has a memory and forgetting mechanism and is suitable for processing non-linear data with time-dependence.
[0075] 1) Formula description:
[0076] The state update process of the LSTM is as follows:
[0077] f t = σ(W f · [h t-1 , x t + b f )
[0078] i t = σ(W i · [h t-1 , x t + b i )
[0079]
[0080] o t = σ(W o · [h t-1 , x t + b o )
[0081] h t = o t · tanh(C t ) ;
[0082] Among them, ft represents the forgetting gate, it represents the input gate, ot represents the output gate, Ct represents the cell state, and ht represents the hidden state.
[0083] 2) Output result.
[0084] The LSTM model outputs the predicted value of the wave height corresponding to each frame, and combines the sliding window average result to improve stability.
[0085] Step 4: System integration and real-time prediction.
[0086] Step 4.1: Prediction and visualization.
[0087] Transmit the combined prediction result of the autoencoder and the LSTM to the monitoring platform in real time to generate a dynamic wave height curve.
[0088] Display the changing trend of the wave height on the visualization interface and mark the alarm area exceeding the safety threshold.
[0089] Step 4.2: Automatic early warning.
[0090] Set a threshold value to trigger an alarm when the predicted wave height exceeds the safety value. Generate a wave height distribution report to help managers formulate operation adjustment plans.
[0091] In summary, the autoencoder adopted in the optional embodiment of the present application has the ability of unsupervised learning. Compared with the supervised learning method that requires a large amount of labeled data, the autoencoder only needs unlabeled data to effectively extract image features, greatly reducing the data labeling cost. The LSTM network adopted in the optional embodiment of the present application has the ability of dynamic prediction. The combination of the autoencoder and the time series modeling of LSTM also realizes modular design, separates feature extraction from time series modeling, and can flexibly adjust the model structure according to needs to adapt to the monitoring requirements of other dynamic ocean parameters. Furthermore, the optional embodiment of the present application has low development cost, can effectively capture the dynamic change characteristics of ocean waves, improve the prediction accuracy of the monitoring system, and is expected to be applicable to scenarios such as dynamic monitoring of offshore wind farms, shipping route planning, disaster prevention and mitigation early warning, and ocean scientific research. It can be widely deployed by combining ordinary camera devices and low-cost computing devices, and is expected to become an important tool for the next generation of ocean monitoring technology.
[0092] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of the various embodiments of the present application.
[0093] In the embodiment of the present application, a structural block diagram of a device for predicting wave height is also provided. Figure 3 It is a structural block diagram of a device for predicting wave height according to an embodiment of the present application; as Figure 3 shown, it includes:
[0094] An acquisition module 32, configured to acquire real-time wave videos collected by a high-resolution camera, where the positions where the high-resolution camera is deployed include at least: an offshore wind tower;
[0095] An extraction module 34, configured to extract feature vectors of each frame of wave image in the real-time wave video through a pre-trained target encoder.
[0096] An input module 36 for inputting the feature vector into a dynamic prediction model connected to the target encoder to predict the wave height corresponding to the real-time wave video through the dynamic prediction model, where the dynamic prediction model includes: a sliding window connected to the output interface of the target encoder, and a long short-term memory network connected to the sliding window.
[0097] With the above device, a real-time wave video collected by a high-resolution camera is obtained, where the positions where the high-resolution camera is deployed at least include: an offshore wind turbine tower; feature vectors of each frame of wave image in the real-time wave video are extracted through a pre-trained target encoder; the feature vectors are input into a dynamic prediction model connected to the target encoder to predict the wave height corresponding to the real-time wave video through the dynamic prediction model, where the dynamic prediction model includes: a sliding window connected to the output interface of the target encoder, and a long short-term memory network connected to the sliding window. Through the above embodiments, the problem in the prior art that the traditional buoy monitoring method for monitoring wave height has high accuracy but high cost is solved, and the prediction cost of wave height is reduced.
[0098] In an exemplary embodiment, the device further includes a training module, which is used before extracting the feature vectors of each frame of wave image in the real-time wave video through the pre-trained target encoder: constructing an autoencoder, where the autoencoder includes: an input layer, an encoder, and a decoder; training the autoencoder through a first training set to obtain the target encoder, where the first training set includes: unlabeled wave images, and the target encoder is the trained encoder.
[0099] In an exemplary embodiment, the training module is further used for: compressing the unlabeled wave images into low-dimensional feature representations through the encoder in the autoencoder; restoring the low-dimensional feature representations into original images approximate to the unlabeled wave images through the decoder in the autoencoder; calculating the reconstruction error between the original images and the unlabeled wave images; updating the autoencoder through the reconstruction error to obtain the target encoder.
[0100] In an exemplary embodiment, the input module is further used for: inputting the feature vectors into the sliding window in chronological order to obtain the time series data corresponding to the feature vectors, where the chronological order is determined by the timestamps of each frame of wave image corresponding to the feature vectors; inputting the time series data into the long short-term memory network, and taking the output result of the long short-term memory network as the wave height.
[0101] In an exemplary embodiment, the apparatus further includes a video processing module, before extracting the feature vectors of each frame of the sea wave image in the real-time sea wave video through a pre-trained target encoder: splitting the real-time sea wave video into single-frame images; normalizing the pixel values of the single-frame images; performing median filtering and contrast enhancement on the single-frame images after normalization to obtain each frame of the sea wave image.
[0102] In an exemplary embodiment, the apparatus further includes a transmission module, after inputting the feature vectors into a dynamic prediction model connected to the target encoder to predict the sea wave height corresponding to the real-time sea wave video through the dynamic prediction model: transmitting the sea wave height to a monitoring platform, and instructing the monitoring platform to generate a dynamic sea wave height curve corresponding to the sea wave height; and instructing the monitoring platform to trigger an alarm when any point on the dynamic sea wave height curve exceeds a safety threshold.
[0103] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the above program executes the method of any one of the above when running.
[0104] Optionally, in this embodiment, the above storage medium can be set to store program codes for executing the following steps:
[0105] S1, obtaining a real-time sea wave video collected by a high-resolution camera, wherein the positions where the high-resolution camera is deployed at least include: an offshore wind turbine tower;
[0106] S2, extracting the feature vectors of each frame of the sea wave image in the real-time sea wave video through a pre-trained target encoder;
[0107] S3, inputting the feature vectors into a dynamic prediction model connected to the target encoder to predict the sea wave height corresponding to the real-time sea wave video through the dynamic prediction model, wherein the dynamic prediction model includes: a sliding window connected to the output interface of the target encoder, and a long short-term memory network connected to the sliding window.
[0108] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0109] Optionally, the above electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0110] Optionally, in this embodiment, the above-mentioned processor may be configured to execute the following steps through a computer program:
[0111] S1. Obtain a real-time ocean wave video collected by a high-resolution camera, where the positions where the high-resolution camera is deployed include at least: an offshore wind turbine tower;
[0112] S2. Extract the feature vectors of each frame of ocean wave image in the real-time ocean wave video through a pre-trained target encoder;
[0113] S3. Input the feature vectors into a dynamic prediction model connected to the target encoder to predict the ocean wave height corresponding to the real-time ocean wave video through the dynamic prediction model, where the dynamic prediction model includes: a sliding window connected to the output interface of the target encoder, and a long short-term memory network connected to the sliding window.
[0114] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: USB flash drive, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disk, magnetic disk or optical disc, etc., various media that can store program codes.
[0115] The embodiment of the present application also provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0116] The embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0117] The embodiment of the present application also provides a computer program. The computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in any one of the above method embodiments.
[0118] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and will not be elaborated herein.
[0119] Obviously, those skilled in the art should understand that the various modules or steps of the present application described above can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Optionally, they can be implemented by program code executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module for implementation. In this way, the present application is not limited to any specific combination of hardware and software.
[0120] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application shall be included within the protection scope of the present application.
Claims
1. A method for predicting the wave height, characterized in that Including: Obtain real-time ocean wave videos captured by a high-resolution camera, where the deployment locations of the high-resolution cameras include at least: an offshore wind turbine tower; Extract the feature vectors of each frame of ocean wave image in the real-time ocean wave video through a pre-trained target encoder; Input the feature vectors into a dynamic prediction model connected to the target encoder to predict the ocean wave height corresponding to the real-time ocean wave video through the dynamic prediction model, where the dynamic prediction model includes: a sliding window connected to the output interface of the target encoder, and a long short-term memory network connected to the sliding window.
2. The method for predicting the sea wave height according to claim 1, wherein Before extracting the feature vectors of each frame of ocean wave image in the real-time ocean wave video through a pre-trained target encoder, the method further includes: Construct an autoencoder, where the autoencoder includes: an input layer, an encoder, and a decoder; Train the autoencoder with a first training set to obtain the target encoder, where the first training set includes: unlabeled ocean wave images, and the target encoder is the trained encoder.
3. The method for predicting the wave height according to claim 2, wherein Training the autoencoder with the first training set to obtain the target encoder includes: Compress the unlabeled ocean wave images into low-dimensional feature representations through the encoder in the autoencoder; Restore the low-dimensional feature representations into original images approximate to the unlabeled ocean wave images through the decoder in the autoencoder; Calculate the reconstruction error between the original images and the unlabeled ocean wave images; Update the autoencoder with the reconstruction error to obtain the target encoder.
4. The method for predicting the wave height according to claim 1, characterized in that, Inputting the feature vectors into a dynamic prediction model connected to the target encoder to predict the ocean wave height corresponding to the real-time ocean wave video includes: Input the feature vectors into the sliding window in chronological order to obtain the time series data corresponding to the feature vectors, where the chronological order is determined by the timestamps of each frame of ocean wave image corresponding to the feature vectors; Input the time series data into the long short-term memory network, and use the output result of the long short-term memory network as the ocean wave height.
5. The prediction method of the sea wave height according to claim 1, wherein Before extracting the feature vectors of each frame of ocean wave image in the real-time ocean wave video through a pre-trained target encoder, the method further includes: Split the real-time ocean wave video into single-frame images; Normalize the pixel values of the single-frame images; Perform median filtering and contrast enhancement on the normalized single-frame images to obtain each frame of ocean wave image.
6. The method for predicting the sea wave height according to claim 1, wherein After inputting the feature vectors into a dynamic prediction model connected to the target encoder to predict the ocean wave height corresponding to the real-time ocean wave video, the method further includes: transmitting the ocean wave height to a monitoring platform, and instructing the monitoring platform to generate a dynamic ocean wave height curve corresponding to the ocean wave height; and Instruct the monitoring platform to trigger an alarm when any point on the dynamic ocean wave height curve exceeds a safety threshold.
7. A device for predicting the height of ocean waves, characterized in that, Including: An acquisition module, configured to acquire a real-time sea wave video collected by a high-resolution camera, wherein the locations where the high-resolution camera is deployed at least include: an offshore wind power tower; An extraction module, configured to extract a feature vector of each frame of sea wave image in the real-time sea wave video through a pre-trained target encoder; An input module, configured to input the feature vector into a dynamic prediction model connected to the target encoder, so as to predict the sea wave height corresponding to the real-time sea wave video through the dynamic prediction model, wherein the dynamic prediction model includes: a sliding window connected to an output interface of the target encoder, and a long short-term memory network connected to the sliding window.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when running, executes the method described in any one of claims 1 to 6 above.
9. An electronic device, comprising a memory and a processor, characterized in that A computer program is stored in the memory, and the processor is configured to execute the method described in any one of claims 1 to 6 through the computer program.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method described in any one of claims 1 to 6 are implemented.