A database abnormal event knowledge extraction method and system based on trigger saliency attribution

By employing a database anomaly event knowledge extraction method that triggers saliency attribution and attention mechanisms, and designing models for different event types, the method addresses the problem of imbalanced extraction in existing technologies, achieving more accurate and consistent event extraction.

CN117312555BActive Publication Date: 2025-12-26STATE GRID INFORMATION & TELECOMM BRANCH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311133210.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-04
Publication Date
2025-12-26
Estimated Expiration
2043-09-04

AI Technical Summary

Technical Problem

Existing database anomaly event extraction technologies suffer from performance imbalances across different event types, leading to inconsistent extraction results.

Method used

We employ a trigger-based saliency attribution and attention mechanism approach. By processing the word vectors output by the model through saliency evaluation and attention mechanism, we extract trigger words and contextual saliency events, and design and optimize models for different event types.

Benefits of technology

It solves the problem of performance imbalance in extraction for different event types, and improves the accuracy and consistency of event extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117312555B_ABST
    Figure CN117312555B_ABST
Patent Text Reader

Abstract

The application discloses a database abnormal event knowledge extraction method and system based on trigger saliency attribution, the method comprises the following steps: acquiring database system log text data and carrying out data preprocessing; constructing an event type set; performing sentence-level event classification on the database system log text data; performing saliency evaluation on each word of the input sentence of the database system log text data; performing event type saliency evaluation on the input sentence, and performing event classification; triggering a word saliency event extraction model; a context saliency event extraction model; extracting the trigger word by adopting an attention mechanism processing model output word vector; the system comprises a data preprocessing module, a data classification module, a saliency evaluation module and a data extraction module. The application solves the problem of unbalanced event extraction performance of different event types in other models.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the field of database operation and maintenance, and in particular to a database abnormal event knowledge extraction method and system based on trigger saliency attribution and attention mechanism. BACKGROUND

[0002] Since the development of pre-training language models, event extraction technology has been widely researched and applied. The joint event extraction framework JMEE uses syntactic trees to enhance the information flow in sentences, and uses graph convolution networks and self-attention mechanisms to aggregate trigger and argument element information to achieve joint event extraction. The information extraction joint neural model with global features uses bidirectional RNN to learn word embeddings, and constructs a cross-graph after encoding the sentence through BERT. Word embedding event extraction is completed by integrating adjacent context information and passing it to FCN and a softmax-based classifier to perform all tasks. The local scores of trigger words and argument elements in the input information are calculated through BERT embedding and an FCN-based classifier. Then, the optimal result is obtained by representing the dependency relationship between the trigger words and the arguments through the score. The event extraction model for answering natural questions proposes a new event extraction paradigm, formulating the event extraction process as a question-answering task to extract event parameters in an end-to-end manner. In addition, event parameters can also be extracted for characters that do not appear in training.

[0003] The event extraction model uses entity information as a question-answering task, thereby converting the event extraction task into a question-answering problem with multiple answer possibilities and entity support. Based on a pre-trained and fine-tuned language model, the method adds different levels of labeled entities, entity positions, entity types, and finally argument roles in the input context. Existing event extraction techniques mostly use a model suitable for extracting all event types, which causes the problem of uneven event extraction results for different event types. SUMMARY

[0004] The purpose of the present application is to provide an event extraction method based on trigger saliency attribution and attention mechanism. Another purpose of the present application is to provide an event extraction system.

[0005] Technical solution: The event extraction method based on trigger saliency attribution comprises the following steps:

[0006] (1) Obtain database system log text data and perform data preprocessing;

[0007] (2) Construct an event type set;

[0008] (3) Perform sentence-level event classification on the database system log text data;

[0009] (4) Perform saliency evaluation on each word of the input sentence of the database system log text data;

[0010] (5) Evaluate the significance of event types in the input sentences and classify the events;

[0011] (6) Trigger word saliency event extraction model;

[0012] (7) Contextual saliency event extraction model;

[0013] (8) Use attention mechanism to process the word vectors output by the model to extract trigger words.

[0014] Furthermore, in step (3), a BERT-based sentence classifier is used, and multi-label binary cross-entropy loss is employed for optimization, as shown in the following formula:

[0015]

[0016] Among them, X s It is the input embedding of sentence s in BERT, o s This represents the logits vector calculated by the classifier. o s The i-th element.

[0017] Further, step (4) classifies based on a sentence-level classifier. To predict sentences, a comprehensive gradient is used to calculate the saliency value of each word, the loss function is used as the desired model, and ω is calculated. i The significance of x and its BERT feature representation i ∈X s The calculation formula is as follows:

[0018]

