Ship operation model training method and ship operation control method

By using principal component analysis and grid density method to screen outliers during ship operation model training and configuring weights, the problem of low accuracy in ship operation models was solved, and higher accuracy in predicting operational data was achieved.

CN118469043BActive Publication Date: 2024-11-12HARBIN ENGINEERING UNIVERSITY SANYA NANHAI INNOVATION & DEVELOPMENT BASE +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410930919.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-11-12
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

Existing ship operation models have low accuracy, resulting in low accuracy in predicting operational data.

Method used

The training data is mapped to a two-dimensional coordinate system using principal component analysis algorithm, outliers are removed by combining grid density method, and weights are configured for the training data to train the ship operation model.

Benefits of technology

This improved the accuracy and robustness of the ship operation model, thereby increasing the accuracy of operational data prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118469043B_ABST
    Figure CN118469043B_ABST
Patent Text Reader

Abstract

The present invention provides a ship operation model training method and a ship operation control method, which relate to the field of data processing technology. The ship operation model training method may include mapping the first input data in each of the multiple first training data into a two-dimensional coordinate system through a principal component analysis algorithm to obtain the second input data of each first training data; based on the second input data of each first training data, and in combination with a grid density method, outliers are screened out for the multiple first training data to obtain multiple second training data; based on the density of the grid to which each of the multiple second training data belongs, the first weight of each second training data is configured; based on each second training data and the first weight of each second training data, the first ship operation model is trained to obtain a second ship operation model. The ship operation model training method provided by the present invention can improve the accuracy of the ship operation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a ship operation model training method and a ship operation control method. Background Art

[0002] A ship can refer to a vehicle that can sail or anchor in waters for transportation or operation. At present, the operation data of a ship can be predicted based on the ship operation model to ensure the safe navigation of the ship. However, most of the existing ship operation models have the problem of low accuracy, which reduces the prediction accuracy of the operation data. Summary of the invention

[0003] In order to solve the above problems, the present invention provides a ship operation model training method and a ship operation control method, which can improve the accuracy of the ship operation model and further improve the prediction accuracy of the ship operation data.

[0004] In a first aspect, the present application provides a ship operation model training method, comprising: mapping the first input data in each of a plurality of first training data into a two-dimensional coordinate system through a principal component analysis algorithm to obtain the second input data of each of the first training data; based on the second input data of each of the first training data and in combination with a grid density method, screening outliers from the plurality of first training data to obtain a plurality of second training data; configuring a first weight for each of the plurality of second training data according to the density of a grid to which each of the plurality of second training data belongs, wherein the first weight for each of the second training data is used to indicate the degree of influence of noise on the corresponding second training data; training the first ship operation model according to each of the second training data and the first weight of each of the second training data to obtain a second ship operation model.

[0005] In some possible implementations, the step of removing outliers from the multiple first training data based on the second input data of each first training data and in combination with a grid density method to obtain multiple second training data includes: dividing the area of ​​the second input data of the multiple first training data in the two-dimensional coordinate system into multiple grids; determining the density of each grid based on the amount of the second input data in each grid in the multiple grids; determining a first grid in the multiple grids based on the density of each grid and the distance between the multiple grids; and removing the first training data to which the second input data in the first grid belongs from the multiple first training data to obtain the multiple second training data.

[0006] In some possible implementations, mapping the first input data in each of the multiple first training data to a two-dimensional coordinate system through a principal component analysis algorithm to obtain the second input data of each of the first training data includes: determining the average value of the first input data of the multiple first training data according to the first input data in each of the first training data; determining the difference between the first input data in each of the first training data and the average value as the third input data of each of the first training data; determining a sample correlation matrix according to a first matrix formed by the third input data of the multiple first training data and in combination with a matrix eigenvalue decomposition method; determining multiple eigenvalues ​​and multiple eigenvectors of the sample correlation matrix, wherein the multiple eigenvalues ​​correspond one-to-one to the multiple eigenvectors; determining the second input data of each of the first training data according to the first eigenvector and the second eigenvector and in combination with the first matrix; wherein the first eigenvector is an eigenvector corresponding to the first eigenvalue, the first eigenvalue is the maximum eigenvalue among the multiple eigenvalues, and the second eigenvector is an eigenvector corresponding to an eigenvalue among the multiple eigenvalues ​​that is only smaller than the first eigenvalue.

[0007] In some possible implementations, determining the first grid among the multiple grids based on the density of each grid and the distance between the multiple grids includes: determining the neighbor distance of each grid based on the density of each grid and the distance between the multiple grids; and determining, as the first grid, a grid among the multiple grids whose density is less than a preset density and whose neighbor distance is greater than a preset distance.

[0008] In some possible implementations, before determining the grid in the plurality of grids whose density is less than a preset density and whose neighbor distance is greater than a preset distance as the first grid, the method further includes: determining the preset density and the preset distance by using the following formula:

[0009]

[0010] in, is the preset density, is the density of the kth grid after the plurality of grids are sorted in the order of the density from small to large; is the number of the grids, is 0.2, For rounding up operation, is the preset distance, is the neighbor distance of the sth grid after the multiple grids are sorted in the order of the neighbor distances from small to large.

[0011] In some possible implementations, the grid is a square, and the side length of the grid is determined by the following formula:

[0012]

[0013] in, is the side length of the grid, is 0.4, is the number of the first training data, is the horizontal coordinate of the second input data of the i-th first training data, is the ordinate of the second input data of the i-th training data, For maximum value operation, Minimum operation.

[0014] In some possible implementations, the training of the first ship operation model according to each second training data and the first weight of each second training data to obtain the second ship operation model includes: training the first ship operation model according to each second training data and the first weight of each second training data to obtain a third ship operation model; determining the training error of each second training data according to each second training data and the third ship operation model; determining the second weight of each second training data according to the training error of each second training data and the first weight; training the first ship operation model according to each second training data and the second weight of each second training data to obtain the second ship operation model.

