Intelligent equipment fault information extraction method based on multi-semantic knowledge interaction and dynamic pruning
By adopting multi-semantic knowledge interaction and dynamic pruning technology in the extraction of intelligent equipment failure information, the problem of lack of deep semantic interaction and information interference processing in the existing methods is solved, and more efficient and accurate relationship extraction is achieved.
Patent Information
- Application Number
- CN202510133202.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-06
- Publication Date
- 2025-05-30
AI Technical Summary
The existing relationship extraction methods lack deep semantic interactions, fail to fully explore deep semantic relationships between entities, and are difficult to flexibly cope with information interference in different scenarios, resulting in waste of computing resources and inefficiency.
The intelligent equipment fault information extraction method based on multi-semantic knowledge interaction and dynamic pruning is adopted, and word embedding representation is obtained through the pre-trained language model RoBERTa, a fault type knowledge base is constructed, a semantic interaction module is designed, and the semantic representation is enhanced. The dot-product attention mechanism is used for dynamic pruning, focusing on core statements, and computing efficiency is improved.
It significantly enhances the semantic connection between the fault entity and the fault type, improves the accuracy and efficiency of relationship extraction, reduces interference from irrelevant information, and is suitable for large-scale text processing.
Smart Images

Figure CN120068877A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing, and particularly relates to an intelligent equipment fault information extraction method based on multi-semantic knowledge interaction and dynamic pruning. Background Art
[0002] In the fault diagnosis of intelligent equipment, relation extraction is an important link in constructing an intelligent fault diagnosis system, a knowledge graph, and making intelligent decisions. Fault information extraction usually requires identifying and extracting key fault entities in the equipment (such as fault types, fault components, occurrence time, etc.) and the relationships between these entities.
[0003] Existing relation extraction methods still face some challenges. For example, there is a lack of deep semantic interaction. Existing methods often rely only on surface features for information extraction and fail to fully explore the deep semantic associations between entities. For example, the relationship between the equipment fault type and the fault entity may exhibit different semantic meanings in different context environments, which poses a high requirement for the accuracy of extraction. At the same time, there is also the problem of noise information interference. Fault texts often contain a large amount of irrelevant information, such as lengthy background descriptions, irrelevant sentences, etc. These information will interfere with the accuracy of relation extraction. Existing methods often adopt fixed rules or models when dealing with this noise information and are difficult to flexibly handle information interference in different scenarios. Finally, traditional relation extraction methods often perform full-scale processing on the text during the relation extraction process, ignoring the differences and importance of information in the text, resulting in waste of computing resources and low efficiency. Especially when dealing with large-scale texts, the efficiency problem is particularly prominent. Summary of the Invention
[0004] Object of the Invention: Aiming at the above problems, the present invention aims to provide an intelligent equipment fault information extraction method based on multi-semantic knowledge interaction and dynamic pruning, which combines multi-semantic knowledge interaction and dynamic pruning to improve the feature extraction model and enhance the accuracy and efficiency of recognition.
[0005] Technical Solution: The present invention proposes an intelligent equipment fault information extraction method based on multi-semantic knowledge interaction and dynamic pruning, including the following steps:
[0006] Step 1: Perform word segmentation and sentence splitting preprocessing on the equipment fault text to obtain a sentence set S;
[0007] Step 2: Use the pre-trained language model RoBERTa to obtain a character-level word embedding representation set E of the text;
[0008] Step 3: Construct a fault type knowledge base based on the extracted fault types, including fault types and their descriptive template vectors; extract the fault entity representation F ent , and extract the fault type representation F based on the fault type knowledge basetype , design a semantic interaction module to construct the representation of the fault entity \(F\) ent and the representation of the fault type \(F\) type to obtain the enhanced semantic representation \(F'\);
[0009] Step 4: Based on the dot product attention mechanism, analyze the correlation scores between the enhanced semantic representation \(F'\) and the set of original text sentences \(S\), dynamically select the core sentence set \(S'\) according to the scores, prune the irrelevant sentences to obtain the core sentence set \(S'\), and update the semantic representation \(F'\) to the focused semantic representation \(F''\) based on the core sentence set \(S'\),
[0010] Step 5: Input the focused semantic representation \(F''\) into the relation classification module to predict the relation type between entity pairs;
[0011] Step 6: Based on sequence annotation, decode and output the named entity boundaries and relation labels to obtain the final relation extraction result.
[0012] Furthermore, the specific method of Step 1 is as follows:
[0013] Step 1.1: Segment the input original equipment fault text corpus to obtain the vocabulary sequence set \(W = \{w 1 , w 2 , \cdots, w n \}\), where \(w i \) is the \(i\)-th vocabulary sequence;
[0014] Step 1.2: For each vocabulary sequence \(w i \), use the rule-based sentence segmentation tool NLTK to split it into a sentence sequence to obtain the sentence candidate set \(S i ;\)
[0015] Step 1.3: Filter the sentences in all sentence candidate sets \(T = \{S 1 , S 2 , \cdots, S n \}\) by length, and only retain the sentences within the specified length range to obtain the filtered sentence set;
[0016] Step 1.4: Further filter out the obviously incomplete or meaningless sentences from the filtered sentence set based on the domain corpus and sentence splitting rules to obtain the final sentence set \(S = \{s 1 , s 2 , \cdots, s p \}\);
[0017] Step 1.5: For each sentence \(s j \) in the sentence set \(S\), extract its context information for subsequent semantic modeling and extraction.
[0018] Furthermore, the specific method of step 2 is as follows:
[0019] Step 2.1: Construct the input data of the RoBERTa model. For each sentence s j ∈ S, add the special token [CLS] at the beginning of the sentence and add the [SEP] token at the end of the sentence;
[0020] Step 2.2: Convert each word into the corresponding token index sequence according to the RoBERTa vocabulary, and pad the input to make the input length uniformly the preset maximum length;
[0021] Step 2.3: Input the constructed input data into the Embedding layer of the RoBERTa model to obtain the initial representation;
[0022] Step 2.4: Input the initial representation into the Transformer layer of RoBERTa for encoding to obtain the contextualized character vector sequence;
[0023] Step 2.5: Extract the d-dimensional word embedding vectors corresponding to each character in the original text from the contextualized character vector sequence;
[0024] Step 2.6: Concatenate the character word embeddings corresponding to all s j to obtain the set of character-level word embedding representations E = {e 1 , e 2 ,..., e N}, where e i is the d-dimensional word vector of the i-th character.
[0025] Furthermore, the specific method of step 3 is as follows:
[0026] Step 3.1: Based on the word embedding representation set E, use the named entity recognition model to extract the fault entity representation F ent ;
[0027] Step 3.2: Based on the fault type knowledge base, extract the fault type representation F type ;
[0028] Step 3.2.1: For each character word vector e i ∈ E, calculate its similarity with the descriptive template vector in the fault type knowledge base;
[0029] Step 3.2.2: If the similarity exceeds the threshold, it is considered that e i corresponds to the fault type, and extract F type according to the description;
[0030] Step 3.3: Design a semantic interaction module to construct F ent and Ftype The semantic association between;
[0031] Step 3.3.1: Concatenate F ent , F type and E as the input of the semantic interaction module;
[0032] Step 3.3.2: Use the Transformer-based interaction layer to learn the relationships between semantic units through Self-Attention;
[0033] Step 3.3.3: Perform a residual connection on the output of the Transformer and further fuse the context information through a feed-forward network;
[0034] Step 3.3.4: Output the enhanced semantic representation F' = {F' ent , F' type}, where F' ent , F' type are the enhanced entity and type representations respectively.
[0035] Furthermore, the specific method of step 4 is as follows:
[0036] Step 4.1: Analyze the correlation score between the enhanced semantic representation F' and the set of original text sentences S, specifically:
[0037] Step 4.1.1: Take the generated enhanced semantic representation F' = {F' ent , F' type} and the set of original text sentences S = {s 1 , s 2 ,..., s q} as the input;
[0038] Step 4.1.2: Perform a linear transformation on each s i in F' and S to get F” = W F F', s' i = W S s i , where and are trainable weight matrices;
[0039] Step 4.1.3: Design a dot product attention mechanism to calculate the dot product between the enhanced semantic representation F” and each sentence representation s' i to obtain the unnormalized correlation score score(F', s i ) = F”s' i ;
[0040] Step 4.1.4: Use the softmax function to normalize the scores of all sentences to obtain the correlation score
[0041] Step 4.2: Obtain the semantic relevance score set α = {α 1 α 2 ,..., α q}. According to the distribution of the semantic relevance score α i , set a dynamic pruning threshold τ, and dynamically adjust the threshold based on the statistical characteristics of the scores. Specifically:
[0042] Step 4.2.1: Divide the score set α into b intervals, and count the number of scores P k in each interval, where k = 1, 2,..., b;
[0043] Step 4.2.2: Calculate the entropy of the score distribution The larger the entropy value H(α), the more uniform the score distribution and the greater the amount of information;
[0044] Step 4.2.3: Find the score interval [τ low , τ high when the entropy value is the largest, and select the median in the maximum entropy interval as the dynamic pruning threshold
[0045] Step 4.3: For each statement in the original text statement set S, if its relevance score α i ≥ τ, then add it to the core statement set S';
[0046] Step 4.4: Prune the statements outside the core statement set S', and generate the core statement set S' = {s' 1 , s' 2 ,..., s' q};
[0047] Step 4.5: Use the core statement set S' to update the enhanced semantic representation F', and obtain the focused semantic representation F''.
[0048] Furthermore, the specific method of the said Step 5 is:
[0049] Step 5.1: Use the focused semantic representation F” generated in Step 4 as the input of the relation classification module;
[0050] Step 5.2: Add the representation of the core statement set S' = {s' 1 , s' 2 ,..., s' q} to the input features to supplement the context information;
[0051] Step 5.3: Combine each pair of entities in the core statement S' to form entity pairs (e i , ej ) and combine its feature representation F” ei and F” ej , construct the semantic representation F” of the entity pair pair = [F” ei ; F” ej ; F” content , where [;] represents the vector concatenation operation, and F” content is the context semantic representation of the entity pair;
[0052] Step 5.4: Design the relation classification module, specifically:
[0053] Step 5.4.1: Use the multi-head attention mechanism to enhance the entity pair representation F” pair , capture the global interaction relationship F” between the entity pair and the context att ;
[0054] Step 5.4.2: Perform residual connection and normalization processing on the attention output F” norm ;
[0055] Step 5.4.3: Input the features F” output by the attention layer norm into the feed-forward neural network for non-linear transformation F” fusion ;
[0056] Step 5.4.4: Use the fully connected layer to perform relation classification prediction P on the fused features F” fusion ;
[0057] Step 5.5: For each entity pair, use the maximum probability principle to select the most likely relation category as the prediction result
[0058] Step 5.6: Match the predicted relation of each entity pair with its original text position to generate the structured relation extraction result Result.
[0059] Furthermore, the specific method of step 6 is as follows:
[0060] Step 6.1: Use the relation classification result generated in step 5 and the core statement set S’ as input data;
[0061] Step 6.2: For the predicted relation type of each pair of entities, append the relation type label to the sequence annotation to generate the extended label set S label = {B-r, I-r, O};
[0062] Step 6.3: Construct a linear-chain conditional random field and define the conditional probability;
[0063] Step 6.4: Use the Viterbi algorithm to decode the conditional random field model and solve for the optimal label sequence y * ;
[0064] Step 6.5: According to the optimal label sequence y obtained by decoding * , extract the boundary information of each entity;
[0065] Step 6.6: Generate the structured relation extraction output Output, including the start position, end position and type of each entity, the relation type between each pair of entities and its context position.
[0066] Beneficial effects:
[0067] Through the multi-semantic knowledge interaction module, the present invention enhances the semantic connection between fault entities and fault types, ensuring more accurate relation extraction. Through the dynamic pruning strategy, it focuses on the statements most relevant to relation extraction, reduces the interference of irrelevant information, thereby improving the computational efficiency, especially suitable for the processing of large-scale texts. This method has strong adaptability and can flexibly adjust the pruning strategy and semantic modeling method according to different text characteristics, and is applicable to fault diagnosis of intelligent equipment in different fields.
[0068] 1. Through the improved semantic interaction model, the present invention extracts semantic knowledge representations such as fault entities and fault types from the word embedding representation, and designs a semantic interaction module to construct deep semantic associations between them. This innovation significantly enhances the model's ability to understand context and improves the accuracy of information extraction. Introduction of domain knowledge: The semantic representation is enhanced through the domain knowledge base, which is an extension of the conventional pre-trained model, enabling the model to perform better in specific domain tasks. By directly assisting the extraction of task-related semantic units through domain knowledge matching, the model's complete dependence on context is reduced.
[0069] 2. Refinement of the semantic interaction module: The present invention has done a lot of preparatory work before designing the semantic interaction module, independently representing multi-level information such as entities, types, and contexts from the word embedding representation, and fusing these representations. This way can more effectively capture task-related semantic associations. The semantic interaction module directly targets the fault relation extraction task and further optimizes the context modeling ability of the semantic representation through residual connections and feed-forward networks.
[0070] 3. The present invention introduces a dynamic pruning mechanism, which uses the attention mechanism to dynamically select core sentences, prune irrelevant sentences, and focus on core information. This mechanism not only reduces the interference of redundant information but also improves the efficiency of information extraction. The pruning threshold of this application is not fixed but is dynamically adjusted based on the distribution of semantic relevance scores. This dynamic adjustment strategy can better adapt to the semantic characteristics of different texts and reduce the mispruning of key information. Traditional pruning is mostly used for model lightweighting, while the purpose of pruning in the present invention is not simply to reduce the computational amount but to screen out the set of core sentences most relevant to the relation extraction task through pruning, calculate the relevance score of each sentence with the enhanced semantic representation through the attention mechanism, and only retain the sentences with high relevance.
[0071] 4. The present invention adopts advanced technologies such as pre-trained language models, multi-semantic knowledge interaction, residual connection, and normalization processing to construct an efficient and robust fault information extraction model. The introduction of these technologies enables the model to exhibit more excellent performance when dealing with the fault relation extraction task in complex contexts. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 is the overall flowchart of the intelligent equipment fault information extraction method based on multi-semantic knowledge interaction and dynamic pruning;
[0073] Figure 2 is the flowchart of the method for obtaining character-level word embedding representations;
[0074] Figure 3 is the flowchart of the method for obtaining multi-semantic knowledge representations;
[0075] Figure 4 is the flowchart of dynamic pruning;
[0076] Figure 5 is the flowchart of relation prediction. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0077] The following further clarifies the present invention in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. After reading the present invention, various equivalent forms of modification by those skilled in the art fall within the scope defined by the appended claims of this application.
[0078] The present invention discloses an intelligent equipment fault information extraction method based on multi-semantic knowledge interaction and dynamic pruning, which specifically includes the following steps:
[0079] Step 1: Perform word segmentation and sentence splitting preprocessing on the equipment fault text to obtain a set of sentences. The specific method is as follows:
[0080] Step 1.1: Perform word segmentation on the input original equipment fault text corpus to obtain a set of vocabulary sequences W = {w1 , w 2 ,..., w n} where w i is the i-th vocabulary sequence.
[0081] Step 1.2: For each vocabulary sequence w i , use the rule-based sentence splitting tool NLTK to split it into a sequence of sentences, obtaining a set of sentence candidates S i .
[0082] Step 1.3: For all sets of sentence candidates T = {S 1 , S 2 ,..., S n}, perform length filtering on the sentences, only retaining the sentences within the specified length range, obtaining a filtered set of sentences.
[0083] Step 1.4: Based on domain corpora, clause splitting rules, etc., further filter out the sentences that are obviously incomplete or meaningless from the filtered set of sentences, obtaining the final set of sentences S = {s 1 , s 2 ,..., s p}.
[0084] Step 1.5: For each sentence s j in the set of sentences S, extract its contextual information for subsequent semantic modeling and extraction.
[0085] Step 2: Use the pre-trained language model RoBERTa to obtain a set of character-level word embedding representations for the text. The specific method is as follows:
[0086] Step 2.1: Construct the input data for the RoBERTa model. For each sentence s j ∈ S, add the special token [CLS] at the beginning of the sentence and the [SEP] token at the end.
[0087] Step 2.2: Convert each word into the corresponding token index sequence according to the RoBERTa vocabulary, and pad the input to make the input length uniformly the preset maximum length.
[0088] Step 2.3: Input the constructed input data into the Embedding layer of the RoBERTa model to obtain the initial representation.
[0089] Step 2.4: Input the initial representation into the Transformer layer of RoBERTa for encoding to obtain a sequence of context-aware character vectors.
[0090] Step 2.5: From the sequence of context-aware character vectors, extract the d-dimensional word embedding vectors corresponding to each character in the original text.
[0091] Step 2.6: Concatenate the character word embeddings corresponding to all s j to obtain the character-level word embedding representation set E = {e 1 , e 2 ,..., e N} of the entire text, where e i is the d-dimensional word vector of the i-th character.
[0092] Step 3: Extract semantic knowledge representations such as fault entities and fault types from the word embedding set, and design a semantic interaction module to construct the semantic association between them to obtain an enhanced semantic representation. The specific method is as follows:
[0093] Step 3.1: Based on the character-level word embedding representation set E, use a named entity recognition model to extract the fault entity representation F ent .
[0094] Step 3.1.1: Use a bidirectional long short-term memory network to perform context modeling on the character-level word embeddings to generate the context feature representation H of each character.
[0095] Step 3.1.2: Input the output H into a CRF decoder, and decode it in combination with the context information of the sequence to generate the entity label y * = argmax y∈Y P(y|H), where y * is the optimal entity label sequence, and Y is the set of all possible labels.
[0096] Step 3.1.3: According to the label sequence, obtain the vector representation of the corresponding entity position from H, and concatenate these vector representations to form the fault entity representation F ent .
[0097] Step 3.2: Based on the extracted fault types, construct a fault type knowledge base and extract the fault type representation F type , specifically as follows:
[0098] Step 3.2.1: Based on the extracted fault type representation, construct a fault type knowledge base, including fault types such as machine faults and their descriptive template vectors such as abnormal noise and component wear.
[0099] Step 3.2.2: For each character word vector e i ∈E, calculate its similarity with the descriptive template vectors in the fault type knowledge base.
[0100] The specific process of calculating the similarity between the character word vector and the template vector in the knowledge base, for example:
[0101] Input character word vector: "abnormal noise", knowledge base template vector: "abnormal noise", "overload", similarity calculation result: 0.95 (matching "abnormal noise").
[0102] Step 3.2.3: If the similarity exceeds the threshold, then consider e i For the corresponding fault type, extract F according to the description type .
[0103] Step 3.3: Design a semantic interaction module to construct the semantic association between F ent and F type .
[0104] Step 3.3.1: Concatenate F ent , F type and E as the input of the semantic interaction module.
[0105] Step 3.3.2: Use the Transformer-based interaction layer to learn the relationship between semantic units through Self-Attention.
[0106] Step 3.3.3: Perform a residual connection on the output of the Transformer and further fuse the context information through a feed-forward network.
[0107] Step 3.3.4: Output the enhanced semantic representation F' = {F' ent , F' type}, where F' ent , F' type are the enhanced entity and type representations respectively.
[0108] Step 4: Based on the attention mechanism, analyze the correlation score between the enhanced semantic representation and the original text sentences, and dynamically select the core sentence set according to the score to prune irrelevant sentences. The specific method is as follows:
[0109] Step 4.1: Analyze the correlation score between the enhanced semantic representation F' and the original text sentence set S, specifically as follows:
[0110] Step 4.1.1: Take the generated enhanced semantic representation F' = {F' ent , F' type} and the original text sentence set S = {s 1 , s 2 ,..., s q} as the input;
[0111] Step 4.1.2: Perform a linear transformation on each s i in F' and S, F” = W F F', s' i = W S si , where and are trainable weight matrices.
[0112] Step 4.1.3: Design a dot product attention mechanism to calculate the dot product of the enhanced semantic representation F” and each statement representation s' i to obtain the unnormalized correlation score score(F', s i ) = F”s' i .
[0113] Step 4.1.4: Use the softmax function to normalize the scores of all statements to obtain the correlation scores
[0114] Step 4.2: Obtain the set of semantic correlation scores α = {α 1 α 2 ,..., α q}. According to the distribution of the semantic correlation scores α i , set the dynamic pruning threshold τ and dynamically adjust the threshold based on the statistical characteristics of the scores.
[0115] Step 4.2.1: Divide the score set α into b intervals and count the number of scores P k in each interval, where k = 1, 2,..., b.
[0116] Step 4.2.2: Calculate the entropy of the score distribution The larger the entropy value H(α), the more uniform the score distribution and the greater the amount of information.
[0117] Step 4.2.3: Find the score interval [τ low , τ high when the entropy value is the largest, and select the median in the maximum entropy interval as the dynamic pruning threshold
[0118] Step 4.3: For each statement s j in the statement set S, if its correlation score α i ≥ τ, add it to the core statement set S’.
[0119] Step 4.4: Prune the statements outside the core statement set S’ to generate the core statement set S’ = {s' 1 , s' 2 ,..., s' q}.
[0120] Step 4.5: Use the core statement set S’ to update the enhanced semantic representation F' to obtain the focused semantic representation F″.
[0121] Step 4.6: Count the number of core statements after pruning and the number of original statements, and calculate the pruning rate.
[0122] Step 4.7: Verify the impact of pruning on the relation classification task and evaluate the performance of the model before and after pruning.
[0123] Step 5: Focus on the core statements, update the semantic representation to the focused semantic representation, and input it into the relation classification module to predict the relation type between entity pairs. The specific method is as follows:
[0124] Step 5.1: Use the focused semantic representation F” generated in Step 4 as the input of the relation classification module.
[0125] Step 5.2: Add the representation of the core statement set S’ = {s' 1 , s' 2 ,..., s' q} to the input features to supplement the context information.
[0126] Step 5.3: Combine each pair of entities in the core statement S’ to form entity pairs (e i , e j ), combine their feature representations F” ei and F” ej , and construct the semantic representation F” pair = [F” ei ; F” ej ; F” content , where [;] represents the vector concatenation operation, and F' c ' ontent is the context semantic representation of the entity pair. Entity extraction has been implemented in Step 3, and these entities are subsequently used to calculate the relevance score between the statement and the context (Step 4), so as to filter out the core statement set (S') containing key entities.
[0127] Step 5.4: Design the relation classification module.
[0128] Step 5.4.1: Use the multi-head attention mechanism to enhance the entity pair representation F” pair to capture the global interaction relationship between the entity pair and the context where Q, K, and V are the query matrix, key matrix, and value matrix respectively, and d is the dimension of the attention head.
[0129] Step 5.4.2: Perform residual connection and normalization processing on the attention output F” norm = LayerNorm(F” pair + F” att ).
[0130] Step 5.4.3: Input the feature F” output by the attention layer norm into the feedforward neural network for non-linear transformation F” fusion = ReLU(W fusion ·F” pair + b fusion ), where W fusion and b fusion are the weights and biases of the fully connected layer.
[0131] Step 5.4.4: Use the fully connected layer to perform relation classification prediction on the fused feature F” fusion P(r|e i , e j ) = softmax(W r ·F” fusion + b r ), where P(r|e i , e j ) is the relation category distribution of the entity pair (e i , e j ), and W r and b r are the classification layer parameters.
[0132] Step 5.5: For each entity pair, use the maximum probability principle to select the most likely relation category as the prediction result
[0133] Step 5.6: Match the predicted relation of each entity pair with its original text position to generate a structured relation extraction result
[0134] Step 6: Based on the sequence annotation decoding, output the named entity boundaries and relation labels to obtain the final relation extraction result. The specific method is as follows:
[0135] Step 6.1: Use the relation classification result and the core sentence set S’ generated in Step 5 as input data.
[0136] Step 6.2: For the predicted relation type of each pair of entities, append the relation type label to the sequence annotation to generate an extended label set S label = {B-r, I-r, O}.
[0137] Step 6.3: Construct a linear chain conditional random field and define the conditional probability.
[0138] Step 6.4: Use the Viterbi algorithm to decode the conditional random field model and solve for the optimal label sequence y * = argmax y∈Y P(y|x, F”).
[0139] Step 6.5: According to the decoded optimal tag sequence y * , extract the boundary information of each entity.
[0140] Step 6.6: Generate the structured relation extraction output Output, including the start position, end position and type of each entity, the relation type between each pair of entities and its context position.
[0141] The above embodiments are only used to illustrate the technical idea and features of the present invention, aiming to enable professionals familiar with the technology to understand the embodiments of the present invention. The present invention is not limited to the above embodiments, and any equivalent transformation or improvement based on the core idea of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for extracting fault information of intelligent equipment based on multi-semantic knowledge interaction and dynamic pruning, characterized in that: The steps include: Step 1: Perform word segmentation and sentence preprocessing on the equipment fault text to obtain the sentence set S; Step 2: Use the pre-trained language model RoBERTa to obtain the character-level word embedding representation set E of the text; Step 3: Build a fault type knowledge base based on the extracted fault types, including the fault types and their descriptive template vectors; Extract fault entity representation F from word embedding representation set E ent , and extract the fault type representation F based on the fault type knowledge base type ,Design semantic interaction module to construct fault entity representation F ent and the fault type indicates F type The semantic association between them is used to obtain the enhanced semantic representation F'; Step 4: Based on the dot product attention mechanism, analyze the correlation score between the enhanced semantic representation F' and the original sentence set S, dynamically select the core sentence set S' according to the score, prune irrelevant sentences to obtain the core sentence set S', and update the semantic representation F' to the focused semantic representation F' based on the core sentence set S'. Step 5: Input the focused semantic representation F” into the relation classification module to predict the relationship type between entity pairs; Step 6: Based on the sequence annotation decoding output, named entity boundaries and relationship labels are obtained to obtain the final relationship extraction results.
2. The intelligent equipment fault information extraction method based on multi-semantic knowledge interaction and dynamic pruning according to claim 1 is characterized in that: The specific method of step 1 is: Step 1.1: Segment the input original equipment fault text corpus to obtain a vocabulary sequence set W = {w1, w2, ..., w n }, where w i is the i-th vocabulary sequence; Step 1.2: For each vocabulary sequence w i , use the rule-based sentence segmentation tool NLTK to split it into sentence sequences and obtain the sentence candidate set S i ; Step 1.3: For all sentence candidate sets T = {S1, S2, ..., S n } are filtered by length, and only sentences with lengths within the specified range are retained to obtain a filtered sentence set; Step 1.4: Based on the domain corpus and sentence segmentation rules, further filter out obviously incomplete or meaningless sentences from the filtered sentence set to obtain the final sentence set S = {s1, s2, ..., s p }; Step 1.5: For each statement s in the statement set S j , extract its contextual information for subsequent semantic modeling and extraction.
3. The intelligent equipment fault information extraction method based on multi-semantic knowledge interaction and dynamic pruning according to claim 1 is characterized in that: The specific method of step 2 is: Step 2.1: Construct the input data of the RoBERTa model. For each sentence s j ∈S, add a special marker [CLS] as the beginning of the sentence and a [SEP] marker at the end of the sentence; Step 2.2: Convert each word into a corresponding word-unit index sequence according to the RoBERTa vocabulary, and pad the input so that the input length is unified to the preset maximum length; Step 2.3: Input the constructed input data into the Embedding layer of the RoBERTa model to obtain the initial representation; Step 2.4: Input the initial representation into the Transformer layer of RoBERTa for encoding to obtain a contextualized word feature vector sequence; Step 2.5: Extract the d-dimensional word embedding vector corresponding to each character in the original text from the contextualized word feature vector sequence; Step 2.6: Put all s j The corresponding character-word embeddings are concatenated to obtain the character-level word embedding representation set E = {e1, e2, ..., e N }, where e i is the d-dimensional word vector of the i-th character.
4. The intelligent equipment fault information extraction method based on multi-semantic knowledge interaction and dynamic pruning according to claim 1 is characterized in that: The specific method of step 3 is: Step 3.1: Based on the word embedding representation set E, use the named entity recognition model to extract the fault entity representation F ent ; Step 3.2: Extract the fault type representation F based on the fault type knowledge base type ; Step 3.2.1: For each character word vector e i ∈E, calculate its similarity with the descriptive template vector in the fault type knowledge base; Step 3.2.2: If the similarity exceeds the threshold, then e i Corresponding to the fault type, extract F according to the description type ; Step 3.3: Design semantic interaction module and build F ent and F type The semantic association between Step 3.3.1: F ent 、F type Concatenate with E as the input of the semantic interaction module; Step 3.3.2: Use the Transformer-based interaction layer to learn the relationship between semantic units through Self-Attention; Step 3.3.3: Perform residual connection on the output of Transformer and further integrate context information through feed-forward network; Step 3.3.4: Output enhanced semantic representation F' = {F' ent ,F' type }, where F' ent 、F' type They are the enhanced entity and type representations respectively.
5. The intelligent equipment fault information extraction method based on multi-semantic knowledge interaction and dynamic pruning according to claim 1 is characterized in that: The specific method of step 4 is: Step 4.1: Analyze the correlation score between the enhanced semantic representation F' and the original sentence set S, specifically: Step 4.1.1: Generate the enhanced semantic representation F' = {F' ent ,F' type } and the original sentence set S = {s1,s2,...,s q } as input; Step 4.1.2: For each s in F' and S i Perform linear transformation F" = W F F',s' i =W S s i ,in, and is a trainable weight matrix; Step 4.1.3: Design a dot product attention mechanism to calculate the enhanced semantic representation F' and each sentence representation s' i The dot product of , we get the unnormalized correlation score score(F',s i )=F”s' i ; Step 4.1.4: Use the softmax function to normalize the scores of all sentences to get the relevance score Step 4.2: Get the semantic relevance score set α = {α1α2,...,α q }, according to the semantic relevance score α i The distribution of , sets the dynamic pruning threshold τ, and dynamically adjusts the threshold based on the statistical characteristics of the score, specifically: Step 4.2.1: Divide the score set α into b intervals and count the number of scores P in each interval k , where k = 1, 2, ..., b; Step 4.2.2: Calculate the entropy of the score distribution The larger the entropy value H(α), the more uniform the score distribution is and the greater the amount of information; Step 4.2.3: Find the score interval [τ low ,τ high ], select the median value in the maximum entropy interval as the dynamic pruning threshold Step 4.3: For each sentence in the original sentence set S, if its relevance score α i ≥τ, then add it to the core statement set S'; Step 4.4: Prune the statements outside the core statement set S' to generate the core statement set S' = "' {s1,s2,...,s q }; Step 4.5: Use the core sentence set S' to update the enhanced semantic representation F' to obtain the focused semantic representation F".
6. The intelligent equipment fault information extraction method based on multi-semantic knowledge interaction and dynamic pruning according to claim 1 is characterized in that: The specific method of step 5 is: Step 5.1: Use the focused semantic representation F” generated in step 4 as the input of the relation classification module; Step 5.2: Set the core statement set S' = {s'1, s'2, ..., s' q } indicates adding input features to supplement context information; Step 5.3: Combine each entity in the core sentence S' into two pairs to form entity pairs (e i ,e j ), and combine their features to represent F' e ' i and F' e ' j , construct the semantic representation F' of the entity pair p ' air =[F' e ' i ; F' e ' j ; F' c ' ontent ], where [;] represents vector concatenation operation, F' c ' ontent It is the contextual semantic representation of the entity pair; Step 5.4: Design the relationship classification module, specifically: Step 5.4.1: Use multi-head attention mechanism to enhance entity pair representation F' p ' air , capturing the global interaction relationship F' between entity pairs and context a ' tt ; Step 5.4.2: Perform residual connection and normalization on the attention output F' n ' orm ; Step 5.4.3: Take the feature F' output by the attention layer n ' orm Input to the feedforward neural network for nonlinear transformation F' f ' usion ; Step 5.4.4: Use the fully connected layer to fuse the features F' f ' usion Perform relationship classification prediction P; Step 5.5: For each entity pair, use the maximum probability principle to select the most likely relationship category as the prediction result Step 5.6: Predict the relationship of each entity pair Match it with its original text position to generate a structured relation extraction result.
7. The intelligent equipment fault information extraction method based on multi-semantic knowledge interaction and dynamic pruning according to claim 1 is characterized in that: The specific method of step 6 is: Step 6.1: Take the relation classification results and core sentence set S' generated in step 5 as input data; Step 6.2: For each pair of predicted relationship types, append the relationship type label to the sequence annotation to generate an extended label set S label ={Br,Ir,O}; Step 6.3: Construct a linear chain conditional random field and define conditional probability; Step 6.4: Use the Viterbi algorithm to decode the conditional random field model and solve the optimal label sequence y * ; Step 6.5: According to the optimal label sequence y obtained by decoding * , extract the boundary information of each entity; Step 6.6: Generate structured relation extraction output, including the starting position, ending position and type of each entity, the relationship type between each pair of entities and its context position.
Citation Information
Cited By
Method and system for processing data based on large language model
CN120471023A