Multimodal and time-space driven BOG generation prediction method and system for storage tanks
Through the combination of multi-modal data reorganization and dual-view Transformer model, the problem of multi-modal and spatio-temporal data processing in BOG generation prediction is solved, the prediction accuracy and efficiency are improved, and the time span influence and spatial dependence of traditional methods are overcome. Ignore the problem.
Patent Information
- Application Number
- CN202411073738.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-08-07
AI Technical Summary
Existing BOG generation prediction methods have problems such as waste of computing resources, time span impact and low prediction accuracy when processing multi-modal and spatiotemporal data. In particular, the performance of traditional models decreases in long-term span tasks, and deep learning methods ignore dependence on the spatial dimension.
Multimodal thinking is used to reorganize the historical multivariate time series data of the LNG storage tank system, the dual-view Transformer model is used to extract features in the time and space dimensions, and Conv2d aggregation is used to predict the BOG production amount.
It improves the prediction accuracy of the model, reduces the impact of time span on prediction ability, makes full use of the characteristics of time and space dimensions, and significantly improves the prediction effect of BOG production.
Smart Images

Figure CN118586563B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of BOG generation prediction, and in particular relates to a multi-modal and time-space driven storage tank BOG generation prediction method and system. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] During the storage or loading process of liquefied natural gas (LNG), due to the temperature difference between LNG and normal temperature storage tanks, physical phenomena such as heat conduction, heat convection and heat radiation will occur in the bottom plate, wall plate and roof plate of the storage tank. Heat is inevitably input from the outside into the storage tank, so a certain amount of boil-off gas (BOG) is often generated inside the storage tank.
[0004] Accurate prediction of BOG generation helps to rationally plan the workload and start-stop conditions of BOG compressors and related equipment, thereby improving the operating efficiency of the overall LNG storage tank system and extending the service life of the equipment. Existing BOG generation prediction methods mainly include numerical simulation research, theoretical analysis research and deep learning methods.
[0005] Numerical simulation research has a large computational workload and high time cost, and is difficult to implement in actual field applications. Theoretical analysis research has poor results for large LNG storage tank systems with complex physical forms and is not very generalizable.
[0006] LNG tank systems in different time periods often correspond to different working conditions, which makes the historical data of LNG tank systems show obvious multimodal characteristics. Traditional prediction models do not explicitly take the multimodal characteristics of data into account during the training process. They usually adopt a sliding window strategy and select the appropriate sliding window length through comparative experiments. This training method not only wastes computing resources and time, but is also limited by factors such as cumulative errors, dynamic environmental changes, and emergencies, resulting in a decrease in the performance of the model when processing long-span tasks.
[0007] In addition, when predicting the amount of BOG generated, the existing deep learning methods only consider the hidden features of historical data in the time dimension and ignore the dependencies in the spatial dimension, resulting in low prediction accuracy of the amount of BOG generated. Summary of the invention
[0008] In order to overcome the above-mentioned deficiencies of the prior art, the present invention provides a multi-modal and time-space driven method and system for predicting the BOG generation amount of a storage tank.
[0009] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0010] A first aspect of the present invention provides a multimodal and spatiotemporally driven method for predicting the amount of BOG produced in a storage tank, comprising: acquiring historical multivariate time series data of an LNG storage tank system;
[0011] Based on the multimodal idea, the historical multivariate time series data of the LNG tank system are set with the same time interval and rearranged using the time span TPL to be predicted. The multi-step prediction with a length of TPL is split into TPL different modes. Each mode is regarded as a single-step prediction. In each reorganization interval, TPL groups of data with different modes are constructed to obtain a multimodal reorganized data set.
[0012] The dual-view Transformer model is used to extract and aggregate the features of the time and space dimensions of the multimodal reorganized data set, and the multivariate time series data of the LNG tank system within the time span to be predicted is obtained.
[0013] The BOG generation of the LNG storage tank is calculated based on the multivariate time series data of the LNG storage tank system within the time span to be predicted.
[0014] A second aspect of the present invention provides a multimodal and spatiotemporally driven storage tank BOG generation prediction system, comprising: a data acquisition module configured to: acquire historical multivariate time series data of an LNG storage tank system;
[0015] The data reorganization module is configured as follows: based on the multimodal concept, the historical multivariate time series data of the LNG tank system is set to the same time interval and rearranged using the time span TPL to be predicted, and the multi-step prediction of length TPL is split into TPL different modes, each mode is regarded as a single-step prediction, and TPL groups of different modal data are constructed in each reorganization interval to obtain a multimodal reorganized data set;
[0016] The data prediction module is configured to: extract and aggregate the features of the time dimension and the space dimension of the multimodal reorganized data set using a dual-view Transformer model, and obtain the multivariate time series data of the LNG storage tank system within the time span to be predicted;
[0017] The BOG generation amount calculation module is configured to calculate the BOG generation amount of the LNG storage tank according to the multivariate time series data of the LNG storage tank system within the time span to be predicted.
[0018] One or more of the above technical solutions have the following beneficial effects:
[0019] (1) Based on the multimodal concept, the present invention uses the time span TPL to be predicted to set the same time interval for the historical multivariate time series data of the LNG tank system and rearrange them to obtain a multimodal reorganized data set. This reorganization method can split the multi-step prediction of length TPL into TPL different modes, each of which can be regarded as a single-step prediction of length 1; it can minimize the impact of the time span on the model's prediction ability and improve the model's prediction accuracy.
[0020] (2) The present invention uses a dual-view Transformer model to model the hidden rules of the historical multivariate time series data of the LNG tank system in the two dimensions of time and space. Finally, the modeling results of the two dimensions are aggregated using Conv2d to predict the multivariate time series data of the BOG compressor within the future prediction time span. It can make full use of the characteristics of the time and space dimensions to improve the prediction accuracy of the model.
[0021] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0023] Figure 1 This is a flow chart of the method of the first embodiment.
[0024] Figure 2 This is the historical multivariate time series data before outliers are removed in the first embodiment.
[0025] Figure 3 This is a schematic diagram of BOG generation after removing abnormal values in the first embodiment.
[0026] Figure 4 This is a schematic diagram of data reorganization based on multimodal thinking in the first embodiment.
[0027] Figure 5(a) is a schematic diagram of the original curve.
[0028] Figure 5(b) is a schematic diagram of the smoothed curve.
[0029] Figure 6 This is a flowchart of the first embodiment of using a dual-view Transformer model to perform feature extraction and aggregation on a multimodal reorganized dataset.
[0030] Figure 7 This is a connection diagram between the LNG storage tank system and the BOG compressor of the first embodiment.
[0031] Figure 8 (a) shows the prediction effect of the prediction model using the traditional training method.
[0032] Figure 8 (b) shows the prediction effect of the prediction model using the multimodal recombination idea training method.
[0033] Figure 9 (a) is a schematic diagram of the prediction results of 2-step prediction-LSTM.
[0034] Figure 9 (b) is a schematic diagram of the prediction results of 2-step prediction-GRU.
[0035] Figure 9 (c) is a schematic diagram of the prediction results of the 2-step prediction-Transformer.
[0036] Figure 9 (d) is a schematic diagram of the prediction results of 2-step prediction-DvTrans.
[0037] Figure 10 (a) is a schematic diagram of the prediction results of 4-step prediction-LSTM.
[0038] Figure 10 (b) is a schematic diagram of the prediction results of 4-step prediction-GRU.
[0039] Figure 10 (c) is a schematic diagram of the prediction results of the 4-step prediction-Transformer.
[0040] Figure 10(d) is a schematic diagram of the prediction results of 4-step prediction-DvTrans. DETAILED DESCRIPTION
[0041] Embodiment 1
[0042] like Figure 1 As shown, this embodiment discloses a multi-modal and time-space driven method for predicting the amount of BOG produced in a storage tank, including:
[0043] Step 1: Obtain historical multivariate time series data of the LNG storage tank system;
[0044] Step 2: Based on the multimodal idea, the historical multivariate time series data of the LNG storage tank system are set with the same time interval using the time span to be predicted and rearranged to obtain a multimodal reorganized data set;
[0045] Step 3: After extracting and aggregating the features of the time and space dimensions of the multimodal reorganized data set using the dual-view Transformer model, the multivariate time series data of the LNG storage tank system within the time span to be predicted is obtained;
[0046] Step 4: Calculate the BOG generation of the LNG storage tank based on the multivariate time series data of the LNG storage tank system within the time span to be predicted.
[0047] In step 1, historical multivariate time series data of the LNG storage tank system is obtained, including temperature, liquid level, pressure and flow data of the LNG storage tank system.
[0048] Before rearranging the acquired historical multivariate time series data, it also includes: using an isolated forest anomaly detection algorithm to eliminate outliers in the historical multivariate time series data of the LNG storage tank system.
[0049] This embodiment takes into account that in actual working conditions, the data collected by the sensor is affected by multiple factors such as the environment and itself, and the measured data will inevitably have deviations or anomalies. Therefore, before performing a systematic analysis of the historical multivariate time series data of the LNG storage tank system, it is necessary to remove the abnormal values in the original data; specifically,
[0050] Step 101: Constructing the Isolation Tree
[0051] A split point is randomly selected between the maximum and minimum values of each sensor feature of the historical multivariate time series data of the LNG tank system, and the data is divided into the left subtree or the right subtree according to the split point; new subtrees are continuously constructed until the subtree can no longer be cut or the entire tree reaches the set height.
[0052] Assume that the total length of the historical multivariate time series data in the LNG tank system is L, which can be expressed in the spatial dimension as : .
[0053] In the formula, Represents the characteristics of sensors with different physical meanings, which is an L-dimensional vector, Indicates the number of sensors in the LNG tank system; represents the characteristics of the first type of sensor at all time steps, represents the characteristics of the second type of sensor at all time steps, Indicates Characteristics of each sensor type at all time steps.
[0054] First, in The maximum value of a feature With minimum Randomly generate cutting points between , and at the same time Set as the vertex Features less than The point is placed on The left subtree of Features greater than The point is placed on The right subtree of:
[0055] ;
[0056] In the formula, represents the characteristics of the i-th type of sensor at the j-th time step; represents the right subtree, Represents the left subtree.
[0057] Secondly, in and Recursively repeat the above steps and continuously construct new subtrees until the subtree can no longer be cut or the entire tree reaches the set height.
[0058] Step 102: Calculate anomaly score; Calculate the anomaly score of the data point based on the average path length of the data point in all trees and the average path length of the tree.
[0059] Several trees constructed based on step 101 can form a forest. Let the data point The height of each tree is ,Include The average path length of a completely balanced binary tree with sample points is , then the data point The calculation expression of the anomaly score is as follows:
[0060] ;
[0061] In the formula, Represents data points At each tree's height, Represents data points At the desired height of each tree, represents the path length, Indicates the number of sample points.
[0062] Step 103: Anomaly degree assessment: judging abnormal data points and normal data points in the historical multivariate time series data according to the anomaly scores of the data points.
[0063] Among them, if If it is close to 1, it must be an outlier. is much smaller than 0.5, then it is definitely not an outlier; if all points If both are around 0.5, there is a high probability that there are no outliers in the sample.
[0064] The present invention performs anomaly detection based on the isolation forest algorithm on each feature of the historical multivariate time series data of the LNG storage tank system. The historical multivariate time series data before the outliers are removed is as follows: Figure 2 As shown in the figure, the BOG generation amount predicted by using the historical multivariate time series data after removing outliers is as follows: Figure 3 shown.
[0065] The training method of traditional prediction models usually adopts a sliding window strategy. Taking single-step prediction as an example, in each training iteration, the data of N historical time windows are used to Go to predict Data at the moment ,Since the single-step prediction task is relatively simple, it is easy to determine the length of the sliding window.
[0066] However, due to factors such as cumulative errors, dynamic environmental changes, and the impact of emergencies, the performance of the model will inevitably decline when processing long-time span tasks. Taking the ten-step prediction as an example, the range of the sliding window length can be between [10, 10*N]. The traditional method often conducts comparative experiments within the above range and finally selects the length of the sliding window. This method not only wastes computing resources and time, but also makes it difficult to achieve the expected prediction effect. Therefore, in order to improve the training efficiency of the model and minimize the impact of the time span on the model's prediction ability, the present invention introduces a multi-modal training idea to reorganize the data.
[0067] In step 2, the LNG tank system corresponds to different working conditions at different time points. The differences between different working condition data make the historical multivariate time series data of the LNG tank system present multimodal characteristics. Therefore, based on the multimodal idea, similar modes in the historical data containing TPL modes are classified, and then the historical data containing TPL modes are split into TPL single-modal data to obtain a multimodal reorganized data set; Figure 4 As shown in FIG. 1 , the process of acquiring the multimodal reorganized dataset includes:
[0068] After anomaly detection processing, the historical multivariate time series data of the LNG storage tank system are represented in time and space dimensions as and :
[0069] ;
[0070] ;
[0071] in, represents the total length of the historical multivariate time series data of the LNG tank system after anomaly detection processing, is an n-dimensional vector, which represents the historical multivariate time series data of the LNG storage tank system in the time dimension The characteristic values of n sensors corresponding to the moment, . for dimensional vector, which represents the historical multivariate time series data of the LNG storage tank system. The sensors in The eigenvalues of the time steps, .
[0072] Step 201: Standardization and smoothing of historical multivariate time series data of LNG storage tank system
[0073] In order to reduce noise and more clearly show the fluctuation trend of BOG generation while retaining local features, so as to more easily observe the fitting effect of the prediction model on BOG generation, the historical multivariate time series data generated by the LNG storage tank system are first standardized and smoothed:
[0074] ;
[0075] ;
[0076] and Respectively represent the maximum and minimum eigenvalues of a particular sensor in the sliding window, is the smoothing factor, Represents the historical multivariate time series data of the LNG storage tank system The sensors in Eigenvalues at a time step.
[0077] Due to measurement errors, instrument failures and other abnormal factors, the BOG generation trend curve after abnormal detection still fluctuates greatly, and it is not easy to see the model fitting and test effects. In order to reduce the impact of noise and analyze the data more accurately for more reliable predictions, the present invention selects a sliding step length of 3 and uses Exponential Moving Average (EMA) to perform data smoothing operations. The original curves and smoothed curves of the training set and test set are shown in Figure 5 (a) and Figure 5 (b), respectively.
[0078] Step 202: General representation of the interval data to be reorganized
[0079] Assume that the total step length to be predicted in the LNG tank system is TPL, and the length of the sliding window set for single-step prediction in the actual factory is w, then the data of the kth reorganization interval can be expressed as:
[0080] ;
[0081] In the formula, , , , Respectively indicate time points , , , Multivariate time series data of LNG storage tank system;
[0082] To ensure that the data in any reorganization interval does not cross the boundary, k should meet the following restrictions:
[0083] ;
[0084] In the formula, Represents a set of integers.
[0085] Step 203: Multi-modal reorganization of the data in the interval to be reorganized
[0086] Based on the general representation of the kth recombinant interval data obtained in step 202 , set the same time interval to reorganize them:
[0087] ;
[0088] ;
[0089] ;
[0090] In the formula, , which represents the time interval from time point k.
[0091] in, ;
[0092] ;
[0093] ;
[0094] ;
[0095] ;
[0096] ;
[0097] ;
[0098] ;
[0099] ;
[0100] ;
[0101] ;
[0102] and Represent the model input data and label data in each mode respectively. Since the length of the time interval is set to TPL, the above reorganization can split the multi-step prediction of length TPL into TPL different modes, and each mode can be regarded as a single-step prediction of length 1.
[0103] Based on this, different single-mode data of TPL groups can be constructed in each reorganization interval:
[0104] ;
[0105] Compared with the original data set, training the model using a data set reorganized based on multimodality allows the model to learn the inherent laws from more modes, and accordingly can show better performance when facing future unknown working conditions.
[0106] In step 3, the dual-view Transformer model (prediction model) includes a position vector embedding module, a multi-head attention module, a spatiotemporal dimension modeling information refinement processing module, and a spatiotemporal dimension information aggregation module;
[0107] For the multimodal reorganized data set, the position vector embedding module is used to perform position embedding and dimension mapping in the time dimension and the space dimension, respectively. Then, the multi-head attention module is used to extract the features of the time and space dimensions. After obtaining the time dimension features and space dimension features, they are respectively input into the time-space dimension modeling information refinement processing module for refinement processing;
[0108] The spatiotemporal dimension modeling information refinement processing module includes a first residual connection layer and layer standardization, a feedforward layer, and a second residual connection layer and layer standardization connected in sequence;
[0109] The extracted time / space dimension features are respectively residually connected and layer-normalized with the initially input time / space dimension features by using the first residual layer connection and layer normalization, and then input into the feedforward layer; the output of the feedforward layer is added to the output of the first residual connection layer by using the second residual connection layer, and then layer-normalized and input into the spatiotemporal aggregation module;
[0110] The time-space aggregation module is used to convolute and aggregate the refined time dimension features and space dimension features to obtain the multivariate time series data of the LNG storage tank system within the time span to be predicted.
[0111] In step 3, if Figure 6 As shown in the figure, the dual-view Transformer model is used to extract features from the multimodal reorganized dataset, including:
[0112] Step 301: Spatiotemporal dimension input vector position embedding
[0113] In order to distinguish data at different times in the time dimension and sensors with different functions in the space dimension, time position vector embedding and space position vector embedding are performed respectively:
[0114] ;
[0115] ;
[0116] In the formula, and Both dimensional vector, Indicates the time dimension The position embedding vector at each time point, Indicates the spatial dimension The position embedding vector of each sensor; Represents the position embedding vector of all time points in the time dimension, Represents the position embedding vector of all sensors in the spatial dimension.
[0117] In order to map the multivariate time series data in the spatiotemporal dimension to a higher-dimensional space for more comprehensive feature representation and to match the dimension of the spatiotemporal embedding vector, and To perform dimension mapping:
[0118] ;
[0119] ;
[0120] In the formula, and Both dimensional vector, Represents a linear mapping; It represents the representation of data in the spatial dimension after being reorganized based on multimodal thinking.
[0121] In summary, the final input of Transformer in time and space dimensions is respectively and , and Stitched together:
[0122] ;
[0123] ;
[0124] Step 302: Extraction of hidden features and dependent features in spatiotemporal dimensions
[0125] Step 3021: Use the multi-head attention module in the dual-view Transformer model to map the multimodal reorganized data set into a query matrix Q, a key matrix K, and a value matrix V in the time dimension and the space dimension respectively;
[0126] Specifically: In order to simultaneously model the hidden dependencies of the historical multivariate time series data of the LNG tank system in both time and space dimensions, the Attention mechanism is introduced in both time and space dimensions. First, and After three linear mappings, we can get , , and , , :
[0127] ;
[0128] ;
[0129] remember and The row vectors of the matrix are and , and The column vectors of the matrix are and ,but and All represent all sensor data at a specific moment. and Both represent the data of a specific sensor within a specified time period.
[0130] Step 3022: Calculate the attention weight matrix by multiplying the query matrix by the transposed matrix of the key matrix in the time dimension and the space dimension respectively, and introduce the Softmax activation function to perform weight mapping on the row vectors in the attention weight matrix;
[0131] Specifically: First, the core of the Attention mechanism lies in the construction of the Attention weight matrix. The row vector of the Attention weight matrix should store the dependency coefficient between all sensor data at a certain moment and all sensor data at other moments in the time dimension, and should store the dependency coefficient between the data of a certain sensor in a specified time period and the data of other sensors in a specified time period in the spatial dimension.
[0132] The above functions can be respectively and The product and and Therefore, we can use and The matrix product of and The matrix product of is used to preliminarily construct the Attention weight matrix of the time dimension And the Attention weight matrix of the spatial dimension :
[0133] ;
[0134] ;
[0135] Secondly, in order to more clearly show the dependency level of all sensor data at a certain moment on all sensor data at other moments in the time dimension, and more clearly show the dependency level of data of a certain sensor in a specified time period on data of other sensors in a specified time period in the spatial dimension, and at the same time make the new features aggregated by the Attention weight matrix in the spatiotemporal dimension still maintain the original order of magnitude, the Softmax activation function is introduced to WM t and WM s Weight mapping is performed on the row vectors in:
[0136] ;
[0137] ;
[0138] and Respectively represent the i-th element in the row vector of the Attention weight matrix in the time and space dimensions, after Softmax processing and The row vectors satisfy and .
[0139] Step 3023, respectively calculating the dependency characteristics of the time and space dimensions according to the product of the weight-mapped matrix and the value matrix;
[0140] The process of modeling the time and space dimension dependencies using the Attention weight matrix is expressed as follows:
[0141] ;
[0142] ;
[0143] Step 303: Refinement of spatiotemporal dimension modeling information
[0144] First, in order to speed up the convergence of the model, the result obtained in step 2 is connected with the initial input residual of the model and then layer normalization is performed:
[0145] ;
[0146] ;
[0147] Secondly, and Input to two feed-forward layers respectively:
[0148] ;
[0149] ;
[0150] Finally, the processing results of the time and space dimensions are added again in the form of residual connections and layer normalization is performed:
[0151] ;
[0152] ;
[0153] , , , , , , , are all randomly generated weight matrices, whose weights can be optimized as the model is trained. The representation layer is standardized and its expression is as follows:
[0154] ;
[0155] In terms of time dimension, and Respectively represent the mean and variance of all sensor data at a certain moment; in the spatial dimension, and Respectively represent the mean and variance of the data of a certain sensor in a specified time period; Represents a very small constant to avoid the situation where the denominator is 0; They represent the scaling and offset parameters, respectively, which are used to adjust the normalized data distribution.
[0156] Step 304: Determine whether the specified number of stacking layers is reached. If not, loop through steps 302 and 303 until the specified number of stacking layers is reached. If yes, execute step 305.
[0157] Step 305: Aggregation of spatiotemporal information
[0158] The final aggregated information of time and space dimensions is aggregated through Conv2d convolution:
[0159] ;
[0160] ;
[0161] ;
[0162] and is a randomly generated two-dimensional convolution kernel with the shape , It is a variable type in Pytorch, which enables the weights and biases of the two-dimensional convolution kernel to be updated as the model is trained, and ultimately self-learns to the optimal aggregation coefficient.
[0163] In summary, the present invention uses the dual view Transformer model (DVTrans) to model the hidden features of the historical multivariate time series data of the LNG tank system in the two dimensions of time and space. Finally, the modeling results of the two dimensions are aggregated using Conv2d to predict the BOG compressor outlet pressure, BOG compressor outlet flow rate and BOG compressor outlet temperature.
[0164] LNG storage tank system includes LNG storage tank and BOG compressor, such as Figure 7 As shown in the figure, in actual working conditions, three storage tanks are connected to a BOG compressor, a tank bottom pump is installed inside the storage tank, one side of the storage tank is connected to the liquefied natural gas LNG unloading main pipe, and the other side is connected to the boil-off gas BOG header. Therefore, the historical multivariate time series data of the LNG storage tank system includes the relevant data of the three storage tanks at the same time and the relevant data of the BOG compressor.
[0165] The historical multivariate time series data of the LNG storage tank system include: unloading arm pressure, tank temperature, tank liquid level, tank internal pressure, tank bottom pump output flow, BOG compressor outlet pressure, flow, temperature and other data, as shown in Table 1.
[0166] Table 1 Input and output data of the dual-view Transformer model
[0167]
[0168] In step 4, the multivariate time series data of the LNG storage tank system includes the multivariate time series data of the LNG storage tank and the multivariate time series data of the BOG compressor; the BOG generation amount of the LNG storage tank is calculated according to the multivariate time series data of the BOG compressor, including:
[0169] ;
[0170] In the formula, It represents the amount of BOG produced, R is the molar gas constant, and z is the compression factor. Its specific value can be determined according to the actual temperature, pressure and chemical composition of the gas.
[0171] That is, the outlet pressure of the BOG compressor is (unit: ), outlet flow of BOG compressor (unit: ), outlet temperature of BOG compressor (Unit: Kelvin temperature K) As the final prediction target, the final BOG generation can be obtained by integrating the time based on the product of the predicted value and 1 / zR in the actual working conditions.
[0172] As a further technical solution, this embodiment uses a stochastic gradient descent algorithm to train the dual-view Transformer model, specifically including:
[0173] The stochastic gradient descent algorithm is used to update the weights during model training:
[0174] ;
[0175] ;
[0176] In the formula, Represents the loss function For parameters The gradient of represents the updated parameters, Indicates the parameters before updating. Represents the learning rate.
[0177] FIG8 (a) and FIG8 (b) respectively show the comparison between the prediction effect of the traditional training method on the BOG generation amount and the method of the present invention in which the data is reorganized based on the multimodal idea and then the model is trained. It can be found that the prediction effect based on the multimodal method of the present invention is significantly improved.
[0178] The present invention uses mean square error (MSE), mean absolute percentage error (MAPE), mean absolute error (MAE) and coefficient of determination (R 2) is used as an evaluation indicator for the prediction effect of the prediction model, and its definition is as follows:
[0179] ;
[0180] in, is the sample value, is the predicted value, is the sample size. According to the above formula, we can find that the lower the value of MSE, MAPE, and MAE, the better the model fitting effect. 2 The higher the value, the stronger the performance of the model.
[0181] By comparing the data in Table 2, it can be found that the MultiModal model provided by the present invention has a 48.1% decrease in MSE, a 26.6% decrease in MAE, a 27.8% decrease in MAPE, and a 2.5% decrease in R 2 It increased by 1%, which verifies the effectiveness of the MultiModal training method.
[0182] Table 2 Comparison of four evaluation indicators between multimodal training method and traditional training method
[0183]
[0184] Figures 9(a), 9(b), 9(c), and 9(d) are schematic diagrams of the prediction results of 2-step prediction-LSTM, 2-step prediction-GRU, 2-step prediction-Transformer, and 2-step prediction-DvTrans, respectively; Figures 10(a), 10(b), 10(c), and 10(d) are schematic diagrams of the prediction results of 4-step prediction-LSTM, 4-step prediction-GRU, 4-step prediction-Transformer, and 4-step prediction-DvTrans, respectively. Table 3 compares the four evaluation indicators of the four models under the two modes; it can be found that the prediction effect of DvTrans in both modes is improved compared with the three models of LSTM, GRU, and Transformer.
[0185] Table 3 Comparison of four evaluation indicators of four models under two modes
[0186]
[0187] By comparing the evaluation indicators in Table 3, it can be found that in the two-step prediction mode, compared with LSTM, GRU and Transformer, DvTrans’s MSE decreased by 23.4%, 16.3% and 14.3% respectively, MAE decreased by 12.8%, 9.3% and 6.6% respectively, MAPE decreased by 12.8%, 9.5% and 6.4% respectively, and R2 increased by 0.9%, 0.6% and 0.5% respectively.
[0188] In the 4-step prediction mode, compared with LSTM, GRU and Transformer, DvTrans's MSE decreased by 27.7%, 27.1% and 23.2%, MAE decreased by 11.0%, 9.5% and 10.0%, MAPE decreased by 10.7%, 9.1% and 10.2%, and R2 increased by 2.8%, 2.8% and 2.3%, respectively.
[0189] Embodiment 2
[0190] This embodiment discloses a multi-modal and time-space driven storage tank BOG generation prediction system, including:
[0191] The data acquisition module is configured to: acquire historical multivariate time series data of the LNG storage tank system;
[0192] The data reorganization module is configured as follows: based on the multimodal concept, the historical multivariate time series data of the LNG tank system is set to the same time interval and rearranged using the time span TPL to be predicted, and the multi-step prediction of length TPL is split into TPL different modes, each mode is regarded as a single-step prediction, and TPL groups of different modal data are constructed in each reorganization interval to obtain a multimodal reorganized data set;
[0193] The data prediction module is configured to: extract and aggregate the features of the time dimension and the space dimension of the multimodal reorganized data set using a dual-view Transformer model, and obtain the multivariate time series data of the LNG storage tank system within the time span to be predicted;
[0194] The BOG generation amount calculation module is configured to calculate the BOG generation amount of the LNG storage tank according to the multivariate time series data of the LNG storage tank system within the time span to be predicted.
[0195] Embodiment 3
[0196] The purpose of this embodiment is to provide a computer-readable storage medium.
[0197] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in a multi-modal and spatiotemporal driven method for predicting the BOG generation amount of a storage tank as described in Example 1 of the present disclosure.
[0198] Embodiment 4
[0199] The purpose of this embodiment is to provide an electronic device.
[0200] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in a multimodal and spatiotemporal driven method for predicting the BOG generation of a storage tank as described in Example 1 of the present disclosure are implemented.
[0201] The steps involved in the apparatuses of the above embodiments 2, 3 and 4 correspond to the method embodiment 1, and the specific implementation methods can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0202] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.
[0203] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A multi-modal and spatiotemporal driven method for predicting the amount of BOG produced in a storage tank, characterized in that: include: Obtain historical multivariate time series data of LNG storage tank systems; Based on the multimodal idea, the historical multivariate time series data of the LNG tank system are set with the same time interval and rearranged using the time span TPL to be predicted. The multi-step prediction with a length of TPL is split into TPL different modes. Each mode is regarded as a single-step prediction. In each reorganization interval, TPL groups of data with different modes are constructed to obtain a multimodal reorganized data set. The dual-view Transformer model is used to extract and aggregate the features of the time and space dimensions of the multimodal reorganized data set, and the multivariate time series data of the LNG tank system within the time span to be predicted is obtained. The BOG generation of the LNG storage tank is calculated based on the multivariate time series data of the LNG storage tank system within the time span to be predicted; The dual-view Transformer model includes a position vector embedding module, a multi-head attention module, a spatiotemporal dimension modeling information refinement processing module, and a spatiotemporal dimension information aggregation module; For the multimodal reorganized data set, the position vector embedding module is used to perform position embedding and dimension mapping in the time dimension and the space dimension, respectively. Then, the multi-head attention module is used to extract the features of the time and space dimensions. After obtaining the time dimension features and space dimension features, they are respectively input into the time-space dimension modeling information refinement processing module for refinement processing; The time-space aggregation module is used to aggregate the refined time dimension features and space dimension features to obtain the multivariate time series data of the LNG storage tank system within the future prediction time span. The use of a multi-head attention module to extract features in time and space dimensions includes: The multi-head attention module in the dual-view Transformer model is used to map the multimodal reorganized dataset into query matrix, key matrix and value matrix in the time dimension and spatial dimension respectively. In the time dimension and space dimension respectively, the attention weight matrix is calculated according to the transposed matrix product of the query matrix and the key matrix, and the Softmax function is introduced to perform weight mapping on the row vectors in the attention weight matrix; The time dimension features and the space dimension features are calculated respectively according to the product of the weight-mapped matrix and the value matrix; The spatiotemporal dimension modeling information refinement processing module includes a first residual connection layer and layer standardization, a feedforward layer, and a second residual connection layer and layer standardization connected in sequence; The extracted time / space dimension features are residually connected with the initial input time / space dimension and layer-normalized before being input into the feedforward layer; the output of the feedforward layer is added to the output of the first residual connection layer using the second residual connection layer, layer-normalized before being input into the spatiotemporal aggregation module.
2. A multi-modal and spatiotemporal driven method for predicting BOG generation in a storage tank according to claim 1, characterized in that: Before rearranging the acquired historical multivariate time series data, the method further includes: using an isolated forest anomaly detection algorithm to remove abnormal values in the historical multivariate time series data of the LNG storage tank system.
3. A multi-modal and spatiotemporal driven method for predicting BOG generation in a storage tank as claimed in claim 2, characterized in that: The method of using the isolation forest anomaly detection algorithm to remove outliers in the historical multivariate time series data of the LNG storage tank system includes: A split point is randomly selected between the maximum and minimum values of each sensor feature of the historical multivariate time series data of the LNG tank system, and the data is divided into the left subtree or the right subtree according to the split point; new subtrees are continuously constructed until the subtree can no longer be cut or the entire tree reaches the set height; Calculate the anomaly score of a data point based on the average of its path lengths in all trees and the average path length of the tree; The abnormal data points and normal data points in the historical multivariate time series data are judged according to the abnormal scores of the data points.
4. The multi-modal and spatiotemporal driven method for predicting the amount of BOG produced in a storage tank according to claim 1, characterized in that: The dual-view Transformer model is trained using a stochastic gradient descent algorithm.
5. The multi-modal and spatiotemporal driven method for predicting the amount of BOG produced in a storage tank according to claim 1, characterized in that: The historical multivariate time series data of the LNG storage tank system includes: Temperature, level, pressure and flow data of LNG storage tanks and temperature, pressure and flow data of BOG compressors.
6. A multi-modal and spatiotemporal driven method for predicting BOG generation in a storage tank according to claim 5, characterized in that: The method of calculating the BOG generation amount of the LNG storage tank according to the multivariate time series data of the LNG storage tank system within the time span to be predicted includes: The BOG generation of the LNG storage tank is calculated based on the temperature, pressure and flow data of the BOG compressor as well as the molar gas constant and compression factor.
7. A multi-modal and time-space driven storage tank BOG generation prediction system, characterized in that: include: The data acquisition module is configured to: acquire historical multivariate time series data of the LNG storage tank system; The data reorganization module is configured as follows: based on the multimodal concept, the historical multivariate time series data of the LNG tank system is set with the same time interval and rearranged using the time span TPL to be predicted, and the multi-step prediction of length TPL is split into TPL different modes, each mode is regarded as a single-step prediction, and TPL groups of data of different modes are constructed in each reorganization interval to obtain a multimodal reorganized data set; The data prediction module is configured to: extract and aggregate the features of the time dimension and the space dimension of the multimodal reorganized data set using a dual-view Transformer model, and obtain the multivariate time series data of the LNG storage tank system within the time span to be predicted; The BOG generation amount calculation module is configured to: calculate the BOG generation amount of the LNG storage tank according to the multivariate time series data of the LNG storage tank system within the time span to be predicted; The dual-view Transformer model includes a position vector embedding module, a multi-head attention module, a spatiotemporal dimension modeling information refinement processing module, and a spatiotemporal dimension information aggregation module; For the multimodal reorganized data set, the position vector embedding module is used to perform position embedding and dimension mapping in the time dimension and the space dimension respectively, and then the multi-head attention module is used to extract the features of the time and space dimensions. After obtaining the time dimension features and space dimension features, they are respectively input into the time-space dimension modeling information refinement processing module for refinement processing; The time-space aggregation module is used to aggregate the refined time dimension features and space dimension features to obtain the multivariate time series data of the LNG storage tank system within the future prediction time span. The use of a multi-head attention module to extract features in time and space dimensions includes: The multi-head attention module in the dual-view Transformer model is used to map the multimodal reorganized dataset into query matrix, key matrix and value matrix in the time dimension and spatial dimension respectively. In the time dimension and space dimension respectively, the attention weight matrix is calculated according to the transposed matrix product of the query matrix and the key matrix, and the Softmax function is introduced to perform weight mapping on the row vectors in the attention weight matrix; The time dimension features and the space dimension features are calculated respectively according to the product of the weight-mapped matrix and the value matrix; The spatiotemporal dimension modeling information refinement processing module includes a first residual connection layer and layer standardization, a feedforward layer, and a second residual connection layer and layer standardization connected in sequence; The extracted time / space dimension features are residually connected with the initial input time / space dimension and layer-normalized before being input into the feedforward layer; the output of the feedforward layer is added to the output of the first residual connection layer using the second residual connection layer, layer-normalized before being input into the spatiotemporal aggregation module.