[0015] In some possible implementations, the training of the first ship operation model according to each second training data and the first weight of each second training data to obtain the second ship operation model includes: configuring the value of the hyperparameter in the first ship operation model; executing a training step, the training step including training the first ship operation model according to each second training data and the first weight of each second training data and based on the value of the hyperparameter to obtain a fourth ship operation model; determining the training error of each second training data according to each second training data and the fourth ship operation model; determining the second weight of each second training data according to the training error of each second training data and the first weight; training the first ship operation model according to each second training data and the second weight of each second training data to obtain a fifth ship operation model; validating the fifth ship operation model once according to multiple validation data to obtain validation information; determining whether the stop condition is met; if so, determining the fifth ship operation model as the second ship operation model; if not, updating the value of the hyperparameter according to the validation information and going to the training step.

[0016] In some possible implementations, determining the second weight of each second training data according to the training error of each second training data and the first weight includes: determining the second weight of each second training data by using the following formula:

[0017]

[0018] in, is the first weight of the j-th second training data, is the second weight of the j-th second training data, is the training error of the jth second training data, , is the absolute median deviation operation, is 3, is the number of the second training data, .

[0019] In a second aspect, the present application provides a ship operation control method, comprising: obtaining a second ship operation model obtained according to the method described in any one of the first aspects; obtaining the operation data of the ship at a current moment; predicting the operation data of the ship at a next moment based on the second ship operation model and the operation data of the ship at the current moment; determining the control data of the ship at the next moment based on the operation data of the ship at the next moment and the predetermined operation trajectory of the ship, and controlling the operation of the ship according to the control data.

[0020] In a third aspect, the present application provides an electronic device comprising a memory and a processor; the memory is used to store a computer program; the processor is used to implement the ship operation model training method as described in any one of the first aspects or the ship operation control method as described in the second aspect when executing the computer program.

[0021] In a fourth aspect, the present application provides a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and when the computer program is executed by a processor, it implements the ship operation model training method as described in any one of the first aspects or implements the ship operation control method as described in the second aspect.

[0022] The beneficial effect of the ship operation model training method of the present invention is: by using the principal component analysis algorithm, the first input data in each of the multiple first training data is mapped to a two-dimensional coordinate system to obtain the second input data of each first training data, so as to facilitate the outlier screening of the multiple first training data. According to the second input data of each first training data, combined with the grid density method, the multiple first training data are screened for outliers to obtain multiple second training data, thereby improving the quality of the multiple second training data, thereby improving the accuracy of the multiple second training data. In addition, according to the density of the grid to which each second training data in the multiple second training data belongs, the first weight of each second training data is configured, and the influence of noise on the corresponding second training data can be indicated by the first weight of each second training data. In this way, the first ship operation model is trained according to each second training data and the first weight of each second training data, so that the training of the first ship operation model not only uses high-quality second training data, but also considers the influence of noise on the second training data, so as to reduce the influence of outliers and noise on model training, thereby improving the accuracy and robustness of the second ship operation model obtained by training, thereby improving the prediction accuracy of ship operation data. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram of a process flow of a ship operation model training method provided in an embodiment of the present application;

[0024] Figure 2 A schematic diagram of a process for outlier screening provided in an embodiment of the present application;

[0025] Figure 3 A schematic diagram of a two-dimensional coordinate system provided in an embodiment of the present application;

[0026] Figure 4 A schematic diagram of multiple grids provided in an embodiment of the present application;

[0027] Figure 5 A schematic diagram of a training process of a first ship operation model provided in an embodiment of the present application;

[0028] Figure 6 A schematic diagram of another training process of a first ship operation model provided in an embodiment of the present application;

[0029] Figure 7 A schematic diagram of a process flow of a ship operation control method provided in an embodiment of the present application;

[0030] Figure 8 A schematic diagram of ship operating parameters provided in an embodiment of the present application;

[0031] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be interpreted as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.

[0033] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0034] The term "including" and its variations used in this article are open inclusions, that is, "including but not limited to"; the term "based on" means "based at least in part on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optionally" means "optional embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, etc., and are not used to limit the order or interdependence of the functions performed by these devices, modules or units, etc.

[0035] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.

[0037] In order to solve the above technical problems, the embodiment of the present application provides a ship operation model training method. The accuracy of the ship operation model trained by the ship operation model training method is improved, thereby improving the prediction accuracy of the ship's operation data. The ship operation model training method can be executed by an electronic device, and the electronic device includes but is not limited to a desktop computer, a laptop computer, a smart phone, a personal digital processor, etc., and the embodiment of the present application does not specifically limit this.

[0038] Figure 1 A flow chart of a ship operation model training method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method may include:

[0039] S110. Map the first input data in each of the plurality of first training data into a two-dimensional coordinate system by using a principal component analysis algorithm to obtain the second input data of each of the first training data.

[0040] The plurality of first training data may be historical operation data of the ship during operation. The historical operation data of the ship during operation may include operation data of the ship at multiple historical moments. The plurality of first training data may correspond to operation data of the ship at multiple historical moments. In other words, one first training data may be understood as operation data of the ship at a historical moment. The plurality of first training data may be acquired by sensors. Sensors include but are not limited to radars, etc.

[0041] Each first training data may include first input data and first output data. The first input data of each first training data may include at least the longitudinal speed, lateral speed, yaw angular velocity and rudder angle of the ship at the corresponding historical moment. The first output data of each first training data may include at least the longitudinal acceleration, lateral acceleration and yaw angular acceleration of the ship at the corresponding historical moment.

[0042] Exemplarily, a plurality of first training data may be represented as ,in, It may be a matrix consisting of a plurality of first input data of first training data. It may be a matrix composed of first output data of a plurality of first training data.

[0043] , Instructed For one A matrix with 4 rows and 4 columns, is the number of the first training data. In , each row indicates the first input data of the first training data. A row in can be represented as ,in, is the longitudinal velocity in the i-th first training data, is the lateral velocity in the i-th first training data, is the yaw angular velocity in the i-th first training data, is the rudder angle in the i-th first training data.

