Historical material text automatic classification method based on natural language processing

By constructing text feature maps and an adaptive adjustment mechanism, the problems of low efficiency and insufficient accuracy in historical text classification are solved, achieving efficient and accurate automatic classification of historical texts, adapting to different research scenarios and user needs.

CN120973942BActive Publication Date: 2025-12-26LINYI UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511500107.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-21
Publication Date
2025-12-26
Estimated Expiration
2045-10-21

AI Technical Summary

Technical Problem

Existing technologies for classifying historical texts suffer from low efficiency, insufficient accuracy, inability to deeply explore semantic relationships between entities, and inability to dynamically adjust and incorporate user expertise.

Method used

A text feature map is constructed, containing multiple text entity nodes and semantic relationships between entities. Core semantic clusters and discrete semantic fragments are identified through text analysis algorithms, an adaptive classification strategy set is generated, and adjustments are made based on user correction instructions.

Benefits of technology

It achieves efficient and accurate classification of historical texts, can dynamically optimize classification strategies, adapt to different research scenarios and user needs, improve the scientificity and applicability of classification, and support continuous optimization of classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973942B_ABST
    Figure CN120973942B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of natural language processing, and discloses a history material text automatic classification method based on natural language processing. The method comprises the following steps: collecting original history material text data and preprocessing; constructing a text feature graph containing multiple text entity nodes, semantic correlation relationships between entities and feature information of each node; identifying core semantic clusters, discrete semantic fragments and positioning key entity nodes in the graph through a text analysis algorithm; generating a preliminary classification strategy set containing a semantic remapping scheme, a classification structure adjustment scheme and a weight adjustment scheme according to the core semantic clusters and the key entity nodes; receiving a user correction instruction, determining a classification correction type and adaptively adjusting the preliminary classification strategy set; and executing the adjusted strategy set, and updating the text feature graph according to the classification result. The method improves the classification accuracy and flexibility of history materials, and helps efficient arrangement and utilization of history material resources.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of natural language processing, and particularly to a history text automatic classification method based on natural language processing. BACKGROUND

[0002] In the fields of historical research and cultural heritage protection, history text is an important carrier of historical information, covering various types such as classic literature, historical archives, and age records. With the development of digital technology, a large amount of history text has been converted into electronic form, forming a large-scale history database. However, history text has characteristics such as complex content, complex semantic association, and various entity types, and traditional manual classification methods face many challenges.

[0003] Manual classification requires professional personnel to read each history text, and to determine the text category based on historical background knowledge. This not only consumes a large amount of manpower and time cost, but also is easily affected by subjective factors, resulting in insufficient consistency of the classification results. At the same time, when the number of history texts reaches hundreds of thousands or even millions, the efficiency of manual classification is greatly reduced, making it difficult to meet the needs of large-scale history sorting and utilization.

[0004] Some text classification methods attempt to use keyword matching or simple statistical models for automation, but such methods can only classify based on surface text features and cannot deeply mine the semantic association relationships between entities in history text. For example, some methods extract high-frequency words in the text as classification basis, but ignore the semantic differences of words in a specific historical context and the logical dependency relationships between different entities, resulting in low accuracy of classification results and making it difficult to apply to the history text scenario with special semantic background.

[0005] Existing classification methods lack a dynamic adjustment mechanism and cannot optimize the classification strategy according to the user's professional judgment. In history research, researchers may find that the classification results deviate from historical facts and need to modify the classification logic, but existing methods are difficult to quickly respond to such needs and cannot integrate user's professional knowledge into the classification process, resulting in classification results that are difficult to meet the precision requirements of academic research. At the same time, existing methods cannot update the original text feature data after classification, so that subsequent classification still needs to rely on the initial data, which cannot improve the classification quality continuously, further limiting its application in large-scale and long-term history sorting work. SUMMARY

[0006] The present application aims to provide a history text automatic classification method based on natural language processing to solve the problems raised in the background.

[0007] To achieve the above purpose, the present application provides a history text automatic classification method based on natural language processing, which comprises:

[0008] collecting original historical material text data, and preprocessing the original historical material text data;

[0009] constructing a text feature graph, the text feature graph comprising a plurality of text entity nodes, semantic association relationships between entities, and feature information of each text entity node;

[0010] identifying core semantic clusters, discrete semantic segments, and key entity nodes in the text feature graph through a text analysis algorithm;

[0011] generating a preliminary classification strategy set according to the core semantic clusters and key entity nodes, the preliminary classification strategy set comprising a semantic remapping scheme, a classification structure adjustment scheme, and a weight adjustment scheme;

[0012] receiving a user correction instruction, determining a classification correction type according to the user correction instruction, and adaptively adjusting the preliminary classification strategy set based on the classification correction type;

[0013] executing the adaptively adjusted preliminary classification strategy set, and updating the text feature graph according to the classification result.

[0014] Preferably, the implementation process of constructing the text feature graph comprises:

[0015] collecting text samples from a multi-source historical material library, the text samples including classical literature, historical archives, and chronological records;

[0016] performing multi-level feature extraction on the text samples to generate feature information of text entity nodes, the feature information including entity type, semantic density, chronological reliability, context coherence, historical association strength, and dynamic importance;

[0017] The chronological reliability is dynamically calculated according to literature source authority, cross-validation degree, and chronological consistency;

[0018] The dynamic importance is obtained by multi-dimensional index fusion calculation, which includes:

[0019] multiplying the historical association strength by a preset reference association strength after normalization comparison and an importance coefficient;

[0020] combining the semantic density with an average semantic density ratio and an adjustment coefficient;

[0021] multiplying the context coherence value by a weight factor with a ratio of global coherence reference;

[0022] Weighted fusion of the calculation results of the above three dimensions obtains the dynamic importance.

[0023] Preferably, the topological relationship of the text feature map includes:

[0024] The text entity nodes are connected by undirected edges, and the undirected edges represent semantic association strength and logical dependency relationship;

