File content semantic clustering method based on graph neural network
By constructing a semantic graph structure and applying graph neural networks, the shortcomings of semantic understanding and structural relationships in archival data management are addressed, achieving high-precision unsupervised semantic clustering and improving the automation and intelligence level of archival management.
Patent Information
- Application Number
- CN202511555489.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-01-30
AI Technical Summary
Existing technologies for archival data management suffer from limited semantic understanding capabilities, neglect of structural relationships between documents, and insufficient cross-layer information fusion, making it difficult to balance semantic accuracy and structural balance in clustering results.
A graph neural network-based approach is adopted to construct a semantic graph structure. Through harmonic segmentation, double-layer feature map coarsening, and cross-layer consistency constraints, unsupervised semantic clustering of archive content is achieved, integrating text semantic representation, graph structure modeling, and deep embedding techniques.
It improves the accuracy and structural adaptability of archival content clustering, realizes the effective integration of hierarchical feature processing and multi-scale semantic information, and enhances the accuracy and stability of clustering results.
Smart Images

Figure CN121434813A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information management, and in particular to an archive content semantic clustering method based on a graph neural network. BACKGROUND
[0002] With the continuous digitization of archive information management, governments, enterprises and research institutions have accumulated a large amount of archive texts with diverse structures and complex contents. How to effectively mine the semantic associations between archives and realize automatic content clustering has become an important issue in the field of intelligent archive management. The introduction of semantic clustering technology provides a new direction for archive classification, retrieval and knowledge discovery.
[0003] In the prior art, typical methods are mostly based on static word embedding, traditional similarity measurement and shallow clustering algorithms to process archive content. These methods can reflect the semantic relevance between archives to some extent, but in the context of the growing size and complexity of archive data, there are still the following shortcomings: limited semantic understanding: traditional methods usually use bag-of-words model or static word vectors, which are difficult to fully capture the contextual semantic information of words, resulting in insufficient expression of deep semantic of text. Ignoring the structural relationship between documents: existing solutions often treat archives as isolated texts and fail to consider their citation relationships or structural connections, thus missing potential knowledge associations between archives. Insufficient depth of graph structure application: although some studies introduce graph structure to model text relationships, the integrated design of graph partitioning, graph embedding and semantic expression is still weak, lacking hierarchical feature processing mechanism. Insufficient cross-layer information fusion: most clustering methods only analyze in a single semantic representation space, failing to effectively fuse multi-scale semantic information, and the clustering results are difficult to balance semantic accuracy and structural balance.
[0004] Therefore, how to provide an archive content semantic clustering method based on a graph neural network is a problem that needs to be solved by those skilled in the art. SUMMARY
[0005] An object of the present application is to provide an archive content semantic clustering method based on a graph neural network, which fully integrates text semantic representation, graph structure modeling and deep embedding technology, constructs a semantic graph structure and extracts node semantic features through graph partitioning, graph coarsening and multi-scale graph neural network, and finally realizes unsupervised semantic clustering of archive content, with the advantages of strong semantic understanding, high clustering precision and good structure adaptability.
[0006] According to an archive content semantic clustering method based on a graph neural network according to an embodiment of the present application, the following steps are included: S1, performing word segmentation, denoising and vectorization processing on the archive text to generate an archive text feature vector set; S2, calculate semantic similarity based on the archive text feature vector set, and construct a semantic graph structure model combined with the reference relationship, wherein the node represents the archive text, and the edge weight is the combined value of the semantic similarity value and the reference weight; S3, perform a harmonic cut graph partition method on the semantic graph structure model to generate a graph partition identifier with balanced structure; S4, apply a feature graph coarsening algorithm to the node set corresponding to the graph partition identifier, perform two-level node merging according to the joint score of structural connectivity and feature similarity, and output a first-level graph coarsening result and a second-level graph coarsening result; S5, input the semantic graph structure model, the first-level graph coarsening result and the second-level graph coarsening result into a graph neural network embedding model to calculate node semantic embedding vectors respectively; S6, apply cross-layer consistency constraints to the node semantic embedding vectors and fuse them to generate a set of unified archive text semantic embedding vectors; S7, input the set of unified archive text semantic embedding vectors into an unsupervised clustering model to output the semantic clustering class number of each archive text.
[0007] The application proposes a set of archive content semantic clustering method based on a graph neural network, and constructs a whole process processing mechanism from text preprocessing, semantic graph building, structure partitioning, graph coarsening, graph embedding, embedding fusion to unsupervised clustering, which effectively solves the problems of insufficient structure expression, poor semantic consistency and low clustering precision in existing archive semantic modeling. The method introduces a harmonic cut partition strategy on the semantic graph to realize balanced semantic partitioning; through a double-layer feature graph coarsening algorithm, the node structure connectivity and feature similarity are combined to realize hierarchical dimension reduction expression, and a mapping matrix is constructed to support multi-scale alignment; then, a cross-layer consistency constraint mechanism is introduced to realize feature fusion and difference correction of the graph embedding result, and finally high-precision clustering is completed in a unified embedding space. The method has the advantages of clear hierarchical structure, stable semantic aggregation and high clustering precision, and is suitable for large-scale archive management, semantic retrieval and intelligent archiving scenes.
[0008] Optionally, the S1 specifically comprises: S11, perform a word segmentation processing based on the combination of bidirectional maximum matching and part-of-speech tagging rules on the archive text to generate a word sequence arranged according to the syntactic structure; S12, according to the set stop word table, punctuation filtering rules and word length threshold, remove the noise from the word sequence, delete the words without semantic expression ability, and output the valid word sequence; S13, input the effective word sequence into a static word embedding model or a context coding model, wherein the static word embedding model is a Word2Vec model adopting a Skip-gram training mechanism, and the context coding model is a BERT-base model with a multi-layer Transformer structure; S14, for each word, a fixed-dimension word vector trained in the Word2Vec model or a context-related vector obtained by input embedding and self-attention layer in the BERT-base model is extracted respectively; S15, all word vectors in the archive text are combined in sequence, and a position weighted average method is used to calculate the feature representation vector of the archive text; S16, the feature representation vectors corresponding to all archive texts form an archive text feature vector set.
[0009] By performing semantic segmentation processing combined with bidirectional maximum matching and part-of-speech tagging rules on the archive text, and introducing a set of stop words, punctuation filtering rules and length threshold to remove multi-dimensional noise, the application realizes high-quality semantic word extraction, and significantly improves the effectiveness of downstream feature modeling. In the feature vector construction process, two types of embedding models, Word2Vec and BERT-base, are introduced to model the static and context representation of the word, which improves the semantic expression ability of the vector. And through the position weighted average strategy, the word vector is integrated to construct a globally comparable archive text representation vector. The finally formed feature vector set has context dependence and grammar sensitivity, which lays a precision foundation for subsequent semantic graph modeling and graph neural network processing, and has a significant effect on improving the representation and discrimination ability and robustness.
[0010] Optionally, the S2 specifically comprises: S21, for each pair of archive texts in the archive text feature vector set, a semantic similarity value is calculated based on the angle distance between the embedding vectors to form a semantic similarity matrix, and each element in the matrix corresponds to the semantic association degree between the two archive texts; S22, for each archive text, perform structured analysis on the body area, extract the reference number or unique identification string contained in the end-of-text reference field, page lower note field and embedded reference format segment, and construct a reference candidate set of the current archive text; S23, for each reference candidate, align it with the unique identification field of the remaining archives in the archive database through the field alignment rule, if the string similarity score exceeds the set threshold, mark it as an effective reference relationship, and assign 1 to the corresponding position in the reference relationship matrix, and assign 0 to the rest; S24, set a weighting parameter, linearly fuse the semantic similarity matrix and the citation relationship matrix to generate an edge weight matrix, and the edge weight value is equal to the weighted combination of the semantic similarity value and the citation identification value; S25, taking each archive text as a node in a graph structure, establishing the edge connection between nodes according to whether the edge weight value in the edge weight matrix exceeds the connection judgment threshold, constructing a semantic graph structure model, and outputting a node set, an edge set and an edge weight set.
[0011] The application constructs a semantic similarity matrix through the angle distance between semantic vectors, extracts reference fields, page footnotes and embedded citations in combination with text structure analysis, accurately identifies effective citation relationships, and constructs a citation relationship matrix. The two types of matrices are fused according to the set weighting to form an edge weight matrix, so that the edge weight reflects both semantic association and structural citation relationship. Based on the edge weight matrix, edges higher than the threshold are selected to establish graph connections, and a semantic graph structure model is constructed. This process realizes dual association modeling of semantics and citations, provides a high-quality graph structure basis for subsequent graph partitioning, graph coarsening and semantic clustering, and effectively improves clustering accuracy and semantic consistency.
[0012] Optionally, the S3 specifically comprises: S31, constructing an edge weight matrix corresponding to the semantic graph structure model , wherein the matrix element represents the weighted combination of the semantic similarity and the citation weight between the i-th archive text and the j-th archive text, and a degree matrix is constructed. , wherein the element represents the sum of all connection edge weights of the i-th node. S32, calculating a symmetric normalized Laplacian matrix . , wherein , the unit matrix is represented by I, , and the inverse square root of the degree matrix is represented by D-1 / 2. S33, setting the number of graph partitioning clusters . , performing eigenvalue decomposition on the Laplacian matrix , extracting continuous characteristic vectors from the second smallest eigenvalue, and splicing to form a feature matrix , wherein the i-th row represents the spectral embedding representation vector of the i-th node. S34, inputting each row in the feature matrix into a clustering algorithm based on Euclidean distance, performing node clustering, and outputting an initial graph partitioning label set, wherein each element in the label set is an initial cluster number of the corresponding node. S35, for each initial cluster number corresponding node set, construct graph partition cluster node set , calculate node harmonic mean : ; wherein, indicates the number of nodes in the graph partition cluster, and is the spectral representation vector of the corresponding node; S36, set the structure balance tolerance ratio , calculate the deviation between the number of nodes of each graph partition cluster and the target number , judge whether it meets , if there is a graph partition cluster that does not meet the condition, the following operations are performed on the graph partition cluster: S361, calculate the total sum of connection edge weights between all nodes and the remaining clusters, and extract the node with the maximum connection strength as the candidate boundary node; S362, for each candidate boundary node, calculate the change of node harmonic mean after migration to all remaining graph partition clusters; S363, select the migration path that can significantly reduce the average node harmonic mean and improve the balance of the number of nodes, and adjust the boundary node to the optimal graph partition cluster; S364, generate an updated graph partition label set, and re-label the cluster number of all nodes; S37, re-execute the construction of the graph partition cluster node set, the calculation of the node harmonic mean and the judgment of the structure balance deviation, and repeatedly loop the boundary node migration and the label set updating operation until all graph partition clusters meet the following conditions simultaneously: the number of nodes of all node sets meets the structure balance tolerance condition; the change amplitude of all node harmonic means is less than the convergence threshold ; S38, output the final graph partition label set that meets the condition as the graph partition identifier set, and each label element in the graph partition identifier set corresponds to an archive text node one by one.
[0013] The application constructs a graph structure based on semantic and reference weighted edge weight, calculates a symmetric normalized Laplacian matrix and performs spectral embedding, realizes initial graph partition by using eigenvalue decomposition and Euclidean distance clustering algorithm, further introduces node harmonic mean index to measure structure compactness, dynamically adjusts the ownership of boundary nodes through structure balance correction mechanism, and continuously optimizes the partition result. The method effectively improves the structure balance and semantic aggregation of graph partition, provides a more stable clustering structure basis for subsequent graph coarsening and embedding learning, and enhances the overall clustering accuracy.
[0014] Optionally, the S4 specifically comprises: S41, for each graph partition cluster in the graph partition identification set, extract the subgraph structure of each graph partition cluster, and construct a node feature matrix wherein is the number of subgraph nodes, is the semantic representation dimension, the first row represents the feature vector of the first node; meanwhile, an initial edge weight matrix is constructed wherein element represents the edge weight between the first node and the first node; S42, calculate the first layer node pair scoring function The scoring function is composed of structural connectivity and cosine similarity of feature vectors: ; wherein, is the adjustment weight coefficient; S43, sort all scoring results from high to low according to the value, and determine the node merging pair by using a non-overlapping screening strategy. The non-overlapping screening strategy is: traversing the sorted node pair set, for each node pair , if node and node do not appear in the selected set, then is included in the merging set, after the merging operation, a coarsened node is constructed, the feature vector of which is set as , an updated edge weight matrix is constructed, and a mapping matrix is generated; S44, based on the first layer coarsening result, a second layer coarsening mechanism is constructed, and a non-overlapping micro-cluster construction strategy with a fixed node number upper limit of 3 is adopted: S441, calculate the common neighbor rate of any node pair in the coarsened graph: ; wherein, represents the neighbor node set of node ; S442, calculate the feature mean deviation scoring function: ; wherein, , is the balance coefficient; S443、According to the score value, sequentially attempt to combine the node pairs or node triplets with high scores into micro-cluster sets, with the following requirements: the number of nodes in any micro-cluster does not exceed 3, there are no overlapping nodes between micro-clusters, and the score value between all nodes in a micro-cluster is greater than a set threshold value, which allows merging, and finally output each micro-cluster in the micro-cluster set as a second layer coarse node; S444、The feature vector of each micro-cluster is represented by the mean value of the internal node features, and a second layer coarse feature matrix is generated , a coarse edge weight matrix is constructed , wherein is the number of micro-clusters; S45、A second layer mapping matrix is constructed , indicating the merging relationship of the first layer coarse nodes to the second layer coarse nodes; S46、Output the first layer graph coarse result , the second layer graph coarse result , the first layer mapping matrix , the second layer mapping matrix .
[0015] The application introduces a two-level feature graph coarse mechanism, clearly takes the node structure connection degree and semantic feature similarity as the joint score basis, first adopts a non-overlapping screening strategy for one-to-one node merging, and then performs micro-cluster combination of no more than three nodes based on the public neighbor rate and feature mean value deviation, to realize the layer-by-layer compression and semantic reservation of the graph division cluster structure. By constructing a multi-layer mapping relationship, the alignment mapping consistency between the original nodes and the coarse nodes is ensured, effectively supporting subsequent cross-scale semantic modeling and graph embedding operations, and providing a structural basis and multi-scale semantic expression capability for enhancing clustering stability and semantic consistency.
[0016] Optionally, the S5 specifically comprises: S51、The semantic graph structure model, the first layer graph coarse result and the second layer graph coarse result are respectively constructed into three groups of input graph structures, each group of graph structures includes a node feature matrix and an edge weight matrix, and is respectively denoted as an original graph, a first layer coarse graph and a second layer coarse graph, each node in the graph corresponds to a semantic feature vector, and the edge represents a semantic or structural association relationship; S52、For each group of graph structures, a graph neural network embedding model is input, the graph neural network embedding model includes a graph convolution operation and a nonlinear activation operation; the graph convolution operation calculates the embedding representation of the current node according to the feature information and edge weight information of the adjacent nodes of each node; the nonlinear activation operation performs nonlinear transformation on the convolution result, which is used to enhance the model expression ability; each group of graph structures respectively outputs the graph embedding representation of the nodes, which is denoted as an original graph embedding result, a first layer coarse graph embedding result and a second layer coarse graph embedding result; S53, using the first layer mapping matrix and the second layer mapping matrix, mapping the embedding results of the first layer coarsening graph and the second layer coarsening graph back to the space of the original node set, wherein each row of the mapping matrix represents a set of original node numbers corresponding to a coarsening node, and the coarsening graph node embedding result is assigned or propagated to the corresponding original node position according to the mapping relationship, to construct the aligned first layer and second layer embedding matrix; S54, fusing the original graph embedding result, the first layer embedding mapping result and the second layer embedding mapping result, and adopting a weighted average strategy as the fusion manner, wherein each set of embedding results is multiplied by a set weight coefficient, and the sum of all coefficients is 1;After weighting, the results are added row by row in the node dimension to obtain the final unified semantic embedding vector of each original node. S55, outputting a set of unified semantic embedding vectors, each row of the vector set corresponding to the semantic representation result of an original archive text node.
[0017] The application introduces a graph neural network model to calculate node embedding representation based on the three-scale semantic structures of the original graph, the first layer coarsening graph and the second layer coarsening graph, and combines mapping matrices to uniformly map the embedding results at different scales back to the original node space. By performing a weighted fusion strategy on the embedding representations at the three scales, the depth integration and semantic enhancement of cross-scale graph semantics are realized, which effectively improves the completeness and robustness of the embedding representation and provides a unified and rich semantic vector expression for subsequent clustering analysis.
[0018] Optionally, the S6 specifically comprises: S61, obtaining, from the graph neural network embedding model, a node embedding vector set of the original semantic graph structure model, an embedding vector set of the first layer graph coarsening result restored to the original node space through a mapping matrix, and an embedding vector set of the second layer graph coarsening result restored to the original node space through a two-level mapping matrix, the three sets of embedding vectors being arranged according to the original node number; S62, calculating the difference measurement value between the semantic embedding vectors of each original archive text node in the original graph, the first layer coarsening graph and the second layer coarsening Figure Three graph, the difference measurement value being the Euclidean distance or Manhattan distance between the three sets of vectors, and the larger the value, the more significant the cross-layer difference; S63, setting a consistency tolerance threshold, when the embedding vector difference measurement values between the two levels are all less than the consistency tolerance threshold, marking the node as a consistency satisfaction node;Otherwise, mark it as a consistency deficiency node. S64, for the consistency satisfying node, assigning fusion weights of the original graph, the first layer rough graph and the second layer rough graph embedding vectors, the sum of the three groups of weights is 1; multiplying and adding each dimension element in the three groups of embedding vectors with the corresponding weight respectively, and outputting the fusion semantic embedding representation of the node; S65, for the consistency insufficient node, using the node embedding vector in the original semantic graph structure model as the final semantic representation, and skipping the cross-layer fusion calculation process; S66, arranging the semantic embedding vectors of all nodes after fusion or reservation according to the original node number order, and outputting a unified semantic embedding vector set.
[0019] The application constructs the node embedding vector set of the original graph and the multi-layer rough graph, measures the consistency between different levels of semantic representations based on the Euclidean or Manhattan distance, introduces a consistency judgment mechanism to distinguish stable nodes and fluctuant nodes, implements weighted fusion processing for the consistency satisfying node, and keeps the original semantic representation of the consistency insufficient node, so that the effective integration of cross-layer semantic information is realized while the stability of the representation is ensured, and finally a unified semantic embedding vector set with consistent structure and enhanced semantics is generated, and the expression quality of the clustering input is improved.
[0020] Optionally, the S7 specifically comprises: S71, reading the unified semantic embedding vector set, denoted as matrix , the number of rows of the matrix is equal to the number of archive texts, the number of columns is equal to the embedding dimension, and each row vector represents the semantic representation of an archive text; S72, determining the type of the unsupervised clustering model, selecting a clustering algorithm based on the updating of the centroid; setting control parameters including: the number of clusters , the maximum number of iterations , the center convergence threshold and the distance measurement method, and the Euclidean distance between vectors is used for distance measurement; S73, in the initial stage, using a random uniform sampling strategy to select vectors from the matrix as cluster centers, and initializing the iteration counter to zero; calculating the distance of each vector to all centers, and assigning it to the cluster corresponding to the center with the smallest distance, to complete the first round of clustering label initialization; S74, entering the iteration stage, and performing the following two steps in each iteration: Step one: recalculating the centroid of each cluster, calculating the arithmetic mean of all vectors in the cluster in the same dimension, and updating to obtain a new cluster center vector; Step two: recalculating the distance of all vectors in the matrix to the updated center vector, reassigning the cluster number according to the minimum distance principle, and recording the Euclidean distance change amount of the cluster center between two adjacent rounds; S75, increase the iteration counter, judge the termination condition: if the counter reaches the set maximum iteration number, or the change of all cluster centers in two adjacent rounds is not more than the convergence threshold, then end the iteration; otherwise, return to the iteration stage and continue to execute; S76, output the clustering result list, the length of the list is equal to the number of rows of the matrix , and each list element is the clustering category number of the corresponding archive text; meanwhile, output the final cluster center set; S77, map the clustering result list with the archive text number one by one to form a mapping relationship table, which is used for subsequent evaluation, display or storage.
[0021] In the clustering stage, the unsupervised clustering method based on centroid updating is adopted, the uniform semantic embedding vector set is input, and reasonable control parameters are set to complete the initial cluster center selection, sample distribution and center iteration update process, and the automatic termination of the clustering process is realized by combining the cluster center change amount monitoring, ensuring the clustering quality and calculation efficiency. The clustering result is annotated in the form of category number for each archive text, and a mapping relationship table is generated, which provides stable support for downstream semantic management, structured display and auxiliary retrieval, and improves the automation and intelligence level of archive content organization.
[0022] The beneficial effects of the present application are: Unlike the scheme in the prior art that only uses shallow text representation or simple graph structure for semantic modeling, the present application innovatively constructs the fusion edge weight graph structure by combining the citation relationship between texts and semantic features, introduces the structure balance constraint and the node harmonic mean minimization objective based on the harmonic cut graph partition method, and obtains a semantic subgraph with stronger semantic coupling and more explicit partition boundary. Through the structured use of the spectral domain features of the Laplacian matrix, the stability of the semantic graph partition and the discriminability of the node clustering are improved.
[0023] The present application designs a multi-level feature graph coarsening mechanism based on graph partition clustering, proposes a node pair screening function that fuses the structure connection degree and the semantic similarity score, and introduces an asymmetric micro-cluster merging strategy based on the common neighbor rate and the semantic mean difference in the second layer, which improves the graph structure fidelity and semantic representation integrity of the coarsened expression, effectively reduces the redundant nodes, and improves the graph embedding efficiency and expression resolution.
[0024] The present application realizes cross-layer mapping alignment and information reconstruction in the graph neural network by constructing a multi-scale semantic graph embedding structure and jointly using the multi-view expression ability of the original graph and the two-level coarsened graph. At the same time, combined with the node-level consistency constraint strategy, the structural and semantic deviation between the multi-layer semantic representations is controlled in the embedding fusion stage, which significantly enhances the discriminability and semantic consistency of the final embedding vector. BRIEF DESCRIPTION OF DRAWINGS
[0025] The accompanying drawings are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and are meant to explain the present application but are not intended to limit the application. In the drawings:
[0026] Figure 1 A flow chart of an archive content semantic clustering method based on a graph neural network proposed in the present application; Figure 2 A processing structure diagram of a harmonic cut graph partitioning method proposed in the present application; Figure 3 A two-layer coarsening structure diagram of a feature map coarsening algorithm proposed in the present application. DETAILED DESCRIPTION
[0027] The present application will now be further described in detail with reference to the drawings. These drawings are simplified schematic diagrams and only schematically illustrate the basic structure of the present application, and thus only show the components related to the present application.
[0028] REFERENCE Figures 1-3 A semantic clustering method for archive content based on a graph neural network includes the following steps: S1, performing word segmentation, denoising and vectorization processing on the archive text to generate an archive text feature vector set; S2, calculating semantic similarity based on the archive text feature vector set, and constructing a semantic graph structure model in combination with the citation relationship, wherein the node represents the archive text, and the edge weight is the combined value of the semantic similarity value and the citation weight; S3, performing a harmonic cut graph partitioning method on the semantic graph structure model to generate a graph partitioning identifier with balanced structure; S4, applying a feature map coarsening algorithm to the node set corresponding to the graph partitioning identifier, performing two-level node merging according to the joint score of the structural connection degree and the feature similarity, and outputting the first layer graph coarsening result and the second layer graph coarsening result; S5, inputting the semantic graph structure model, the first layer graph coarsening result and the second layer graph coarsening result into a graph neural network embedding model to calculate the node semantic embedding vector respectively; S6, applying cross-layer consistency constraints to the node semantic embedding vector and fusing to generate a unified semantic embedding vector set of the archive text; S7, inputting the unified semantic embedding vector set of the archive text into an unsupervised clustering model to output the semantic clustering class number of each archive text.
[0029] In the present embodiment, the S1 specifically includes: S11, performing word segmentation processing based on the combination of bidirectional maximum matching and part-of-speech tagging rules on the archive text to generate a word sequence arranged according to the syntactic structure; S12, according to the set of stop words, punctuation filtering rules and word length threshold, the word sequence is removed, the word which does not have semantic expression ability is deleted, and the valid word sequence is output; S13, the valid word sequence is input into a static word embedding model or a context coding model, wherein the static word embedding model is a Word2Vec model using Skip-gram training mechanism, and the context coding model is a BERT-base model with multi-layer Transformer structure; S14, for each word, the fixed dimension word vector trained in the Word2Vec model or the context related vector obtained by input embedding and self-attention layer in the BERT-base model is extracted respectively; S15, all word vectors in the archive text are combined in order, and the feature representation vector of the archive text is calculated by using position weighted average method; S16, the feature representation vectors corresponding to all archive texts form an archive text feature vector set.
[0030] In the embodiment, S2 specifically comprises: S21, for each pair of archive texts in the archive text feature vector set, the semantic similarity value is calculated based on the angle distance between the embedding vectors, the semantic similarity matrix is formed, and each element in the matrix corresponds to the semantic correlation degree between the two archive texts; S22, the text area structure analysis is performed on each archive text, the reference number or unique identification string contained in the end reference field, page lower note field and embedded reference format segment is extracted, and the reference candidate set of the current archive text is constructed; S23, for each reference candidate, the unique identification field of the remaining archives in the archive text database is compared with the field alignment rule, if the string similarity score exceeds the set threshold, it is marked as an effective reference relationship, and the corresponding position in the reference relationship matrix is assigned as 1, and the rest is assigned as 0; S24, set the weighting parameter, linearly fuse the semantic similarity matrix and the reference relationship matrix, generate the edge weight matrix, and the edge weight value is equal to the weighted combination of the semantic similarity value and the reference identification value; S25, taking each archive text as a node in the graph structure, establishing the edge connection between the nodes according to whether the edge weight value in the edge weight matrix exceeds the connection judgment threshold, constructing the semantic graph structure model, and outputting the node set, the edge set and the edge weight set.
[0031] In the embodiment, S3 specifically comprises: S31, constructing the edge weight matrix corresponding to the semantic graph structure model , wherein the matrix element represents the semantic similarity value between the i-th and j-th archive texts, and the matrix element The semantic similarity between the first archive text and the second archive text and the weighted combination of the reference weight, construct a degree matrix , wherein the element represents the sum of the weights of all connected edges of the first node; S32, calculate the symmetric normalized Laplacian matrix , wherein , wherein represents the unit matrix, is the inverse square root of the degree matrix; S33, set the number of graph partition clusters , perform eigenvalue decomposition on the Laplacian matrix , extract the first characteristic vectors from the second smallest eigenvalue, and concatenate them in column to form a feature matrix , wherein the first row represents the spectral embedding representation vector of the first node; S34, input each row in the feature matrix into a clustering algorithm based on Euclidean distance, perform node clustering, and output an initial graph partition label set, wherein each element in the label set is the initial cluster number of the corresponding node; S35, for each node set corresponding to an initial cluster number, construct a graph partition cluster node set , calculate the node harmonic mean : ; , wherein represents the number of nodes in the graph partition cluster, and is the spectral representation vector of the corresponding node; S36, set the structure balance tolerance ratio , calculate the deviation between the number of nodes in each graph partition cluster and the target number , and determine whether it meets , if there is a graph partition cluster that does not meet the condition, perform the following operations on the graph partition cluster: S361, calculate the total sum of the connection edge weights between all nodes and the remaining clusters, and extract the node with the strongest connection strength as the candidate boundary node; S362, for each candidate boundary node, calculate the change in node harmonic mean after migrating to all remaining graph partition clusters; S363, select the migration path that can significantly reduce the average node harmonic mean and improve the balance of the number of nodes, and adjust the boundary node to the optimal graph partition cluster; S364, generate an updated graph partition label set, and relabel the cluster number of all nodes; S37, re-perform the construction of the graph partition cluster node set, the calculation of the node harmonic mean, and the judgment of the structural balance deviation, and repeatedly loop the boundary node migration and the label set updating operation until all graph partition clusters simultaneously satisfy the following conditions: the number of nodes in all node sets satisfies the structural balance tolerance condition; the change amplitude of all node harmonic means is less than the convergence threshold . S38, output the graph partition label set that finally satisfies the conditions as the graph partition identifier set, and each label element in the graph partition identifier set corresponds to one archive text node.
[0032] In this embodiment, the S4 specifically includes: S41, for each graph partition cluster in the graph partition identifier set, extract the subgraph structure of each graph partition cluster, and construct a node feature matrix , where is the number of subgraph nodes, is the semantic representation dimension, and the th row represents the feature vector of the th node; and construct an initial edge weight matrix , where the element represents the edge weight between the th node and the th node. S42, calculate the first layer node pair scoring function , which is composed of the structural connection degree and the cosine similarity of the feature vector: . wherein is an adjustment weight coefficient; S43, sort all scoring results in descending order of value, and determine the node merging pair by using a non-overlapping screening strategy, wherein the non-overlapping screening strategy is: traverse the sorted node pair set, and for each node pair , if neither node nor node appears in the selected set, then is included in the merging set, after the merging operation, a coarsened node is constructed, the feature vector of which is set to , an updated edge weight matrix is constructed, and a mapping matrix is generated. S44, based on the first layer coarsening result, construct a second layer coarsening mechanism, and adopt a non-overlapping micro-cluster construction strategy with a fixed node number upper limit of 3: S441, calculate the common neighbor rate of any node pair in the coarse graph wherein, denotes the neighbor node set of node S442, calculate the feature mean deviation score function: wherein, , is a balance coefficient; S443, sort according to the score value, and try to combine the node pairs or node triplets with high scores into a micro-cluster set in turn, with the following requirements: the number of nodes in any micro-cluster is not more than 3, there is no overlapping node between micro-clusters, and the score value between any two nodes in a micro-cluster is greater than a set threshold value, which allows merging, and finally output each micro-cluster in the micro-cluster set as a second layer coarse node; S444, the feature vector of each micro-cluster is represented by the feature mean of the internal nodes, to generate a second layer coarse feature matrix , and construct a coarse edge weight matrix , wherein is the number of micro-clusters; S45, construct a second layer mapping matrix , indicating the merging relationship of the first layer coarse nodes to the second layer coarse nodes; S46, output the first layer graph coarse result , the second layer graph coarse result , the first layer mapping matrix , and the second layer mapping matrix .
[0033] In the embodiment, the S5 specifically comprises: S51, construct three groups of input graph structures respectively from the semantic graph structure model, the first layer graph coarse result and the second layer graph coarse result, each group of graph structures comprising a node feature matrix and an edge weight matrix, and being denoted as an original graph, a first layer coarse graph and a second layer coarse graph respectively, each node in the graph corresponding to a semantic feature vector, and the edge representing a semantic or structural association relationship; S52, input a graph neural network embedding model respectively for each group of graph structures, the graph neural network embedding model comprising a graph convolution operation and a nonlinear activation operation; the graph convolution operation calculates the embedding representation of the current node according to the feature information and edge weight information of the adjacent nodes of each node; the nonlinear activation operation performs nonlinear transformation on the convolution result, for enhancing the expression ability of the model; each group of graph structures outputs the graph embedding representation of its nodes respectively, denoted as an original graph embedding result, a first layer coarse graph embedding result and a second layer coarse graph embedding result; S53. Using the first-layer mapping matrix and the second-layer mapping matrix, the embedding results of the first-layer coarsened graph and the second-layer coarsened graph are mapped back to the space of the original node set. Each row of the mapping matrix represents the set of original node numbers corresponding to a coarsened node. The embedding results of the coarsened graph nodes are assigned or propagated to the corresponding original node positions according to the mapping relationship, and the aligned first-layer and second-layer embedding matrices are constructed. S54. The original graph embedding results, the first-layer embedding mapping results and the second-layer embedding mapping results are fused. The fusion method adopts a weighted average strategy, where each set of embedding results is multiplied by a set weight coefficient, and the sum of all coefficients is 1. The weighted results are added row by row in the node dimension to obtain the final unified semantic embedding vector of each original node. S55. Output a unified semantic embedding vector set, where each row in the vector set corresponds to the semantic representation result of an original archive text node.
[0034] In this embodiment, S6 specifically includes: S61. Obtain the node embedding vector set of the original semantic graph structure model, the embedding vector set of the first layer graph coarsening result restored to the original node space by the mapping matrix, and the embedding vector set of the second layer graph coarsening result restored to the original node space by the two-level mapping matrix from the graph neural network embedding model. All three sets of embedding vector sets are arranged according to the original node number. S62. Calculate the original document text node in the original graph, the first-level coarsened graph, and the second-level coarsened graph. Figure Three The difference metric between semantic embedding vectors in each layer is the Euclidean distance or Manhattan distance between the three sets of vectors. The larger the value, the more significant the difference across layers. S63. Set a consistency tolerance threshold. When the embedding vector difference metric between two layers is less than the consistency tolerance threshold, mark this node as a consistency-satisfied node; otherwise, mark it as a consistency-insufficient node. S64. For nodes that satisfy consistency, assign fusion weights to the embedding vectors of the original graph, the first coarsened graph, and the second coarsened graph, with the sum of the three sets of weights being 1; multiply each dimension element of the three sets of embedding vectors by the corresponding weight and add them together to output the fusion semantic embedding representation of the node. S65. For nodes with insufficient consistency, the node embedding vector in the original semantic graph structure model is used as the final semantic representation, skipping the cross-layer fusion calculation process. S66. Arrange the semantic embedding vectors after merging or retaining all nodes in the order of the original node numbers, and output a unified set of semantic embedding vectors.
[0035] In this embodiment, S7 specifically includes: S71, read the uniform semantic embedding vector set, denoted as matrix , the number of matrix rows is equal to the number of archive texts, the number of columns is equal to the embedding dimension, and each row vector represents the semantic representation of an archive text; S72, determine the type of unsupervised clustering model, select the clustering algorithm based on centroid update; Set control parameters including: cluster number , maximum iteration number , center convergence threshold and distance measurement method, distance measurement uses the Euclidean distance between vectors; S73, in the initial stage, adopt random uniform sampling strategy to select vectors from matrix as cluster centers, initialize the iteration counter to zero; Calculate the distance from each vector to all centers, and assign it to the cluster corresponding to the center with the smallest distance, complete the first round of cluster label initialization; S74, enter the iteration stage, in each iteration, the following two steps are executed: Step one: Recalculate the centroid of each cluster, take the arithmetic mean of all vectors in the cluster in the same dimension to update the new cluster center vector; Step two: Recalculate the distance from all vectors in matrix to the updated center vector, reassign cluster numbers according to the minimum distance principle, and record the change in Euclidean distance between cluster centers in the adjacent two rounds; S75, increase the iteration counter, and judge the termination condition: if the counter reaches the set maximum iteration number, or the change in all cluster centers in the adjacent two rounds does not exceed the convergence threshold, then end the iteration; Otherwise, return to the iteration stage and continue execution; S76, output the clustering result list, the list length is equal to the number of rows of matrix , and each list element is the cluster category number of the corresponding archive text; At the same time, output the final cluster center set; S77, map the clustering result list one-to-one with the archive text number to form a mapping relationship table, which is used for subsequent evaluation, display or storage.
[0036] Example 1: During October 2024 to January 2025, a data service company tried to deploy a semantic clustering system based on graph neural network in the urban construction document digitalization and sorting project. The project needs to automatically classify non-structured archive data such as annual municipal meeting minutes, project approval documents, urban planning texts, etc. to support subsequent intelligent retrieval and policy decision analysis.
[0037] The pilot dataset consists of 75,000 PDFs or scanned and identified archival texts from January 2003 to December 2018, with a total size of about 14 GB. The original data contains a large number of documents with semantic overlap but inconsistent structure. When using traditional keyword or TF-IDF clustering methods, the clustering repetition rate is high, the classification bias is large, and the retrieval efficiency and business value of the archives are greatly affected.
[0038] The pilot team used the method proposed in the present application for semantic clustering. First, all the archival texts were input into the standard word segmentation, syntactic dependency analysis and Word2Vec / BERT dual-channel encoding to construct a node feature matrix wherein , The edge weight matrix is constructed according to the semantic matching degree and text mutual reference, and the average number of connections of each node is controlled to be within 10.
[0039] After constructing the complete semantic graph structure based on , the spectral clustering is used to divide the subgraph, and the size of each subgraph is controlled to be 800-1000 nodes. Subsequently, a two-level feature graph coarsening mechanism is used. The first level uses a scoring function based on structural connectivity and cosine similarity to perform non-overlapping merging; the second level uses a scoring mechanism combining common neighbor rate and semantic center distance to perform asymmetric micro-cluster compression, and finally obtains a three-layer graph structure and a mapping matrix and .
[0040] The graph neural network uses a three-layer GCN structure, which acts on the original graph and the two-level coarsened graph, and outputs three sets of embedding results. After aligning the embedding vectors, cross-layer consistency constraint judgment is performed, and for nodes with small consistency difference, weight fusion is performed, and for nodes with large consistency difference, the original graph embedding is retained. Finally, a unified semantic embedding representation is generated.
[0041] The unified embedding vector is input into the unsupervised clustering module, the Mini-BatchKMeans algorithm is used, the number of clusters is set to 64, and the maximum number of optimization is set to 120. The center vector is updated and converged using the embedding space distance criterion. Each document is assigned a unique cluster number.
[0042] Within one month after the trial system went online, the Jinan Archives Bureau evaluated the results and compared them with two commonly used clustering schemes (TF-IDF+KMeans, BERT embedding+KMeans). The core index statistics are as follows: Table 1 Comparison of archival semantic clustering performance
[0043] Experiments show that the method has superior performance in multiple key technical points. The clustering purity is improved by 12.8 percentage points, mainly due to the consideration of the upper and lower layer semantic alignment mechanism in the construction of the rough node, which reduces the information loss. The silhouette coefficient is improved from 0.52 to 0.66, which shows that the same samples are closer and the different samples are farther away. The class imbalance coefficient and the average standard deviation are significantly lower than other schemes, which shows that the method can more evenly divide each class of archives and avoid the problem of "minority class" concentration.
[0044] Further tracking analysis of the clustering effect of two business categories, selecting "city construction approval" and "financial allocation plan" two types of documents for expert review, extracting 200 samples of each type, evaluating semantic consistency and clustering logic rationality. The evaluation personnel are composed of provincial archive classification experts, and the clustering number and text content are compared anonymously to determine whether the classification is reasonable, and the results are as follows:
[0045] Table 2 Expert evaluation results (manual review)
[0046] The above results clearly show that the clustering logic of the present application is more consistent with the actual semantic boundary, and the misclustering rate is reduced by nearly 3 times, which greatly reduces the manual correction burden at the application level.
[0047] As can be seen from the above, the present application constructs a complete and hierarchical semantic graph embedding and alignment system from the technical features, maintains semantic integrity through multi-layer roughing control structure, and finally realizes accurate and efficient semantic clustering effect in the complex archive corpus scene. In actual deployment, it shows the advantages of higher clustering accuracy, more balanced structure, and stronger manual consistency rate, and has wide popularization value.
[0048] The above describes only the preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can make equivalent replacements or changes to the technical solutions and inventive concepts of the present application within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. An archive content semantic clustering method based on a graph neural network, characterized in that, The method comprises the following steps: S1, performing word segmentation, noise removal and vectorization processing on the archive text to generate an archive text feature vector set; S2, calculating semantic similarity based on the archive text feature vector set, and constructing a semantic graph structure model combined with the reference relationship, wherein the nodes represent the archive text, and the edge weight is the combined value of the semantic similarity value and the reference weight; S3, performing harmonic cut graph partitioning method on the semantic graph structure model to generate a graph partitioning identifier with balanced structure; S4, applying a feature graph coarsening algorithm to the node set corresponding to the graph partitioning identifier, and performing two-level node merging based on the joint score of structural connectivity and feature similarity, and outputting the first layer graph coarsening result and the second layer graph coarsening result; S5, inputting the semantic graph structure model, the first layer graph coarsening result and the second layer graph coarsening result into a graph neural network embedding model to calculate node semantic embedding vectors respectively; S6, applying cross-layer consistency constraints to the node semantic embedding vectors and fusing them to generate a unified archive text semantic embedding vector set; S7, inputting the unified archive text semantic embedding vector set into an unsupervised clustering model to output the semantic clustering category number of each archive text.
2. The method of claim 1, wherein, The S1 specifically comprises: S11, performing word segmentation processing based on the combination of bidirectional maximum matching and part-of-speech tagging rules on the archive text to generate a word sequence arranged according to the syntactic structure; S12, removing noise from the word sequence according to the set stop word list, punctuation filtering rules and word length threshold, deleting words that do not have semantic expression ability, and outputting an effective word sequence; S13, inputting the effective word sequence into a static word embedding model or a context encoding model, wherein the static word embedding model is a Word2Vec model using a Skip-gram training mechanism, and the context encoding model is a BERT-base model with a multi-layer Transformer structure; S14, for each word, extracting its fixed dimension word vector trained in the Word2Vec model or the context related vector obtained from the input embedding and the self-attention layer in the BERT-base model; S15, combining all word vectors in the archive text in order, and calculating the feature representation vector of the archive text using the position weighted average method; S16, forming the archive text feature vector set by combining the feature representation vectors corresponding to all archive texts.
3. The method of claim 1, wherein, The S2 specifically comprises: S21, calculating the semantic similarity value between each pair of archive texts in the archive text feature vector set based on the angle distance between the embedding vectors to form a semantic similarity matrix, wherein each element in the matrix corresponds to the semantic correlation degree between the two archive texts; S22, performing text area structure analysis on each archive text to extract the reference number or unique identification string contained in the endnote reference field, page lower note field and embedded reference format segment, and constructing the reference candidate set of the current archive text; S23, for each reference candidate, align it with the unique identification field of the remaining archives in the archive text database by the field alignment rule, if the string similarity score exceeds the set threshold, mark it as a valid reference relationship, and assign 1 to the corresponding position in the reference relationship matrix, and assign 0 to the remaining; S24, set the weighting parameter, linearly fuse the semantic similarity matrix and the reference relationship matrix to generate the edge weight matrix, and the edge weight value is the weighted combination of the semantic similarity value and the reference identification value; S25, taking each archive text as a node in the graph structure, establishing the edge connection between the nodes according to whether the edge weight value in the edge weight matrix exceeds the connection judgment threshold, and constructing a semantic graph structure model, outputting the node set, edge set and edge weight set.
4. The method of claim 1, wherein, The S3 specifically comprises: S31, constructing the edge weight matrix corresponding to the semantic graph structure model wherein the matrix element represents the weighted combination of semantic similarity and reference weight between the th profile text and the th profile text, and the degree matrix is constructed wherein the element represents the sum of all connection edge weights of the th node; S32, compute symmetric normalized Laplacian matrix , wherein , wherein denotes the identity matrix, is the inverse square root of the degree matrix; S33, set the number of cluster division , to the Laplacian matrix , perform eigenvalue decomposition, extract continuous , characteristic vectors from the second small eigenvalue, and form a feature matrix by concatenating columns , wherein the , row , represents the spectral embedding representation vector of the , th node S34. The feature matrix Each line of input is a clustering algorithm based on Euclidean distance. The algorithm performs node clustering and outputs an initial graph partitioning label set. Each element in the label set is the initial cluster number of the corresponding node. S35, for each initial cluster number corresponding node set, build graph partition cluster node set , calculate the harmonic mean of the nodes : ; wherein, denotes the number of nodes in the cluster, and is the spectral representation vector for the corresponding node; S36, set structure balance tolerance ratio , calculate deviation between node quantity of each graph division cluster and target quantity , judge whether to satisfy , if there is a graph division cluster not satisfying the condition, execute following operation on the graph division cluster: S361, calculate the total connection edge weight between all nodes and the remaining clusters, and extract the node with the largest connection strength as the candidate boundary node; S362, for each candidate boundary node, calculate the change of the node harmonic mean after migrating to all remaining graph partition clusters; S363, select the migration path that can significantly reduce the average node harmonic mean and improve the balance of the number of nodes, and adjust the boundary node to the optimal graph partition cluster; S364, generate an updated graph partition label set, and re-label the cluster number of all nodes; S37, re-perform the construction of the graph partitioning cluster node set, the calculation of the node harmonic mean and the structure balance deviation judgment, and the loop repeats the boundary node migration and the label set update operation until all the graph partitioning clusters simultaneously satisfy the following conditions: the node quantity of all the node sets satisfies the structure balance tolerance condition; the change amplitude of all the node harmonic means is less than the convergence threshold ; S38, output the graph partition label set finally satisfying the condition as the graph partition identification set, and each label element in the graph partition identification set corresponds to an archive text node.
5. The method of claim 1, wherein, The S4 specifically comprises: S41, for each graph partition cluster in the graph partition identifier set, extract the subgraph structure of each graph partition cluster, and construct a node feature matrix wherein is the number of subgraph nodes, is the semantic representation dimension, the first row represents the feature vector of the first node; meanwhile, an initial edge weight matrix is constructed wherein element represents the edge weight between the first node and the first node; S42, calculate the first layer node pair scoring function The scoring function is composed of the structural connectivity and the cosine similarity of the feature vectors. ; wherein, is a weight coefficient to be adjusted; S43, all the scoring results are sorted according to values from high to low, and a non-overlapping screening strategy is used to determine a node merging pair, the non-overlapping screening strategy is: traversing the sorted node pair set, for each node pair , if neither node nor node appears in the selected set, then is included in the merging set, after performing the merging operation, a coarsened node is constructed, the feature vector of the coarsened node is set as , an updated edge weight matrix is constructed, and a mapping matrix is generated; S44, based on the first layer coarsening result, a second layer coarsening mechanism is constructed, and a non-overlapping micro-cluster construction strategy with a fixed node number upper limit of 3 is adopted: S441、calculating the common neighbor rate of any pair of nodes in the coarse graph S441、calculating the common neighbor rate of any pair of nodes in the coarse graph ; wherein, represents a set of neighbor nodes of a node ; S442, calculate the feature mean deviation score function: ; wherein , is a balancing factor; S443, according to the score value, try to combine the nodes with higher scores into a micro-cluster set one by one, and the requirements are as follows: the number of nodes in any micro-cluster does not exceed 3, there is no overlapping node between micro-clusters, and the score value between all nodes in the micro-cluster is greater than a set threshold, which allows merging, and finally output each micro-cluster in the micro-cluster set as a second layer coarsening node; S444, the feature vector of each micro-cluster is represented by the internal node feature mean, generating a second layer of coarsened feature matrix , constructing a coarsened edge weight matrix , wherein is the number of micro-clusters; S45, constructing a second layer mapping matrix , indicating a merging relationship of the first layer roughing nodes to the second layer roughing nodes; S46, output the first layer map coarsening result , the second layer map coarsening result , the first layer mapping matrix , the second layer mapping matrix .
6. The method of claim 1, wherein, The S5 specifically comprises: S51, construct three groups of input graph structures respectively from the semantic graph structure model, the first layer graph coarsening result and the second layer graph coarsening result, each group of graph structures includes a node feature matrix and an edge weight matrix, and is respectively denoted as an original graph, a first layer coarsening graph and a second layer coarsening graph, each node in the graph corresponds to a semantic feature vector, and the edge represents a semantic or structural association relationship; S52, for each group of graph structures, input the graph neural network embedding model respectively, the graph neural network embedding model includes graph convolution operation and nonlinear activation operation; the graph convolution operation calculates the embedding representation of the current node according to the feature information and edge weight information of the adjacent nodes of each node; the nonlinear activation operation performs nonlinear transformation on the convolution result; each group of graph structures outputs the graph embedding representation of its nodes, which is denoted as an original graph embedding result, a first layer coarsening graph embedding result and a second layer coarsening graph embedding result. S53, mapping the embedding results of the first layer coarsening graph and the second layer coarsening graph back to the space of the original node set using the first layer mapping matrix and the second layer mapping matrix, wherein each row of the mapping matrix represents a set of original node numbers corresponding to a coarsening node, and the coarsening graph node embedding result is assigned or propagated to the corresponding original node position according to the mapping relationship to construct the aligned first layer and second layer embedding matrix; S54, fusing the original graph embedding result, the first layer embedding mapping result and the second layer embedding mapping result, and adopting a weighted average strategy as the fusion manner, wherein each set of embedding results is multiplied by a set weight coefficient, and the sum of all coefficients is 1; the weighted results are added row by row in the node dimension to obtain the final unified semantic embedding vector of each original node; S55, outputting the unified semantic embedding vector set, and each row in the vector set corresponding to the semantic representation result of an original archive text node.
7. The method of claim 1, wherein, The S6 specifically comprises: S61, obtaining, from the graph neural network embedding model, a node embedding vector set of the original semantic graph structure model, an embedding vector set of the first layer graph coarsening result restored to the original node space through a mapping matrix, and an embedding vector set of the second layer graph coarsening result restored to the original node space through two-level mapping matrices, and the three sets of embedding vectors are arranged according to the original node number; S62, calculating the difference measurement value between the semantic embedding vectors of each original archive text node in the original graph, the first layer coarsening graph and the second layer coarsening graph, and the difference measurement value is the Euclidean distance or Manhattan distance between the three sets of vectors, and the larger the value is, the more significant the cross-layer difference is; S63, setting a consistency tolerance threshold, when the embedding vector difference measurement value between two levels is less than the consistency tolerance threshold, marking the node as a consistency satisfying node; otherwise, marking it as a consistency insufficient node; S64, for the consistency satisfying node, assigning the fusion weight of the original graph, the first layer coarsening graph and the second layer coarsening graph embedding vectors, and the sum of the three sets of weights is 1; multiplying and adding each dimension element in the three sets of embedding vectors with the corresponding weight to output the fused semantic embedding representation of the node; S65, for the consistency insufficient node, using the node embedding vector in the original semantic graph structure model as the final semantic representation, and skipping the cross-layer fusion calculation process; S66, arranging the semantic embedding vectors after fusion or reservation of all nodes according to the original node number order to output the unified semantic embedding vector set.
8. The method of claim 1, wherein, The S71 specifically comprises: S71, read the uniform semantic embedding vector set, denoted as matrix , the number of rows of the matrix is equal to the number of profile texts, the number of columns is equal to the embedding dimension, and each row vector represents the semantic representation of a profile text; S72, determine unsupervised clustering model type, select clustering algorithm based on centroid update; set control parameters including: cluster number , maximum iteration number , center convergence threshold value and distance measurement method, distance measurement uses Euclidean distance between vectors; S73、In the initial stage, a random uniform sampling strategy is adopted to select vectors from the matrix as cluster centers, and the iteration counter is initialized to zero; the distance of each vector to all centers is calculated, and the vector is assigned to the cluster corresponding to the center with the minimum distance, completing the first round of cluster label initialization; S74, entering an iteration phase, and performing the following two steps in each iteration: Step one: recalculating the centroid of each cluster, and updating the new cluster center vector by calculating the arithmetic mean of all vectors in the cluster in the same dimension; Step 2: For the matrix The distance from all vectors in the middle to the updated center vector is recalculated, the cluster numbers are redistributed according to the minimum distance principle, and the change in Euclidean distance between adjacent cluster centers is recorded. S75, increasing the iteration counter and judging the termination condition: if the counter reaches the set maximum number of iterations, or the change amount of all cluster centers in two adjacent rounds does not exceed the convergence threshold, the iteration is ended; otherwise, returning to the iteration phase for continuous execution; S76. Output a list of clustering results, the length of which is equal to the matrix. The number of rows is given, and each list element is the cluster category number of the corresponding archive text; the final set of cluster centers is also output. S77, mapping the clustering result list to the archive text number one by one to form a mapping relationship table.
Citation Information
Cited By
Session semantic extraction and intelligent combination method for audio semantic recognition
CN121862095A
Short text clustering and fuzzy recognition algorithm for large-scale network online sub-graph sampling
CN121958560A