[0044] In the matrix In FIG. 1 , each row indicates a first output data of a first training data. A row in can be represented as ,in, is the longitudinal acceleration in the i-th first training data, is the lateral acceleration in the i-th first training data, is the yaw angular acceleration in the i-th first training data.

[0045] The accuracy of the ship operation model is inseparable from the quality of the training data, that is, the higher the quality of the training data, the higher the accuracy of the ship operation model. Based on this, since multiple first training data are collected by sensors, outliers are inevitably present in the multiple first training data. Therefore, in an embodiment of the present application, multiple first training data need to be screened out for outliers. However, before the multiple first training data are screened out for outliers, the first input data in each of the multiple first training data needs to be mapped to a two-dimensional coordinate system through a principal component analysis algorithm to obtain the second input data of each first training data, so as to facilitate the screening of outliers in the multiple first training data based on the second input data of each first training data.

[0046] Obviously, by mapping the first input data in each first training data into a two-dimensional coordinate system, the first input data in each first training data can be converted into two-dimensional second input data to facilitate subsequent data processing.

[0047] S120. Based on the second input data of each first training data and in combination with a grid density method, outliers are screened out from the plurality of first training data to obtain a plurality of second training data.

[0048] By screening outliers from the plurality of first training data, a plurality of second training data are obtained to improve the quality of the plurality of second training data, thereby improving the accuracy of a subsequent ship operation model obtained through training based on the plurality of second training data.

[0049] It should be noted that the plurality of second training data may be understood as the first training data remaining after outliers are screened out from the plurality of first training data.

[0050] Outliers can be understood as erroneous data collected due to factors such as sensor failure.

[0051] S130. Configure a first weight for each second training data according to the density of the grid to which each second training data belongs in the plurality of second training data.

[0052] The first weight of each second training data is used to indicate the influence degree of noise on the corresponding second training data.

[0053] During the operation of the ship, it will be affected by environmental factors such as wind, waves and currents, resulting in certain noise in the data collected by the sensor. In other words, there may be certain noise in multiple second training data. The density of the second training data can reflect the degree of influence of noise on the second training data. Specifically, the denser the second training data, the smaller the influence of noise on the second training data, and the sparser the second training data, the relatively greater the influence of noise on the second training data. In this way, a first weight can be configured for each second training data according to the density of the second training data, so as to indicate the degree of influence of noise on the corresponding second training data through the first weight of each second training data. Specifically, the more the number of second training data within the preset range where the second training data is located (i.e., the denser), the larger the first weight of the second training data, so as to indicate that the influence of noise on the second training data is smaller through the first weight of the second training data. The fewer the number of second training data within the preset range where the second training data is located (i.e., the sparser), the smaller the first weight of the second training data, so as to indicate that the influence of noise on the second training data is relatively greater through the first weight of the second training data.

[0054] Exemplarily, the density of the grid to which each second training data belongs may be configured as the first weight of each second training data. The density of each grid may be the number of second input data in each grid. The grid to which the second training data belongs may be the grid to which the second input data of the second training data belongs.

[0055] Obviously, by configuring the first weight for each second training data, the first weight for each second training data indicates the influence degree of the noise on the corresponding second training data.

[0056] S140. According to each second training data and the first weight of each second training data, the first ship operation model is trained to obtain a second ship operation model.

[0057] Each second training data may be input into the first ship operation model, and the first ship operation model may be trained in combination with the first weight of each second training data to obtain the value of each parameter in the first ship operation model. In this way, the value of each parameter is substituted into the first ship operation model to obtain the second ship operation model. In other words, the second ship operation model may be understood as the first ship operation model after the value of the parameter is determined.

[0058] Obviously, by the principal component analysis algorithm, the first input data in each of the multiple first training data is mapped to a two-dimensional coordinate system to obtain the second input data of each first training data, so as to facilitate the outlier screening of the multiple first training data. According to the second input data of each first training data, combined with the grid density method, the multiple first training data are screened for outliers to obtain multiple second training data, thereby improving the quality of the multiple second training data, thereby improving the accuracy of the multiple second training data. In addition, according to the density of the grid to which each second training data in the multiple second training data belongs, the first weight of each second training data is configured, and the first weight of each second training data can indicate the degree of influence of noise on the corresponding second training data. In this way, the first ship operation model is trained according to each second training data and the first weight of each second training data, so that the training of the first ship operation model not only uses high-quality second training data, but also considers the degree of influence of noise on the second training data, so as to reduce the influence of outliers and noise on model training, thereby improving the accuracy and robustness of the trained second ship operation model, thereby improving the prediction accuracy of ship operation data.

[0059] In some embodiments, the process of mapping the first input data in each of the plurality of first training data into the two-dimensional coordinate system by the principal component analysis algorithm may be as follows:

[0060] First, according to the first input data in each first training data, an average value of the first input data of the plurality of first training data is determined.

[0061] As can be seen from the above, the first input data of each first training data may include data of multiple dimensions, so the average value of the first input data of the multiple first training data may include the average value of each dimension in the multiple dimensions. Specifically, the average value of each dimension is the average value of the data of the corresponding dimension in the first input data of the multiple first training data.

[0062] For example, from the above, we can see that the matrix is a matrix composed of the first input data of multiple first training data. In the matrix, each row indicates the first input data of the first training data. A row in can be represented as Based on this, the average value of multiple first training data can be expressed as ,in, For the matrix In The mean of the column, For the matrix In The mean of the column, For the matrix In The mean of the column, For the matrix In The mean of the column.

[0063] Then, the difference between the first input data in each first training data and the average value is determined as the third input data of each first training data.

[0064] As can be seen from the above, the first input data of each first training data may include data of multiple dimensions. Therefore, for each first training data, the difference between the first input data in the first training data and the average value can be understood as: the difference between the data of each dimension in the first input data in the first training data and the average value of the corresponding dimension. Based on this, for each first training data, the third input data of the first training data may also include multiple dimensions, and the data of each dimension in the third input data of the first training data is the difference between the data of each dimension in the first input data of the first training data and the average value of the corresponding dimension.