[0025] Each text entity node binds the feature information to form a complete node description including entity type label, semantic density value, age credibility, context coherence, historical association strength and dynamic importance parameter;

[0026] The calculation process of the semantic association strength includes:

[0027] The co-occurrence frequency and the number of logical dependencies between nodes are counted;

[0028] The maximum value of the co-occurrence frequency is normalized to obtain a standard co-occurrence ratio;

[0029] The number of logical dependencies is threshold truncated and scaled to obtain a standard dependency strength;

[0030] The weighted semantic association strength is calculated in combination with the semantic density of the text entity node.

[0031] Preferably, the identification of the core semantic cluster and the discrete semantic fragment by the text analysis algorithm includes:

[0032] A community detection algorithm is used to traverse the text feature map to extract all semantic subgraphs with high internal association;

[0033] The aggregation degree of each semantic subgraph is calculated;

[0034] The aggregation degree is compared with a preset aggregation threshold interval to distinguish the core semantic cluster and the discrete semantic fragment;

[0035] Difference analysis is performed on the identified core semantic cluster and the discrete semantic fragment to locate the key entity node, including:

[0036] The node with the highest semantic association strength in the core semantic cluster is extracted and marked as a core node;

[0037] The node with the lowest dynamic importance in the discrete semantic fragment is screened, and if multiple nodes have the same lowest dynamic importance, their historical association strengths are compared, and the node with the weakest historical association strength is determined as the key entity node.

[0038] Preferably, the aggregation degree calculation of the semantic subgraph includes:

[0039] The dynamic importance of all nodes in the subgraph is extracted, and the arithmetic mean value is calculated;

[0040] The semantic association strength of all undirected edges in the subgraph is extracted, and the geometric mean value is calculated;

[0041] counting the number of entity nodes in the statistical subgraph;

[0042] inputting the arithmetic mean, geometric mean and number of entity nodes into an aggregation function to output an aggregation value, which is used to evaluate the internal consistency and classification stability of the semantic subgraph.

[0043] Preferably, the generation of the preliminary classification strategy set comprises:

[0044] generating a semantic remapping scheme for discrete semantic fragments, comprising:

[0045] extracting the key entity nodes and their adjacent nodes;

[0046] screening adjacent nodes with a semantic density higher than a set threshold and a dynamic importance satisfying a redundancy condition;

[0047] calculating the semantic missing amount of the key entity nodes, i.e. the difference between the expected semantic influence and the actual semantic influence;

[0048] allocating semantic mapping relationships according to the semantic redundancy ability and semantic correlation strength of adjacent nodes, and generating semantic redistribution instructions;

[0049] generating a classification structure adjustment scheme for core semantic clusters, comprising:

[0050] extracting core nodes and their associated paths;

[0051] if the number of logical dependency relationships in the associated path exceeds the tolerance or the age credibility is lower than the credibility threshold, performing a structure optimization operation:

[0052] finding an alternative path with a semantic correlation strength not lower than the original path and a more concise logical dependency;

[0053] if there is no alternative path, the original structure is retained, but a structure exception prompt is triggered and an auxiliary classification suggestion is generated;

[0054] generating an optimized classification structure instruction.

[0055] Preferably, the preliminary classification strategy set further comprises a weight adjustment scheme:

[0056] real-time monitoring of the age information and semantic labels of newly input texts;

[0057] recomputing the dynamic importance of the conflict nodes based on the age credibility calculation rule and the dynamic importance generation rule;

[0058] if multiple text entity nodes appear semantic overlap in the classification process, the following rules are used for processing:

[0059] Prioritize nodes with higher credibility of age;

[0060] If the credibility of age is the same, prioritize according to the strength of historical association;

[0061] If the credibility of age and the strength of historical association are the same, sort from high to low according to the coherence of context;

[0062] Adjust the order of the classification queue, prioritize the nodes with the highest dynamic importance, and assign independent semantic containers;

[0063] Generate delayed processing suggestions for nodes with lower dynamic importance, including temporary caching and asynchronous classification arrangement.

[0064] Preferably, the user correction instruction includes node feature correction, semantic relationship adjustment, and importance redefinition.

[0065] Preferably, the adaptive adjustment includes:

[0066] If the user correction instruction requires node feature correction, recalculate the dynamic importance of the affected nodes and adjust the semantic remapping scheme;

[0067] If the user correction instruction involves semantic relationship adjustment, update the semantic association strength and reevaluate the core semantic cluster to generate a new classification structure adjustment scheme;

[0068] If the user correction instruction is importance redefinition, use the importance value input by the user to override the original dynamic importance and update the weight adjustment scheme synchronously.

[0069] Preferably, updating the text feature map according to the classification results includes:

[0070] The output data after executing the classification strategy includes the degree of completion of semantic remapping, the consistency of classification structure, and the compliance of node weight;

[0071] Update the feature information of the text entity nodes according to the output data, including recalculating the historical association strength, the coherence of context, and the dynamic importance;

[0072] Adjust the topological relationship and semantic association strength of the text feature map using the updated feature information.

[0073] Compared with the prior art, the present application has the following advantages:

[0074] The text feature graph containing multiple text entity nodes, semantic association relationships between entities, and feature information of each node breaks through the limitation of traditional classification methods relying only on surface text features. The graph can comprehensively present the attributes of entities and the semantic relationships between entities in historical text, convert scattered text information into structured graph data, make the internal semantic logic of historical text more clear and visible, provide rich and comprehensive information support for subsequent accurate identification of core semantic clusters and key entity nodes, and make the classification work no longer limited to isolated analysis of a single text, but based on overall semantic association.

[0075] The identification of core semantic clusters, discrete semantic fragments, and positioning of key entity nodes in the text feature graph through text analysis algorithms can accurately filter out core information and key nodes that are important for classification from complex semantic networks. The identification of core semantic clusters can focus on the core theme content in historical text, the distinction of discrete semantic fragments can find relatively independent parts of the text, and the positioning of key entity nodes can clarify the core analysis object in the classification process. The combination of the three makes the classification work revolve around the core information, avoids irrelevant information interference, and improves the pertinence and accuracy of classification.

