Wave load calculation network training, wave load calculation method for a ship
By using a wave load calculation network and employing a multi-head self-attention mechanism and a multilayer sensing method, the problems of low efficiency and decreased accuracy in computational fluid dynamics methods are solved, and efficient and accurate wave load calculation is achieved.
Patent Information
- Application Number
- CN202210715013.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2042-06-22
AI Technical Summary
Existing computational fluid dynamics methods are inefficient when calculating ship wave loads and rely on manually setting the flow field environment, resulting in decreased calculation accuracy in diverse real-world environments.
A wave load calculation network is adopted, which uses a combination of encoder, connector and decoder, and adopts multi-head self-attention mechanism and multi-layer sensing method to learn the characteristics of fluid simulation data and calculate the wave load of ships in water flow environment.
It improves the accuracy and efficiency of wave load calculation, reduces calculation time, adapts to diverse water flow environments, and reduces reliance on manual settings.
Smart Images

Figure CN114996854B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of ships, and particularly relates to a wave load calculation network training method and a wave load calculation method for a ship. BACKGROUND
[0002] The wave load of a ship is the load of the ship in the marine wind and wave flow environment, including various types of external forces acting on the ship and the overall or local dynamic stress generated inside the ship due to external forces. The ability of the ship to bear the wave load is one of the important factors for evaluating the safety of the ship structure, and also affects the performance of the ship such as the sailing speed, so the calculation of the wave load plays an important role in the design stage of the ship and the maintenance stage during the operation of the ship.
[0003] At present, the methods commonly used for calculating the wave load of a ship mainly include: modeling and simulating the ship through computational fluid dynamics, and simulating the numerical value of the flow field around the ship, so as to study the influence of the flow field around the ship on the ship, and obtain the wave load of the ship in the set flow field.
[0004] However, in the method of computational fluid dynamics, the calculation process includes the steps of establishing a three-dimensional geometric model of the ship, mesh division and solver setting, which results in a long calculation time, and the obtained wave load is highly dependent on the set flow field environment. In actual application, the flow field environment is not limited to the set flow field environment, and there are various flow field environments. Therefore, the method of computational fluid dynamics is difficult to adapt to various actual environments in actual application, resulting in a decrease in the accuracy of the calculated wave load in the actual environment. SUMMARY
[0005] The present application provides a wave load calculation network training method and a wave load calculation method for a ship, to solve the problem of low calculation efficiency and dependence on manual setting of the flow field environment of the ship when calculating the wave load of the ship through the traditional computational fluid dynamics method.
[0006] According to an aspect of the present application, a wave load calculation network training method is provided, comprising:
[0007] Obtaining fluid simulation data formed by simulating a ship in a preset water flow environment in a simulation of computational fluid dynamics;
[0008] Loading a wave load calculation network, the wave load calculation network being divided into an encoder, a connector and a decoder;
[0009] Calling the encoder, adding a multi-head self-attention mechanism to the fluid simulation data under one-dimensional angle and performing multi-layer perception to obtain an initial wave load of the ship in the water flow environment.
[0010] The connector is called to extract features of wave load features, and resolution features are obtained, wherein the wave load features are features generated in the process of generating the initial wave load;
[0011] The decoder is called to perform a decoding operation on the initial wave load according to the resolution features, and target wave loads of the ship in the water flow environment are obtained.
[0012] According to another aspect of the present application, a wave load calculation method for a ship is provided, comprising:
[0013] Real-time fluid data formed by the ship in a target water flow environment is obtained;
[0014] A wave load calculation network is loaded, wherein the wave load calculation network is divided into an encoder, a connector, and a decoder;
[0015] The encoder is called to add a multi-head self-attention mechanism to the real-time fluid data under one-dimensional angles and perform multi-layer perception, and initial wave loads of the ship in the target water flow environment are obtained;
[0016] The connector is called to extract features of wave load features, and resolution features are obtained, wherein the wave load features are features generated in the process of generating the initial wave load;
[0017] The decoder is called to perform a decoding operation on the initial wave load according to the resolution features, and target wave loads of the ship in the target water flow environment are obtained.
[0018] According to another aspect of the present application, a training device for a wave load calculation network is provided, comprising:
[0019] A fluid simulation data obtaining module is configured to obtain fluid simulation data formed by simulation of a ship in a preset water flow environment in computational fluid dynamics simulation;
[0020] A network loading module is configured to load a wave load calculation network, wherein the wave load calculation network is divided into an encoder, a connector, and a decoder;
[0021] An encoder calling module is configured to call the encoder to add a multi-head self-attention mechanism to the fluid simulation data under one-dimensional angles and perform multi-layer perception, and obtain initial wave loads of the ship in the water flow environment;
[0022] A connector calling module is configured to call the connector to extract features of wave load features, and obtain resolution features, wherein the wave load features are features generated in the process of generating the initial wave load;
[0023] The decoder calling module is configured to call the decoder to perform a decoding operation on the initial wave load according to the resolution feature to obtain the target wave load of the ship in the target water flow environment.
[0024] According to another aspect of the present application, a wave load calculation device for a ship is provided, comprising:
[0025] The real-time fluid data acquisition module is configured to acquire real-time fluid data formed by the ship in a target water flow environment.
[0026] The wave load calculation network loading module is configured to load a wave load calculation network, wherein the wave load calculation network is divided into an encoder, a connector and a decoder.
[0027] The first calling module is configured to call the encoder to add a multi-head self-attention mechanism to the real-time fluid data in one-dimensional angle and perform multi-layer perception to obtain an initial wave load of the ship in the target water flow environment.
[0028] The second calling module is configured to call the connector to extract features from wave load features to obtain resolution features, wherein the wave load features are features generated in the process of generating the initial wave load.
[0029] The third calling module is configured to call the decoder to perform a decoding operation on the initial wave load according to the resolution feature to obtain the target wave load of the ship in the target water flow environment.
[0030] According to another aspect of the present application, an electronic device is provided, comprising:
[0031] at least one processor; and
[0032] a memory connected with the at least one processor; wherein
[0033] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the method according to any one of the embodiments of the present application.
[0034] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to implement the training method of the wave load calculation network or the wave load calculation method for a ship according to any one of the embodiments of the present application when executed.
[0035] The technical scheme of the present application obtains fluid simulation data formed after simulating a ship in a pre-set water flow environment through computational fluid dynamics simulation, and loads a wave load calculation network, which is divided into an encoder, a connector and a decoder. The initial wave load of the ship in the water flow environment is calculated from the fluid simulation data under one-dimensional angle according to the multi-head self-attention mechanism and multi-layer perception method by calling the encoder, then the resolution features associated with the initial wave load are determined by calling the connector, and finally the target wave load of the ship in the water flow environment is calculated according to the initial wave load and the resolution features associated with the initial wave load by calling the decoding layer. The multi-head self-attention mechanism and multi-layer perception are proposed to enable the wave load calculation network to learn the complex and implicit features of the fluid simulation data when calculating the wave load of the ship, and to prevent overfitting when outputting the target wave load, thereby improving the accuracy of calculating the target wave load of the ship in the water flow environment. Further, the wave load of the ship in the target water flow environment is calculated by loading the wave load calculation network, which reduces the calculation time and improves the calculation efficiency of the wave load of the ship compared to the computational fluid dynamics method. Further, the perception data of the ship in the target water flow environment and the three-dimensional size data of the ship are input into the wave load calculation network to calculate the wave load of the ship in the target water flow environment. Compared with the calculation using the computational fluid dynamics method, the method depends on the user's setting of the ship's flow field environment data, which leads to low calculation accuracy when calculating the wave load of the ship in the actual and different flow field environment from the set flow field environment. The wave load calculation network in the present application learns the features of the real-time fluid data formed by the ship running in the target water flow environment to calculate the wave load, which does not depend on the user's setting, thereby improving the accuracy of wave load calculation and the adaptability of the wave load calculation network to environmental diversity. It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0037] Figure 1is a flow chart of a training method of a wave load calculation network according to an embodiment of the present application;
[0038] Figure 2 is a flow chart of a wave load calculation method of a ship according to an embodiment of the present application;
[0039] Figure 3 is a structural schematic diagram of a training device of a wave load calculation network according to an embodiment of the present application;
[0040] Figure 4 is a structural schematic diagram of a wave load calculation device of a ship according to an embodiment of the present application;
[0041] Figure 5 is a structural schematic diagram of an electronic device for implementing the training method of a wave load calculation network or the wave load calculation method of a ship according to an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to make the personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by the person of ordinary skill in the art without creative labor should belong to the scope of protection of the present application.
[0043] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0044] Embodiment one
[0045] Figure 1A flowchart of a training method of a wave load calculation network is provided for the first embodiment of the present application. The embodiment can be applied to the calculation of wave loads of a simulated ship in a preset water flow environment. The method can be performed by a wave load calculation network training device, which can be implemented in the form of hardware and / or software and can be configured in an electronic device. As shown in FIG. 10, the method comprises the following steps. Figure 1
[0046] In S110, fluid simulation data formed by simulating a ship in a preset water flow environment is obtained by computational fluid dynamics.
[0047] The ship in the embodiment can be any type of ship. First, a three-dimensional model of the ship can be obtained by three-dimensional simulation. Then, parameters of the three-dimensional model of the ship are set by computational fluid dynamics simulation to be consistent with the preset water flow environment, so as to obtain various fluid simulation data of the ship in the water flow environment, such as wave simulation data of the ship in the water flow environment. The wave simulation data in the embodiment can include wave flow velocity, wave period, wave frequency, and wave height, etc. Alternatively, the ship can be subjected to fluid dynamics in the flow field, which can be divided into radiation or diffraction types. The water flow environment in the embodiment can be a flow field environment of the sea or a flow field environment of an inland river basin. The type of the preset water flow environment of the ship is not limited in the embodiment.
[0048] In S120, a wave load calculation network is loaded. The wave load calculation network is divided into an encoder, a connector, and a decoder.
[0049] The wave load calculation network in the embodiment can be a structure similar to a U-shaped network, including an encoder, a connector, and a decoder. The fluid simulation data obtained will be subjected to encoding in the encoder, feature extraction related to the wave load of the ship, semantic recognition, and decoding of the obtained features by the decoder to obtain the wave load calculated for the ship in the preset water flow environment. In the embodiment, the encoder is used to learn the features related to the wave load in the obtained fluid simulation data. In fact, the method of deep learning is introduced in the calculation of the wave load, that is, the semantic recognition and interpretation of the original data, i.e., the fluid simulation data in the embodiment, are achieved by learning the internal rules and representation levels of the data. Compared with the method of computational fluid dynamics, the fluid simulation data formed by the ship simulation is reduced in dimension when calculating the wave load, so as to approximately describe the multi-dimensional physical process varying with time in a low dimension, thereby reducing the calculation dimension, the calculation amount, saving the calculation time, and reducing the CPU load.
[0050] S130, call the encoder, add multi-head self-attention mechanism to the fluid simulation data in one-dimensional angle and carry out multi-layer perception to obtain the initial wave load of the ship in the water flow environment.
[0051] The encoder in the embodiment can be composed of multiple transformer structures. The transformer can capture the characteristics of the time sequence type by using Self Attention (self-attention). In the embodiment, the flow of water in the water flow environment presents the characteristics of changing over time, so the time sequence characteristics for calculating the wave load of the ship can be captured according to the fluid simulation data obtained by simulating the ship in the water flow environment, and the wave load of the ship is calculated.
[0052] The transformer can also use Multi-head Attention (multi-head self-attention) to enhance the parallelism of data processing, solving the disadvantage that RNN cannot be processed in parallel. The working principle of the multi-head self-attention mechanism layer in the embodiment is derived from Multi-head Attention.
[0053] On the basis of being composed of multiple transformers, the encoder can include a data processing layer, a multi-head self-attention mechanism layer, and a multi-layer feature perception machine. When adding the multi-head self-attention mechanism to the fluid simulation data in one-dimensional angle, the fluid simulation data can be first reduced in dimension in the data processing layer to obtain multiple one-dimensional sequences. The multi-head self-attention mechanism is added to the one-dimensional sequences to extract the features related to the wave load in the one-dimensional sequences. Further, the features can be analyzed by the multi-layer feature perception machine to obtain the initial wave load of the ship.
[0054] In the embodiment, the process of reducing the fluid simulation data to multiple one-dimensional sequences in the data processing layer can be specifically as follows:
[0055] The fluid simulation data is sliced into multiple two-dimensional simulation data in the data processing layer. The multiple two-dimensional simulation data have the same size. The same size is conducive to uniform calculation of the one-dimensional sequences calculated from the two-dimensional simulation data.
[0056] After slicing into two-dimensional simulation data, the size of each two-dimensional simulation data obtained by slicing is usually the same, and then a first target value is obtained. The first target value can be the number of two-dimensional simulation data obtained by slicing. The first target value is also the dimension number of the embedding space for reducing the two-dimensional simulation data to one-dimensional sequences. In the embodiment, the two-dimensional simulation data is projected into an embedding space with a dimension number of the first target value, and then one-dimensional sequences can be obtained. The embedding space is used to reduce the two-dimensional simulation data to one-dimensional sequences.
[0057] Further, a flag bit can be embedded in the one-dimensional sequence in the embodiment, and the flag bit is used to reserve spatial information of the two-dimensional simulation data in the one-dimensional sequence, which can guide the decoding operation of the decoder.
[0058] In the embodiment, after obtaining the one-dimensional sequence by dimension reduction, the plurality of importance weights of the plurality of one-dimensional sequences in calculating the initial wave load can be identified in the multi-head self-attention mechanism layer, and the multi-head self-attention mechanism layer can include a plurality of self-attention mechanism functions.
[0059] In the embodiment, the importance weight of the one-dimensional data calculated by the multi-head self-attention mechanism can refer to the size of the contribution of the one-dimensional sequence to the process of calculating the initial wave load, and the specific calculation process can be represented as:
[0060] The one-dimensional sequence is input into the multi-head self-attention mechanism layer, and then the feature matrix of different self-attention mechanism functions in the multi-head self-attention mechanism layer is obtained. The feature matrices of different self-attention mechanism functions are different. The one-dimensional sequence is multiplied by different feature matrices, and the one-dimensional sequence is projected into different spaces. The plurality of importance weights of the one-dimensional sequence in calculating the initial wave load from different dimensions can increase the expression ability of the one-dimensional sequence in calculating the initial wave load.
[0061] In the embodiment, after obtaining the importance weights of the plurality of one-dimensional sequences by the multi-head self-attention mechanism layer, the plurality of importance weights calculated for the same one-dimensional sequence can be spliced, and the target importance weight of the one-dimensional sequence can be obtained by integrating the plurality of importance weights. The integration process plays an integration role, thereby preventing overfitting in the learning process.
[0062] Specifically, the spliced importance weight can be multiplied by a preset compression matrix to obtain the target importance weight of the one-dimensional sequence, and the compression matrix plays a linear conversion role.
[0063] In the embodiment, after obtaining the target importance weight of the one-dimensional sequence, the initial wave load of the ship in the water flow environment can be calculated based on the target importance weight and the one-dimensional sequence in the multi-layer feature perception machine in the encoder.
[0064] In the embodiment, the feature perception machine is a neural network composed of fully connected layers with at least one hidden layer, and the output of each hidden layer is transformed by an activation function. For example, the activation function of the hidden layer in the embodiment can be a GELU activation function. Further, the multi-layer feature perception machine in the embodiment can be a two-layer linear layer with a GELU activation function.
[0065] Specifically, the initial wave load in the embodiment can be calculated in different layers of the feature perception machine based on the target importance weight and the one-dimensional sequence, and the initial wave load of different scales of the ship in the water flow environment is calculated in turn, and the scale can be inversely proportional to the time sequence of the feature perception machine calculating the initial wave load. For example, the initial wave load of a larger scale is calculated in the first layer of the feature perception machine, and then the initial wave load of a smaller scale is calculated in the second layer of the feature perception machine. In the embodiment, the scale here can refer to the resolution of the initial wave load.
[0066] In S140, a connector is invoked to extract features from the wave load features, and resolution features are obtained. The wave load features can be features generated in the process of generating the initial wave load.
[0067] In the embodiment, the connector can be used to extract features from the wave load features, and the wave load features can be features generated in the process of generating the initial wave load, such as the resolution features described above. Specifically, the process of obtaining the resolution features in the embodiment can be as follows:
[0068] The compression degree of the resolution of the one-dimensional sequence when calculating the initial wave load in different layers of the feature perception machine is determined. In the embodiment, the scale of the initial wave load output by the feature perception machine is determined according to the compression degree of the resolution of the one-dimensional sequence by the feature perception machine when calculating the initial wave load. Then, the resolution features of the initial wave load output by the feature perception machine, i.e., the scale described above, are obtained based on the compression degree.
[0069] In S150, a decoder is invoked to perform a decoding operation on the initial wave load according to the resolution features, and target wave loads of the ship in the water flow environment are obtained.
[0070] In the embodiment, the decoder can be composed of multiple convolutional neural networks. The initial wave load output by the feature perception machine in the encoder is decoded by the convolutional neural network according to the resolution features, so that the initial wave load features with reduced resolution features after encoding by the encoder are comprehensively restored to the target wave load with the same original resolution features as the original fluid simulation data.
[0071] Specifically, the decoding operation in the embodiment can be performed by querying the resolution features associated with the initial wave load as the target resolution features. In the embodiment, the resolution features of the initial wave load can be obtained when the connector is invoked.
[0072] The second target value is the number of convolution operations when converting the resolution represented by the target resolution feature into the resolution represented by the original resolution feature. The process from the target resolution feature to the original resolution feature is a resolution dimension reduction process. In this embodiment, the original resolution feature can represent the resolution of the fluid simulation data. Then, the convolutional neural network is called to perform the convolution operation on the plurality of initial wave loads for the number of times of the second target value to obtain the target wave load. The convolutional neural network can reduce the resolution of the initial wave load through the convolution operation.
[0073] In this embodiment, after the target wave load is calculated by the loaded wave load calculation network, the wave load network can be updated according to the target wave load. Specifically, the real wave load of the ship in the water flow environment can be obtained. In this embodiment, the real wave load of the ship in the water flow environment can be simulated by the method of computational fluid dynamics, and the wave load of the ship at this time can be calculated as the real wave load. The difference between the real wave load and the target wave load is calculated, and then the wave load calculation network is updated according to the difference. For example, in this embodiment, the difference between the target wave load calculated by the wave load calculation network and the real wave load can be calculated according to the loss function. In this embodiment, the loss function can be a combination of soft dice loss and cross-entropy loss.
[0074] After the difference is calculated, whether the wave load calculation network meets the preset evaluation standard can be detected according to the difference. For example, if the preset evaluation standard is the average percentage error, if the average percentage error represented by the difference is less than or equal to the preset average percentage error, it can be determined that the trained wave load calculation network meets the preset evaluation standard, and it can be determined that the wave load calculation network training is completed.
[0075] If it does not meet, for example, the average percentage error calculated according to the difference is greater than the preset average percentage error, the encoder can be called to add the multi-head self-attention mechanism to the fluid simulation data in the one-dimensional angle and perform the multi-layer perception to obtain the initial wave load of the ship in the water flow environment, and the training of the wave load calculation network is restarted.
[0076] In the embodiment, the fluid simulation data formed after simulating the ship in the pre-set water flow environment is acquired, and a wave load calculation network is loaded, the wave load calculation network is divided into an encoder, a connector and a decoder, wherein the initial wave load of the ship in the water flow environment is calculated from the fluid simulation data under one-dimensional angle according to the multi-head self-attention mechanism and the multi-layer perception method by calling the encoder, then the resolution features associated with the initial wave load are determined by calling the connector, and finally the target wave load of the ship in the water flow environment is calculated according to the initial wave load and the resolution features associated with the initial wave load by calling the decoding layer. The multi-head self-attention mechanism and the multi-layer perception are proposed, so that the wave load calculation network learns the complex and implicit features of the fluid simulation data when calculating the wave load of the ship, and the overfitting of the output target wave load is prevented, and the accuracy of calculating the target wave load of the ship in the water flow environment is improved. Further, in the present application, the wave load of the ship in the target water flow environment is calculated by loading the wave load calculation network. Compared with the method of calculating fluid mechanics, the calculation time is reduced and the calculation efficiency of the wave load of the ship is improved on the basis of omitting steps such as grid division in the method of calculating fluid mechanics.
[0077] Embodiment two
[0078] Figure 2 A flowchart of a wave load calculation method of a ship is provided for the second embodiment of the present application, and the wave load calculation network trained in the above embodiment is applied in practice.
[0079] As Figure 2 shown, the method comprises:
[0080] S210, acquiring real-time fluid data formed by the ship in the target water flow environment.
[0081] In the embodiment, when the ship runs in the actual water flow environment, such as sailing in the ocean or sailing in the river, it may suffer from dangerous situations such as collision, grounding and running aground. After these dangerous situations occur, the safety condition of the ship is evaluated, which helps to establish a feasible and efficient rescue plan and ensure the safety of the ship operation.
[0082] When the safety condition of the ship is evaluated, the wave load of the ship in the current water flow environment is one of the important evaluation indexes, and the main basis for calculating the wave load can be the real-time fluid data collected during the operation of the ship.
[0083] S220, loading a wave load calculation network, the wave load calculation network is divided into an encoder, a connector and a decoder.
[0084] When the real-time fluid data of the ship in the target water flow environment is obtained in this embodiment, a pre-trained wave load calculation network can be loaded to learn the real-time fluid data and output the wave load of the ship in the target water flow environment, wherein the wave load calculation network can be divided into an encoder, a connector and a decoder.
[0085] In S230, the encoder is invoked to add a multi-head self-attention mechanism to the real-time fluid data in one-dimensional angle and perform multi-layer perception to obtain the initial wave load of the ship in the target water flow environment.
[0086] In this embodiment, when the wave load calculation network is used to calculate the wave load, the encoder can be invoked to add a multi-head self-attention mechanism to the obtained real-time fluid data in one-dimensional angle and perform multi-layer perception. The encoder in this embodiment can include a data processing layer, a multi-head self-attention mechanism layer and a multi-layer feature perception machine. The data processing layer can be used to reduce the real-time fluid data to one dimension, and the multi-head self-attention mechanism layer and the multi-layer feature perception machine can identify the real-time fluid data that has been reduced to one dimension to obtain the initial wave load of the ship.
[0087] In S240, the connector is invoked to extract features from the wave load features generated in the process of generating the initial wave load to obtain resolution features.
[0088] In this embodiment, after obtaining the initial wave load of the ship, the connector can be invoked to obtain the wave load features generated by different feature perception machines when generating the initial wave load features. Further, the resolution features of the initial wave load features can be extracted according to the wave load features.
[0089] In S250, the decoder is invoked to perform decoding operation on the initial wave load according to the resolution features to obtain the target wave load of the ship in the target water flow environment.
[0090] In this embodiment, after obtaining a plurality of initial wave load features and resolution features associated with the initial wave load, the resolution features can be used to combine the plurality of initial wave load after performing skip connection on the plurality of initial wave load, and the target wave load can be obtained through convolution operation. Under the action of the convolution operation, the target wave load will restore to the same resolution as the original real-time fluid data.
[0091] The wave load calculation network is loaded in the embodiment to calculate the wave load of the ship in the target water flow environment. Compared with the method of calculating fluid mechanics, the calculation time is reduced and the calculation efficiency of the wave load of the ship is improved on the basis of omitting steps such as grid division in the method of calculating fluid mechanics. Further, the perception data of the ship in the target water flow environment and the three-dimensional size data of the ship are input into the wave load calculation network to calculate the wave load of the ship in the target water flow environment. Compared with the calculation using the method of calculating fluid mechanics, the calculation accuracy is low when the ship is calculated in the actual and different flow field environment from the set flow field environment. The wave load calculation network learns the characteristics of the real-time fluid data formed by the ship running in the target water flow environment to calculate the wave load, and does not depend on the user's setting, thereby improving the accuracy of the wave load calculation and the adaptability of the wave load calculation network to the environment.
[0092] Embodiment three
[0093] Figure 3 A structure schematic diagram of a training device of a wave load calculation network provided for the third embodiment of the present application is shown in FIG. 3. Figure 3 As shown in the figure, the device comprises:
[0094] A fluid simulation data acquisition module 310 is configured to acquire fluid simulation data formed by simulating a ship in a preset water flow environment in a simulation of computational fluid dynamics.
[0095] A network loading module 320 is configured to load a wave load calculation network, wherein the wave load calculation network is divided into an encoder, a connector and a decoder.
[0096] An encoder calling module 330 is configured to call the encoder, add a multi-head self-attention mechanism to the fluid simulation data in a one-dimensional angle and perform multi-layer perception to obtain an initial wave load of the ship in the water flow environment.
[0097] A connector calling module 340 is configured to call the connector, extract features of wave load features and obtain resolution features, wherein the wave load features are features generated in the process of generating the initial wave load.
[0098] A decoder calling module 350 is configured to call the decoder, perform a decoding operation on the initial wave load according to the resolution features to obtain a target wave load of the ship in the water flow environment.
[0099] Optionally, the encoder calling module 330 comprises:
[0100] A one-dimensional sequence acquisition module is configured to reduce dimensionality of the fluid simulation data into a plurality of one-dimensional sequences in the data processing layer;
[0101] An importance weight calculation module is configured to identify a plurality of importance weights for calculating initial wave loads of a plurality of one-dimensional sequences in the multi-head self-attention mechanism layer;
[0102] An importance weight splicing module is configured to splice a plurality of importance weights calculated for the same one-dimensional sequence;
[0103] A target importance weight acquisition module is configured to multiply the spliced importance weights with a preset compression matrix to obtain a target importance weight of the one-dimensional sequence;
[0104] An initial wave load acquisition module is configured to calculate initial wave loads of the ship in the water flow environment based on the target importance weight and the one-dimensional sequence in the multi-layer feature perception machine.
[0105] Optionally, the one-dimensional sequence acquisition module comprises:
[0106] A two-dimensional simulation data acquisition module is configured to slice the fluid simulation data into a plurality of two-dimensional simulation data in the data processing layer, and the plurality of two-dimensional simulation data have the same size;
[0107] A first target value calculation module is configured to obtain a first target value, and the first target value is the number of the two-dimensional simulation data;
[0108] A projection module is configured to project the two-dimensional simulation data to an embedding space with a dimension number of the first target value to obtain one-dimensional sequences, and the embedding space is used to reduce dimensionality of the two-dimensional simulation data into one-dimensional sequences.
[0109] Optionally, the one-dimensional sequence acquisition module further comprises:
[0110] A flag bit embedding module is configured to embed a flag bit into the one-dimensional sequence, and the flag bit is used to retain spatial information of the two-dimensional simulation data in the one-dimensional sequence.
[0111] Optionally, the importance weight calculation module comprises:
[0112] A one-dimensional sequence input module is configured to input the one-dimensional sequence into the multi-head self-attention mechanism layer;
[0113] A feature matrix acquisition module is configured to acquire feature matrices of different self-attention mechanism functions, and the feature matrices of different self-attention mechanism functions are different from each other;
[0114] An importance weight calculation submodule is configured to multiply the one-dimensional sequence with the feature matrix respectively to obtain a plurality of importance weights of the one-dimensional sequence in calculating the initial wave load.
[0115] Optionally, the initial wave load acquisition module comprises:
[0116] An initial wave load sequential calculation module is configured to sequentially calculate the initial wave load of the ship in the water flow environment in different feature perception machines based on the target importance weight and the one-dimensional sequence.
[0117] Optionally, the connector calling module 340 comprises:
[0118] A compression degree determination module is configured to determine a compression degree of resolution of the one-dimensional sequence in calculating the initial wave load in different layers of the feature perception machine;
[0119] A resolution feature acquisition module is configured to acquire the resolution feature of the initial wave load output by the feature perception machine based on the compression degree.
[0120] Optionally, the decoder calling module 350 comprises:
[0121] A target resolution feature acquisition module is configured to query the resolution feature associated with the initial wave load as a target resolution feature;
[0122] A second target value acquisition module is configured to acquire a second target value, the second target value being a number of convolution operations performed in converting the resolution represented by the target resolution feature into a resolution represented by an original resolution feature, the original resolution feature being the fluid simulation data;
[0123] A convolutional neural network calling module is configured to call the convolutional neural network to perform the convolution operation on a plurality of initial wave loads for a number of times equal to the second target value to obtain a target wave load;
[0124] Optionally, the training device of the wave load calculation network further comprises:
[0125] A real wave load acquisition module is configured to acquire a real wave load of the ship in the water flow environment;
[0126] A difference calculation module is configured to calculate a difference between the real wave load and the target wave load;
[0127] A network updating module is configured to update the wave load calculation network according to the difference;
[0128] a network detection module configured to detect whether the wave load calculation network meets preset evaluation criteria, and if so, call the training completion determination module, and if not, call the encoder calling module 330;
[0129] a training completion determination module configured to determine whether the wave load calculation network training is completed.
[0130] The wave load calculation network training device provided by the embodiments of the present application can execute the wave load calculation network training method provided by any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0131] Embodiment four
[0132] Figure 4 A structural schematic diagram of a wave load calculation device for a ship provided by embodiment four of the present application is shown in FIG. 4. Figure 4 As shown in the figure, the device comprises:
[0133] a real-time fluid data acquisition module 410 configured to acquire real-time fluid data formed by a ship in a target water flow environment;
[0134] a wave load calculation network loading module 420 configured to load a wave load calculation network, wherein the wave load calculation network is divided into an encoder, a connector and a decoder;
[0135] a first calling module 430 configured to call the encoder, add a multi-head self-attention mechanism to the real-time fluid data under one-dimensional angle and perform multi-layer perception to obtain an initial wave load of the ship in the target water flow environment;
[0136] a second calling module 440 configured to call the connector, extract features of wave load features to obtain resolution features, wherein the wave load features are features generated in the process of generating the initial wave load;
[0137] a third calling module 450 configured to call the decoder, perform decoding operation on the initial wave load according to the resolution features to obtain a target wave load of the ship in the target water flow environment.
[0138] The wave load calculation device for a ship provided by the embodiments of the present application can execute the wave load calculation method provided by any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0139] Embodiment five
[0140] Figure 5A structural diagram of an electronic device 10 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices such as personal digital processors, cellular telephones, smart phones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.
[0141] As shown in Figure 5 The electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., connected in communication with the at least one processor 11, where the memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer programs stored in the read-only memory (ROM) 12 or loaded into the random access memory (RAM) 13 from the storage unit 18. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0142] Various components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, a speaker, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0143] The processor 11 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as a training method of a wave load calculation network or a wave load calculation method of a ship.
[0144] In some embodiments, the training method of a wave load calculation network or the wave load calculation method of a ship can be implemented as a computer program tangibly embodied in a computer readable storage medium, e.g., storage unit 18. In some embodiments, parts or all of the computer program can be loaded and / or installed onto electronic device 10 via, e.g., ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the training method of a wave load calculation network or the wave load calculation method of a ship as described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the training method of a wave load calculation network or the wave load calculation method of a ship by way of other any suitable means, e.g., by way of firmware.
[0145] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0146] Computer programs used to implement the methods of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed, implements the functions / acts specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0147] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0148] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0149] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0150] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0151] It should be understood that the various forms of flow shown above can be used to reorder, add or delete steps. For example, each step described in the present application can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, which is not limited herein.
[0152] The above detailed description does not constitute a limitation on the scope of protection of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A training method for a wave load calculation network, characterized in that, include: To obtain fluid simulation data generated from simulating a ship in a pre-defined water flow environment in computational fluid dynamics simulations; A wave load calculation network is loaded, which is divided into an encoder, a connector, and a decoder; The encoder is invoked to add a multi-head self-attention mechanism and perform multi-layer sensing on the fluid simulation data in a one-dimensional perspective to obtain the initial wave load of the ship in the water flow environment. The connector is invoked to extract features from the wave load features and obtain resolution features, wherein the wave load features are those generated during the generation of the initial wave load; and the resolution features are the scale of the initial wave load. The decoder is invoked to perform a decoding operation on the initial wave load according to the resolution characteristics, thereby obtaining the target wave load of the ship in the water flow environment; The step of performing a decoding operation on the initial wave load based on the resolution features includes: decoding the initial wave load output by the feature perceptron in the encoder according to the resolution features through a convolutional neural network, so that the initial wave load features whose resolution features are reduced after being encoded by the encoder are comprehensively restored to the same target wave load as the original resolution features of the original fluid simulation data.
2. The method according to claim 1, characterized in that, The encoder includes a data processing layer, a multi-head self-attention mechanism layer, and a multi-layer feature perceptron. Calling the encoder adds a multi-head self-attention mechanism and performs multi-layer sensing on the fluid simulation data in a one-dimensional perspective to obtain the initial wave load of the ship in the water flow environment, including: In the data processing layer, the fluid simulation data is reduced to multiple one-dimensional sequences; In the multi-head self-attention mechanism layer, multiple importance weights of the one-dimensional sequences are identified when calculating the initial wave load; Concatenate multiple importance weights calculated for the same one-dimensional sequence; The concatenated importance weights are multiplied by a preset compression matrix to obtain the target importance weights of the one-dimensional sequence. The initial wave load of the vessel in the water flow environment is calculated in the multi-layered feature perceptron based on the target importance weight and the one-dimensional sequence.
3. The method according to claim 2, characterized in that, The step of reducing the dimensionality of the fluid simulation data into multiple one-dimensional sequences at the data processing layer includes: In the data processing layer, the fluid simulation data is sliced into multiple two-dimensional simulation data, and the multiple two-dimensional simulation data have the same size. Obtain a first target value, where the first target value is the number of the two-dimensional simulation data; The two-dimensional simulation data is projected onto an embedding space with the first target dimension to obtain a one-dimensional sequence. The embedding space is used to reduce the two-dimensional simulation data to a one-dimensional sequence.
4. The method according to claim 3, characterized in that, After projecting the two-dimensional simulation data into an embedding space with the target dimension to obtain a one-dimensional sequence, the method further includes: A flag bit is embedded in the one-dimensional sequence, and the flag bit is used to retain the spatial information of the two-dimensional simulation data in the one-dimensional sequence.
5. The method according to claim 2, characterized in that, The multi-head self-attention mechanism layer includes multiple self-attention mechanism functions. The step of identifying multiple importance weights of the multiple one-dimensional sequences in calculating the initial wave load within the multi-head self-attention mechanism layer includes: The one-dimensional sequence is input into the multi-head self-attention layer; Obtain the feature matrices of different self-attention mechanism functions, where the feature matrices of different self-attention mechanism functions are all different; The one-dimensional sequence is multiplied by the feature matrix to obtain multiple importance weights of the one-dimensional sequence when calculating the initial wave load.
6. The method according to claim 2, characterized in that, The calculation of the initial wave load of the ship in the current environment based on the target importance weight and the one-dimensional sequence in the multi-layered feature perceptron includes: Based on the target importance weight and the one-dimensional sequence, the initial wave load of the ship in the water flow environment is calculated sequentially in different feature perceptrons.
7. The method according to claim 2, characterized in that, The connector is invoked to extract features from the wave load characteristics. Obtain resolution features, wherein the wave load features are features generated during the generation of the initial wave load, including: Determine the degree of compression of the resolution of the one-dimensional sequence when calculating the initial wave load in the feature perceptron at different layers; The resolution features of the initial wave load output by the feature perceptron are obtained based on the compression degree.
8. The method according to any one of claims 1-5, characterized in that, The decoder consists of multiple convolutional neural networks. The decoding operation performed on the initial wave load based on the resolution features to obtain the target wave load of the vessel in the current environment includes: Query the resolution feature associated with the initial wave load as the target resolution feature; Obtain a second target value, which is the number of convolution operations performed when converting the resolution represented by the target resolution feature into the resolution rate represented by the original resolution feature, where the original resolution feature represents the resolution of the fluid simulation data; The convolutional neural network is invoked to perform the convolution operation on multiple initial wave loads a number of times equal to the second target value, thereby obtaining the target wave load.
9. The method according to claim 1, characterized in that, The method further includes: Obtain the actual wave load of the vessel in the water flow environment; Calculate the difference between the actual wave load and the target wave load; The wave load calculation network is updated based on the differences. The wave load calculation network is checked to see if it meets the preset evaluation criteria. If the conditions are met, then the wave load calculation network training is considered complete. If the condition is not met, the process returns to call the encoder, adds a multi-head self-attention mechanism to the fluid simulation data in a one-dimensional perspective, and performs multi-layer sensing to obtain the initial wave load of the ship in the water flow environment.
10. A method for calculating wave loads on a ship, characterized in that, Applied to ships, including: Acquire real-time fluid data generated by the ship in the target water flow environment; A wave load calculation network is loaded, which is divided into an encoder, a connector, and a decoder; The encoder is invoked to add a multi-head self-attention mechanism and perform multi-layer sensing on the real-time fluid data in a one-dimensional perspective, thereby obtaining the initial wave load of the ship in the target water flow environment; The connector is invoked to extract features from the wave load features and obtain resolution features, wherein the wave load features are those generated during the generation of the initial wave load; and the resolution features are the scale of the initial wave load. The decoder is invoked to perform a decoding operation on the initial wave load according to the resolution characteristics, thereby obtaining the target wave load of the ship in the target water flow environment; The step of performing a decoding operation on the initial wave load based on the resolution features includes: decoding the initial wave load output by the feature perceptron in the encoder according to the resolution features through a convolutional neural network, so that the initial wave load features whose resolution features are reduced after being encoded by the encoder are comprehensively restored to the same target wave load as the original resolution features of the original fluid simulation data.
Citation Information
Patent Citations
CondenseNet algorithm fused with attention selection mechanism
CN111160488A
Simulation test system and method for ship wave resistance increasing performance analysis
CN112182747A