[0065] For example, through the matrix A matrix indicating a third input data of a plurality of first training data. In the example, each row indicates the third input data of the first training data, and the data of each row can be and The difference of the data of the corresponding dimensions in .

[0066] Next, a sample correlation matrix is ​​determined based on a first matrix formed by third input data of a plurality of first training data and in combination with a matrix eigenvalue decomposition method.

[0067] Exemplarily, the first matrix may be the matrix Specifically, the sample correlation matrix can be determined according to the following formula (1):

[0068] (1)

[0069] Among them, R is the sample correlation matrix, is the number of the first training data, is the first matrix; for The transposed matrix of .

[0070] Next, multiple eigenvalues ​​and multiple eigenvectors of the sample correlation matrix are determined, wherein the multiple eigenvalues ​​correspond to the multiple eigenvectors one-to-one.

[0071] Finally, the second input data of each first training data is determined according to the first eigenvector and the second eigenvector in combination with the first matrix.

[0072] The first eigenvector is an eigenvector corresponding to a first eigenvalue, the first eigenvalue is the maximum eigenvalue among multiple eigenvalues, and the second eigenvector is an eigenvector corresponding to an eigenvalue that is only smaller than the first eigenvalue among multiple eigenvalues.

[0073] The multiple eigenvalues ​​may be arranged in descending order, and the first eigenvalue may be determined as the first eigenvalue, that is, the maximum eigenvalue may be determined as the first eigenvalue, and the second eigenvalue may be determined as the eigenvalue only smaller than the first eigenvalue among the multiple eigenvalues.

[0074] For example, as can be seen from the above, is the first matrix. Let is the first eigenvector, is the second eigenvector, then the second input data of each first training data can be determined by the following formula (2):

[0075] (2)

[0076] Used to indicate For one A matrix with 2 rows and 2 columns, is the number of the first training data. From formula (2), we can see that The first matrix and and The product of the vectors. In , each row includes two-dimensional data, and each row indicates the second input data of a first training data. That is, the two-dimensional data of each row indicates the second input data of a first training data. Obviously, for each first training data, the second input data of the first training data includes two-dimensional data, which are the horizontal coordinate and the vertical coordinate in the two-dimensional coordinate system. Based on this, It can be understood as a matrix composed of multiple first training data and second input data.

[0077] Obviously, the first input data of each first training data can be converted into two-dimensional second input data in the above manner to facilitate subsequent data processing.

[0078] In some embodiments, Figure 2 As shown, according to the second input data of each first training data, and in combination with the grid density method, the specific implementation process of filtering outliers from the multiple first training data to obtain the multiple second training data may include the following steps:

[0079] 210. Divide the region of the second input data of the plurality of first training data in the two-dimensional coordinate system into a plurality of grids.

[0080] As can be seen from the above, the second input data of the first training data includes data of two dimensions, which are the horizontal coordinate and the vertical coordinate in the two-dimensional coordinate system. Therefore, the second input data of the plurality of first training data can be indicated in the two-dimensional coordinate system by points in the two-dimensional coordinate system XOY. For example, Figure 3 As shown, the two-dimensional coordinate system XOY includes multiple points, and the multiple points correspond one-to-one to the second input data of multiple first training data. The horizontal coordinate and the vertical coordinate of each point are the second input data in the corresponding first training data. In other words, one point indicates the second input data of one first training data.

[0081] exist Figure 3 In the figure, since a point indicates a second input data of a first training data, the area of ​​the second input data of multiple first training data in the two-dimensional coordinate system can be understood as Figure 3 The area of ​​multiple points in the two-dimensional coordinate system.

[0082] The shape and size of the grid can be set according to actual needs, and the embodiment of the present application does not specifically limit this. For example, the grid can be a square, and the side length of the grid can be determined by the following formula (3).

[0083] (3)

[0084] in, is the side length of the grid, is 0.4, is the number of the first training data, is the horizontal coordinate of the second input data of the i-th first training data, is the ordinate of the second input data of the i-th first training data, For maximum value operation, Minimum operation.

[0085] After determining the side length of the grid, the region of the second input data of the plurality of first training data in the two-dimensional coordinate system may be divided into a plurality of grids based on the side length of the grid. Figure 4 Indicated to Figure 3 The multiple grids obtained by meshing the area in . Figure 4 In the grid, each grid is a square and the sides of each grid are equal.

[0086] 220. Determine the density of each grid according to the amount of second input data in each grid of the plurality of grids.

[0087] That is, the number of second input data in each grid is determined as the density of each grid.

[0088] For example, Figure 4 As shown, the number of second input data in each grid can be understood as the number of points in each grid. Therefore, the density of each grid can also be understood as the number of points in each grid.

[0089] 230. Determine a first grid among the multiple grids based on the density of each grid and the distance between the multiple grids.

[0090] The distance between the plurality of grids may include a distance between any two grids in the plurality of grids.

[0091] The first grid may refer to a grid including an outlier in a plurality of grids. In a two-dimensional coordinate system, an outlier may be a point that is relatively sparsely dispersed among a plurality of points. Based on this, illustratively, the specific implementation process of 230 may be as follows:

[0092] First, the neighbor distance of each grid is determined according to the density of each grid and the distance between multiple grids.

[0093] Specifically, the concept of the neighbor distance of each grid can be as follows:

[0094] Let the second grid be one of the plurality of grids.

[0095] Based on this, when the second grid is not the grid with the highest density among the multiple grids, the neighbor distance of the second grid is the distance between the second grid and the third grid. The third grid is a grid with a higher density than the second grid and closest to the second grid among the multiple grids.

[0096] When the second mesh is the mesh with the highest density among the plurality of meshes, the neighbor distance of the second mesh is the maximum value among the neighbor distances of the plurality of meshes.

[0097] The distance between the second grid and the third grid can be understood as the Euclidean distance between the grid geometric centers of the second grid and the third grid. In other embodiments, the distance between the second grid and the third grid can also be the distance from any point in the second grid to any point in the third grid, which is not specifically limited here.