[0019] in, Describe F(x) to x i The gradient of X′, where X′ is the sequence of all zero vectors, x′ i Represent the i-th element in X′; use the one-hot encoding of T instead of G. s To conduct an evaluation, using Represents ω i Relative to the word-level salience of event type T, if the sentence does not describe any event of type T, then

[0020] Furthermore, in step (5), based on the word significance values ​​obtained from all sentences s involved in a certain event type T, the type-level significance value of the event type T is calculated using the following formula:

[0021]

[0022] where (s, Y s ) is the range over each training instance; {ω i |y i = T} is a set containing all trigger words of event type T in s, QT represents the sum of all training instance saliency values of event type T, and SL(T) indicates whether event type T is more focused on trigger words or context.

[0023] Further, the step (8) uses a cross-entropy optimization loss function to train the trigger saliency event extraction model by minimizing the following loss:

[0024]

[0025] where (s, Y s ) is the range over each training instance; (ω i , y i ) is the range over each pair of words and its basic fact event label; P(y i |ω i ) represents the conditional probability of the model predicting y i for ω i , and the attention mechanism is used to consider different weight parameters for the word vector of each word in the output, so as to pay more attention to the part similar to trigger saliency and suppress other useless information, and the formula is as follows:

[0026]

[0027] where c i represents the word vector obtained by summing the output information attention weight after the intermediate semantic vector of the current time h j is the hidden vector of the jth word output by the BERT model, and α ij represents the attention size of the ith word on the jth word on the encoding side.

[0028] The database abnormal event knowledge extraction system based on trigger saliency attribution comprises:

[0029] A data preprocessing module is configured to preprocess the obtained database system log text data;

[0030] A data classification module is configured to perform sentence-level event classification on the database system log text data;

[0031] A saliency evaluation module is configured to evaluate the saliency of each word in the input sentence of the database system log text data;

[0032] The data extraction module is used for extracting trigger words by adopting an attention mechanism to process word vectors output by the model.

[0033] Further, the data preprocessing module pre-processes the obtained database system log text data, including removing unnecessary fields, inconsistent formats, using a natural language processing tool Stanfordnlp to perform text segmentation and entity information labeling on the data, labeling alarm information and event information such as abnormal phenomena, abnormal reasons and disposal strategies, and obtaining an event extraction dataset.

[0034] Further, the data classification module gives an input sentence s a sentence-level event label G s The label is G s =[g1, g2,..., g |T| ], wherein g i indicates whether the trigger word of the i-th event type is contained in s, a BERT-based sentence classifier is designed, and a multi-label binary cross-entropy loss is used for optimization.

[0035] Further, the significance evaluation module creates a separate event extraction model, so that the models are all implemented using the BERT architecture, and given a sentence s, it performs word-by-word classification on the output of BERT to generate a label sequence: Y s =(y1, y2,..., y N ), wherein y i is the predicted event label of omega i , different event extraction methods are designed based on different features of trigger word significance and context significance to facilitate learning.

[0036] Further, the data extraction module combines the results of the two models after processing the word vectors corresponding to each word in the input sentence s obtained through steps (6) and (7) using an attention mechanism, and finally predicts the event type, if there is ambiguity, i.e., the same trigger word is predicted by the two ED models as different event types, the type with higher probability in the training set is used as the result, and the cross-entropy loss function is used for optimization during the training process.

[0037] Advantages: Compared with the prior art, the present application has the following significant advantages: different event types have different dependence on trigger words, two models for trigger word significance and context significance are designed for event extraction, and the problem of unbalanced event extraction performance of different event types in other models is solved. BRIEF DESCRIPTION OF DRAWINGS

[0038] Figure 1 The flowchart of the present application;

[0039] Figure 2 Trigger salience event extraction model schematic diagram;

[0040] Figure 3 Trigger salience assessment model schematic diagram;

[0041] Figure 4 Context salience event extraction model schematic diagram. DETAILED DESCRIPTION

[0042] The technical solutions of the present application will be further described below in combination with the drawings.

[0043] As Figure 1 shown, the database anomaly event knowledge extraction method based on trigger salience attribution provided by the present application comprises the following steps:

[0044] (1) Obtain database system log text data and perform data preprocessing; obtain ten thousand text data of alarm log records in Oracle databases on multiple business systems for more than ten years. Annotate the alarm information and event information of abnormal phenomena, abnormal reasons and disposal strategies, and obtain an event extraction data set. Collect the annotated event types in step one, and obtain an event type sequence column T, such as: T = {Soff Hard ware Fault, Setting Fault, Machine Setting, Index Fault, Log Fault, Operate,...}.

[0045] (2) Construct an event type set;

