A multi-step prediction method, system and medium for ship motion based on causal convolution
By using a causal convolutional neural network for multi-step prediction of ship motion, the problems of long prediction time and large errors in the existing technology are solved, and accurate prediction with longer step lengths is achieved.
Patent Information
- Application Number
- CN202411106078.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-08-13
AI Technical Summary
The existing multi-step prediction model of ship motion has the problems of long prediction time and large cumulative error. The standard convolutional neural network violates the causality principle when processing time series data, resulting in inaccurate predictions.
A causal convolutional neural network is used to perform multi-step prediction of ship motion. By collecting ship acceleration and control quantity data, preprocessing and training sample data, and training the preset causal convolutional neural network, a ship motion prediction model is obtained. Finally, the historical motion data and historical control quantity data of the ship to be predicted are obtained and input into the multi-step ship motion prediction model to obtain the multi-step motion quantity prediction results.
By adopting causal convolutional neural networks for multi-step prediction of ship motion, the prediction time and error accumulation are reduced, the accuracy of the prediction is ensured, longer-range technical application is achieved, and ship motion prediction with a longer technical prediction step is realized.
Smart Images

Figure CN119176227B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of ship data processing, and in particular to a multi-step prediction method, system and medium for ship motion based on causal convolution. Background Art
[0002] Ship motion prediction is crucial for shipping, port scheduling, maritime safety, and other fields. Existing multi-step ship motion prediction models (e.g., mechanistic models, support vector machines, and recurrent neural networks) are essentially single-step models. These models suffer from long prediction times and cumulative errors when performing multi-step predictions. Furthermore, methods using convolutional neural networks for multi-step ship motion prediction often introduce future information into their standard convolution operations when processing time series data, violating the principle of causality and leading to inaccurate predictions. Furthermore, the prediction length is limited by the receptive field of the convolution kernel. Summary of the Invention
[0003] In order to solve the above technical problems, the purpose of the present invention is to provide a multi-step prediction method, system and medium for ship motion based on causal convolution, which can predict multi-step ship motion.
[0004] To achieve the above objectives, one aspect of an embodiment of the present application proposes a multi-step ship motion prediction method based on causal convolution, comprising the following steps:
[0005] Collect ship acceleration data and ship control quantity data according to the preset sampling interval;
[0006] Obtaining ship motion data according to the ship acceleration data;
[0007] Preprocessing the ship motion data and the ship control quantity data to obtain training sample data;
[0008] Training a preset causal convolutional neural network based on the training sample data to obtain a multi-step prediction model for ship motion;
[0009] The historical motion data and historical control amount data of the ship to be predicted are obtained, and the historical motion data and the historical control amount data are input into the multi-step prediction model of ship motion to obtain a multi-step motion amount prediction result.
[0010] In some embodiments, collecting the ship acceleration data and the ship control quantity data according to a preset sampling interval specifically includes:
[0011] Setting the sampling interval, and collecting the ship acceleration data according to the sampling interval by an inertial navigation system;
[0012] The ship control quantity data is collected through a servo motor, and the servo motor is used to control the steering and propeller speed of the ship.
[0013] In some embodiments, obtaining the ship motion data according to the ship acceleration data specifically includes:
[0014] Performing an accumulation operation on the ship acceleration data of a first preset step length to obtain a first accumulation operation result, and performing an accumulation operation on the ship acceleration data of a second preset step length to obtain a second accumulation operation result;
[0015] performing an addition operation on the first accumulation operation result and the second accumulation operation result;
[0016] The sum obtained by the addition operation is divided by 2, and the quotient obtained by the division operation is multiplied by the sampling interval to obtain the ship motion data.
[0017] In some embodiments, the vessel motion data includes at least one of surge velocity, pitch velocity, sway velocity, roll velocity, heave velocity, and yaw angular velocity.
[0018] In some embodiments, the preprocessing of the ship motion data and the ship control quantity data to obtain training sample data specifically includes:
[0019] Clustering the ship motion data to obtain a clustering result, and then eliminating abnormal ship motion data according to the clustering result to obtain first sample data;
[0020] Determine missing values in the first sample data, and supplement the missing values according to the first sample data of the preceding and following steps to obtain second sample data;
[0021] Denoising and filtering are performed on the second sample data, and then the second sample data after denoising and filtering are normalized to obtain the training sample data.
[0022] In some embodiments, the training of a preset causal convolutional neural network based on the training sample data to obtain a multi-step prediction model for ship motion specifically includes:
[0023] Dividing the training sample data into a training set and a test set;
[0024] Training the causal convolutional neural network according to a parallel strategy using the training set to obtain a loss value;
[0025] The parameters of the causal convolutional neural network are updated according to the loss value using the test set to obtain the multi-step prediction model of ship motion.
[0026] In some embodiments, the multi-step ship motion prediction method further includes the step of pre-setting the causal convolutional neural network, wherein the pre-setting of the causal convolutional neural network is specifically as follows:
[0027] The input length, output length, number of convolution layers, hole rate and receptive field of the causal convolutional neural network are set, and the input parameters corresponding to the multi-step motion prediction results are set to zero.
[0028] To achieve the above objectives, another aspect of the present application provides a multi-step ship motion prediction system based on causal convolution, comprising:
[0029] A data acquisition module is used to collect ship acceleration data and ship control quantity data according to a preset sampling interval;
[0030] A motion data acquisition module, configured to obtain ship motion data based on the ship acceleration data;
[0031] A data preprocessing module is used to preprocess the ship motion data and the ship control quantity data to obtain training sample data;
[0032] A prediction model training module is used to train a preset causal convolutional neural network based on the training sample data to obtain a multi-step prediction model for ship motion;
[0033] The multi-step motion quantity prediction module is used to obtain the historical motion data and historical control quantity data of the ship to be predicted, input the historical motion data and the historical control quantity data into the multi-step prediction model of ship motion, and obtain the multi-step motion quantity prediction result.
[0034] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes an electronic device, which includes a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the multi-step prediction method for ship motion based on causal convolution as described above is implemented.
[0035] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium for computer-readable storage, and the storage medium stores one or more programs, which can be executed by one or more processors to implement the multi-step prediction method of ship motion based on causal convolution as described above.
[0036] The beneficial effects of the present invention are as follows: the method, system, and medium for multi-step ship motion prediction based on causal convolution of the present invention collect ship acceleration data and ship control quantity data according to a preset sampling interval, then obtain ship motion data based on the ship acceleration data, pre-process the ship motion data and ship control quantity data to obtain training sample data, then train a preset causal convolutional neural network based on the training sample data to obtain a multi-step ship motion prediction model, finally obtain historical motion data and historical control quantity data of the ship to be predicted, input the historical acceleration data and historical control quantity data into the multi-step ship motion prediction model to perform multi-step ship motion prediction, and obtain a multi-step motion quantity prediction result. The present invention uses a causal convolutional neural network for multi-step ship motion prediction, which can predict multiple steps of ship motion at a time, reduce the prediction time and the accumulation of prediction errors, and can capture longer-range time dependencies, thereby achieving ship motion prediction with a longer prediction step length. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following introduction is made to the drawings required for use in the embodiments of the present invention. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative work.
[0038] Figure 1 A flowchart of a multi-step prediction method for ship motion based on causal convolution provided by an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of the structure of a causal convolutional neural network provided by an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of the structure of a multi-step ship motion prediction system based on causal convolution provided by an embodiment of the present invention;
[0041] Figure 4 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.
[0043] It will be understood that the terms "first", "second", etc. used in this application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0044] The terms "at least one", "plurality", "each", "any", etc. used in this application include "at least one", "two" or more, "plurality" or "each", "any" or "any one", "each" or "any one" in the context of the present invention, and "at least one" or "at least one" includes one, two or more, "plurality" or "any one" includes two or more, "each" or "each one" in the context of the present invention, and "any" or "any one
[0045] Causal convolution is a convolution operation widely used in time series data and causal inference tasks. Its design ensures that the output of the convolution depends only on the input of the current time step and its previous time step, thus maintaining causality, that is, not relying on future information.
[0046] Ship motion prediction is of great significance in areas such as shipping, port scheduling, and maritime safety. Traditional ship motion prediction techniques mostly rely on mechanistic models (partial differential equations), support vector machines, and recurrent neural networks (LSTM, GPR). However, these technologies perform poorly in complex and changing marine environments, and their prediction times are long, making it difficult to meet the real-time requirements of the task. With the development of deep learning technology, the use of convolutional neural networks (CNNs) for time series prediction has gradually attracted attention. However, standard convolution operations easily introduce future information when processing time series data, violating the principle of causality and leading to inaccurate predictions. At the same time, the prediction length is limited by the receptive field of the convolution kernel.
[0047] To this end, an embodiment of the present invention proposes a multi-step ship motion prediction method based on causal convolution. Ship acceleration data and ship control variable data are collected at preset sampling intervals, and then ship motion data is obtained based on the ship acceleration data. The ship motion data and ship control variable data are preprocessed to obtain training sample data. A preset causal convolutional neural network is then trained based on the training sample data to obtain a multi-step ship motion prediction model. Finally, historical motion data and historical control variable data of the ship to be predicted are obtained. The historical acceleration data and historical control variable data are input into the multi-step ship motion prediction model to perform multi-step ship motion prediction and obtain a multi-step motion quantity prediction result. The present invention uses a causal convolutional neural network for multi-step ship motion prediction, which can predict multiple steps of ship motion at a time, reducing prediction time and the accumulation of prediction errors. It can also capture longer-range temporal dependencies and achieve ship motion prediction with a longer prediction step length. This multi-step ship motion prediction method can be applied to scenarios such as intelligent ship navigation, maritime traffic management, and port operation management, but is not limited thereto.
[0048] Reference Figure 1 , Figure 1 A flowchart of a multi-step prediction method for ship motion based on causal convolution is provided in an embodiment of the present invention. The embodiment of the present invention proposes a multi-step prediction method for ship motion based on causal convolution, which includes steps S101 to S105:
[0049] S101, collecting ship acceleration data and ship control quantity data according to a preset sampling interval;
[0050] As an optional implementation, the step of collecting the ship acceleration data and the ship control variable data according to the preset sampling interval can be specifically divided into the following steps S1011 and S1012:
[0051] S1011. Set a sampling interval and collect ship acceleration data according to the sampling interval through the inertial navigation system;
[0052] S1012. Collecting ship control quantity data through a servo motor, where the servo motor is used to control the ship's steering and propeller speed.
[0053] Specifically, the ship's acceleration data is directly collected through the ship's inertial navigation system (IMU). This IMU integrates multiple sensors, including accelerometers, gyroscopes, and magnetometers. It provides high-precision positioning and navigation support for the ship by measuring and reporting information such as the object's attitude, acceleration, and angular velocity in three-dimensional space. The ship uses servo motors to control steering and propeller speed, so the feedback data from the servo motors is used as the ship's control data.
[0054] Those skilled in the art will appreciate that the sampling interval can be set according to actual needs, for example, 2 seconds, 4 seconds, or 5 seconds.
[0055] S102, obtaining ship motion data according to the ship acceleration data;
[0056] As an optional implementation, the step of obtaining the ship motion data according to the ship acceleration data can be specifically divided into the following steps S1021 to S1023:
[0057] S1021: performing an accumulation operation on the ship acceleration data of a first preset step length to obtain a first accumulation operation result, and performing an accumulation operation on the ship acceleration data of a second preset step length to obtain a second accumulation operation result;
[0058] S1022, performing an addition operation on the first accumulation operation result and the second accumulation operation result;
[0059] S1023. Divide the sum obtained by the addition operation by 2, and then multiply the quotient obtained by the division operation by the sampling interval to obtain ship motion data.
[0060] As a further optional embodiment, the ship motion data includes at least one of surge velocity, pitch velocity, sway velocity, roll velocity, heave velocity and yaw angular velocity.
[0061] Specifically, the ship acceleration data is integrated using the rectangular method to obtain ship motion data, which includes at least one of surge velocity u, pitch velocity q, sway velocity p, roll velocity v, heave velocity w, and yaw angular velocity r.
[0062] For example, taking the calculation of the longitudinal velocity u as an example, assuming that there are N longitudinal accelerations The sampling interval is Δt. Then the surge velocity u at step i is determined by the following formula:
[0063]
[0064] Furthermore, the pitch velocity q, sway velocity p, roll velocity v, heave velocity w and yaw angular velocity r can all be calculated using the same integration method as above.
[0065] S103, pre-processing the ship motion data and the ship control quantity data to obtain training sample data;
[0066] As an optional implementation, the step of preprocessing the ship motion data and the ship control variable data to obtain training sample data can be specifically divided into the following steps S1031 to S1033:
[0067] S1031. Clustering the ship motion data to obtain a clustering result, and then eliminating abnormal ship motion data based on the clustering result to obtain first sample data;
[0068] Furthermore, clustering algorithms such as K-means or DBSCAN can be used to cluster the ship motion data. Based on the clustering results, clusters containing a small number of data points or that are far away from other dense clusters are identified as outliers. These outliers are removed to obtain the first sample data to improve the quality of the ship motion data.
[0069] S1032: Determine missing values in the first sample data, and supplement the missing values according to the first sample data of the previous and next steps to obtain second sample data;
[0070] Furthermore, the missing data of each step in the first sample data are determined. For a small number of consecutive missing data points, linear interpolation of normal data points of the previous and next steps is used to supplement them. For a large number of consecutive missing data points, the most similar historical sequence data is found through the dynamic time warping algorithm, and the data of the sequence is used for interpolation to obtain the second sample data, so as to improve the integrity and continuity of the ship motion data.
[0071] S1033: Denoise and filter the second sample data, and then normalize the denoised and filtered second sample data to obtain training sample data.
[0072] Furthermore, the Kalman filter algorithm can be used to smooth the ship motion data and remove high-frequency noise in the data. Finally, the data is scaled to the [0, 1] interval to obtain training sample data for training the multi-step prediction model of ship motion.
[0073] As a further optional implementation, the multi-step ship motion prediction method further includes the step of pre-setting a causal convolutional neural network. The step of pre-setting a causal convolutional neural network can be specifically divided into the following steps D100:
[0074] D100. Set the input length, output length, number of convolutional layers, dilation rate, and receptive field of the causal convolutional neural network, and set the input parameters corresponding to the multi-step motion prediction results to zero.
[0075] For example, the input length of the causal convolutional neural network is set to 9, the output length is 5, the number of convolution layers is 1, the void rate is 1, and the receptive field is 2. Figure 2 The figure shows a schematic diagram of the structure of a causal convolutional neural network provided by an embodiment of the present invention, with a total of 9 steps (such as Figure 2The 4 black circles and 5 gray circles shown in the figure contain both ship motion data and ship control data, while the gray circles contain only ship control data. To ensure the consistency of the input dimensions, the unknown ship motion data (i.e., the multi-step motion prediction results) in the gray circles are padded with zeros. If standard convolution is used and the receptive field is set to 2, the i-th step output captures the i-1 and i-2 step convolution layer information through convolution; if the void rate of the causal convolution is set to 1, the i-th step output captures the i-1 and i-3 step convolution layer information through convolution.
[0076] S104. Training a preset causal convolutional neural network based on the training sample data to obtain a multi-step prediction model for ship motion;
[0077] As a further optional implementation, the step of training a preset causal convolutional neural network based on the training sample data to obtain a multi-step prediction model for ship motion can be specifically divided into the following steps S1041 to S1043:
[0078] S1041. Divide the training sample data into a training set and a test set;
[0079] S1042. Train the causal convolutional neural network using the training set according to the parallel strategy to obtain a loss value;
[0080] S1043. Update the parameters of the causal convolutional neural network according to the loss value through the test set to obtain a multi-step prediction model for ship motion.
[0081] Specifically, the entire training sample data is first divided into two parts: 80% is divided into a training set and 20% is divided into a test set. The training set is used to train the model, that is, to let the model learn patterns and regularities in the data; the test set is used to evaluate the model's performance, that is, to check the model's performance on the predicted data. Next, the causal convolutional neural network set up in the previous steps is deployed on a GPU, using mean squared error (MSE) as the loss function. The causal convolutional neural network is trained using a parallel strategy to obtain a loss value, which measures the difference between the network's predicted motion and the actual motion. Finally, the network parameters are updated using a backpropagation algorithm based on this loss value, and the model's generalization ability is evaluated using the test set. Training is terminated when the loss value reaches a preset loss threshold or the number of backpropagation iterations reaches a preset number. This results in a multi-step ship motion prediction model that can predict the future motion of a ship multiple steps in one go.
[0082] S105 , obtaining historical motion data and historical control amount data of the ship to be predicted, inputting the historical motion data and historical control amount data into a multi-step prediction model of ship motion, and obtaining a multi-step motion amount prediction result.
[0083] Specifically, according to the input length of the causal convolutional neural network set above, the historical acceleration data and historical control quantity data of the ship to be predicted for the past several steps are selected, and then the historical acceleration data are integrated to obtain the historical motion data. The historical motion data and historical control quantity data of the ship to be predicted are input into the multi-step prediction model of ship motion to perform multi-step prediction of ship motion and obtain the multi-step motion quantity prediction result.
[0084] The above describes the multi-step ship motion prediction method based on causal convolution according to an embodiment of the present invention. It can be appreciated that, compared to prior art multi-step ship motion prediction models such as mechanism models, support vector machines, and recurrent neural networks, the present invention employs a causal convolutional neural network for multi-step ship motion prediction. This method, based on the principle of causality, can predict multiple steps of ship motion simultaneously, reducing the problems of model prediction time and prediction error accumulation as the prediction length increases. Furthermore, it can capture longer-range temporal dependencies, enabling ship motion prediction with longer prediction steps.
[0085] Reference Figure 3 , an embodiment of the present invention further provides a multi-step ship motion prediction system based on causal convolution, comprising:
[0086] A data acquisition module is used to collect ship acceleration data and ship control quantity data according to a preset sampling interval;
[0087] A motion data acquisition module is used to obtain ship motion data based on ship acceleration data;
[0088] The data preprocessing module is used to preprocess the ship motion data and ship control quantity data to obtain training sample data;
[0089] The prediction model training module is used to train the preset causal convolutional neural network based on the training sample data to obtain a multi-step prediction model for ship motion;
[0090] The multi-step motion quantity prediction module is used to obtain the historical motion data and historical control quantity data of the ship to be predicted, input the historical motion data and historical control quantity data into the multi-step prediction model of ship motion, and obtain the multi-step motion quantity prediction result.
[0091] The contents of the above-mentioned embodiments of the multi-step prediction method for ship motion based on causal convolution are all applicable to the embodiments of the multi-step prediction system for ship motion based on causal convolution. The functions specifically implemented by the embodiments of the multi-step prediction system for ship motion based on causal convolution are the same as those of the above-mentioned embodiments of the multi-step prediction method for ship motion based on causal convolution, and the beneficial effects achieved are also the same as those achieved by the above-mentioned embodiments of the multi-step prediction method for ship motion based on causal convolution.
[0092] An embodiment of the present invention further provides an electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communicating between the processor and the memory. When the program is executed by the processor, the aforementioned multi-step ship motion prediction method based on causal convolution is implemented. The electronic device can be any intelligent terminal, including a tablet computer and an in-vehicle computer.
[0093] like Figure 4 FIG2 is a schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present invention, referring to FIG2 Figure 4 , an embodiment of the present invention provides an electronic device, including:
[0094] The processor 1001 may be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present invention.
[0095] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program codes are stored in the memory 1002 and are called by the processor 1001 to execute the multi-step prediction method for ship motion based on causal convolution according to the embodiment of the present invention.
[0096] Input / output interface 1003, used to implement information input and output;
[0097] Communication interface 1004, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0098] Bus 1005 , which transmits information between various components of the device (e.g., processor 1001 , memory 1002 , input / output interface 1003 , and communication interface 1004 );
[0099] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0100] An embodiment of the present invention also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned multi-step prediction method of ship motion based on causal convolution.
[0101] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0102] The embodiment of the present invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs Figure 1 The method shown.
[0103] In some optional embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the above-mentioned boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided in an exemplary manner for the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are contemplated in which the order of the various operations is changed and the sub-operations described as a part of a larger operation are performed independently.
[0104] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the above-mentioned functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present invention. More specifically, given the properties, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the module will be understood within the routine skills of an engineer. Therefore, a person skilled in the art can implement the present invention set forth in the claims using ordinary skills without undue experimentation. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0105] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the above methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.
[0106] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0107] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0108] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.
[0109] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A multi-step prediction method for ship motion based on causal convolution, characterized in that: The following steps are involved: Collect ship acceleration data and ship control quantity data according to the preset sampling interval; Obtaining ship motion data according to the ship acceleration data; Preprocessing the ship motion data and the ship control quantity data to obtain training sample data; Training a preset causal convolutional neural network based on the training sample data to obtain a multi-step prediction model for ship motion; Obtaining historical motion data and historical control amount data of the ship to be predicted, inputting the historical motion data and the historical control amount data into the multi-step ship motion prediction model to obtain a multi-step motion amount prediction result; Obtaining the ship motion data according to the ship acceleration data specifically includes: Performing an accumulation operation on the ship acceleration data of a first preset step length to obtain a first accumulation operation result, and performing an accumulation operation on the ship acceleration data of a second preset step length to obtain a second accumulation operation result; performing an addition operation on the first accumulation operation result and the second accumulation operation result; Dividing the sum obtained by the addition operation by 2, and then multiplying the quotient obtained by the division operation by the sampling interval to obtain the ship motion data; The method of training a preset causal convolutional neural network based on the training sample data to obtain a multi-step ship motion prediction model specifically includes: Dividing the training sample data into a training set and a test set; Training the causal convolutional neural network according to a parallel strategy using the training set to obtain a loss value; The parameters of the causal convolutional neural network are updated according to the loss value using the test set to obtain the multi-step prediction model of ship motion.
2. A multi-step ship motion prediction method based on causal convolution according to claim 1, characterized in that: The collecting of ship acceleration data and ship control quantity data according to a preset sampling interval specifically includes: Setting the sampling interval, and collecting the ship acceleration data according to the sampling interval by an inertial navigation system; The ship control quantity data is collected through a servo motor, and the servo motor is used to control the steering and propeller speed of the ship.
3. A multi-step ship motion prediction method based on causal convolution according to claim 1, characterized in that: The ship motion data includes at least one of surge velocity, pitch velocity, sway velocity, roll velocity, heave velocity and yaw angular velocity.
4. A multi-step ship motion prediction method based on causal convolution according to claim 1, characterized in that: The preprocessing of the ship motion data and the ship control quantity data to obtain training sample data specifically includes: Clustering the ship motion data to obtain a clustering result, and then eliminating abnormal ship motion data according to the clustering result to obtain first sample data; Determine missing values in the first sample data, and supplement the missing values according to the first sample data of the preceding and following steps to obtain second sample data; Denoising and filtering are performed on the second sample data, and then the second sample data after denoising and filtering are normalized to obtain the training sample data.
5. The multi-step ship motion prediction method based on causal convolution according to claim 1 is characterized in that: The multi-step ship motion prediction method further includes the step of pre-setting the causal convolutional neural network, wherein the pre-setting of the causal convolutional neural network is specifically as follows: The input length, output length, number of convolution layers, hole rate and receptive field of the causal convolutional neural network are set, and the input parameters corresponding to the multi-step motion prediction results are set to zero.
6. A multi-step ship motion prediction system based on causal convolution, characterized in that: include: A data acquisition module is used to collect ship acceleration data and ship control quantity data according to a preset sampling interval; A motion data acquisition module, configured to obtain ship motion data based on the ship acceleration data; A data preprocessing module is used to preprocess the ship motion data and the ship control quantity data to obtain training sample data; A prediction model training module is used to train a preset causal convolutional neural network based on the training sample data to obtain a multi-step prediction model for ship motion; A multi-step motion quantity prediction module is used to obtain historical motion data and historical control quantity data of the ship to be predicted, input the historical motion data and the historical control quantity data into the multi-step prediction model of ship motion, and obtain a multi-step motion quantity prediction result; Obtaining the ship motion data according to the ship acceleration data specifically includes: Performing an accumulation operation on the ship acceleration data of a first preset step length to obtain a first accumulation operation result, and performing an accumulation operation on the ship acceleration data of a second preset step length to obtain a second accumulation operation result; performing an addition operation on the first accumulation operation result and the second accumulation operation result; Dividing the sum obtained by the addition operation by 2, and then multiplying the quotient obtained by the division operation by the sampling interval to obtain the ship motion data; The method of training a preset causal convolutional neural network based on the training sample data to obtain a multi-step ship motion prediction model specifically includes: Dividing the training sample data into a training set and a test set; Training the causal convolutional neural network according to a parallel strategy using the training set to obtain a loss value; The parameters of the causal convolutional neural network are updated according to the loss value using the test set to obtain the multi-step prediction model of ship motion.
7. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the multi-step prediction method of ship motion based on causal convolution as described in any one of claims 1 to 5 are realized.
8. A storage medium, which is a computer-readable storage medium and is used for computer-readable storage, characterized in that: The 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 of the multi-step ship motion prediction method based on causal convolution as described in any one of claims 1 to 5.