[0098] Obviously, based on the above description, the neighbor distance of each grid can be determined according to the density of each grid and the distance between multiple grids.

[0099] It should be noted that after the density and neighbor distance of each grid are determined, in order to facilitate calculation, the density and neighbor distance of each grid can be normalized respectively, so that the normalized density and neighbor distance are determined as the density and neighbor distance of the grid.

[0100] Then, a grid among the multiple grids, whose density is less than a preset density and whose neighbor distance is greater than a preset distance, is determined as a first grid.

[0101] When determining the first grid, the preset density and the preset distance can be determined by the following formula (4):

[0102] (4)

[0103] in, For the preset density, is the density of the kth grid after sorting multiple grids in order from small to large density, is the number of grids, is 0.2, For rounding up operation, For the preset distance, is the neighbor distance of the sth grid after sorting multiple grids in the order of neighbor distance from small to large.

[0104] It should be noted that when determining the number of grids and After multiplying by , the result is rounded up to get the value of k. Similarly, when determining the number of grids, and( ), and the result is rounded up to get the value of s.

[0105] It should be noted that the above-mentioned determination method of the preset density and the preset distance is only exemplary and is not used to limit the determination method of the preset density and the preset distance in the embodiment of the present application. For example, the preset density and the preset distance can also be adjusted and determined by the measurement results.

[0106] After determining the preset density and the preset distance, the density and the neighbor distance of each grid may be compared with the preset density and the preset distance respectively, so as to determine the grid having a density less than the preset density and a neighbor distance greater than the preset distance as the first grid.

[0107] 240. Filter out the first training data to which the second input data in the first grid belongs from the plurality of first training data to obtain a plurality of second training data. That is, the plurality of second training data may be the first training data remaining after filtering out the first training data to which the second input data in the first grid belongs from the plurality of first training data.

[0108] Based on this, illustratively, the specific implementation process of S130 may also be as follows:

[0109] For each second training data, the density of the grid to which the second training data belongs is configured as the first weight of the second training data. The grid to which the second training data belongs may be the grid where the second input data of the second training data is located.

[0110] As can be seen from the above, the denser the second training data, the smaller the impact of noise on the second training data, and the larger the weight of the second training data. The sparser the second training data, the larger the impact of noise on the second training data, and the smaller the first weight of the second training data. In addition, the greater the grid density, the more second input data of the second training data in the grid, and the denser the second input data of the second training data (it can also be understood as the denser the second training data in the grid), and vice versa. Therefore, by configuring the density of the grid to which the second training data belongs as the first weight of the second training data, the first weight of the second training data can accurately reflect the degree of influence of noise on the second training data, thereby improving the accuracy of model training when the model is trained later.

[0111] In some embodiments, Figure 5 As shown, S140 can also be implemented in the following manner. The specific process may include:

[0112] 510. According to each second training data and the first weight of each second training data, the first ship operation model is trained to obtain a third ship operation model.

[0113] Exemplarily, the first ship operation model may be shown as the following formula (5):

[0114] (5)

[0115] in, is the longitudinal velocity of the ship at time t, is the lateral velocity of the ship at time t, is the ship's pitch angular velocity at time t, is the rudder angle of the ship at time t. It can be the ship’s operating data at time t, Can include , , and , is the longitudinal acceleration of the ship at time t, is the lateral acceleration of the ship at time t, is the ship's pitch angular acceleration at time t, is the longitudinal velocity model in the first ship operation model, is the lateral velocity model in the first ship operation model, It is the bow angular velocity model in the first ship operation model.

[0116] Obviously, the first ship operation model includes three models, namely , and .

[0117] Based on this, the specific implementation process of 510 can be: according to each second training data and the first weight of each second training data, the first ship operation model is respectively , and Training is performed to obtain a third ship operation model. The third ship operation model includes , , and after training , , The value of the parameter in .

[0118] Below, For example, The specific training process is as follows:

[0119] generate The upper boundary function and the lower boundary function .in this way, It can be expressed as formula (6).

[0120] (6)

[0121] Upper Boundary Function and the lower boundary function It can be expressed as formula (7).

[0122] (7)

[0123] in, for The transposed matrix of is a matrix consisting of the first input data of multiple second training data, Each row in indicates a first input data of a second training data, , , and for The parameters in and is the weight vector, and is the bias, , Instructed and Each is one A matrix with one row and one column, , Instructed and All are numerical values. Instructed For a row A matrix of columns, is the kernel vector, is the radial basis kernel function, is the number of second training data, is the first input data in the jth second training data, .

[0124] According to formula (6) and formula (7), we can get The specific expression formula (8) is:

[0125] (8)

[0126] By solving formula (8) , , and The numerical value of is obtained, and the solved numerical value is substituted into formula (8), and the longitudinal velocity model in the third ship operation model can be obtained.

[0127] To determine , , and The value of needs to solve the following minimization problem, which is shown in formula (9):

[0128] (9)

[0129] in, , , , , and is a hyperparameter. is a unit vector, Instructed For one A matrix with one row and one column and the value of each row in the matrix is ​​1. and is a sparse vector, Instructed For one A matrix with one row and one column, Instructed For one A matrix with one row and one column, , is the weight matrix, is the first weight of the plurality of second training data, Indicates that D is a OK In the weight matrix D, each value on the diagonal corresponds to the first weight of the second training data, and the remaining elements are all 0. A matrix consisting of the first output data of the plurality of second training data. for The transposed matrix of for The transposed matrix of for The transposed matrix of .

[0130] By introducing and , transform formula (9) into formula (10) to facilitate solution , , and .

[0131] (10)

[0132] in, Used to indicate For one A matrix with one row and one column, Used to indicate For one A matrix with one row and one column, and is the Lagrange product vector, for The transposed matrix of for The transposed matrix of , Instructed For one OK A matrix of columns, , Instructed For one OK A matrix of columns, , Instructed For one OK A matrix of columns, and is the identity matrix, , Instructed For one OK A matrix of columns, for The transposed matrix of , instruct For one A matrix with 1 row and 1 column, for The transposed matrix of , Instructed For one OK A matrix of columns, , Instructed For one A matrix with 1 row and 1 column, for The transposed matrix of .

