AI-based power grid standard document analysis and information extraction method
Through the multi-level semantic segmentation and graph neural network method based on AI, the knowledge graph of the grid standard document is constructed, and the problem of insufficient accuracy and robustness of information extraction in the grid standard document is solved, and efficient and accurate information extraction is achieved and search.
Patent Information
- Application Number
- CN202410976136.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-15
AI Technical Summary
The prior art is difficult to efficiently analyze and extract key information from grid standard documents, especially when facing complex structured and diverse documents, the accuracy and robustness of information extraction are insufficient, and traditional methods rely on human factors or feature engineering. , it is difficult to make full use of the context information of the document.
Using AI-based multi-level semantic segmentation and graph neural network to build knowledge graph graphs, multi-level semantic segmentation, semantic block relationship merging and graph embedding representation of power grid standard documents are carried out, and the multi-level semantic segmentation, semantic block relationship merging and graph embedding representation of grid standard documents is constructed. Knowledge graph to achieve information extraction.
It significantly improves the accuracy and efficiency of information extraction, can better capture complex semantic relationships in documents, improves the robustness and comprehensiveness of information extraction, reduces artificial errors, and provides efficient information retrieval and intelligent Q&A Function.
Smart Images

Figure CN118964594A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of document information extraction, and in particular to an AI-based power grid standard document analysis and information extraction method. Background Art
[0002] Grid standard documents are important guidelines for the operation and maintenance of power systems, covering all aspects of the installation, operation, maintenance, and safe operating procedures of power equipment. These documents provide standardized operational guidance for power engineers and technicians to ensure the safe, stable, and efficient operation of power systems. However, as the complexity of power systems increases, the content of grid standard documents has become increasingly complex and voluminous. How to efficiently analyze and extract key information from these documents has become an important challenge facing the power industry.
[0003] Existing methods for analyzing and extracting information from power grid standard documents mainly include manual analysis, rule-based methods, and machine learning methods. The traditional manual analysis method relies on the expertise and experience of power engineers and technicians to extract relevant information by reading documents word by word. This method is not only time-consuming and laborious, but also easily affected by human factors, resulting in poor accuracy and consistency of information extraction. The rule-based method is to analyze and extract information from power grid standard documents through pre-set rules and templates. For example, regular expressions are used to identify specific technical parameters or operating procedures. This method works better when processing documents with a high degree of structure, but its flexibility and generalization ability are insufficient when facing documents with diverse language expressions and complex structures. The machine learning method is to use a large amount of labeled data to train a classifier or sequence labeling model to automatically extract key information from the document. For example, the named entity recognition (NER) model can identify entities such as equipment names and technical parameters from the text. However, traditional machine learning methods often rely on manual feature engineering, and the performance of the model is highly dependent on the selection and extraction quality of features, making it difficult to fully utilize the contextual information in the document.
[0004] In recent years, with the development of deep learning technology, the field of natural language processing (NLP) has made significant progress. Language models based on deep learning, such as BERT, GNN, GPT, etc., can be pre-trained on large-scale corpora to capture complex semantics and contextual relationships in text. This provides a new technical means for the analysis and information extraction of power grid standard documents. Pre-trained language models can learn rich semantic representations through unsupervised learning on large-scale text data, and then adapt them to specific application scenarios by fine-tuning on specific tasks. For example, the BERT model performs well in tasks such as named entity recognition and text classification, and can significantly improve the accuracy of information extraction. Graph neural networks (GNNs) have unique advantages in processing structured data, and are particularly suitable for capturing the complex relationships between various semantic blocks in power grid standard documents. By representing documents as graph structures, GNNs can perform information transmission and feature aggregation at the node and edge levels, further improving the effect of information extraction.
[0005] Although deep learning technology has made significant progress in the field of natural language processing, it still faces many challenges in power grid standard document analysis and information extraction.
[0006] Diversity and complexity of documents: The content of power grid standard documents covers a wide range, including technical specifications, operating procedures, safety management and other aspects. The document formats and language expressions are diverse, which brings great difficulties to automated analysis.
[0007] Multi-level and relevance of knowledge: The information in power grid standard documents is multi-level, and there are complex relationships between different semantic blocks. How to effectively capture and represent these relationships is a major challenge in information extraction.
[0008] High precision and high robustness requirements: The results of grid standard document analysis and information extraction directly affect the operation and maintenance of the power system, so the accuracy and robustness of information extraction are very high. This requires optimization in algorithm design to improve the generalization and anti-interference capabilities of the model. Summary of the invention
[0009] In order to solve the problems existing in the above-mentioned prior art, the present invention proposes an AI-based power grid standard document analysis and information extraction method, which realizes efficient analysis and information extraction of power grid standard documents through innovative multi-level semantic segmentation, inter-block relationship merging and graph neural network knowledge graph construction. Specifically, it includes the following steps:
[0010] S1: Acquire and preprocess grid standard documents;
[0011] S2: Use the improved language model to perform multi-level semantic segmentation on the preprocessed document and divide the document into multiple semantic blocks;
[0012] S3: Generate global graph embedding representation of semantic blocks using improved graph neural network;
[0013] S4: Merge semantic blocks, merge them according to the node similarity of the global graph embedding representation, and obtain the minimum unit semantic block embedding representation;
[0014] S5: Construct a knowledge graph, embed each semantic block represented by the smallest unit semantic block as a node in the knowledge graph, and construct a knowledge graph.
[0015] As a technical preferred solution of the present invention, the preprocessing of the power grid standard document in step S1 specifically includes: format conversion, text extraction, noise filtering and text standardization processing of the power grid standard document.
[0016] As a technical preferred solution of the present invention, the specific structure of the improved language model in step S2 is as follows:
[0017] T1: Input layer: accepts pre-processed grid standard document text data;
[0018] T2: word embedding layer: converts the input text data into a low-dimensional word embedding vector;
[0019] T3: Multi-head self-attention layer: It consists of multiple self-attention heads, which perform weighted summation on word embedding vectors to capture long-distance dependencies in the document. The output of each self-attention head is merged through a concatenation operation.
[0020] T4: Hierarchical attention mechanism layer: Introduces the hierarchical attention mechanism to perform hierarchical attention processing on the output of the multi-head self-attention layer to generate multi-level semantic representation;
[0021] T5: Bidirectional long short-term memory network layer: encodes the context information of the output of the hierarchical attention mechanism layer to enhance the semantic relevance of the text. It specifically includes two LSTM layers, forward and backward, which process the forward and reverse information of the input sequence respectively;
[0022] T6: Semantic segmentation layer: Based on the output of the bidirectional long short-term memory network layer, the power grid standard document is segmented into multiple semantic blocks through predefined rules or learned segmentation tags;
[0023] T7: Output layer: The segmented semantic blocks are used as output.
[0024] As a technical preferred solution of the present invention, the layer structure and connection relationship of the improved language model are as follows: the input layer is connected to the word embedding layer, which is used to convert the preprocessed power grid standard document text data into a word embedding vector; the word embedding layer is connected to the multi-head self-attention layer, which is used to perform weighted summation processing on the word embedding vector through multiple self-attention heads; the multi-head self-attention layer is connected to the hierarchical attention mechanism layer, which is used to perform hierarchical attention processing on the output of the multi-head self-attention layer to generate a multi-level semantic representation; the hierarchical attention mechanism layer is connected to the bidirectional long short-term memory network layer, which is used to encode context information on the output of the hierarchical attention mechanism layer; the bidirectional long short-term memory network layer is connected to the semantic segmentation layer, which is used to segment the power grid standard document into multiple semantic blocks based on the output of the bidirectional long short-term memory network layer; the semantic segmentation layer is connected to the output layer, which is used to output the segmented semantic blocks to the graph neural network module for further processing.
[0025] As a technical preferred solution of the present invention, the specific process of generating multi-level semantic representations by the hierarchical attention mechanism layer is as follows:
[0026] T4-1: Input representation: The representation H∈R output by the multi-head self-attention layer n×d Input to the hierarchical attention mechanism layer, where n is the sequence length and d is the hidden state dimension;
[0027] T4-2: First-layer attention calculation: Calculate the attention weight vector A1 of each word. The specific calculation formula is as follows:
[0028]
[0029] Where Q1 = HW Q , K1=HW K , W Q and W K is the weight matrix of the first layer;
[0030] T4-3: First-layer semantic representation: Calculate the first-layer semantic representation H1 based on the attention weight vector A1. The specific calculation formula is as follows:
[0031] H1=A1V1
[0032] Where V1 = HW V , W V is the weight matrix of the first layer;
[0033] T4-4: Second-layer attention calculation: Perform a second attention calculation on the first-layer semantic representation H1 to generate the second-layer attention weight vector A2. The specific calculation formula is as follows:
[0034]
[0035] Where, Q2=H1W Q2 , K2=H1W K2 , W Q2 and W K2 is the weight matrix of the second layer;
[0036] T4-5: Second-layer semantic representation: Calculate the second-layer semantic representation H2 based on the attention weight vector A2. The specific calculation formula is as follows:
[0037] H2=A2V2
[0038] Where V2=H1W V2 , W V2 is the weight matrix of the second layer;
[0039] T4-6: Fusion of multi-level semantic representation: Fusion of the first and second level semantic representations to generate the final multi-level semantic representation. The specific calculation formula is as follows:
[0040] H final =concat(H1,H2)
[0041] Among them, concat represents the concatenation operation of vectors.
[0042] As a technical preferred solution of the present invention, the structure of the semantic block is as follows:
[0043] Semantic block identifier: Each semantic block contains a unique identifier, which is used to identify the location of the semantic block in the document;
[0044] Content text: The semantic block contains the original text content, representing a part of the power grid standard document;
[0045] Semantic vector: The semantic block contains the corresponding semantic vector representation, which is generated by the output of the hierarchical attention mechanism layer and the bidirectional long short-term memory network layer;
[0046] Context information: The semantic block contains context information, including the semantic block identifiers and content texts adjacent to each other, which is used to maintain the relevance between semantic blocks;
[0047] Metadata: The semantic block contains metadata, including the starting position, ending position, and paragraph or chapter information of the semantic block.
[0048] As a technical preferred solution of the present invention, the structure of the improved graph neural network in step S3 is as follows:
[0049] M1: Input layer: accepts the semantic blocks generated by the semantic segmentation layer to form a graph structure;
[0050] M2: Graph convolution layer: performs convolution operation on the input semantic blocks and their adjacency relationships to extract local features of nodes (semantic blocks);
[0051] M3: Graph Attention Layer: performs weighted processing on the output of the graph convolution layer, uses the attention mechanism to calculate the dependencies between nodes, and enhances the feature expression of key nodes;
[0052] M4: Multi-layer graph convolutional network: It is composed of multiple stacked graph convolutional layers, aggregating node features layer by layer to capture global graph structure information;
[0053] M5: Skip connection layer: Introducing skip connections in multi-layer graph convolutional networks to fuse features from different layers to avoid information loss and gradient disappearance;
[0054] M6: Aggregation layer: Aggregate the features of the nodes to generate an embedded representation of the global graph;
[0055] M7: Output layer: Outputs the final representation of the graph neural network, including node features and embedded representation of the global graph, which is used for knowledge graph construction and information extraction.
[0056] As a technical preferred solution of the present invention, the connection mode of each layer of the improved graph neural network is as follows:
[0057] The input layer is connected to the graph convolution layer: the input layer receives the semantic blocks and their associated information generated by the semantic segmentation layer and passes them to the graph convolution layer;
[0058] The graph convolution layer is connected to the graph attention layer: the graph convolution layer performs convolution operations on the input semantic blocks and their adjacency relationships, extracts local features of the nodes, and passes the convolved features to the graph attention layer;
[0059] The graph attention layer is connected to the multi-layer graph convolutional network: The graph attention layer performs weighted processing on the output of the graph convolutional layer, uses the attention mechanism to calculate the dependencies between nodes, enhances the feature expression of key nodes, and then passes the results to the multi-layer graph convolutional network;
[0060] Inter-layer connection of multi-layer graph convolutional network: A multi-layer graph convolutional network is composed of multiple stacked graph convolutional layers, and the output of the previous graph convolutional layer is used as the input of the next graph convolutional layer; skip connections are introduced to directly connect the outputs of the previous layers to the subsequent graph convolutional layers to form skip connection channels to enhance information transfer and avoid gradient vanishing and feature loss;
[0061] Multi-layer graph convolutional network is connected to the aggregation layer: the output of the last layer of the multi-layer graph convolutional network is passed to the aggregation layer;
[0062] The aggregation layer is connected to the output layer: The aggregation layer aggregates the node features of the multi-layer graph convolutional network to generate an embedded representation of the global graph, and passes the aggregated features to the output layer;
[0063] Output layer: The output layer generates the final representation of the graph neural network based on the results of the aggregation layer, including node features and embedded representation of the global graph, which is used for knowledge graph construction and information extraction.
[0064] As a technical preferred solution of the present invention, the merging of semantic blocks in step S4 specifically includes the following steps:
[0065] S4-1: Node embedding representation: Get the node embedding representation H = {h1,h2,...,h n}, where h i represents the embedding vector of the i-th semantic block, and n is the number of semantic blocks;
[0066] S4-2: Semantic block similarity calculation: Calculate the similarity S between each pair of semantic blocks i and j. ij , the similarity calculation formula is:
[0067]
[0068] Among them, · represents the vector inner product, and P represents the Euclidean norm of the vector;
[0069] S4-3: Semantic block merging criteria: Set the similarity threshold θ, when S ij When ≥θ, merge semantic blocks i and j into a new semantic block;
[0070] S4-4: Merged semantic block representation update: The merged new semantic block embedding representation h new It is calculated by weighted average, and the calculation formula is:
[0071]
[0072] S4-5: context information update: the merged semantic block inherits the context information of the original semantic block and updates its context information to make it consistent with the merged adjacency relationship;
[0073] S4-6: Iterative merging: Repeat steps S4-2 to S4-5 until the similarity S between all semantic block pairs is ij <θ, end the merging process;
[0074] S4-7: Output the merged semantic block: The merged semantic block is used as the final output to provide input for knowledge graph construction.
[0075] As a technical preferred solution of the present invention, constructing the knowledge graph in step S5 specifically includes the following steps:
[0076] S5-1: Each merged semantic block is regarded as a node in the knowledge graph, and the feature of the node is represented by the merged embedding vector h new ;
[0077] S5-2: Use the pre-trained named entity recognition model to perform entity recognition on the content of each node and classify the nodes into different types of grid standard entities, including equipment, technical parameters, operating procedures, and safety specifications;
[0078] S5-3: Use the relationship extraction model to identify the relationship between nodes and calculate the relationship vector r for each node pair (i, j) ij , the specific calculation formula is as follows:
[0079] r ij =ReLU(W r [h i ;h j ]+b r )
[0080] Among them, W r and b r is the weight matrix and bias vector of the relation extraction model, [h i ;h j ] represents the concatenation of node embedding vectors, and ReLU is the activation function;
[0081] Use the classifier to classify the relationship vector r ij Perform classification to determine the type of relationship between node pairs;
[0082] S5-4: Build a knowledge graph based on the identified node types and relationships, assign a unique node identifier to each node, and assign node features h new And entity types are stored in the graph database; according to the relationship type between node pairs, edges are added to the knowledge graph, and the attributes of the edges include relationship type and relationship weight.
[0083] Compared with the prior art, the present invention has the following beneficial effects:
[0084] Improve the accuracy and efficiency of information extraction: By introducing pre-trained language models and graph neural networks, the present invention can more accurately identify and extract key information in documents, significantly improving the accuracy and efficiency of information extraction.
[0085] Multi-level semantic understanding: This paper adopts an improved BERT model and realizes multi-level semantic segmentation through a hierarchical attention mechanism, which can capture the complex semantic relationships in the document and make information extraction more comprehensive and accurate.
[0086] Efficient merging of semantic block relationships: This paper uses graph neural networks (GNNs) to analyze and merge the relationships between semantic blocks. Through graph convolution and attention mechanisms, it can effectively capture and represent the complex relationships between different semantic blocks, thereby improving the robustness and comprehensiveness of information extraction.
[0087] Constructing a multimodal knowledge graph: By constructing a knowledge graph of power grid standard documents, the present invention can systematically manage and store the extracted entities and relationships, provide efficient information retrieval and intelligent question-and-answer functions, and significantly improve the work efficiency of technicians and the utilization value of documents.
[0088] High degree of automation, reducing human errors: The present invention adopts an automated information extraction process, which reduces human errors and improves the consistency and reliability of the results.
[0089] Ability to process complex structured data: Through the application of graph neural networks, the present invention can effectively process complex structured data in power grid standard documents containing a large number of complex technical specifications and operating procedures, thereby improving the ability to understand documents and extract information. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] Figure 1 A schematic diagram of the AI-based power grid standard document analysis and information extraction method provided by the present invention;
[0091] Figure 2 The network structure of the improved language model of the embodiment provided by the present invention;
[0092] Figure 3 The network structure of the improved graph neural network provided in the embodiment of the present invention. DETAILED DESCRIPTION
[0093] The present invention is further described below in conjunction with the accompanying drawings and examples. However, the present invention can be implemented in many different ways and should not be construed as being limited to the embodiments shown; on the contrary, these embodiments provide those skilled in the art with implementation methods that meet applicable legal requirements.
[0094] Example 1: In this example, the present invention uses the actual grid standard document of a certain power company as simulation data. The grid standard document covers the installation, operation, maintenance and safe operation procedures of power equipment, and the data source is the company's internal database. The specific data is as follows:
[0095] Data source: internal database of a power company;
[0096] Data volume: Contains 1,000 power grid standard documents, totaling about 500,000 words;
[0097] Data format: text format (TXT), each document contains multiple chapters and entries;
[0098] Document examples: equipment installation specifications, operation and maintenance manuals, safety operating procedures, etc.
[0099] like Figure 1 As shown, the method of the present invention specifically comprises the following steps:
[0100] S1: Data preprocessing: First, preprocess the grid standard documents extracted from the internal database of the power company. Specifically, the following steps are included:
[0101] Format conversion: Convert all documents into a parsable text format (TXT).
[0102] Text extraction: Extract the main text content from the document and remove extra spaces, punctuation, and noise characters.
[0103] Noise filtering: De-noise the extracted text and remove irrelevant characters and format errors.
[0104] S2: Multi-level semantic segmentation: Use the improved BERT model to perform multi-level semantic segmentation on the preprocessed document and divide the document into multiple semantic blocks. The specific process is as follows:
[0105] Word Embedding: Convert the preprocessed text into word embedding vectors and initialize them using the pre-trained BERT model.
[0106] Multi-head self-attention: Multiple self-attention heads are used to perform weighted summation on word embedding vectors to capture long-range dependencies in documents.
[0107] Hierarchical attention mechanism: A hierarchical attention mechanism is introduced to perform secondary attention processing on the output of the multi-head self-attention layer to generate multi-level semantic representations.
[0108] Semantic block generation: According to the output of the hierarchical attention mechanism layer, the document is divided into multiple semantic blocks, each of which contains the original text, semantic vector and context information.
[0109] S3: Merge semantic block relationships, using graph neural network (GNN) to analyze and merge the relationships between the segmented semantic blocks. The specific steps are as follows:
[0110] Graph convolution layer: Perform convolution operation on the input semantic blocks and their adjacency relationships to extract local features of nodes (semantic blocks).
[0111] Graph attention layer: Perform weighted processing on the output of the graph convolution layer, use the attention mechanism to calculate the dependencies between nodes, and enhance the feature expression of key nodes.
[0112] Multi-layer graph convolutional network: Through a multi-layer graph convolutional network, node features are aggregated layer by layer to capture global graph structure information.
[0113] Semantic block merging: Calculate the similarity S between semantic blocks based on the output of the graph neural network ij , and merge the semantic blocks according to the set similarity threshold θ, and the merged new semantic block is embedded in h new Calculated by weighted average.
[0114] S4: Construct a knowledge graph based on the identified node types and relationships. The specific steps are as follows:
[0115] Entity recognition: Use a pre-trained named entity recognition (NER) model to perform entity recognition on the content of each semantic block and classify the nodes into types such as equipment, technical parameters, operating procedures, and safety specifications.
[0116] Relationship extraction: Use the relationship extraction model to identify the relationship between nodes and calculate the relationship vector r of the node pair ij , and use a classifier to determine the type of relationship between pairs of nodes.
[0117] Graph generation: assign a unique node identifier (ID) to each node and store the node features h new And entity types are stored in the graph database; according to the relationship type between node pairs, edges are added to the knowledge graph, and the attributes of the edges include relationship type and relationship weight.
[0118] Simulation experiment results,Through the above process, the knowledge graph of the power grid standard document is finally generated.,The simulation experiment results are as follows:
[0119] Number of nodes: A total of 5,000 semantic blocks were extracted from 1,000 power grid standard documents, and 3,200 nodes were generated after merging.
[0120] Number of relationships: A total of 4,500 relationships were identified and added between 3,200 nodes, including relationship types such as "equipment contains parameters", "operating procedures are associated with equipment", and "safety regulations depend on operating procedures".
[0121] Information extraction accuracy: After manual verification, the accuracy of information extraction reached 92.5%, which is significantly higher than the traditional method (about 80%).
[0122] Query efficiency: The average response time for information retrieval through the knowledge graph is 1.2 seconds, which is 75% higher than the traditional full-text retrieval method (average response time is 5 seconds).
[0123] Through the detailed process and simulation data results of this embodiment, the effectiveness and superiority of the present invention in power grid standard document analysis and information extraction can be verified. This method not only improves the accuracy and efficiency of information extraction, but also provides technicians with convenient knowledge graph query and intelligent question-answering functions, which has important application value.
[0124] Embodiment 2: In this embodiment, the present invention introduces in detail the network structure of the improved language model, as well as how to train and use the model to analyze and extract information from power grid standard documents. Figure 2 As shown, the network structure specifically includes:
[0125] T4-1: Input representation: The representation H∈R output by the multi-head self-attention layer n×d Input to the hierarchical attention mechanism layer, where n is the sequence length and d is the hidden state dimension;
[0126] T4-2: First-layer attention calculation: Calculate the attention weight vector A1 of each word. The specific calculation formula is as follows:
[0127]
[0128] Where Q1 = HW Q , K1=HW K , W Q and W K is the weight matrix of the first layer;
[0129] T4-3: First-layer semantic representation: Calculate the first-layer semantic representation H1 based on the attention weight vector A1. The specific calculation formula is as follows:
[0130] H1=A1V1
[0131] Where V1 = HW V , W V is the weight matrix of the first layer;
[0132] T4-4: Second-layer attention calculation: Perform a second attention calculation on the first-layer semantic representation H1 to generate the second-layer attention weight vector A2. The specific calculation formula is as follows:
[0133]
[0134] Where, Q2=H1W Q2 , K2=H1W K2 , W Q2 and W K2 is the weight matrix of the second layer;
[0135] T4-5: Second-layer semantic representation: Calculate the second-layer semantic representation H2 based on the attention weight vector A2. The specific calculation formula is as follows:
[0136] H2=A2V2
[0137] Where V2=H1W V2 , W V2 is the weight matrix of the second layer;
[0138] T4-6: Fusion of multi-level semantic representation: Fusion of the first and second level semantic representations to generate the final multi-level semantic representation. The specific calculation formula is as follows:
[0139] H final =concat(H1,H2)
[0140] Among them, concat represents the concatenation operation of vectors.
[0141] The training process of the improved language model of the present invention is specifically as follows:
[0142] Data preparation: 1,000 grid standard documents were extracted from the internal database of the power company and preprocessed to generate a dataset for training. The preprocessed documents were divided into a training set (80%), a validation set (10%), and a test set (10%).
[0143] Pre-trained model fine-tuning: Based on the pre-trained BERT model, fine-tuning is performed to adapt to the corpus of power grid standard documents using the training set, and the model parameters are optimized by maximizing the log-likelihood estimate of each annotated semantic block.
[0144] Training Graph Neural Network (GNN): Using the semantic blocks and relational features generated by the fine-tuned BERT model, the GNN model is trained. The training goal of GNN is to optimize the parameters by minimizing the cross entropy loss of predicting relation types.
[0145] Training results: After 20 rounds of training, the fine-tuned BERT model achieved a named entity recognition (NER) accuracy of 95% on the validation set, and the GNN model achieved a relationship prediction accuracy of 92% on the validation set.
[0146] Usage effect: After testing on 1,000 power grid standard documents, the accuracy of information extraction reached 93%. The constructed knowledge graph contains 3,200 nodes and 4,500 edges, and the attribute information of nodes and edges is comprehensive and accurate.
[0147] Performance evaluation: The average response time for information retrieval using the knowledge graph is 1.1 seconds, significantly better than the 5-second response time of the traditional method. User satisfaction surveys show that the user satisfaction rate for document analysis and information extraction using the method of the present invention is 95%.
[0148] In summary, through the detailed process and simulation data results of this embodiment, the effectiveness and superiority of the present invention in power grid standard document analysis and information extraction have been verified, and the good performance of the improved language model and graph neural network in practical applications has been demonstrated.
[0149] Example 3: In this example, the present invention will introduce in detail the use of an improved graph neural network (GNN) to generate a global graph embedding representation of each semantic block in a power grid standard document, and verify its effect through simulation data calculation. The simulation data comes from the actual power grid standard documents of a certain power company, which cover the installation, operation, maintenance and safe operation procedures of power equipment. The specific data is as follows:
[0150] Data source: internal database of a power company;
[0151] Data volume: Contains 1,000 power grid standard documents, totaling about 500,000 words;
[0152] Data format: text format (TXT), each document contains multiple chapters and entries;
[0153] Document examples: equipment installation specifications, operation and maintenance manuals, safety operating procedures, etc.
[0154] like Figure 3 As shown in the figure, the network structure of the graph neural network (GNN) model is as follows:
[0155] Input layer: accepts the semantic blocks and their associated information generated by the semantic segmentation layer;
[0156] Graph Convolutional Layer (GCN): performs convolution operations on the input semantic blocks and their adjacency relationships to extract local features of nodes (semantic blocks);
[0157] Graph Attention Layer (GAT): performs weighted processing on the output of the graph convolution layer, uses the attention mechanism to calculate the dependencies between nodes, and enhances the feature expression of key nodes;
[0158] Multi-layer graph convolutional network: It is composed of multiple stacked graph convolutional layers. The output of the previous graph convolutional layer is used as the input of the next graph convolutional layer. At the same time, skip connections are introduced to directly connect the outputs of the previous layers to the subsequent graph convolutional layers to avoid information loss and gradient disappearance.
[0159] Aggregation layer: Aggregate the node features of the multi-layer graph convolutional network to generate an embedded representation of the global graph.
[0160] The training process is as follows: 1,000 grid standard documents are used for model training. The specific steps are as follows:
[0161] Data preparation: The preprocessed documents are split into training set (80%), validation set (10%) and test set (10%).
[0162] Feature extraction: Generate the initial embedding representation of the semantic block through the BERT model and build the adjacency matrix between the semantic blocks.
[0163] Model training: GNN model parameters are optimized by minimizing the cross entropy loss of predicted relation types.
[0164] During the training process, the Adam optimizer is used, the learning rate is 0.001, the batch size is 32, and the training is 20 epochs. The specific steps of merging different semantic blocks include:
[0165] S4-1: Node embedding representation: Get the node embedding representation H = {h1,h2,...,h n}, where h i represents the embedding vector of the i-th semantic block, and n is the number of semantic blocks;
[0166] S4-2: Semantic block similarity calculation: Calculate the similarity S between each pair of semantic blocks i and j. ij , the similarity calculation formula is:
[0167]
[0168] Among them, · represents the vector inner product, and P represents the Euclidean norm of the vector;
[0169] S4-3: Semantic block merging criteria: Set the similarity threshold θ, when S ij When ≥θ, merge semantic blocks i and j into a new semantic block;
[0170] S4-4: Merged semantic block representation update: The merged new semantic block embedding representation h new It is calculated by weighted average, and the calculation formula is:
[0171]
[0172] S4-5: context information update: the merged semantic block inherits the context information of the original semantic block and updates its context information to make it consistent with the merged adjacency relationship;
[0173] S4-6: Iterative merging: Repeat steps S4-2 to S4-5 until the similarity S between all semantic block pairs is ij<θ, end the merging process;
[0174] S4-7: Output the merged semantic block: The merged semantic block is used as the final output to provide input for knowledge graph construction.
[0175] The experimental results are as follows:
[0176] Statistics of nodes and edges: In the 100 power grid standard documents in the test set, 800 semantic block nodes and 1,200 relationship edges were generated.
[0177] Global graph embedding representation: The global graph embedding representation vector calculated by the GNN model, the embedding vector dimension of each semantic block is 256.
[0178] Information extraction accuracy: Through manual verification, the accuracy of information extraction reached 94%, significantly higher than the 80% of traditional methods.
[0179] Query efficiency: The average response time for information retrieval using the knowledge graph is 1.3 seconds, which is 74% higher than the traditional full-text retrieval method (average response time is 5 seconds).
[0180] Through the detailed process and simulation data results of this embodiment, the effectiveness and superiority of the present invention in power grid standard document analysis and information extraction can be verified. The improved graph neural network model can efficiently generate a global graph embedding representation, significantly improving the accuracy and efficiency of information extraction, and providing technicians with convenient knowledge graph query and intelligent question-and-answer functions, which has important application value.
[0181] The above embodiments only express the implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention.
Claims
1. The AI-based power grid standard document analysis and information extraction method is characterized by: The method comprises the following steps: S1: Acquire and preprocess grid standard documents; S2: Use the improved language model to perform multi-level semantic segmentation on the preprocessed document and divide the document into multiple semantic blocks; S3: Generate global graph embedding representation of semantic blocks using improved graph neural network; S4: Merge semantic blocks, merge them according to the node similarity of the global graph embedding representation, and obtain the minimum unit semantic block embedding representation; S5: Construct a knowledge graph, embed each semantic block represented by the smallest unit semantic block as a node in the knowledge graph, and construct a knowledge graph.
2. The AI-based power grid standard document analysis and information extraction method according to claim 1 is characterized by: The preprocessing of the power grid standard document in step S1 includes: format conversion, text extraction, noise filtering and text standardization of the power grid standard document.
3. The AI-based power grid standard document analysis and information extraction method according to claim 1 is characterized by: The specific structure of the language model improved in step S2 is as follows: T1: Input layer: accepts pre-processed grid standard document text data; T2: word embedding layer: converts the input text data into a low-dimensional word embedding vector; T3: Multi-head self-attention layer: It consists of multiple self-attention heads, which perform weighted summation on word embedding vectors to capture long-distance dependencies in the document. The output of each self-attention head is merged through a concatenation operation. T4: Hierarchical attention mechanism layer: Introduces the hierarchical attention mechanism to perform hierarchical attention processing on the output of the multi-head self-attention layer to generate multi-level semantic representation; T5: Bidirectional long short-term memory network layer: encodes the context information of the output of the hierarchical attention mechanism layer to enhance the semantic relevance of the text. It specifically includes two LSTM layers, forward and backward, which process the forward and reverse information of the input sequence respectively; T6: Semantic segmentation layer: Based on the output of the bidirectional long short-term memory network layer, the power grid standard document is segmented into multiple semantic blocks through predefined rules or learned segmentation tags; T7: Output layer: The segmented semantic blocks are used as output.
4. The AI-based power grid standard document analysis and information extraction method according to claim 3 is characterized by: The improved language model has a layer structure and connection relationship as follows: the input layer is connected to the word embedding layer, which is used to convert the preprocessed power grid standard document text data into a word embedding vector; the word embedding layer is connected to the multi-head self-attention layer, which is used to perform weighted summation processing on the word embedding vector through multiple self-attention heads; the multi-head self-attention layer is connected to the hierarchical attention mechanism layer, which is used to perform hierarchical attention processing on the output of the multi-head self-attention layer to generate a multi-level semantic representation; the hierarchical attention mechanism layer is connected to the bidirectional long short-term memory network layer, which is used to encode context information on the output of the hierarchical attention mechanism layer; the bidirectional long short-term memory network layer is connected to the semantic segmentation layer, which is used to segment the power grid standard document into multiple semantic blocks based on the output of the bidirectional long short-term memory network layer; the semantic segmentation layer is connected to the output layer, which is used to output the segmented semantic blocks to the graph neural network module for further processing.
5. The AI-based power grid standard document analysis and information extraction method according to claim 3 is characterized by: The specific process of generating multi-level semantic representations by the hierarchical attention mechanism layer is as follows: T4-1: Input representation: The representation H∈R output by the multi-head self-attention layer n×d Input to the hierarchical attention mechanism layer, where n is the sequence length and d is the hidden state dimension; T4-2: First-layer attention calculation: Calculate the attention weight vector A1 of each word. The specific calculation formula is as follows: Where Q1 = HW Q , K1=HW K , W Q and W K is the weight matrix of the first layer; T4-3: First-layer semantic representation: Calculate the first-layer semantic representation H1 based on the attention weight vector A1. The specific calculation formula is as follows: H1=A1V1 Where V1 = HW V , W V is the weight matrix of the first layer; T4-4: Second-layer attention calculation: Perform a second attention calculation on the first-layer semantic representation H1 to generate the second-layer attention weight vector A2. The specific calculation formula is as follows: Where, Q2=H1W Q2 , K2=H1W K2 , W Q2 and W K2 is the weight matrix of the second layer; T4-5: Second-layer semantic representation: Calculate the second-layer semantic representation H2 based on the attention weight vector A2. The specific calculation formula is as follows: H2=A2V2 Where V2=H1W V2 , W V2 is the weight matrix of the second layer; T4-6: Fusion of multi-level semantic representation: Fusion of the first and second level semantic representations to generate the final multi-level semantic representation. The specific calculation formula is as follows: H final =concat(H1,H2) Among them, concat represents the concatenation operation of vectors.
6. The AI-based power grid standard document analysis and information extraction method according to claim 3 is characterized by: The structure of the semantic block is as follows: Semantic block identifier: Each semantic block contains a unique identifier, which is used to identify the location of the semantic block in the document; Content text: The semantic block contains the original text content, representing a part of the power grid standard document; Semantic vector: The semantic block contains the corresponding semantic vector representation, which is generated by the output of the hierarchical attention mechanism layer and the bidirectional long short-term memory network layer; Context information: The semantic block contains context information, including the semantic block identifiers and content texts adjacent to each other, which is used to maintain the relevance between semantic blocks; Metadata: The semantic block contains metadata, including the starting position, ending position, and paragraph or chapter information of the semantic block.
7. The AI-based power grid standard document analysis and information extraction method according to claim 1, characterized in that: The improved graph neural network in step S3 has the following structure: M1: Input layer: accepts the semantic blocks generated by the semantic segmentation layer to form a graph structure; M2: Graph convolution layer: performs convolution operations on the input semantic blocks and their adjacency relationships to extract local features of nodes; M3: Graph Attention Layer: performs weighted processing on the output of the graph convolution layer, uses the attention mechanism to calculate the dependencies between nodes, and enhances the feature expression of key nodes; M4: Multi-layer graph convolutional network: It is composed of multiple stacked graph convolutional layers, aggregating node features layer by layer to capture global graph structure information; M5: Skip connection layer: Introducing skip connections in multi-layer graph convolutional networks to fuse features from different layers to avoid information loss and gradient disappearance; M6: Aggregation layer: Aggregate the features of the nodes to generate an embedded representation of the global graph; M7: Output layer: Outputs the final representation of the graph neural network, including node features and embedded representation of the global graph, which is used for knowledge graph construction and information extraction.
8. The AI-based power grid standard document analysis and information extraction method according to claim 7 is characterized by: The connection method of each layer of the improved graph neural network is as follows: The input layer is connected to the graph convolution layer: the input layer receives the semantic blocks and their associated information generated by the semantic segmentation layer and passes them to the graph convolution layer; The graph convolution layer is connected to the graph attention layer: the graph convolution layer performs convolution operations on the input semantic blocks and their adjacency relationships, extracts local features of the nodes, and passes the convolved features to the graph attention layer; The graph attention layer is connected to the multi-layer graph convolutional network: The graph attention layer performs weighted processing on the output of the graph convolutional layer, uses the attention mechanism to calculate the dependencies between nodes, enhances the feature expression of key nodes, and then passes the results to the multi-layer graph convolutional network; Inter-layer connection of multi-layer graph convolutional network: A multi-layer graph convolutional network is composed of multiple stacked graph convolutional layers, and the output of the previous graph convolutional layer is used as the input of the next graph convolutional layer; skip connections are introduced to directly connect the outputs of the previous layers to the subsequent graph convolutional layers to form skip connection channels to enhance information transfer and avoid gradient vanishing and feature loss; Multi-layer graph convolutional network is connected to the aggregation layer: the output of the last layer of the multi-layer graph convolutional network is passed to the aggregation layer; The aggregation layer is connected to the output layer: The aggregation layer aggregates the node features of the multi-layer graph convolutional network to generate an embedded representation of the global graph, and passes the aggregated features to the output layer; Output layer: The output layer generates the final representation of the graph neural network based on the results of the aggregation layer, including node features and embedded representation of the global graph, which is used for knowledge graph construction and information extraction.
9. The AI-based power grid standard document analysis and information extraction method according to claim 1, characterized in that: The step S4 of merging semantic blocks specifically includes the following steps: S4-1: Node embedding representation: Get the node embedding representation H = {h1,h2,...,h n }, where h i represents the embedding vector of the i-th semantic block, and n is the number of semantic blocks; S4-2: Semantic block similarity calculation: Calculate the similarity S between each pair of semantic blocks i and j. ij , the similarity calculation formula is: Among them, · represents the vector inner product, and P represents the Euclidean norm of the vector; S4-3: Semantic block merging criteria: Set the similarity threshold θ, when S ij When ≥θ, merge semantic blocks i and j into a new semantic block; S4-4: Merged semantic block representation update: The merged new semantic block embedding representation h new It is calculated by weighted average, and the calculation formula is: S4-5: context information update: the merged semantic block inherits the context information of the original semantic block and updates its context information to make it consistent with the merged adjacency relationship; S4-6: Iterative merging: Repeat steps S4-2 to S4-5 until the similarity S between all semantic block pairs is ij <θ, end the merging process; S4-7: Output the merged semantic block: The merged semantic block is used as the final output to provide input for knowledge graph construction.
10. The AI-based power grid standard document analysis and information extraction method according to claim 1, characterized in that: The step S5 constructs a knowledge graph, which specifically includes the following steps: S5-1: Each merged semantic block is regarded as a node in the knowledge graph, and the node feature is represented as the merged embedding vector h new ; S5-2: Use the pre-trained named entity recognition model to perform entity recognition on the content of each node and classify the nodes into different types of grid standard entities, including equipment, technical parameters, operating procedures, and safety specifications; S5-3: Use the relationship extraction model to identify the relationship between nodes and calculate the relationship vector r for each node pair (i, j) ij , use the classifier to classify the relationship vector r ij Classify and determine the relationship type between node pairs. The specific calculation formula is as follows: r ij =ReLU(W r [h i ;h j ]+b r ) Among them, W r and b r is the weight matrix and bias vector of the relation extraction model, [h i ;h j ] represents the concatenation of node embedding vectors, and ReLU is the activation function; S5-4: Build a knowledge graph based on the identified node types and relationships, assign a unique node identifier to each node, and assign node features h new And entity types are stored in the graph database; according to the relationship type between node pairs, edges are added to the knowledge graph, and the attributes of the edges include relationship type and relationship weight.
Citation Information
Patent Citations
Knowledge graph fusion method based on approximate ontology matching
CN113032516A
Multi-modal document information extraction method based on graph neural network
CN114419304A
Domain knowledge graph construction method and system based on seed set expansion
CN116150407A
Cited By
Video understanding method and device fusing multi-modal knowledge graph
CN119672606A
Medical literature interpretation method and system based on large language model
CN119740575A
Railway bridge design standard knowledge graph rapid construction method
CN119831016A
Rapid construction method for knowledge graph of railway bridge design standards
WO2026129760A1