[0076] According to the core semantic clusters and key entity nodes, a preliminary classification strategy set containing semantic remapping schemes, classification structure adjustment schemes, and weight adjustment schemes is generated, providing multi-dimensional and comprehensive strategy support for historical text classification. The semantic remapping scheme can reasonably allocate semantics for discrete semantic fragments, solving the classification confusion problem caused by semantic dispersion; the classification structure adjustment scheme can optimize the classification structure of core semantic clusters, ensuring that the classification logic conforms to the semantic logic of historical text; the weight adjustment scheme can reasonably allocate weights according to the importance differences of entity nodes, highlighting the role of key information in classification. The three work together to greatly improve the scientificity and applicability of classification strategies.

[0077] The user correction instruction is received and the classification modification type is determined according to the instruction, and the preliminary classification strategy set is adaptively adjusted, integrating the user's professional knowledge and experience into the classification process. In historical research, users may find deviations in classification strategies based on their professional background. Through this adjustment mechanism, user needs can be quickly responded to, and unreasonable parts of the classification strategy can be corrected, making the classification results more in line with actual research needs. At the same time, the classification method also has the ability to flexibly adapt to different research scenarios and user needs, breaking the limitations of traditional methods that cannot be flexibly adjusted.

[0078] The preliminary classification strategy set after adaptive adjustment is executed, and the text feature atlas is updated according to the classification result, forming a closed-loop mechanism for classification work. The classification result is not only the output of the current classification task, but also can benefit the optimization of the text feature atlas. The updated atlas contains more accurate entity feature information and semantic association relationships, providing higher quality basic data for subsequent historical text classification work. Each classification work can be based on more perfect information, promoting the continuous optimization of classification quality, and better meeting the needs of large-scale historical text classification, academic research and other scenarios for classification accuracy, efficiency and sustainability, and assisting in the deep mining and effective utilization of historical text resources. BRIEF DESCRIPTION OF DRAWINGS

[0079] Figure 1 A working principle diagram of the historical text automatic classification method based on natural language processing is described.

[0080] Figure 2 A flowchart of the implementation process of constructing a text feature atlas is described.

[0081] Figure 3 A flowchart for identifying core semantic clusters and discrete semantic fragments and positioning key entity nodes through a text analysis algorithm is described. DETAILED DESCRIPTION

[0082] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of the present application.

[0083] Please refer to Figure 1The application provides a history text automatic classification method based on natural language processing, which integrates natural language processing technology and graph analysis methods to achieve efficient and automatic classification of history text. The method includes collecting original history text data and preprocessing the data. The preprocessing operation includes text cleaning, format standardization and coding unification to eliminate noise and improve data quality. A text feature graph is constructed, which consists of text entity nodes, semantic association relationships between nodes, and feature information of each node. The feature information covers multi-dimensional attributes such as entity type, semantic density, and age reliability. Through text analysis algorithm, the core semantic cluster and discrete semantic fragment in the text feature graph are identified, and the key entity node is located. The core semantic cluster represents a high-cohesion semantic unit, and the discrete semantic fragment indicates a sparse semantic area. Based on the recognition result, a preliminary classification strategy set is generated, which includes semantic remapping scheme, classification structure adjustment scheme and weight adjustment scheme. These schemes are optimized for graph topology and node characteristics. Receive user correction instructions, determine the classification correction direction according to the instruction type, and adaptively adjust the preliminary classification strategy set. The adjustment process dynamically updates the strategy parameters. Execute the adjusted classification strategy, and update the text feature graph according to the classification output result to form a closed-loop optimization mechanism, ensuring the classification accuracy and adaptability.

[0084] Example 1: see Figure 2, the construction of the text feature map begins with systematic text sample collection from multiple source historical data libraries, which covers various types of classics, historical archives, and chronological records, etc. The data is imported into the processing system through standardized application program interfaces. During the collection process, the data sources are strictly identified and metadata recorded. Classics are mainly digitized from rare ancient books, historical archives are from the decrypted archives library, and chronological records are integrated from various chronicles and logs. All samples have undergone format verification and coding uniformity processing to eliminate system compatibility problems. After data import, it enters the pretreatment pipeline and performs text cleaning operations including removing modern punctuation, standardizing variant characters, correcting character errors caused by long time, and segmenting the text for subsequent feature extraction. The pre-processed text samples are extracted for multi-level feature extraction to generate feature information for each text entity node. The feature information includes entity type, semantic density, age reliability, context coherence, historical association strength, and dynamic importance, etc. The recognition of entity type uses a deep learning-based named entity recognition model trained on a large amount of historical corpus, which can accurately identify and label entity types such as names, places, official positions, institutions, and events in the text. The calculation of semantic density considers the frequency distribution and context complexity, and quantifies the semantic richness of the entity by analyzing its frequency and interaction with surrounding words in a specific context. Entities with high frequency and complex syntactic structure will be assigned a higher semantic density value.

[0085] The calculation of age reliability is a dynamic process that depends on three core factors: literature source authority, cross-validation degree, and age consistency. Literature source authority is evaluated based on the level of the source, with official histories and official classics receiving higher weights, and unofficial histories and notes receiving lower weights. Cross-validation degree is calculated by comparing the similarity of the same event recorded in different historical sources. Multiple independent sources that confirm each other will increase the reliability score. The age consistency check focuses on the logical consistency of the internal time information in the text, evaluating whether the time clues mentioned in different paragraphs are contradictory. Through a time logic verification algorithm, obvious time conflicts are identified and corrected, and finally a comprehensive age reliability value is output by integrating the three factors.