[0133] After solving the dual quadratic programming problem in formula (10), we can obtain formula (11):

[0134] (11)

[0135] in, , , Instructed For one A matrix with 1 row and 1 column, Instructed For one A matrix with 1 row and 1 column.

[0136] Obviously, formula (11) indicates , , and The value of .

[0137] Substituting the value obtained from formula (11) into formula (8), the longitudinal velocity model in the third ship operation model can be obtained.

[0138] It should be noted that the process of solving other models in the third ship operation model is similar to the above process and will not be repeated here.

[0139] 520. Determine a training error of each second training data according to each second training data and the third ship operation model.

[0140] Specifically, the first input data of each second training data can be input into the third ship operation model so that the third ship operation model outputs the second output data of each second training data, and the difference between the first output data and the second output data of each second training data is respectively determined as the training error of each second training data.

[0141] 530. Determine a second weight for each second training data according to the training error of each second training data and the first weight.

[0142] Exemplarily, the second weight of each second training data may be determined by the following formula (12):

[0143] (12)

[0144] in, is the first weight of the j-th second training data, is the second weight of the j-th second training data, is the training error of the j-th second training data, , is the absolute median deviation operation, is 3, is the number of second training data, .

[0145] It can be understood that, through 530, the first weight of each second training data can be updated to obtain the second weight of each second training data.

[0146] 540. According to each second training data and the second weight of each second training data, the first ship operation model is trained to obtain the second ship operation model.

[0147] The implementation principle of 540 is similar to that of 510 , except that the second weight of the second training data in 540 is regarded as the first weight of the second training data in 510 , and the implementation process of 540 is not described in detail here.

[0148] It should be noted that the second ship operation model can be understood as the first ship operation model with the parameter values ​​determined.

[0149] As can be seen from the above, after the first ship operation model is trained according to each second training data and the first weight of each second training data, the training error of each second training data is determined by the third ship operation model obtained through training, so as to determine the second weight of each second training data according to the training error and the first weight of each second training data, so as to achieve the purpose of updating the first weight of each second training data according to the training error of each second training data to obtain the second weight of each second training data, and also improve the accuracy of the second weight of each second training data. In this way, the first ship operation model is trained according to each second training data and the second weight of each second training data, so as to further improve the accuracy of the training, thereby further improving the precision and robustness of the second ship operation model obtained by training, and further improving the accuracy of the operation data prediction.

[0150] In some embodiments, it is also possible to Figure 6 The method shown in FIG. 140 is used to implement S140. The specific process may include:

[0151] 601. Configure the values ​​of the hyperparameters in the first ship operation model.

[0152] The hyperparameters in the first ship operation model can be, for example, , , , , and .

[0153] It should be noted that in Figure 5 In the training process shown, the values ​​of the hyperparameters are pre-set.

[0154] 602. Perform a training step. The training step may include training the first ship operation model according to each second training data and the first weight of each second training data and based on the value of the hyperparameter to obtain a fourth ship operation model.

[0155] The implementation process of 602 is similar to the implementation process of 510 and will not be repeated here. The fourth ship operation model can be understood as the third ship operation model in 610.

[0156] 603. Determine a training error of each second training data according to each second training data and the fourth ship operation model.

[0157] The implementation process of 603 is similar to that of 520 and will not be described again here.

[0158] 604. Determine a second weight for each second training data according to the training error of each second training data and the first weight.

[0159] The implementation process of 604 is similar to the implementation process of 530, and will not be repeated here.

[0160] 605. According to each second training data and the second weight of each second training data, the first ship operation model is trained to obtain a fifth ship operation model.

[0161] The implementation process of 605 is similar to that of 540 and will not be described again here.

[0162] 606. Based on the multiple verification data, the fifth ship operation model is verified to obtain verification information.

[0163] The concepts of multiple verification data and multiple first training data are similar and will not be described here. It should be noted that multiple verification data and multiple first training data are the operation data of the ship at different historical moments. Based on this, combined with the relevant description of the first training data above, it can be seen that each verification data in the multiple verification data includes first input data and first output data. Based on this, the specific implementation process of 606 can be described as follows:

[0164] The first input data of each verification data is input to the fifth ship operation model, so that the fifth ship operation model outputs the second output data of each verification data.

[0165] The verification information may include first output data and second output data of each of the plurality of verification data.

[0166] 607. Determine whether the stop condition is met. If yes, execute 608, if not, execute 609.

[0167] The stop condition may be, for example, that the verification times of the fifth ship operation model reaches a preset number. Based on this, 607 may be: determining whether the verification times of the fifth ship operation model reaches a preset number. In this way, after a verification is performed once in 606, the verification times need to be increased by one, and the judgment in 607 is performed based on the verification times after the increase by one.

[0168] The stop condition may also be, for example, that the average error of the first output data and the second output data of the plurality of verification data is less than a preset error. Based on this, 607 may be: determining whether the average error of the first output data and the second output data of the plurality of verification data is less than a preset error. In this way, after a verification is performed once in 606, it is necessary to calculate the average error of the first output data and the second output data of the plurality of verification data, and perform the judgment in 607 based on the calculated average error.

[0169] 608. Determine the fifth ship operation model as the second ship operation model.

[0170] 609. Update the values ​​of the hyperparameters based on the verification information and go to training step 602.

[0171] The process of updating the value of the hyperparameter may be, for example, updating the value of the hyperparameter according to the difference between the first output data and the second output data of each verification data.

[0172] As can be seen from the above, the first ship operation model is first trained based on each second training data and the first weight of each second training data and based on the value of the hyperparameter to obtain the fourth ship operation model, and then the training error of each second training data is determined based on the fourth ship operation model, so that the first weight of each second training data is updated according to the training error and the first weight of each second training data to obtain the second weight of each second training data, thereby improving the accuracy of the second weight of each second training data. In this way, the first ship operation model is trained for the second time through each second training data and the second weight of each second training data, which can improve the accuracy of the model training, thereby improving the accuracy and robustness of the fifth ship operation model obtained by training.

