Intelligent content extraction method and system based on power grid standard table
Through the intelligent content extraction method of grid standard tables, multimodal feature extraction and knowledge graph technology, the problems of low efficiency and poor accuracy of grid standard table content extraction are solved, and efficient and reliable content extraction and model optimization are achieved to meet user needs. .
Patent Information
- Application Number
- CN202410994442.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-12-10
AI Technical Summary
The existing intelligent content extraction method for grid standard tables cannot quickly and accurately extract feature information, is inefficient, and lacks a monitoring system, so it is impossible to detect degraded or abnormal models in a timely manner, and has poor functionality.
Intelligent content extraction method based on grid standard tables is adopted, including collecting images for preprocessing, multi-modal feature extraction, building a knowledge graph, updating BERT model parameters in real time, performing performance evaluation and optimization, displaying the extraction results and automatically updating and managing. Specific steps include image feature extraction, text feature extraction, tabular structure analysis, identifying text entities, using BERT models for training and optimization, and combining rule reasoning and statistical reasoning for link prediction and multi-hop reasoning.
It improves the accuracy and efficiency of extracting contents of power grid standard tables, ensures the performance and stability of the model in the production environment, continuously optimizes to adapt to data changes, provides reliable and efficient services, and promptly monitors model performance to meet user needs.
Smart Images