[0086] The quantification of historical association strength relies on the analysis of co-occurrence frequency and logical dependency between text entities in historical narratives. Co-occurrence frequency statistics scan the number of times entities co-occur in the text through a sliding window technique, and logical dependency uses a pre-defined library of historical event logical rules to match and identify whether there is a cause-and-effect, chronological, or subordinate dependency between entities. The calculation of dynamic importance integrates multiple dimensions. First, the historical association strength of a node is normalized by comparing it with a pre-set benchmark association strength, and the comparison result is multiplied by a configurable importance coefficient to obtain a basic score. Then, the ratio of the node's semantic density to the global average semantic density is calculated, and this ratio is combined with a dynamically adjusted coefficient to generate a semantic contribution value. Next, context coherence is processed, and the ratio of the node's coherence value to the global coherence benchmark is multiplied by a specific weight factor to produce a coherence adjustment value. Finally, the basic score, semantic contribution value, and coherence adjustment value are weighted and integrated, and the weight parameters can be adjusted according to different types of historical materials (such as legal codes, biographies, and diaries) to output a dynamic value that comprehensively reflects the importance of the node in the current graph. The topology of the text feature graph is represented by text entity nodes connected by undirected edges, which carry the semantic association strength information and logical dependency between nodes. Each text entity node in the graph is bound to its complete feature information set, forming a structured description body containing entity type labels, semantic density values, age reliability, context coherence, historical association strength, and dynamic importance parameters. This description body is stored in the node attributes of the graph database in a specific data format.

[0087] The calculation of semantic association strength is a multi-step quantification process, which is based on the co-occurrence frequency and logical dependency times between nodes. The co-occurrence frequency is counted by traversing the text corpus and counting the number of times two entity nodes appear simultaneously within a set context window. The logical dependency times are more complex, which need to use a rule base containing historical event logical templates to detect whether there is a cause-effect, condition or time sequence dependency relationship between nodes. Then the original co-occurrence frequency is normalized by the maximum value to convert it into a standard co-occurrence ratio between zero and one. The logical dependency times are first truncated by a threshold to eliminate meaningless dependencies, and then mapped to a standard range by a nonlinear scaling function to obtain a standard dependency strength. The semantic density of each node is combined to calculate the weighted semantic association strength value, which is assigned to the undirected edge connecting the two nodes. The final stage of the graph construction is to persist all nodes, edges and attributes to the graph database system, which needs to support efficient adjacency query, path search and attribute filtering. Composite indexes are established for nodes and edges to speed up the retrieval operation based on feature attributes (such as entity type, time range), and the storage structure design of the graph needs to fully consider the execution efficiency of subsequent graph analysis algorithms (such as community detection, path discovery).

[0088] Example 2: see Figure 3, The identification process of core semantic clusters and discrete semantic segments starts with a systematic traversal of the constructed text feature graph, which is driven by an optimized community detection algorithm. This algorithm is based on the principle of modular optimization, which divides the graph nodes into communities. The goal of modular optimization is to divide the graph into communities with tight internal connections and sparse external connections, i.e., semantic subgraphs. The algorithm iteratively calculates node affiliation and adjusts the community structure to maximize the overall modularity value, ultimately obtaining a series of semantic subgraphs with high internal correlation. Each identified semantic subgraph represents a potential topic aggregation area or event narrative segment in historical texts. Calculating the aggregation degree of each semantic subgraph is a core step to evaluate its internal structure quality. The aggregation degree value reflects the cohesion of nodes and the stability of the structure within the subgraph. The calculation process of aggregation degree does not rely on a single indicator but uses a multi-factor fusion method. First, the dynamic importance values of all nodes in the subgraph at the current time are extracted, and the arithmetic mean of these values is calculated to obtain the overall level of node importance. Then, the semantic association strength values carried by all undirected edges in the subgraph are extracted, and the geometric mean of these strength values is calculated to represent the average tightness of the connection relationship. At the same time, the total number of entity nodes contained in the subgraph is counted, which is the basic information to measure the size of the subgraph. Finally, the arithmetic mean of dynamic importance, the geometric mean of semantic association strength, and the number of entity nodes are input into a preset aggregation function model. This function model outputs a scalar result, which is the aggregation degree value of the semantic subgraph. The higher the value, the more likely the subgraph is to be identified as a core semantic cluster or a discrete semantic segment.

[0089] The key operation to realize classification is to compare the calculated aggregation degree value of each semantic subgraph with a preset aggregation threshold interval. The aggregation threshold interval is not fixed, but is trained by analyzing a large number of annotated historical historical atlas data, and has certain adaptive ability. When the aggregation degree value of a subgraph falls into the high value range of the threshold interval, the subgraph is judged as a core semantic cluster, which means that the internal node theme is concentrated and the semantic correlation is close, and has higher classification reliability. When the aggregation degree value of the subgraph is lower than the lower limit of the threshold interval, it is marked as a discrete semantic segment, indicating that the node correlation in this area is loose and the semantic focus is scattered, which may be a fuzzy area or an intersection narrative area of historical records. After the comparison process is completed, the atlas is clearly divided into several core areas and discrete areas. Perform in-depth difference analysis on the identified core semantic clusters and discrete semantic segments, the purpose of which is to locate those key entities that have a key impact on the classification results. The difference analysis is realized by systematically comparing the attribute characteristics and topological roles of the nodes in different subgraphs. For each subgraph identified as a core semantic cluster, the analysis process scans the semantic correlation strength between all nodes in it, and selects the node with the highest semantic correlation strength from it. This node is usually the hub or focus of the semantic cluster, and is marked as a core node. The core node will serve as a structural anchor in the subsequent classification strategy and play an important role in stabilizing the classification framework.

