Archival knowledge extraction method and device based on structural prior knowledge
By combining multi-feature extraction and deep feature representation of the structure and glyph features of Chinese characters in archival knowledge extraction, the problem of insufficient accuracy of Chinese document entity recognition in the existing technology is solved, and the accuracy and robustness of entity recognition are improved. The generalization ability of the model is enhanced.
Patent Information
- Application Number
- CN202410592269.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-05-14
AI Technical Summary
The existing technology fails to make full use of the structural and glyph characteristics of Chinese characters when processing Chinese documents, resulting in insufficient accuracy and robustness of entity recognition, especially limited generalization capabilities when processing complex data structures and long-distance dependencies.
Adopt an archival knowledge extraction method based on structural prior knowledge, obtain structural features and glyph features through multi-feature extraction, perform feature fusion and data dimensionality reduction, and build a label prediction model based on structural prior knowledge represented by deep features to improve the accuracy of entity recognition. performance and robustness.
It significantly improves the accuracy and robustness of entity recognition, enhances the model's ability to handle complex data structures and long-distance dependency problems, and improves the model's generalization ability.
Smart Images

Figure CN118170836B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and device for extracting archive knowledge based on structural prior knowledge. Background Art
[0002] In today's digital age, a large amount of document and archival information needs to be effectively managed and utilized, especially in the field of Chinese archives. Due to the complexity of Chinese itself and the diversity of archival content, traditional information extraction methods face huge challenges. Chinese characters have a complex structure and contain rich radicals and glyph information. This information is critical to understanding the semantics of Chinese characters, but it is often not fully utilized in traditional archival knowledge extraction methods. In addition, traditional methods are often unsatisfactory when dealing with long-distance dependencies, complex data structures, and complex logical relationships between entities, resulting in low accuracy and efficiency of information extraction.
[0003] The existing technology has the following technical problems: (1) The existing technology may fail to fully utilize the structure and glyph features of text data, especially when processing Chinese documents with rich structural and semantic information, which limits the accuracy of entity recognition; (2) When dealing with complex data structures and long-distance dependency problems, the existing technology may fail to effectively integrate features from different sources, resulting in limited model generalization ability; (3) The existing technology may fail to fully utilize structural prior knowledge to enhance the accuracy and robustness of entity recognition. Summary of the invention
[0004] In view of this, an object of the present invention is to provide a method and device for extracting archival knowledge based on structural prior knowledge, which can enhance the accuracy of entity recognition.
[0005] In a first aspect, an embodiment of the present invention provides a method for extracting archival knowledge based on structural prior knowledge, the method comprising: acquiring a target document; performing multi-feature extraction on the target document to obtain multi-feature information in the target document; the multi-feature information comprises structural features and glyph features; inputting the multi-feature information into a pre-constructed feature fusion model, performing feature fusion on the multi-feature information based on feature correlation of the multi-feature extraction features to generate fused features; performing feature extraction and data dimensionality reduction on the fused features to obtain key information in the fused features; performing entity recognition on the key information through a pre-constructed label prediction model based on structural prior knowledge, and outputting the key entity information in the target document.
[0006] In a second aspect, an embodiment of the present invention further provides an archival knowledge extraction device based on structural prior knowledge, the device comprising: a data acquisition module, used to acquire a target document; a feature extraction module, used to perform multi-feature extraction on the target document to obtain multi-feature information in the target document; the multi-feature information includes structural features and glyph features; a feature fusion module, used to input the multi-feature information into a pre-constructed feature fusion model, perform feature fusion on the multi-feature information based on the feature correlation of the multi-feature extraction features, and generate fused features; a pre-processing module, used to perform feature extraction and data dimensionality reduction on the fused features to obtain key information in the fused features; an output module, used to perform entity recognition on the key information through a pre-constructed label prediction model based on structural prior knowledge, and output the key entity information in the target document.
[0007] The embodiments of the present invention bring about the following beneficial effects: The present invention provides a method and device for extracting archival knowledge based on structural prior knowledge, which can more accurately capture the semantic information of Chinese characters by combining the structural features of Chinese characters and the careful extraction of glyph features, and provide rich and accurate feature representation for entity recognition. After obtaining multi-feature information, feature fusion is performed based on feature correlation, which can enhance the model's ability to handle complex data structures and the effect of handling long-distance dependency problems in sequence data, thereby improving the generalization ability of the model. In addition, the structural prior knowledge of deep feature representation is introduced to construct a label prediction model, which can enable the model to better understand the structure and characteristics of the data. Therefore, the embodiments of the present invention can more effectively utilize the dependencies between entities and their contextual information, significantly improving the accuracy and robustness of entity recognition.
[0008] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and the drawings.
[0009] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0011] Figure 1A flowchart of a method for training an archive knowledge extraction model based on structural prior knowledge provided by an embodiment of the present invention;
[0012] Figure 2 A flowchart of another archival knowledge extraction model training method based on structural prior knowledge provided by an embodiment of the present invention;
[0013] Figure 3 A structural diagram of a multi-feature extraction model provided by an embodiment of the present invention;
[0014] Figure 4 A schematic diagram of the structure of an archive knowledge extraction model training device based on structural prior knowledge provided by an embodiment of the present invention;
[0015] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the following embodiments of the present disclosure are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0017] In order to solve the above technical problems, an embodiment of the present invention proposes a method and device for extracting archival knowledge based on structural prior knowledge, which can enhance the accuracy of entity recognition.
[0018] Embodiment 1
[0019] To facilitate understanding of this embodiment, firstly, a method for extracting archive knowledge based on structural prior knowledge disclosed in an embodiment of the present invention is introduced in detail. Figure 1 A flowchart of a method for extracting archive knowledge based on structural prior knowledge provided by an embodiment of the present invention is shown. Figure 1 As shown, the method comprises the following steps:
[0020] Step S101, obtaining a target document.
[0021] Step S102, performing multi-feature extraction on the target document to obtain multi-feature information in the target document.
[0022] The document contains characters such as people, places, and venues, which represent different entities. In order to obtain entity information in the document, the embodiment of the present invention pre-extracts multiple features from the content in the document to identify the entities in the document based on the extracted multiple feature information. The archives for knowledge extraction in the present invention are Chinese archives. Generally speaking, Chinese characters have a radical and component structure. The multiple feature information of the embodiment of the present invention includes structural features and glyph features. By adopting a multi-feature extraction method, the structural features and glyph features of Chinese characters are extracted to identify entity categories.
[0023] Specifically, the glyph and structural features characterize the external shape of Chinese characters, the combination of radicals, the positional relationship of radicals, and the overall construction method. These features help reveal the semantics and functional attributes of words, and thus help improve the accuracy of entity recognition. By extracting the structural features and glyph features of each word in a document, the visual and structural properties of Chinese characters can be used to enhance the model's understanding of the document content, especially to enhance semantic understanding when processing Chinese text, and improve the accuracy and robustness of the model. Specifically, the semantics contained in the document can be determined based on the combination of text content, and then the entities in the document can be determined.
[0024] Step S103: input the multiple feature information into a pre-built feature fusion model, perform feature fusion on the multiple feature information based on feature correlation of the multiple feature information, and generate fusion features.
[0025] The extracted multi-feature information is represented as high-dimensional feature vectors, which can comprehensively express multiple attributes of the text. For example, the glyph feature vector may include the number of strokes, stroke types and the encoding of their relationship; the structural feature vector may include the type and number of encoded radicals and their layout information in the Chinese character.
[0026] The embodiment of the present invention also combines the extracted multiple features to capture the dynamic correlation between the features, enhance the model's ability to process complex data structures, and effectively handle the long-distance dependency problem in sequence data. This can improve the effect of information extraction or classification tasks. By extracting and fusing multiple features, the ability to process Chinese documents can be significantly improved, solving the shortcomings of existing technologies in processing the complexity and diversity of Chinese.
[0027] In a specific implementation, the embodiment of the present invention uses a trained model to process new samples to achieve archival knowledge extraction. In one embodiment, entity information such as key participants, dates, and locations are extracted from meeting minutes documents. First, multiple features are extracted from the new meeting minutes document. Further, feature fusion is performed using a trained feature fusion model.
[0028] Step S104, performing feature extraction and data dimension reduction on the fused features to obtain key information in the fused features.
[0029] Step S105, performing entity recognition on key information through a pre-built tag prediction model, and outputting key entity information in the target document.
[0030] To improve recognition accuracy, the embodiment of the present invention also performs feature extraction and data dimensionality reduction on the above fusion features to reduce computational complexity while retaining key information. In a specific implementation, the document can be processed by a pre-trained model to obtain a high-dimensional feature vector. Furthermore, the feature vector is reduced in dimension using a trained feature dimensionality reduction model to reduce computational complexity while retaining key information.
[0031] Furthermore, the trained model is used to predict the labels of the reduced feature vectors for entity recognition and classification. The label prediction model based on structural prior knowledge performs entity recognition and classification based on labels, which include specific entity categories in the text, such as names. Furthermore, based on the model prediction results, key entity information in the document is output, such as a list of participants, meeting date and location, etc.
[0032] Among them, the embodiment of the present invention introduces structural prior knowledge of deep feature representation to construct a label prediction model, which enables the model to better understand the structure and characteristics of the data. Furthermore, by combining the structural features of Chinese characters and the careful extraction of glyph features, obtaining multi-feature information, and obtaining fusion information and key information, the present invention can more accurately capture the semantic information of Chinese characters and provide rich and accurate feature representation for entity recognition.
[0033] In summary, the archival knowledge extraction method based on structural prior knowledge provided by the embodiment of the present invention can more effectively utilize the dependencies between entities and their contextual information, especially when dealing with complex entity relationships and rich contextual information, and significantly improve the accuracy and robustness of entity recognition.
[0034] Embodiment 2
[0035] Furthermore, the existing technology may lack the ability to search and extract features at multiple granularities, and lack an effective bidirectional enhancement mechanism to optimize the feature extraction process. In addition, in the process of feature compression and dimensionality reduction, the existing technology may fail to effectively retain key interactive information, resulting in information loss in the high-dimensional feature space, and may also affect the processing efficiency. Therefore, based on the above embodiment, the embodiment of the present invention also provides another archival knowledge extraction method based on structural prior knowledge. Figure 2 FIG. 4 is a flowchart showing another archival knowledge extraction method based on structural prior knowledge provided by an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0036] Step S201, obtaining a target document.
[0037] Step S202: input the target document into a pre-built multi-feature extraction model, perform multi-feature extraction on the target document through the multi-feature extraction model, and obtain multi-feature information in the target document.
[0038] In specific implementation, the embodiment of the present invention performs multi-feature extraction through a pre-built multi-feature extraction model to determine the glyph features and structural features in the document. The multi-feature extraction model includes a structural feature extraction model and a glyph feature extraction model; the structural feature extraction model is used to extract the structural features of the characters in the target document, and the glyph feature extraction model is used to extract the glyph features of the characters in the target document.
[0039] In terms of structural feature extraction, the present invention uses a deep learning model to identify and extract radicals and construction features in Chinese characters. Compared with traditional methods, this method not only identifies the basic radicals of Chinese characters, but also further analyzes the construction methods of Chinese characters, such as the combination form and relative position relationship of radicals, which are deep features that are difficult to reach with traditional methods. The fusion of radicals and construction features in the embodiments of the present invention can improve the depth of understanding of Chinese characters and their semantics, and also enhance the adaptability and accuracy of the model in specific data sets and situations, especially in the processing of Chinese texts, which can significantly improve the accuracy of information extraction. Based on this, the proposed method can more accurately capture the semantic information of Chinese characters, and provide a richer and more accurate feature representation for subsequent entity recognition.
[0040] In terms of glyph feature extraction, the present invention processes Chinese character documents through an improved convolutional neural network model. In one embodiment, the VGG16 network (a type of convolutional neural network) architecture is used as the basis, but its input layer is specially designed to adapt to the particularity of Chinese characters. The proposed method can effectively extract high-dimensional features of Chinese character glyphs, which not only include the strokes and structures of Chinese characters, but also refine to microscopic features such as the curvature and thickness variation of strokes, enriching the feature set and providing a basis for the accuracy of file knowledge extraction.
[0041] When specifically implemented, Figure 3 Fig. shows a structural diagram of a multi-feature extraction model, which can process each character to obtain corresponding feature vectors respectively. The construction method of the multi-feature extraction model includes the following steps:
[0042] 1) Obtain pre-collected Chinese files and collect Chinese character data in the Chinese files.
[0043] 2) Label the Chinese character data according to the Chinese character features of the Chinese character data to obtain data labels.
[0044] Among them, first collect data from Chinese files, and label the collected data according to its Chinese character features to construct a multi-feature extraction model. Chinese character features include the radicals and glyphs of Chinese character data. Data labels can be generated based on features such as the radicals and glyphs of Chinese characters. For example, if the radical of the character "village" is divided into "wood" and "inch", then the character with the radical "wood" and the radical "inch" is labeled as "village", and then based on this data label, the entity corresponding to the Chinese character is determined by the label prediction model, such as a location. In one embodiment, the Chinese document is a meeting minutes document. By collecting Chinese character data in the meeting minutes document and labeling these data, labels are obtained to train the multi-feature extraction model.
[0045] 3) Use the first convolutional neural network to split the Chinese character data according to the radical structure and extract the structural features, and determine the structural feature representation; and, capture the glyph detail features of the Chinese character data through the VGG16 network.
[0046] After labeling the data in the document, the embodiments of the present invention respectively use different models to process the structural features and glyph features, and then splice the structural features and glyph features into training samples, and train a third model based on the training samples to construct a multi-feature extraction model based on the trained third model.
[0047] a - Determine the structural feature representation through the following steps:
[0048] In the specific implementation, a convolutional neural network is used to split each Chinese character according to its radical structure and extract its structural features. The convolutional neural network will learn the combination and structural features of the Chinese character radicals, and convert these features into vector form to generate a structural feature representation for each Chinese character.
[0049] Specifically, given a set of Chinese archive data ,in Represents a single document, each document contains a series of Chinese characters For each Chinese character , obtain its radical set through structural decomposition ,in It is a Chinese character A radical of .
[0050] Furthermore, the goal of structural feature extraction is to transform each radical Mapped to a high-dimensional feature space, it can be expressed as:
[0051]
[0052] in, It is a radical The structural characteristics of and are the weight and bias parameters in the convolutional neural network, It is the Sigmoid nonlinear activation function.
[0053] Further, and are the weights and biases learned through the convolutional layer, The update depends on the gradient descent method, and the calculation method can be expressed as:
[0054]
[0055] in, is the learning rate of the weights, is the loss function, yes right In one embodiment, is set to 0.01. And, The update also follows the gradient descent method, and the calculation method can be expressed as:
[0056]
[0057] in, yes right The gradient of is the learning rate of the bias.
[0058] b- Capture the detailed features of the Chinese character data through the following steps:
[0059] In the specific implementation, the VGG16 network is used to process Chinese characters to extract glyph features. The VGG16 network is characterized by its depth and simplicity. It contains 16 layers, including 13 convolutional layers, 5 pooling layers, and 3 fully connected layers. The VGG16 network uses a small 3x3 convolution kernel for feature extraction and performs nonlinear activation through the ReLU activation function. This small convolution kernel size is widely used in subsequent convolution layers. After each convolution layer, VGG16 uses a 2x2 maximum pooling layer for spatial downsampling to extract the main features and reduce the number of parameters.
[0060] The network captures the detailed features of Chinese character shapes through deep convolution and pooling operations, and encodes these features into high-dimensional feature vectors. In one embodiment, Chinese characters The glyph features are extracted through the VGG16 network. For a given Chinese character document , the glyph feature extraction can be expressed as:
[0061]
[0062] in, Represents the VGG16 network corresponding to the input character after the input layer, It is a Chinese character Character feature representation of .
[0063] 4) The structural feature representation and the glyph detail features are concatenated into a comprehensive feature vector, the second convolutional neural network model is trained through the comprehensive feature vector, and the model parameters of the second convolutional neural network model are optimized using the Adam optimizer.
[0064] According to the structural feature representation and the glyph detail feature, the context feature corresponding to the Chinese character data is determined, and the context feature represents the association between the structural feature representation and the glyph detail feature. is the context feature of the document, which is generated by structural features and glyph features and can be expressed as:
[0065]
[0066] in, and are the weight matrix and bias vector respectively, Represents feature concatenation.
[0067] Further, through The function evaluates the correlation between the structural feature representation and the glyph detail feature and the context feature respectively; based on the correlation, the feature weights corresponding to the structural feature representation and the glyph detail feature are calculated respectively. The dynamic weights of structural features and glyph features can be calculated as follows:
[0068]
[0069]
[0070] in, and They are the structural feature weights and the dynamic weights of glyph features respectively. The function is used to evaluate the relevance of features to context and can be expressed as:
[0071]
[0072] in, and are the weight and bias parameters in the convolutional neural network, is the weight matrix, F x is the feature being evaluated.
[0073] Furthermore, the structural feature representation and the glyph detail features are concatenated into a comprehensive feature vector based on the feature weights. Specifically, a concatenation function based on a dynamic feature correction mechanism is used. This function takes into account the interaction and complementarity of the two features, and dynamically adjusts the weights of structural features and glyph features in the splicing process by evaluating the contextual information in the document. It can adaptively adjust the feature weights according to the specific content of the document and the importance of the features, thereby optimizing the feature representation. It can be expressed as:
[0074]
[0075] Furthermore, α struct The calculation is based on the document context feature F context get.
[0076] After obtaining the comprehensive feature vector, the second convolutional neural network model is trained through the comprehensive feature vector. The specific steps are as follows:
[0077] The comprehensive feature vector is input into another convolutional neural network model (i.e., the second convolutional neural network model) to learn the mapping relationship between Chinese characters and their semantic information. Specifically, given the comprehensive feature vector , train a convolutional neural network model To predict the label of the Chinese character (that is, the data label mentioned above), the goal of model training is to minimize the difference between the predicted label and the true label, using the cross entropy loss function as follows:
[0078]
[0079] in, is the true label, It is a model Chinese Characters The predicted labels are summed over all training samples.
[0080] Furthermore, the predicted label Calculated by the preset softmax function, it can be expressed as:
[0081]
[0082] in, is the raw score output by the softmax function, is the total number of categories.
[0083] Furthermore, the model parameters are optimized using the Adam optimizer, and the update rule is:
[0084]
[0085] in, It is in The model parameters of the iteration, It is in The model parameters for the iteration. It is the learning rate, which is preset manually. and are the bias correction values of the first-order and second-order matrix estimates, respectively, is a small constant added to maintain numerical stability. In one embodiment, Set to 0.01, Set to 0.001.
[0086] Further, and The calculation method can be expressed as:
[0087]
[0088]
[0089]
[0090]
[0091] in, is the first-order matrix estimate for the t-th iteration, is the first-order matrix estimate for the t-1th iteration; is the exponential decay rate of the first-order matrix estimate, is the exponential decay rate of the second-order matrix estimate. is the loss function of the tth iteration; is the second-order matrix estimate of the t-th iteration;
[0092] 5) Build a multi-feature extraction model based on the trained second convolutional neural network model.
[0093] In summary, a well-constructed multi-feature extraction model is obtained, through which multi-feature extraction is performed on the target document, and the obtained features are multi-feature information.
[0094] Afterwards, the multi-feature information is subjected to feature fusion. The present invention proposes a Transformer algorithm based on cracking features, which is improved by using Chebyshev theory to optimize the feature fusion process, improve the efficiency and accuracy of the algorithm, enhance the model's ability to handle complex data structures, and effectively handle the long-distance dependency problem in sequence data. Specifically, refer to the following steps S203-S206.
[0095] Step S203, performing feature cracking processing on the multi-feature information to obtain a fine-grained sub-feature set.
[0096] In order to capture the correlation between features in more detail, the embodiment of the present invention performs feature cracking processing on structural features and glyph features, and decomposes the features into more fine-grained sub-feature sets. and glyph features , these features are subdivided by cracking to capture more fine-grained information. Let the cracking operation be , then the characteristics after cracking are expressed as:
[0097]
[0098]
[0099] In one embodiment, the cracking process The purpose of is to subdivide the original features into smaller sub-feature sets to improve the precision of feature processing. The specific calculation process can be expressed as:
[0100]
[0101] in, is the original eigenvector, is a cracking matrix, which is used to map the original feature vector to a higher-dimensional feature space. And, in this embodiment, the cracking matrix The calculation of is based on the statistical properties of the features. Specifically, the main change directions of the features are extracted through principal component analysis.
[0102] Step S204: using the Transformer structure to capture the dynamic correlation corresponding to the sub-feature sets to obtain integrated features.
[0103] The Transformer structure is used to process the cracked features, and the dynamic correlation between features is effectively captured through the self-attention mechanism, so that the long-distance feature information can be effectively integrated. Specifically, let the encoding function of the Transformer be , then the feature after Transformer processing is represented as:
[0104]
[0105]
[0106] Among them, Transformer encoding function Including the self-attention mechanism and the feedforward neural network, the weight calculation in the self-attention mechanism is as follows:
[0107]
[0108] in, , , are query, key, and value matrices respectively, is the dimension of the key vector.
[0109] Further, query ,key Sum The calculation method is as follows:
[0110]
[0111]
[0112]
[0113] in, , , is a learnable weight matrix used to transform features Maps to query, key, and value spaces. It is the dimension of the key vector, which is used to scale the dot product to prevent the gradient vanishing problem caused by too large a dot product.
[0114] Step S205 , based on the distortion and information loss of the integrated features in the high-dimensional space, the integrated features are optimized using Chebyshev polynomials to obtain optimized features.
[0115] Specifically, using the Chebyshev polynomial To optimize the features of Transformer output, this optimization can effectively reduce the distortion and information loss of features in high-dimensional space. The recursive definition of is:
[0116]
[0117]
[0118] Further, Application and Each element of is optimized to achieve feature optimization, and the optimized feature is expressed as:
[0119]
[0120]
[0121] Step S206, calculating the importance scores corresponding to the optimized features and the multi-feature information respectively, and fusing the optimized features and the multi-feature information based on the importance scores to obtain a fused feature.
[0122] Specifically, assume that the characteristic , and The importance scores are , and , with the dynamic weight of structural features For example, the calculation method can be expressed as:
[0123]
[0124] The optimized features , The comprehensive characteristics after splicing Fusion is performed to obtain fusion features and fusion functions It can be expressed as:
[0125]
[0126] in, It is a weighted function, and the weighted weight is a dynamic weight, that is, through dynamic weight allocation, the proportion of the feature in the fusion feature can be adaptively adjusted according to its importance.
[0127] The final fusion features are:
[0128]
[0129] Among them, the importance score and The importance of features is obtained in feature-based principal component analysis. , , Characteristics , , Dynamic weight of .
[0130] Step S207, performing feature extraction and data dimension reduction on the fused features to obtain key information in the fused features.
[0131] The above-mentioned fusion features are determined by the dynamic correlation fusion between finer-grained features based on multiple feature information. The long-distance feature information can be effectively integrated and can effectively handle the long-distance dependency problem in the sequence data. By determining the key information in the fusion features, the accuracy of entity recognition can be improved. Specifically, the embodiment of the present invention first extracts the fusion features through a pre-constructed feature extraction model, and then reduces the dimensionality of the extracted features through a feature dimensionality reduction model to determine the key information.
[0132] a-Build the feature extraction model through the following steps:
[0133] In specific implementation, the feature extraction model can be trained by the fusion features corresponding to the training samples. The present invention proposes a neural network algorithm based on the multi-granularity whale optimization algorithm, which uses a bidirectional enhancement method to extract richer and more meaningful features from the data, so as to more accurately perform entity recognition. The present invention improves the whale optimization algorithm so that it can search the feature space at multiple granularities, thereby capturing data features at different levels, so that the algorithm can understand the data structure more comprehensively and extract features that are more beneficial to entity recognition. In addition, on the basis of multi-granularity feature extraction, the present invention adopts a bidirectional enhancement mechanism to adjust the feature extraction process from two directions: one is to deepen the semantic understanding of the features through a deep learning model, and the other is to guide the search strategy of the whale optimization algorithm through a back-propagation optimization algorithm. This two-way effect not only improves the accuracy of feature extraction, but also enhances the algorithm's adaptive ability.
[0134] In the specific implementation, the following steps a1-a4 are included:
[0135] a1) Use the improved whale optimization algorithm to perform preliminary feature extraction on the preset training sample set at multiple granularities, and search for the optimal feature subset in the feature space by simulating the social behavior and predation strategy of whales.
[0136] Specifically, the steps of preliminary feature extraction are as follows:
[0137] (1) Initialization: Generate the initial whale group position ,in , is the size of the whale group. Each whale position Represents a solution in the feature space, i.e., a selection of a set of features.
[0138] (2) Calculate fitness: For each whale position , calculate its fitness The fitness evaluation is based on the classifier performance after feature selection, and in one embodiment, the fitness value is the F1 score.
[0139] (3) Update position: based on the current optimal solution Update the position of the whale. The position update formula includes simulating whale predation behavior and random search, specifically:
[0140]
[0141]
[0142] in, and is the coefficient calculated by the algorithm iteration, is the distance between the current whale position and the target whale (optimal solution). Furthermore, the coefficient and It is dynamically calculated according to the iteration of the algorithm, and the calculation method can be expressed as:
[0143]
[0144]
[0145] in, is a coefficient that decreases linearly from 2 to 0 with the number of iterations, is a random number in the range [0, 1].
[0146] a2) Input the optimal feature subset into the deep learning model for semantic deepening to obtain enhanced features.
[0147] a3) Calculate the loss corresponding to the enhanced features and adjust the search strategy of the whale optimization algorithm based on the loss.
[0148] Specifically, the initially extracted features are input into the deep learning model for semantic deepening, and the feedback from the model is used to adjust the search strategy of the whale optimization algorithm. The deep learning model and the whale optimization algorithm interact and learn from each other to jointly optimize the feature set.
[0149] Specifically, the steps for optimizing the feature set are as follows:
[0150] (1) Using a preset deep neural network The extracted features are semantically enhanced, namely:
[0151]
[0152] in, It is the feature representation enhanced by the neural network.
[0153] (2) Adjust the search strategy of the whale optimization algorithm based on the feedback from the deep learning model.
[0154] Specifically, using the loss function The gradient information guides the whale's position update, namely:
[0155]
[0156] in, is the label after dynamic label correction, is the learning rate, is the loss function about In one embodiment, the loss function is the cross entropy loss.
[0157] Labels after dynamic label correction The dynamic label correction module adopts an adaptive adjustment mechanism to dynamically adjust the label weight according to the performance feedback of the model during the training process. It not only takes into account the uncertainty of the original annotation, but also optimizes the label allocation through the real-time feedback of the model, so as to reduce the negative impact of incorrect labels on training and enhance the robustness of the model.
[0158] Specifically, is the original training label set, and the model prediction output is , the corrected label The calculation method can be expressed as:
[0159]
[0160] in, is the adaptive adjustment coefficient, which is dynamically adjusted according to the performance of the model on the validation set and can be expressed as:
[0161]
[0162] in, is a preset scaling factor used to control the strength of label correction. In one embodiment, the scaling factor Set to 0.01. It is the accuracy of the model on the validation set of the current iteration, which is used to evaluate the current performance of the model.
[0163] Furthermore, the gradient information The calculation method can be expressed as:
[0164]
[0165] in, Based on enhanced features and the true label The loss function calculated, in one embodiment, is the cross entropy loss.
[0166] Furthermore, in order to ensure that the feature set ultimately used for entity recognition contains both rich semantic information and high discrimination, the embodiment of the present invention also fuses and selects the features after bidirectional enhancement optimization to determine the feedback of the deep learning model based on the selected features.
[0167] Specifically, the features after bidirectional enhancement With the original features (that is, the optimal feature subset obtained in step a1) is fused to obtain the final feature representation for:
[0168]
[0169] in, is a fusion weight used to balance the contribution of enhanced features and original features, which is preset manually. In one embodiment, Set to 0.3.
[0170] Further, based on The importance score is used to perform feature selection, and a certain proportion of features are selected to reduce the feature dimension and improve the model performance. The importance score can be calculated by cross-validation using a preset random forest algorithm. In one embodiment, the top 50% of features are selected based on the importance score.
[0171] a4) Until the loss reaches the preset threshold, a feature extraction model is built based on the whale optimization algorithm and deep learning model.
[0172] In summary, a feature extraction model is constructed to extract features from fusion features through the model.
[0173] b-Build the feature dimensionality reduction model through the following steps:
[0174] The present invention proposes an autoencoder neural network algorithm based on potential interaction compression. By adopting the potential interaction compression mechanism, the autoencoder is allowed to learn and retain the key interaction information between different features while compressing the features, thereby increasing the model's ability to capture the nonlinear relationship between features, thereby providing the classifier with richer information.
[0175] Specifically, the following steps b1-b4 are included:
[0176] b1) Customize the encoder and decoder of the autoencoder.
[0177] Define the autoencoder structure, including the encoder part and the decoder part ,in is the input feature vector, is the potential representation vector, and are the parameters of the encoder and decoder respectively. The encoder is used to map high-dimensional input features to a low-dimensional latent space, and the decoder restores these low-dimensional representations to the original space.
[0178] Furthermore, a potential interaction learning loss function is set to encourage the model to learn the interaction information between features in the latent space. The potential interaction learning loss function includes reconstruction error and regularization term, and the reconstruction error is calculated based on the weighted importance of the feature. Among them, the loss function optimized during the training process includes reconstruction error and regularization term, which can be expressed as:
[0179]
[0180] in, Yes Input and reconstruct the output The reconstruction error between is the interaction weight The L2 regularization term, is the regularization coefficient.
[0181] In one embodiment, the reconstruction error The calculation of is weighted. Considering that the importance of different features may be different, the calculation method can be expressed as:
[0182]
[0183] in, It is a feature The weights are adaptively adjusted according to the performance of the features in the training data.
[0184] And, the regularization term Used to prevent model overfitting and ensure interaction weights The value of will not be too large, and the calculation method can be expressed as:
[0185]
[0186] b2) Obtain a preset training sample set, and train the encoder and decoder of the autoencoder using the training sample set.
[0187] Specifically, the output of the feature extraction model can be used to train the autoencoder model, where the input feature vector Encoded as a latent representation , which can be expressed as: ; That is, the encoder It learns to map high-dimensional inputs into a low-dimensional latent space through a series of nonlinear transformations.
[0188] b3) The parameters of the autoencoder are optimized through a pre-set latent interaction learning loss function, and feature interaction terms are introduced in the latent space to reconstruct features based on the feature interaction terms.
[0189] In the specific implementation, the parameters are optimized based on the potential interactive learning loss function, and the embodiment of the present invention introduces the interaction term in the latent space. , which is used to enhance the model's ability to capture complex relationships between features and can be expressed as:
[0190]
[0191] in, Representation characteristics and Features The weight of the interaction between . Further, the weight To measure potential Medium Features and Features The parameters of the interaction strength between them are obtained through an adaptive learning mechanism that takes into account the correlation between features and their contribution to the task.
[0192] In one embodiment, The calculation is done through a preset neural network To achieve this, the network and is the input and the output is , which can be expressed as:
[0193]
[0194] in, is a parameterized network, are network parameters, and the network learns through training how to effectively evaluate the importance of interactions between features.
[0195] Furthermore, during decoding, the latent representation Through the decoder Refactored to , while considering the interaction terms , which can be expressed as:
[0196]
[0197] b4) Build a feature dimensionality reduction model based on the trained autoencoder.
[0198] In summary, a feature dimensionality reduction model is constructed to reduce the dimensionality of the input features through the trained encoder part to obtain the compressed feature representation. ,This feature representation is used as key information by the label prediction model for entity recognition.
[0199] Furthermore, the embodiment of the present invention also calculates the recalibration weight of the key information and the potential dimension task relevance measure; adjusts the key information according to the recalibration weight and the potential dimension task relevance measure to obtain the recalibrated information; and determines the recalibrated information as the key information of the fusion feature.
[0200] In the specific implementation, calculate the recalibration weight of each feature , calculated by the preset neurons, can be expressed as:
[0201]
[0202] in, and are the preset neuron weights and bias parameters, is the sigmoid activation function, which is used to constrain the weights to the range (0, 1).
[0203] Furthermore, using To adjust the latent representation , and get the recalibrated representation , which can be expressed as:
[0204]
[0205] in, represents the Hadamard product of elements, is a diagonal matrix whose diagonal elements Indicates The weights of the potential dimensions are dynamically calculated as follows:
[0206]
[0207] Here, relevance(z i ) indicates the A measure of the relevance of latent dimensions to the final task, is an adjustable scale parameter used to control the decoupling strength. In one embodiment, The function is implemented through auxiliary networks or task performance feedback.
[0208] Based on this, the obtained features It is the feature after dimensionality reduction, that is, the key information.
[0209] Step S208, performing entity recognition on key information through a pre-built tag prediction model, and outputting key entity information in the target document.
[0210] The present invention proposes a label prediction model based on structural prior knowledge, combining a deep learning framework of structural prior knowledge with a conditional random field model to form a structured deep learning model. Compared with traditional conditional random fields, structured deep learning models can more effectively utilize the dependencies between entities and their contextual information, and significantly improve the accuracy and robustness of entity recognition in a structured manner. Among them, the training process of the model first includes using an autoencoder to learn the deep feature representation of the document. Subsequently, the structured deep learning model uses these features and structural prior knowledge to predict the labels of entities in the document.
[0211] In specific implementation, the embodiment of the present invention constructs a label prediction model through the following steps:
[0212] 1) Obtain the preset training sample set.
[0213] The training sample set includes document samples and sample labels corresponding to the document samples, and the sample labels are used to characterize entities corresponding to the document samples, such as names, places, times, etc. Specifically, the label prediction model can be trained by the above-mentioned features after dimensionality reduction.
[0214] 2) The deep feature representation of the training sample set is learned through the autoencoder, and the deep feature representation is integrated into the conditional random field model to perform structured entity label prediction.
[0215] In specific implementation, the embodiment of the present invention designs a specific model structure and training strategy based on the structural prior knowledge of archival documents to explicitly simulate the logical relationship and dependency between entities and integrate the structural prior knowledge.
[0216] For the features after dimensionality reduction, they are integrated into the conditional random field model to predict the structured entity labels. The conditional random field layer considers extracting feature sequences And output entity label sequence .
[0217] Specifically, the conditional probability of the label sequence for a given input sequence is defined as:
[0218]
[0219] in, is the normalization factor, is a potential function that captures the dependencies between adjacent labels and input features.
[0220] The potential function can be further expanded as:
[0221]
[0222] in, and is with the label from Transfer to The transfer-related weights and biases, Indicates that from the input at position Extracted feature vectors.
[0223] In one embodiment, the characteristic function Combining word embedding vectors and position encoding, it can be expressed as:
[0224]
[0225] in, Indicates location The embedding vector of the word, Indicates location The encoding vector of Represents a vector concatenation operation.
[0226] Furthermore, for a specific state transition weight and bias , and its update strategy is:
[0227]
[0228]
[0229] in, is the learning rate, is the log-likelihood loss of the conditional random field layer, reflecting the difference between the true label sequence and the model prediction sequence.
[0230] 3) Under the framework of structured deep learning models, the reconstruction loss of the autoencoder and the log-likelihood of the correct label sequence in the conditional random field model are combined to jointly optimize the parameters of the autoencoder and the conditional random field model.
[0231] In the framework of structured deep learning model, the parameters of autoencoder and conditional random field model are jointly optimized to ensure the accuracy of entity label prediction and reflect the dependency relationship between entities. This autoencoder is the autoencoder corresponding to the above-mentioned feature dimensionality reduction model.
[0232] Specifically, the training objective combines the reconstruction loss of the deep learning framework and the log-likelihood of the correct label sequence in the conditional random field model, which can be expressed as:
[0233]
[0234] in, is the number of training samples, is the regularization parameter that balances the two loss parts, and They are The true label sequence and input sequence of examples.
[0235] In one embodiment, the deep learning framework is the autoencoder network used by the data dimensionality reduction model corresponding to step S214. and decoder weights The present invention adopts an optimization method based on gradient descent and combines the back propagation algorithm to update the parameters.
[0236] Specifically, the update of the encoder weight can be expressed as:
[0237]
[0238] in, is the learning rate, is the loss function, expressed as input and reconstruct the output The mean square error between the decoder weights Updates follow a similar process.
[0239] 4) Perform performance evaluation on the autoencoder and conditional random field models, and build a label prediction model based on the autoencoder and conditional random field models that meet the performance evaluation requirements.
[0240] Model performance was evaluated through cross-validation and independent test sets to ensure that the model has good generalization ability on unseen archival documents.
[0241] In summary, the embodiment of the present invention provides a method for extracting archival knowledge based on structural prior knowledge. By combining the extraction of structural features and glyph features of Chinese characters, a deep learning model and a VGG16 network are used to accurately extract the radicals, structural features and high-dimensional features of the glyphs of Chinese characters, which can more comprehensively capture the semantic information of Chinese characters and provide a richer and more accurate feature representation for entity recognition. By combining the careful extraction of structural features and glyph features of Chinese characters, the present invention can more accurately capture the semantic information of Chinese characters and provide a richer and more accurate feature representation for entity recognition. In particular, when processing Chinese documents with complex structures, the accuracy of entity recognition can be significantly improved.
[0242] In addition, the present invention uses a Transformer algorithm based on cracking features and uses Chebyshev polynomials to improve and optimize the feature fusion process through the innovative application of feature fusion models. This not only improves the algorithm's ability to handle complex data structures, but also effectively handles long-distance dependency problems in sequence data, and enhances the model's ability to capture interactions and complementarities between features, thereby improving the model's generalization ability.
[0243] The present invention also improves the whale optimization algorithm, enabling it to search feature space at multiple granularities and capture data features at different levels. Combined with the bidirectional enhancement mechanism, it not only deepens the semantic understanding of features, but also optimizes the search and extraction strategy of features, enabling the algorithm to understand the data structure more comprehensively, improve the accuracy of feature extraction and the adaptability of the model, and thus extract features that are more beneficial to entity recognition in the data.
[0244] Furthermore, the embodiment of the present invention adopts a potential interaction compression mechanism, which allows the autoencoder to learn and retain key interaction information between different features while compressing features, effectively reducing information loss in high-dimensional feature space and improving processing efficiency. In addition, the model's ability to capture nonlinear relationships between features is increased, providing richer information for the classifier.
[0245] Furthermore, the embodiments of the present invention also combine the deep learning framework of structural prior knowledge with the conditional random field model to form a structured deep learning model, which can effectively utilize the dependencies between entities and their contextual information, especially when dealing with complex entity relationships and rich contextual information, and significantly improve the accuracy and robustness of entity recognition in a structured manner.
[0246] Furthermore, based on the above method embodiment, the embodiment of the present invention also provides an archive knowledge extraction device based on structural prior knowledge. Figure 4 FIG. 4 shows a schematic diagram of a structure of an archive knowledge extraction device based on structural prior knowledge provided by an embodiment of the present invention. Figure 4As shown, the archival knowledge extraction device based on structural prior knowledge includes: a data acquisition module 100, used to acquire a target document; a feature extraction module 200, used to perform multi-feature extraction on the target document to obtain multi-feature information in the target document; the multi-feature information includes structural features and glyph features; a feature fusion module 300, used to input the multi-feature information into a pre-constructed feature fusion model, perform feature fusion on the multi-feature information based on the feature correlation of the multi-feature extraction features, and generate fused features; a pre-processing module 400, used to perform feature extraction and data dimensionality reduction on the fused features to obtain key information in the fused features; an output module 500, used to perform entity recognition on the key information through a pre-constructed label prediction model, and output the key entity information in the target document; the label prediction model is constructed based on the structural prior knowledge introduced into the deep feature representation.
[0247] An archival knowledge extraction device based on structural prior knowledge provided in an embodiment of the present invention has the same technical features as an archival knowledge extraction method based on structural prior knowledge provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.
[0248] Furthermore, based on the above-mentioned embodiment, the embodiment of the present invention also provides another archival knowledge extraction device based on structural prior knowledge, wherein the above-mentioned feature extraction module 200 is also used to perform multi-feature extraction on the target document, and the step of obtaining multi-feature information in the target document includes: inputting the target document into a pre-built multi-feature extraction model, performing multi-feature extraction on the target document through the multi-feature extraction model, and obtaining multi-feature information in the target document; wherein the multi-feature extraction model includes a structural feature extraction model and a glyph feature extraction model; the structural feature extraction model is used to extract the structural features of the characters in the target document, and the glyph feature extraction model is used to extract the glyph features of the characters in the target document.
[0249] The feature extraction module 200 is also used to obtain pre-collected Chinese archives and collect Chinese character data in the Chinese archives; annotate the Chinese character data according to the Chinese character features of the Chinese character data to obtain data labels; the Chinese character features include radicals and glyphs of the Chinese character data; use the first convolutional neural network to split the Chinese character data according to the radical structure and extract structural features to determine the structural feature representation; and capture the glyph detail features of the Chinese character data through the VGG16 network; splice the structural feature representation and the glyph detail features into a comprehensive feature vector, train the second convolutional neural network model through the comprehensive feature vector and the data label, and use the Adam optimizer to optimize the model parameters of the second convolutional neural network model; and build a multi-feature extraction model based on the trained second convolutional neural network model.
[0250] The feature extraction module 200 is also used to determine the context features corresponding to the Chinese character data according to the structural feature representation and the glyph detail features; The function evaluates the correlation between the structural feature representation and the glyph detail feature and the context feature respectively; based on the correlation, the feature weights corresponding to the structural feature representation and the glyph detail feature are calculated; based on the feature weights, the structural feature representation and the glyph detail feature are concatenated into a comprehensive feature vector.
[0251] The feature fusion module 300 is also used to perform feature cracking processing on multiple feature information to obtain a fine-grained sub-feature set; use the Transformer structure to capture the dynamic correlation corresponding to the sub-feature set to obtain an integrated feature; based on the distortion and information loss of the integrated feature in the high-dimensional space, use the Chebyshev polynomial to optimize the integrated feature to obtain an optimized feature; calculate the importance scores corresponding to the optimized feature and the multiple feature information respectively, and fuse the optimized feature and the multiple feature information based on the importance scores to obtain a fused feature.
[0252] The above-mentioned preprocessing module 400 is also used to calculate the recalibration weight of the key information and the potential dimension task relevance measurement; adjust the key information according to the recalibration weight and the potential dimension task relevance measurement to obtain the recalibrated information; and determine the recalibrated information as the key information of the fusion feature.
[0253] Furthermore, the embodiment of the present invention extracts features from fused features through a pre-constructed feature extraction model. The preprocessing module 400 is also used to: use the improved whale optimization algorithm to perform preliminary feature extraction on a preset training sample set at multiple granularities, and search for the optimal feature subset in the feature space by simulating the social behavior and predation strategy of whales; input the optimal feature subset into the deep learning model for semantic deepening to obtain enhanced features; calculate the loss corresponding to the enhanced features, and adjust the search strategy of the whale optimization algorithm according to the loss; until the loss reaches a preset threshold, a feature extraction model is constructed based on the whale optimization algorithm and the deep learning model.
[0254] Furthermore, the embodiment of the present invention performs data dimensionality reduction on the fused features through a pre-constructed feature dimensionality reduction model, and the above-mentioned preprocessing module 400 is also used to: customize the encoder and decoder of the autoencoder; obtain a preset training sample set, and train the encoder and decoder of the autoencoder through the training sample set; optimize the parameters of the autoencoder through a pre-set potential interaction learning loss function, and introduce feature interaction terms in the latent space to reconstruct features based on the feature interaction terms; wherein the potential interaction learning loss function includes a reconstruction error and a regularization term, and the reconstruction error is calculated based on the weighted importance of the feature; and construct a feature dimensionality reduction model based on the trained autoencoder.
[0255] The above-mentioned output module 500 is also used to obtain a preset training sample set; the training sample set includes document samples and sample labels corresponding to the document samples, and the sample labels are used to characterize the entities corresponding to the document samples; the deep feature representation of the training sample set is learned through the autoencoder, and the deep feature representation is integrated into the conditional random field model to perform structured entity label prediction; under the framework of the structured deep learning model, the parameters of the autoencoder and the conditional random field model are jointly optimized by combining the reconstruction loss of the autoencoder and the log-likelihood of the correct label sequence in the conditional random field model; the performance of the autoencoder and the conditional random field model is evaluated; and a label prediction model is constructed based on the autoencoder and the conditional random field model that meet the performance evaluation requirements.
[0256] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above Figures 1 to 3 The steps of the method are shown.
[0257] The embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor. Figures 1 to 3 The steps of the method are shown.
[0258] The embodiment of the present invention also provides a schematic diagram of the structure of an electronic device, such as Figure 5 FIG. 5 is a schematic diagram of the structure of the electronic device, wherein the electronic device includes a processor 51 and a memory 50, the memory 50 stores computer executable instructions that can be executed by the processor 51, and the processor 51 executes the computer executable instructions to implement the above Figures 1 to 3 The method shown.
[0259] exist Figure 5 In the illustrated embodiment, the electronic device further includes a bus 52 and a communication interface 53 , wherein the processor 51 , the communication interface 53 and the memory 50 are connected via the bus 52 .
[0260] Among them, the memory 50 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 53 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 52 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc., and can also be an AMBA (Advanced Microcontroller Bus Architecture, on-chip bus standard) bus, wherein AMBA defines three types of buses, including APB (Advanced Peripheral Bus) bus, AHB (Advanced High-performance Bus) bus and AXI (Advanced eXtensible Interface) bus. The bus 52 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0261] The processor 51 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 51. The above processor 51 can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor 51 reads the information in the memory and combines its hardware to complete the above Figures 1 to 3 Any of the methods shown.
[0262] The computer program product of a method and apparatus for extracting archival knowledge based on structural prior knowledge provided in an embodiment of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0263] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0264] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for extracting archival knowledge based on structural prior knowledge, characterized in that: include: Get the target document; Performing multi-feature extraction on the target document to obtain multi-feature information in the target document; The multi-feature information includes structural features and glyph features; Inputting the multiple feature information into a pre-built feature fusion model, fusing the multiple feature information based on feature correlation of the multiple feature information, and generating fused features; Performing feature extraction and data dimension reduction on the fused features to obtain key information in the fused features; Performing entity recognition on the key information through a pre-built label prediction model, and outputting the key entity information in the target document; the label prediction model is constructed based on structural prior knowledge introduced into deep feature representation; The step of performing multi-feature extraction on the target document to obtain multi-feature information in the target document includes: Inputting the target document into a pre-built multi-feature extraction model, performing multi-feature extraction on the target document through the multi-feature extraction model, and obtaining multi-feature information in the target document; The multi-feature extraction model includes a structural feature extraction model and a glyph feature extraction model; the structural feature extraction model is used to extract structural features of the characters in the target document, and the glyph feature extraction model is used to extract glyph features of the characters in the target document; The method for constructing the multi-feature extraction model comprises: Acquire the pre-collected Chinese files and collect Chinese character data in the Chinese files; According to the Chinese character features of the Chinese character data, the Chinese character data are annotated to obtain data labels; the Chinese character features include radicals and glyphs of the Chinese character data; Using a first convolutional neural network to split the Chinese character data according to the radical structure and extract structural features to determine the structural feature representation; and capturing the glyph detail features of the Chinese character data through a VGG16 network; splicing the structural feature representation and the glyph detail feature into a comprehensive feature vector; Training a second convolutional neural network model using the comprehensive feature vector and the data label, and optimizing model parameters of the second convolutional neural network model using an Adam optimizer; Building a multi-feature extraction model based on the trained second convolutional neural network model; The step of splicing the structural feature representation and the glyph detail feature into a comprehensive feature vector comprises: Determining context features corresponding to the Chinese character data according to the structural feature representation and the glyph detail features; pass The function evaluates the correlation between the structural feature representation and the glyph detail feature and the context feature respectively; Based on the correlation, calculating feature weights corresponding to the structural feature representation and the glyph detail feature respectively; The structural feature representation and the glyph detail feature are concatenated into a comprehensive feature vector based on the feature weight.
2. The method according to claim 1, characterized in that The step of inputting the multiple feature information into a pre-built feature fusion model, fusing the multiple feature information based on the feature correlation of the multiple feature information, and generating fused features includes: Performing feature cracking processing on the multiple feature information to obtain a fine-grained sub-feature set; The Transformer structure is used to capture the dynamic correlation corresponding to the sub-feature sets to obtain integrated features; Based on the distortion and information loss of the integrated features in the high-dimensional space, the integrated features are optimized using Chebyshev polynomials to obtain optimized features; The importance scores corresponding to the optimization feature and the multiple feature information are calculated respectively, and the optimization feature and the multiple feature information are fused based on the importance scores to obtain a fused feature.
3. The method according to claim 1, characterized in that The method further comprises: Calculating the recalibrated weights of the key information and the task relevance measure of the latent dimensions; Adjusting the key information according to the recalibration weight and the potential dimension task relevance measure to obtain recalibration information; The recalibration information is determined as key information of the fusion feature.
4. The method according to claim 1, characterized in that: The fusion feature is extracted by using a pre-built feature extraction model, and the method for building the feature extraction model includes: The improved whale optimization algorithm is used to perform preliminary feature extraction on the preset training sample set at multiple granularities, and the optimal feature subset is searched in the feature space by simulating the social behavior and predation strategy of whales. Inputting the optimal feature subset into a deep learning model for semantic deepening to obtain enhanced features; Calculating the loss corresponding to the enhanced feature, and adjusting the search strategy of the whale optimization algorithm according to the loss; Until the loss reaches a preset threshold, a feature extraction model is constructed based on the whale optimization algorithm and the deep learning model.
5. The method according to claim 1, characterized in that The fusion feature is subjected to data dimensionality reduction by using a pre-constructed feature dimensionality reduction model, wherein the method for constructing the feature dimensionality reduction model comprises: Customize the encoder and decoder of the autoencoder; Obtaining a preset training sample set, and training the encoder and the decoder of the autoencoder by using the training sample set; The parameters of the autoencoder are optimized by a preset potential interaction learning loss function, and a feature interaction term is introduced in the latent space to perform feature reconstruction based on the feature interaction term; wherein the potential interaction learning loss function includes a reconstruction error and a regularization term, and the reconstruction error is calculated based on the weighted importance of the feature; Build a feature dimensionality reduction model based on the trained autoencoder.
6. The method according to claim 1, characterized in that The method for constructing the label prediction model includes: Obtaining a preset training sample set; the training sample set includes document samples and sample labels corresponding to the document samples, wherein the sample labels are used to characterize entities corresponding to the document samples; Learning the deep feature representation of the training sample set through an autoencoder, and integrating the deep feature representation into a conditional random field model to perform structured entity label prediction; Under the framework of the structured deep learning model, the parameters of the autoencoder and the conditional random field model are jointly optimized by combining the reconstruction loss of the autoencoder and the log-likelihood of the correct label sequence in the conditional random field model; Performing performance evaluation on the autoencoder and the conditional random field model; A label prediction model is built based on the autoencoder and conditional random field models that meet the performance evaluation requirements.
7. A device for extracting archive knowledge based on structural prior knowledge, characterized in that: The device comprises: A data acquisition module, used to acquire target documents; A feature extraction module, used for performing multi-feature extraction on the target document to obtain multi-feature information in the target document; the multi-feature information includes structural features and glyph features; A feature fusion module, used for inputting the multiple feature information into a pre-built feature fusion model, performing feature fusion on the multiple feature information based on the feature correlation of the multiple feature extraction features, and generating a fusion feature; A preprocessing module, used to perform feature extraction and data dimension reduction on the fused features to obtain key information in the fused features; An output module, used to perform entity recognition on the key information through a pre-built label prediction model, and output the key entity information in the target document; the label prediction model is constructed based on structural prior knowledge introduced by deep feature representation; The feature extraction module is further used to input the target document into a pre-built multi-feature extraction model, and perform multi-feature extraction on the target document through the multi-feature extraction model to obtain multi-feature information in the target document; wherein the multi-feature extraction model includes a structural feature extraction model and a glyph feature extraction model; the structural feature extraction model is used to extract structural features of the characters in the target document, and the glyph feature extraction model is used to extract glyph features of the characters in the target document; The feature extraction module is also used to obtain a pre-collected Chinese archive, collect Chinese character data in the Chinese archive; annotate the Chinese character data according to the Chinese character features of the Chinese character data to obtain a data label; the Chinese character features include radicals and glyphs of the Chinese character data; use a first convolutional neural network to split the Chinese character data according to the radical structure and extract structural features to determine the structural feature representation; and capture the glyph detail features of the Chinese character data through a VGG16 network; splice the structural feature representation and the glyph detail features into a comprehensive feature vector; train a second convolutional neural network model through the comprehensive feature vector and the data label, and use an Adam optimizer to optimize the model parameters of the second convolutional neural network model; and build a multi-feature extraction model based on the trained second convolutional neural network model; The feature extraction module is further used to determine the context features corresponding to the Chinese character data according to the structural feature representation and the glyph detail features; The function evaluates the correlation between the structural feature representation and the glyph detail feature and the context feature respectively; based on the correlation, calculates the feature weights corresponding to the structural feature representation and the glyph detail feature respectively; based on the feature weights, splices the structural feature representation and the glyph detail feature into a comprehensive feature vector.