[0173] Furthermore, the fifth ship operation model is verified once through a plurality of verification data, and after the verification is completed, when the stop condition is met, the fifth ship operation model is determined as the second ship operation model. Since the accuracy of the fifth ship operation model is improved, the accuracy of the second ship operation model is also improved. When the stop condition is not met, the value of the hyperparameter of the first ship operation model is updated through the verification information, thereby improving the accuracy of the value of the hyperparameter. In this way, based on the updated value of the hyperparameter and each second training data and the first weight of each second training data, the training process is re-executed until the stop condition is met, which can further improve the accuracy of the model training, and further improve the accuracy of the second ship operation model obtained by training.

[0174] Figure 7A flow chart of a ship operation control method provided in an embodiment of the present application is provided. The ship operation control method can be executed by an electronic device. The electronic device has been described above and will not be described again here. Figure 7 As shown, the ship operation control method may include the following steps:

[0175] 701. Obtain a second ship operation model trained according to the above-mentioned ship operation model training method.

[0176] 702. Obtain the ship’s operating data at the current moment.

[0177] The operation data of the ship at the current moment may include the longitudinal speed, lateral speed, bow angular velocity, rudder angle, heading angle, and position information of the ship at the current moment. The position information of the ship at the current moment may include the coordinates of the ship on the X-axis and Y-axis at the current moment. The operation data of the ship at the current moment may be collected by sensors installed on the ship, including but not limited to radar, GPS (Global Positioning System), etc.

[0178] Next, combine Figure 8 , the above parameters of the ship are exemplified. Figure 8 As shown, is the geodetic coordinate system, is the body coordinate system of the ship, is the orientation angle, is the rudder angle, is the longitudinal velocity, is the lateral velocity, The angular velocity of the bow is U, which is the speed of the ship when it is moving forward.

[0179] 703. According to the second ship operation model and the operation data of the ship at the current moment, predict the operation data of the ship at the next moment.

[0180] Exemplarily, the longitudinal speed, lateral speed, yaw angular velocity and rudder angle of the ship at the current moment can be input into the second ship operation model, so that the second ship operation model outputs the longitudinal acceleration, lateral acceleration and yaw angular acceleration of the ship at the current moment.

[0181] Furthermore, according to the longitudinal acceleration, lateral acceleration, yaw angular acceleration of the ship at the current moment, and the operation data of the ship at the current moment, the operation data of the ship at the next moment is determined in combination with the following formula (13).

[0182] (13)

[0183] in, is the sampling interval, is the longitudinal speed of the ship at time t+1 (i.e. the next moment), is the lateral speed of the ship at time t+1, is the ship's pitch angular velocity at time t+1, is the heading angle of the ship at time t+1, is the heading angle of the ship at time t, is the coordinate of the ship on the X axis at time t+1, is the coordinate of the ship on the X axis at time t, is the coordinate of the ship on the Y axis at time t+1, is the coordinate of the ship on the Y axis at time t.

[0184] It should be noted that for parameters not described, please refer to the relevant descriptions in the above text.

[0185] The operation data of the ship at the next moment may include the longitudinal speed, lateral speed, pitch angular velocity, heading angle, and position information of the ship at the next moment. The position information of the ship at the next moment may include the coordinates of the ship on the X-axis and the Y-axis at the next moment.

[0186] 704. Determine the control data of the ship at the next moment according to the operation data of the ship at the next moment and the predetermined operation trajectory of the ship, and control the operation of the ship according to the control data.

[0187] The predetermined position information of the ship at the next moment can be determined from the predetermined operation track of the ship, and the position difference information of the ship at the next moment can be determined according to the predetermined position information of the ship at the next moment and the position information in the operation data of the ship at the next moment. Next, the control data is determined according to the position difference information of the ship at the next moment and according to the longitudinal speed, lateral speed, bow angular velocity, and heading angle in the predicted operation data of the ship at the next moment. The control data may refer to various operation control quantities of the ship at the next moment, and the operation of the ship is controlled according to the control data to control the ship to operate on the predetermined operation track.

[0188] Since the accuracy of the second ship operation model determined by the above method has been improved, the accuracy of the predicted ship operation data at the next moment based on the second ship operation model and the ship's operation data at the current moment has also been improved, thereby improving the accuracy of determining the ship's control data at the next moment, and thus being able to more accurately control the ship operation.

[0189] like Fig. 9 As shown, an electronic device 900 provided by an embodiment of the present invention includes a memory 910 and a processor 920; the memory 910 is used to store a computer program; the processor 920 is used to implement the ship operation model training method or the ship operation control method as described above when executing the computer program.

[0190] It should be noted that the electronic device can achieve similar effects as the ship operation model training method or the ship operation control method, which will not be repeated here.

[0191] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the ship operation model training method or the ship operation control method as described above is implemented.

[0192] It should be noted that the computer-readable storage medium can achieve similar effects as the ship operation model training method or the ship operation control method, which will not be repeated here.

[0193] An electronic device 900 that can be used as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. Electronic device 900 is intended to represent various forms of digital electronic computer equipment, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 900 can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the present invention described herein and / or required.

[0194] The electronic device 900 includes a computing unit, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) or a computer program loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for the operation of the device can also be stored. The computing unit, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0195] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. In the present application, the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be arranged on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment of the present invention. In addition, each functional unit in each embodiment of the present invention can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0196] Although the present invention is disclosed as above, the protection scope of the present invention is not limited thereto. Those skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will fall within the protection scope of the present invention.

Claims

