A method, system, storage medium, and equipment for reliability evaluation of oil and gas stations.
By combining the DETR model and the fault tree model with a variable structure dynamic Bayesian network, the problems of network complexity and long inference time in the reliability evaluation of oil and gas stations are solved, and high-precision and efficient reliability evaluation is achieved.
Patent Information
- Application Number
- CN202410462636.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-17
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-04-17
AI Technical Summary
Existing technologies for reliability evaluation of oil and gas stations have complex network structures and long inference times, making them difficult to apply to specific scenarios.
The DETR model was used for training to establish a key component identification model for the station process flow diagram, and reliability evaluation was carried out through fault tree model and variable structure dynamic Bayesian network.
It improves the detection accuracy and reasoning efficiency of oil and gas stations, and enables efficient and dynamic reliability evaluation.
Smart Images

Figure CN118332433B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of testing technology, and in particular to a method, system, storage medium and equipment for evaluating the reliability of oil and gas stations. Background Technology
[0002] Computer vision (CV) is an emerging science and technology that utilizes computers to mimic the visual functions of the human eye. It automatically extracts useful data information from acquired images or image sequences, thereby qualitatively or quantitatively understanding the real three-dimensional physical world.
[0003] Currently, prior-based anchors or region proposals are mainly used to complete classification and bounding box regression tasks. However, their network structures are complex and the inference time is long, making them difficult to apply to specific scenarios such as reliability assessment of oil and gas stations. Summary of the Invention
[0004] The purpose of this application is to provide a method, system, storage medium, and equipment for reliability evaluation of oil and gas stations. By using a DETR network model for training and completing the detection of key components in the station process flow diagram, the detection accuracy and inference efficiency of oil and gas stations can be improved.
[0005] To address the aforementioned technical problems, this application provides a method for evaluating the reliability of oil and gas stations, the specific technical solution of which is as follows:
[0006] Establish a key component identification model for the station process flow diagram based on the DETR model;
[0007] Obtain the process flow diagram of the oil and gas station, and use the key component identification model of the process flow diagram to identify the key components of the oil and gas station process flow diagram to obtain the identification results.
[0008] Based on the identification results and the functional connection topology of key components, a fault tree model of the station is constructed.
[0009] Based on the fault tree model, a dynamic reliability evaluation model for the station system based on a variable structure dynamic Bayesian network is constructed.
[0010] The reliability of the target station corresponding to the process flow diagram of the oil and gas station is evaluated using the dynamic reliability evaluation model of the station system, and the reliability evaluation results are obtained.
[0011] Optionally, the establishment of the key component identification model for the station process flow diagram based on the DETR model includes:
[0012] Obtain the dataset of key components;
[0013] The feature vector of the key component dataset is extracted using a pre-defined convolutional neural network;
[0014] The feature vector is input into the Transformer module, and the output image sequence is obtained through the encoder and decoder.
[0015] The target bounding box and its category probability score are predicted using a feedforward neural network for the output image sequence.
[0016] Optionally, the application of a pre-defined convolutional neural network to extract feature vectors from the key component dataset includes:
[0017] Obtain the original input images from the key component dataset;
[0018] The original input image is downsampled using the preset convolutional neural network to obtain a low-resolution feature map;
[0019] The low-resolution feature map and the original input image are fused using a residual layer to obtain a shortcut structure;
[0020] The shortcut structure is processed by an activation function to obtain the feature vector of the key component dataset.
[0021] Optionally, after downsampling the original input image using the preset convolutional neural network to obtain a low-resolution feature map, the method further includes:
[0022] The feature vector is divided into several block vectors; each block vector is used as parallel input to the encoder of the Transformer module;
[0023] Determine the two-dimensional matrix and its dimension corresponding to the feature vector; wherein the size of the two-dimensional matrix is the same as that of the feature vector, and the dimension of the block vector is the same as the number of channels of the low-resolution feature map;
[0024] Add sine vectors to the even-numbered positions of the two-dimensional matrix and cosine vectors to the odd-numbered positions to fill the two-dimensional matrix;
[0025] The location code is obtained by adding the two-dimensional matrix to the block vector.
[0026] Optionally, if the Transformer module includes an attention mechanism, the process of obtaining the output image sequence via the encoder and decoder further includes:
[0027] The feature vector is mapped into a query vector, a key vector, and a value vector;
[0028] Given a query vector for a target element, the weight coefficients of the value vectors corresponding to each key vector are obtained by calculating the similarity between the query vector and each key vector.
[0029] The final attention value is obtained by weighting and summing the value vector using the weight coefficients.
[0030] Optionally, the step of obtaining the weight coefficient of the value vector corresponding to each key vector by calculating the similarity between the query vector and each of the key vectors includes:
[0031] The similarity between the query vector and the key vector is calculated using vector dot product, cosine similarity, and neural networks.
[0032] The Softmax function is introduced to perform numerical transformation on the similarity values in the first stage, thereby increasing the weight of important elements and obtaining the weight coefficients of the value vector.
[0033] Optionally, the step of predicting the target bounding box and its category probability score of the output image sequence using a feedforward neural network includes:
[0034] Obtain the query vector;
[0035] The query vector is input into a feedforward neural network, which focuses on the target bounding box information at each location in the image based on the labeled training data, as well as the probability score of the category to which each target bounding box belongs.
[0036] Optionally, constructing a fault tree model of the station based on the identification results and the functional connection topology of key components includes:
[0037] A physical logic diagram of the station is generated based on the key components and their numbers in the identification results;
[0038] Identify the station's failure modes and corresponding failure events;
[0039] Each node in the fault tree model represents a failure event. Based on the physical logic diagram and the operational logic between the key components, a fault tree diagram of the construction site is constructed. The events include normal and abnormal states.
[0040] This application also provides an oil and gas station reliability evaluation system, including:
[0041] The key component identification model building module is used to establish a key component identification model for the station process flow diagram based on the DETR model.
[0042] The key component identification module is used to obtain the process flow diagram of the oil and gas station, and to use the key component identification model of the process flow diagram to identify the key components of the oil and gas station process flow diagram to obtain the identification results.
[0043] The fault tree generation module is used to construct a fault tree model of the station based on the identification results and the functional connection topology of key components.
[0044] The reliability model construction module is used to construct a dynamic reliability evaluation model for the station system based on a variable structure dynamic Bayesian network according to the fault tree model.
[0045] The reliability evaluation module is used to evaluate the reliability of the target station corresponding to the process flow diagram of the oil and gas station using the dynamic reliability evaluation model of the station system, and obtain the reliability evaluation results.
[0046] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.
[0047] This application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described above when it invokes the computer program in the memory.
[0048] This application provides a reliability evaluation method for oil and gas stations, comprising: establishing a key component identification model for the station's process flow diagram based on the DETR model; obtaining the oil and gas station's process flow diagram, and using the key component identification model to identify key components in the process flow diagram to obtain identification results; constructing a fault tree model for the station based on the identification results and the functional connection topology of the key components; constructing a dynamic reliability evaluation model for the station system based on a variable structure dynamic Bayesian network based on the fault tree model; and using the dynamic reliability evaluation model to evaluate the reliability of the target station corresponding to the oil and gas station's process flow diagram to obtain reliability evaluation results.
[0049] This application first establishes a key component identification model for the process flow diagram of oil and gas stations based on the DETR model to achieve high-precision identification of key components in the process flow diagram of oil and gas stations. Then, based on the identification results, namely the types and quantities of station equipment components and the functional connection topology of key equipment, a fault tree model of the station is established. Finally, a dynamic reliability evaluation model of the station system based on a variable structure dynamic Bayesian network can be constructed using the established fault tree model to achieve efficient and dynamic evaluation of the operational reliability of oil and gas stations.
[0050] This application also provides an oil and gas station reliability evaluation system, storage medium, and electronic equipment, which have the above-mentioned beneficial effects, and will not be elaborated here. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0052] Figure 1 A flowchart illustrating a reliability evaluation method for oil and gas stations provided in an embodiment of this application;
[0053] Figure 2 This is a schematic diagram of the structure of the DETR model provided in the embodiments of this application;
[0054] Figure 3 This is a schematic diagram of the residual structure provided in an embodiment of this application;
[0055] Figure 4 This is a schematic diagram of the ResNet network structure provided in the embodiments of this application;
[0056] Figure 5 A schematic diagram of the encoder structure of the Transformer module provided in the embodiments of this application;
[0057] Figure 6 This is a schematic diagram of attention weight calculation provided in an embodiment of this application;
[0058] Figure 7 This is a schematic diagram of the multi-head attention mechanism provided in an embodiment of this application;
[0059] Figure 8 This is a schematic diagram of the decoder provided in the embodiments of this application;
[0060] Figure 9 This is a schematic diagram of the key component dataset of the station process flow diagram provided in the embodiments of this application;
[0061] Figure 10 This is a schematic diagram of the station fault tree structure provided in the embodiments of this application;
[0062] Figure 11 A schematic diagram of a simple dynamic Bayesian network structure with three time slices provided in an embodiment of this application;
[0063] Figure 12 This is a schematic diagram of a simple dynamic Bayesian network structure provided in an embodiment of this application;
[0064] Figure 13This is a schematic diagram of a variable-structure dynamic Bayesian network provided in an embodiment of this application;
[0065] Figure 14 This is a schematic diagram of the structure of an oil and gas station reliability evaluation system provided in an embodiment of this application. Detailed Implementation
[0066] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0067] Please refer to Figure 1 , Figure 1 A flowchart of a reliability evaluation method for oil and gas stations provided in this application embodiment, the method including:
[0068] S101: Establish a key component identification model for the station process flow diagram based on the DETR model;
[0069] S102: Obtain the process flow diagram of the oil and gas station, and use the key component identification model of the process flow diagram to identify the key components of the oil and gas station process flow diagram to obtain the identification results.
[0070] S103: Construct a fault tree model of the station based on the identification results and the functional connection topology of the key components;
[0071] S104: Construct a dynamic reliability evaluation model for the station system based on a variable structure dynamic Bayesian network according to the fault tree model;
[0072] S105: Use the dynamic reliability evaluation model of the station system to evaluate the reliability of the target station corresponding to the process flow diagram of the oil and gas station, and obtain the reliability evaluation results.
[0073] In step S101, a key component identification model for the station process flow diagram is first established based on the DETR (DEtection Transformer, a target detection model). During this process, data augmentation techniques can be used to increase the quantity and quality of the dataset, construct a rich and high-quality oil and gas station process flow diagram dataset, and label and train it. Finally, high-precision identification of key components in the oil and gas station process flow diagram can be achieved.
[0074] The network structure of the DETR model is as follows: Figure 2 As shown, Figure 2This is a schematic diagram of the structure of the DETR model provided in the embodiments of this application, wherein... Figure 2 The right side is a schematic diagram of the key components of the station process flow, which includes the inlet ESD (Emergency Shutdown Device) and various compressors. The inlet ESD is an emergency shutdown device used to quickly disconnect the station from the pipeline in an emergency to protect the pipeline and equipment. Figure 2 It also includes:
[0075] An encoder's function is to transform an input sequence into a fixed-length vector containing all the information of the input sequence. In neural networks, encoders are typically composed of recurrent neural network structures such as RNNs, LSTMs, or GRUs, which are capable of processing sequential data and capturing its temporal dependencies.
[0076] The decoder takes a fixed-length vector as input and generates an output image sequence. The decoder is also constructed from a similar recurrent neural network structure, responsible for generating new sequence elements based on the encoder's output and previously generated sequence portions.
[0077] Object queries refer to queries for objects;
[0078] Positional encoding is a technique used to inject the positional information of each word in a sequence into a model.
[0079] The prediction head is a part of the model that is responsible for generating the final output or prediction result.
[0080] The DETR model consists of three main modules: a traditional convolutional neural network as the backbone, used to extract feature vectors from the original image; a Transformer module with an encoder and decoder; and finally, a feedforward network (FFN) used to predict the bounding box of the target and its class probability score.
[0081] The backbone network of the DETR model can be ResNet. Assuming the original input image size is C×H×W (C represents the number of image channels), the image is downsampled by 32 times through the ResNet convolutional neural network, resulting in a low-resolution feature map with feature widths H0 and W0 = H / 32 and W / 32, and the number of channels increases to 2048. The backbone network is primarily responsible for extracting features from the input image. The backbone is a core component of deep neural network models, typically consisting of a series of convolutional layers, activation functions, and other possible layers (such as batch normalization layers and pooling layers).
[0082] Generally, deeper network structures yield richer semantic information from extracted features. However, increasing network depth can also lead to gradient vanishing or gradient explosion, affecting model convergence. While normalization methods can aid convergence, they can sometimes introduce larger classification errors, degrading model performance. Therefore, a residual learning layer is constructed using residual representation, with the residual structure as follows: Figure 3 As shown, Figure 3 This is a schematic diagram of the residual structure provided in an embodiment of this application. The input x is fused with the original input x after passing through several convolutional layers, a process known as the Shortcut structure. Finally, the output value is obtained after passing through the ReLU activation function. The introduction of the Shortcut branch ensures that the network does not degenerate to shallow network performance during training, thereby guaranteeing the identity mapping from deep to shallow networks and improving the network's learning ability.
[0083] ResNet has network structures of various sizes, such as Figure 4 As shown, Figure 4 This is a schematic diagram of the ResNet network structure provided in this embodiment. In the ResNet-50, the last layer, obtained through a 1×1 convolution, has 2048 feature map channels. The convolutional neural network used in this embodiment is consistent with this. Choosing ResNet-50 as the backbone network shortens the model training time for the key component detection task in the station process flow diagram. Furthermore, this pre-trained model has often undergone repeated training and testing on multiple datasets. Utilizing transfer learning, only a few iterations are needed to complete the initial key component identification task in the station process flow diagram, which is more effective than feature extraction without any pre-trained weights. The image data after feature extraction possesses basic contour information, which is beneficial for subsequent modules to further encode based on this information.
[0084] The feature map extracted from the original image using a convolutional neural network needs to be segmented into several blocks. Each block is similar to a sequence vector in a natural language processing task. These blocks are then fed in parallel into the encoder part of the Transformer module in subsequent operations. However, the order in which each block is read does not affect the final prediction result for the encoder, which contradicts the principle of position sensitivity in object detection tasks. To address this issue, the DETR model introduces a spatial location encoder. The encoding formula is as follows:
[0085]
[0086]
[0087] PE is a two-dimensional matrix, with a size equal to the features extracted by a convolutional neural network. Figure 1 Similarly, dk represents the dimension of the block vector. In this invention, the dimension of the block vector is consistent with the number of channels C of the downsampled feature map. The above formula means that a sine vector is added to the even-numbered positions of each block vector, and a cosine vector is added to the odd-numbered positions to fill the entire PE matrix. Then, this matrix is added to the predicted feature map to complete the introduction of positional encoding.
[0088] The principle of encoder is as follows Figure 5 As shown, Figure 5 This is a schematic diagram of the encoder structure of the Transformer module provided in the embodiments of this application. The encoder of the Transformer module mainly includes a multi-head self-attention mechanism, a layer normalization method, and a feedforward neural network. The encoder module is stacked with N layers, and a residual structure similar to ResNet is adopted in a single encoder module. The input x of the shallow layer is added to the encoded vector and finally fed into the next layer network structure through the layer normalization method.
[0089] The attention mechanism maps the feature vector output by a convolutional network to a query vector, a key vector, and a value vector. Given a query vector for a target element, the similarity between the query and each key is calculated to obtain a weight coefficient for the value corresponding to each key. This weight coefficient is then used to weight and sum the value vectors to obtain the final attention value. The mathematical expression is shown below, where the query vector, key vector, and value vector are represented by Q, K, and V, respectively:
[0090]
[0091] The computation process of the Attention mechanism can be abstracted and summarized into two stages:
[0092] In the first stage, vector dot product, cosine similarity, and neural networks are typically used to calculate the similarity between the query and the key. The calculation formula is as follows:
[0093]
[0094] In the second stage, the similarity values from the first stage are numerically transformed by introducing the Softmax function, thereby increasing the weight of important elements and obtaining the Value. i Weighting coefficient α i The calculation formula is as follows:
[0095]
[0096] Currently, there are various calculation methods for the Attention mechanism. The DETR model uses vector dot product to calculate the attention weights, and its principle is as follows: Figure 6 As shown, Figure 6 This is a schematic diagram of attention weight calculation provided in an embodiment of this application.
[0097] Multi-head attention adds multiple subspace representations to the conventional attention mechanism, allowing the model to focus on information from different dimensions. Each subspace generates a corresponding query vector, key vector, and value vector, and calculates its own attention value. After parallel computation, the model concatenates the outputs of each sublayer to obtain the final attention value, calculated as follows:
[0098] MultiHead(Q,K,V)=Concat(head1,…,head h W O ;
[0099]
[0100] head in the formula m Let W represent the representation vectors of multiple subspaces jointly generated by m attention heads at different positions in a multi-head self-attention mechanism, where W is a linear projection matrix. Practice has shown that the multi-head attention mechanism outperforms the single-head attention mechanism in feature extraction and vector correlation analysis. Its working principle is as follows: Figure 7 As shown, Figure 7 This is a schematic diagram of the multi-head attention mechanism provided in an embodiment of this application.
[0101] The decoder module is a fundamental component of the Transformer module and a key element enabling the DETR model to perform station process flow diagram detection. For example... Figure 8 As shown, Figure 8This is a schematic diagram of the decoder structure provided in the embodiment of this application. The decoder has M stacked layers. During network initialization, the input of the decoder part is the target query vector (ObjectQueries).
[0102] The number of target query vectors is related to the number of targets to be detected in the image (the default maximum number of targets in an image is 100). Unlike the traditional Transformer decoder, the decoder part in the DETR model outputs all target query vectors in parallel. In machine translation or text generation tasks, due to the constraint of contextual relationships in temporal data, the encoder must rely on the output of the previous vector to make predictions, which affects the model's inference speed.
[0103] Therefore, applying the encoder-decoder structure to the object detection network not only avoids the computational overhead required by the non-maximum suppression module in post-processing, but also allows for parallel prediction of all possible targets in the image. Another difference from the Transformer structure in the ViT model is that the DETR decoder also incorporates position-encoded vectors. This can be understood as follows: if the image processing task is classification, the network only needs to predict one class vector to complete the classification task, naturally eliminating the need for position encoding of the remaining vectors. However, in object detection tasks, the object query vector focuses on the bounding box information of targets at various locations in the image based on the labeled training data. The object query vector ObjectQuery in this invention is initialized using position encoding, and position-encoded vectors are introduced into all M stacked query vector layers to prevent the loss of positional information during the feedforward and backpropagation processes of the deep neural network.
[0104] It is worth noting that, in addition to using multi-head self-attention, the decoder module also employs multi-head attention, aiming to make the initialized target query vector focus on the feature vector generated by the encoder. Here, the decoder provides the query vector, while the encoder module provides the key vector and value vector. This multi-layered cascaded encoder-decoder structure allows the output of each layer of the decoder to predict bounding boxes and calculate the loss through a parameter-sharing feedforward neural network (FFN), achieving deep supervised learning.
[0105] This application's embodiments use a dataset of key components established based on the oil and gas station mapping standard "Petroleum and Natural Gas Engineering Mapping Standard" SY / T0003-2021 and the station process flow diagram as training objects, such as... Figure 9 As shown, Figure 9This is a schematic diagram of the key component dataset for the station process flow diagram provided in this application embodiment. The DETR object detection algorithm is used to identify key components of the station process flow diagram with various labels. Based on the original dataset, data augmentation methods such as flipping, rotating, scaling, and cropping are used to significantly increase the amount of data in the training dataset and improve the robustness of the model's predictions.
[0106] In the decoder part of the Transformer structure described above, N target query vectors are initialized. The feedforward neural network predicts the class probability and bounding box regression parameters. The number of N predicted vectors significantly exceeds the number of true bounding boxes labeled in the original dataset. Therefore, it is necessary to select which target query vector to use for loss calculation within the true bounding boxes.
[0107] To solve this assignment problem, the DETR algorithm incorporates the Hungarian algorithm to assign optimal ground truth bounding boxes to the predicted bounding boxes. Let y be the label of a series of ground truth bounding boxes. Given N predicted bounding box parameters, and assuming that the value of N is much larger than the true target bounding box, the weighted bipartite graph matching loss that minimizes these two sets can be defined as:
[0108]
[0109] Here Let represent the matching loss for each pair of ground truth bounding boxes and predicted bounding boxes. Then, the Hungarian algorithm is used to jointly calculate the bounding box regression loss and the class probability loss, resulting in the final loss function, which can be expressed as:
[0110]
[0111] In the formula, c represents the category, b represents the bounding box coordinate parameter, and if the predicted probability of the target bounding box is an empty set (i.e. considered as background), it will not participate in the final loss calculation.
[0112] The DETR object detection algorithm differs from traditional object detection algorithms in that its decoder directly predicts the object probability and bounding box regression parameters, omitting operations such as non-maximum suppression. Therefore, in the bounding box regression loss, DETR combines L1 regularization loss and traditional IOU loss, and its formula can be defined as:
[0113]
[0114] λ in the formula iou ,λ L1 ∈R is a hyperparameter in the network, which changes as the weights iterate during network training.
[0115] After identifying the types and quantities of key equipment components in the station's process flow diagram based on the DETR model, a logical relationship diagram and fault tree model of the station are generated through the analysis of failure modes and causes of failure in the oil and gas station. The main failure modes of the station include initial defects, corrosion, construction defects, foundation settlement, pressure vessel and pipeline failure, deformation, fracture, etc.
[0116] Each node in a fault tree represents an event, which can have two states: normal and abnormal. Based on their position in the fault tree, events can be categorized as top events, intermediate events, and bottom events. Furthermore, events can also be classified according to their nature as result events, cause events, and special events.
[0117] In fault tree analysis, both top and intermediate events can constitute result events, indicating that the occurrence of an event is a consequence of other events. Bottom events are the causes that lead to other events, hence they are also called causal events. Special events refer to events that require attention or need to be highlighted for their uniqueness in fault tree analysis. Considering various failure modes and causes, and taking into account aspects such as material selection, design, installation, operation, management, and maintenance of the station, a fault tree diagram of the station is constructed based on the key equipment identified by target detection and their physical connection logic structure and operational logic between the equipment. An exemplary schematic diagram is shown below. Figure 10 As shown, Figure 10 This is a schematic diagram of the station fault tree structure provided in an embodiment of this application.
[0118] A Bayesian network can be represented by a pair BN = (G, P). Here, G represents a directed acyclic graph (DAG) composed of nodes and directed edges. Nodes represent variables, and the causal relationships between variables are represented by directed edges, pointing from cause nodes to effect nodes. Cause nodes are called the parent nodes of effect nodes, and effect nodes are the child nodes of cause nodes. P represents a conditional probability table (CPT), which reflects the logical relationships between nodes and quantitatively represents the degree of dependency between parent and child nodes.
[0119] Dynamic Bayesian Networks (DBNs) are a time-dimensional extension of Static Bayesian Networks (BNs). Their set of random variables evolves over time, representing a compressed representation of complex stochastic processes. Based on the node configuration, Dynamic Bayesian Networks can be categorized into Continuous Dynamic Bayesian Networks (CDBNs), Discrete Dynamic Bayesian Networks (DDBNs), and Hybrid Dynamic Bayesian Networks (HDBNs). Discrete Dynamic Bayesian Networks are the most widely used and are the network used in this invention to construct the dynamic reliability evaluation model for the station system. Based on topology and parameter variations, Dynamic Bayesian Networks can be further classified into Ordinary Discrete Dynamic Bayesian Networks (DDBNs) and Structure-Variable Dynamic Bayesian Networks (SVDBNs).
[0120] Dynamic Bayesian networks can model changing systems, representing each factor in the system at each point in time with a random variable. The relationships between these variables describe how the state of the variables evolves over time. The process of variable change over time can be discretized into time slices, each containing a static Bayesian network for that time slice. A dynamic Bayesian network consists of the static Bayesian network (B0, the initial network) within the first time slice and the Bayesian network (B→) containing the two adjacent time slices, denoted as (B0, B→). B→ defines the conditional distribution of the variables between the two time slices, i.e.
[0121]
[0122] In the formula: Z t Z t-1 Z represents the nodes in time slices t and t-1, respectively; t i Pa(Z) is the i-th node on the t-th time slice; t i The node whose parent is a node in the same time slice as its child node can be a node in the same time slice or a node in the previous time slice. A parent node in the same time slice as its child node represents the instantaneous effect within that time slice, reflecting the influence of other nodes on that node. A parent node in a different time slice represents a time-varying effect, reflecting the influence of time on the node. See also... Figure 11 , Figure 11 This is a schematic diagram of a simple dynamic Bayesian network structure with three time slices provided in an embodiment of this application. Figure 11 The left side shows the DBN over three time slices, the middle side shows the initial network, and the right side shows the transition network.
[0123] The definition of dynamic Bayesian networks implicitly includes two assumptions:
[0124] (1) Markov hypothesis: Each node in each time slice is only related to the variable values of the current time slice and the previous time slice, and is not related to the variables in other time slices.
[0125] (2) Time invariant assumption: The conditional probability in B→ does not change with time, that is, the dynamic Bayesian network has time homogeneity.
[0126] Based on the two assumptions above, a joint distribution of all variables spanning T time slices can be obtained by using the initial distribution B1 of the network and the relationship B→ between the variables in the two time slices.
[0127]
[0128] In the formula: Z 1:T This represents all nodes from the first to the Tth time slice.
[0129] As defined above, the structure and parameters of a dynamic Bayesian network do not change over time; rather, it is the sample data, or observation data, that changes over time. However, most systems, including traction drive systems, cannot simultaneously satisfy the Markov assumption and the time-invariant assumption, especially the time-invariant assumption. Therefore, traditional dynamic Bayesian networks cannot meet practical needs, leading to the development of variable-structure dynamic Bayesian networks.
[0130] The proposed framework for variable-structure dynamic Bayesian networks still adheres to the Markov assumption but relaxes the requirements for the network's time-invariant properties. Its differences from traditional dynamic Bayesian networks are reflected in:
[0131] (1) Each time slice has the same structure, but the number of states or parameters of some or all nodes change between time slices;
[0132] (2) The network structure changes within each or part of the time slice, that is, the number of nodes and the dependencies between nodes change within the time slice;
[0133] (3) The conditional probability table changes between adjacent time slices, i.e., B changes;
[0134] (4) Any combination of the above three conditions.
[0135] From the above differences, it can be seen that the variable structure dynamic Bayesian network is evolved from the traditional dynamic Bayesian network. Its definition is similar to that of the traditional dynamic Bayesian network; both can be represented by an initial network B0 and a transition network. However, the transition networks of each time slice and its adjacent time slices in the variable structure dynamic Bayesian network are different. Therefore, the variable structure dynamic Bayesian network can be represented as (B0...). 0 B→ 1 B→ 2 B→ 3 ,…,B→ T-1 ).like Figure 12 This is a schematic diagram of a simple dynamic Bayesian network structure provided in an embodiment of this application. Figure 12 In the middle, the SVDBN of the three time slices on the left, the second from the left is B. 0 The second from the right represents B. → 1 B is on the far right. → 2 .
[0136] In variable-structure dynamic Bayesian networks, nodes whose states can be determined through observation are called observed nodes, while nodes whose states require inference from the observed nodes' states and conditional probability tables are called hidden nodes. For generality, assume a variable-structure dynamic Bayesian network has T time slices, with the conditional probability table for the t-th time slice being IntraCPTt (t = 1, 2, 3, ..., T); it has mt observed nodes and nt hidden nodes; and the conditional probability table between two adjacent time slices is interCPTt (t = 1, 2, 3, ..., T-1), as shown below. Figure 13 As shown, Figure 13 This is a schematic diagram of a variable structure dynamic Bayesian network provided in an embodiment of this application.
[0137] Inferring about this variable-structure DBN essentially involves obtaining the joint distribution probability of all hidden variables being in a certain combination of states when all observed variables are in a definite state. Let X... a b This represents the b-th hidden node in the a-th time slice (a = 1, 2, 3, ..., T; b = 1, 2, 3, ..., nt), represented by Y. c d Let d represent the d-th observation node in the c-th time slice (c = 1, 2, 3, ..., T; d = 1, 2, 3, ..., mt). Then, the essence of the direct inference method of variable structure dynamic Bayesian networks is to compute:
[0138]
[0139] In the formula: This represents a combined state of all hidden nodes within T time slices; This represents the combined state observed by all observation nodes.
[0140] Expanding the above equation using Bayes' theorem and the law of total probability, we obtain the following equation:
[0141]
[0142] In the formula: a represents the time slice in which the hidden node is located, a = 1, 2, 3, ..., T;
[0143] b represents the hidden node number, b = 1, 2, 3, ..., nt;
[0144] c represents the time slice in which the observation node is located, c = 1, 2, 3, ..., T;
[0145] d represents the observation node number, d = 1, 2, 3, ..., mt.
[0146] Where, x t 1:nt This represents the state combination of the hidden nodes in the t-th time slice. y t 1:mt This represents the combination of states observed by the observation node at time slice t.
[0147] Pa(Xa b () represents the set of parent nodes of the b-th hidden node in the a-th time slice;
[0148] Pa(Yc d ) represents the set of parent nodes of the d-th observation node in the c-th time slice.
[0149] If the observation node obtains uncertain information, that is, the observation result is the probability value of the node being in all its possible states, and the sum of these probabilities is 1, then by modifying the above equation according to the chain product rule and the definition of conditional independence, the result is as follows:
[0150]
[0151] In the formula: Yc d The number of states of a node; yc dk Yc d The k-th state of the node;
[0152] P(Yc d =yc dk ) represents the observation node Yc d The observation results.
[0153] Based on the above formula, we can obtain the joint distribution probability of the hidden nodes in a certain state combination under the observation results. Then, by marginalizing all hidden nodes one by one, we can obtain the posterior probability of all hidden variables under the observation results, which is the inference result of the variable structure dynamic Bayesian network, as shown in the following formula:
[0154]
[0155] If, in a variable-structure dynamic Bayesian network, each of the T time slices has at most n hidden nodes and m observed nodes, and all nodes have at most N states, then the complexity of the direct inference algorithm for the variable-structure dynamic Bayesian network is O(mTN). nT+1 ).
[0156] This application first establishes a key component identification model for the station process flow diagram based on the DETR model to achieve high-precision identification of key components in the oil and gas station process flow diagram. Then, based on the identification results, namely the types and quantities of station equipment components and the functional connection topology of key equipment, a fault tree model of the station is established. Finally, a dynamic reliability evaluation model of the station system based on a variable structure dynamic Bayesian network can be constructed using the established fault tree model, realizing efficient and dynamic evaluation of the operational reliability of oil and gas stations.
[0157] See Figure 14 , Figure 14 This is a schematic diagram of the structure of an oil and gas station reliability evaluation system provided in an embodiment of this application. The system includes:
[0158] The key component identification model building module is used to establish a key component identification model for the station process flow diagram based on the DETR model.
[0159] The key component identification module is used to obtain the process flow diagram of the oil and gas station, and to use the key component identification model of the process flow diagram to identify the key components of the oil and gas station process flow diagram to obtain the identification results.
[0160] The fault tree generation module is used to construct a fault tree model of the station based on the identification results and the functional connection topology of key components.
[0161] The reliability model construction module is used to construct a dynamic reliability evaluation model for the station system based on a variable structure dynamic Bayesian network according to the fault tree model.
[0162] The reliability evaluation module is used to evaluate the reliability of the target station corresponding to the process flow diagram of the oil and gas station using the dynamic reliability evaluation model of the station system, and obtain the reliability evaluation results.
[0163] Based on the above embodiments, as a preferred embodiment, the key component identification model construction module includes:
[0164] Acquisition unit, used to acquire key component datasets;
[0165] A vector extraction unit is used to extract feature vectors from the key component dataset by applying a preset convolutional neural network.
[0166] The model building unit is used to input the feature vector into the Transformer module, which processes it through an encoder and a decoder to obtain an output image sequence; and uses a feedforward neural network to predict the target bounding box and the probability score of the class of the output image sequence.
[0167] Based on the above embodiments, as a preferred embodiment, the vector extraction unit is a unit for performing the following steps:
[0168] Obtain the original input images from the key component dataset;
[0169] The original input image is downsampled using the preset convolutional neural network to obtain a low-resolution feature map;
[0170] The low-resolution feature map and the original input image are fused using a residual layer to obtain a shortcut structure;
[0171] The shortcut structure is processed by an activation function to obtain the feature vector of the key component dataset.
[0172] Based on the above embodiments, as a preferred embodiment, the vector extraction unit further includes:
[0173] A positional encoding subunit is used to divide the feature vector into several block vectors; each block vector is used as parallel input to the encoder of the Transformer module; the two-dimensional matrix and its dimension size corresponding to the feature vector are determined; wherein the size of the two-dimensional matrix is the same as that of the feature vector, and the dimension size of the block vector is the same as the number of channels of the low-resolution feature map; sine vectors are added to even-numbered positions of the two-dimensional matrix, and cosine vectors are added to odd-numbered positions to fill the two-dimensional matrix; the two-dimensional matrix and the block vectors are added to obtain the positional encoding.
[0174] Based on the above embodiments, as a preferred embodiment, if the Transformer module includes an attention mechanism, the model building unit further includes:
[0175] The attention value calculation subunit is used to map the feature vector into a query vector, a key vector, and a value vector; given a query vector of a target element, the weight coefficient of the value vector corresponding to each key vector is obtained by calculating the similarity between the query vector and each of the key vectors; the value vectors are weighted and summed using the weight coefficients to obtain the final attention value.
[0176] Based on the above embodiments, as a preferred embodiment, the attention value calculation subunit includes:
[0177] The weight coefficient calculation subunit is used to calculate the similarity between the query vector and the key vector using vector dot product, cosine similarity, and neural network.
[0178] The Softmax function is introduced to perform numerical transformation on the similarity values in the first stage, thereby increasing the weight of important elements and obtaining the weight coefficients of the value vector.
[0179] Based on the above embodiments, as a preferred embodiment, the model building unit includes:
[0180] A category probability calculation subunit is used to obtain the query vector;
[0181] The query vector is input into a feedforward neural network, which focuses on the target bounding box information at each location in the image based on the labeled training data, as well as the probability score of the category to which each target bounding box belongs.
[0182] Based on the above embodiments, as a preferred embodiment, the fault tree generation module is a module for performing the following steps:
[0183] A physical logic diagram of the station is generated based on the key components and their numbers in the identification results;
[0184] Identify the station's failure modes and corresponding failure events;
[0185] Each node in the fault tree model represents a failure event. Based on the physical logic diagram and the operational logic between the key components, a fault tree diagram of the construction site is constructed. The events include normal and abnormal states.
[0186] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, can perform the steps provided in the above embodiments. The storage medium may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0187] This application also provides an electronic device that may include a memory and a processor. The memory stores a computer program, and when the processor calls the computer program in the memory, it can implement the steps provided in the above embodiments. Of course, the electronic device may also include various network interfaces, power supplies, and other components.
[0188] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. As the system provided in the embodiments corresponds to the method provided in the embodiments, the description is relatively simple; relevant parts can be found in the method section.
[0189] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
[0190] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for evaluating the reliability of oil and gas stations, characterized in that, include: Establish a key component identification model for the station process flow diagram based on the DETR model; Obtain the process flow diagram of the oil and gas station, and use the key component identification model of the process flow diagram to identify the key components of the oil and gas station process flow diagram to obtain the identification results. Based on the identification results and the functional connection topology of key components, a fault tree model of the station is constructed. Based on the fault tree model, a dynamic reliability evaluation model for the station system based on a variable structure dynamic Bayesian network is constructed. The reliability evaluation of the target station corresponding to the process flow diagram of the oil and gas station is carried out using the dynamic reliability evaluation model of the station system, and the reliability evaluation results are obtained. The establishment of the key component identification model for the station process flow diagram based on the DETR model includes: Obtain the dataset of key components; The feature vector of the key component dataset is extracted using a pre-defined convolutional neural network; The feature vector is input into the Transformer module, and the output image sequence is obtained through the encoder and decoder. The feedforward neural network is used to predict the target bounding box and the probability score of its category in the output image sequence. The application of a pre-defined convolutional neural network to extract feature vectors from the key component dataset includes: Obtain the original input images from the key component dataset; The original input image is downsampled using the preset convolutional neural network to obtain a low-resolution feature map; The low-resolution feature map and the original input image are fused using a residual layer to obtain a shortcut structure; The shortcut structure is processed by an activation function to obtain the feature vector of the key component dataset; The step of constructing a fault tree model for the station based on the identification results and the functional connection topology of key components includes: A physical logic diagram of the station is generated based on the key components and their numbers in the identification results; Identify the station's failure modes and corresponding failure events; Each node in the fault tree model represents a failure event. Based on the physical logic diagram and the operational logic between the key components, a fault tree diagram of the construction site is constructed. The events include normal and abnormal states.
2. The oil and gas station reliability evaluation method according to claim 1, characterized in that, After downsampling the original input image using the preset convolutional neural network to obtain a low-resolution feature map, the method further includes: The feature vector is divided into several block vectors; each block vector is used as parallel input to the encoder of the Transformer module; Determine the two-dimensional matrix and its dimension corresponding to the feature vector; wherein the size of the two-dimensional matrix is the same as that of the feature vector, and the dimension of the block vector is the same as the number of channels of the low-resolution feature map; Add sine vectors to the even-numbered positions of the two-dimensional matrix and cosine vectors to the odd-numbered positions to fill the two-dimensional matrix; The location code is obtained by adding the two-dimensional matrix to the block vector.
3. The oil and gas station reliability evaluation method according to claim 1, characterized in that, If the Transformer module includes an attention mechanism, the process of obtaining the output image sequence via the encoder and decoder further includes: The feature vector is mapped into a query vector, a key vector, and a value vector; Given a query vector for a target element, the weight coefficients of the value vectors corresponding to each key vector are obtained by calculating the similarity between the query vector and each key vector. The final attention value is obtained by weighting and summing the value vector using the weight coefficients.
4. The oil and gas station reliability evaluation method according to claim 3, characterized in that, The step of calculating the weight coefficients of the value vector corresponding to each key vector by calculating the similarity between the query vector and each of the key vectors includes: The similarity between the query vector and the key vector is calculated using vector dot product, cosine similarity, and neural networks. The Softmax function is introduced to perform numerical transformation on the similarity values in the first stage, thereby increasing the weight of important elements and obtaining the weight coefficients of the value vector.
5. The oil and gas station reliability evaluation method according to claim 1, characterized in that, The step of using a feedforward neural network to predict the target bounding box and its category probability score in the output image sequence includes: Retrieve the query vector; The query vector is input into a feedforward neural network, which focuses on the target bounding box information at each location in the image based on the labeled training data, as well as the probability score of the category to which each target bounding box belongs.
6. A reliability evaluation system for oil and gas stations, characterized in that, include: The key component identification model building module is used to establish a key component identification model for the station process flow diagram based on the DETR model. The key component identification module is used to obtain the process flow diagram of the oil and gas station, and to use the key component identification model of the process flow diagram to identify the key components of the oil and gas station process flow diagram to obtain the identification results. The fault tree generation module is used to construct a fault tree model of the station based on the identification results and the functional connection topology of key components. The reliability model construction module is used to construct a dynamic reliability evaluation model for the station system based on a variable structure dynamic Bayesian network according to the fault tree model. The reliability evaluation module is used to evaluate the reliability of the target station corresponding to the oil and gas station process flow diagram using the station system dynamic reliability evaluation model, and obtain the reliability evaluation results. The key component identification model construction module includes: Acquisition unit, used to acquire key component datasets; A vector extraction unit is used to extract feature vectors from the key component dataset using a preset convolutional neural network. The model building unit is used to input the feature vector into the Transformer module, which processes it through an encoder and a decoder to obtain an output image sequence; and uses a feedforward neural network to predict the target bounding box and the probability score of the class of the output image sequence. The vector extraction unit is a unit used to perform the following steps: Obtain the original input images from the key component dataset; The original input image is downsampled using the preset convolutional neural network to obtain a low-resolution feature map; The low-resolution feature map and the original input image are fused using a residual layer to obtain a shortcut structure; The shortcut structure is processed by an activation function to obtain the feature vector of the key component dataset; The fault tree generation module is a module used to perform the following steps: A physical logic diagram of the station is generated based on the key components and their numbers in the identification results; Identify the station's failure modes and corresponding failure events; Each node in the fault tree model represents a failure event. Based on the physical logic diagram and the operational logic between the key components, a fault tree diagram of the construction site is constructed. The events include normal and abnormal states.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the oil and gas station reliability evaluation method as described in any one of claims 1-5.
8. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program, and the processor, when calling the computer program in the memory, implements the steps of the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Reliability evaluation method and system for gathering and transportation combination station and key equipment
CN111598467A
Dynamic assessment method and device for multi-process flow interaction risk of gas transmission station
CN114548696A