[0090] For sub-graphs identified as discrete semantic segments, the strategy of locating key nodes is different, and the focus of analysis shifts to the dynamic importance property of nodes. The system will filter out the node with the lowest dynamic importance value within the discrete segment, and a low dynamic importance usually means that the node has a relatively weak information contribution or structural role in the current context. There is a case where multiple nodes in the segment have exactly the same lowest dynamic importance value, in which case a second criterion needs to be introduced, that is, to compare the historical association strength properties of these nodes. The historical association strength value is directly obtained from the feature information of the node, which reflects the cross-reference frequency and logical dependence degree of the node in the historical narrative, and the system will select the node with the weakest historical association strength value among them, and finally determine it as the key entity node in the discrete segment. The positioning of the key entity node marks the weak link of semantics or the potential classification ambiguity point in the graph, and provides a clear target for generating a targeted semantic remapping scheme in the subsequent. The data results produced by the whole recognition and positioning process, including the boundary range, aggregation value, type label (core / discrete) of each semantic sub-graph, and the information of the located core nodes and key nodes, are stored in the form of graph annotation. These annotation information not only contains the basic classification label, but also records the intermediate parameters and confidence level in the calculation process, which are added to the attributes of the original nodes and edges in the graph database. This storage method supports subsequent visual interactive display, allowing users to intuitively observe the semantic structure distribution of the graph, and provides a direct and structured input for the classification strategy generation module.

[0091] Embodiment 3: The generation process of the preliminary classification strategy set is based on the identified core semantic clusters and discrete semantic fragments as well as the located key entity nodes. This systematic process aims to output an executable classification instruction set, which includes three major components: semantic remapping schemes, classification structure adjustment schemes, and weight adjustment schemes. The generation of semantic remapping schemes for discrete semantic fragments first requires the extraction of previously located key entity nodes. Key nodes are the nodes in discrete fragments with the lowest dynamic importance and the weakest historical correlation. Through a graph query interface, a list of all directly adjacent nodes to the key node is obtained. Adjacent nodes refer to other text entity nodes directly connected to the key node through undirected edges. Subsequently, adjacent nodes are screened, with the screening condition set as the semantic density value of the node must be higher than a dynamically adjusted threshold, which is determined based on the semantic density distribution percentile of the entire graph. At the same time, the dynamic importance value of the node must meet the redundancy condition, which means the dynamic importance of the node should be higher than the average level of nodes within the fragment, indicating that the node has a semantic surplus that can be contributed. Calculating the semantic missing amount of the key entity node is the core step of the scheme generation. Semantic missing amount is defined as the difference between the expected semantic influence and the actual semantic influence of the node in the current graph. The expected semantic influence is estimated by a prediction model based on historical behavior data of the node, which considers node type, common context role, and historical influence decay pattern. The actual semantic influence is quantified by measuring the sum of semantic correlation strengths between the node and its neighbor nodes. The formula for calculating the semantic missing amount is:

[0092]

[0093] wherein the character represents the semantic missing amount, which is a scalar value with the same unit as the influence measure; the character represents the expected semantic influence, which is output by the prediction model; and the character represents the actual semantic influence, which is obtained by calculating the sum of node correlation strengths in real time. Based on the semantic redundancy capability of the screened adjacent nodes and the semantic correlation strength between them and the key node, semantic mapping relationships are assigned to the key node. The semantic redundancy capability is determined by evaluating the ratio of the node's semantic density to its current load, and the correlation strength is directly read from the graph edge attributes. The assignment process is prioritized, with the priority descending in the order of the semantic correlation strength of the adjacent nodes. Nodes with higher correlation strength are given priority in assignment. The specific instructions generated include temporarily or permanently delegating part of the semantic context or logical dependency of the key node to selected adjacent nodes, and recording the remapping proportion and validity period to form a complete semantic redistribution instruction set.

[0094] The classification structure adjustment scheme for the core semantic cluster starts with extracting the labeled core node and all its associated paths. The core node is the node with the highest semantic association strength within the semantic cluster, and the associated path refers to all connected paths from the core node to other nodes within the cluster. These path information is collected through graph traversal algorithms such as breadth-first search. For each associated path, the number of logical dependency relationships contained in the path is checked to see if it exceeds the system's tolerance value, which is dynamically adjusted according to the path length and the complexity of the cluster. At the same time, the age reliability of the nodes involved in the path is verified to see if it is lower than the pre-set reliability threshold, which is based on the classification of historical materials. If the number of logical dependencies in the path exceeds the limit or the age reliability is insufficient, the structure optimization operation is triggered. The core of the optimization operation is to find a replacement path that meets the semantic association strength and contains fewer logical dependency relationships. The path recalculation algorithm searches for a replacement path that meets the conditions within the cluster. If there is no replacement path that meets the conditions in the current graph topology, the system will retain the original path structure, but will generate a structure exception prompt signal. The signal contains the path ID, the reason for the exception, and the impact assessment, and synchronously generates an auxiliary classification suggestion. The auxiliary suggestion may include suggestions for manual review of the reasonableness of the path, a prompt for additional historical evidence, or a label indicating that the classification result in this area has low confidence. Finally, the results of the optimization operation are packaged into classification structure instructions, which detail the adjustment method of the path (such as deleting the original path, adding a new path, or keeping the original state but adding annotations). These instructions will guide the subsequent classification execution engine on how to reconstruct the internal connections of the core semantic cluster.

[0095] The weight adjustment scheme, as another important part of the preliminary classification strategy set, operates in real-time. The scheme continuously monitors the newly input text data through the data stream interface, and analyzes the temporal information and semantic labels contained in the new text in real time. For conflict nodes introduced by new text or with semantic overlap with existing text entity nodes, the system immediately recalculates the dynamic importance values of these nodes according to the temporal credibility calculation rules and dynamic importance generation rules. The temporal credibility calculation integrates the source information provided by the new text, and the dynamic importance calculation considers the newly established association. When multiple text entity nodes appear semantic overlap in the classification process, i.e., multiple nodes claim to represent the same or highly similar historical entities or concepts, the system processes according to a set of explicit rule sequence. The rule sequence provides priority to nodes with higher temporal credibility values, because higher temporal credibility usually means more reliable historical sources. If the conflicting nodes have the same temporal credibility value, the decision basis shifts to comparing the historical association strength of the nodes. The node with higher historical association strength is considered to be more central in the historical narrative network, and thus has priority to be retained. If both temporal credibility and historical association strength cannot distinguish the priority of the nodes, the final sorting is based on the descending order of the context coherence values of the nodes. The node with higher coherence value is processed first. Based on the processing results of the above rules, the system dynamically adjusts the queue order of the classification task, arranges the node with the highest dynamic importance after recalculating in the most priority position for classification operation, and allocates an independent semantic container for the node. The semantic container is an isolated environment in memory, which ensures that the classification process of the high importance node is not disturbed. For conflict nodes with lower dynamic importance values, the system generates a delay processing suggestion, which includes temporarily storing the node data in the cache database and scheduling an asynchronous classification task for it. The asynchronous classification is executed when the system resources are idle, thereby optimizing the overall processing efficiency and resource utilization.

