Archive label intelligent generation method and system based on natural language processing
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 山西益通电网保护自动化有限责任公司
- Filing Date
- 2025-08-29
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]本申请通过提供了基于自然语言处理的档案标签智能生成方法及系统,旨在解决现有技术中的静态标签无法适配档案内容的关联关系变化,标签与档案内容的语义贴合度低,制约档案资源高效利用的技术问题
[0015]综上,本申请中提供的一个或多个技术方案,实现了通过构建实体语义关联网络,深入挖掘档案文本中的实体关联与语义逻辑,提升标签与档案内容的语义贴合度,对候选标签和语义特征进行匹配度迭代筛选,生成的标签规范性与针对性显著增强,满足档案管理的分级分类需求,通过结构化关联矩阵融合初始标签与语义特征生成动态标签,并与档案文本、元数据绑定存储,使标签能够随档案内容的关联关系动态调整,提高档案资源的利用效率的技术效果。
Smart Images

Figure CN121166824B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to a method and system for intelligent generation of file tags based on natural language processing. Background Technology
[0002] With the deepening of digital transformation, the number of archives is growing exponentially, covering various types such as documents, technology, and audio-visual materials. The development of natural language processing technology has made it possible to automatically generate archive tags. Through intelligent analysis of archive text and metadata, tags can be generated and updated dynamically, which is of great significance for improving the efficiency of archive management and ensuring the orderly use of information resources. Currently, archive tag generation technology mostly relies on keyword matching or simple rule extraction to extract tags, without deeply exploring the entity relationships and semantic logic in the archive text. This results in low semantic fit between tags and archive content, often leading to tag generalization or semantic fragmentation. In addition, traditional tags are mostly static and fixed, and cannot be dynamically adjusted according to the relationship between archive content, resulting in insufficient accuracy when searching across archives and restricting the efficient use of archive resources.
[0003] In summary, existing technologies suffer from the technical problem that static tags cannot adapt to changes in the relationships between archival content, and the semantic fit between tags and archival content is low, thus hindering the efficient utilization of archival resources. Summary of the Invention
[0004] This application provides a method and system for intelligent generation of archival tags based on natural language processing, aiming to solve the technical problems in the prior art where static tags cannot adapt to changes in the relationships between archival content, the tags have low semantic fit with the archival content, and the efficient utilization of archival resources is restricted.
[0005] In view of the above problems, the technical solution to achieve the present application is as follows: In a first aspect, this application provides a method for intelligent generation of archival tags based on natural language processing. The method includes: determining core entities and an entity semantic association network based on archival text information and corresponding archival metadata; performing cosine similarity analysis with the core entities based on an archival management domain tag library to generate a candidate tag set; iterating the matching degree of each candidate tag in the candidate tag set using the security level and validity period attributes corresponding to the archival metadata to select M initial tags; performing dependency parsing analysis with the entity semantic association network based on a conditional random field to generate a candidate semantic feature set; iterating the matching degree of each candidate semantic feature in the candidate semantic feature set using the subject area and institutional geographic attributes corresponding to the implicit elements to select N initial semantic features; and setting a structured association matrix based on the M initial tags and N initial semantic features to generate dynamic tags, which are then bound and stored with the archival text information and corresponding archival metadata.
[0006] Preferably, the co-occurrence probability is obtained by counting the number of co-occurrences in the archive text information and the total number of windows through a sliding window; the row dimension of the structured association matrix corresponds to the M initial labels, the column dimension of the structured association matrix corresponds to the N initial semantic features, and the matrix elements of the structured association matrix are the co-occurrence probabilities.
[0007] Preferably, the document text information is segmented and converted into word vectors, word weights are evaluated through an attention mechanism, and key semantic word sequences are determined; core entities under entity types are identified, including person names, organization names, timestamps, and event content; based on the key semantic word sequences and core entities, the relationships between entities are analyzed according to three types of dependency relations: subject-predicate, verb-object, and modifier-head, and an entity semantic association network is constructed.
[0008] Preferably, tag word vectors are configured based on the tag library in the field of archive management; core entity word vectors are configured based on the core entities; cosine similarity analysis is performed using the tag word vectors and core entity word vectors, and the tags are sorted in descending order of cosine similarity; at the same time, candidate tags are eliminated based on semantic field overlap to obtain a set of candidate tags with a preset number of tags.
[0009] Preferably, the document management domain tag library is used as external training data, and transfer learning is used to make the tag word vectors simultaneously contain the semantics of the tag itself and the domain context information; the trained tag word vectors are normalized, the cosine similarity of any two tag word vectors is calculated, and a tag semantic association graph is constructed; bidirectional association edges are established in the tag semantic association graph, and the bidirectional association edges are used to perform semantic expansion recommendation on the candidate tag set.
[0010] Preferably, when the number of tags in the candidate tag set is less than the preset number of tags, the graph expansion mechanism is activated; supplementary tags are generated based on the graph expansion mechanism, and semantic expansion recommendations are performed on the candidate tag set.
[0011] Preferably, starting from the first candidate label, a breadth-first search is performed along the bidirectional association edge, prioritizing the access of adjacent labels. The first candidate label is any candidate label in the candidate label set. Based on the first candidate label, a multi-level semantic radiation expansion is performed in the label semantic association graph to generate supplementary labels.
[0012] Preferably, in the tag semantic association graph, the tags on the search path are semantically clustered, and each cluster selects a tag that is semantically complementary to the first candidate tag to determine the first layer of extended tags, the second layer of extended tags up to the Qth layer of extended tags, where Q is greater than or equal to 3; based on the first candidate tag and the first layer of extended tags, the second layer of extended tags up to the Qth layer of extended tags, multi-level semantic radiation extension is performed in the tag semantic association graph.
[0013] Preferably, the security level is quantified as the weight value of the first constraint branch, and the time limit attribute is quantified as the weight value of the second constraint branch; through the weight values of the first constraint branch and the weight values of the second constraint branch, a local matching degree analysis is performed on each candidate label in the candidate label set until the matching degree value converges; at the same time, multiple rounds of matching degree iteration and elimination are performed to select M initial labels.
[0014] In a second aspect, this application provides a method and system for intelligent generation of archival tags based on natural language processing. The system includes: a semantic association analysis module: determining core entities and entity semantic association networks based on archival text information and corresponding archival metadata; a first matching degree iteration module: performing cosine similarity analysis with core entities based on an archival management domain tag library to generate a candidate tag set; iterating the matching degree of each candidate tag in the candidate tag set based on the security level and validity period attributes corresponding to the archival metadata to select M initial tags; a second matching degree iteration module: performing dependency parsing analysis with the entity semantic association network based on conditional random fields to generate a candidate semantic feature set; iterating the matching degree of each candidate semantic feature in the candidate semantic feature set based on the subject area and institutional geographic attributes corresponding to implicit elements to select N initial semantic features; and a tag generation module: setting a structured association matrix based on the M initial tags and N initial semantic features to generate dynamic tags, which are then bound and stored with the archival text information and corresponding archival metadata.
[0015] In summary, one or more technical solutions provided in this application achieve the following technical effects: by constructing an entity semantic association network, deeply mining the entity associations and semantic logic in the archival text, improving the semantic fit between tags and archival content, iteratively filtering candidate tags and semantic features based on matching degree, the generated tags are significantly enhanced in terms of standardization and relevance, meeting the hierarchical classification requirements of archival management, and generating dynamic tags by fusing initial tags and semantic features through a structured association matrix, which are then bound and stored with archival text and metadata, enabling the tags to be dynamically adjusted according to the association relationships of archival content, thereby improving the utilization efficiency of archival resources. Attached Figure Description
[0016] Figure 1 This application provides a flowchart illustrating the intelligent generation method for archive tags based on natural language processing.
[0017] Figure 2 This application provides a schematic diagram of the structure of a system for intelligent generation of archive tags based on natural language processing.
[0018] Figure labeling: Semantic association analysis module M100, first matching degree iteration module M200, second matching degree iteration module M300, tag generation module M400. Detailed Implementation
[0019] Example 1: The present application will be described in detail below with reference to the accompanying drawings, as follows... Figure 1 As shown, this application provides a method for intelligent generation of archive tags based on natural language processing, wherein the method includes: S1: Based on the archival text information and corresponding archival metadata, determine the core entities and the semantic association network of entities; S2: Based on the tag library in the archival management domain, perform cosine similarity analysis with the core entities to generate a candidate tag set. Based on the security level and validity period attributes corresponding to the archival metadata, perform matching degree iteration on each candidate tag in the candidate tag set to select M initial tags.
[0020] Specifically, core entities refer to specific objects in archival texts that possess key informational value, typically including entity types such as names of people, organizations, timestamps, and event content; entity semantic association networks refer to networks constructed by analyzing the semantic relationships between entities, reflecting the interrelationships and semantic logic between entities; cosine similarity analysis is a commonly used method for calculating text semantic similarity, representing text as vectors and using the cosine value of the angle between vectors to measure the degree of semantic similarity; matching degree iteration is a process of progressively filtering and optimizing candidate tags, performing multiple rounds of matching analysis on candidate tags based on set attribute weights, gradually eliminating tags that do not meet the requirements, and finally selecting the initial tags that best meet the requirements.
[0021] Execution steps: Based on the archival text information and corresponding archival metadata, the core entities and entity semantic association network are determined. Specifically, the archival text is segmented and word vectorized, word weights are evaluated through an attention mechanism, key semantic word sequences are determined, and core entities under entity types are identified. Finally, the relationships between entities are analyzed based on three types of dependency relations: subject-predicate, verb-object, and modifier-head, and an entity semantic association network is constructed. This provides an accurate core entity foundation for subsequent tag generation and ensures the close relevance between tags and archival content.
[0022] Tag word vectors are configured based on a tag library in the field of archival management, and core entity word vectors are configured based on core entities. Cosine similarity analysis is used to calculate and rank both, and semantic field overlap is used to eliminate candidate tags, resulting in a predetermined number of candidate tags. The security level is quantified as the weight value of the first constraint branch, and the validity period attribute is quantified as the weight value of the second constraint branch. Local matching degree analysis is performed on the candidate tags until the matching degree values converge. Multiple rounds of iterative elimination are carried out to select M initial tags. In the above steps, by combining key attributes such as the security level and validity period of the archives, it is ensured that the generated initial tags have high semantic similarity and meet the normative requirements of archival management, thereby improving the accuracy and relevance of the tags and providing a foundation for generating high-quality dynamic tags.
[0023] S3: Based on conditional random fields, perform dependency parsing with entity semantic association networks to generate a candidate semantic feature set. Based on the subject area and institutional geographic attributes corresponding to the implicit elements, iterate the matching degree of each candidate semantic feature in the candidate semantic feature set to select N initial semantic features; S4: Based on the M initial labels and N initial semantic features, set a structured association matrix to generate dynamic labels, and bind and store them with the archival text information and corresponding archival metadata.
[0024] Specifically, Conditional Random Fields (CRFs) are statistical learning methods used for sequence labeling, often applied in Natural Language Processing (NLP) tasks such as part-of-speech tagging and named entity recognition. Dependency parsing reveals the grammatical structure and semantic logic of sentences by analyzing the dependency relationships between words. Latent elements refer to information in archival texts that does not appear directly as core entities but plays an important role in semantic understanding, such as subject domains and institutional locations. Iterative matching is a process of progressively filtering and optimizing candidate semantic features. Based on set attribute weights, multiple rounds of matching analysis are performed on candidate semantic features, gradually eliminating features that do not meet the requirements and selecting the most suitable initial semantic features. The structured association matrix is a matrix structure used to represent the relationship between labels and semantic features. By establishing the co-occurrence probability or relevance weight of matrix elements, a quantitative association between labels and semantic features is established, thereby enabling the dynamic generation and updating of labels.
[0025] Execution steps: The Conditional Random Field (CRF) model is used to perform dependency parsing on the archival text, identifying dependency relationships between words, such as attributive, adverbial, and predicate-object relationships. Simultaneously, combined with entity relationships in the entity semantic association network, deep semantic features are mined from the text, forming a candidate semantic feature set. Dependency parsing is then used to extract dominance relationships (such as core words and modifiers), parallel relationships, and successive relationships between entities, generating structured semantic features. For example, in corporate technology archives, dependency parsing can identify the dependency relationship "company (organizational entity) - R&D (verb) - new product (core entity)," thereby extracting semantic features such as "new product R&D." This extraction of deep semantic features ensures that tag generation not only relies on surface vocabulary but also captures deep semantic information from the text, enhancing the semantic relevance between tags and the archive content.
[0026] The matching degree of the candidate semantic feature set is iterated based on the subject area and institutional location attributes corresponding to the implicit elements, and N initial semantic features are selected. Specifically, the subject area attribute is quantified as the first attribute weight, and the institutional location attribute is quantified as the second attribute weight. Multiple rounds of matching degree calculation are performed on the candidate semantic features, and features with low matching degree are gradually eliminated to select N initial semantic features. For example, when processing scientific and technological archives involving the field of artificial intelligence, 10 initial semantic features that are highly related to the field of artificial intelligence and specific institutional locations can be selected from the initial 50 candidate semantic features to ensure that the semantic features are highly matched with the implicit attributes of the archives, thereby improving the accuracy and relevance of the labels.
[0027] A structured association matrix is set up based on M initial labels and N initial semantic features. Dynamic labels are generated and bound to the archive text and metadata for storage. Specifically, the co-occurrence probability is calculated by statistically analyzing the co-occurrence frequency and the total number of windows in the archive text. A matrix is constructed with the initial labels as the row dimension and the initial semantic features as the column dimension, and the matrix elements are the co-occurrence probabilities, thereby generating dynamic labels. In archives containing M initial labels and N initial semantic features, the structured association matrix can generate dynamic labels closely related to the archive content. These dynamic labels are bound to the archive text and metadata for storage, enabling the labels to be dynamically adjusted according to the association relationships of the archive content. This improves the utilization efficiency of archive resources and realizes the dynamic adaptability of labels and the intelligentization of archive management.
[0028] Dynamic tags are bound and stored with archive text and metadata. Specifically, the binding relationship between dynamic tags and archive text information and corresponding archive metadata is stored in JSON-LD format, including tag ID, tag name, weight, generation time, and associated metadata fields. A tag-archive inverted index is established to support queries by tag combination. The tag system is regularly checked for consistency, redundant tags are deleted, and new domain-specific tags are added.
[0029] Furthermore, based on the M initial labels and N initial semantic features, a structured association matrix is set. The method of this application includes: The co-occurrence probability is obtained by counting the number of co-occurrences in the archive text information and the total number of windows using a sliding window. The row dimension of the structured association matrix corresponds to the M initial labels, the column dimension of the structured association matrix corresponds to the N initial semantic features, and the matrix elements of the structured association matrix are the co-occurrence probabilities.
[0030] Specifically, a sliding window is used to slide word by word through a fixed-size window in the archival text information to count the co-occurrence of words within the window; the co-occurrence count refers to the frequency of two words appearing simultaneously within the sliding window, and the total number of windows is the total number of windows covered by the sliding window in the text; the co-occurrence probability is the ratio of the co-occurrence count to the total number of windows, used to measure the strength of the association between two words; the structured association matrix is a matrix used to represent the association between labels and semantic features, with its row dimension corresponding to the initial labels, column dimension corresponding to the initial semantic features, and matrix elements being co-occurrence probabilities, used to quantify the degree of association between labels and semantic features.
[0031] Execution steps: The co-occurrence probability is obtained by counting the number of co-occurrences in the archive text information and the total number of windows using a sliding window. Specifically, the size of the sliding window in the archive text is set to... The sliding window is used to slide word by word and record the co-occurrence of words in each window. For example, in the enterprise file, the window size is set to 5, and the co-occurrence of the words "artificial intelligence" and "algorithm optimization" is counted as 12 times. With a total of 1000 windows, the co-occurrence probability is 12 / 1000 = 0.012. The above steps play a role in quantifying the association strength between labels and semantic features, and provide data support for the subsequent construction of a structured association matrix.
[0032] When constructing a structured association matrix, M initial labels are used as the row dimension, N initial semantic features are used as the column dimension, and the matrix elements represent co-occurrence probabilities. If M=20 and N=10, a 20×10 matrix is constructed, where each element represents the co-occurrence probability of the corresponding label and semantic feature. The structured association matrix plays a role in association mapping, providing a foundation for the generation of dynamic labels by quantifying the association between labels and semantic features. The generation of dynamic labels depends on this quantified association, enabling labels to be dynamically adjusted according to the semantic features of the text content, thereby more accurately reflecting the archival content and improving the efficiency of archival retrieval and management.
[0033] Furthermore, based on the archival text information and corresponding archival metadata, the core entities and entity semantic association networks are determined. The method in this application includes: The document text information is segmented and converted into word vectors. Word weights are evaluated through an attention mechanism to determine the key semantic word sequence. Core entities under entity types are identified, including person names, organization names, timestamps, and event content. Based on the key semantic word sequence and core entities, the associations between entities are analyzed according to three types of dependency relations: subject-predicate, verb-object, and modifier-head, to construct an entity semantic association network.
[0034] Specifically, word segmentation involves dividing archival text information into individual words for subsequent word vector conversion and semantic analysis; word vector conversion maps each word to a vector in a vector space so that machines can process and understand the semantic information of the text; attention mechanisms are a method for evaluating the importance of words in text, determining key semantic word sequences by calculating the attention weight of each word, i.e., word sequences that play a key role in the semantic understanding of the text; entity types refer to predefined entity categories, such as names of people, names of organizations, timestamps, event content, etc., and core entities are specific entities belonging to these types; dependency analysis analyzes the grammatical and semantic relationships between words, including three common relationships: subject-predicate, verb-object, and modifier-head. Constructing an entity semantic association network involves analyzing the dependency relationships between entities to form a network structure representing entities and their semantic associations.
[0035] Execution steps: The document text information is segmented and converted into word vectors. Word weights are evaluated using an attention mechanism to determine key semantic word sequences. During segmentation, the document text is divided into word sequences. For example, "The company decided to hold a new product launch conference in year a, month b" is segmented into words such as "company, decide, in, year a, month b, hold, new product, launch conference". Each word is then converted into a word vector, such as a word vector dimension of 300, where each word corresponds to a vector of length 300. The attention mechanism is used to evaluate word weights and determine key semantic word sequences. For example, in scientific and technological documents, the attention mechanism reveals that words such as "artificial intelligence, algorithm optimization, neural network" have high weights and are identified as key semantic word sequences. Key semantic information of the text is extracted, providing basic information for the subsequent construction of a semantic association network.
[0036] Identifying core entities within entity types involves using named entity recognition technology to identify entities belonging to categories such as person names, organization names, timestamps, and event content. For example, in the same technology document, the system identifies the person name "Zhang (CEO)," the organization name "XX Technology Co., Ltd. R&D Department," the timestamp "year a month b," and the event content "new product launch," extracting core entities that provide key objects for subsequent analysis of entity relationships.
[0037] Based on key semantic word sequences and core entities, this paper analyzes the relationships between entities according to three types of dependency relations: subject-verb, verb-object, and modifier-head, and constructs an entity semantic association network. For example, based on the key semantic word "artificial intelligence" (subject) and the core entity "XX Technology Co., Ltd. R&D Department" (organization name), dependency parsing reveals the verb-object dependency relationship "XX Technology Co., Ltd. R&D Department (subject) - R&D (verb) - Artificial Intelligence (object)" and the modifier-head dependency relationship "Artificial Intelligence (modifier) - Algorithm Optimization (headword)", thus constructing an entity semantic association network. In the above steps, by analyzing the dependency relationships between entities and constructing an entity semantic association network, a semantic structural foundation is provided for subsequent tag generation, enhancing the semantic relevance between tags and file content.
[0038] Furthermore, based on a tag library in the field of archival management, cosine similarity analysis is performed with core entities to generate a candidate tag set. The method of this application includes: Based on the tag library for the document management domain, configure tag word vectors; based on the core entities, configure core entity word vectors; use the tag word vectors and core entity word vectors to perform cosine similarity analysis, and sort them in descending order of cosine similarity; at the same time, eliminate tags based on semantic field overlap to obtain a candidate tag set with a preset number of tags.
[0039] Specifically, tag word vectors refer to converting each tag in the tag library of the archival management domain into vector form in order to quantify the semantic information of the tags; core entity word vectors are converted into vector form of the identified core entities so that they can be calculated and compared in the semantic space; cosine similarity analysis is a method used to calculate the similarity between two vectors. By calculating the ratio of the dot product of two vectors to the vector magnitude, a similarity value between -1 and 1 is obtained. The closer the value is to 1, the more similar they are; semantic field overlap refers to the degree of overlap between different tags or entities in the semantic field (i.e., semantic categories within a specific domain). It is used to identify semantically similar or redundant items so that they can be eliminated, thereby optimizing the candidate tag set.
[0040] Execution steps: Configure tag word vectors according to the tag library of the document management domain, and configure core entity word vectors according to the core entities. Specifically, use word embedding technology (such as Word2Vec or GloVe) to convert each tag and core entity in the tag library into a fixed-dimensional vector. If 300-dimensional word vectors are used, then the tag "artificial intelligence" and the core entity can both be represented as vectors of length 300.
[0041] Cosine similarity analysis is performed using these word vectors, and the tags are sorted in descending order of cosine similarity. For example, after calculating the cosine similarity between the core entity "artificial intelligence" and all tags in the tag library, the tags are sorted by similarity. If the cosine similarity between "machine learning" and "artificial intelligence" is 0.85, and the similarity between "natural language processing" and "artificial intelligence" is 0.80, they are sorted accordingly. By quantifying the semantic similarity between tags and the core entity, relevant tags are initially screened. At the same time, tags are eliminated based on semantic field overlap to obtain a candidate tag set with a preset number of tags. Specifically, by analyzing the semantic field overlap between tags, tags that are too similar or redundant are eliminated. If the semantic field overlap between "deep learning" and "neural network" is high, when the preset number of tags is 10, one of "deep learning" and "neural network" can be eliminated, resulting in a set of 10 candidate tags. This optimizes the quality of the tag set and ensures the diversity and representativeness of the tags.
[0042] Furthermore, based on the aforementioned tag library for the field of document management, and configuring tag word vectors, the method of this application includes: Using the aforementioned domain tag library for archive management as external training data, transfer learning is employed to ensure that the tag word vectors simultaneously contain the semantics of the tag itself and the domain contextual information. The trained tag word vectors are normalized, and the cosine similarity between any two tag word vectors is calculated to construct a tag semantic association graph. Bidirectional association edges are established in the tag semantic association graph, and these bidirectional association edges are used to perform semantic expansion recommendations on the candidate tag set.
[0043] Specifically, transfer learning is a machine learning technique that allows the use of knowledge trained on external datasets to improve learning performance on target tasks. A label library in the archival management domain serves as external training data for training label word vectors. Through transfer learning, the label word vectors not only contain the semantic information of the labels themselves but also incorporate contextual information from the archival management domain. Normalization adjusts the numerical range of the label word vectors to a standard interval (usually 0 to 1) for unified comparison and calculation. Cosine similarity is an indicator that measures the similarity between two vectors; calculating the cosine similarity between two label word vectors reflects their semantic proximity. A label semantic association graph is a graphical structure where nodes represent labels and edges represent semantic similarity or association between labels. Bidirectional association edges refer to bidirectional traversal connections established between two label nodes in the graph, used for semantic expansion and recommendation.
[0044] Execution steps: Use a pre-trained model (such as BERT or other deep learning models) to fine-tune the training on a label library in the field of archives management. This allows the model to learn the specific semantic features of the labels in that field. For example, after transfer learning, the word vector of the label "artificial intelligence" not only contains general semantic information, but also incorporates specific application scenarios and contextual information related to artificial intelligence in the field of archives management. This improves the semantic richness of the label word vectors, enabling them to more accurately reflect the actual semantics of the labels in the field of archives management.
[0045] The trained label word vectors are normalized, and the cosine similarity between any two label word vectors is calculated to construct a label semantic association graph. After normalization, the cosine similarity between any two label word vectors is calculated. For example, the cosine similarity between "artificial intelligence" and "machine learning" may be 0.85, while the similarity between "artificial intelligence" and "archive management" is 0.60. Based on these similarity values, a label semantic association graph is constructed. In the label semantic association graph, each label node is connected to other semantically similar label nodes, visualizing the semantic relationships between labels.
[0046] Bidirectional association edges are established in the semantic association graph of the label to perform semantic expansion and recommendation of the candidate label set. When the number of labels in the candidate label set is insufficient, semantically similar labels are found from the graph through the bidirectional association edges to supplement the recommendation. For example, if the candidate label set contains "artificial intelligence", the bidirectional association edges of the graph can be used to recommend semantically similar labels such as "machine learning" or "deep learning" to expand it. Through the bidirectional association edges of the semantic association graph, semantically related labels can be dynamically supplemented to the candidate label set, expanding and optimizing the candidate label set and enhancing the completeness and adaptability of the candidate label set.
[0047] Furthermore, the bidirectional association edges are used to perform semantic expansion recommendations on the candidate label set. The method of this application includes: When the number of tags in the candidate tag set is less than the preset number of tags, the graph expansion mechanism is activated; supplementary tags are generated based on the graph expansion mechanism, and semantic expansion recommendations are performed on the candidate tag set.
[0048] Specifically, the candidate tag set refers to the set of tags obtained through preliminary screening, and the preset number of tags is a target number of tags pre-set according to the needs of file management; the graph expansion mechanism is a method of generating supplementary tags based on the semantic association graph of tags. When the number of tags in the candidate tag set is insufficient, this mechanism is used to find tags with similar semantics to the existing tags from the semantic association graph to supplement them; supplementary tags refer to tags that are semantically related to the existing tags when the number of tags in the candidate tag set is insufficient; semantic expansion recommendation refers to expanding the candidate tag set according to the semantic association relationship between tags and recommending more relevant tags.
[0049] Execution steps: When the number of tags in the candidate tag set is less than the preset number of tags, the graph expansion mechanism is activated. If the preset number of tags is 10, but the initial screening results in only 7 tags in the candidate tag set, the graph expansion mechanism needs to be activated. Specifically, based on the tag semantic association graph, starting with the tags in the candidate tag set, other tags with high semantic relevance are searched as supplementary tags. For example, in the semantic association graph, the tag "artificial intelligence" is closely associated with tags such as "machine learning" and "deep learning". If "artificial intelligence" is in the candidate tag set, "machine learning" and "deep learning" are recommended as supplementary tags to ensure that the final tag set meets the tag number requirement.
[0050] Supplementary tags are generated based on the graph expansion mechanism, and semantic expansion recommendations are made to the candidate tag set. Specifically, in the tag semantic association graph, semantically related tags are selected for supplementation by utilizing the association relationships between tags. For example, by calculating the semantic similarity between candidate tags and other tags, the top few tags with high similarity are selected as supplements, so that the candidate tag set not only meets the quantity requirements, but also has more complete semantics, which enhances the matching degree between tags and archive content and improves the efficiency of archive retrieval and management.
[0051] Furthermore, based on the aforementioned map expansion mechanism, the method of this application generates supplementary tags, including: Starting from the first candidate label, a breadth-first search is performed along the bidirectional association edge, prioritizing the access of adjacent labels. The first candidate label is any candidate label in the candidate label set. Based on the first candidate label, a multi-level semantic radiation expansion is performed in the label semantic association graph to generate supplementary labels.
[0052] Specifically, breadth-first search is a traversal algorithm used for graph structures. Starting from the starting label, it visits adjacent nodes in the graph layer by layer, prioritizing nodes closer to the starting label. It is suitable for finding labels with semantic similarity to the starting label in a label semantic association graph. Multi-level semantic radiation expansion refers to expanding the label semantic association graph layer by layer from the first candidate label to obtain labels related to the starting label at different semantic levels. Supplementary labels are labels that are semantically related to the candidate label set and are selected from the graph through the expansion mechanism to enrich the content of the candidate label set.
[0053] Execution steps: Starting from the first candidate label, perform a breadth-first search along the bidirectional association edges, prioritizing the access of adjacent labels. For example, in the label semantic association graph, starting from the candidate label "artificial intelligence", perform BFS along the bidirectional association edges, prioritizing the access of its adjacent labels such as "machine learning" and "data mining". These labels have a direct semantic relationship with the starting label. Starting from the starting label, search for semantically similar labels, which provides a foundation for subsequent multi-level expansion.
[0054] Based on the first candidate label, multi-level semantic radiation expansion is performed in the label semantic association graph to generate supplementary labels. Specifically, starting from the starting label, it expands layer by layer along the bidirectional association edge, such as expanding to the second-level label "deep learning" and "neural network", the third-level label "convolutional neural network" and "recurrent neural network", until the preset expansion level Q is reached. For example, in the field of scientific and technological archives, starting from "artificial intelligence", after multi-level expansion, a series of related labels such as "machine learning", "deep learning", and "neural network" are obtained. In the above steps, through multi-level semantic radiation, labels related to the starting label at different semantic levels can be obtained, which enhances the completeness and semantic coverage of the candidate label set and improves the diversity and accuracy of the archive labels.
[0055] Furthermore, based on the first candidate label, multi-level semantic radiation expansion is performed in the label semantic association graph. The method of this application includes: In the tag semantic association graph, the tags on the search path are semantically clustered. Each cluster selects tags that are semantically complementary to the first candidate tag to determine the first layer of extended tags, the second layer of extended tags, and so on up to the Qth layer of extended tags, where Q is greater than or equal to 3. Based on the first candidate tag and the first layer of extended tags, the second layer of extended tags, and so on up to the Qth layer of extended tags, multi-level semantic radiation extension is performed in the tag semantic association graph.
[0056] Specifically, semantic clustering refers to classifying tags into different clusters based on their semantic similarity, with tags in each cluster having high semantic similarity; semantically complementary tags refer to tags that complement the first candidate tag semantically and enrich semantic information; multi-level semantic radiation extension refers to starting from the first candidate tag and expanding layer by layer in the tag semantic association graph to obtain tags related to the starting tag at different semantic levels, with the extension level Q being greater than or equal to 3.
[0057] Execution steps: Starting from the first candidate label, perform a breadth-first search along the bidirectional association edges to obtain all labels on the search path; use the K-Means algorithm to perform semantic clustering on these labels, calculate the similarity between the word vector of each label and the cluster center, and group semantically similar labels into one category. In each cluster, select labels that are semantically complementary to the first candidate label as extended labels. For example, in the field of science and technology, if the first candidate label is "artificial intelligence", then the first layer of extended labels may be "machine learning" or "data mining", the second layer of extended labels may be "deep learning" or "neural network", and the third layer of extended labels may be "convolutional neural network" or "recurrent neural network", etc. Through semantic clustering and selection of semantically complementary labels, it is possible to discover labels that are related to the first candidate label at different semantic levels, enriching the semantic hierarchy of the label set.
[0058] Based on the first candidate label and the extended labels at each level, multi-level semantic radiation expansion is carried out in the label semantic association graph. Taking the first candidate label as the core, the association paths of the first candidate label and the extended labels at each level in the label semantic association graph are integrated to form a multi-level semantic label system. This system comprehensively covers the semantic range related to the first candidate label, providing richer and more accurate semantic information for the generation of archival labels, improving the accuracy and completeness of archival labels, and helping to achieve refined management and efficient retrieval of archives.
[0059] Furthermore, based on the security classification and validity period attributes corresponding to the archive metadata, the matching degree of each candidate tag in the candidate tag set is iterated to filter M initial tags. The method of this application includes: The security level is quantified as the weight value of the first constraint branch, and the time limit attribute is quantified as the weight value of the second constraint branch. Using the weight values of the first constraint branch and the weight values of the second constraint branch, a local matching degree analysis is performed on each candidate label in the candidate label set until the matching degree value converges. At the same time, multiple rounds of matching degree iteration are performed to eliminate and select M initial labels.
[0060] Specifically, the weight value of the first constraint branch corresponds to the quantified value of the security classification, and the weight value of the second constraint branch corresponds to the quantified value of the validity period attribute. The security classification and validity period attributes of the archives are converted into numerical weight values. Through local matching degree analysis and multiple rounds of iterative elimination, the most suitable initial tags are selected. Local matching degree analysis calculates the matching degree between each candidate tag and the security classification and validity period attributes, and comprehensively evaluates the suitability of the tags. Multiple rounds of iterative elimination gradually eliminates tags with lower matching degrees in multiple rounds of calculation, and retains tags with higher matching degrees, until the matching degree values tend to stabilize.
[0061] Execution steps: Quantify the security classification as the weight value of the first constraint branch, and the time limit attribute as the weight value of the second constraint branch. For example, classify the security classification into three levels: "Top Secret," "Secret," and "Confidential," quantified with weight values of 0.9, 0.6, and 0.3 respectively; classify the time limit into three levels: "Long-term" (over 10 years), "Medium-term" (5-10 years), and "Short-term" (1-5 years), quantified with weight values of 0.8, 0.4, and 0.2 respectively. Perform local matching degree analysis on each tag in the candidate tag set. Further, if tag A has a security classification matching degree of 0.7, a time limit matching degree of 0.6, a security classification weight of 0.6, and a time limit weight of 0.4, then its overall matching degree is considered good. The matching degree is 0.7×0.6+0.6×0.4=0.66. Similarly, the overall matching degree of labels B, C, and D is obtained, and the first round of matching degree ranking is performed on labels A, B, C, and D. In the next iteration, the matching degree of the labels changes. For example, the matching degree of label A becomes 0.75. The overall matching degree is calculated again, and label A is 0.75×0.6+0.6×0.4=0.69. Similarly, the overall matching degree of labels B, C, and D is obtained, and the second round of matching degree ranking is performed on labels A, B, C, and D. Comparing the changes in the overall matching degree between the two rounds, label A increases from 0.66 to 0.69, a change of 0.03. If the convergence threshold is set to 0.01, iteration is still required.
[0062] Set an elimination rate, such as eliminating 20% of tags in each round; after the first iteration, sort the tags according to the overall matching degree. In the next iteration, continue to analyze and eliminate the remaining tags based on their matching degree. After multiple iterations, the matching degree value is gradually adjusted until the change is less than the set threshold, thus achieving convergence. In the process, M initial tags are gradually selected to ensure that these tags are highly matched with the archive in terms of semantics and attributes.
[0063] In summary, the beneficial effects of the embodiments of this application are: This application provides a method and system for intelligently generating archival tags based on natural language processing. The method involves identifying core entities and their semantic association networks based on archival text information and corresponding archival metadata; performing cosine similarity analysis with core entities using a tag library in the archival management domain to generate a candidate tag set; iterating the matching degree of each candidate tag in the candidate tag set based on the security level and validity period attributes corresponding to the archival metadata to select M initial tags; performing dependency parsing analysis with the entity semantic association network based on conditional random fields to generate a candidate semantic feature set; iterating the matching degree of each candidate semantic feature in the candidate semantic feature set based on the subject area and institutional geographic attributes corresponding to the implicit elements to select N initial semantic features; and setting a structured association matrix based on the M initial tags and N initial semantic features to generate dynamic tags, which are then bound and stored with the archival text information and corresponding archival metadata. This technology achieves the following results: by constructing an entity semantic association network, it deeply mines the entity associations and semantic logic in the archival text, improves the semantic fit between tags and archival content, it iterates and filters candidate tags and semantic features based on matching degree, and significantly enhances the standardization and targeting of generated tags, meeting the hierarchical classification requirements of archival management. It also achieves the following results: by fusing initial tags and semantic features through a structured association matrix to generate dynamic tags, and binding and storing them with archival text and metadata, the tags can be dynamically adjusted according to the association relationships of archival content, thereby improving the utilization efficiency of archival resources.
[0064] Example 2, based on the same inventive concept as the natural language processing-based intelligent generation method for archive tags in the foregoing examples, such as... Figure 2 As shown in the embodiments of this application, a method and system for intelligent generation of archive tags based on natural language processing is provided, wherein the system includes: Semantic association analysis module M100: Based on the archive text information and the corresponding archive metadata, determine the core entities and the entity semantic association network.
[0065] The first matching degree iteration module M200: Based on the tag library of the archive management domain, it performs cosine similarity analysis with the core entities to generate a candidate tag set. Based on the security level and validity period attributes corresponding to the archive metadata, it performs matching degree iteration on each candidate tag in the candidate tag set and selects M initial tags.
[0066] The second matching degree iteration module M300: Based on conditional random fields, it performs dependency parsing with entity semantic association networks to generate a candidate semantic feature set. Based on the subject area and institutional geographic attributes corresponding to the implicit elements, it performs matching degree iteration on each candidate semantic feature in the candidate semantic feature set to select N initial semantic features.
[0067] Tag generation module M400: Based on the M initial tags and N initial semantic features, it sets a structured association matrix, generates dynamic tags, and binds and stores them with the archive text information and corresponding archive metadata.
[0068] Furthermore, the label generation module M400 is used to perform the following method: The co-occurrence probability is obtained by counting the number of co-occurrences in the archive text information and the total number of windows using a sliding window. The row dimension of the structured association matrix corresponds to the M initial labels, the column dimension of the structured association matrix corresponds to the N initial semantic features, and the matrix elements of the structured association matrix are the co-occurrence probabilities.
[0069] Furthermore, the semantic association analysis module M100 is used to perform the following methods: The document text information is segmented and converted into word vectors. Word weights are evaluated through an attention mechanism to determine the key semantic word sequence. Core entities under entity types are identified, including person names, organization names, timestamps, and event content. Based on the key semantic word sequence and core entities, the associations between entities are analyzed according to three types of dependency relations: subject-predicate, verb-object, and modifier-head, to construct an entity semantic association network.
[0070] Furthermore, the first matching degree iteration module M200 is used to execute the following method: Based on the tag library for the document management domain, configure tag word vectors; based on the core entities, configure core entity word vectors; use the tag word vectors and core entity word vectors to perform cosine similarity analysis, and sort them in descending order of cosine similarity; at the same time, eliminate tags based on semantic field overlap to obtain a candidate tag set with a preset number of tags.
[0071] Furthermore, the first matching degree iteration module M200 is also used to execute the following method: Using the aforementioned domain tag library for archive management as external training data, transfer learning is employed to ensure that the tag word vectors simultaneously contain the semantics of the tag itself and the domain contextual information. The trained tag word vectors are normalized, and the cosine similarity between any two tag word vectors is calculated to construct a tag semantic association graph. Bidirectional association edges are established in the tag semantic association graph, and these bidirectional association edges are used to perform semantic expansion recommendations on the candidate tag set.
[0072] Furthermore, the first matching degree iteration module M200 is also used to execute the following method: When the number of tags in the candidate tag set is less than the preset number of tags, the graph expansion mechanism is activated; supplementary tags are generated based on the graph expansion mechanism, and semantic expansion recommendations are performed on the candidate tag set.
[0073] Furthermore, the first matching degree iteration module M200 is also used to execute the following method: Starting from the first candidate label, a breadth-first search is performed along the bidirectional association edge, prioritizing the access of adjacent labels. The first candidate label is any candidate label in the candidate label set. Based on the first candidate label, a multi-level semantic radiation expansion is performed in the label semantic association graph to generate supplementary labels.
[0074] Furthermore, the first matching degree iteration module M200 is also used to execute the following method: In the tag semantic association graph, the tags on the search path are semantically clustered. Each cluster selects tags that are semantically complementary to the first candidate tag to determine the first layer of extended tags, the second layer of extended tags, and so on up to the Qth layer of extended tags, where Q is greater than or equal to 3. Based on the first candidate tag and the first layer of extended tags, the second layer of extended tags, and so on up to the Qth layer of extended tags, multi-level semantic radiation extension is performed in the tag semantic association graph.
[0075] Furthermore, the first matching degree iteration module M200 is also used to execute the following method: The security level is quantified as the weight value of the first constraint branch, and the time limit attribute is quantified as the weight value of the second constraint branch. Using the weight values of the first constraint branch and the weight values of the second constraint branch, a local matching degree analysis is performed on each candidate label in the candidate label set until the matching degree value converges. At the same time, multiple rounds of matching degree iteration are performed to eliminate and select M initial labels.
[0076] In summary, any step can be stored as a computer instruction or program in an unrestricted computer memory and can be called and recognized by an unrestricted computer processor; no further restrictions are imposed here.
[0077] Furthermore, the above technical solutions only embody the preferred technical solutions of the embodiments of this application. Any changes that those skilled in the art may make to certain parts of these solutions embody the novel principles of the embodiments of this application. Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application.
Claims
1. A method for intelligently generating archive tags based on natural language processing, characterized in that, The method includes: Based on the archival text information and the corresponding archival metadata, the core entities and the semantic association network of entities are determined; Based on the tag library in the field of archives management, cosine similarity analysis is performed with the core entities to generate a candidate tag set. The matching degree of each candidate tag in the candidate tag set is iterated based on the security level and validity period attributes corresponding to the archive metadata, and M initial tags are selected. Based on conditional random fields, dependency parsing is performed on entity semantic association networks to generate candidate semantic feature sets. The matching degree of each candidate semantic feature in the candidate semantic feature set is iterated based on the subject domain and institutional geographic attributes corresponding to the implicit elements, and N initial semantic features are selected. Based on the M initial tags and N initial semantic features, a structured association matrix is set up to generate dynamic tags, which are then bound and stored with the archive text information and the corresponding archive metadata. The structured association matrix is set based on the M initial labels and N initial semantic features, including: using a sliding window to count the number of co-occurrences in the archive text information and the total number of windows to obtain the co-occurrence probability; The row dimension of the structured association matrix corresponds to the M initial labels, the column dimension of the structured association matrix corresponds to the N initial semantic features, and the matrix elements of the structured association matrix are co-occurrence probabilities. Among them, the matching degree of each candidate tag in the candidate tag set is iterated based on the security level and validity period attribute corresponding to the archive metadata, and M initial tags are selected, including: quantifying the security level as the weight value of the first constraint branch and quantifying the validity period attribute as the weight value of the second constraint branch. Using the weight values of the first constraint branch and the second constraint branch, a local matching degree analysis is performed on each candidate label in the candidate label set until the matching degree values converge. Simultaneously, multiple rounds of matching degree iterations are conducted to eliminate and select M initial tags.
2. The intelligent generation method for archive tags based on natural language processing as described in claim 1, characterized in that, Based on the archival text information and corresponding archival metadata, the core entities and entity semantic association networks are determined. The method includes: performing word segmentation and word vector conversion on the archival text information, evaluating word weights through an attention mechanism, and determining key semantic word sequences. Identify the core entities under the entity type, where the entity type includes person name, organization name, timestamp, and event content; Based on the aforementioned key semantic word sequence and core entities, the relationships between entities are analyzed according to three types of dependency relations: subject-predicate, verb-object, and modifier-head, and an entity semantic association network is constructed.
3. The intelligent generation method for archive tags based on natural language processing as described in claim 1, characterized in that, Based on a tag library in the field of archives management, cosine similarity analysis is performed with core entities to generate a candidate tag set. The method includes: configuring tag word vectors according to the tag library in the field of archives management; and configuring core entity word vectors according to the core entities. The tag word vectors and core entity word vectors are used to perform cosine similarity analysis, and then sorted in order of cosine similarity from high to low. At the same time, based on the semantic field overlap, candidate tags are eliminated to obtain a set of candidate tags with a preset number of tags.
4. The intelligent generation method for archive tags based on natural language processing as described in claim 3, characterized in that, Based on the document management domain tag library, configure tag word vectors. The method includes: using the document management domain tag library as external training data, and using transfer learning to make the tag word vectors simultaneously contain the semantics of the tag itself and the domain context association information. Normalize the trained label word vectors, calculate the cosine similarity between any two label word vectors, and construct a label semantic association graph; A bidirectional association edge is established in the semantic association graph of the tags, and the bidirectional association edge is used to perform semantic expansion recommendation on the candidate tag set.
5. The intelligent generation method for archive tags based on natural language processing as described in claim 4, characterized in that, The bidirectional association edge is used to perform semantic expansion recommendation on the candidate label set, and the method includes: activating the graph expansion mechanism when the number of labels in the candidate label set is less than the preset number of labels; Supplementary tags are generated based on the graph expansion mechanism, and semantic expansion recommendations are performed on the candidate tag set.
6. The intelligent generation method for archive tags based on natural language processing as described in claim 5, characterized in that, The method for generating supplementary labels based on the graph expansion mechanism includes: starting from the first candidate label, performing a breadth-first search along the bidirectional association edge, and prioritizing the access of adjacent labels, wherein the first candidate label is any candidate label in the candidate label set; Based on the first candidate label, a multi-level semantic radiation expansion is performed in the label semantic association graph to generate supplementary labels.
7. The intelligent generation method for archive tags based on natural language processing as described in claim 6, characterized in that, Based on the first candidate label, a multi-level semantic radiation extension is performed in the label semantic association graph. The method includes: in the label semantic association graph, performing semantic clustering on the labels on the search path, selecting semantically complementary labels with the first candidate label for each cluster, and determining the first layer extension label, the second layer extension label, up to the Qth layer extension label, where Q is greater than or equal to 3. Based on the first candidate label and the first-layer extended label, the second-layer extended label, and up to the Q-layer extended label, a multi-level semantic radiation extension is performed in the label semantic association graph.
8. A file tag intelligent generation system based on natural language processing, characterized in that, The system is used to implement the intelligent generation method for archive tags based on natural language processing according to any one of claims 1-7, wherein the system includes: a semantic association analysis module: determining core entities and entity semantic association networks based on archive text information and corresponding archive metadata; The first matching degree iteration module: Based on the tag library of the archive management domain, it performs cosine similarity analysis with the core entities to generate a candidate tag set. Based on the security level and validity period attributes corresponding to the archive metadata, it performs matching degree iteration on each candidate tag in the candidate tag set to select M initial tags. The second matching degree iteration module: Based on the conditional random field, it performs dependency parsing on the entity semantic association network to generate a candidate semantic feature set. Based on the subject domain and institutional geographic attributes corresponding to the implicit elements, it performs matching degree iteration on each candidate semantic feature in the candidate semantic feature set to select N initial semantic features. Tag generation module: Based on the M initial tags and N initial semantic features, a structured association matrix is set to generate dynamic tags, which are then bound and stored with the archive text information and corresponding archive metadata.
Citation Information
Patent Citations
Semantic-based data lake query system and method
CN114218400A
An unsupervised approach to assignment of pre-defined labels to text documents
US20220019741A1