Power correction method and system based on ship motor
Patent Information
- Application Number
- CN202411067985.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-08-06
Smart Images

Figure CN118579233B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of ship operation motion, and in particular to a power correction method and system based on a ship motor. Background Art
[0002] Existing related technologies mainly use parametric modeling and non-parametric modeling when modeling ship operating movements. Among them, there is a correlation between the various parameters in parametric modeling. According to the parameter cancellation effect, the parameters will be very unstable, and the ship model needs to be obtained in advance, which requires high accuracy of the model structure. Non-parametric modeling does not require the ship model results, but is directly input into the machine learning model. Irrelevant features and important features cannot be distinguished, resulting in low accuracy of the power model of the ship motor. Summary of the invention
[0003] The purpose of this application is to address the deficiencies of the above-mentioned existing related technologies and propose a power correction method and system based on ship motors, which can improve the accuracy of the power model of ship motors.
[0004] In a first aspect, the present application provides a power correction method based on a ship motor, comprising:
[0005] Collecting an initial data set related to ship operation and motor power data corresponding to the initial data set, giving weights to local key features of the initial data set according to the information entropy of the initial data set to obtain a local weighted data set, and dividing the local weighted data set into positive samples and negative samples according to whether a stable state is reached after execution;
[0006] Based on the positive sample as the input of the first initial twin network model, the output is used as the first prediction result of the power model, and based on the negative sample as the input of the second initial twin network model, the output is used as the second prediction result of the power model; the network model of the first initial twin network model is the same as that of the second initial twin network model;
[0007] The motor power data is used as a label, and a discriminative ternary loss function is established according to the first prediction result, the second prediction result and the label. The parameters of the first initial twin network model are corrected according to the discriminative ternary loss function to obtain a first twin network model, so that the ship motor power data can be predicted in real time according to the first twin network model.
[0008] The present application selects key features through information entropy, and weights local key features to enhance the key features, avoiding the interference of irrelevant or low-information features on the initial twin network model, thereby improving the training accuracy of the initial twin network model, and then improving the accuracy of the dynamic model based on non-parametric modeling. In addition, the twin network model is used to perform non-parametric modeling of the ship motion model, and the positive and negative samples are processed simultaneously, which can improve the training efficiency; in addition, positive samples and negative samples are used to establish a discriminant ternary loss function. First, the factor of the difference in positive and negative sample data detected by different detection equipment can be taken into account, thereby improving the accuracy of the dynamic model based on non-parametric modeling; secondly, the weighted discriminant ternary loss function can be used to avoid overfitting and underfitting of the dynamic model, further improving the accuracy of the dynamic model based on non-parametric modeling.
[0009] Furthermore, according to the information entropy of the initial data set, weights are given to local key features of the initial data set to obtain a local weighted data set, including:
[0010] The historical data in the initial data set are arranged in chronological order, the information entropy of the data subset at the corresponding moment is calculated, and the data subset corresponding to the information entropy exceeding the preset threshold is weighted with the information gain rate as the weight to obtain a local weighted data set.
[0011] Further, the dividing the local weighted data set into positive samples and negative samples according to whether it reaches a stable state after execution includes:
[0012] According to whether the corresponding motor power data reaches a stable state, all data subsets are separated by a preset execution step size. If the corresponding data subset reaches a stable state after being executed within the interval, the corresponding data subset is recorded as a negative sample, otherwise the corresponding data subset is recorded as a positive sample.
[0013] Further, establishing a discriminative ternary loss function according to the first prediction result, the second prediction result and the label includes:
[0014] Obtain a first prediction deviation between the first prediction result and the label and a second prediction deviation between the second prediction result and the label respectively, and obtain the difference between the first prediction deviation and the second prediction deviation, and select the maximum value from the difference and the preset limit as the value of the discriminative ternary loss function.
[0015] Further, obtaining the difference between the first prediction deviation and the second prediction deviation includes:
[0016] A positive sample deviation between the positive sample and the positive sample mean is obtained, and a first fitting weight is obtained by exponentiating the ratio of the positive sample deviation to a preset wavelength function as a preset base, and a negative sample deviation between the negative sample and the negative sample mean is obtained, and a second fitting weight is obtained by exponentiating the ratio of the negative sample deviation to the preset wavelength function as a preset base, and according to the first fitting weight and the second fitting weight, a weighted difference between the first prediction deviation and the second prediction deviation is taken as the difference.
[0017] Furthermore, the discriminative ternary loss function is expressed as:
[0018] ;
[0019] in, is the value of the discriminative ternary loss function, For labels, and are the outputs of the first initial twin network model and the second initial twin network model, respectively. and are positive samples and negative samples respectively, is the preset non-negative benchmark, is the preset limit, Take the square of the second normal form; and are the first fitting weight and the second fitting weight respectively.
[0020] Further, the real-time prediction of ship motor power data according to the first twin network model includes:
[0021] Assign the parameters of the first twin network model to the first initial twin network model to obtain a second twin network model, use real-time ship motor power data as input of the first initial twin network model to obtain a reference result, and sample from the local weighted data set to obtain a sampled sample, use the sampled sample as input of the second initial twin network model to obtain a sampled prediction result, compare the reference result with the sampled prediction result, and obtain a real-time prediction result.
[0022] Further, the comparing the reference result and the sample prediction result to obtain the real-time prediction result includes:
[0023] If the similarity between the reference result and the sampled prediction result is higher than the upper similarity limit, and the sampled sample reaches the stable state within the interval, the reference result is used as the real-time prediction result; or, if the similarity is lower than the lower similarity limit, and the reference result reaches the stable state within the interval, the reference result is used as the real-time prediction result.
[0024] Furthermore, if the similarity is higher than the upper similarity limit and the sampled samples fail to reach the stable state within the interval, an alarm is issued; or, if the similarity is lower than the lower similarity limit and the reference result fails to reach the stable state within the interval, an alarm is issued.
[0025] This application predicts real-time ship motor power data through the trained first twin network model and the second twin network model, and issues early warning for potential risk results, thereby improving the accuracy of the power model based on non-parametric modeling, while improving the user experience, so as to make early preventive preparations based on the early warning.
[0026] In the second aspect, the present application also provides a power correction system based on a ship motor, comprising: a preprocessing module, a network model processing module and a real-time prediction module; wherein,
[0027] The preprocessing module is used to collect an initial data set related to ship operation and motor power data corresponding to the initial data set, give weights to local key features of the initial data set according to the information entropy of the initial data set to obtain a local weighted data set, and divide the local weighted data set into positive samples and negative samples according to whether it reaches a stable state after execution;
[0028] The network model processing module is used to use the positive sample as the input of the first initial twin network model, and use the output as the first prediction result of the dynamic model, and at the same time use the negative sample as the input of the second initial twin network model, and use the output as the second prediction result of the dynamic model; the network model of the first initial twin network model is the same as that of the second initial twin network model;
[0029] The real-time prediction module is used to use the motor power data as a label, establish a discriminative ternary loss function according to the first prediction result, the second prediction result and the label, and perform parameter correction on the first initial twin network model according to the discriminative ternary loss function to obtain a first twin network model, so as to predict the ship motor power data in real time according to the first twin network model. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a flow chart of a power correction method based on a ship motor provided by the present application;
[0031] Figure 2 It is a structural schematic diagram of a power correction system based on a ship motor provided in this application. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0033] Example 1
[0034] See also Figure 1 , is a flow chart of a power correction method based on a ship motor provided by the present application, including: steps S11 to S13. In general, the present application performs an initial data set, specifically:
[0035] Step S11, collect the initial data set related to the ship operation and the motor power data corresponding to the initial data set, give weights to the local key features of the initial data set according to the information entropy of the initial data set, and obtain a local weighted data set, and divide the local weighted data set into positive samples and negative samples according to whether it reaches a stable state after execution.
[0036] In some embodiments, based on the information entropy of the initial data set, weights are given to local key features of the initial data set to obtain a local weighted data set, including: arranging the historical data in the initial data set in chronological order, calculating the information entropy of the data subset at the corresponding moment, and weighting the data subset corresponding to the information entropy exceeding a preset threshold with the information gain rate as the weight to obtain a local weighted data set.
[0037] In some embodiments, weighting with information gain rate as weight includes: weighting the corresponding data subset with information gain rate as ratio based on a preset base number. That is, the data features of the weighted data subset are higher than the data features before weighting and the unweighted data features.
[0038] This application uses information entropy to screen out key features and weight local key features to enhance the key features, avoiding the interference of irrelevant or low-information features on the initial twin network model, thereby improving the training accuracy of the initial twin network model and further improving the accuracy of the dynamic model based on non-parametric modeling.
[0039] In some embodiments, the local weighted data set is divided into positive samples and negative samples according to whether it reaches a stable state after execution, including: according to whether the corresponding motor power data reaches a stable state, all data subsets are separated by a preset execution step size. If the corresponding data subset reaches a stable state after executing it within the interval, the corresponding data subset is recorded as a negative sample, otherwise the corresponding data subset is recorded as a positive sample.
[0040] In some embodiments, in addition to dividing positive and negative samples according to the stable state, they can also be divided according to whether an accident occurs. The types of accidents may include: unexecutable, motor failure, operation failure, collision accident or sinking accident, etc.
[0041] Step S12: Based on the positive samples as the input of the first initial twin network model, the output is used as the first prediction result of the dynamic model; and based on the negative samples as the input of the second initial twin network model, the output is used as the second prediction result of the dynamic model; the network model of the first initial twin network model is the same as that of the second initial twin network model.
[0042] It is worth noting that the first initial twin network model is an initial twin network model that is only trained on positive samples. When the first initial twin network model is trained, the first twin network model is obtained; the second initial twin network model is an initial twin network model that is only trained on negative samples. The model parameters of the first twin network model are exactly the same as the model parameters of the second twin network model. The first prediction result is the prediction result of the power model output based on the positive sample as the input of the initial twin network model, and the second prediction result is the prediction result of the power model output based on the negative sample as the input of the initial twin network model.
[0043] The present application uses a twin network model to perform non-parametric modeling of the ship motion model, and processes positive and negative samples simultaneously, which can improve training efficiency and facilitate the prediction of real-time ship motor power data through the trained first twin network model and the second twin network model, and warn of potential risk results, thereby improving the accuracy of the power model based on non-parametric modeling, and improving user experience, so as to make early preventive preparations based on the warning.
[0044] Step S13, taking the motor power data as a label, establishing a discriminative ternary loss function according to the first prediction result, the second prediction result and the label, and performing parameter correction on the first initial twin network model according to the discriminative ternary loss function to obtain the first twin network model, so that the ship motor power data can be predicted in real time according to the first twin network model.
[0045] In some embodiments, a discriminative ternary loss function is established based on the first prediction result, the second prediction result and the label, including: respectively obtaining a first prediction deviation between the first prediction result and the label and a second prediction deviation between the second prediction result and the label, and obtaining the difference between the first prediction deviation and the second prediction deviation, and selecting the maximum value from the difference and the preset limit as the value of the discriminative ternary loss function.
[0046] It is worth noting that the first prediction deviation is the error between the first prediction result and the label, and the second prediction deviation is the error between the second prediction result and the true label. In the following, the first fitting weight is the weight of the first prediction deviation, and the second fitting weight is the weight of the second prediction deviation.
[0047] In some embodiments, obtaining the difference between the first prediction deviation and the second prediction deviation includes: obtaining the positive sample deviation between the positive sample and the positive sample mean, exponentially obtaining the first fitting weight with the ratio of the positive sample deviation to a preset wavelength function as a preset base, and obtaining the negative sample deviation between the negative sample and the negative sample mean, exponentially obtaining the second fitting weight with the ratio of the negative sample deviation to a preset wavelength function as a preset base, and according to the first fitting weight and the second fitting weight, taking the weighted difference between the first prediction deviation and the second prediction deviation as the difference.
[0048] In some embodiments, the discriminative ternary loss function can be expressed as:
[0049] ;
[0050] in, is the value of the discriminative ternary loss function, For labels, and are the outputs of the first initial twin network model and the second initial twin network model, respectively. and are positive samples and negative samples respectively, is the preset non-negative benchmark, is the preset limit, Take the square of the second normal form; and are the first fitting weight and the second fitting weight respectively.
[0051] This application uses positive samples and negative samples to establish a discriminative ternary loss function. First, it can take into account the factors of the difference in positive and negative sample data detected by different detection devices, thereby improving the accuracy of the dynamic model based on non-parametric modeling; secondly, through the weighted discriminative ternary loss function, it can avoid the occurrence of overfitting and underfitting of the dynamic model, and further improve the accuracy of the dynamic model based on non-parametric modeling.
[0052] In some embodiments, the first fitting weight and the second fitting weight can be respectively expressed as:
[0053] ;
[0054] ;
[0055] in, is the preset base number, is the preset wavelength function, is the value of the i-th feature of a positive sample, is the value of the i-th feature of a negative sample, This is the sample mean operation.
[0056] In some embodiments, based on the first twin network model, real-time prediction of ship motor power data is performed, including: assigning the parameters of the first twin network model to the first initial twin network model to obtain a second twin network model, using the real-time ship motor power data as the input of the first initial twin network model, obtaining a reference result, and sampling from a local weighted data set to obtain a sampling sample, using the sampling sample as the input of the second initial twin network model, obtaining a sampling prediction result, comparing the reference result and the sampling prediction result, and obtaining a real-time prediction result.
[0057] In some embodiments, the reference result and the sampled prediction result are compared to obtain the real-time prediction result, including: if the similarity between the reference result and the sampled prediction result is higher than the upper limit of the similarity, and the sampled sample reaches a stable state within the interval, then the reference result is used as the real-time prediction result; or, if the similarity is lower than the lower limit of the similarity, and the reference result reaches a stable state within the interval, then the reference result is used as the real-time prediction result.
[0058] In some embodiments, if the similarity is higher than the upper similarity limit and the sampling samples fail to reach a stable state within the interval, an alarm is issued; or, if the similarity is lower than the lower similarity limit and the reference result fails to reach a stable state within the interval, an alarm is issued.
[0059] Example 2
[0060] See also Figure 2 , is a structural schematic diagram of a power correction system based on a ship motor provided in the present application, including: a preprocessing module 21, a network model processing module 22 and a real-time prediction module 23.
[0061] In some embodiments, the preprocessing module 21 outputs positive and negative samples to the network model processing module 22; after receiving the positive and negative samples, the network model processing module 22 performs training, outputs a first prediction result and a second prediction result respectively, and transmits the first prediction result and the second prediction result to the real-time prediction module 23; after receiving the first prediction result and the second prediction result, the real-time prediction module 23 outputs real-time predicted ship motor power data.
[0062] The preprocessing module 21 is used to collect the initial data set related to the ship operation and the motor power data corresponding to the initial data set, and give weights to the local key features of the initial data set according to the information entropy of the initial data set to obtain a local weighted data set, and divide the local weighted data set into positive samples and negative samples according to whether it reaches a stable state after execution.
[0063] In some embodiments, based on the information entropy of the initial data set, weights are given to local key features of the initial data set to obtain a local weighted data set, including: arranging the historical data in the initial data set in chronological order, calculating the information entropy of the data subset at the corresponding moment, and weighting the data subset corresponding to the information entropy exceeding a preset threshold with the information gain rate as the weight to obtain a local weighted data set.
[0064] In some embodiments, the local weighted data set is divided into positive samples and negative samples according to whether it reaches a stable state after execution, including: according to whether the corresponding motor power data reaches a stable state, all data subsets are separated by a preset execution step size. If the corresponding data subset reaches a stable state after executing it within the interval, the corresponding data subset is recorded as a negative sample, otherwise the corresponding data subset is recorded as a positive sample.
[0065] The network model processing module 22 is used to use the output as the first prediction result of the dynamic model based on the positive sample as the input of the first initial twin network model, and to use the output as the second prediction result of the dynamic model based on the negative sample as the input of the second initial twin network model; the network model of the first initial twin network model is the same as that of the second initial twin network model.
[0066] The real-time prediction module 23 is used to use the motor power data as a label, establish a discriminative ternary loss function according to the first prediction result, the second prediction result and the label, and perform parameter correction on the first initial twin network model according to the discriminative ternary loss function to obtain the first twin network model, so as to predict the ship motor power data in real time according to the first twin network model.
[0067] In some embodiments, a discriminative ternary loss function is established based on the first prediction result, the second prediction result and the label, including: respectively obtaining a first prediction deviation between the first prediction result and the label and a second prediction deviation between the second prediction result and the label, and obtaining the difference between the first prediction deviation and the second prediction deviation, and selecting the maximum value from the difference and the preset limit as the value of the discriminative ternary loss function.
[0068] In some embodiments, obtaining the difference between the first prediction deviation and the second prediction deviation includes: obtaining the positive sample deviation between the positive sample and the positive sample mean, exponentially obtaining the first fitting weight with the ratio of the positive sample deviation to a preset wavelength function as a preset base, and obtaining the negative sample deviation between the negative sample and the negative sample mean, exponentially obtaining the second fitting weight with the ratio of the negative sample deviation to a preset wavelength function as a preset base, and according to the first fitting weight and the second fitting weight, taking the weighted difference between the first prediction deviation and the second prediction deviation as the difference.
[0069] In some embodiments, the discriminative ternary loss function can be expressed as:
[0070] ;
[0071] in, is the value of the discriminative ternary loss function, For labels, and are the outputs of the first initial twin network model and the second initial twin network model, respectively. and are positive samples and negative samples respectively, is the preset non-negative benchmark, is the preset limit, Take the square of the second normal form; and are the first fitting weight and the second fitting weight respectively.
[0072] In some embodiments, based on the first twin network model, real-time prediction of ship motor power data is performed, including: assigning the parameters of the first twin network model to the first initial twin network model to obtain a second twin network model, using the real-time ship motor power data as the input of the first initial twin network model, obtaining a reference result, and sampling from a local weighted data set to obtain a sampling sample, using the sampling sample as the input of the second initial twin network model, obtaining a sampling prediction result, comparing the reference result and the sampling prediction result, and obtaining a real-time prediction result.
[0073] In some embodiments, the reference result and the sampled prediction result are compared to obtain the real-time prediction result, including: if the similarity between the reference result and the sampled prediction result is higher than the upper limit of the similarity, and the sampled sample reaches a stable state within the interval, then the reference result is used as the real-time prediction result; or, if the similarity is lower than the lower limit of the similarity, and the reference result reaches a stable state within the interval, then the reference result is used as the real-time prediction result.
[0074] In some embodiments, if the similarity is higher than the upper similarity limit and the sampling samples fail to reach a stable state within the interval, an alarm is issued; or, if the similarity is lower than the lower similarity limit and the reference result fails to reach a stable state within the interval, an alarm is issued.
[0075] The present application selects key features through information entropy, and weights local key features to enhance the key features, avoiding the interference of irrelevant or low-information features on the initial twin network model, thereby improving the training accuracy of the initial twin network model, and then improving the accuracy of the dynamic model based on non-parametric modeling. In addition, the twin network model is used to perform non-parametric modeling of the ship motion model, and the positive and negative samples are processed simultaneously, which can improve the training efficiency; in addition, positive samples and negative samples are used to establish a discriminant ternary loss function. First, the factor of the difference in positive and negative sample data detected by different detection equipment can be taken into account, thereby improving the accuracy of the dynamic model based on non-parametric modeling; secondly, the weighted discriminant ternary loss function can be used to avoid overfitting and underfitting of the dynamic model, further improving the accuracy of the dynamic model based on non-parametric modeling.
[0076] Those skilled in the art will appreciate that the embodiments of the present application may also provide computer program products. Therefore, the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program codes.
[0077] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0078] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0079] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0080] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A power correction method based on a ship motor, characterized in that: include: Collecting an initial data set related to ship operation and motor power data corresponding to the initial data set, giving weights to local key features of the initial data set according to the information entropy of the initial data set to obtain a local weighted data set, and dividing the local weighted data set into positive samples and negative samples according to whether a stable state is reached after execution; Based on the positive sample as the input of the first initial twin network model, the output is used as the first prediction result of the power model, and based on the negative sample as the input of the second initial twin network model, the output is used as the second prediction result of the power model; the network model of the first initial twin network model is the same as that of the second initial twin network model; The motor power data is used as a label, and a discriminative ternary loss function is established according to the first prediction result, the second prediction result and the label. The parameters of the first initial twin network model are corrected according to the discriminative ternary loss function to obtain a first twin network model, so that the ship motor power data can be predicted in real time according to the first twin network model.
2. The power correction method based on a ship motor according to claim 1, characterized in that: The step of giving weights to local key features of the initial data set according to the information entropy of the initial data set to obtain a local weighted data set includes: The historical data in the initial data set are arranged in chronological order, the information entropy of the data subset at the corresponding moment is calculated, and the data subset corresponding to the information entropy exceeding the preset threshold is weighted with the information gain rate as the weight to obtain a local weighted data set.
3. The power correction method based on a ship motor according to claim 2, characterized in that: The dividing the local weighted data set into positive samples and negative samples according to whether a stable state is reached after execution includes: According to whether the corresponding motor power data reaches a stable state, all data subsets are separated by a preset execution step size. If the corresponding data subset reaches a stable state after being executed within the interval, the corresponding data subset is recorded as a negative sample, otherwise the corresponding data subset is recorded as a positive sample.
4. The power correction method based on a ship motor according to claim 3, characterized in that: The establishing a discriminative ternary loss function according to the first prediction result, the second prediction result and the label comprises: Obtain a first prediction deviation between the first prediction result and the label and a second prediction deviation between the second prediction result and the label respectively, and obtain the difference between the first prediction deviation and the second prediction deviation, and select the maximum value from the difference and the preset limit as the value of the discriminative ternary loss function.
5. The power correction method based on a ship motor according to claim 4, characterized in that: The obtaining a difference between the first prediction deviation and the second prediction deviation includes: A positive sample deviation between the positive sample and the positive sample mean is obtained, and a first fitting weight is obtained by exponentiating the ratio of the positive sample deviation to a preset wavelength function as a preset base, and a negative sample deviation between the negative sample and the negative sample mean is obtained, and a second fitting weight is obtained by exponentiating the ratio of the negative sample deviation to the preset wavelength function as a preset base, and according to the first fitting weight and the second fitting weight, a weighted difference between the first prediction deviation and the second prediction deviation is taken as the difference.
6. The power correction method based on a ship motor according to claim 5, characterized in that: The discriminative ternary loss function is expressed as: ; in, is the value of the discriminative ternary loss function, For labels, and are the outputs of the first initial twin network model and the second initial twin network model, respectively. and are positive samples and negative samples respectively, is the preset non-negative benchmark, is the preset limit, Take the square of the second norm; and are the first fitting weight and the second fitting weight respectively.
7. The power correction method based on a ship motor according to claim 5, characterized in that: The real-time prediction of ship motor power data according to the first twin network model includes: Assign the parameters of the first twin network model to the first initial twin network model to obtain a second twin network model, use real-time ship motor power data as input of the first initial twin network model to obtain a reference result, and sample from the local weighted data set to obtain a sampled sample, use the sampled sample as input of the second initial twin network model to obtain a sampled prediction result, compare the reference result with the sampled prediction result, and obtain a real-time prediction result.
8. The power correction method based on a ship motor according to claim 7, characterized in that: The comparing the reference result and the sample prediction result to obtain the real-time prediction result includes: If the similarity between the reference result and the sampled prediction result is higher than the upper similarity limit, and the sampled sample reaches the stable state within the interval, the reference result is used as the real-time prediction result; or, if the similarity is lower than the lower similarity limit, and the reference result reaches the stable state within the interval, the reference result is used as the real-time prediction result.
9. The power correction method based on a ship motor according to claim 8, characterized in that: If the similarity is higher than the upper similarity limit and the sampled samples fail to reach the stable state within the interval, an alarm is issued; or, if the similarity is lower than the lower similarity limit and the reference result fails to reach the stable state within the interval, an alarm is issued.
10. A power correction system based on a ship motor, characterized in that: include: Preprocessing module, network model processing module and real-time prediction module; among them, The preprocessing module is used to collect an initial data set related to ship operation and motor power data corresponding to the initial data set, give weights to local key features of the initial data set according to the information entropy of the initial data set to obtain a local weighted data set, and divide the local weighted data set into positive samples and negative samples according to whether it reaches a stable state after execution; The network model processing module is used to use the positive sample as the input of the first initial twin network model, and use the output as the first prediction result of the dynamic model, and at the same time use the negative sample as the input of the second initial twin network model, and use the output as the second prediction result of the dynamic model; the network model of the first initial twin network model is the same as that of the second initial twin network model; The real-time prediction module is used to use the motor power data as a label, establish a discriminative ternary loss function according to the first prediction result, the second prediction result and the label, and perform parameter correction on the first initial twin network model according to the discriminative ternary loss function to obtain a first twin network model, so as to predict the ship motor power data in real time according to the first twin network model.