[0096] The three schemes of the preliminary classification strategy set are finally integrated into a unified and executable strategy package. The strategy package is described in a structured data format (such as JSON or XML), which contains all necessary parameters, condition instructions and execution order. The semantic remapping scheme records in detail each key node and its mapping target, mapping dimension and expected effect; the classification structure adjustment scheme lists all the paths that need to be optimized, alternative scheme details and exception handling instructions; and the weight adjustment scheme specifies the node priority queue, container allocation strategy and delay processing plan.

[0097] Embodiment 4: User correction instruction receiving and processing integrates interactive interface and backend logic, the system provides a graphical user interface to allow users to submit correction instructions in the form of point selection, drag and drop or direct input of numerical values, while opening an application programming interface for batch instruction submission. The interface design focuses on graph visualization, users can directly view text entity nodes, connection edges and their current attribute values, and trigger the correction menu by right-clicking the node or edge. Menu options correspond to three types of instructions: node feature correction, semantic relationship adjustment and importance redefinition. After receiving the instruction, the system first parses the instruction type and specific parameters, verifies the reasonableness of the input value (such as the age credibility needs to be within the range of 0-1), and then sends the valid instruction to the adaptive adjustment logic unit. The entire interaction process records operation logs, including user identity, operation time, instruction content and value changes before and after adjustment, forming a complete audit tracking chain. The processing flow of node feature correction instruction starts with updating the feature information of the specific text entity node pointed by the instruction. For example, when reviewing the initial draft of the historical material classification about “Tang Dynasty Jiedushi”, the user finds that the age credibility of node “A (Anxi Jiedushi)” is initially calculated by the system as 0.75. According to his professional knowledge, the user believes that there is a dispute about a key supporting historical material, and manually corrects the age credibility to 0.65 through the interface. After receiving this instruction, the system immediately replaces the original age credibility attribute of node A with the new value 0.65. Since age credibility is one of the key input parameters for calculating dynamic importance, the dynamic importance value of node A needs to be recalculated. The recalculation process calls the multi-dimensional index fusion algorithm defined in Embodiment 1, which integrates the updated age credibility of node A, its historical association strength, semantic density and contextual coherence to generate a new dynamic importance value. The change of node A's dynamic importance, like a stone thrown into the water, will have a ripple effect, possibly affecting the aggregation degree assessment of its semantic subgraph. The system will then check whether node A is associated with any semantic remapping scheme that is being executed or planned to be executed. For example, if node A was originally set as the semantic receiver of a discrete segment due to its high age credibility, its credibility downgrade requires re-evaluation of the priority or rationality of the remapping scheme. The system will automatically trigger the adjustment process of related semantic remapping schemes, re-evaluate the necessity of mapping and possibly generate updated mapping instructions.

[0098] The semantic relationship adjustment instruction allows the user to directly modify the semantic association strength value carried on the undirected edge between nodes in the text feature graph. Consider an example, the system initially analyzes that the semantic association strength between node "B (Cao Yun)" and node "C (Da Yunhe)" is 0.8, but the user believes that the management association between the two is weaker than the system's judgment according to the interpretation of a specific local chronicle, and immediately manually reduces the association strength to 0.6. After the system accepts the instruction, it directly updates the attribute of the undirected edge connecting nodes B and C, and modifies the semantic association strength value to 0.6. This change in edge weight directly affects the structure characteristics of its connected nodes and the local graph it is in. The system will immediately start the re-evaluation process of the semantic sub-graph to which nodes B and C belong, check whether the original core semantic cluster division has changed due to the change of the edge weight, for example, the core semantic cluster formed due to strong connection may become loose or even decompose due to the weakening of the key connection. The result of the re-evaluation is to generate a new classification structure adjustment scheme, which will reflect the graph topology after the edge weight is updated, and may include suggestions to split the sub-graphs that were merged due to strong association, or to find new auxiliary paths for weakened connections to maintain structural stability.

[0099] The importance redefinition instruction gives the user the highest level of override, and the user can completely bypass the system's automatic calculation model and directly specify a dynamic importance value for a specific node. For example, when studying the immigration policy at the beginning of the Ming Dynasty, the user believes that the dynamic importance of node "D (Hongwu Tuntian Order)" calculated by the system is 0.7, which fails to fully reflect the core position of the policy in the history of a specific region, and therefore manually increases its importance value to 0.9 through the interface input box. When processing this instruction, the system directly covers the original dynamic importance value of the node with the user input value 0.9, and no longer executes the automatic calculation process. This direct covering operation has a global impact because dynamic importance is the core decision basis for weight adjustment schemes. The system will update the weight adjustment scheme synchronously, and all queues based on dynamic importance sorting in the scheme need to be immediately rearranged. After the importance of node D is significantly increased, its priority in the classification queue will be greatly advanced, and the system will prioritize allocating an independent semantic container for its processing. At the same time, the processing priority of other nodes that have semantic overlap with node D will be relatively lowered, and the system will generate new delayed processing suggestions for these nodes, such as temporarily storing their classification tasks in the background for asynchronous execution. Referring to Table 1, an example data record containing multiple user correction instructions is shown, reflecting the original data basis for the system to receive, analyze different types of instructions, and trigger corresponding adaptive adjustments.

[0100] Table 1: User Correction Instruction Data Record Table

[0101]