Figure CN119107654A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an intelligent content extraction method and system based on a power grid standard table. Background Art
[0002] The whole composed of substations and transmission and distribution lines of various voltages in the power system is called a power grid. It includes three units: substation, transmission, and distribution. The task of the power grid is to transmit and distribute electric energy and change the voltage. In recent years, with the continuous acceleration of China's power development, the power grid has also developed rapidly. The operating voltage level of the power grid system has been continuously improved, and the network scale has been continuously expanded. The country has formed six large-scale regional power grids across provinces, including the Northeast Power Grid, North China Power Grid, Central China Power Grid, East China Power Grid, Northwest Power Grid and Southern Power Grid, and has basically formed a complete long-distance transmission power grid framework. In the use of the power grid, it is necessary to collect statistics on the power grid use information and make a table. In order to facilitate people to quickly extract the content of the table, a method for intelligent content extraction of standard power grid tables is proposed. The following problems exist in the existing technology:
[0003] 1. The existing intelligent content extraction method of power grid standard tables cannot extract specific feature information more quickly, and the accuracy and efficiency of extracted information are relatively low;
[0004] 2. The existing intelligent content extraction method of standard grid tables cannot meet the needs of users and provides poor services to users. In addition, the existing method does not have a monitoring system and cannot detect the degradation of model performance or abnormalities in time, resulting in poor functionality. Summary of the invention
[0005] In view of the problems existing in the existing intelligent content extraction method of the standard table of the power grid, the present invention is proposed.
[0006] Therefore, the problem to be solved by the present invention is how to improve the accuracy and efficiency of extracting the content of the power grid standard table.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0008] In the first aspect, an embodiment of the present invention provides an intelligent content extraction method based on a standard grid table, which includes collecting a standard grid table image and performing preprocessing; performing multimodal feature extraction; constructing a knowledge graph and identifying entities in the text; training a pre-trained model BERT and updating model parameters in real time; performing performance evaluation and continuously optimizing the performance of the BERT model; displaying the content extraction results and performing automatic update management of the knowledge graph.
[0009] As a preferred solution of the intelligent content extraction method based on the power grid standard table described in the present invention, the multimodal feature extraction includes image feature extraction, text feature extraction and table structure analysis.
[0010] As a preferred solution of the intelligent content extraction method based on the standard table of the power grid described in the present invention, the text feature extraction includes: segmenting the text in the table, removing stop words and special characters, and converting the English into lowercase if it contains English; a cell is provided, which contains n0 words, each word is encoded by the BERT model to obtain a d-dimensional vector representation, and the matrix Represents the characteristics of these words, where X i Represents the feature vector of the i-th word; average pooling calculates the arithmetic mean of all word features, and the formula is as follows:
[0011]
[0012] Among them, f mean ∈R d is the final cell feature vector;
[0013] Max pooling selects the maximum value in each dimension, and the formula is as follows:
[0014]
[0015] Among them, f maxj ∈R d is the final cell feature vector, Represents the value of the jth feature dimension of the n0th word; combining the advantages of average pooling and maximum pooling to connect the two vectors, we get:
[0016] f_com=[f mean ,f max ]
[0017] Where f_com∈R 2d is the concatenated feature vector.
[0018] As a preferred solution of the intelligent content extraction method based on the standard table of the power grid described in the present invention, the table structure analysis includes: assuming an m×n table with a total of m×n cells, each cell is a node in the graph, and the node feature vector V i It consists of two parts, including the visual features h extracted by CNN i , let the dimension be p and the text feature t extracted by NLP i , let the dimension be q, then the formula of the node feature vector is: V i =[h i , t i] Among them, V i ∈R p+q ; The edge represents the relationship between cells, and an adjacency matrix A∈R is defined mn×mn A, among which, A ij represents the weight of the edge between node i and node j; the features of the edge include relative position, whether shared border, distance and graph construction; the relative position is calculated as:
[0019] Δrow=row j -row i
[0020] Δcol=col j -col i
[0021] If the cells share a border, sb=1, otherwise 0; the distance is calculated as follows:
[0022]
[0023] Then the edge eigenvector e ij Expressed as: e ij =,Δrow,Δcol,sb,dis-;
[0024] The construction of the graph includes: initializing the node set V = *v1,v2,...,v mn +, initialize the edge set E = {}; for each pair of cells (i, j): if i and j meet the set conditions, then: E = E∪{i,j,e ij}; Update the adjacency matrix: A ij =ω(e ij ), where ω() is a function that maps edge features to scalar weights; we get a heterogeneous graph G = (V, E, A), where V is a set of nodes, each with a feature vector v i ; E is the edge set, each edge has a eigenvector e ij ; A is the adjacency matrix, which represents the connection relationship and weight between nodes.
[0025] As a preferred solution of the intelligent content extraction method based on the standard table of power grid described in the present invention, the construction of knowledge graph and identification of entities in text include: collecting structured data and unstructured data, designing a unified data model, and mapping data from different sources; using named entity recognition (NER) technology to identify entities in text, and applying coreference resolution technology to merge different expressions referring to the same entity; using dependency syntax analysis to identify grammatical relationships between entities; using a method combining rule reasoning and statistical reasoning, applying knowledge graph embedding for link prediction, and designing a multi-hop reasoning algorithm to discover implicit complex relationships.
[0026] As a preferred solution of the intelligent content extraction method based on the standard table of power grid described in the present invention, wherein: the method of combining rule reasoning and statistical reasoning, applying knowledge graph embedding for link prediction includes the following contents: using the TransE knowledge graph embedding method, embedding the entities and relationships in the knowledge graph into a low-dimensional vector space; assuming that the entity set in the knowledge graph is E T , the relation set is R T , the embedding vector is denoted as e T and r T , the score function of the TransE model is:
[0027]
[0028] Among them, h T and t T is the embedding vector of the entity, r T is the embedding vector of the relationship; according to the result of the score function, the link prediction task is to predict the triple (h T , r T , t T ) is established; the design of a multi-hop reasoning algorithm to discover the implicit complex relationship includes the following steps: Let the path be (h T , r T1 , e T1 ,r T2 ,e T2 ,...,r Tu ,t T ), then the inference function is:
[0029]
[0030] Among them, e T0 =h T And e Tu =t T .
[0031] As a preferred solution of the intelligent content extraction method based on the standard grid table of the present invention, the real-time updating of model parameters includes the following contents: identifying uncertain samples in model prediction: using entropy as uncertainty measurement:
[0032] H(y)=-∑P(y i )logP(y i )
[0033] Select e0 samples with the highest uncertainty for manual labeling;
[0034] Use online gradient descent update rule:
[0035]
[0036] Among them, θ t is the model parameter, δ is the learning rate, L is the loss function, x t and t It is a newly labeled sample.
[0037] In the second aspect, an embodiment of the present invention provides an intelligent content extraction system based on power grid standard tables, which includes an image acquisition and preprocessing module for acquiring power grid standard table images and performing preprocessing; a multimodal feature extraction module for performing multimodal feature extraction; a knowledge graph module for constructing a knowledge graph and identifying entities in text; a model training module for training the pre-trained model BERT and updating the model parameters in real time; an evaluation module for performing performance evaluation and continuously optimizing the performance of the BERT model; and a result display module for displaying the content extraction results and performing automatic update management of the knowledge graph.
[0038] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program instructions are executed by the processor, the steps of the intelligent content extraction method based on the power grid standard table as described in the first aspect of the present invention are implemented.
[0039] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program instructions are executed by a processor, the steps of the intelligent content extraction method based on the power grid standard table as described in the first aspect of the present invention are implemented.
[0040] The beneficial effects of the present invention are as follows: the present invention can help convert the information in the table into an easy-to-process format through structured data analysis, so that feature extraction and model training can be performed more conveniently, which can improve the accuracy and efficiency of extracting the content of the power grid standard table, and is easier to understand and analyze when processing structured data; through the deployment and optimization stages, the performance and stability of the model in the production environment can be ensured, and by continuously optimizing and improving the model, the extraction accuracy can be further improved, and it can adapt to the ever-changing data and needs. The content extraction system of the power grid standard table can continuously provide users with reliable and efficient services. Continuing to optimize the model can also include a monitoring system to promptly detect the decline in model performance or abnormal conditions, and take corresponding adjustment measures, combined with business needs and user feedback, to perform regular updates and improvements to ensure that the system for extracting the content of the power grid standard table is always kept in the best condition, meets user needs and provides high-quality services. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0042] Figure 1 The flowchart of the intelligent content extraction method based on the power grid standard table.
[0043] Figure 2 This is a structural diagram of the intelligent content extraction system based on the power grid standard table. DETAILED DESCRIPTION
[0044] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0045] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0046] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0047] Example 1
[0048] Reference Figure 1-2 , which is the first embodiment of the present invention, provides an intelligent content extraction method based on a power grid standard table, comprising:
[0049] S1: Collect the grid standard table image and perform preprocessing.
[0050] Convert the contents of a table into a processable format, converting the table into text and structured data.
[0051] Among them, data preprocessing includes data cleaning, processing missing values and outliers, and data preprocessing can be performed by using the Pandas library in Python.
[0052] S2: Perform multimodal feature extraction.
[0053] Multimodal feature extraction includes image feature extraction, text feature extraction and table structure analysis.
[0054] Among them, image feature extraction uses convolutional neural network (CNN) to extract the visual features of the table, including table lines, cell layout, etc.
[0055] Specifically, first, the table image is resized to a uniform size (e.g., 224x224 pixels), and then image enhancement is performed, such as rotation, flipping, and brightness adjustment, to increase data diversity, and the pixel values are normalized to the [0,1] range.
[0056] Secondly, use a pre-trained CNN model such as ResNet50 or VGG16 as the base network, remove the last fully connected layer, keep the convolutional layer, and add customized convolutional and pooling layers to adapt to the table feature extraction task.
[0057] Input the preprocessed table image, and extract low-level to high-level visual features through the convolution layer and pooling layer of CNN, focusing on the convolution kernels of edge detection and line recognition to capture the table lines, and use hollow convolution to increase the receptive field to better capture the overall structure of the table. Through the above operations, feature maps of multiple channels can be obtained, representing visual features at different levels. These feature maps contain information such as table lines, cell boundaries, and text areas.
[0058] Text feature extraction uses natural language processing technology to extract the semantic features of text.
[0059] Specifically, first, the text in the table is segmented, stop words and special characters are removed, and if it is English, the text is converted to lowercase.
[0060] You can use the language model BERT, input the preprocessed text into the selected language model, and obtain the context-dependent embedding representation of each token; for the text of each cell, use average pooling or maximum pooling to aggregate the features of all tokens, as follows:
[0061] Suppose there is a cell containing n0 tokens. Each token is encoded by the BERT model to obtain a d-dimensional vector representation, represented by the matrix Represents the characteristics of these words, where X i The feature vector representing the i-th word;
[0062] Average pooling calculates the arithmetic mean of all word features. The formula is as follows:
[0063]
[0064] Among them, f mean ∈R d is the final cell feature vector.
[0065] Max pooling selects the maximum value in each dimension, and the formula is as follows:
[0066]
[0067] Among them, f maxj ∈R d is the final cell feature vector, Represents the value of the j-th feature dimension of the n0-th word.
[0068] Furthermore, in order to combine the advantages of these two pooling methods, we connect these two vectors and get:
[0069] f_com=[f mean ,f max ]
[0070] Where f_com∈R 2d is the concatenated feature vector.
[0071] Table structure analysis combines image and text features and uses graph neural network (GNN) to analyze the logical structure of the table.
[0072] Specifically, the table is converted into a graph structure, where nodes represent cells and edges represent the relationship between cells. Node features include a combination of visual features extracted by CNN and text features extracted by NLP, and edge features include information such as the relative position of cells and whether they share boundaries. The specific operations are as follows:
[0073] Suppose there is an m×n table with a total of m×n cells. Each cell is a node in the graph, and the node feature vector V i It consists of two parts: visual features h extracted by CNN i (Let dimension be p); Text feature t extracted by NLP i (Assume the dimension is q), then the formula of the node feature vector is: V i =[h i , t i ] Among them, V i ∈R p+q .
[0074] The edge represents the relationship between cells, and an adjacency matrix A∈R is defined mn×mn A, among which, A ij represents the weight of the edge between node i and node j.
[0075] Edge characteristics include relative position, shared borders, distance, and graph construction.
[0076] The relative position is calculated as:
[0077] Δrow=row j -row i
[0078] Δcol=col j -col i
[0079] If the cells share a border, sb = 1, otherwise 0;
[0080] The distance is calculated as:
[0081]
[0082] Then the edge eigenvector e ij It can be expressed as: ij =,Δrow,Δcol,sb,dis-.
[0083] Furthermore, the construction of the graph includes:
[0084] Initialize the node set V = *v1,v2,...,v mn +, initialize the edge set E = {}; for each pair of cells (i, j):
[0085] If i and j meet certain conditions (such as being adjacent, in the same row / column, etc.), then: E = E∪{i,j,e ij}.
[0086] Update the adjacency matrix: A ij =ω(e ij ), where ω() is a function that maps edge features to scalar weights.
[0087] Finally, we get a heterogeneous graph G = (V, E, A), where V is a set of nodes and each node has a feature vector v i ; E is the edge set, each edge has a eigenvector e ij ; A is the adjacency matrix, which represents the connection relationship and weight between nodes.
[0088] Using the Graph Convolutional Network (GCN) model, the feature representation of the node is updated through multiple rounds of message passing; in each round, the node aggregates information from its neighbors to capture local and global structural information.
[0089] Using the updated node features for table structure analysis, you can add task-specific output layers such as column header identification, row grouping, etc.
[0090] S3: Build a knowledge graph containing entities, attributes, and relations, and identify entities in text.
[0091] S3.1: Collect structured data (such as databases, APIs) and unstructured data (such as web pages, documents), design a unified data model, and map data from different sources to this model.
[0092] S3.2: Use named entity recognition (NER) technology to identify entities in the text and apply coreference resolution technology to merge different expressions referring to the same entity.
[0093] S3.3: Use dependency parsing to identify grammatical relations between entities.
[0094] S3.4: Use a combination of rule reasoning and statistical reasoning to apply knowledge graph embedding for link prediction and design a multi-hop reasoning algorithm to discover implicit complex relationships. Specifically, the present invention uses TransE
[0095] Knowledge graph embedding methods embed entities and relations in knowledge graphs into low-dimensional vector spaces for link prediction and reasoning, for example:
[0096] Suppose the entity set in the knowledge graph is E T , the relation set is R T , the embedding vector is denoted as e T and r T , the score function of the TransE model is:
[0097]
[0098] Among them, h T and t T is the embedding vector of the entity, r T is the embedding vector of the relation.
[0099] The link prediction task is to predict the triple (h T , r T , t T ) is true, the lower the score function is, the more reliable the prediction result is.
[0100] Furthermore, multi-hop reasoning can be defined by all the relations on the path. Assume that the path is (h T , r T1 , e T1 ,r T2 ,e T2 ,...,r Tu ,t T ), then the inference function is:
[0101]
[0102] Among them, e T0 =h T And eTu =t T .
[0103] S4: Train the pre-trained model BERT and update the model parameters in real time.
[0104] S4.1: Preferably, the pre-trained model is fine-tuned using standard grid tabular data to adapt it to a specific task.
[0105] Specifically, standard tabular data of the power grid is collected, including information such as various power equipment parameters and operating status, and methods such as random masking and column permutation are used to increase data diversity. Furthermore, a table perception layer is added on the basis of RoBERTa to capture the relationship between rows and columns, design a special position encoding to encode the position information of the cell in the table, and add task-specific output layers, such as a classification head or a regression head.
[0106] Use task-specific loss functions, such as cross entropy loss (classification tasks) or mean square error loss (regression tasks), and use progressive unfreezing techniques to unfreeze model parameters layer by layer for fine-tuning. The fine-tuning loss function is as follows:
[0107] L fin =α×L task +(1-α)L mlm
[0108] Among them, L task is the task-specific loss, L mlm is the masked language model loss and α is the balancing factor.
[0109] Furthermore, under the premise of protecting data privacy, multi-party collaborative learning can be achieved to improve the generalization ability of the model.
[0110] Preferably, a federated learning framework is implemented to allow multiple participants to collaborate in training without sharing original data, wherein the update rule of the federated average algorithm is:
[0111]
[0112] Among them, ω t is the global model parameter, ω t,k is the local model parameter of the kth client, n k is the amount of local data.
[0113] S4.2: Update model parameters in real time.
[0114] Preferably, the uncertain samples in the model prediction are identified, manual labeling is requested, and the model parameters are updated in real time according to the newly labeled samples.
[0115] Preferably, the uncertain sample identification process includes:
[0116] Use entropy as the uncertainty measure:
[0117] H(y)=-∑P(y i )logP(y i )
[0118] Select e0 samples with the highest uncertainty for manual labeling.
[0119] Use an incremental learning algorithm such as an online gradient descent update rule:
[0120]
[0121] Among them, θ t is the model parameter, δ is the learning rate, L is the loss function, x t and t It is a newly labeled sample.
[0122] S5: Perform performance evaluation and continuously optimize model performance.
[0123] The performance evaluation of the present invention uses multi-index evaluation, including using accuracy, recall rate, F1 score and other indicators to comprehensively evaluate the model performance, and conducts comparative experiments with traditional methods and other deep learning models. The experimental process is as follows:
[0124] The standard grid table dataset is used, which contains 10,000 records. The data is divided into 70% training set, 15% validation set, and 15% test set. The evaluation criteria include accuracy, F1 score, average processing time (milliseconds / record), and memory usage (MB). The comparison methods include: traditional methods, namely rule-based methods, other deep learning models, namely BERT and XLNet; the method of the present invention: RoBERTa+reinforcement learning optimization, namely RL-RoBERTa. The comparison experimental results are shown in the following table:
[0125] Table 1 Experimental results
[0126]
[0127] It can be seen from the table that RL-RoBERTa is significantly better than other methods, with an accuracy improvement of 3.6% and an F1 score improvement of 0.039, which reflects the advantages of the present invention in feature extraction and model selection; and in terms of speed and memory usage, the method of the present invention has better results than the existing technology.
[0128] Furthermore, A / B testing is performed in the production environment to continuously optimize model performance.
[0129] S6: Display the content extraction results and automatically update the knowledge picture.
[0130] Use visualization libraries such as D3.js to intuitively display the extraction results in the form of charts, network diagrams, etc., and develop interactive interfaces to allow users to explore and verify the extraction results.
[0131] Whenever there is a new knowledge extraction result, the system will automatically add it to the existing knowledge graph, which can be achieved by writing scripts and accurately adding it to the graph based on its characteristics and relationships.
[0132] To ensure the completeness and accuracy of the knowledge graph, this includes regular review and correction of errors, and automatic generation of analytical reports containing key information and insights.
[0133] Furthermore, the present embodiment also provides an intelligent content extraction system based on power grid standard tables, including an image acquisition and preprocessing module for acquiring power grid standard table images and performing preprocessing; a multimodal feature extraction module for performing multimodal feature extraction; a knowledge graph module for constructing a knowledge graph and identifying entities in text; a model training module for training the pre-trained model BERT and updating model parameters in real time; an evaluation module for performing performance evaluation and continuously optimizing the performance of the BERT model; and a result display module for displaying the content extraction results and performing automatic update management of the knowledge graph.
[0134] This embodiment also provides a computer device, which is suitable for the case of an intelligent content extraction method based on a standard table of a power grid, and includes a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the intelligent content extraction method based on a standard table of a power grid as proposed in the above embodiment.
[0135] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0136] This embodiment further provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for intelligent content extraction based on a power grid standard table as proposed in the above embodiment is implemented.
[0137] In summary, the present invention can help convert the information in the table into an easy-to-process format through structured data analysis, so that feature extraction and model training can be performed more conveniently, which can improve the accuracy and efficiency of extracting the content of the power grid standard table, and is easier to understand and analyze when processing structured data; through the deployment and optimization stages, the performance and stability of the model in the production environment can be ensured, and by continuously optimizing and improving the model, the extraction accuracy can be further improved, and it can adapt to the ever-changing data and needs. The content extraction system of the power grid standard table can continuously provide users with reliable and efficient services. Continuing to optimize the model can also include a monitoring system to promptly detect model performance degradation or abnormal conditions, and take corresponding adjustment measures, combined with business needs and user feedback, to perform regular updates and improvements to ensure that the system for extracting the content of the power grid standard table is always maintained in the best state, meets user needs and provides high-quality services.
[0138] Example 2
[0139] Referring to Table 2, which is a second embodiment of the present invention, this embodiment provides an intelligent content extraction method based on a power grid standard table. In order to verify the beneficial effects of the present invention, a scientific demonstration is carried out through simulation experiments.
[0140] In this embodiment, the intelligent content extraction method of the grid standard table is used to process actual grid data. The test objects are grid equipment operation status monitoring data and power equipment parameter data. The specific experiments are as follows:
[0141] The experimental data are collected from standard table images of multiple power grid equipment, including the operating parameters of transformers, circuit breakers, disconnectors, busbars, mutual inductors, and lightning arresters. Each table records the equipment's operating time, maintenance times, fault times, temperature, voltage, current, and power, and the data is preprocessed using the Pandas library in Python.
[0142] Furthermore, the pre-trained ResNet50 model is used for feature extraction. The table image is resized to 224x224 pixels, and image enhancement methods such as rotation, flipping, and brightness adjustment are used to increase data diversity. The pixel values are normalized to the range of [0,1] to extract low-level to high-level visual features, such as table lines and cell layout.
[0143] The BERT model is used to extract features from the text in the table, segment the text, remove stop words and special characters, and convert the text to lowercase. The BERT model is used to obtain the context-dependent embedding representation of each word, and the word features are aggregated using average pooling and maximum pooling methods; the table is converted into a graph structure, with nodes representing cells and edges representing the relationship between cells. The Graph Convolutional Network (GCN) model is used to update node features through multiple rounds of message passing and analyze the logical structure of the table.
[0144] After feature extraction, a knowledge graph containing entities, attributes and relationships is constructed. Named entity recognition (NER) technology is used to identify entities in the text, and co-reference resolution technology is applied to merge different expressions referring to the same entity. Furthermore, the TransE knowledge graph embedding method is used for link prediction, and a multi-hop reasoning algorithm is designed to discover implicit complex relationships.
[0145] Use standard grid tabular data to fine-tune the pre-trained model, increase data diversity, add table-aware layers and special position encodings, capture row-column relationships, use task-specific loss functions and progressive unfreezing techniques, unfreeze model parameters layer by layer for fine-tuning, achieve multi-party collaborative learning, and conduct performance evaluation and continuous optimization.
[0146] Finally, the content extraction results are displayed. The following is the experimental data of intelligent content extraction of some power grid standard tables:
[0147] Table 2
[0148]
[0149]
[0150] Through the analysis of the experimental data in Table 2 above, it can be seen that the intelligent content extraction method can accurately identify and record the operating time and maintenance times of each power grid equipment. Compared with the traditional manual recording method, this method can obtain these data faster and more accurately, and reduce the occurrence of human errors.
[0151] Compared with traditional methods, the present invention can acquire and process data faster and more accurately, and improve the management efficiency and safety of power grid equipment; through multimodal feature extraction, table structure analysis and knowledge graph construction, the content of the present invention can realize the identification and reasoning of complex relationships, thereby providing more comprehensive and in-depth analysis results. In practical applications, the method of the present invention can effectively improve the intelligent level of power grid management and provide strong technical support for the development of the power industry.
[0152] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. An intelligent content extraction method based on a power grid standard table, characterized in that: include, Collect standard grid table images and perform preprocessing; Perform multimodal feature extraction; Build a knowledge graph and identify entities in text; Train the pre-trained model BERT and update the model parameters in real time; Conduct performance evaluation and continuously optimize BERT model performance; Display the content extraction results and automatically update the knowledge picture.
2. The intelligent content extraction method based on the power grid standard table according to claim 1, characterized in that: The multimodal feature extraction includes image feature extraction, text feature extraction and table structure analysis.
3. The intelligent content extraction method based on the power grid standard table according to claim 2, characterized in that: The text feature extraction includes: Segment the text in the table, remove stop words and special characters, and convert English to lowercase if it contains English. Suppose there is a cell containing n0 tokens. Each token is encoded by the BERT model to obtain a d-dimensional vector representation, represented by the matrix Represents the characteristics of these words, where X i The feature vector representing the i-th word; Average pooling calculates the arithmetic mean of all word features. The formula is as follows: Among them, f mean ∈R d is the final cell feature vector; Max pooling selects the maximum value in each dimension, and the formula is as follows: Among them, f maxj ∈R d is the final cell feature vector, Represents the value of the j-th feature dimension of the n0-th word; Combining the advantages of average pooling and maximum pooling to connect the two vectors, we get: f_com=[f mean ,f max ] Where f_com∈R 2d is the concatenated feature vector.
4. The intelligent content extraction method based on the power grid standard table according to claim 3, characterized in that: The table structure analysis includes: Suppose there is an m×n table with a total of m×n cells. Each cell is a node in the graph, and the node feature vector V i It consists of two parts, including the visual features h extracted by CNN i , let the dimension be p and the text feature t extracted by NLP i , let the dimension be q, then the formula of the node feature vector is: V i =[h i , t i ] Among them, V i ∈R p+q ; The edge represents the relationship between cells, and an adjacency matrix A∈R is defined mn×mn A, among which, A ij represents the weight of the edge between node i and node j; Edge characteristics include relative position, shared boundaries, distance, and graph construction; The relative position is calculated as: Δrow=row j -row i Δcol=col j -cabbage i If the cells share a border, sb = 1, otherwise 0; The distance is calculated as follows: Then the edge eigenvector e ij Expressed as: e ij =[Δrow,Δcol,sb,dis]; The construction of the graph includes: Initialize the node set V = {v1,v2,...,v mn }, initialize the edge set E = {}; for each pair of cells (i, j): If i and j meet the set conditions, then: E = E∪{i,j,e ij }; Update the adjacency matrix: A ij =ω(e ij ), where ω() is a function that maps edge features to scalar weights; We get a heterogeneous graph G = (V, E, A), where V is a set of nodes and each node has a feature vector v i ; E is the edge set, each edge has a eigenvector e ij ; A is the adjacency matrix, which represents the connection relationship and weight between nodes.
5. The intelligent content extraction method based on the power grid standard table according to claim 4, characterized in that: The construction of the knowledge graph and identification of entities in the text include: Collect structured and unstructured data, design a unified data model, and map data from different sources; Use named entity recognition (NER) technology to identify entities in the text, and apply coreference resolution technology to merge different expressions referring to the same entity; Use dependency parsing to identify grammatical relationships between entities; Using a combination of rule-based reasoning and statistical reasoning, knowledge graph embedding is applied for link prediction, and a multi-hop reasoning algorithm is designed to discover implicit complex relationships.
6. The intelligent content extraction method based on the power grid standard table according to claim 5, characterized in that: The method of combining rule reasoning and statistical reasoning and applying knowledge graph embedding to perform link prediction includes the following contents: Use the TransE knowledge graph embedding method to embed entities and relationships in the knowledge graph into a low-dimensional vector space; Suppose the entity set in the knowledge graph is E T , the relation set is R T , the embedding vector is denoted as e T and r T , the score function of the TransE model is: Among them, h T and t T is the embedding vector of the entity, r T is the embedding vector of the relation; According to the result of the score function, the link prediction task is to predict the triple (h T , r T , t T ) is established; The design of a multi-hop reasoning algorithm to discover implicit complex relationships includes the following steps: Let the path be (h T , r T1 , e T1 ,r T2 ,e T2 ,...,r Tu ,t T ), then the inference function is: Among them, e T0 =h T And e Tu =t T .
7. The intelligent content extraction method based on the power grid standard table according to claim 6, characterized in that: The real-time update model parameters include the following: Identify uncertain examples in the model’s predictions: Use entropy as an uncertainty measure: H(y)=-∑P(y i )logP(y i ) Select e0 samples with the highest uncertainty for manual labeling; Use online gradient descent update rule: Among them, θ t is the model parameter, δ is the learning rate, L is the loss function, x t and t It is a newly labeled sample.
8. An intelligent content extraction system based on a power grid standard table, based on the intelligent content extraction method based on a power grid standard table according to any one of claims 1 to 7, characterized in that: Also includes, The acquisition module is used to acquire the grid standard table image and perform preprocessing; A multimodal feature extraction module, used for performing multimodal feature extraction; The knowledge graph module is used to build a knowledge graph and identify entities in the text; Model training module, used to train the pre-trained model BERT and update model parameters in real time; Evaluation module, used to evaluate performance and continuously optimize BERT model performance; The result display module is used to display the content extraction results and automatically update the knowledge picture.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the intelligent content extraction method based on the power grid standard table according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the intelligent content extraction method based on the power grid standard table according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
A method for grid data review
CN122779788A