[0046] (3) Perform sentence-level event classification on the database system log text data; give an input sentence s a sentence-level event label G s , which represents the entire event semantics. The label is G s = [g1, g2,..., g|T|] ∈ R |T| , where g i ∈ {0, 1} indicates whether the trigger word of the i-th event type is contained in s. Subsequently, a BERT-based sentence classifier is designed, and a multi-label binary cross-entropy loss is used for optimization, aiming to learn the mapping from s to G s . For example, the G s of "close the database link or pointer of the session" is {0, 0, 0, 0, 0, 1,...}, and the G s of "error string of log read redo" is {0, 1, 0, 0, 0, 0,...}.

[0047] (4) Significance evaluation of each word in the input sentence of the database system log text data; the integrated gradient is used to calculate the significance value of each word. For example, the significance evaluation process of "close the database link or pointer of the session" and "the string of log read error of redo" is shown in Figure 3 , the corresponding event type of the trigger word close is Operate, and the corresponding event type of the trigger word read is Setting Fault.

[0048] (5) Event type significance evaluation and event classification of the input sentence; based on the significance value of the word, the type-level significance value SL(T) of the event type T is calculated according to the significance value of the trigger word in all sentences of the event type T. According to the result, all event types are divided into a trigger word significance event type set Ttrigger={T|SL(T)≥λ} and a context significance event type set Tcontext={T|SL(T)<λ}. For example, according to the word significance score of all sentences of Operate similar to "close the database link or pointer of the session", it is classified into a trigger word significance event type; according to the word significance score of all sentences of Setting Fault similar to "the string of log read error of redo", it is classified into a context significance event type

[0049] (6) Trigger word significance event extraction model;

[0050] (7) Context significance event extraction model; the word significance value in step 4 is embedded into the model input of the sentence s by using the word significance embedding mechanism (WSEs). First, the significance value of each word is quantified as 0 or 1 based on λ (the threshold used to distinguish event types before), and then a separate embedding vector is used to distinguish 0 and 1, similar to word embedding. Such embedding is combined into the BERT model to capture the rule that words with high significance value are more likely to be triggered. For example, the processing process of "close the database link or pointer of the session" in the trigger word significance model is shown in Figure 2 ; the processing process of "the string of log read error of redo" in the context significance model is shown in Figure 4 .

[0051] (8) Extract the trigger word by using the attention mechanism to process the word vector output by the model; the output word vector is added with weight processing by using the attention mechanism, so that the word with high trigger significance has better weight for the prediction of the trigger word afterwards.

[0052] In step (3), the BERT-based sentence classifier is used, and the multi-label binary cross-entropy loss is used for optimization, and the specific formula is:

[0053] Among them, X s It is the input embedding of sentence s in BERT, o s This represents the logits vector calculated by the classifier. o s The i-th element.

[0054] Further, step (4) classifies based on a sentence-level classifier. To predict sentences, a comprehensive gradient is used to calculate the saliency value of each word, the loss function is used as the desired model, and ω is calculated. i The significance of x and its BERT feature representation i ∈X s The calculation formula is as follows:

[0055]

[0056] in, Describe F(x) to x i The gradient of X′, where X′ is the sequence of all zero vectors, x′ i This represents the i-th element in X′; subsequently, it is normalized to a scalar value through sentence-by-sentence normalization.

[0057]

[0058] Where || represents the L2 norm. During the calculation, the semantic relationship of a word to the general event G is not considered. s It is not about the salience of events, but about a specific type of event. Therefore, we use the one-hot encoding of T instead of G. s To conduct an evaluation, using Represents ω i Relative to the word-level salience of event type T, if the sentence does not describe any event of type T, then

[0059] Furthermore, in step (5), based on the word significance values ​​obtained from all sentences s involved in a certain event type T, the type-level significance value of the event type T is calculated using the following formula:

[0060]

[0061] Where (s, Y) s The range over each training instance; {ω i |y i =T} is a set containing trigger words for all event types T in s, and SL(T) indicates whether event type T is more dependent on trigger words or context.

[0062] Further, the cross-entropy optimization loss function is used in the step (8), and the trigger saliency event extraction model is trained by minimizing the following loss:

[0063] where (s, Y s ) refers to each training instance; (ω i , y i ) ranges over each pair of words and its basic fact event label; P(y i |ω i ) represents the conditional probability of the model predicting y i for ω i , and the attention mechanism is adopted to consider different weight parameters for the word vector of each word in the output, so as to pay more attention to the part similar to the trigger saliency and suppress other useless information, and the formula is: where c i represents the word vector obtained by adding the attention weight of the output information to the intermediate semantic vector of the current time, h j is the hidden vector of the jth word output by the BERT model, and α ij represents the attention size of the ith word at the decoding end to the jth word at the encoding end.

Claims

