Power industry document classification method and system, electronic equipment and readable storage medium
By extracting the key semantic fields, structural information and metadata information of the electrical industry documentation, combined with multi -modal characteristics to extract and generate confrontation networks, the problem of poor classification of the existing technology of the existing technology, and achieved higher classification and accuracy. Sexuality and system flexibility.
Patent Information
- Application Number
- CN202411395263.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-24
AI Technical Summary
The prior art In the classification of power industry documents, relying on keyword matching or rule engine technology, it is difficult to capture the true semantics of the document, and the classification effect is not ideal when facing diversified formats and unstructured data.
Proposal a classification method of the power industry documentation. By extract key semantic fields, document structure information, and attribute metadata information, combine semantic characteristics extraction models, structural feature extraction models, and metadata encoders to generate multi -modal feature groups, and use it to use Document features generate confrontation networks and deep convolutional neural networks.
It significantly improves the accuracy, robustness and system flexibility of document classification in the power industry, can more accurately capture the core content and structure of documents, adapt to complex and diverse document formats, and reduces system maintenance costs and complexity.
Smart Images

Figure CN119357391A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of document analysis and processing, and in particular to a classification method, system, electronic equipment and readable storage medium for power industry documents. Background Art
[0002] In the power industry, a large amount of document data is generated during daily operations and management, such as operation reports, equipment maintenance records, fault analysis reports, procedures and specifications, etc., which are widely diverse in content, format, and semantics. In addition, these documents contain rich text information and need to be efficiently classified and analyzed to support decision-making and operations management.
[0003] At present, the processing of power industry documents mainly relies on keyword matching technology or rule engine technology. In keyword matching technology, the document content is analyzed and matched to the corresponding category based on a predefined set of keywords. However, since power industry documents often contain a large number of professional terms and complex technical expressions, simple keyword matching is difficult to capture the true semantics of the document. When the document content changes greatly or uses different language expressions, the matching accuracy will drop significantly, resulting in unsatisfactory classification results.
[0004] In rule engine technology, document content is parsed and classified through a series of preset classification rules (such as regular expressions). Compared with keyword matching, rule engines can handle more complex grammatical structures and can flexibly adjust classification strategies according to changes in rules. However, as the types and number of documents increase, the expansion and management of rules become very difficult. Secondly, rule engines perform poorly when faced with documents with diverse formats, especially when the documents contain unstructured data, the classification effect of rule engines will be significantly reduced.
[0005] Therefore, it is urgent to propose a new technical means to solve the above technical problems. Summary of the invention
[0006] The present application provides a method, system, electronic device and readable storage medium for classifying documents in the electric power industry, which are used to at least solve the problem that the classification effect of electric power industry documents relying on keyword matching technology or rule engine technology in the current related technology is poor.
[0007] The present invention proposes a method for classifying documents in the electric power industry, comprising the following steps:
[0008] S1. Extract key semantic fields, document structure information and attribute metadata information from the target power document to be identified;
[0009] The key semantic field is information used to describe the core content of the power document;
[0010] The document structure information is information used to describe the layout structure of the power document content;
[0011] The attribute metadata information includes document creation time, filer information, geographic location information, document data volume and document access permission settings;
[0012] S2. Inputting key semantic fields, document structure information and attribute metadata information into the semantic feature extraction model, structural feature extraction model and metadata encoder respectively for feature extraction to obtain a multimodal feature group of the power document;
[0013] The multimodal feature group includes deep semantic features, document structured features and metadata encoding features;
[0014] S3. Inputting the multimodal feature group feature group into the document feature generation adversarial network to obtain the corresponding target power document feature representation;
[0015] S4. Determine a target power document type that matches the target power document feature representation based on a document classifier.
[0016] Furthermore, the semantic feature extraction model includes a fragment extraction module, a BERT model module and a feature aggregation module;
[0017] The segment interception module is used to intercept the context content corresponding to each key semantic field from the target power document, and construct each semantic segment according to each key semantic field and the corresponding context content;
[0018] The BERT model module is used to perform a bidirectional attention mechanism encoding on each of the semantic segments to respectively determine the corresponding segment feature vectors;
[0019] The feature aggregation module is used to aggregate the feature vectors of each segment to determine the corresponding deep semantic features.
[0020] Furthermore, the structural feature extraction model includes a topic model module, a structure tree construction module and a Tree-LSTM module;
[0021] The topic model module is used to segment the target power document into a plurality of topic blocks;
[0022] The structure tree construction module is used to perform a topic hierarchy analysis on the multiple topic blocks to determine an initial topic tree structure corresponding to the multi-level topic hierarchy, and optimize the initial topic tree structure through the annotated document structure information to determine a corresponding structure tree;
[0023] The Tree-LSTM module is used to recursively process the topic nodes in the structure tree, and finally generate a global structure representation of the root node by constructing the hidden state representation of the topic nodes layer by layer to determine the corresponding document structured features.
[0024] Furthermore, the metadata encoder is a type-aware encoder, which is used to identify the data type of each metadata parameter in the attribute metadata information, and encode the corresponding metadata parameter according to the identified data type to obtain corresponding encoding features, and obtain corresponding metadata encoding features by splicing each of the encoding features.
[0025] Furthermore, the generator of the document feature generative adversarial network comprises an input layer, a cross-modal feature conversion module, a feature fusion layer, a multi-head self-attention layer and an output layer;
[0026] The input layer is used to receive the multimodal feature group of the power document;
[0027] The cross-modal feature conversion module is used to perform cross-modal feature conversion on the multi-modal feature group of the power document to obtain a corresponding document derived feature group, and the conversion method is as follows:
[0028]
[0029] in, and They represent the derived structural features, the first derived semantic features, and the second derived semantic features in the document derived feature group, respectively. s 、F t and F m They represent the deep semantic features, document structure features and metadata encoding features in the multimodal feature group of the power document, σ represents the activation function, and W s→t and b s→t They represent the weight matrix and bias term of the fully connected layer used to transform semantic features into structural feature representations; W t→s and b t→s They represent the weight matrix and bias term of the fully connected layer used to convert structural features into semantic features; W m→s and b m→s They represent the weight matrix and bias term of the fully connected layer used to convert metadata features into semantic features;
[0030] The feature fusion layer is used to fuse the document derived feature group with the document multimodal feature group to generate a cross-modal comprehensive feature group. The formula is as follows:
[0031]
[0032] in, represents a cross-modal comprehensive feature group, and They represent the cross-modal semantic comprehensive features and cross-modal structural comprehensive features in the cross-modal comprehensive feature group, respectively. s , β t , γ m , α t and β s They represent the learnable feature fusion weights respectively;
[0033] The multi-head self-attention layer is used to capture different dependencies of the cross-modal comprehensive feature group through multiple attention heads to determine the corresponding multi-head attention features. The formula is as follows:
[0034]
[0035] F attention =Concat(Attention1,...,Attention d ,...,Attention h )·W o
[0036] Where Q represents the query vector, K represents the key vector, and V represents the value vector; W q , W k and W v Denote the weight matrices used to map input features to query space, key space, and value space, respectively. T represents the transpose of the key vector, softmax represents the softmax function, represents the scaling factor, Attention(Q,K,V) represents the single-head attention feature calculated based on Q, K and V, and F attention represents multi-head attention features, Concat represents the feature concatenation function, h represents the number of attention heads, Attention d represents the output feature representation of the d-th attention head, W o Represents the weight matrix used to map the concatenated features back to the original feature dimensions;
[0037] The output layer is used to process the multi-head attention features through a multi-layer perceptron to determine the target power document feature representation:
[0038] F output =MLP(F attention )
[0039] Among them, F output represents the target power document feature representation, and MLP represents the multi-layer perceptron processing function.
[0040] Furthermore, the document feature generation adversarial network training includes:
[0041] At the beginning of each training cycle, the cross-modal feature conversion module is first trained separately, using the preset cross-modal conversion loss function L cmc , update the parameters of the cross-modal conversion module through back-propagation and optimizer:
[0042]
[0043] Where N represents the total number of samples in the data sample set. represents the th derivative feature representation generated by the cross-modal feature conversion module for the th sample, represents the true feature representation of the document multimodal feature group corresponding to the sample, Represents the square of the L2 norm, which is used to calculate the Euclidean distance between two feature representations;
[0044] When training the discriminator of the document feature generative adversarial network, the parameters of the generator and the cross-modal feature conversion module remain fixed; the discriminator is trained using the real document feature representation and the document feature representation generated by the generator, and the discriminator loss L is calculated. D Update the parameters of the discriminator:
[0045]
[0046] in, represents the true document feature representation of the i-th sample, represents the discriminant output of the discriminator on the real feature, -log(1-D(G(z (i) ,c (i) ))) represents the discriminant output of the discriminator on the generated features, G(z (i) ,c (i) ) represents the document feature representation generated by the generator for the i-th sample;
[0047] When training the generator, the parameters of the discriminator remain fixed, and the cross-modal conversion module and the generator are considered as a joint model, with random noise z and conditional input c as input, and the joint loss L is used to train the generator. G Update the parameters of the generator and cross-modal feature conversion modules:
[0048]
[0049] Among them, L G represents the loss function of the generator, z (i) represents the random noise vector of the ith sample, c (i)represents the conditional input of the i-th sample, which is determined according to the multimodal feature group of the document corresponding to the sample, -log(D(G(z (i) ,c (i) ))) is the adversarial loss term, which means that the generator minimizes this term during training so that the discriminator cannot correctly distinguish between generated features and real features. λ represents the weight hyperparameter, which is used to control the balance between the adversarial loss and cross-modal conversion loss of the generator.
[0050] Furthermore, the bin classifier adopts a deep convolutional neural network, including an input layer, a multi-scale convolutional layer, a hole convolutional layer, a pooling layer and a fully connected output layer;
[0051] The input layer is used to receive the target document feature representation;
[0052] The multi-scale convolution layer is used to extract features from the target document feature representation using convolution kernels of different sizes to obtain multi-scale convolution features;
[0053] The atrous convolution layer is used to expand the receptive field using atrous convolution and capture the long-range dependencies of the multi-scale convolution features to determine the corresponding comprehensive atrous convolution features:
[0054]
[0055] in, represents the output feature representation after the l-th layer of hole convolution, represents the dilated convolution kernel of layer l, represents the bias term of the l-th layer of dilated convolution, is the hole output feature of the input multi-scale convolution feature at the l-1 layer, and the hole rate r i It defines the interval between elements in the lth convolution kernel. The dilation rate increases layer by layer with the number of dilated convolution layers. σ represents the activation function.
[0056] The pooling layer is used to process the comprehensive hole convolution features using a global pooling layer to extract corresponding global features:
[0057]
[0058] Among them, X pool represents the global feature after pooling, GlobalPool(·) represents the global pooling operation, It is the comprehensive hole convolution feature, and L represents the total number of hole convolution layers;
[0059] The fully connected output layer is used to process the global features to determine the corresponding target document type:
[0060]
[0061] in, represents the classification probability distribution of the model output, softmax represents the softmax function, and W fc represents the weight matrix of the fully connected layer, b fc Represents the bias term of the fully connected layer.
[0062] Accordingly, the present invention also provides a classification system for power industry documents, comprising:
[0063] An information annotation unit, used to extract key semantic fields, document structure information and attribute metadata information in the target power document to be identified;
[0064] A feature extraction unit, for extracting deep semantic features, document structural features and metadata encoding features according to key semantic fields, document structural information and attribute metadata information based on a semantic feature extraction model, a structural feature extraction model and a metadata encoder;
[0065] A document feature generation unit, used to generate an adversarial network based on the document features, and generate a feature representation of a target power document according to deep semantic features, document structure features and metadata encoding features;
[0066] The document type identification unit is used to determine the category of the target power document according to the feature representation of the target power document based on the document classifier.
[0067] Accordingly, the present invention further provides an electronic device, comprising:
[0068] A memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned classification method for power industry documents is implemented.
[0069] Correspondingly, the present invention also provides a readable storage medium, in which computer instructions are stored, and when the computer instructions are executed by a processor, the above-mentioned classification method of power industry documents is implemented.
[0070] The beneficial effects of the present invention are as follows: (1) By introducing the annotation of key semantic fields, document structure information and attribute metadata information in the classification and analysis process of power industry documents, the limitations of the existing technology that simply relies on keyword matching or rule engine technology are effectively solved. The extraction of semantic features can more accurately capture the core content of the document, the annotation of structural information ensures the reasonable classification of documents with different layout structures, and the addition of metadata information further improves the accuracy of classification. Through the above-mentioned feature combination, the accuracy of document classification is significantly improved when processing power industry documents with complex professional terms and diverse expressions.
[0071] (2) By introducing a feature extraction model, the multimodal features of documents can be extracted from three levels: semantics, structure, and metadata. The semantic feature extraction model focuses on deep semantic understanding, the structural feature extraction model focuses on the layout and organization of the document, and the metadata encoder encodes the attribute background information of the document. In this way, the accuracy of multimodal feature extraction is guaranteed, and while recognizing structured documents with diverse formats, unstructured data can also be effectively classified.
[0072] (3) By using document feature generative adversarial networks (GAN) to generate target document feature representations, it is possible to generate richer and more universal document feature representations from multimodal feature groups, which can effectively cope with the diverse and dynamically evolving document content forms and expressions in the power industry and achieve higher robustness. In addition, through the document classifier based on deep convolutional neural networks, it is possible to automatically learn and adjust classification rules to adapt to the content forms of various new document types, thereby significantly reducing the maintenance cost and complexity of the system and improving the scalability and flexibility of the classification system.
[0073] Through this technical solution, by accurately annotating the semantics, structure and metadata of power industry documents and combining the powerful feature extraction and classification capabilities of generative adversarial networks and deep convolutional neural networks, the accuracy, robustness and system flexibility of power industry document classification are significantly improved, realizing the support capabilities for daily operation management and decision-making in the power industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0075] Figure 1 Schematic diagram of the process of the classification method of the present invention.
[0076] Figure 2 Schematic diagram of the structure of the semantic feature extraction model in this embodiment.
[0077] Figure 3 Schematic diagram of the structure of the structural feature extraction model in this embodiment.
[0078] Figure 4 Schematic diagram of the structure of the generator of the adversarial network generated by document features in this embodiment.
[0079] Figure 5 This is a training flowchart for generating an adversarial network for document features in this embodiment.
[0080] Figure 6 Schematic diagram of the structural connection of the document classifier in this embodiment.
[0081] Figure 7 It is a schematic diagram of the structure of the classification system of the present invention. DETAILED DESCRIPTION
[0082] The present invention is further described below in conjunction with the accompanying drawings:
[0083] It should be noted that the documents in the power industry have semantic complexity, format diversity, domain knowledge dependence and real-time requirements. Traditional power industry document processing technology is difficult to meet the current industry's demand for efficient and accurate classification. Specifically, power industry documents usually contain a large number of technical terms and domain-specific expressions, and the semantic relationships are complex. In addition, the formats of power industry documents are diverse, including both structured data (such as tables and charts) and a large amount of unstructured text data. Document processing in the power industry often needs to rely on domain knowledge. In addition, with the acceleration of the informatization process of the power industry, the amount of document data is growing exponentially. These documents are not only huge in number, but also require rapid processing and classification to support the real-time operation and decision-making of the power system.
[0084] The present invention proposes a classification method for power industry documents, such as Figure 1 As shown, the following steps are included:
[0085] S1. Extract key semantic fields, document structure information and attribute metadata information from the target power document to be identified;
[0086] The key semantic field is information used to describe the core content of the power document;
[0087] The document structure information is information used to describe the layout structure of the power document content;
[0088] The attribute metadata information includes document creation time, filer information, geographic location information, document data volume and document access permission settings;
[0089] S2. Inputting key semantic fields, document structure information and attribute metadata information into the semantic feature extraction model, structural feature extraction model and metadata encoder respectively for feature extraction to obtain a multimodal feature group of the power document;
[0090] The multimodal feature group includes deep semantic features, document structured features and metadata encoding features;
[0091] S3. Inputting the multimodal feature group feature group into the document feature generation adversarial network to obtain the corresponding target power document feature representation;
[0092] S4. Determine the target power document type that matches the target power document feature representation based on the document classifier. Through the above method, the accuracy, robustness and system flexibility of document classification in the power industry are significantly improved.
[0093] In this embodiment, in step S1, key semantic fields, document structure information and attribute metadata information in the target power document to be identified are extracted;
[0094] The key semantic fields are information used to describe the core content of the power document; illustratively, they can be located and marked by field matching of knowledge points in the power knowledge base. In addition, natural language processing (NLP) technology can be used to perform preliminary word segmentation and grammatical analysis on the text content in the document to identify key terms and phrases related to the power industry.
[0095] The document structure information is information used to describe the layout structure of the content of the power document; it can be identified using the document's format symbols, such as separators, main titles, chapters, subtitles, tables, etc., and processed according to various predefined structural format standards. In addition, the document's layout structure information can also be identified by parsing the document's format tags (such as HTML tags, XML tags) or positional relationships, thereby marking the location information of various document components and their hierarchical relationships.
[0096] The attribute metadata information includes document creation time, filing personnel information, geographic location information, document data volume and document access permission settings; illustratively, it can be processed by reading document metadata (such as file header information, internal records, etc.).
[0097] Therefore, a multi-dimensional annotated power document is constructed by annotating key semantic fields, document structure information, and attribute metadata information, ensuring that the core content, structural layout, and contextual information of the document can be captured efficiently.
[0098] In this embodiment, in step S2, the key semantic fields, document structure information and attribute metadata information are respectively input into the semantic feature extraction model, the structural feature extraction model and the metadata encoder for feature extraction to obtain a multimodal feature group of the power document;
[0099] The multimodal feature group includes deep semantic features, document structure features and metadata encoding features
[0100] Furthermore, the semantic feature extraction model includes a fragment extraction module, a BERT model module and a feature aggregation module; Figure 2 As shown;
[0101] The fragment interception module is used to intercept the contextual content corresponding to each key semantic field from the target power document, and construct each semantic fragment according to each key semantic field and the corresponding contextual content; it should be noted that the power industry documents often contain a large number of technical terms and specific background information, and are often long. By taking the annotated key semantic fields as a guide, the key semantic fields and their contextual content are intercepted from the target power document, so that the model can focus on the most important semantic information in the document, which not only reduces the interference of noise data, but also ensures the accurate capture of the core content of the document. In this way, the semantic analysis of the document can be carried out effectively and quickly, ensuring that key information is processed first, thereby enhancing the accuracy of semantic feature extraction.
[0102] The BERT model module is used to encode each of the semantic fragments using a bidirectional attention mechanism to determine the corresponding fragment feature vectors respectively; it should be noted that the BERT (Bidirectional Encoder Representations from Transformers) model uses a bidirectional attention mechanism for encoding, so that each semantic fragment can be processed within the global scope of the context. The bidirectional attention mechanism not only takes into account the influence of the context, but also captures complex semantic dependencies and long-distance dependencies, can identify the implicit semantics in the power industry documents and the relationship between complex terms, can generate fragment feature vectors with more semantic depth, and effectively enhances the understanding and expression of the document content.
[0103] The feature aggregation module is used to aggregate the feature vectors of each segment, and can integrate information from different semantic segments to generate a comprehensive deep semantic feature, which can help to comprehensively understand the document in a global scope, especially when the document content is long and involves multiple technical topics. As a result, the overall semantic understanding ability of the model when processing long documents and multi-topic documents is improved, and more complex document analysis tasks can be effectively handled.
[0104] By adopting the fragment capture module, BERT model module and feature aggregation module, the semantic feature extraction model has made significant improvements in key semantic information extraction, deep semantic understanding, semantic information fusion and document classification accuracy. It can better extract richer and more accurate deep semantic features from complex technical documents in the power industry.
[0105] Furthermore, the structural feature extraction model includes a topic model module, a structure tree construction module and a Tree-LSTM module; Figure 3 As shown;
[0106] The topic model module is used to divide the target power document into multiple topic blocks; a topic model based on Latent Dirichlet Allocation (LDA) or Non-negative Matrix Factorization (NMF) can be used to analyze the target power document and divide the document content into multiple topic blocks. Specifically, by setting the number of topics and the number of iterations, it can be ensured that the document is reasonably divided and that there is a high degree of semantic consistency between the topic blocks. Therefore, through the introduction of the topic model, the document content can be effectively divided into blocks according to semantics, ensuring the semantic consistency and independence of each topic block after segmentation.
[0107] The target power document is divided into multiple topic blocks through the topic model module, which helps to identify different technical topics in the document, making the analysis of complex documents more orderly, and can organize the document content by topic, making the document's topic structure clearer.
[0108] The structure tree construction module is used to perform a topic hierarchy analysis on the multiple topic blocks to determine the initial topic tree structure corresponding to the multi-level topic hierarchy, and optimize the initial topic tree structure through the marked document structure information to determine the corresponding structure tree; hierarchical clustering is performed on each topic block to form an initial topic tree structure, which includes multiple levels, each level represents a semantic level of the document, the top level is the global topic, and the bottom level is the specific content topic block. Specifically, for each topic block, by analyzing the correlation or contextual relationship between the topics, the main topic and sub-topics are further identified, which can be determined by the co-occurrence probability between the topics or the document-specific structural information (such as chapter titles). Then, the main topic block is used as the upper structure node of the document, and the sub-topic block is used as the lower structure node to generate a tree structure, and the main topic node is connected to the corresponding sub-topic node, thereby reflecting the hierarchical relationship of the document.
[0109] Furthermore, the preliminary structural information marked by formatting symbols or page structures is integrated with the structural information based on topic segmentation, for example, by content similarity. Then, the final structure tree of the document is generated using the integrated structural information, in which the root node represents the overall structure of the document, and the internal tree nodes represent the hierarchical relationship between different topic blocks.
[0110] By performing hierarchical analysis on multiple topic blocks, an initial multi-level topic tree structure is generated, and the initial structure is optimized by combining the previously annotated document structure information, so that the generated structure tree is more consistent with the actual layout and logical relationship of the document, and can effectively reveal the hierarchical structure and topic relationship of power industry documents.
[0111] The Tree-LSTM module is used to recursively process the subject nodes in the structure tree, and finally generate the global structure representation of the root node by constructing the hidden state representation of the subject node layer by layer to determine the corresponding document structured features. Specifically, the Tree-LSTM module can recursively process each node in the structure tree, starting from the leaf node of the tree, and gradually processing upward until the root node. Here, the state representation (hidden state) of each node not only depends on its own content features, but also combines the aggregate information of its child nodes. At each node, the Tree-LSTM module will aggregate according to the hidden state of the child node, and control the flow of information and the update of the state through a gating mechanism (such as an input gate, a forget gate, and an output gate) to effectively capture the hierarchical relationship and structural information inside the document. Finally, the hidden state of the root node can represent the global features of the entire document, which integrates the global hierarchical structure and local information of the document content.
[0112] Through the Tree-LSTM module, each topic node in the structure tree is recursively processed, the information of each topic node is aggregated layer by layer, and finally a global structural representation of the root node is generated, which effectively captures the dependency relationship and hierarchical information between topic nodes and generates a global representation that fully reflects the structural characteristics of the document.
[0113] In the structural feature extraction model provided in the embodiment of the present application, the topic model, structure tree construction and Tree-LSTM are comprehensively applied to accurately identify and organize document topics, mine document hierarchical structures, recursively process multi-level structural information, improve the logic and accuracy of document classification, and ensure that feature representations corresponding to deep structural information can be generated for various complex power industry documents.
[0114] Furthermore, the metadata encoder is a type-aware encoder, which is used to identify the data type of each metadata parameter in the attribute metadata information, and encode the corresponding metadata parameter according to the identified data type to obtain the corresponding encoding feature, and obtain the corresponding metadata encoding feature by splicing each of the encoding features. Here, the attribute metadata information (such as creation time, geographic location, author information, etc.) marked in the document is parsed into a standardized format through the metadata encoder, and then these metadata are converted into high-dimensional feature vectors through the embedding layer. Specifically, the attribute metadata information of the document is classified, such as numerical metadata (such as document creation time and document data volume, etc.), type-based metadata (such as archiving personnel information, geographic location information and document access permission settings, etc.), and it is diverted to the corresponding encoding path, so that the corresponding encoding strategy is adopted for each type of information.
[0115] Specifically, the numerical metadata is standardized, and the Min-Max normalization or Z-score normalization is used to map the numerical data to [0,1] or the standard normal distribution. Then, a simple linear transformation or a multi-layer perceptron is used to convert the standardized numerical data into a fixed-dimensional feature vector. For categorical metadata, an embedding layer is used to map it to a fixed-dimensional dense vector, so that it is encoded into a feature vector according to the category of these categorical data. Finally, the feature vector of the numerical metadata is concatenated with the embedding vector of the categorical metadata to generate a unified metadata encoding feature.
[0116] The type-aware encoder can automatically identify the data type (such as numeric, categorical, textual, etc.) of each metadata parameter in the attribute metadata information, and select the most appropriate encoding strategy according to different data types. For numeric metadata, standardization or normalization is used; for categorical metadata, an embedding layer is used for encoding to achieve personalized encoding methods, ensuring that each type of metadata can be processed effectively and accurately.
[0117] It should be understood that the types of various feature extraction modules can be diverse. For example, the semantic feature extraction model can use various language models (for example, BERT model, GPT model, etc.) to extract deep semantic features in power documents, the structural feature extraction model can use Convolutional Neural Networks (CNN) or Graph Neural Network (GNN) to extract the structured features of the document, and the metadata encoder can use an embedding layer or a multilayer perceptron (MLP) to digitally express the metadata, and convert information such as creation time and access rights into an operational feature vector. Therefore, in the process of document classification, the combination of semantic information, structural information and metadata information can more comprehensively understand the content and background of the document, and the multi-level feature extraction process can help the classifier more accurately determine the type and purpose of complex power industry documents.
[0118] In this embodiment, in step S3, the multimodal feature group is input into a document feature generation adversarial network to obtain a corresponding target power document feature representation;
[0119] The multimodal feature group extracted from the annotated power document is input into the generator of the document feature generative adversarial network. The role of the generator is to generate a realistic target document feature representation based on the multimodal feature group, which can effectively represent the essential characteristics of the input document. The document feature generative adversarial network can adopt a cross-modal generative adversarial network. Specifically, a cross-modal feature conversion module is set in the generator of the document feature generative adversarial network to map and convert different modalities (such as semantic features, structural features, metadata features) to each other, so that these features can be fused and processed in a unified feature space, ensuring that the generator can effectively utilize information from different sources to generate more accurate document feature representations.
[0120] The generator of the document feature generation adversarial network comprises an input layer, a cross-modal feature conversion module, a feature fusion layer, a multi-head self-attention layer and an output layer; Figure 4 As shown;
[0121] The input layer is used to receive the multimodal feature group of the power document;
[0122] The cross-modal feature conversion module is used to perform cross-modal feature conversion on the multi-modal feature group of the power document to obtain the corresponding document-derived feature group. It should be noted that the goal of cross-modal feature conversion is to map the features of each modality to a common feature space so that they can be effectively fused in subsequent processing. Specifically, semantic features, structural features, and metadata features each have different characteristics and dimensions, and direct fusion may result in information loss or inconsistency. Therefore, through cross-modal conversion, these features can be unified into the same representation space before subsequent processing and fusion.
[0123] The conversion is as follows:
[0124]
[0125] in, and They represent the derived structural features, the first derived semantic features, and the second derived semantic features in the document derived feature group, respectively. s 、F t and F m They represent the deep semantic features, document structure features and metadata encoding features in the multimodal feature group of the power document, σ represents the activation function, and W s→t and b s→t They represent the weight matrix and bias term of the fully connected layer used to transform semantic features into structural feature representations; W t→s and b t→s They represent the weight matrix and bias term of the fully connected layer used to convert structural features into semantic features; Wm→s and b m→s They respectively represent the weight matrix and bias term of the fully connected layer used to convert metadata features into semantic features; through the above cross-modal feature conversion process, the generator can map the originally separated semantic, structural and metadata features into a common representation space, which not only makes the features of different modalities more compatible in numerical terms.
[0126] The cross-modal feature conversion module can be implanted into the generator after pre-training convergence, and the parameters of the cross-modal feature conversion module are no longer updated during the generator training optimization process. The cross-modal feature conversion module and the generator can also be jointly trained. In this way, joint training is performed under the overall framework of GAN, and the adversarial learning mechanism of GAN can be used to allow the generator (including the cross-modal conversion module) to gradually generate higher quality target features. More details will be expanded in conjunction with other examples below.
[0127] The feature fusion layer is used to fuse the document derived feature group with the document multimodal feature group to generate a cross-modal comprehensive feature group. The formula is as follows:
[0128]
[0129] in, represents a cross-modal comprehensive feature group, and They represent the cross-modal semantic comprehensive features and cross-modal structural comprehensive features in the cross-modal comprehensive feature group, respectively. s , β t , γ m , α t and β s They represent the learnable feature fusion weights respectively;
[0130] In this way, the document multimodal feature group and the document derived feature group are weightedly fused through the weight adaptive feature fusion mechanism. When processing different features, the weight of each feature will be dynamically adjusted to highlight the feature information most relevant to the generation task, which can help generate feature representations with high discrimination.
[0131] The multi-head self-attention layer is used to capture the different dependencies of the cross-modal comprehensive feature group through multiple attention heads to determine the corresponding multi-head attention features. It should be noted that the multi-head self-attention mechanism introduces multiple attention heads to focus on the relationship between input features from different angles. Each attention head independently calculates the attention weight and performs a weighted combination of the features to ensure that the model can fully understand the inherent correlation of the input features from multiple dimensions.
[0132] The formula is as follows:
[0133]
[0134] F attention =Concat(Attention1,…,Attention d ,…,Attention h )·W o
[0135] Where Q represents the query vector, K represents the key vector, and V represents the value vector; W q , W k and W v Denote the weight matrices used to map input features to query space, key space, and value space, respectively. T represents the transpose of the key vector, softmax represents the softmax function, represents the scaling factor, Attention(Q,K,V represents the single-head attention feature calculated based on Q, K and V, F attention represents multi-head attention features, Concat represents the feature concatenation function, h represents the number of attention heads, Attention d represents the output feature representation of the d-th attention head, W o Represents the weight matrix used to map the concatenated features back to the original feature dimensions;
[0136] Through multiple parallel attention heads, it is possible to focus on feature information at different levels at the same time, which not only enriches the feature expression, but also enhances the ability to capture fine-grained features, making the features generated by the model more diverse and detailed, and can accurately distinguish different categories of technical documents.
[0137] The output layer is used to process the multi-head attention features through a multi-layer perceptron to determine the target power document feature representation:
[0138] F output =MLP(F attention )
[0139] Among them, F output represents the target power document feature representation, and MLP represents the multi-layer perceptron processing function.
[0140] Here, the multilayer perceptron processes input features through multi-layer linear transformations and nonlinear activation functions, and can capture complex feature patterns in high-dimensional space, so that the final document feature representation not only contains the original information, but also has been deeply processed and has a higher level of abstraction, which can better support downstream classification tasks.
[0141] Through the embodiments of the present application, the generator can efficiently process document information of complex types and diverse structures in the power industry through the combined effects of cross-modal conversion, attention mechanism and multi-layer perceptron, and the generated document feature representation has a high degree of accuracy and adaptability.
[0142] Furthermore, the document feature generates training of the adversarial network, such as Figure 5 As shown, here, the adversarial network generated for document features can be trained in a joint manner, including:
[0143] At the beginning of each training cycle, the cross-modal feature conversion module is first trained separately, using the preset cross-modal conversion loss function L cmc , update the parameters of the cross-modal conversion module through back-propagation and optimizer:
[0144]
[0145] Where N represents the total number of samples in the data sample set. represents the th derivative feature representation generated by the cross-modal feature conversion module for the th sample, represents the true feature representation of the document multimodal feature group corresponding to the sample, Represents the square of the L2 norm, which is used to calculate the Euclidean distance between two feature representations;
[0146] Here, at the beginning of each training cycle (Epoch), the cross-modal feature conversion module is optimized separately so that it gradually learns or is able to preliminarily map the input multimodal features to a common feature space.
[0147] When training the discriminator of the document feature generative adversarial network, the parameters of the generator and the cross-modal feature conversion module remain fixed; the discriminator is trained using the real document feature representation and the document feature representation generated by the generator, and the discriminator loss L is calculated. D Update the parameters of the discriminator:
[0148]
[0149] in, represents the true document feature representation of the i-th sample, represents the discriminant output of the discriminator on the real feature, -log(1-D(G(z (i) ,c (i) ))) represents the discriminant output of the discriminator on the generated features, G(z (i) ,c (i) ) represents the document feature representation generated by the generator for the i-th sample;
[0150] During the joint training process, the discriminator continuously improves its ability to distinguish between real features and generated features through adversarial learning with the generator. The optimization of the discriminator not only improves its sensitivity to generated features, but also enables it to more accurately identify complex feature representations after multimodal fusion, thereby prompting the generator to generate more realistic document features and improving the generation quality of the entire system.
[0151] When training the generator, the parameters of the discriminator remain fixed, and the cross-modal conversion module and the generator are considered as a joint model, with random noise z and conditional input c as input, and the joint loss L is used to train the generator. G Update the parameters of the generator and cross-modal feature conversion modules:
[0152]
[0153] Among them, L G represents the loss function of the generator, z (i) represents the random noise vector of the ith sample, c (i) represents the conditional input of the i-th sample, which is determined according to the multimodal feature group of the document corresponding to the sample, -log(D(G(z (i) ,c (i) ))) is the adversarial loss term, which means that the generator minimizes this term during training so that the discriminator cannot correctly distinguish between generated features and real features. λ represents the weight hyperparameter, which is used to control the balance between the adversarial loss and cross-modal conversion loss of the generator.
[0154] In the joint training process, random noise and conditional input based on multimodal features are introduced to enable the generator to generate diverse feature representations. The generator is constantly challenged by the discriminator during the training process, prompting it to generate diverse and robust features, thereby improving its adaptability in different document types and classification tasks.
[0155] Here, according to the change in loss during training, the learning rate of the cross-modal feature conversion module and the generator can be dynamically adjusted to prevent overfitting or slow convergence. In addition, according to the actual optimization effect, the hyperparameters in the loss function can be appropriately adjusted to better balance the optimization of the generator and cross-modal conversion module.
[0156] Therefore, by minimizing the joint loss, the generator must not only generate realistic features, but also ensure the accuracy of cross-modal conversion, so that the final generated features meet the requirements of cross-modal conversion and can deceive the discriminator.
[0157] It should be noted that after each training cycle, the changes in the joint loss function (including cross-modal conversion loss and generator loss) are monitored to ensure the correct training direction. The training process is repeated until the model converges, that is, the features generated by the generator cannot be effectively distinguished by the discriminator, and the conversion accuracy of the cross-modal conversion module reaches the optimal level. In addition, the performance of the generator can be regularly evaluated on the validation set to avoid overfitting.
[0158] Through the joint training method provided in the embodiment of the present application, the cross-modal feature conversion module and the generator work together under the same optimization framework, so that the features of different modalities (such as semantic features, structural features and metadata features) can be efficiently integrated in a unified feature space. In addition, the generator needs to satisfy the dual constraints of multimodal conversion and discriminator when generating features, ensuring that the document features generated by the generator are more semantically consistent, thereby improving the quality and accuracy of the generated features.
[0159] It should be understood that the document feature generation adversarial network includes a generator and a discriminator. The generator generates the target document feature representation to deceive the discriminator, and the discriminator tries to determine whether the generated feature representation is real. Through this adversarial training mechanism, the generator continuously optimizes the generated feature representation to make it closer to the characteristics of the real document. It can show stronger robustness and generalization ability when facing various complex power documents, thereby improving the accuracy of document classification.
[0160] In this embodiment, in step S4, the target power document type that matches the target power document feature representation is determined based on the document classifier. It should be noted that for the document classifier, the CNN model backbone can better realize local feature capture and identify local feature patterns (such as phrases, local semantic structures) in data features, and because the calculation process is highly parallelized, it has high computational efficiency. However, the traditional CNN structure is limited by the local receptive field, and it is generally difficult to capture long-distance dependencies or global semantic information in the document. In view of this, in this embodiment, the document classifier adopts a multi-scale void convolutional neural network;
[0161] The bin classifier adopts a deep convolutional neural network, including an input layer, a multi-scale convolution layer, a hole convolution layer, a pooling layer and a fully connected output layer. Figure 6 As shown;
[0162] The input layer is used to receive the target document feature representation;
[0163] The multi-scale convolution layer is used to extract features from the target document feature representation using convolution kernels of different sizes to obtain multi-scale convolution features; through the multi-scale convolution layer, the model can simultaneously process local details (such as specific terms, paragraph structure) and global semantic information (such as the theme and direction of the entire document) in the document, and enhance the expressiveness of the classifier through multi-scale feature fusion.
[0164] The atrous convolution layer is used to expand the receptive field using atrous convolution and capture the long-range dependencies of the multi-scale convolution features to determine the corresponding comprehensive atrous convolution features:
[0165]
[0166] in, represents the output feature representation after the l-th layer of hole convolution, represents the dilated convolution kernel of layer l, represents the bias term of the l-th layer of dilated convolution, is the hole output feature of the input multi-scale convolution feature at the l-1 layer, and the hole rate r i It defines the interval between elements in the lth convolution kernel. The dilation rate increases layer by layer with the number of dilated convolution layers. σ represents the activation function.
[0167] For long documents or power industry documents containing complex contextual relationships, the receptive field of the model is significantly expanded through the layer-by-layer increasing void ratio mechanism of the void convolution layer, which can capture long-distance dependencies in the document, help improve the classifier's understanding of global semantic information, and help to classify documents more accurately.
[0168] Since multi-scale convolution can extract features from different spatial scales and dilated convolution can expand the receptive field, the model can maintain high classification accuracy and robustness when facing different types of documents.
[0169] The pooling layer is used to process the comprehensive hole convolution features using a global pooling layer to extract corresponding global features:
[0170]
[0171] Among them, X pool represents the global feature after pooling, GlobalPool(·) represents the global pooling operation, It is the comprehensive hole convolution feature, and L represents the total number of hole convolution layers;
[0172] Through global pooling processing, the final feature representation is made more compact and representative, reducing the interference of redundant information.
[0173] The fully connected output layer is used to process the global features to determine the corresponding target document type:
[0174]
[0175] in, represents the classification probability distribution of the model output, softmax represents the softmax function, and W fc represents the weight matrix of the fully connected layer, b fc Represents the bias term of the fully connected layer.
[0176] Through the efficient processing of the fully connected output layer, the classifier can quickly and accurately complete the document classification task, which can significantly improve work efficiency.
[0177] It should be noted that since power industry documents often contain complex technical terms, standards and specifications, these contents not only have subtle local characteristics but also contain extensive contextual dependencies.
[0178] The document classifier provided in the embodiment of the present application effectively integrates and utilizes the semantic features, structural features and metadata features in the feature representation of the target document through the combination of multi-scale and void convolution, so as to better understand and classify these complex structured documents and avoid classification errors caused by ignoring global semantics or dependencies.
[0179] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of actions combined, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application. In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0180] By using a deep convolutional neural network (DCNN) to classify the input target document feature representation, useful classification information can be effectively extracted from the input features. Through the step-by-step operation of the convolution layer and the pooling layer, the local patterns in the features are captured and integrated to ultimately determine the category of the document, such as operation reports, equipment maintenance records, fault analysis reports, etc.
[0181] The document classifier can be trained using a supervised learning method by using a large number of power documents with labeled categories. By continuously adjusting the network parameters, the classifier can gradually learn to identify different categories of power documents and improve the accuracy of classification. Preferably, during the training process, a regularization method can also be introduced to prevent overfitting problems and ensure that the model can still perform well on unseen document types.
[0182] Through the above method, combined with the multimodal feature extraction of deep semantic features, document structured features and metadata encoding features, a generative adversarial network is used to generate realistic feature representations of target documents, and finally classified through a deep convolutional neural network, the efficient and accurate classification of documents in the power industry is achieved. As a result, it shows stronger adaptability, robustness and generalization ability when processing documents with complex semantics and different formats, greatly improving the accuracy and efficiency of document classification, and effectively supporting the decision-making and operation management of the power industry.
[0183] Accordingly, the present invention also provides a classification system for power industry documents, such as Figure 7 As shown, including:
[0184] An information annotation unit is used to extract key semantic fields, document structure information and attribute metadata information from the target power document to be identified; the key semantic fields are information used to describe the core content of the document, and the document structure information is information used to describe the layout structure of the document content; the attribute metadata information includes document creation time, filing personnel information, geographic location information, document data volume and document access permission settings.
[0185] The feature extraction unit is used to extract deep semantic features, document structural features and metadata encoding features according to key semantic fields, document structural information and attribute metadata information based on the semantic feature extraction model, structural feature extraction model and metadata encoder.
[0186] A document feature generation unit, used to generate an adversarial network based on the document features, and generate a feature representation of a target power document according to deep semantic features, document structure features and metadata encoding features;
[0187] The document type identification unit is used to determine the category of the target power document according to the feature representation of the target power document based on the document classifier.
[0188] Accordingly, the present invention further provides an electronic device, comprising:
[0189] A memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned classification method for power industry documents is implemented.
[0190] The device for executing the method for classifying electric power industry documents may further include: an input device and an output device.
[0191] The processor, memory, input device and output device may be connected via a bus or other means.
[0192] As a non-volatile computer-readable storage medium, the memory can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the classification method of the electric power industry documents in the embodiment of the present application. The processor executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory, that is, the classification method of the electric power industry documents in the above method embodiment is realized.
[0193] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0194] The input device can receive input digital or character information and generate signals related to user settings and function control of the electronic device. The output device can include display devices such as display screens.
[0195] The one or more modules are stored in the memory, and when executed by the one or more processors, the classification method for electric power industry documents in any of the above method embodiments is executed.
[0196] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of the present application.
[0197] The electronic devices of the embodiments of the present application exist in various forms, including but not limited to:
[0198] (1) Mobile communication equipment: This type of equipment is characterized by having mobile communication functions and its main purpose is to provide voice and data communications. This type of terminal includes: smart phones, multimedia phones, functional phones, and low-end phones.
[0199] (2) Ultra-mobile personal computer devices: These devices belong to the category of personal computers, have computing and processing functions, and generally also have mobile Internet access features. These terminals include: PDA, MID and UMPC devices, etc.
[0200] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players, handheld game consoles, e-books, smart toys, and portable car navigation devices.
[0201] (4) Other onboard electronic devices with data interaction functions, such as on-board devices installed in vehicles.
[0202] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0203] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0204] Accordingly, the present invention also provides a readable storage medium, which stores one or more programs including execution instructions, and the execution instructions can be read and executed by electronic devices (including but not limited to computers, servers, or network devices, etc.) to execute the steps of any of the above-mentioned methods for classifying power industry documents in the present application.
[0205] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution 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 solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.
Claims
1. A classification method for power industry documents, characterized by: The following steps are involved: S1. Extract key semantic fields, document structure information and attribute metadata information from the target power document to be identified; The key semantic field is information used to describe the core content of the power document; The document structure information is information used to describe the layout structure of the power document content; The attribute metadata information includes document creation time, filer information, geographic location information, document data volume and document access permission settings; S2. Inputting key semantic fields, document structure information and attribute metadata information into the semantic feature extraction model, structural feature extraction model and metadata encoder respectively for feature extraction to obtain a multimodal feature group of the power document; The multimodal feature group includes deep semantic features, document structured features and metadata encoding features; S3. Inputting the multimodal feature group feature group into the document feature generation adversarial network to obtain the corresponding target power document feature representation; S4. Determine a target power document type that matches the target power document feature representation based on a document classifier.
2. The method for classifying documents of the electric power industry according to claim 1 is characterized by: The semantic feature extraction model includes a fragment extraction module, a BERT model module and a feature aggregation module; The segment interception module is used to intercept the context content corresponding to each key semantic field from the target power document, and construct each semantic segment according to each key semantic field and the corresponding context content; The BERT model module is used to perform a bidirectional attention mechanism encoding on each of the semantic segments to respectively determine the corresponding segment feature vectors; The feature aggregation module is used to aggregate the feature vectors of each segment to determine the corresponding deep semantic features.
3. The method for classifying documents of the electric power industry according to claim 1 is characterized by: The structural feature extraction model includes a topic model module, a structure tree construction module and a Tree-LSTM module; The topic model module is used to segment the target power document into a plurality of topic blocks; The structure tree construction module is used to perform a topic hierarchy analysis on the multiple topic blocks to determine an initial topic tree structure corresponding to the multi-level topic hierarchy, and optimize the initial topic tree structure through the annotated document structure information to determine a corresponding structure tree; The Tree-LSTM module is used to recursively process the topic nodes in the structure tree, and finally generate a global structure representation of the root node by constructing the hidden state representation of the topic nodes layer by layer to determine the corresponding document structured features.
4. The method for classifying documents of the electric power industry according to claim 1 is characterized by: The metadata encoder is a type-aware encoder, which is used to identify the data type of each metadata parameter in the attribute metadata information, and encode the corresponding metadata parameter according to the identified data type to obtain the corresponding encoding feature, and obtain the corresponding metadata encoding feature by splicing each of the encoding features.
5. The method for classifying documents of the electric power industry according to claim 1 is characterized by: The generator of the document feature generation adversarial network includes an input layer, a cross-modal feature conversion module, a feature fusion layer, a multi-head self-attention layer and an output layer; The input layer is used to receive the multimodal feature group of the power document; The cross-modal feature conversion module is used to perform cross-modal feature conversion on the multi-modal feature group of the power document to obtain a corresponding document derived feature group, and the conversion method is as follows: in, and They represent the derived structural features, the first derived semantic features, and the second derived semantic features in the document derived feature group, respectively. s 、F t and F m They represent the deep semantic features, document structure features and metadata encoding features in the multimodal feature group of the power document, σ represents the activation function, and W s→t and b s→t They represent the weight matrix and bias term of the fully connected layer used to transform semantic features into structural feature representations; W t→s and b t→s They represent the weight matrix and bias term of the fully connected layer used to convert structural features into semantic features; W m→s and b m→s They represent the weight matrix and bias term of the fully connected layer used to convert metadata features into semantic features; The feature fusion layer is used to fuse the document derived feature group with the document multimodal feature group to generate a cross-modal comprehensive feature group. The formula is as follows: in, represents a cross-modal comprehensive feature group, and They represent the cross-modal semantic comprehensive features and cross-modal structural comprehensive features in the cross-modal comprehensive feature group, respectively. s , β t , γ m , α t and β s They represent the learnable feature fusion weights respectively; The multi-head self-attention layer is used to capture different dependencies of the cross-modal comprehensive feature group through multiple attention heads to determine the corresponding multi-head attention features. The formula is as follows: F attention =Concat(Attention1,…,Attention d ,…,Attention h )·W o Where Q represents the query vector, K represents the key vector, and V represents the value vector; W q , W k and W v Denote the weight matrices used to map input features to query space, key space, and value space, respectively. T represents the transpose of the key vector, softmax represents the softmax function, represents the scaling factor, Attention(Q,K,V) represents the single-head attention feature calculated based on Q, K and V, and F attention represents multi-head attention features, Concat represents the feature concatenation function, h represents the number of attention heads, Attention d represents the output feature representation of the d-th attention head, W o Represents the weight matrix used to map the concatenated features back to the original feature dimensions; The output layer is used to process the multi-head attention features through a multi-layer perceptron to determine the target power document feature representation: F output =MLP(F attention ) Among them, F output represents the target power document feature representation, and MLP represents the multi-layer perceptron processing function.
6. The method for classifying documents of the electric power industry according to claim 5 is characterized by: The document feature generation adversarial network training includes: At the beginning of each training cycle, the cross-modal feature conversion module is first trained separately, using the preset cross-modal conversion loss function L cmc , update the parameters of the cross-modal conversion module through back-propagation and optimizer: Where N represents the total number of samples in the data sample set. represents the th derivative feature representation generated by the cross-modal feature conversion module for the th sample, represents the true feature representation of the document multimodal feature group corresponding to the sample, Represents the square of the L2 norm, which is used to calculate the Euclidean distance between two feature representations; When training the discriminator of the document feature generative adversarial network, the parameters of the generator and the cross-modal feature conversion module remain fixed; the discriminator is trained using the real document feature representation and the document feature representation generated by the generator, and the discriminator loss L is calculated. D Update the parameters of the discriminator: in, represents the true document feature representation of the i-th sample, represents the discriminant output of the discriminator on the real feature, -log(1-D(G(z (i) ,c (i) ))) represents the discriminant output of the discriminator on the generated features, G(z (i) ,c (i) ) represents the document feature representation generated by the generator for the i-th sample; When training the generator, the parameters of the discriminator remain fixed, and the cross-modal conversion module and the generator are considered as a joint model, with random noise z and conditional input c as input, and the joint loss L is used to train the generator. G Update the parameters of the generator and cross-modal feature conversion modules: Among them, L G represents the loss function of the generator, z (i) represents the random noise vector of the i-th sample, c (i) represents the conditional input of the i-th sample, which is determined according to the multimodal feature group of the document corresponding to the sample, -log(D(G(z (i) ,c (i) ))) is the adversarial loss term, which means that the generator minimizes this term during training so that the discriminator cannot correctly distinguish between generated features and real features. λ represents the weight hyperparameter, which is used to control the balance between the adversarial loss and cross-modal conversion loss of the generator.
7. The method for classifying documents of the electric power industry according to claim 1 is characterized by: The classification classifier adopts a deep convolutional neural network, including an input layer, a multi-scale convolution layer, a hole convolution layer, a pooling layer and a fully connected output layer; The input layer is used to receive the target document feature representation; The multi-scale convolution layer is used to extract features from the target document feature representation using convolution kernels of different sizes to obtain multi-scale convolution features; The atrous convolution layer is used to expand the receptive field using atrous convolution and capture the long-range dependencies of the multi-scale convolution features to determine the corresponding comprehensive atrous convolution features: in, represents the output feature representation after the l-th layer of hole convolution, represents the dilated convolution kernel of layer l, represents the bias term of the l-th layer of dilated convolution, is the hole output feature of the input multi-scale convolution feature at the l-1 layer, and the hole rate r i It defines the interval between elements in the lth convolution kernel. The dilation rate increases layer by layer with the number of dilated convolution layers. σ represents the activation function. The pooling layer is used to process the comprehensive hole convolution features using a global pooling layer to extract corresponding global features: Among them, X pool represents the global feature after pooling, GlobalPool(·) represents the global pooling operation, It is the comprehensive hole convolution feature, and L represents the total number of hole convolution layers; The fully connected output layer is used to process the global features to determine the corresponding target document type: in, represents the classification probability distribution of the model output, softmax represents the softmax function, and W fc represents the weight matrix of the fully connected layer, b fc Represents the bias term of the fully connected layer.
8. A classification system for power industry documents, characterized by: include: An information annotation unit, used to extract key semantic fields, document structure information and attribute metadata information in the target power document to be identified; A feature extraction unit, for extracting deep semantic features, document structural features and metadata encoding features according to key semantic fields, document structural information and attribute metadata information based on a semantic feature extraction model, a structural feature extraction model and a metadata encoder; A document feature generation unit, used to generate an adversarial network based on the document features, and generate a feature representation of a target power document according to deep semantic features, document structure features and metadata encoding features; The document type identification unit is used to determine the category of the target power document according to the feature representation of the target power document based on the document classifier.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the method for classifying electric power industry documents according to any one of claims 1 to 7 is implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method for classifying electric power industry documents according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Document classification method and electronic equipment
CN120910271A