[0102] The design of the adaptive adjustment mechanism ensures that the system's response to user feedback is accurate and context-aware, and the subsequent processing chain triggered by each instruction type aims to maintain the internal logic consistency of the graph while quickly incorporating the user's domain knowledge. The adjustment process is not conducted in isolation, and there are dependency checks within the system. For example, when the dynamic importance of a node is increased through importance redefinition, the system checks whether this operation conflicts with the node's existing other features (such as lower chronological reliability). If significant conflicts are detected, the system will not prevent the operation, but will mark the conflict in the log and attach a prompt message for the user to refer to later when generating a new plan.

[0103] Embodiment 5: The process of updating the text feature graph according to the classification results starts with the comprehensive collection and analysis of the output data generated after the execution of the classification strategy. These output data are the basis for evaluating the classification effect and driving the evolution of the graph. The output data mainly include three dimensions of quantitative indicators: semantic remapping completion degree, classification structure consistency, and node weight compliance. Semantic remapping completion degree measures the actual achievement of the semantic redistribution instructions formulated for discrete semantic fragments after their execution. For example, the system plans to remap 70% of the semantic influence of the node "Besi Poetry" to the nodes "Besi Life" and "Military Policy". After execution, the actual mapping ratio is calculated between the node "Besi Poetry" and the target nodes, and compared with the expected ratio to obtain the completion percentage. Classification structure consistency evaluates whether the newly generated graph topology after implementing the classification structure adjustment scheme for the core semantic cluster meets the expected logical constraints. For example, it checks whether there are any circular dependencies after adjustment, whether the chronological order of the key path is reasonable, and whether the correlation strength distribution between nodes is more balanced. Node weight compliance focuses on whether the dynamic importance values of each node after classification match their actual status in the classified structure. For example, a node classified as a core event should have higher dynamic importance than its surrounding event background nodes. If there is a reverse situation, the compliance is low.

[0104] The system initiates an update operation on the text entity node feature information, and the update process is iterative and targeted, rather than full refresh of all nodes. For example, in a classification of Tang Dynasty cultural history, the semantic remapping scheme involves mapping part of the cultural influence of the node “Kaiyuan Prosperity” to the nodes “Li Bai Poetry” and “Wu Daozi Paintings”. After the mapping is completed, the system will recalculate the historical association strength of the node “Kaiyuan Prosperity”, as it has exported semantic influence, its association strength may be relatively weakened; at the same time, it reevaluates its contextual coherence, checks its narrative fluency in the new semantic association network; most importantly, according to the new data after mapping, it calls the dynamic importance generation rule to recalculate the dynamic importance value of the node. As semantic receivers, the nodes “Li Bai Poetry” and “Wu Daozi Paintings” also need to recalculate their historical association strength and contextual coherence, as they have been injected with new semantic connotations.

[0105] Using the updated node feature information, the system proceeds to adjust the topological relationship and semantic association strength of the text feature map. The adjustment of the topological relationship may manifest as the addition, deletion or merger of nodes. For example, during the classification process, a batch of scattered records about “Fangzhen System” are found, and through semantic remapping and structure adjustment, these records are integrated and condensed into a new, more representative node “Mid-late Tang Fangzhen Characteristics”. This new node needs to be added to the map and connected with existing nodes such as central government and economic system. Some nodes that are confirmed to be repeated records or have high semantic overlap, such as the nodes “Hebei Three Garrisons” and “Hebei Old Affairs” from different historical books, may be merged into a node “Hebei Garrisons” during the update phase to avoid redundancy. The adjustment of semantic association strength is more delicate, as it recalculates the weight of the edges between nodes based on the updated node features. The semantic association strength of the edge connecting the nodes “Imperial Examination System” and “Decline of Gentry” may have been mainly calculated based on lexical co-occurrence before classification. After classification, the system takes into account the updated temporal credibility of the nodes (ensuring timeline consistency), recalculated historical association strength (evaluating causal logic), and contextual coherence (checking narrative logic), thereby generating a more accurate and more reflective of historical true association strength value.

[0106] The whole updating mechanism builds a closed-loop feedback system from the classification execution to the graph optimization. The operation of the system can be embodied through a specific scenario. Assume that the records about "Song Dynasty economy" in the initial graph are scattered in multiple weakly connected nodes, such as "Jiaozi", "Cao Yun", and "Shibo Si". After core semantic cluster identification, the system finds that these nodes should form a highly cohesive cluster, but the connection is weak in the initial graph. The classification structure adjustment scheme generates instructions to strengthen the connection between these nodes. After the classification execution, the output data shows that the consistency of the classification structure is significantly improved. In the updating stage, the system first recalculates the feature information of the nodes such as "Jiaozi", "Cao Yun", and "Shibo Si", for example, the historical association strength of the "Cao Yun" node is improved due to the strengthening of the sea-river transportation relationship with "Shibo Si". Subsequently, the system uses the new features to recalculate the semantic association strength between these nodes, and the new strength value more accurately reflects their internal relationship in the Song Dynasty economic system. The updated text feature graph not only contains more reasonable node relationships, but also has more representative node feature values. This optimized graph is immediately stored as the starting point for the next round of automatic classification process of historical text.

[0107] Although embodiments of the present application have been shown and described, it is to be understood that various modifications, substitutions, replacements and variations can be made to these embodiments without departing from the principles and spirit of the present application, and the scope of the present application is defined by the appended claims and their equivalents.

Claims