1. A ship operation model training method, characterized in that: include: Mapping the first input data in each of the plurality of first training data into a two-dimensional coordinate system by a principal component analysis algorithm to obtain the second input data of each of the first training data; Wherein, the multiple first training data are historical operation data of the ship during operation, the historical operation data of the ship during operation include the operation data of the ship at multiple historical moments, and the multiple first training data correspond to the operation data of the ship at multiple historical moments; each of the first training data includes the first input data and the first output data; the first input data of each of the first training data includes at least the longitudinal speed, lateral speed, yaw angular velocity and rudder angle of the ship at the corresponding historical moment, and the first output data of each of the first training data includes at least the longitudinal acceleration, lateral acceleration and yaw angular acceleration of the ship at the corresponding historical moment; According to the second input data of each first training data, and in combination with a grid density method, outliers are screened out from the plurality of first training data to obtain a plurality of second training data; According to the density of the grid to which each second training data belongs among the plurality of second training data, configure a first weight of each second training data, wherein the first weight of each second training data is used to indicate the degree of influence of noise on the corresponding second training data; The first ship operation model is trained according to each second training data and the first weight of each second training data to obtain a second ship operation model.

2. The method according to claim 1, characterized in that The step of removing outliers from the plurality of first training data according to the second input data of each first training data and combining a grid density method to obtain a plurality of second training data includes: Dividing a region of the second input data of the plurality of first training data in the two-dimensional coordinate system into a plurality of grids; Determining the density of each grid according to the amount of the second input data in each grid of the plurality of grids; Determining a first grid among the plurality of grids according to the density of each grid and the distance between the plurality of grids; The first training data to which the second input data in the first grid belongs are filtered out from the plurality of first training data to obtain the plurality of second training data.

3. The method according to claim 1, characterized in that The mapping of the first input data in each of the plurality of first training data into a two-dimensional coordinate system by a principal component analysis algorithm to obtain the second input data of each of the first training data comprises: Determine an average value of the first input data of the plurality of first training data according to the first input data in each of the first training data; Determine the difference between the first input data in each of the first training data and the average value as the third input data of each of the first training data; Determine a sample correlation matrix based on a first matrix formed by the third input data of the plurality of first training data and in combination with a matrix eigenvalue decomposition method; Determine a plurality of eigenvalues ​​and a plurality of eigenvectors of the sample correlation matrix, wherein the plurality of eigenvalues ​​correspond one-to-one to the plurality of eigenvectors; Determine the second input data of each first training data according to the first eigenvector and the second eigenvector and in combination with the first matrix; The first eigenvector is an eigenvector corresponding to a first eigenvalue, the first eigenvalue is the maximum eigenvalue among the multiple eigenvalues, and the second eigenvector is an eigenvector corresponding to an eigenvalue among the multiple eigenvalues ​​that is only smaller than the first eigenvalue.

4. The method according to claim 2, characterized in that: Determining a first grid among the multiple grids according to the density of each grid and the distance between the multiple grids comprises: Determine the neighbor distance of each grid according to the density of each grid and the distance between the plurality of grids; A grid among the multiple grids, whose density is less than a preset density and whose neighbor distance is greater than a preset distance, is determined as the first grid.

5. The method according to claim 4, characterized in that Before determining the grid whose density is less than the preset density and whose neighbor distance is greater than the preset distance among the plurality of grids as the first grid, the method further includes: The preset density and the preset distance are determined by the following formula: in, is the preset density, is the density of the kth grid after the plurality of grids are sorted in the order of the density from small to large; is the number of the grids, is 0.2, For rounding up operation, is the preset distance, is the neighbor distance of the sth grid after the multiple grids are sorted in the order of the neighbor distances from small to large.

6. The method according to claim 2, characterized in that The grid is a square, and the side length of the grid is determined by the following formula: in, is the side length of the grid, is 0.4, is the number of the first training data, is the horizontal coordinate of the second input data of the i-th first training data, is the ordinate of the second input data of the i-th training data, For maximum value operation, Minimum operation.

7. The method according to claim 1, characterized in that The step of training the first ship operation model according to each second training data and the first weight of each second training data to obtain the second ship operation model comprises: Training the first ship operation model according to each second training data and the first weight of each second training data to obtain a third ship operation model; Determining a training error of each second training data according to each second training data and the third ship operation model; Determine a second weight of each second training data according to the training error of each second training data and the first weight; The first ship operation model is trained according to each second training data and the second weight of each second training data to obtain the second ship operation model.

8. The method according to claim 1, characterized in that The step of training the first ship operation model according to each second training data and the first weight of each second training data to obtain the second ship operation model comprises: configuring the values ​​of hyperparameters in the first ship operation model; executing a training step, the training step comprising training the first ship operation model according to each of the second training data and the first weight of each of the second training data and based on the value of the hyperparameter to obtain a fourth ship operation model; Determining a training error of each second training data according to each second training data and the fourth ship operation model; Determine a second weight of each second training data according to the training error of each second training data and the first weight; Training the first ship operation model according to each second training data and the second weight of each second training data to obtain a fifth ship operation model; According to the plurality of verification data, verify the fifth ship operation model once to obtain verification information; Determine whether the stopping condition is met; If yes, determining the fifth ship operation model as the second ship operation model; If not, update the value of the hyperparameter according to the verification information and go to the training step.

9. The method according to claim 7 or 8, characterized in that: Determining the second weight of each second training data according to the training error of each second training data and the first weight comprises: The second weight of each second training data is determined by the following formula: in, is the first weight of the j-th second training data, is the second weight of the j-th second training data, is the training error of the jth second training data, , is the absolute median deviation operation, is 3, is the number of the second training data, .

10. A ship operation control method, characterized in that: include: Obtaining a second ship operation model obtained according to the method of any one of claims 1 to 9; Obtain the ship's operating data at the current moment; The operation data of the ship at the current moment includes the longitudinal speed, lateral speed, yaw angular velocity, rudder angle, heading angle, and position information of the ship at the current moment; predicting the operation data of the ship at a next moment according to the second ship operation model and the operation data of the ship at a current moment; According to the operation data of the ship at the next moment and the predetermined operation track of the ship, the control data of the ship at the next moment is determined, and the operation of the ship is controlled according to the control data.