Database alarm multimodal relationship extraction method based on deep learning
Through the two-way fusion network of deep learning and attention mechanism, the fusion and accuracy problems in multi-modal data processing are solved, the automation and accuracy of database alarm processing are improved, and strong technical support is provided.
Patent Information
- Application Number
- CN202410659163.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-05-27
AI Technical Summary
Existing technologies are difficult to effectively handle database alarms in multimodal data, especially in terms of data fusion and relationship extraction accuracy. There is also a lack of multimodal relationship extraction models specifically targeted at database alarm scenarios.
Using a method based on deep learning, the features of text and image data are extracted through sentence encoders and image encoders, and a two-way fusion attention network is constructed. The attention mechanism is combined with multi-modal information fusion and relationship classification to achieve the integration of text and image data. Extract the relationship between them.
It improves the automation and accuracy of database alarm processing, can more accurately capture and understand interactions and dependencies in multi-modal data, provides strong technical support, and provides more efficient decision-making support for database management.
Smart Images

Figure CN118228090B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information processing technology, and in particular relates to a database alarm multimodal relationship extraction method based on deep learning. Background Art
[0002] With the rapid development of information technology, database systems are increasingly used in enterprises and organizations, and their stability and security are crucial to business continuity. The database alarm system is a key mechanism for monitoring the operation status of the database, timely discovering and responding to potential problems. However, traditional database alarm processing methods mainly rely on the experience of system administrators for manual diagnosis and processing, which is not only inefficient, but also with the continuous expansion and complexity of database systems, manual processing methods are increasingly unable to meet actual needs. Especially when processing multimodal data (such as text logs, system indicator charts, etc.), traditional methods are difficult to effectively capture and understand the relationships between them, and thus cannot accurately and quickly locate and solve problems.
[0003] Traditional database alarm processing mainly relies on manual analysis of alarm logs and system status. This method is not only time-consuming and labor-intensive, but also difficult to cope with large-scale and high-frequency database alarm events. In order to improve the efficiency and accuracy of alarm processing, relation extraction technology has been introduced into the analysis of database alarms. Relation extraction aims to automatically identify key entities (such as database objects, error codes, etc.) and their relationships (such as causal relationships, dependencies, etc.) from alarm logs, thereby providing strong information support for alarm location and processing. In recent research, the field of relation extraction has witnessed the emergence of a series of innovative algorithms and models. These new methods have made significant progress in improving accuracy, handling complex dependencies, and understanding deep semantics. Particularly noteworthy is the method based on graph neural network (GNN), which effectively captures the complex interactions and dependencies between entities by constructing graph representations of entities and relationships, providing a new way to deeply understand text content. At the same time, pre-trained language models, such as BERT and its variants RoBERTa, ALBERT, etc., learn rich language representations by pre-training on large-scale text datasets, further improving the fine-tuning performance of the model on specific tasks. In addition, self-supervised learning methods have also shown potential in relation extraction tasks. By utilizing implicit information in unlabeled data, they can improve the generalization ability and performance of the model without a large amount of labeled training data. These advances not only promote the development of relation extraction technology, but also provide more powerful and flexible tools for complex text analysis tasks, such as database alarm information processing.
[0004] However, with the increasing application of multimodal data in database management, such as system monitoring screenshots combined with images, video-recorded operation processes, etc., the text-based relationship extraction method can no longer fully meet the needs. These non-text modal data contain rich contextual information, which is of great value for understanding and processing database alarms. Therefore, the research and application of multimodal relationship extraction technology has become a new focus in the field of database alarm processing. Although the existing multimodal relationship extraction methods can extract information from data of different modalities, they still face some challenges in the application scenarios of database alarms. The first is the difficulty of data fusion. The differences in feature space, expression form, etc. of different modal data make effective fusion a technical difficulty. The second is the accuracy of relationship extraction. Existing methods often find it difficult to accurately identify the complex relationship between database alarm logs and non-text data. In addition, the lack of multimodal relationship extraction models specifically for database alarm scenarios also limits the application effect of this technology. Summary of the invention
[0005] Purpose of the invention: The technical problem to be solved by the present invention is to provide a database alarm multimodal relationship extraction method based on deep learning to address the deficiencies of the prior art. The method can not only process the alarm information in the text log, but also analyze non-text modal data such as images. Through deep learning and attention mechanism, the information between different modalities can be effectively integrated to accurately extract entities and their relationships. This method can greatly improve the automation and accuracy of database alarm processing and provide strong technical support for database management.
[0006] The method of the present invention comprises the following steps:
[0007] Step 1, encode the text;
[0008] Step 2, extracting entity feature information related to the database alarm from the image;
[0009] Step 3: Establish a bidirectional fusion attention network to capture multimodal database alerts;
[0010] Step 4: Perform multimodal relationship classification.
[0011] Step 1 includes: in the sentence encoder, through the BERT model, the input Oracle text sentence {w1, w2, … wt} generates a feature vector matrix V, which is expressed as:
[0012] ,
[0013] Where t is the sequence length, wt is the tth word in the input Oracle text sentence, and the matrix V represents the set of feature vectors extracted from the text data. Each row represents a feature vector converted from a cls label or a word in the sequence, and each vector is 768-dimensional in length (768-dimensional is the hidden layer vector dimension in the BERT model); cls t Indicates the starting tag of the tth sentence, seq t Indicates the tth sentence end tag, V t*768 Represents the element in the tth row and 768th column. Each input sentence is converted into a feature vector matrix through the BERT model.
[0014] Step 2 includes: in the image encoder, using the database alarm identifier based on the visual knowledge retriever to identify the database alarm entity information in the image: given an image containing a database alarm entity a (the image here can be an image of a database server, a switch image, etc. in practice), obtain the corresponding entity feature representation f a and the feature representation f of the i-th other database warning entity contained in the image i , defined as:
[0015] (1),
[0016] (2),
[0017] where g a represents the geometric parameters (such as position and size) of the image area to be cropped, and b a Represents the cropping boundary or reference area; these parameters are usually used to determine which part of the image is cropped from the entire image for further processing; g i Represents the bounding box coordinates or other shape description information of a candidate region, b i Represents a i The relevant area is used for further image processing operations; crop(g e , b e ) represents the geometric parameter g e The image is cropped to the bounding box and resized to 160 × 160 pixels, with parameters e ∈ {a, i}, φ representing a fully connected network.
[0018] Step 2 also includes: In the image encoder, adding a fully connected layer and a batch normalization layer to obtain the final features of the two database alarm entities: vector h a and vector h i Used to replace the entity feature representation f a and f iTo represent the final characteristics of the database alarm device entity:
[0019] (3),
[0020] (4),
[0021] Where BatchNorm stands for batch normalization (used in deep learning to accelerate the training process and improve the generalization ability of the model; by normalizing the data of each batch, the input distribution of each layer in the network is more stable, which helps to solve the problem of internal covariate shift in the training process), W2 and W3 are trainable matrices; b2 and b3 are trainable parameters;
[0022] Finally, the entity feature representation f a and vector h i Use L2 normalization and concatenate them to get the final vector of database alarm entity features :
[0023] (5),
[0024] Where L2Norm is the L2 norm (used for regularization to limit the complexity of the model to avoid overfitting); [;] represents the concatenation of two vectors.
[0025] Step 3 includes: passing the feature vectors of the database alarm entities to the bidirectional fusion attention network in chronological order:
[0026] In the database alarm entity pair (m, n), the feature vector of the database alarm entity m includes the text encoder input X mt and the image encoder input X mg (The subscript t represents text, and g represents image, that is, X mt is the text feature vector of database alarm entity m, X mg is the image feature vector of database alarm entity m), the feature vector of database alarm entity n includes the text encoder input X nt and the image encoder input X ng , the expression is:
[0027] (6),
[0028] (7),
[0029] (8),
[0030] (9),
[0031] Among them, h m The image encoder input X represents the database alarm entity m mg The processed feature vector, F mi The image encoder input X represents the database alarm entity m mg The i-th eigenvector of ; i represents the amount of input information;
[0032] h n The image encoder input X represents the database alarm entity n ng The processed feature vector, F ni The image encoder input X represents the database alarm entity n ng The i-th eigenvector of .
[0033] Step 3 also includes: the bidirectional fusion attention network includes a modality representation and multimodal database alert context , where index k is used to represent {mt, mg, nt, ng}, where mt represents the text t of the database alarm entity m, mg represents the image g of the database alarm entity m, nt represents the text t of the database alarm entity n, and ng represents the image g of the database alarm entity n; N x Indicates the number of modal representations; N y Indicates the number of multimodal database alarm contexts; X i Indicates the input message, Y i Indicates output message;
[0034] The convolution operation is used to transform the input message X i Convert to X j|i , relative to Y i , input message X i Can be used to generate X j|i , the process is as follows:
[0035] (10),
[0036] Among them, X j|i Represents a subset selected from a large feature set for input into the next step of calculation or model; Conv is a convolution operation, sigmoid is an activation function; kernel i Represents the input message X i Convolution kernel; bias i is the deviation value;
[0037] Implicit multimodal interaction spaceb ij The following formula is used for dynamic update, where the implicit multimodal interaction space b ij The initial value of is 0, and the initial value of the alarm context is a random value:
[0038] (11),
[0039] Then, N y Iterates to dynamically extract the multimodal database alarm context between multiple modalities. In each iteration, the dynamic top-down coefficient C is used to explain the top-down information flow between A and B, expressed as:
[0040] (12),
[0041] Among them, c ij represents the importance or selection probability of the ith element relative to the jth element under given conditions, b ij A vector representing the implicit multimodal interaction space; Represents a series of weight values obtained after processing by the softmax function; exp is the natural exponential function; softmax is an activation function used to ensure that the sum of all attention weights is 1. The top-down process uses a static self-attention mechanism, which is expressed as:
[0042] (13),
[0043] (14),
[0044] in Represents the corresponding input vector 1, 2... to N x dimensional vector; X is the input vector with different spaces (Formulas 13 and 14 are for a multi-head attention mechanism, that is, for example, a 256-dimensional vector, and eight multi-heads are used, that is, each head is a 32-dimensional vector; the core idea of the multi-head attention mechanism is to divide the input vector into multiple "heads", each head independently calculates the attention score and weight, and then the outputs of these heads are merged to capture information in different subspaces; specifically, if there is a 256-dimensional input vector and it is decided to use an 8-head multi-head attention mechanism, then each head will process a 32-dimensional vector); atten is the top-down multimodal database warning context; concat refers to the connection operation; W q , W k and W v is the transformation matrix and T represents the matrix transpose.
[0045] In step 3, the top-down explicit multimodal database alarm context atten is further transferred to the dynamic multimodal routing process through the bidirectional dynamic coefficient (c ij+ atten) allows capturing implicit and explicit multimodal interactions simultaneously in each iteration, dynamically updating the multimodal database alert context Y through multiple dynamic iterations j , expressed as:
[0046] (15),
[0047] Each of the Y j There are i inputs, and X j|i Represents the corresponding alarm context Y j The ith input of .
[0048] Step 4 includes: applying convolution operation after bidirectional fusion attention network processing to further aggregate the output multimodal database alert context features:
[0049] (16),
[0050] in, It represents the output of the pth group of data after the convolution operation and the sigmoid activation function processing;
[0051] The softmax classifier is used to predict the relationship between entity pairs in the text and output p(re|m,n):
[0052] (17),
[0053] (18),
[0054] Among them, contact is a concatenation function, O is a comprehensive feature vector or feature map obtained by the connection operation, relu is an activation function that outputs the positive part of the input, which is used to increase the nonlinear ability of the network and help the network learn complex patterns; w and b represent the parameters and bias terms of the fully connected layer respectively, and p(re|m,n) represents the probability distribution of the final output.
[0055] Beneficial effects: In the process of solving the challenges of multimodal data processing in database alarms, the present invention constructs a multimodal relationship extraction model based on a bidirectional fusion attention network. This model is particularly optimized for the accuracy and efficiency problems when processing and analyzing multiple data modes such as text and images. By comprehensively applying deep learning technology and attention mechanism, the present invention proposes a novel method to understand and analyze multimodal data in database alarms, thereby improving the accuracy and efficiency of database alarm handling. First, the present invention uses a sentence encoder and an image encoder to extract features from text and image data in database alarms. In this way, a deep learning model can be used to understand text content and image details, providing rich semantic information for subsequent data analysis. Secondly, the present invention introduces a bidirectional fusion attention network. Through an innovative attention mechanism, in multimodal data analysis, not only the explicit features of the data, such as information extracted directly from text or images, are paid attention to, but also the implicit multimodal database alarm context information and its internal connections can be deeply mined through the downstream-upstream dynamic attention network and the top-down static self-attention mechanism. This bidirectional fusion method enables the model to more accurately capture and understand the interactions and dependencies between different modalities, thereby improving the accuracy of relationship extraction. Finally, the multimodal relationship classification part is used to further process the data processed by the bidirectional fusion attention network. The convolution operation and softmax classifier are applied to accurately predict the relationship between entity pairs in the text, store these relationships in the form of triplets, and provide direct and accurate decision support for database alarm handling.
[0056] Through this technical solution, not only the performance of multimodal relationship extraction of database alarms is improved, but also strong technical support is provided for the intelligent handling of database alarms. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.
[0058] Figure 1 It is a schematic diagram of the bidirectional fusion attention network structure.
[0059] Figure 2 It is a schematic diagram of constructing the knowledge graph of database abnormal events.
[0060] Figure 3 It is a flow chart of the method of the present invention.
[0061] Figure 4 It is a diagram of text encoding.
[0062] Figure 5 It is a schematic diagram of multimodal relationship classification. DETAILED DESCRIPTION
[0063] like Figure 3 As shown, the present invention provides a database alarm multimodal relationship extraction method based on deep learning, comprising the following steps:
[0064] Step 1: Encode the text. In the sentence encoder, use the BERT model to encode each input sentence s into a vector. The BERT model is trained using a large-scale unlabeled text corpus, and the resulting text vector contains rich semantic information. Therefore, the model generates a feature vector matrix V from the input Oracle text sentence {w1, w2, … wt}, which is expressed as follows:
[0065] ,
[0066] Where t is the sequence length, 768 is the dimension of the word vector, cls is the sentence start label, seq is the sentence end label, and each input sentence can be converted into a feature vector matrix through the BERT model. The specific process is as follows Figure 4 shown.
[0067] Step 2: Extract entity feature information related to database alarms from the image. In the image encoder, database alarm identifiers based on visual knowledge retrievers are used to identify database alarm entity information in the image, such as equipment and its status, alarm information, and fault causes. Given multiple images containing database alarm entities a, the corresponding entity feature representation f can be obtained. a and the feature representation f of the i-th other database warning entity contained in the image i , defined as:
[0068] (1),
[0069] (2),
[0070] Among them, crop(g e , b e ) indicates that from g e Images cropped to bounding boxes and resized to 160 × 160 pixels, e ∈ {a, i}, φ denotes a fully connected network.
[0071] To obtain high-level features, a fully connected layer and a batch normalization layer are added to obtain the final features of the two database alarm entities. More precisely, the vector h a and h i Used to replace f a and f i To represent the final characteristics of the equipment entity:
[0072] (3),
[0073] (4),
[0074] Where W2 and W3 are trainable matrices; b2 and b3 are trainable parameters.
[0075] Finally, for f a and h i Use L2 normalization and concatenate them to get the final vector of database alarm entity features , defined as:
[0076] (5),
[0077] Where [;] represents the concatenation of two vectors.
[0078] Step 3, bidirectional fusion attention network. After the sentence encoder and image encoder are processed, a bidirectional attention block is further proposed to capture more fine-grained multimodal database alarms. The feature vector of the database alarm entity m can be passed to the bidirectional attention block in chronological order. This greatly improves the learning efficiency and can effectively combine multimodal and its interaction information with chronological information to extract the relationship between database alarm entities, such as Figure 2 shown.
[0079] In the database alarm entity pair (m, n), the feature vector of the database alarm entity m includes the text encoder input X mt and the image encoder input X mg (The subscript t represents text, and g represents image, that is, X mt is the text feature vector of database alarm entity m, X mg is the image feature vector of database alarm entity m), the feature vector of database alarm entity n includes the text encoder input X nt and the image encoder input X ng , the expression is:
[0080] (6),
[0081] (7),
[0082] (8),
[0083] (9),
[0084] like Figure 1As shown, the bidirectional fusion attention network includes the modality representation and multimodal database alert context , where index i is used to represent {mt, mg, nt, ng}, N x and N y Respectively represent the modality representation and the number of multimodal database alarm contexts. i Indicates the input message, Y j Represents the output message. The convolution operation is used to represent the original feature X i Convert to X j|i , relative to Y j .X i Can be used to generate Y j , the process is as follows:
[0085] (10),
[0086] Among them, kernel i Represents X i Convolution kernel; bias i is the deviation value.
[0087] Implicit multimodal interaction spaceb ij You can use the input X j|i and Y j Use the following equation for dynamic update, where b ij The initial value of Y is 0. j The initial value of is a random value:
[0088] (11),
[0089] Then, N y Iterates to dynamically extract the multimodal database alert context between multiple modalities. In each iteration, the dynamic top-down coefficient C is used to explain the top-down information flow between A and B. C is used to represent the attention score of each element in B affected by the same A. The detailed process is as follows:
[0090] (12),
[0091] Different from the above process, the top-down process tends to adopt a static self-attention mechanism to simply study the explicit inter-modal interaction features between the input modalities. The detailed process is as follows:
[0092] (13),
[0093] (14),
[0094] Where atten is the top-down multimodal database alarm context; concat refers to the concatenation operation. q , W k and W v is the transformation matrix.
[0095] Specifically, the top-down explicit multimodal database alarm context atten is further transferred to the dynamic multimodal routing process, which is associated with multiple dynamic iterations. That is, the multimodal database alarm context Y can be expressed as X j|i The weighted sum of ij and top-down explicit multimodal database alert context atten. Due to the joint guidance of the bidirectional multimodal fusion process, the novel bidirectional dynamic coefficient (c ij + atten) naturally allows us to capture both implicit and explicit multimodal interactions in each iteration. The multimodal database alert context can then be dynamically updated through multiple dynamic iterations, which allows the coarser-grained multimodal database alert context to be transferred to a finer-grained context. This indeed gives the fusion model the ability to effectively extract higher-level and finer-grained multimodal database alert context. The formula for the above process is as follows:
[0096] (15),
[0097] Step 4: Perform multimodal relationship classification.
[0098] After the bidirectional attention fusion network block processing, the previous convolution operation can be applied to further aggregate the output multimodal database alert context features. The detailed process is formulated as follows:
[0099] (16),
[0100] In addition, in the present invention, the softmax classifier is used to predict the relationship between entity pairs in the text, and outputs p(re|m,n) to obtain:
[0101] (17),
[0102] (18),
[0103] Among them, contact is the concatenation function; w and b represent the parameters and bias term of the fully connected layer, respectively.
[0104] The specific process is as follows Figure 5 shown.
[0105] In the present invention, the terms database alarm, multimodal relationship extraction, bidirectional fusion, knowledge graph, etc. are explained as follows:
[0106] Database Alarm: Database alarm refers to an automatic monitoring mechanism in the database management system (DBMS) that monitors the operating status and performance indicators of the database in real time. Once an abnormal situation is detected or the performance deviates from the normal threshold, the system will automatically generate an alarm message. These alarm messages include but are not limited to hardware failures, software failures, data integrity issues, security issues, etc. The purpose of database alarms is to detect potential database problems as early as possible, so that database administrators can take timely measures to avoid data loss or system crashes, and ensure the stability and reliability of the database system.
[0107] Multimodal Relation Extraction (MRE): Multimodal Relation Extraction is an information processing technique that aims to extract relationships between entities from data containing multiple modalities. Modality refers to different forms or types of data, such as text, images, sounds, etc. In the context of database alarms, multimodal relation extraction may involve analyzing text logs and chart indicators to identify and extract correlations and causal relationships between alarm entities. This technology can help understand and interpret complex alarm situations and improve the efficiency and accuracy of alarm processing.
[0108] Bidirectional fusion: refers to the network's ability to process information in two directions: from text to image and from image to text, thereby capturing and strengthening the correlation between modalities and improving the accuracy and efficiency of data analysis by focusing on the information most relevant to the current task.
[0109] Knowledge Graph: It is a structured semantic knowledge base used to describe concepts and their relationships in the physical world in symbolic form. Its basic components are "entity-relationship-entity" triples, as well as entities and their related attribute-value pairs. Entities are connected to each other through relationships to form a network of knowledge structures.
[0110] In a specific embodiment of the present invention, the method of the present invention is applied to the power system, and the database alarm log records the status changes, faults and abnormal events of various devices. At the same time, the image data captured by the monitoring camera provides visual information of the device. By analyzing these multimodal data, problems can be diagnosed more accurately and responded to quickly.
[0111] Specific steps and results:
[0112] Step 1, data preprocessing:
[0113] Collect transformer abnormal alarm logs and monitoring images within the past hour. The parameter values are 200 alarm logs, 100 images, and each image size is 1920x1080, adjusted to 160x160 pixels. The preprocessed dataset contains 200 text records and 100 image features.
[0114] Step 2, Multimodal Encoder:
[0115] Sentence Encoder:
[0116] For example, the text in the alarm log is: "The temperature of the transformer phase A is too high, triggering the overheat alarm." Use the BERT model to encode the text sentences in the alarm log into a feature vector matrix. The parameter value is that the hidden layer dimension of the BERT model is 768. Each alarm log can be converted into a 768-dimensional feature vector matrix through the sentence encoder
[0117] Image Encoder:
[0118] The transformer is identified from the monitoring image and the overheated area is marked. The parameter value is extracted by the pre-trained CNN model. Each image is converted into a fixed-dimensional feature vector through the image encoder.
[0119] Step 3, bidirectional fusion attention network:
[0120] The text and image features are input into the bidirectional fusion attention network, and the model learns the association between "too high temperature" in the text and the overheated area of the transformer in the image. The parameter value is that the attention network contains an attention mechanism in two directions, and each direction has two attention layers. The model extracts relevant features from the text and image and fuses them into a comprehensive feature representation.
[0121] Step 4, multimodal relationship classification:
[0122] The model predicts the relationship between the alarm log and the monitoring image. The parameter value is that the softmax classifier has 5 categories, corresponding to different alarm relationships. The model predicts that the relationship is "cause", that is, "transformer A phase temperature is too high" is the reason for "triggering the overheating alarm".
[0123] Final result:
[0124] The model analyzed an alarm log and the corresponding monitoring image, successfully identified the overheating of the transformer phase A as the cause of the alarm, and accurately pointed out the overheating area in the image. The association between the keyword "overtemperature" in the alarm log and the overheating point marked in the image was identified by the model with high confidence. The operation and maintenance team received a comprehensive diagnostic report including the cause of the alarm, location, and recommended processing steps.
[0125] Technical issues solved:
[0126] 1. Rapid fault location: The model quickly identifies the overheating problem of the transformer and accurately locates it in the image.
[0127] 2. Reduce manual intervention: Automated alarm analysis reduces reliance on manual monitoring and log review.
[0128] 3. Improve diagnostic accuracy: The fusion of multimodal data improves the accuracy of fault diagnosis.
[0129] 4. Enhanced decision support: Provides a comprehensive report including alarm causes, impact scope and handling suggestions to help the operation and maintenance team respond quickly.
[0130] Specific experiments:
[0131] (1) Data preprocessing
[0132] The model of the present invention will be used in the database, and the experimental data comes from the Oracle database alarm log and equipment status images on multiple business systems (corresponding to text and time tags, and part of the monitoring video screen data intercepts fixed interval time frames as image data), with a total of 40,000 text and image logs. According to the type of entity pairs, namely, cause, accompanying, disposal, carrying and sub-event categories, the entity pairs are marked into 5 categories, represented by numbers 0, 1, 2, 3 and 4 respectively. Finally, the data set is divided into training set, verification set and test set in a ratio of 8:1:1, and an Oracle database multimodal relationship extraction experiment is carried out.
[0133] (2) Experimental setup: In this example, the hardware environment is configured with an Intel(R) Xeon(R) Gold 5218 CPU, an NVIDIA GeForce RTX 2080Ti GPU, and 64GB RAM. The software environment uses Pycharm Community 2019.2 and Pytorch 1.8.0.
[0134] In this embodiment, the output of the BERT pre-trained language model with a 12-layer network structure is used as a 768-dimensional word vector. The maximum length of the text is set to 128, the excess part is truncated, and the insufficient part is filled with 0. The filter of the convolution calculation is 32, and the kernel size is 3, 5, and 7. The specific parameter settings are shown in Table 1.
[0135] Table 1
[0136] title Convolution kernel size 3,5,7 Number of convolution kernels 32 Activation Function Rectified Linear Unit Neural layer network 3 Discard method 0.5 Optimizer Adaptive Momentum Learning Rate 0.002 Batch size 64 Round 20
[0137] (3) Baseline
[0138] In this embodiment, the model of the present invention is compared with the following baselines: Bert+BiLSTM+Tree processes the text vector mapping task through Bert and uses a tree structure in classification, which has the advantage of better handling multi-category classification tasks. SelfORE uses a pre-trained language model to adaptively cluster the relational features of contextual culture and optimizes self-supervisory information by improving the relational features. Joint constraint learning uses logical constraint rules to integrate event background knowledge for event relationship extraction. FL-MSRE uses shot less learning to extract social relationships from text and face images. HVPNeT combines hierarchical multi-scale visual features by adopting a visual prefix-based attention mechanism in each self-attention layer of BERT, thereby producing an effective and robust text representation to reduce error sensitivity.
[0139] (4) Results and analysis
[0140] Table 2 shows the multimodal database alarm entity relationship extraction results of the model of the present invention and the comparison model on the Oracle dataset.
[0141] Table 2
[0142] Model Accuracy Recall f1 score BerL+BilSTM+Tree model 61.2 63.4 63.9 Self-Test 62.1 64.2 61.9 Joint Constraint Learning 70.2 71.3 73.2 FL_MSRE model 75.1 76.2 77.2 HVPNeT Model 80.6 82.4 82.3 Self-developed model 81.5 83.7 83.4
[0143] It can be seen from the experimental results in Table 2 that the model proposed in the present invention is optimal in terms of accuracy, recall and F1 value, which fully proves the effectiveness of introducing a bidirectional fusion attention network to enhance the multimodal central relationship feature. Therefore, this embodiment uses the Stanford CoreNLP tool to sort out the syntactic structure of the sentence, helping the model to understand the contextual syntactic information in long and difficult sentences, and further obtain the semantic features of the following words in each sentence through type information. In this way, the same word can obtain different feature representations in different contexts, which plays a role in disambiguation.
[0144] As shown in Table 3, the model extracts the differences between different entity relationships. The F1 value of the "accompanying" relationship is significantly higher than that of other relationships. This is because most of the alarms generated by the Oracle database are accompanied by the phenomenon. This is because most of the alarms generated by the Oracle database are accompanied by the phenomenon. There are more entity descriptions and relationships in the alarm text and images, so the proportion of "accompanying" samples is higher, and the model has enough data for learning.
[0145] Table 3
[0146] Relationship Type Accuracy Recall f1 score reason 72.3 71.8 73.4 Accompany 82.4 82.1 85.2 deal with 72.1 73.4 72.6 carry 83.8 81.2 79.6 subevent 72.5 77.6 79.7
[0147] The present invention provides a method for extracting multimodal relations of database alarms based on deep learning. There are many methods and ways to implement the technical solution. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention. All components not specified in this embodiment can be implemented by existing technologies.
Claims
1. A database alarm multimodal relationship extraction method based on deep learning, characterized in that: The following steps are involved: Step 1, encode the text; Step 2, extracting entity feature information related to the database alarm from the image; Step 3: Establish a bidirectional fusion attention network to capture multimodal database alerts; Step 4: classify multimodal relationships; Step 1 includes: in the sentence encoder, through the BERT model, the input Oracle text sentence {w1, w2, …wt} generates a feature vector matrix V, which is expressed as: , Where t is the sequence length, wt is the tth word in the input Oracle text sentence, and the matrix V represents the set of feature vectors extracted from the text data. Each row represents a cls tag or a word in the sequence converted into a feature vector, and each vector is 768 dimensions long; cls t Indicates the starting tag of the tth sentence, seq t Indicates the tth sentence end tag, V t*768 represents the element in the tth row and the 768th column. Each input sentence is converted into a feature vector matrix through the BERT model; Step 2 includes: in the image encoder, using the database warning identifier based on the visual knowledge retriever to identify the database warning entity information in the image: given an image containing a database warning entity a, obtain the corresponding entity feature representation f a and the feature representation f of the i-th other database warning entity contained in the image i , defined as: (1), (2), where g a The geometric parameters of the image region to be cropped, b a represents the clipping boundary or reference area; g i represents the bounding box coordinates of a candidate region, b i Represents a bounding box coordinate g i Related area; crop(g e , b e ) represents the geometric parameter g e The image is cropped to the bounding box and resized to 160 × 160 pixels, with parameters e ∈ {a, i}, represents a fully connected network; Step 2 also includes: In the image encoder, adding a fully connected layer and a batch normalization layer to obtain the final features of the two database alarm entities: vector h a and vector h i Used to replace the entity feature representation f a and f i To represent the final characteristics of the database alarm device entity: (3), (4), Where BatchNorm represents batch normalization, W2 and W3 are trainable matrices; b2 and b3 are trainable parameters; Finally, the entity feature h a and vector h i Use L2 normalization and concatenate them to get the final vector of database alarm entity features : (5), Where L2Norm is the L2 norm; [;] represents the concatenation of two vectors; Step 3 includes: passing the feature vectors of the database alarm entities to the bidirectional fusion attention network in chronological order: In the database alarm entity pair (m, n), the feature vector of the database alarm entity m includes the text encoder input X mt and the image encoder input X mg , the feature vector of database alarm entity n includes the text encoder input X nt and the image encoder input X ng , the expression is: (6), (7), (8), (9), Among them, h m The image encoder input X represents the database alarm entity m mg The processed feature vector, F mi The image encoder input X represents the database alarm entity m mg The i-th eigenvector of ; i represents the amount of input information; h n The image encoder input X represents the database alarm entity n ng The processed feature vector, F ni The image encoder input X represents the database alarm entity n ng The i-th eigenvector of ; Step 3 also includes: the bidirectional fusion attention network includes a modality representation and multimodal database alert context , where index k is used to represent {mt, mg, nt, ng}, mt represents the text t of database alarm entity m, mg represents the image g of database alarm entity m, nt represents the text t of database alarm entity n, and ng represents the image g of database alarm entity n; N x Indicates the number of modal representations; N y Indicates the number of multimodal database alarm contexts; X i Indicates the input message, Y i Represents output message; The convolution operation is used to transform the input message X i Convert to X j|i : (10), Among them, X j|i Represents a subset selected from a large feature set; Conv is a convolution operation, sigmoid is an activation function; kernel i Represents the input message X i Convolution kernel; bias i is the deviation value; Implicit multimodal interaction spaceb ij The following formula is used for dynamic update, where the implicit multimodal interaction space b ij The initial value of is 0, and the initial value of the alarm context is a random value: (11), Then, N y Iterates to dynamically extract the multimodal database alarm context between multiple modalities. In each iteration, the dynamic top-down coefficient C is used to explain the top-down information flow between A and B, expressed as: (12), Among them, c ij represents the importance or selection probability of the ith element relative to the jth element under given conditions, b ij A vector representing the implicit multimodal interaction space; Represents a series of weight values obtained after processing by the softmax function; exp is the natural exponential function; Softmax is an activation function used to ensure that the sum of all attention weights is 1. The top-down process uses a static self-attention mechanism, which is expressed as: (13), (14), in Represents the corresponding input vector 1, 2... to N x dimensional vector; X is Input vectors in different spaces; atten is the top-down multimodal database alarm context; concat refers to the concatenation operation; W q , W k and W v is the transformation matrix, T represents the matrix transpose; In step 3, the top-down explicit multimodal database alarm context atten is further transferred to the dynamic multimodal routing process through the bidirectional dynamic coefficient (c ij + atten) allows capturing implicit and explicit multimodal interactions simultaneously in each iteration, dynamically updating the multimodal database alert context Y through dynamic iteration j , expressed as: (15), Each alarm context Y j There are i inputs, X j|i Represents the corresponding alarm context Y j The i-th input of Step 4 includes: applying convolution operation after bidirectional fusion attention network processing to further aggregate the output multimodal database alert context features: (16), in, It represents the output of the pth group of data after the convolution operation and the sigmoid activation function; The softmax classifier is used to predict the relationship between entity pairs in the text and output p(re|m,n): (17), (18), Among them, contact is a concatenation function, O is a comprehensive feature vector or feature map obtained by the connection operation, relu is an activation function; w and b represent the parameters and bias terms of the fully connected layer respectively, and p(re|m,n) represents the probability distribution of the final output.
Citation Information
Patent Citations
Video recommendation method based on multi-modal video content and multi-task learning
CN111246256A
Multi-modal data fusion method based on compound collaborative structure feature recombination network
CN113378989A
Lycium barbarum insect pest recognition method based on image-text multi-modal feature fusion
CN116563707A