1. A method for automatically classifying historical texts based on natural language processing, characterized in that, The method comprises the following steps: Collecting original historical data and preprocessing the original historical data; Building a text feature graph, which contains multiple text entity nodes, semantic association relationships between entities, and feature information of each text entity node; Identifying core semantic clusters, discrete semantic fragments and locating key entity nodes in the text feature graph through a text analysis algorithm; Generating a preliminary classification strategy set according to the core semantic clusters and key entity nodes, which includes semantic remapping schemes, classification structure adjustment schemes and weight adjustment schemes; Receiving user correction instructions, determining the classification correction type according to the user correction instructions, and adaptively adjusting the preliminary classification strategy set based on the classification correction type; Executing the adaptively adjusted preliminary classification strategy set, and updating the text feature graph according to the classification result. 2.The method of claim 1, wherein, The implementation process of building the text feature graph comprises: Collecting text samples from a multi-source historical data library, including classical literature, historical archives and chronological records; Performing multi-level feature extraction on the text samples to generate feature information of text entity nodes, including entity type, semantic density, chronological reliability, context coherence, historical association strength and dynamic importance; The chronological reliability is dynamically calculated according to the literature source authority, cross-validation degree and chronological consistency; The dynamic importance is obtained by multi-dimensional index fusion calculation, including: Normalizing the comparison between the historical association strength and the preset reference association strength, and multiplying the importance coefficient; Combining the ratio of semantic density to average semantic density with the adjustment coefficient; Multiplying the ratio of context coherence value to global coherence benchmark by the weight factor; Weighted fusion of the calculation results of the above three dimensions to obtain the dynamic importance. 3.The method of claim 2, wherein, In the topological relationship of the text feature graph: Text entity nodes are connected by undirected edges, which represent semantic association strength and logical dependency relationship; Each text entity node is bound with the feature information, forming a complete node description containing entity type label, semantic density value, chronological reliability, context coherence, historical association strength and dynamic importance parameter; The calculation process of the semantic association strength comprises: Statistical node co-occurrence frequency and logical dependency times; Normalizing the maximum value of co-occurrence frequency to obtain the standard co-occurrence ratio; Threshold truncation and scaling processing are performed on the logical dependency times to obtain the standard dependency strength; Combining the semantic density of the text entity node, the weighted semantic association strength is calculated. 4.The method of claim 3, wherein, Identifying core semantic clusters and discrete semantic fragments through a text analysis algorithm comprises: Using a community detection algorithm to traverse the text feature graph and extract all semantic subgraphs with high internal association; Calculating the aggregation degree of each semantic subgraph; Comparing the aggregation degree with the preset aggregation threshold interval to distinguish core semantic clusters and discrete semantic fragments; Performing difference analysis on the identified core semantic clusters and discrete semantic fragments to locate key entity nodes, including: Extracting the node with the highest semantic association strength in the core semantic cluster and marking it as the core node; Screening the node with the lowest dynamic importance in the discrete semantic segment, if multiple nodes have the same lowest dynamic importance, comparing their historical association strength, and determining the node with the weakest historical association strength as the key entity node. 5.The method of claim 4, wherein, The aggregation degree calculation of the semantic subgraph includes: Extracting the dynamic importance of all nodes in the subgraph, and calculating the arithmetic mean value thereof; Extracting the semantic association strength of all undirected edges in the subgraph, and calculating the geometric mean value thereof; Counting the number of entity nodes in the subgraph; Inputting the arithmetic mean value, geometric mean value and number of entity nodes into the aggregation function, and outputting an aggregation degree value, which is used to evaluate the internal consistency and classification stability of the semantic subgraph. 6.The method of claim 5, wherein the method further comprises: The generation of the preliminary classification strategy set includes: Generating a semantic remapping scheme for the discrete semantic segment, including: Extracting the key entity node and its adjacent nodes; Screening adjacent nodes with a semantic density higher than a set threshold and a dynamic importance meeting a redundancy condition; Calculating the semantic missing amount of the key entity node, which is the difference between the expected semantic influence and the actual semantic influence; According to the semantic redundancy ability and semantic association strength of the adjacent nodes, assigning semantic mapping relationships in priority, and generating semantic redistribution instructions; Generating a classification structure adjustment scheme for the core semantic cluster, including: Extracting the core node and its associated path; If the number of logical dependency relationships in the associated path exceeds the tolerance or the age credibility is lower than the credibility threshold, performing a structure optimization operation: Finding a replacement path with a semantic association strength not lower than the original path and a more concise logical dependency; If there is no replacement path, the original structure is retained, but a structure exception prompt is triggered and an auxiliary classification suggestion is generated; Generating an optimized classification structure instruction. 7.The method of claim 6, wherein the method further comprises: The preliminary classification strategy set also includes a weight adjustment scheme: Real-time monitoring of the age information and semantic labels of newly input texts; Based on the age credibility calculation rule and the dynamic importance generation rule, recalculating the dynamic importance of the conflict nodes; If multiple text entity nodes have semantic overlap during the classification process, the following rules are used to handle them: Preferentially retaining the node with higher age credibility; If the age credibility is the same, the priority is determined according to the historical association strength; If the age credibility and the historical association strength are the same, they are sorted from high to low according to the context coherence; Adjusting the classification queue order, and preferentially classifying the node with the highest dynamic importance and assigning an independent semantic container; Generating a delay processing suggestion for the node with lower dynamic importance, including temporary caching and asynchronous classification arrangement. 8.The method of claim 2, wherein, The user correction instruction includes node feature correction, semantic relationship adjustment and importance redefinition. 9.The method of claim 2, wherein, The adaptive adjustment includes: If the user correction instruction requires node feature correction, the dynamic importance of the affected node is recalculated, and the semantic remapping scheme is adjusted; If the user correction instruction involves semantic relationship adjustment, the semantic association strength is updated and the core semantic cluster is reevaluated to generate a new classification structure adjustment scheme; If the user correction instruction is importance redefinition, the importance value input by the user is used to overwrite the original dynamic importance, and the weight adjustment scheme is updated synchronously. 10.The method of claim 2, wherein the method further comprises: The updating of the text feature map according to the classification result includes: The output data after executing the classification strategy includes semantic remapping completion degree, classification structure consistency and node weight compliance degree; The feature information of the text entity node is updated according to the output data, including re-computing historical association strength, context coherence and dynamic importance; The topological relationship and semantic association strength of the text feature graph are adjusted by using the updated feature information.

Citation Information

Patent Citations

  • Text classification method and device based on reinforcement learning, computer equipment and medium

    CN114780727A

  • Hydropower station knowledge graph construction method and system

    CN119990274A