1. A database anomaly event knowledge extraction method based on trigger saliency attribution, characterized in that, It comprises the following steps: (1) obtaining database system log text data and performing data preprocessing; (2) constructing an event type set; (3) performing sentence-level event classification on the database system log text data; (4) performing significance evaluation on each word of the input sentence of the database system log text data; (5) performing event type significance evaluation on the input sentence and performing event classification; (6) trigger word significance event extraction model; (7) context significance event extraction model; (8) extracting trigger words using attention mechanism processing model output word vectors; In step (3), a BERT-based sentence classifier is used, and a multi-label binary cross-entropy loss is used for optimization, and the specific formula is as follows: ; where X s is the input embedding of sentence s in BERT, o s denotes the logits vector computed by the classifier, denotes the i-th element of o s . The step (4) classifies based on a sentence-level classifier, in order to predict a sentence, uses a comprehensive gradient to calculate a significance value of each word, uses a loss function as a required model, and calculates the significance of the sentence and its BERT feature representation x i ∈X s The calculation formula is as follows: ; wherein, denotes to the gradient of, is a sequence of all zero vectors, denotes the i-th element in ; replace G with one-hot encoding representation of T s is evaluated, with denotes word-level saliency with respect to event type T, if the sentence does not describe any T-type event, = 0; In step (5), the type-level significance value of an event type T is calculated according to the word significance value of all sentences s related to the event type T, and the calculation formula is as follows: ; where (s, Y s ) is the range on each training instance; |y i = T} is a set containing all trigger words for event type T in s, Q T represents the sum of all training instance saliency values for event type T, and SL(T) indicates whether event type T is more trigger-dependent or context-dependent.

2. The database anomaly event knowledge extraction method based on trigger saliency attribution according to claim 1, characterized in that, In step (8), the cross-entropy optimization loss function is used, and the trigger word significance event extraction model is trained by minimizing the following loss: ; Where (s, Y) s ) refers to each training instance; y i The range of each pair of words and its underlying factual event label; P(y i | ) indicates model prediction of y i The conditional probability is calculated by using an attention mechanism to consider different weight parameters for the word vector of each word in the output, thereby paying more attention to the parts that are similar to the trigger significance and suppressing other useless information. The formula is as follows: ; where c i represents the word vector obtained after the intermediate semantic vector of the current time point is added to the output information attention weighted sum, h j is the hidden vector of the jth word output by the BERT model, α ij represents the attention size of the ith word on the decoding end to the jth word on the encoding end.

3. A database anomaly event knowledge extraction system based on trigger saliency attribution, implemented by the method of any one of claims 1-2, characterized in that, It comprises: A data preprocessing module for preprocessing the obtained database system log text data; A data classification module for performing sentence-level event classification on the database system log text data; A significance evaluation module for evaluating the significance of each word of the input sentence of the database system log text data; A data extraction module for extracting trigger words using attention mechanism processing model output word vectors.

4. The trigger salience attribution based database anomaly event knowledge extraction system of claim 3, wherein, The data preprocessing module preprocesses the obtained database system log text data, including removing unnecessary fields, inconsistent formats, using natural language processing tool Stanfordnlp for text segmentation and entity information annotation, and annotating abnormal phenomena, abnormal reasons, disposal strategies, alarm information and event information to obtain event extraction dataset.

5. The trigger salience attribution based database anomaly event knowledge extraction system of claim 3, wherein, The data classification module gives an input sentence s a sentence-level event label G s , the label is G s =[g1, g2, …, g |T| ], where g i indicates whether the trigger word of the i-th event type is contained in s, a BERT-based sentence classifier is designed, and a multi-label binary cross-entropy loss is used for optimization.

6. The trigger salience attribution based database anomaly event knowledge extraction system of claim 3, wherein, The significance evaluation module creates separate event extraction models, all of which are implemented using the BERT architecture, and given a sentence s, it performs a word-by-word classification on the output of BERT to generate a label sequence: Y s = (y1, y2, ···, y N ), where y i is the predicted event label of , different event extraction methods are designed based on different features of trigger word significance and context significance to facilitate learning.

7. The trigger salience attribution based database anomaly event knowledge extraction system of claim 3, wherein, The data extraction module combines the results of the two models after attention mechanism processing of the word vectors corresponding to each word in the input sentence s obtained through steps (6) and (7) to finally predict the event type. If there is ambiguity, that is, the same trigger word is predicted by the two ED models as different event types, the type with higher probability in the training set is used as the result. Cross-entropy loss function is used for optimization during training.

Citation Information

Patent Citations

  • Event trigger word extraction method based on document level attention mechanism

    CN108829801A

  • Joint event extraction method based on affair logic

    CN116383387A