Machine learning based unsupervised file data intelligent classification method and system
By combining multimodal feature extraction and dynamic adaptive graph neural networks with hybrid density clustering and hierarchical relationship tree construction, and integrating iterative updates with knowledge graphs, the problems of poor accuracy and interpretability in unsupervised file classification are solved, achieving efficient and automated file classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG OCEAN UNIVERSITY
- Filing Date
- 2025-10-21
- Publication Date
- 2026-04-14
AI Technical Summary
Existing unsupervised document classification techniques struggle to adaptively generate hierarchical classification results with high accuracy, robustness, and interpretability when processing high-dimensional, multimodal document data. Furthermore, they rely on costly manual annotation, and traditional clustering methods are sensitive to parameter settings and lack dynamic optimization mechanisms.
We employ a machine learning-based approach, utilizing multimodal feature extraction, dynamic adaptive graph neural networks, hybrid density clustering, and hierarchical relation tree construction, combined with iterative updates of the knowledge graph, to generate stable, reliable, and semantically relevant classification results.
It achieves adaptive file classification without human intervention, improving the automation and accuracy of classification. The generated results are highly interpretable and practical, avoiding the parameter sensitivity and result instability of traditional methods.
Smart Images

Figure CN121301568B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power systems, and in particular to an unsupervised intelligent classification method and system for document data based on machine learning. Background Technology
[0002] With the deepening of digital transformation, enterprises and institutions generate massive amounts of electronic document data in their daily operations. This document data is diverse in form and complex in structure, including structured data such as text documents and spreadsheets, as well as semi-structured and unstructured data such as images and log files. How to effectively and automatically classify and manage this heterogeneous document data has become a key technical challenge in fields such as information retrieval, knowledge management, and intelligent decision-making.
[0003] Traditional document classification methods primarily rely on supervised learning techniques, which require a large number of pre-labeled training samples to build effective classification models. However, in practical applications, acquiring large amounts of high-quality labeled data is often costly and time-consuming, especially when dealing with emerging fields or highly specialized content, where labeling becomes extremely difficult. Meanwhile, existing unsupervised document classification techniques are mainly based on clustering algorithms, such as K-means, hierarchical clustering, or DBSCAN. However, these traditional clustering methods have significant shortcomings when handling high-dimensional, multimodal document data: First, they typically rely on simple metrics such as Euclidean distance, making it difficult to effectively capture the complex semantic relationships and structural features within the document data; second, these methods are sensitive to parameter settings and require pre-specifying the number of clusters, often failing to achieve ideal results in practical applications; third, traditional methods lack dynamic optimization mechanisms for clustering results, failing to adaptively adjust the classification structure based on data characteristics. Therefore, existing unsupervised document classification techniques result in low classification quality, low accuracy, and poor interpretability. Summary of the Invention
[0004] This invention provides an unsupervised intelligent classification method and system for document data based on machine learning, which can solve the problem that existing unsupervised document classification methods are unable to adaptively generate hierarchical classification results with high accuracy, strong robustness and good interpretability without human intervention.
[0005] This invention provides an unsupervised intelligent classification method for document data based on machine learning, comprising:
[0006] Obtain the dataset of files to be classified, perform multimodal feature extraction on the dataset of files to be classified, and obtain a set of feature vectors including multiple multidimensional feature vectors, wherein each multidimensional feature vector is obtained by concatenating and fusing text feature vectors, structural feature vectors and semantic feature vectors;
[0007] A dynamic adaptive graph neural network model is constructed. The feature vector set is input into the dynamic adaptive graph neural network model, and a file feature map is generated through a dynamic node splitting and fusion mechanism. In the file feature map, each node represents a file feature cluster, and the edge weight represents the similarity between clusters.
[0008] The density attractors in the file feature map are identified by adaptive bandwidth kernel density estimation as initial cluster centers. Density clustering is performed starting from the initial cluster centers to form an initial cluster set. The density reachability between clusters is calculated based on the density distribution characteristics of each cluster in the initial cluster set. Under the condition of satisfying the monotonically decreasing density constraint, an inter-cluster hierarchical relationship tree is constructed. The inter-cluster hierarchical relationship tree is dynamically pruned using a metric technique that integrates Wasserstein distance and silhouette coefficient to generate the initial classification result.
[0009] The information entropy and relative entropy of each cluster in the initial classification result are calculated and weighted and fused to obtain the purity score of each cluster. Clusters with purity scores less than or equal to a preset threshold are identified as clusters to be optimized. The maximum variance axis in the feature space of the clusters to be optimized is determined by principal component analysis, and a secondary split is performed along the maximum variance axis to obtain intermediate classification results.
[0010] A classification knowledge graph is constructed based on the intermediate classification results, and the classification knowledge graph is iteratively updated using a graph reinforcement learning algorithm to obtain the classification results of the target file.
[0011] This invention, through extracting textual, structural, and semantic features and constructing a feature vector set, comprehensively represents file content, overcoming the limitations of single feature types and laying a data foundation for subsequent accurate classification. By generating file feature maps through a dynamic adaptive graph neural network and combining it with hybrid density clustering and hierarchical relationship tree construction, the inherent structure of the data can be automatically discovered without pre-specifying the number of clusters, significantly improving the automation and accuracy of classification. The initial classification results are optimized through purity scoring and a secondary splitting mechanism, and iteratively updated using a knowledge graph, ultimately generating stable, reliable, and semantically relevant classification results, improving the interpretability and practicality of the results.
[0012] Furthermore, the step of identifying density attractors in the file feature map as initial cluster centers through adaptive bandwidth kernel density estimation specifically involves:
[0013] A K-nearest neighbor adaptive bandwidth strategy is adopted for each feature vector in the file feature map, and the bandwidth of each feature vector is set as the Euclidean distance between the feature vector and the Kth nearest neighbor feature vector.
[0014] The kernel density distribution function of the feature space is calculated based on the bandwidth of each feature vector, and the local maxima of the kernel density distribution function are used as initial density attractors.
[0015] When the distance between two initial density attractors is less than a preset minimum distance threshold, the initial density attractor with the higher density value is retained as the initial cluster center to achieve deduplication of the initial density attractors.
[0016] By employing a K-nearest neighbor adaptive bandwidth strategy, the bandwidth parameters can be dynamically adjusted based on the local density of the data, avoiding the over-smoothing or under-smoothing problems caused by fixed bandwidth and improving the accuracy of density attractor identification. Deduplication of the initial density attractors using a distance threshold ensures the uniqueness and representativeness of the initial cluster centers, providing a high-quality starting point for subsequent clustering.
[0017] Furthermore, the calculation of inter-cluster density reachability based on the density distribution characteristics of each cluster in the initial cluster set specifically involves:
[0018] Calculate the core density and edge density of each cluster in the initial cluster set, wherein the core density is the average of the kernel density estimates of all feature vectors in the cluster, the edge density is the minimum of the kernel density estimates of multiple edge feature vectors in the cluster, and the edge feature vector is the feature vector in the cluster whose distance from the cluster center is greater than a preset threshold.
[0019] Based on the preset density reachability rule, for any first cluster and second cluster in the initial cluster set, if the core density of the first cluster is less than the edge density of the second cluster, and there exists a continuous feature vector path from the second cluster to the first cluster, and the kernel density of all feature vectors on the continuous feature vector path is greater than or equal to the core density of the first cluster, then it is determined that the density of the first cluster is reachable from the second cluster, and a directed edge from the second cluster to the first cluster is generated to construct a directed graph of inter-cluster density association.
[0020] Defining density reachability through core density, edge density, and continuous path constraints more accurately captures the hierarchical and density relationships between clusters, reflecting complex data distribution patterns better than traditional center-distance-based metrics. The generated directed graph of inter-cluster density relationships quantifies the dependencies between clusters, providing a structured and reliable input for subsequently constructing a hierarchical tree with monotonically decreasing density constraints.
[0021] Furthermore, the construction of the inter-cluster hierarchical relationship tree with monotonically decreasing density constraints specifically includes:
[0022] Using all clusters of the inter-cluster density association directed graph as leaf nodes, traverse the inter-cluster density association directed graph and map the directed edges from the second cluster to the first cluster in the inter-cluster density association directed graph to the candidate parent node relationship where the first cluster is the initial parent node of the second cluster.
[0023] In each iteration, based on the current candidate parent node relationship, the feature distribution similarity between all adjacent cluster pairs is calculated, and based on the preset density decay coefficient, it is checked whether the kernel density of the initial parent node satisfies the density constraint condition. Cluster pairs that satisfy the density constraint and have the highest feature distribution similarity are merged to generate the current parent node and the initial hierarchical relationship tree. The current density decay record table is determined according to the initial hierarchical relationship tree to record the density ratio relationship between parent nodes and child nodes in the initial hierarchical relationship tree, wherein the current parent node is the parent node of the initial parent node.
[0024] The depth and balance factor of each branch in the initial hierarchical relationship tree are monitored in real time. When the depth of a branch exceeds a preset depth value or the balance factor is lower than a preset balance value, the branch is reorganized based on the current density decay record table to obtain the reorganized hierarchical relationship tree.
[0025] The nodes in the recombined hierarchical relationship tree that do not meet the density monotonically decreasing constraint are detected and marked, and the local tree structure is reconstructed to obtain the current hierarchical relationship tree. The iteration stops when all nodes in the current hierarchical relationship tree are merged and all meet the density constraint, and the inter-cluster hierarchical relationship tree that meets the density monotonically decreasing constraint is obtained.
[0026] By employing a strict density constraint (parent node density > sum of child node densities) for node merging, the monotonicity and logical rationality of the generated hierarchical tree in the density dimension are guaranteed. Real-time monitoring of the balance factor and depth, along with reorganization and local reconstruction of abnormal branches, effectively prevents tree structure imbalance or infinite expansion, improving the computational efficiency and result stability of the construction process.
[0027] Furthermore, the dynamic pruning of the inter-cluster hierarchical relationship tree using a metric technique that integrates Wasserstein distance and contour coefficients specifically involves:
[0028] In each iteration, for any two adjacent parent and child clusters in the current hierarchical relationship tree, the Wasserstein distance and the average contour coefficient of the child clusters are calculated. The Wasserstein distance and the average contour coefficient are weighted and fused to obtain a pruning score. Child clusters with pruning scores lower than the pruning threshold are merged into the parent cluster. The pruning threshold is dynamically adjusted based on the total depth of the current hierarchical relationship tree.
[0029] By combining Wasserstein distance (a measure of distributional dissimilarity) and silhouette coefficient (a measure of cluster density) for pruning decisions, redundant subclusters with similar distributions and close internal clusters can be intelligently merged, simplifying the tree structure while preserving key classification information. The pruning threshold is dynamically adjusted according to the tree depth, avoiding the difficulty of manually setting parameters and making the pruning process more adaptable to hierarchical structures of varying complexity.
[0030] Furthermore, the multimodal feature extraction of the dataset of files to be classified specifically involves:
[0031] The importance weights of keywords in each file of the dataset to be classified are calculated using the TF-IDF algorithm to obtain keyword weight features. The keywords of each file are mapped to context embedding vectors representing semantic associations using the Word2Vec model. The keyword weight features and context embedding vectors are concatenated to obtain text feature vectors.
[0032] The file format of each file is parsed, and various structural features in the file format are extracted and standardized to obtain a structural feature vector. The structural features include the number of paragraphs, heading levels, the proportion of tables or images, and header and footer metadata.
[0033] The semantic feature vector is obtained by encoding the content of each file through a pre-trained BERT model.
[0034] The text feature vector, structural feature vector, and semantic feature vector are weighted and fused using an attention mechanism to obtain the feature vector set.
[0035] This approach extracts features from three dimensions—word frequency, semantics, and structure—and fuses them using an attention mechanism with weighted values, fully leveraging the multimodal information of the documents to generate more discriminative feature representations. By combining multiple advanced models such as TF-IDF, Word2Vec, and BERT, effective features can be extracted from various types of file data.
[0036] Furthermore, the step of iteratively updating the classification knowledge graph using a graph reinforcement learning algorithm to obtain the target file classification result specifically involves:
[0037] A reinforcement learning environment is constructed, with the topological structure feature vector of the classification knowledge graph as the state space, and the operations of adding nodes, deleting nodes, adding edges, deleting edges, and adjusting edge weights as the action space.
[0038] In each iteration, a strategy is generated based on the current state space and the current graph editing sequence determined by the policy gradient algorithm. Monte Carlo tree search is then used to determine and execute the current graph editing operation sequence.
[0039] The composite reward value is calculated based on the result after execution according to the composite reward function, which is a reward function that is a weighted fusion of the classification accuracy improvement, the change in map sparsity, and the structural consistency preservation.
[0040] The current graph editing sequence generation strategy is updated according to the composite reward value until the composite reward value converges or reaches a preset number of iterations. Then, the target graph editing sequence generation strategy is obtained. The target graph editing operation sequence is determined according to the target graph editing sequence generation strategy to reconstruct the classification knowledge graph and obtain the target file classification result.
[0041] By modeling the knowledge graph update process as a reinforcement learning task and guiding the agent to learn the optimal editing strategy through a reward function, the classification system can continuously optimize itself and adapt to new data distributions. The reward function comprehensively considers accuracy, sparsity, and consistency, ensuring that the updated knowledge graph is accurate, concise, and structurally sound, avoiding biases caused by a single metric.
[0042] Further, the step of calculating the information entropy and relative entropy of each cluster in the initial classification result and then performing a weighted fusion to obtain the purity score of each cluster is as follows:
[0043] The Euclidean distance is calculated for the multidimensional feature vector of each cluster in the initial classification result to obtain the average Euclidean distance, and the average Euclidean distance is used as the intra-cluster feature dispersion.
[0044] The dispersion threshold is determined based on the feature dispersion of all clusters, and the information entropy weight and relative entropy weight of each cluster are determined according to the feature dispersion of each cluster and the dispersion threshold.
[0045] The purity score of each cluster is obtained by weighting and summing the information entropy and the relative entropy according to the information entropy weight and the relative entropy weight, respectively.
[0046] By fusing information entropy (a measure of uncertainty) and relative entropy (a measure of distributional variation) to assess cluster purity, this provides an objective and quantifiable basis for identifying low-quality clusters that require further splitting. The weights of information entropy and relative entropy are dynamically adjusted based on intra-cluster dispersion, making the purity score more reflective of the individual characteristics of different clusters.
[0047] Furthermore, the secondary splitting along the maximum variance axis to obtain intermediate classification results is specifically as follows:
[0048] During the iterative optimization process of the cluster to be optimized, the projected eigenvalues of the samples of the cluster to be optimized on the maximum variance axis are statistically analyzed to generate an eigenvalue distribution histogram.
[0049] In the eigenvalue distribution histogram, if the eigenvalues exhibit a unimodal distribution, the weighted average of the distribution mean and median is used as the splitting threshold; if they exhibit a bimodal distribution, the valley point between the two peaks is used as the splitting threshold.
[0050] Samples with feature values greater than the splitting threshold in the cluster to be optimized are divided into the first sub-cluster, and samples with feature values less than or equal to the splitting threshold are divided into the second sub-cluster;
[0051] The purity scores of the first sub-cluster and the second sub-cluster are calculated respectively. For the sub-clusters with purity scores less than or equal to the preset threshold, iterative splitting is performed until the purity scores of all sub-clusters are greater than the preset threshold or the maximum number of splits is reached. Then the splitting is stopped, and the intermediate classification result is obtained.
[0052] This method of splitting low-purity clusters along the axis of maximum variance (the direction of greatest data variation) effectively separates samples of different categories, significantly improving classification accuracy in specific subcategories. The splitting threshold is automatically selected based on the feature value distribution histogram (weighted values for unimodal clusters, valley values for bimodal clusters), and an iteration termination condition is set, making the splitting process both effective and controllable, thus avoiding overfitting.
[0053] Another embodiment of the present invention provides an unsupervised intelligent classification system for document data based on machine learning, comprising: an extraction module, a feature module, an initial classification module, an intermediate optimization module, and a target output module;
[0054] The extraction module is used to acquire a dataset of files to be classified, perform multimodal feature extraction on the dataset of files to be classified, and obtain a set of feature vectors including multiple multidimensional feature vectors, wherein each multidimensional feature vector is obtained by concatenating and fusing text feature vectors, structural feature vectors and semantic feature vectors;
[0055] The feature module is used to construct a dynamic adaptive graph neural network model. The feature vector set is input into the dynamic adaptive graph neural network model, and a file feature map is generated through a dynamic node splitting and fusion mechanism. In the file feature map, each node represents a file feature cluster, and the edge weight represents the similarity between clusters.
[0056] The initial classification module is used to identify density attractors in the file feature map as initial cluster centers through adaptive bandwidth kernel density estimation, perform density clustering starting from the initial cluster centers to form an initial cluster set, calculate the density reachability between clusters based on the density distribution characteristics of each cluster in the initial cluster set, construct an inter-cluster hierarchical relationship tree under the condition of satisfying the density monotonically decreasing constraint, and use a metric technique that integrates Wasserstein distance and silhouette coefficient to dynamically prune the inter-cluster hierarchical relationship tree to generate the initial classification result.
[0057] The intermediate optimization module is used to calculate the information entropy and relative entropy of each cluster in the initial classification result and perform weighted fusion to obtain the purity score of each cluster. Clusters with purity scores less than or equal to a preset threshold are identified as clusters to be optimized. The maximum variance axis in the feature space of the clusters to be optimized is determined by principal component analysis, and a secondary split is performed along the maximum variance axis to obtain intermediate classification results.
[0058] The target output module is used to construct a classification knowledge graph based on the intermediate classification results, and to iteratively update the classification knowledge graph using a graph reinforcement learning algorithm to obtain the target file classification results.
[0059] This invention, through extracting textual, structural, and semantic features and constructing a feature vector set, comprehensively represents file content, overcoming the limitations of single feature types and laying a data foundation for subsequent accurate classification. By generating file feature maps through a dynamic adaptive graph neural network and combining it with hybrid density clustering and hierarchical relationship tree construction, the inherent structure of the data can be automatically discovered without pre-specifying the number of clusters, significantly improving the automation and accuracy of classification. The initial classification results are optimized through purity scoring and a secondary splitting mechanism, and iteratively updated using a knowledge graph, ultimately generating stable, reliable, and semantically relevant classification results, improving the interpretability and practicality of the results. Attached Figure Description
[0060] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0061] Figure 1 This is a flowchart illustrating an unsupervised intelligent classification method for document data based on machine learning, provided in an embodiment of the present invention.
[0062] Figure 2 This is a schematic diagram of the structure of an unsupervised intelligent classification system for document data based on machine learning, provided in an embodiment of the present invention. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0065] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0066] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0067] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0068] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0069] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0070] See Figure 1 To address the problem that existing unsupervised document classification methods struggle to adaptively generate hierarchical classification results with high accuracy, robustness, and interpretability without human intervention, an embodiment of this invention provides an intelligent unsupervised document data classification method based on machine learning, comprising:
[0071] Step S101: Obtain the dataset of files to be classified, and perform multimodal feature extraction on the dataset of files to be classified to obtain a set of feature vectors including multiple multidimensional feature vectors. Each multidimensional feature vector is obtained by concatenating and fusing text feature vectors, structural feature vectors and semantic feature vectors.
[0072] In this embodiment, firstly, the dataset of files to be classified is acquired. This is typically done by reading raw files from a specified storage system or data source. These files may contain various formats, such as text documents (TXT, PDF, DOCX), tabular data (CSV, XLSX), presentations (PPTX), or embedded text within image files. The system traverses the target directory or database, loads the file path list into memory, and performs unified format validation and encoding to ensure the data can be correctly parsed. Subsequently, a multimodal feature extraction process is initiated, generating feature vectors from textual, structural, and semantic perspectives. For text feature vector extraction, the main goal is to capture the surface statistics and lexical information of the document content. Standard preprocessing workflows in Natural Language Processing (NLP) can be used. Specifically, the raw text is extracted from scanned documents or images using Optical Character Recognition (OCR) technology. The plain text is then segmented, stop words are removed, and lemmatization is performed to normalize the text. Subsequently, the text is converted into high-dimensional sparse vectors, i.e., text feature vectors, using a bag-of-words model or TF-IDF (Term Frequency-Inverse Document Frequency) model. Each dimension of the vector represents the weight of a specific word in the document. To further reduce dimensionality and capture keyword features, techniques such as Principal Component Analysis (PCA) or Non-negative Matrix Factorization (NMF) are often applied. For structural feature vector extraction, the purpose is to quantify the internal organizational patterns and metadata information of the document, including parsing the document's logical structure, such as extracting the hierarchical relationships of chapter titles, paragraph length distribution, and the number and complexity of lists and tables. It also includes basic metadata such as file size, creation and modification time, page number, and author information. For tabular documents, statistics such as the number of rows, columns, and data fill rate might be calculated; for slides, the number of slides and the average number of bullet points per page might be extracted. These heterogeneous structured information, after standardization and quantification, are concatenated into a fixed-length numerical vector, i.e., the structural feature vector. The extraction of semantic feature vectors aims to deeply understand the underlying meaning of the document content, going beyond superficial lexical statistics. This can be achieved using pre-trained language models based on deep learning, such as BERT, RoBERTa, or ERNIE. The entire or segmented text of the document is input into the model, and then the hidden state output marked with [CLS] or the output of all words is averaged (Average Pooling) to generate a dense, low-dimensional vector representation, i.e., the semantic feature vector. This vector effectively maps documents with similar semantics but different word usage to similar positions in the vector space. Finally, the generated text feature vector, structural feature vector, and semantic feature vector are concatenated or weighted and fused based on an attention mechanism to form a unified set of feature vectors containing multimodal information, which serves as the input to the subsequent dynamic adaptive graph neural network model.
[0073] Step S102: Construct a dynamic adaptive graph neural network model. Input the feature vector set into the dynamic adaptive graph neural network model and generate a file feature map through a dynamic node splitting and fusion mechanism. In the file feature map, each node represents a file feature cluster, and the edge weight represents the similarity between clusters.
[0074] In this embodiment, a dynamic adaptive graph neural network model can be constructed using graph neural network structures such as GNN and GAT. A network architecture including an input layer, a feature adaptation layer, and a graph structure evolution layer is built, and node representations are optimized through backpropagation. Specifically, the input layer receives each multi-dimensional feature vector from the feature vector set, which is a concatenation and fusion of textual, structural, and semantic features. The feature adaptation layer standardizes the feature scale and maps the features to a feature space of a preset dimension through a fully connected layer, providing standardized input for graph structure construction. When initializing the graph structure, the graph structure evolution layer uses each multi-dimensional feature vector as an initial node. The node features directly adopt the feature values of the corresponding vectors. Simultaneously, the feature similarity between any two initial nodes is calculated (using cosine similarity as a metric). Nodes with similarity greater than an initial threshold are connected to form initial edges, and the edge weights are temporarily set to the corresponding similarity values. The iterative optimization process of dynamic node splitting and fusion is then initiated: In the splitting mechanism, the intra-cluster scatter of the feature cluster represented by each current node is calculated. When the scatter exceeds the splitting threshold, the feature vectors within that cluster are quickly clustered, and the resulting sub-clusters are used as new nodes. The original nodes are replaced by these new nodes, and the feature similarity between the new nodes is calculated, and edge connections are established. In the fusion mechanism, the inter-cluster similarity (based on the cosine similarity of node feature vectors) of adjacent nodes (connected node pairs) is calculated. When the similarity exceeds the fusion threshold, two nodes are merged into a new node. The feature vector of the new node is generated by weighted averaging of the feature vectors of the two child nodes according to the sample size. The edges between the original nodes are removed, and the edge weights between the new node and its surrounding nodes are recalculated and updated. After each split or fusion, the network adjusts the splitting and fusion thresholds through backpropagation to adapt the graph structure to the feature distribution. After multiple iterations until the number of nodes and the dispersion within the cluster tend to stabilize, a file feature map is finally generated. Each node corresponds to a file feature cluster with high feature similarity. The node contains the feature aggregation information of all files in the cluster. The edge weights between nodes are obtained by calculating and normalizing the cosine similarity of the feature vectors of the corresponding clusters, which directly reflects the similarity between the features of the two clusters.
[0075] Step S103: Identify the density attractors in the file feature map using adaptive bandwidth kernel density estimation as initial cluster centers. Perform density clustering starting from the initial cluster centers to form an initial cluster set. Calculate the density reachability between clusters based on the density distribution characteristics of each cluster in the initial cluster set. Construct an inter-cluster hierarchical relationship tree under the condition of satisfying the monotonically decreasing density constraint. Use a metric technique that integrates Wasserstein distance and silhouette coefficient to dynamically prune the inter-cluster hierarchical relationship tree to generate the initial classification result.
[0076] In this embodiment, when identifying density attractors in the file feature map using adaptive bandwidth kernel density estimation, the bandwidth parameter is first dynamically adjusted based on the local distribution density of each feature vector in the file feature map. This allows the bandwidth to adapt to the feature aggregation degree in different regions. Based on the adjusted bandwidth, the kernel density distribution function of the feature space is calculated, and the local maxima of the function are identified as density attractors. These density attractors are selected as initial cluster centers. When performing density clustering starting from the initial cluster centers, feature vectors whose surrounding feature densities meet preset conditions are aggregated to form clusters, ultimately resulting in an initial cluster set. When calculating inter-cluster density reachability based on the initial cluster set, the density characteristics of the core and edge regions of each cluster are combined to analyze the density correlation between clusters and determine whether there are continuous density transfer paths between different clusters, thereby determining the reachability between clusters. In the process of constructing the inter-cluster hierarchical relationship tree, the initial clusters are used as basic units. According to the constraint rule of monotonically decreasing density (i.e., the density corresponding to the parent node is not lower than the density of the child node), a hierarchical tree structure is generated by merging reachable clusters, ensuring that the density of each level in the tree presents a reasonable decreasing trend. When using a metric technique that combines Wasserstein distance and silhouette coefficient for dynamic pruning, the difference in feature distribution between adjacent parent and child clusters in the hierarchical relationship tree (measured by Wasserstein distance) and the degree of clustering of samples within a child cluster (measured by silhouette coefficient) are calculated. These two indicators are weighted and fused to obtain a pruning score. The pruning threshold is dynamically adjusted according to the overall complexity of the tree structure, and child clusters with scores below the threshold are merged into their corresponding parent clusters. After pruning optimization, an initial classification result with clear hierarchy and satisfactory clustering quality is generated.
[0077] Step S104: Calculate the information entropy and relative entropy of each cluster in the initial classification result and perform weighted fusion to obtain the purity score of each cluster. Determine the clusters with purity scores less than or equal to a preset threshold as clusters to be optimized. Determine the maximum variance axis in the feature space of the clusters to be optimized through principal component analysis, and perform a secondary split along the maximum variance axis to obtain intermediate classification results.
[0078] In this embodiment, for each cluster in the initial classification results, its information entropy and relative entropy are calculated: information entropy reflects the degree of disorder in the feature distribution within the cluster, and relative entropy measures the difference between the actual feature distribution within the cluster and the preset ideal distribution. The calculated information entropy and relative entropy are weighted and fused. During the fusion process, the weight ratio of the two is dynamically adjusted according to the feature distribution characteristics of the cluster, and finally, a purity score is obtained for each cluster. Clusters with purity scores less than or equal to a preset threshold are marked as clusters to be optimized. For each cluster to be optimized, principal component analysis is used to analyze its feature space, and the principal axis with the largest variance in the feature vector distribution is identified. This principal axis is the direction in which the data differences are most significant in the feature space. The cluster to be optimized is split twice along this axis of maximum variance, dividing the samples within the cluster into two sub-clusters, making the feature distribution within the sub-clusters more concentrated. The purity score of the sub-clusters obtained after splitting is calculated again. If the purity score of any sub-cluster still does not reach the preset threshold, the above-mentioned secondary splitting process is repeated until the purity scores of all sub-clusters exceed the preset threshold or the preset maximum number of splits is reached, and finally, an intermediate classification result is formed.
[0079] Step S105: Construct a classification knowledge graph based on the intermediate classification results, and use a graph reinforcement learning algorithm to iteratively update the classification knowledge graph to obtain the target file classification results.
[0080] In this embodiment, when constructing a classification knowledge graph based on intermediate classification results, each sub-cluster in the intermediate classification results is used as a core node of the knowledge graph. Connection edges between nodes are defined according to the feature similarity and hierarchical association between sub-clusters. The attributes of the edges are used to characterize the association strength or logical relationship between clusters, forming an initial classification knowledge graph. When iteratively updating the classification knowledge graph using a graph reinforcement learning algorithm, the goal is to optimize classification accuracy and the rationality of the graph structure. The learning algorithm dynamically adjusts the node partitioning, edge association strength, and topological structure of the knowledge graph. In each iteration, based on the current graph's structural features and classification effect, the learning mechanism identifies parts of the graph that need optimization (such as redundant nodes, unreasonable associations, or weakly associated edges) and adjusts and updates them. Simultaneously, the updated graph is evaluated based on preset evaluation indicators (such as the consistency of classification results and the compactness of the graph), and the evaluation results guide the adjustment direction for the next round. After multiple iterations, until the graph structure stabilizes and the classification effect meets preset requirements or the number of iterations reaches its limit, the target file classification result is finally generated based on the optimized classification knowledge graph.
[0081] As an example of an embodiment of the present invention, the step of identifying density attractors in the file feature map as initial cluster centers through adaptive bandwidth kernel density estimation specifically involves:
[0082] A K-nearest neighbor adaptive bandwidth strategy is adopted for each feature vector in the file feature map. The bandwidth of each feature vector is set as the Euclidean distance between the feature vector and the Kth nearest neighbor feature vector. The kernel density distribution function of the feature space is calculated based on the bandwidth of each feature vector. The local maximum point of the kernel density distribution function is used as the initial density attractor. When the distance between two initial density attractors is less than a preset minimum distance threshold, the initial density attractor with the higher density value is retained as the initial cluster center to achieve deduplication of the initial density attractors.
[0083] In this embodiment, for each feature vector in the file feature map, a K-nearest neighbor adaptive bandwidth strategy is used to determine the bandwidth: for each feature vector, the K nearest feature vectors are searched in the feature space, the Kth nearest neighbor feature vector is selected, the Euclidean distance between the feature vector and the Kth nearest neighbor feature vector is calculated, and this distance value is set as the bandwidth of the feature vector. In this way, the bandwidth can be automatically adjusted according to the local data distribution density around the feature vector, avoiding the bias of fixed bandwidth in capturing features in different density regions. Based on the bandwidth corresponding to each feature vector, a kernel density estimation method is applied in the feature space to calculate the kernel density distribution function. This function is obtained by weighted superposition of the kernel function (such as the Gaussian kernel function) of each feature vector. The function value reflects the degree of clustering of feature vectors at each position in the feature space. Local maxima points are selected from the kernel density distribution function, that is, the kernel density value of the point is higher than the kernel density value of all points in its surrounding neighborhood. These local maxima points are determined as the initial density attractors. The identified initial density attractors are deduplicated. The Euclidean distance between any two initial density attractors is calculated. When the distance is less than the preset minimum distance threshold, the kernel density values corresponding to the two initial density attractors are compared. The initial density attractor with the higher kernel density value is retained, and the attractor with the lower kernel density value is removed. The remaining initial density attractors after deduplication are the initial cluster centers used for subsequent clustering.
[0084] As an example of an embodiment of the present invention, the calculation of inter-cluster density reachability based on the density distribution characteristics of each cluster in the initial cluster set specifically includes:
[0085] Calculate the core density and edge density of each cluster in the initial cluster set, where the core density is the average of the kernel density estimates of all feature vectors within the cluster, and the edge density is the minimum of the kernel density estimates of multiple edge feature vectors within the cluster. The edge feature vectors are feature vectors within the cluster whose distance from the cluster center is greater than a preset threshold. Based on a preset density reachability rule, for any first cluster and second cluster in the initial cluster set, if the core density of the first cluster is less than the edge density of the second cluster, and there exists a continuous feature vector path from the second cluster to the first cluster, and the kernel density of all feature vectors on the continuous feature vector path is greater than or equal to the core density of the first cluster, then it is determined that the density of the first cluster is reachable from the second cluster. A directed edge from the second cluster to the first cluster is generated, and a directed graph of inter-cluster density association is constructed.
[0086] In this embodiment, when calculating the core density and edge density of each cluster in the initial cluster set, the cluster center of each cluster is first determined (either by the mean of the feature vectors within the cluster or the initial cluster center). For each cluster, all feature vectors included in it are collected, and the kernel density estimates of these feature vectors have been obtained in the previous adaptive bandwidth kernel density estimation process. The core density is calculated by taking the arithmetic mean of the kernel density estimates of all feature vectors within the cluster, which is used to characterize the overall density level of the cluster center region. The selection of edge feature vectors requires first calculating the distance (e.g., Euclidean distance) from each feature vector within the cluster to the cluster center. Feature vectors with a distance greater than a preset threshold (which can be set according to the average distance or standard deviation of the feature vectors within the cluster) are marked as edge feature vectors. These vectors represent the edge region of the cluster; the edge density is the minimum value among the kernel density estimates of these edge feature vectors, reflecting the lowest density level of the cluster edge region. When determining inter-cluster relationships based on preset density reachability rules, for any first and second cluster in the initial cluster set, their core density and edge density are first compared: if the core density of the first cluster is less than the edge density of the second cluster, it indicates that the edge density of the second cluster is sufficient to cover the core density of the first cluster. Simultaneously, it is checked whether there exists a continuous feature vector path whose starting point is within the second cluster and its ending point is within the first cluster, and the estimated kernel density of all feature vectors on the path is greater than or equal to the core density of the first cluster, ensuring that the density on the path will not be lower than the core level of the first cluster. When both conditions are met, it is determined that the density of the first cluster is reachable from the second cluster. At this point, a directed edge is generated from the second cluster to the first cluster, with the direction of the edge representing the direction of density propagation. After performing the above judgment on all cluster pairs, all qualified directed edges are integrated to construct a directed graph of inter-cluster density associations, which quantifies the density dependencies between different clusters.
[0087] As an example of an embodiment of the present invention, the construction of the inter-cluster hierarchical relationship tree with monotonically decreasing density constraints specifically includes:
[0088] Using all clusters in the inter-cluster density association directed graph as leaf nodes, the graph is traversed. Directed edges from the second cluster to the first cluster are mapped to candidate parent node relationships where the first cluster is the initial parent node of the second cluster. In each iteration, based on the current candidate parent node relationships, the feature distribution similarity between all adjacent cluster pairs is calculated. Based on a preset density decay coefficient, the kernel density of the initial parent node is checked to see if it satisfies the density constraint. Cluster pairs that satisfy the density constraint and have the highest feature distribution similarity are merged to generate the current parent node and the initial hierarchical relationship tree. A current density decay record table is determined based on the initial hierarchical relationship tree to record the initial hierarchical relationship tree. The density ratio between parent and child nodes is defined, where the current parent node is the parent node of the initial parent node. The depth and balance factor of each branch in the initial hierarchical relationship tree are monitored in real time. When the branch depth exceeds a preset depth value or the balance factor is lower than a preset balance value, the branch is reorganized based on the current density decay record table to obtain a reorganized hierarchical relationship tree. Node pairs in the reorganized hierarchical relationship tree that do not meet the density monotonically decreasing constraint are detected and marked, and local tree structure reconstruction is performed to obtain the current hierarchical relationship tree. Iteration stops when all nodes in the current hierarchical relationship tree are merged and all meet the density constraint conditions, resulting in an inter-cluster hierarchical relationship tree that satisfies the density monotonically decreasing constraint.
[0089] In this embodiment, when constructing the inter-cluster hierarchical relationship tree with monotonically decreasing density constraints, all clusters in the directed graph of inter-cluster density association are first used as leaf nodes of the hierarchical relationship tree. Then, the directed graph is traversed, and for each directed edge from the second cluster to the first cluster, it is mapped to a candidate parent node relationship where the first cluster is the initial parent node of the second cluster, thus establishing the initial parent-child candidate association. In each iteration, based on the currently determined candidate parent node relationships, the feature distribution similarity between all adjacent cluster pairs with candidate associations is calculated (achieved by comparing the distribution characteristics of intra-cluster feature vectors); simultaneously, combined with a preset density decay coefficient, it is checked whether the kernel density of the initial parent node satisfies the density constraint condition (i.e., the kernel density of the parent node is not lower than the threshold calculated by the decay coefficient for the kernel density of the child node). Cluster pairs that meet the density constraints and have the highest feature distribution similarity are selected and merged to generate a new current parent node (which is the parent node of the initial parent node). An initial hierarchical relationship tree is constructed based on the merging result. Simultaneously, the density ratio between the parent and child nodes in the initial hierarchical relationship tree is recorded, forming a current density decay record table. During the iteration process, the depth (i.e., the number of levels from the leaf node to the root node) and balance factor (i.e., the degree of difference in depth between different branches) of each branch in the initial hierarchical relationship tree are monitored in real time. When the depth of a branch exceeds a preset depth value, or the balance factor is lower than a preset balance value, the node merging method of that branch is adjusted and reorganized according to the density ratio recorded in the current density decay record table, resulting in a reorganized hierarchical relationship tree. The reorganized hierarchical relationship tree is checked, and node pairs that do not meet the density monotonically decreasing constraint (i.e., the parent node kernel density is lower than the child node kernel density) are detected and marked. For these node pairs, the parent-child relationship is readjusted and a local tree structure reconstruction is performed to obtain the current hierarchical relationship tree. Repeat the above iterative process until all nodes in the hierarchical relationship tree have been merged and all satisfy the density constraint conditions. Stop the iteration and finally obtain the inter-cluster hierarchical relationship tree that satisfies the monotonically decreasing density constraint.
[0090] As an example of an embodiment of the present invention, the dynamic pruning of the inter-cluster hierarchical relationship tree using a metric technique that integrates Wasserstein distance and contour coefficients specifically involves:
[0091] In each iteration, for any two adjacent parent and child clusters in the current hierarchical relationship tree, the Wasserstein distance and the average contour coefficient of the child clusters are calculated. The Wasserstein distance and the average contour coefficient are weighted and fused to obtain a pruning score. Child clusters with pruning scores lower than the pruning threshold are merged into the parent cluster. The pruning threshold is dynamically adjusted based on the total depth of the current hierarchical relationship tree.
[0092] In this embodiment, when dynamically pruning the hierarchical relationship tree between clusters using a metric technique that integrates Wasserstein distance and silhouette coefficient, in each iteration, for any two adjacent parent clusters and their subordinate sub-clusters in the current hierarchical relationship tree, the Wasserstein distance between the sub-clusters is first calculated. This distance quantifies the degree of difference in feature distribution among different sub-clusters; the smaller the distance, the more similar the feature distribution of the sub-clusters. Simultaneously, the silhouette coefficient of each sub-cluster is calculated. The silhouette coefficient measures the degree of clustering within a sub-cluster and its separation from other sub-clusters; the closer the coefficient is to 1, the better the cohesion of the sub-cluster and the higher its distinguishability from other sub-clusters. Then, the average silhouette coefficient of all sub-clusters is taken as the average silhouette coefficient of the sub-cluster. The calculated Wasserstein distance and average silhouette coefficient are weighted and fused to obtain a pruning score, where the weights are dynamically allocated according to the feature distribution characteristics of the sub-clusters, so that the score can comprehensively reflect the distribution differences and cohesion between sub-clusters. A pruning threshold is set, which is dynamically adjusted based on the total depth of the current hierarchical tree. The greater the total depth (more levels), the higher the threshold is to retain more sub-clusters; conversely, the lower the total depth, the lower the threshold to simplify the structure. The pruning score is compared to the pruning threshold. Subclusters with scores below the threshold are merged into their corresponding parent clusters. This process removes redundant or low-discrimination subclusters, optimizing the structure of the hierarchical tree. This iterative pruning process is repeated until the structure of the hierarchical tree stabilizes, resulting in a concise and clearly categorized hierarchical tree.
[0093] As an example of an embodiment of the present invention, the multimodal feature extraction of the dataset of files to be classified specifically includes:
[0094] The TF-IDF algorithm is used to calculate the importance weight of keywords in each file of the dataset to be classified, obtaining keyword weight features. The keywords of each file are then mapped to context embedding vectors representing semantic associations using the Word2Vec model. The keyword weight features and context embedding vectors are concatenated to obtain text feature vectors. The file format of each file is parsed, and various structural features in the file format are extracted and standardized to obtain structural feature vectors. These structural features include the number of paragraphs, heading levels, the proportion of tables or images, and header / footer metadata. The file content of each file is encoded using a pre-trained BERT model to obtain semantic feature vectors. Finally, the text feature vectors, structural feature vectors, and semantic feature vectors are weighted and fused using an attention mechanism to obtain the feature vector set.
[0095] In this embodiment, when performing multimodal feature extraction on the dataset of documents to be classified, the text feature vector is extracted first: For each document, the TF-IDF algorithm is used to calculate the importance weight of each keyword in the document by multiplying the term frequency and the inverse document frequency, thus obtaining the keyword weight feature; at the same time, the Word2Vec model is used to train these keywords, mapping each keyword to a context embedding vector that can represent the semantic relationship between words, and then the keyword weight feature and the context embedding vector are concatenated by dimension to form the text feature vector. Next, the structural feature vector is extracted: The format information of each document is parsed, and various structural features such as the number of paragraphs, heading levels (such as the number and hierarchical relationship of first-level and second-level headings), the proportion of tables or pictures in the document, and metadata contained in the header and footer (such as author, date, document identifier, etc.) are extracted from the document. These structural features are standardized (such as unifying the units and normalizing the numerical range), and the processed features are integrated into a structural feature vector. Then, semantic feature vectors are extracted: the complete content of each file is encoded using a pre-trained BERT model. After inputting the file content into the model, the model's deep semantic understanding capabilities generate semantic feature vectors that reflect the core meaning of the file. Finally, feature fusion is performed: an attention mechanism is used to weight and fuse textual feature vectors, structural feature vectors, and semantic feature vectors. The attention mechanism automatically assigns weights based on the importance of different features in the file classification task, making the fused features more prominent in terms of key information, ultimately resulting in a set of feature vectors containing multimodal information.
[0096] As an example of an embodiment of the present invention, the step of iteratively updating the classification knowledge graph using a graph reinforcement learning algorithm to obtain the target file classification result specifically involves:
[0097] A reinforcement learning environment is constructed, using the topological feature vector of the classification knowledge graph as the state space, and defining node addition, node deletion, edge addition, edge deletion, and edge weight adjustment operations as the action space. In each iteration, a strategy for generating the current graph editing sequence is generated based on the current state space and the strategy gradient algorithm. A Monte Carlo tree search is used to determine and execute the current graph editing operation sequence. A composite reward value is calculated based on the results of the execution, whereby the composite reward function is a weighted fusion of the improvement in classification accuracy, the change in graph sparsity, and the preservation of structural consistency. The current graph editing sequence generation strategy is updated based on the composite reward value until the composite reward value converges or reaches a preset number of iterations, resulting in a target graph editing sequence generation strategy. A target graph editing operation sequence is then determined based on this strategy to reconstruct the classification knowledge graph and obtain the target file classification result.
[0098] In this embodiment, when iteratively updating the classification knowledge graph using the graph reinforcement learning algorithm, a reinforcement learning environment is first constructed. The topological feature vector of the classification knowledge graph (including features such as the number of nodes, edge connections, edge weight distribution, and node hierarchy) is defined as the state space. Simultaneously, operations such as adding nodes (adding new classification cluster nodes), deleting nodes (removing redundant or erroneous nodes), adding edges (establishing new inter-cluster associations), deleting edges (removing unreasonable associations), and adjusting edge weights (modifying association strength values) are defined as the action space. In each iteration, based on the topological features of the current state space and the current graph editing sequence generation strategy learned through the policy gradient algorithm, the Monte Carlo tree search method is used to explore and evaluate possible editing operation sequences. The current graph editing operation sequence with the best expected results is selected and executed on the knowledge graph. After the operation is executed, a composite reward value is calculated using a composite reward function. This function is a weighted fusion of reward functions corresponding to three indicators: improvement in classification accuracy (the change in the matching degree between the updated classification result and the expected logic), change in graph sparsity (the simplification of the number of graph edges), and preservation of structural consistency (the logical coherence of the hierarchical relationships between clusters). The weights are set according to the influence of each indicator on the classification effect. The current graph editing sequence generation strategy is updated in reverse based on the calculated composite reward value, making the strategy more inclined to generate operation sequences that can obtain high rewards. The above iterative process is repeated until the composite reward value tends to stabilize (converge) or reaches the preset maximum number of iterations. At this point, the target graph editing sequence generation strategy is obtained. Based on this target strategy, the final target graph editing operation sequence is determined. The classification knowledge graph is restructured according to this sequence (including the adjustment of nodes and edges), and finally, an accurate and logically coherent target file classification result is obtained.
[0099] As an example of an embodiment of the present invention, the step of calculating the information entropy and relative entropy of each cluster in the initial classification result and performing weighted fusion to obtain the purity score of each cluster is as follows:
[0100] The Euclidean distance is calculated for the multidimensional feature vectors of each cluster in the initial classification result to obtain the average Euclidean distance, and the average Euclidean distance is used as the intra-cluster feature dispersion. A dispersion threshold is determined based on the feature dispersion of all clusters, and the information entropy weight and relative entropy weight of each cluster are determined according to the feature dispersion of each cluster and the dispersion threshold. The information entropy and the relative entropy are weighted and summed according to the information entropy weight and the relative entropy weight respectively to obtain the purity score of each cluster.
[0101] In this embodiment, Euclidean distance is calculated for the multidimensional feature vectors of each cluster in the initial classification results. Specifically, the Euclidean distance between all feature vectors within the cluster is calculated, and then the average of these distances is obtained to obtain the average Euclidean distance. This average Euclidean distance is used as the intra-cluster feature dispersion, which measures the degree of dispersion of feature vectors within the cluster. Based on the feature dispersion data of all clusters, a dispersion threshold is determined through statistical analysis (such as taking the median or mean of all dispersions) to distinguish the density of feature distribution within the cluster. For each cluster, the information entropy weight and relative entropy weight are determined according to the comparison between its feature dispersion and the dispersion threshold: if the feature dispersion of the cluster is greater than the dispersion threshold, it indicates that the feature distribution within the cluster is relatively dispersed. In this case, the weight of relative entropy is increased to pay more attention to the difference between the actual distribution and the ideal distribution; if the feature dispersion is less than or equal to the dispersion threshold, it indicates that the features within the cluster are relatively concentrated. In this case, the weight of information entropy is increased to focus on measuring the degree of disorder in the distribution. Calculate the information entropy (reflecting the uncertainty of the distribution of feature values within the cluster) and relative entropy (measuring the difference between the actual distribution of features within the cluster and the preset ideal distribution) for each cluster. Then, according to the determined information entropy weight and relative entropy weight, the information entropy and relative entropy are weighted and summed to finally obtain the purity score of each cluster. The lower the score, the more chaotic the distribution of features within the cluster and the lower the purity.
[0102] As an example of an embodiment of the present invention, the secondary splitting along the maximum variance axis to obtain intermediate classification results is specifically as follows:
[0103] During the iterative optimization process of the cluster to be optimized, statistical analysis is performed on the projected eigenvalues of the samples of the cluster to be optimized on the maximum variance axis to generate an eigenvalue distribution histogram. In the eigenvalue distribution histogram, if the eigenvalues have a unimodal distribution, the weighted value of the distribution mean and median is taken as the splitting threshold; if they have a bimodal distribution, the valley point between the two peaks is taken as the splitting threshold. Samples in the cluster to be optimized with eigenvalues greater than the splitting threshold are divided into the first sub-cluster, and samples with eigenvalues less than or equal to the splitting threshold are divided into the second sub-cluster. The purity scores of the first and second sub-clusters are calculated respectively. Iterative splitting is performed on the purity scores less than or equal to the preset threshold until the purity scores of all sub-clusters are greater than the preset threshold or the maximum number of splits is reached, at which point the splitting stops, and the intermediate classification result is obtained.
[0104] In this embodiment, during the iterative optimization of the cluster to be optimized, the feature vectors of all samples in the cluster to be optimized are first projected onto the maximum variance axis determined by principal component analysis, obtaining the projected feature value of each sample on this axis. Statistical analysis is performed on these projected feature values, and a feature value distribution histogram is generated by counting the number of samples in each feature value interval. The shape of the feature value distribution histogram is observed. If the histogram exhibits a unimodal distribution (i.e., feature values are concentrated in one main interval), the mean and median of the distribution are calculated, and the two are weighted according to a preset ratio to obtain the splitting threshold. If the histogram exhibits a bimodal distribution (i.e., feature values are clearly clustered in two intervals), the feature value corresponding to the valley point between the two peaks is selected as the splitting threshold. Based on the determined splitting threshold, the cluster to be optimized is divided, with samples whose projected feature values are greater than the splitting threshold assigned to the first sub-cluster, and samples whose projected feature values are less than or equal to the splitting threshold assigned to the second sub-cluster. The purity scores of the first and second subclusters are calculated separately (obtained by weighted fusion of information entropy and relative entropy). For subclusters whose purity scores are still less than or equal to a preset threshold, the above projection, histogram analysis, threshold determination, and splitting steps are repeated for iterative splitting. This process continues until the purity scores of all subclusters exceed the preset threshold, or the number of splits reaches the preset maximum number, at which point the iteration stops, and the optimized intermediate classification result is finally obtained.
[0105] like Figure 2 As shown, based on the above method embodiments, corresponding system embodiments are provided;
[0106] An embodiment of the present invention provides an unsupervised intelligent classification system 200 for document data based on machine learning, including: an extraction module 201, a feature module 202, an initial classification module 203, an intermediate optimization module 204, and a target output module 205;
[0107] The extraction module 201 is used to acquire the dataset of files to be classified, perform multimodal feature extraction on the dataset of files to be classified, and obtain a feature vector set including multiple multidimensional feature vectors, wherein each multidimensional feature vector is obtained by concatenating and fusing text feature vectors, structural feature vectors and semantic feature vectors;
[0108] The feature module 202 is used to construct a dynamic adaptive graph neural network model, input the feature vector set into the dynamic adaptive graph neural network model, and generate a file feature map through a dynamic node splitting and fusion mechanism. In the file feature map, each node represents a file feature cluster, and the edge weight represents the similarity between clusters.
[0109] The initial classification module 203 is used to identify density attractors in the file feature map as initial cluster centers through adaptive bandwidth kernel density estimation, perform density clustering starting from the initial cluster centers to form an initial cluster set, calculate the density reachability between clusters based on the density distribution characteristics of each cluster in the initial cluster set, construct an inter-cluster hierarchical relationship tree under the condition of satisfying the density monotonically decreasing constraint, and use a metric technique that integrates Wasserstein distance and silhouette coefficient to dynamically prune the inter-cluster hierarchical relationship tree to generate the initial classification result;
[0110] The intermediate optimization module 204 is used to calculate the information entropy and relative entropy of each cluster in the initial classification result and perform weighted fusion to obtain the purity score of each cluster. Clusters with purity scores less than or equal to a preset threshold are identified as clusters to be optimized. The maximum variance axis in the feature space of the clusters to be optimized is determined by principal component analysis, and a secondary split is performed along the maximum variance axis to obtain intermediate classification results.
[0111] The target output module 205 is used to construct a classification knowledge graph based on the intermediate classification results, and to iteratively update the classification knowledge graph using a graph reinforcement learning algorithm to obtain the target file classification results.
[0112] It is understood that the above system embodiments correspond to the method embodiments of the present invention, and can realize the machine learning-based unsupervised intelligent classification method for document data provided by any of the above method embodiments of the present invention.
[0113] It should be noted that the system embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0114] For ease of description and brevity, the system embodiments of the present invention include all the implementation methods described in the above embodiments of the UAV-based information recognition method, and will not be repeated here.
[0115] Based on the above embodiments of the machine learning-based unsupervised intelligent classification method for document data, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the machine learning-based unsupervised intelligent classification method for document data of any embodiment of the present invention.
[0116] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.
[0117] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0118] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0119] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the machine learning-based unsupervised intelligent classification method for file data described in any of the above-described method embodiments of the present invention.
[0120] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0121] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. An unsupervised intelligent classification method for document data based on machine learning, characterized in that, include: Obtain the dataset of files to be classified, and perform multimodal feature extraction on the dataset to be classified to obtain a feature vector set including multiple multidimensional feature vectors. Each multidimensional feature vector is obtained by concatenating and fusing text feature vectors, structural feature vectors and semantic feature vectors. A dynamic adaptive graph neural network model is constructed. The feature vector set is input into the dynamic adaptive graph neural network model, and a file feature map is generated through a dynamic node splitting and fusion mechanism. In the file feature map, each node represents a file feature cluster, and the edge weight represents the similarity between clusters. The density attractors in the file feature map are identified by adaptive bandwidth kernel density estimation as initial cluster centers. Density clustering is performed starting from the initial cluster centers to form an initial cluster set. The density reachability between clusters is calculated based on the density distribution characteristics of each cluster in the initial cluster set. Under the condition of satisfying the monotonically decreasing density constraint, an inter-cluster hierarchical relationship tree is constructed. The inter-cluster hierarchical relationship tree is dynamically pruned using a metric technique that integrates Wasserstein distance and silhouette coefficient to generate the initial classification result. The information entropy and relative entropy of each cluster in the initial classification result are calculated and weighted and fused to obtain the purity score of each cluster. Clusters with purity scores less than or equal to a preset threshold are identified as clusters to be optimized. The maximum variance axis in the feature space of the clusters to be optimized is determined by principal component analysis, and a second split is performed along the maximum variance axis to obtain intermediate classification results. A classification knowledge graph is constructed based on the intermediate classification results, and the classification knowledge graph is iteratively updated using a graph reinforcement learning algorithm to obtain the classification results of the target file. The step of iteratively updating the classification knowledge graph using a graph reinforcement learning algorithm to obtain the target file classification result is as follows: A reinforcement learning environment is constructed, with the topological structure feature vector of the classification knowledge graph as the state space, and the operations of adding nodes, deleting nodes, adding edges, deleting edges, and adjusting edge weights as the action space. In each iteration, a strategy is generated based on the current state space and the current graph editing sequence determined by the policy gradient algorithm. Monte Carlo tree search is then used to determine and execute the current graph editing operation sequence. The composite reward value is calculated based on the result after execution according to the composite reward function, which is a reward function that is a weighted fusion of the classification accuracy improvement, the change in map sparsity, and the structural consistency preservation. The current graph editing sequence generation strategy is updated according to the composite reward value until the composite reward value converges or reaches a preset number of iterations. Then, the target graph editing sequence generation strategy is obtained. The target graph editing operation sequence is determined according to the target graph editing sequence generation strategy to reconstruct the classification knowledge graph and obtain the target file classification result.
2. The machine learning-based unsupervised intelligent classification method for document data as described in claim 1, characterized in that, The step of identifying density attractors in the file feature map as initial cluster centers through adaptive bandwidth kernel density estimation is specifically as follows: A K-nearest neighbor adaptive bandwidth strategy is adopted for each feature vector in the file feature map, and the bandwidth of each feature vector is set as the Euclidean distance between the feature vector and the Kth nearest neighbor feature vector. The kernel density distribution function of the feature space is calculated based on the bandwidth of each feature vector, and the local maxima of the kernel density distribution function are used as initial density attractors. When the distance between two initial density attractors is less than a preset minimum distance threshold, the initial density attractor with the higher density value is retained as the initial cluster center to achieve deduplication of the initial density attractors.
3. The machine learning-based unsupervised intelligent classification method for document data as described in claim 1, characterized in that, The calculation of inter-cluster density reachability based on the density distribution characteristics of each cluster in the initial cluster set specifically involves: Calculate the core density and edge density of each cluster in the initial cluster set, wherein the core density is the average of the kernel density estimates of all feature vectors in the cluster, the edge density is the minimum of the kernel density estimates of multiple edge feature vectors in the cluster, and the edge feature vector is the feature vector in the cluster whose distance from the cluster center is greater than a preset threshold. Based on the preset density reachability rule, for any first cluster and second cluster in the initial cluster set, if the core density of the first cluster is less than the edge density of the second cluster, and there exists a continuous feature vector path from the second cluster to the first cluster, and the kernel density of all feature vectors on the continuous feature vector path is greater than or equal to the core density of the first cluster, then it is determined that the density of the first cluster is reachable from the second cluster, and a directed edge from the second cluster to the first cluster is generated to construct a directed graph of inter-cluster density association.
4. The machine learning-based unsupervised intelligent classification method for document data as described in claim 3, characterized in that, The construction of the inter-cluster hierarchical relationship tree with monotonically decreasing density constraints specifically includes: Using all clusters of the inter-cluster density association directed graph as leaf nodes, traverse the inter-cluster density association directed graph and map the directed edges from the second cluster to the first cluster in the inter-cluster density association directed graph to the candidate parent node relationship where the first cluster is the initial parent node of the second cluster. In each iteration, based on the current candidate parent node relationship, the feature distribution similarity between all adjacent cluster pairs is calculated, and based on the preset density decay coefficient, it is checked whether the kernel density of the initial parent node satisfies the density constraint condition. Cluster pairs that satisfy the density constraint and have the highest feature distribution similarity are merged to generate the current parent node and the initial hierarchical relationship tree. The current density decay record table is determined according to the initial hierarchical relationship tree to record the density ratio relationship between parent nodes and child nodes in the initial hierarchical relationship tree, wherein the current parent node is the parent node of the initial parent node. The depth and balance factor of each branch in the initial hierarchical relationship tree are monitored in real time. When the depth of a branch exceeds a preset depth value or the balance factor is lower than a preset balance value, the branch is reorganized based on the current density decay record table to obtain the reorganized hierarchical relationship tree. The nodes in the recombined hierarchical relationship tree that do not meet the density monotonically decreasing constraint are detected and marked, and the local tree structure is reconstructed to obtain the current hierarchical relationship tree. The iteration stops when all nodes in the current hierarchical relationship tree are merged and all meet the density constraint, and the inter-cluster hierarchical relationship tree that meets the density monotonically decreasing constraint is obtained.
5. The machine learning-based unsupervised intelligent classification method for document data as described in claim 4, characterized in that, The method of dynamically pruning the inter-cluster hierarchical relationship tree using a metric technique that integrates Wasserstein distance and silhouette coefficients is as follows: In each iteration, for any two adjacent parent and child clusters in the current hierarchical relationship tree, the Wasserstein distance and the average contour coefficient of the child clusters are calculated. The Wasserstein distance and the average contour coefficient are weighted and fused to obtain a pruning score. Child clusters with pruning scores lower than the pruning threshold are merged into the parent cluster. The pruning threshold is dynamically adjusted based on the total depth of the current hierarchical relationship tree.
6. The unsupervised intelligent classification method for document data based on machine learning as described in claim 1, characterized in that, The multimodal feature extraction of the dataset of files to be classified specifically involves: The importance weights of keywords in each file of the dataset to be classified are calculated using the TF-IDF algorithm to obtain keyword weight features. The keywords of each file are mapped to context embedding vectors representing semantic associations using the Word2Vec model. The keyword weight features and context embedding vectors are concatenated to obtain text feature vectors. The file format of each file is parsed, and various structural features in the file format are extracted and standardized to obtain a structural feature vector. The structural features include the number of paragraphs, heading levels, the proportion of tables or images, and header and footer metadata. The semantic feature vector is obtained by encoding the content of each file through a pre-trained BERT model. The text feature vector, structural feature vector, and semantic feature vector are weighted and fused using an attention mechanism to obtain the feature vector set.
7. The machine learning-based unsupervised intelligent classification method for document data as described in claim 1, characterized in that, The information entropy and relative entropy of each cluster in the initial classification results are calculated and weighted and fused to obtain the purity score of each cluster, specifically as follows: The Euclidean distance is calculated for the multidimensional feature vector of each cluster in the initial classification result to obtain the average Euclidean distance, and the average Euclidean distance is used as the intra-cluster feature dispersion. The dispersion threshold is determined based on the feature dispersion of all clusters, and the information entropy weight and relative entropy weight of each cluster are determined according to the feature dispersion of each cluster and the dispersion threshold. The purity score of each cluster is obtained by weighting and summing the information entropy and the relative entropy according to the information entropy weight and the relative entropy weight, respectively.
8. The machine learning-based unsupervised intelligent classification method for document data as described in claim 1, characterized in that, The process of performing a secondary split along the maximum variance axis to obtain intermediate classification results is as follows: During the iterative optimization process of the cluster to be optimized, the projected eigenvalues of the samples of the cluster to be optimized on the maximum variance axis are statistically analyzed to generate an eigenvalue distribution histogram. In the eigenvalue distribution histogram, if the eigenvalues exhibit a unimodal distribution, the weighted average of the distribution mean and median is used as the splitting threshold; if they exhibit a bimodal distribution, the valley point between the two peaks is used as the splitting threshold. Samples with feature values greater than the splitting threshold in the cluster to be optimized are divided into the first sub-cluster, and samples with feature values less than or equal to the splitting threshold are divided into the second sub-cluster; The purity scores of the first sub-cluster and the second sub-cluster are calculated respectively. For the sub-clusters with purity scores less than or equal to the preset threshold, iterative splitting is performed until the purity scores of all sub-clusters are greater than the preset threshold or the maximum number of splits is reached. Then the splitting is stopped, and the intermediate classification result is obtained.
9. An unsupervised intelligent classification system for document data based on machine learning, characterized in that, include: The module consists of an extraction module, a feature module, an initial classification module, an intermediate optimization module, and a target output module. The extraction module is used to acquire a dataset of files to be classified, perform multimodal feature extraction on the dataset of files to be classified, and obtain a set of feature vectors including multiple multidimensional feature vectors, wherein each multidimensional feature vector is obtained by concatenating and fusing text feature vectors, structural feature vectors and semantic feature vectors; The feature module is used to construct a dynamic adaptive graph neural network model. The feature vector set is input into the dynamic adaptive graph neural network model, and a file feature map is generated through a dynamic node splitting and fusion mechanism. In the file feature map, each node represents a file feature cluster, and the edge weight represents the similarity between clusters. The initial classification module is used to identify density attractors in the file feature map as initial cluster centers through adaptive bandwidth kernel density estimation, perform density clustering starting from the initial cluster centers to form an initial cluster set, calculate the density reachability between clusters based on the density distribution characteristics of each cluster in the initial cluster set, construct an inter-cluster hierarchical relationship tree under the condition of satisfying the density monotonically decreasing constraint, and use a metric technique that integrates Wasserstein distance and silhouette coefficient to dynamically prune the inter-cluster hierarchical relationship tree to generate the initial classification result. The intermediate optimization module is used to calculate the information entropy and relative entropy of each cluster in the initial classification result and perform weighted fusion to obtain the purity score of each cluster. Clusters with purity scores less than or equal to a preset threshold are identified as clusters to be optimized. The maximum variance axis in the feature space of the clusters to be optimized is determined by principal component analysis, and a secondary split is performed along the maximum variance axis to obtain intermediate classification results. The target output module is used to construct a classification knowledge graph based on the intermediate classification results, and to iteratively update the classification knowledge graph using a graph reinforcement learning algorithm to obtain the target file classification results. The step of iteratively updating the classification knowledge graph using a graph reinforcement learning algorithm to obtain the target file classification result is as follows: A reinforcement learning environment is constructed, with the topological structure feature vector of the classification knowledge graph as the state space, and the operations of adding nodes, deleting nodes, adding edges, deleting edges, and adjusting edge weights as the action space. In each iteration, a strategy is generated based on the current state space and the current graph editing sequence determined by the policy gradient algorithm. Monte Carlo tree search is then used to determine and execute the current graph editing operation sequence. The composite reward value is calculated based on the result after execution according to the composite reward function, which is a reward function that is a weighted fusion of the classification accuracy improvement, the change in map sparsity, and the structural consistency preservation. The current graph editing sequence generation strategy is updated according to the composite reward value until the composite reward value converges or reaches a preset number of iterations. Then, the target graph editing sequence generation strategy is obtained. The target graph editing operation sequence is determined according to the target graph editing sequence generation strategy to reconstruct the classification knowledge graph and obtain the target file classification result.
Citation Information
Patent Citations
Method, device and system for classifying network traffic data of data center
CN120710940A
Orthogonal partitioning clustering
US20030212702A1