Incremental updating method and device of technical subject tree, and electronic device
Patent Information
- Application Number
- CN202610691700.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-19
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-05-19
AI Technical Summary
然而,在实际应用过程中,新产生的技术文献会持续引入,如果每次新增文档均需要重新生成完整技术主题树,不仅计算成本高,而且会破坏原有技术主题体系的稳定性和历史可比性
本公开提供了一种基于RAG的知识图谱层次主题体系动态扩展方法,通过“预生成层次主题链”进行文档语义增强,有效提升了非受控技术文档的检索精度;设计了聚焦于“关系”并带有方向约束的多跳检索策略,确保了检索结果的结构完备性与逻辑连贯性;将检索上下文与种子图谱的结构化信息嵌入到提示词中协同输入大模型,驱动生成与现有体系逻辑一致的新主题链,实现结构感知的增量更新。实现了在面对持续新增技术文档时,在保持原有技术主题结构稳定的前提下实现动态扩展的技术效果。
Smart Images

Figure CN122547980B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of text processing technology, and more specifically, to a method and apparatus for incremental updating a technical topic tree, and an electronic device. Background Technology
[0002] In products or projects such as technology intelligence analysis systems, patent analysis platforms, and industrial technology monitoring platforms, it is often necessary to construct a technology theme tree based on historical technical documents to depict the overall structure of the technology field. However, in practical applications, newly generated technical documents are continuously introduced. If a complete technology theme tree needs to be regenerated every time a new document is added, it will not only be computationally costly but also compromise the stability and historical comparability of the original technology theme system. Summary of the Invention
[0003] This disclosure provides an incremental update method, apparatus, and electronic device for a technical topic tree, which addresses the technical problem that existing technical topic trees struggle to dynamically expand while maintaining the stability of the original technical topic structure when faced with continuously added technical documents.
[0004] According to one aspect of the present disclosure, an incremental update method for a technology topic tree is provided. The method includes: converting a first technology topic system into a first knowledge graph and generating a structured topic description for each node of the first knowledge graph; using a large language model to compress and structure newly added documents to generate one or more first topic chains; wherein the first topic chain includes technology topics that can represent the core content of the document and their hierarchical relationships; retrieving relationships related to the first topic chains in the first knowledge graph and performing multi-hop expansion of the relationships with directional constraints to determine a target number of relationships; wherein the relationships are edges of the knowledge graph; inputting the target number of relationships as context information into the large language model for processing and outputting a second topic chain; updating the newly added technology topics included in the second topic chain and the hierarchical relationships between the newly added technology topics and the technology topics included in the first technology topic system to the first knowledge graph to generate a second knowledge graph; calculating the trust degree of each edge in the second knowledge graph; and generating a second technology topic system based on the trust degree and the topological relationship of the second knowledge graph. Optionally, converting the first technical topic system into a first knowledge graph includes: using the technical topics included in the first technical topic system as nodes of the first knowledge graph; and determining the directed edges of the first knowledge graph based on the hierarchical relationships between the technical topics.
[0005] Optionally, generating a structured topic description for each node of the first knowledge graph includes: inputting the information of each node of the first knowledge graph and its neighboring nodes as contextual information into the large language model, and outputting a structured topic description for each node.
[0006] Optionally, retrieving relationships related to the first topic chain in the first knowledge graph includes: decomposing the first topic chain into topic word queries and relationship pair queries; performing semantic vectorization on each edge of the first knowledge graph to obtain the semantic vector corresponding to each edge of the first knowledge graph; calculating the similarity between the semantic vector corresponding to each edge and the topic word query and the relationship pair query respectively; and determining the edges corresponding to similarity values greater than a first threshold as relationships related to the first topic chain.
[0007] Optionally, the relations are extended with directional constraints to determine the relations with the target number of relations, including: performing multi-hop extension in the inbound and outbound directions of the relations respectively; sorting the relations according to their weighted scores to determine the relations with the highest target number of relations.
[0008] Optionally, after outputting the second topic chain, the above method further includes: calculating the pairwise similarity between the technical topics included in the second topic chain; determining the technical topic pairs with a pairwise similarity greater than a second threshold; using a large language model to determine the semantic relationship between the technical topic pairs; if the semantic relationship is a consistent relationship, merging the technical topic pairs; wherein, the retained technical topics will inherit the statistical attributes of the removed technical topics; if the semantic relationship is an inclusion relationship, establishing the hierarchical relationship between the technical topic pairs.
[0009] Optionally, calculating the trust level of each edge in the second knowledge graph includes: reversing the direction of each edge in the second knowledge graph; taking each node in the second knowledge graph as a target node, and using the Personalized-PageRank algorithm to randomly walk among the nodes in the second knowledge graph starting from the target node; using the similarity between nodes as the weight of the edges between nodes; calculating the PageRank value of the target node in each iteration round; reversing the direction of each edge in the second knowledge graph back to its initial direction; for any edge in the second knowledge graph, determining the ratio of the PageRank value of the source node to the sum of the PageRank values of the target node in each iteration round during the Personalized-PageRank calculation starting from the target node; and using the ratio as the trust level of any edge in the second knowledge graph.
[0010] Optionally, given an initial node Under the premise that the target node The PageRank value is determined by the following recursive formula: ,in, d The damping coefficient is set to 0.85. N This represents the total number of nodes in the second knowledge graph. The target node; The source node of the incoming edge of the target node; This is the set of all incoming edges pointing to the target node; This is a similarity calculation function; for point to The directed edges; for The edge of the boundary; , For the initial node When the value is 1, it is 0 otherwise.
[0011] Optionally, a second technical topic system is generated based on the trust degree and the topological relationship of the second knowledge graph, including: step S1, selecting the node with the smallest out-degree in the second knowledge graph as a leaf node; step S2, starting from the leaf node, sequentially finding the parent node corresponding to the edge with the highest trust degree of each level of node, and pushing the parent node of each level of node onto the stack, until the root node with an in-degree of 0 is found; step S3, sequentially removing the nodes from the stack, and adding each removed node as a child node of the previous removed node to the second technical topic system.
[0012] Optionally, the above method further includes: if the parent node being searched is already in the stack, comparing the trust values of each edge constituting the cycle, and deleting the edge with the lowest trust value; and sequentially removing all nodes related to the cycle from the stack and pushing them back onto the stack.
[0013] Optionally, the above method further includes: after each stack is constructed, deleting the leaf nodes from the second knowledge graph, and repeating steps S1 to S3 until the technical topics included in the second technical topic system cover all nodes in the second knowledge graph.
[0014] Optionally, the above method further includes: determining target nodes in the second knowledge graph that correspond to the technical topics included in the first technical topic system; and setting the trust degree of the edges between the target nodes to infinity.
[0015] According to another aspect of the present disclosure, an incremental update apparatus for a technology topic tree is provided. The apparatus includes: a conversion module for converting a first technology topic system into a first knowledge graph and generating a structured topic description for each node of the first knowledge graph; a first processing module for compressing and structuring information on newly added documents using a large language model to generate one or more first topic chains; wherein the first topic chain includes technology topics that can represent the core content of the document and their hierarchical relationships; a second processing module for retrieving relationships related to the first topic chains in the first knowledge graph and performing multi-hop expansion of the relationships with directional constraints to determine a target number of relationships; wherein the relationships are edges of the knowledge graph; a third processing module for inputting the target number of relationships as context information into the large language model for processing and outputting a second topic chain; updating the newly added technology topics included in the second topic chain and the hierarchical relationships between the newly added technology topics and the technology topics included in the first technology topic system to the first knowledge graph to generate a second knowledge graph; and a generation module for calculating the trust degree of each edge in the second knowledge graph; and generating a second technology topic system based on the trust degree and the topological relationship of the second knowledge graph.
[0016] According to another aspect of the present disclosure, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the above-described method.
[0017] According to another aspect of the present disclosure, a computer-readable storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described method.
[0018] The beneficial effects of the technical solutions provided in this disclosure are: This disclosure provides a dynamic expansion method for a hierarchical topic system based on RAG knowledge graphs. It enhances document semantics through "pre-generated hierarchical topic chains," effectively improving the retrieval accuracy of uncontrolled technical documents. A multi-hop retrieval strategy focusing on "relationships" with directional constraints is designed to ensure the structural completeness and logical coherence of the retrieval results. The structured information of the retrieval context and seed graph is embedded into prompts and collaboratively input into a large model, driving the generation of new topic chains consistent with the existing system logic, achieving incremental updates with structure awareness. This method achieves dynamic expansion while maintaining the stability of the original technical topic structure when faced with continuously added technical documents. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments of this disclosure will be briefly introduced below.
[0020] Figure 1 This is a flowchart of an incremental update method for a technical topic tree according to an embodiment of the present disclosure; Figure 2 This is a flowchart of another incremental update method for a technical topic tree according to an embodiment of the present disclosure; Figure 3 This is a schematic diagram illustrating a method for constructing a new technology topic tree according to an embodiment of this disclosure; Figure 4 This is a schematic diagram of incremental updates of a technical topic tree according to an embodiment of the present disclosure; Figure 5 This is a schematic diagram of the structure of an incremental update device for a technical topic tree provided in an embodiment of this disclosure; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0021] The embodiments of this disclosure are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this disclosure, and do not constitute a limitation on the technical solutions of the embodiments of this disclosure.
[0022] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this disclosure mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element are connected through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term, for example, “A and / or B” or “A, B” indicates implementation as “A,” or implementation as “B,” or implementation as “A and B.”
[0023] To make the objectives, technical solutions, and advantages of this disclosure clearer, the embodiments of this disclosure will be described in further detail below with reference to the accompanying drawings.
[0024] First, the technical terms used in this disclosure will be introduced and explained: A technology topic tree refers to a tree-like knowledge structure built using artificial intelligence to automatically extract technology topics from large amounts of text or patent data and construct them according to hierarchical relationships. It can help people quickly understand the core content of massive amounts of text and clarify the subordinate and related relationships between technologies.
[0025] Large Language Model (LLM) is an artificial intelligence system trained on massive amounts of text data.
[0026] Retrieval-Augmented Generation (RAG) is a technical architecture that combines information retrieval with the generative capabilities of large language models. It effectively addresses core issues of large language models, such as knowledge lag, factual "illusions," and inability to access private data, by enabling the large language model to retrieve relevant information from an external knowledge base before answering a question. Simply put, RAG operates on a "retrieve first, then generate" model. It equips the large language model with a real-time updated "external knowledge base," enabling it to generate accurate and traceable answers based on the latest and most relevant real-world information.
[0027] In the context of RAG, uncontrolled technical documents refer to raw data that is unstructured, lacks a unified standard, and has not undergone rigorous cleaning or version control.
[0028] Personalized-PageRank (PPR) is a classic node proximity measurement algorithm used in graph data mining.
[0029] PageRank (PR value) is essentially a numerical metric that measures "importance" or "influence".
[0030] Existing technology topic trees struggle to dynamically expand while maintaining the stability of the original topic structure when faced with continuously added technical documents. To address this issue, existing technologies primarily offer the following solutions: 1) In existing technologies, researchers generally adopt a structured approach to expand the technology theme system incrementally, based on the existing technology system. This involves respecting and reusing the existing technology classification structure while guiding the positioning, classification, and integration of new technology concepts within the system by mining the structural features of the "seed system." This type of method typically uses the already constructed technology theme system as a basic framework, fully utilizing the structural information it contains, including but not limited to the hierarchical depth, parent-child relationships, sibling node relationships, and path information between technology themes. Using self-supervised or weakly supervised methods, these structural features serve as guiding signals, assisting the model in understanding the relative positions and logical relationships of different technology concepts within the system, thereby enabling the orderly integration of new nodes into the existing technology system.
[0031] 2) Another type of existing technology introduces a global path and hierarchical constraint mechanism. By searching and evaluating the rationality of different path combinations in the seed system, it systematically judges the potential hierarchical affiliation of new technology concepts within the system. This type of method not only focuses on the relative position of nodes in their local neighborhoods, but also comprehensively considers the adaptability of new nodes in the global structure through path termination judgment and hierarchical consistency assessment, thereby grasping the overall hierarchical logic of the technology theme system on a larger scale.
[0032] 3) As the scale of technological systems expands and application demands increase, researchers have gradually realized the limitations of traditional self-supervised frameworks in terms of expressive power and adaptability, and have begun to explore hinting and fine-tuning methods based on pre-trained models. These methods explicitly introduce structural information of the technological system during the model input stage, such as path sequences, relationship hints, or random walk results, guiding the model to perceive the hierarchical relationships between technological topics during the expansion process. The technological system expansion task is then reconstructed into a language modeling or inference task adapted to the pre-trained model, thereby improving the model's ability to infer hierarchical structures. Building on this, further research has attempted to introduce large language models into the technological topic system expansion process. By summarizing, aggregating, or reorganizing the structural information in the seed system and integrating it into the model input as hint words, the structural coherence and overall quality of the technological topic system expansion process can be maintained under limited annotation or low-resource conditions. These methods alleviate, to some extent, the dependence of traditional models on manually labeled data and complex feature engineering.
[0033] 4) Some technologies incorporate RAG (Rapid Algorithm Group) concepts into the task of expanding a technology theme system. This involves retrieving existing nodes and their relationships related to new technology concepts from the seed system, and then inputting the retrieval results as contextual information into a large language model. The model then determines the type of the new node and locates its parent node within the system. This type of method supports the introduction of new leaf nodes while also adjusting some upper-level structures to enhance the system's adaptability to the evolution of new technologies.
[0034] Overall, existing technologies, centered around the incremental expansion of the technology theme system, have formed multiple implementation paths, represented by structural feature mining, self-supervised or weakly supervised learning, pre-trained model hinting mechanisms, and retrieval enhancement generation methods. These provide diverse technical means for introducing new technology concepts and maintaining the coherence of the system structure within the existing classification framework.
[0035] Although incremental expansion methods based on existing technology systems have made some progress in the mining of seed system architecture features and the localization and integration of new nodes, with the rapid evolution of the technology field and the increasing complexity of application scenarios, existing technologies still have the following shortcomings in practical applications: 1) Self-supervised or weakly supervised incremental expansion methods based on structural features have inherent limitations in their semantic understanding of newly added technical concepts. These methods mainly rely on structural features such as paths, hierarchical depth, sibling nodes, and parent nodes in the seed system as guiding signals, indirectly inferring the semantic attributes and hierarchical affiliation of nodes through their relative positions within the existing structure. This assumption is reasonable in scenarios with stable structures and mature technical semantics; however, when facing emerging technologies, cross-disciplinary technologies, or technical concepts whose semantic boundaries are not yet fully solidified, newly added nodes often lack clear and stable structural references within the existing system. Relying solely on structural features for inference can easily lead to uncertain positioning or biased hierarchical judgments, and their adaptability is limited by the semantic range that the existing technical system architecture can express.
[0036] 2) Traditional self-supervised methods based on structural features have limited capabilities in complex structural semantic modeling and fine-grained hierarchical learning. These methods mostly follow the traditional self-supervised learning paradigm and usually rely on relatively outdated or pre-trained encoders with limited expressive power. When dealing with complex technical semantics, cross-level conceptual differences, and multi-granularity technical topic relationships, they are unable to fully characterize the implicit semantic connections and evolutionary trends between technical concepts, resulting in insufficient generalization ability and cross-scene adaptability of the model.
[0037] 3) Existing methods generally lack a global optimization mechanism for the consistency and coherence of the overall structure when dealing with large-scale, dynamically changing technological systems. Most methods focus on evaluating the reasonable attribution of individual new nodes from the perspective of local neighborhoods or candidate paths, while rarely considering the impact of new nodes on the global structural stability and long-term consistency from the perspective of the overall technological theme system evolution. With the continuous introduction of multi-source heterogeneous technological information, it is easy to lead to internal hierarchical redundancy, blurred theme boundaries, or gradual structural shifts, making it difficult to guarantee the overall coherence of the technological theme system in the long-term evolution process.
[0038] Some studies have introduced hinting and fine-tuning methods based on pre-trained models. These methods incorporate structural information from the classification system into the model input as hints to enhance the model's ability to reason about hierarchical relationships within technical topics. However, these methods still face challenges in engineering applications, including high adaptation costs and limited scalability. In low-resource scenarios, the model's ability to understand structural information remains limited; furthermore, the fine-tuning process itself may lead to the forgetting of existing knowledge, increasing model maintenance and update costs and hindering the long-term stable evolution of the technical topic system.
[0039] 4) Existing extensions of large language models and RAG still have shortcomings in terms of process completeness and computational efficiency. Some methods separate technical topic identification, node type judgment, and node access location determination into independent stages. Although this can improve judgment accuracy locally, the overall process is relatively fragmented and lacks unified incremental update control logic. In the process of large-scale technical system expansion, frequent retrieval, generation, and judgment operations can easily lead to high time costs and computational resource overhead, making it difficult to meet the efficiency and scalability requirements of actual systems.
[0040] Therefore, this disclosure proposes a dynamic expansion method for the hierarchical topic system of knowledge graphs based on retrieval-enhanced generation (RAG). This method enables the controlled writing of new technology topics and their hierarchical relationships without reconstructing the entire technology topic tree. It is suitable for long-term operating scientific and technological intelligence and technical analysis products or projects.
[0041] Compared with existing technologies (such as retrieval based on pure vector similarity, fragmented "identification-access" processes, and static structural weighting methods), the core innovations of this disclosure are as follows: 1) By using "pre-generated hierarchical topic chains" to enhance document semantics, the retrieval accuracy of uncontrolled technical documents is effectively improved; 2) A multi-hop retrieval strategy focusing on "relationships" and with directional constraints was designed to ensure the structural completeness and logical coherence of the retrieval results; 3) Embed the structured information of the retrieval context and seed graph into the prompt words to collaboratively input the large model, drive the generation of new topic chains that are consistent with the logic of the existing system, and realize incremental updates of structure awareness.
[0042] The following description of several exemplary embodiments illustrates the technical solutions of this disclosure and the technical effects produced by these solutions. It should be noted that the following embodiments can be referenced, learned from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0043] This disclosure provides an incremental update method for a technology topic tree, such as... Figure 1As shown, the method includes the following steps: Step S101: Convert the first technical topic system into a first knowledge graph, and generate a structured topic description for each node of the first knowledge graph.
[0044] Figure 2 This is a flowchart of an incremental update method for a technical topic tree according to an embodiment of the present disclosure. In step S101, the first technical topic system is a predefined tree-like technical topic system (i.e., a seed system). Figure 2 In The first knowledge graph is Figure 2 In .
[0045] According to some optional embodiments of this disclosure, the execution step S101 converts the first technical topic system into a first knowledge graph, including the following steps: taking the technical topics included in the first technical topic system as nodes of the first knowledge graph; and determining the directed edges of the first knowledge graph according to the hierarchical relationship between the technical topics.
[0046] In this embodiment, a predefined tree-like technical topic system (seed system) is used. Loaded as a single-relationship knowledge graph .in, The node is The technical topic, The directed edges represent the hierarchical relationship between technical topics.
[0047] This step transforms the static, hierarchical classification system into a dynamic, computable network structure. The explicit definition of nodes (technical topics) and directed edges (hierarchical relationships) lays the foundation for subsequent reasoning and information aggregation. For example, "machine learning" can be the parent node, and its child nodes could be "deep learning," "reinforcement learning," etc.
[0048] According to some other optional embodiments of this disclosure, step S101 generates a structured topic description for each node of the first knowledge graph by means of the following method: inputting the information of each node of the first knowledge graph and its neighboring nodes as context information into the large language model, and outputting a structured topic description for each node.
[0049] In embodiments of this disclosure, for the map Each node in the model not only utilizes its original label but also integrates the relational information of its neighboring nodes (such as parent nodes and child nodes) as context, inputting it into the large language model to generate a structured topic description for that node.
[0050] A label for a technical topic (such as "Transformer") is often isolated and ambiguous. By introducing its parent node (such as "deep learning model") and child nodes (such as "Vision Transformer", "BERT"), a clear semantic framework can be provided for large language models.
[0051] The above technical solution transforms static technical tags into semantically rich topic descriptions, greatly enriching the semantic connotation of nodes. This provides a more accurate and higher-dimensional vectorized foundation for subsequent semantic similarity calculations, solving the semantic ambiguity problem caused by sparse tag vocabulary or polysemy in traditional methods, and laying the foundation for accurate retrieval.
[0052] The following example illustrates step S101: Objective: To transform existing technology topic trees into structured graphs and generate semantic descriptions of nodes.
[0053] Detailed examples: Original seed system:
[0054] Load as a knowledge graph: Nodes: Artificial Intelligence, Machine Learning, Reinforcement Learning, Deep Learning, Natural Language Processing Directed edge: Artificial Intelligence → Machine Learning Artificial Intelligence → Natural Language Processing Machine Learning → Reinforcement Learning Machine Learning → Deep Learning Generate structured topic descriptions: Regarding "reinforcement learning": Input to LLM: Node: Reinforcement Learning Path: Artificial Intelligence → Machine Learning → Reinforcement Learning Task requirements: Generate keywords that reflect the core concepts of the topic. Output example: Reinforcement learning: agent, reward mechanism, policy optimization, value assessment, environment interaction.
[0055] Regarding "deep learning": Output example: Deep learning: Neural networks, convolutional networks, recurrent networks, training optimization, feature extraction.
[0056] Step S102: Use a large language model to compress and structure the information of the newly added document to generate one or more first topic chains; wherein, the first topic chain includes technical topics that can represent the core content of the document and their hierarchical relationships.
[0057] like Figure 2 As shown, in this step, the newly added document D is enhanced into a structured query. Addressing the characteristics of low information density and semantically scattered nature of uncontrolled technical documents, this disclosure does not directly perform vectorized retrieval on the original document. Instead, it employs a "pre-generated hierarchical topic chain" strategy, utilizing a large language model to compress and structure the document's information. Specifically, the LLM directly generates one or more "topic chains" (e.g., "Artificial Intelligence → Machine Learning → Reinforcement Learning") reflecting the document's core topic and its hierarchical relationships based on the document content. This topic chain is decomposed into two types of queries: keyword queries and relational queries (e.g., "Artificial Intelligence" is a keyword query, and "Artificial Intelligence → Machine Learning" is a relational query).
[0058] Compared to directly using documents or extracting only discrete keywords (such as Light-RAG), pre-generated topic chains have clear hierarchical logical constraints, which not only makes it easier for large models to grasp the semantic granularity of broad or specific topic words, but also makes querying the hyper- and hypo-topic pairs generated by them closer to the "relationship" structure in knowledge graphs.
[0059] The following example illustrates step S102: Objective: To generate "topic chains" from unstructured texts such as papers and technical reports for use as queries.
[0060] Detailed examples: Document content: This article introduces the application of artificial intelligence in medical image diagnosis, utilizing machine learning and deep learning methods to achieve automatic lesion identification, and explores further applications.
[0061] Generate topic chains (LLM output): Artificial Intelligence → Machine Learning → Deep Learning → Reinforcement Learning Break it down into search queries: Keyword search: Artificial intelligence, machine learning, deep learning, reinforcement learning Relationship lookup: Artificial Intelligence → Machine Learning Machine Learning → Deep Learning Deep learning → Reinforcement learning Function: To convert unstructured documents into hierarchical queries, ensuring accurate retrieval and clear semantics.
[0062] Step S103: Retrieve relationships related to the first topic chain in the first knowledge graph, and perform multi-hop expansion of the relationships with directional constraints to determine the target number of relationships; wherein, the relationship is an edge of the knowledge graph.
[0063] like Figure 2 As shown, in this step, the query Q generated in step S102 is used in the graph. Search for relevant relationships in the middle.
[0064] According to some optional embodiments of this disclosure, step S103, which involves retrieving relationships related to the first topic chain in the first knowledge graph, includes the following steps: decomposing the first topic chain into topic word queries and relationship pair queries; performing semantic vectorization on each edge of the first knowledge graph to obtain the semantic vector corresponding to each edge of the first knowledge graph; calculating the similarity between the semantic vector corresponding to each edge and the topic word query and the relationship pair query; and determining the edges with similarity greater than a first threshold as relationships related to the first topic chain.
[0065] After obtaining the enhanced query (topic terms and relation pairs), for the graph This disclosure focuses on the "relationship" element in knowledge graphs. Each edge (relation) in the algorithm is semantically vectorized, and the similarity between the enhanced query and these relation vectors is calculated. Only relation results with a similarity higher than a first threshold (e.g., threshold>0.5) are retained.
[0066] According to some other optional embodiments of this disclosure, performing step S103 to perform multi-hop expansion of the relation with directional constraints to determine the relation with the target number of relations includes the following steps: performing multi-hop expansion in the inbound and outbound directions of the relation respectively; sorting the relations according to their weighted scores to determine the relation with the highest target number of relations.
[0067] This disclosure introduces a directionally constrained multi-hop retrieval: if the retrieved relation is A→B, then n-hop expansion is performed only in the directions of the incoming edges of A and the outgoing edges of B. Finally, the results are sorted according to their weighted scores, and the Top_k relations are selected as the final retrieval results.
[0068] In knowledge graphs and graph algorithms, "n-hop expansion" is a retrieval strategy based on graph traversal. Simply put, it means: starting from a certain node (or relation), "walk" n steps outward along the edges, including all nodes and relations encountered along the way in the retrieval scope.
[0069] 0-hop: refers to the starting point itself; 1-hop: The direct neighbor of the starting point (passed through only 1 edge); 2-hop: The neighbor of the starting point's neighbor (passing through 2 edges).
[0070] Suppose the core relationship retrieved is A→B (e.g., "Machine Learning→Containment→Deep Learning"). The system doesn't just retain A and B, but also considers information closely related to A and B important, therefore expanding upon it: Inward edge expansion of A (tracing back to the source): Find the node that points to A.
[0071] For example: find "artificial intelligence" (because artificial intelligence → includes → machine learning).
[0072] B's outbound edge expansion (exploring downstream): Find the node that B points to.
[0073] For example: find "neural network" and "reinforcement learning" (because deep learning → contains → neural network).
[0074] If n=2 is set, the system will even extend outward by one layer to find the specific algorithm for "reinforcement learning".
[0075] When performing multi-hop searches in a graph, the search space can explode exponentially without restrictions (A connects to B, B connects to C, D, E, F...), introducing a large amount of noise. This solution specifically emphasizes "expanding only in the directions of the incoming edges of A and the outgoing edges of B." This is a pruning strategy designed to combat "combinatorial explosion."
[0076] Multi-hop retrieval with directional constraints ensures that the detected relation groups are within the range of... The path is more complete, forming a locally connected "relationship subgraph" to avoid noise introduced by irrelevant branches. In addition, it focuses on similarity matching of the relationships themselves, rather than the similarity of isolated nodes, to ensure that the retrieval results are highly consistent with the new documents in terms of semantic structure, providing accurate structural context for the subsequent generation stage.
[0077] The following example illustrates step S103: Objective: Retrieve relationships related to the topic chain within the target and expand upon them.
[0078] Detailed examples: Enter the query: Machine Learning → Reinforcement Learning Preliminary matching relationship (similarity matching with edges in the graph): Matching relationship: Machine Learning → Reinforcement Learning 1-hop extension: Artificial Intelligence → Machine Learning Reinforcement learning → Imitation learning Reinforcement learning → Meta-reinforcement learning Filtering Top_k: The three relations with the highest confidence levels were selected as candidate contexts: Artificial Intelligence → Machine Learning Reinforcement learning → Imitation learning Machine Learning → Reinforcement Learning Function: To ensure the structural integrity and semantic consistency of the retrieved data, avoid isolated nodes, and generate new topic chains with reliable context.
[0079] Step S104: Input the relationship of the target quantity as context information into the large language model for processing and output the second topic chain; update the new technical topics included in the second topic chain and the hierarchical relationship between the new technical topics and the technical topics included in the first technical topic system to the first knowledge graph to generate the second knowledge graph.
[0080] like Figure 2 As shown, in this step, the search results are embedded into the prompts to generate a technical topic chain. The generated technical topic chain is then used to supplement... In the middle, generate .
[0081] According to some optional embodiments of this disclosure, the Top_k relation results retrieved in step S1033 are integrated into a prompt word to form a structure-aware contextual input. Based on this prompt word, the large language model performs a topic relation chain generation task, outputting a new topic chain (including newly added topics and their relationships with existing topics) that conforms to the existing architecture. During the generation process, this disclosure uses the retrieved relational context as a key guide to ensure that the generated results logically continue the hierarchical structure of the original system and naturally incorporate new technological concepts. The new technological topics and relationships in the generated results are fed back to the knowledge graph in real time. Generate a second knowledge graph ( Figure 2 In This serves as the target map for the next RAG cycle, enabling continuous dynamic expansion of the system.
[0082] The following example illustrates step S104: Objective: To generate logically consistent new topic chains using the retrieved relational context.
[0083] Detailed examples: Prompt word construction: Context: Artificial Intelligence → Machine Learning Machine Learning → Reinforcement Learning Reinforcement learning → Imitation learning Task: Generate a chain of new technology topics LLM output: Artificial Intelligence → Machine Learning → Ensemble Learning → Reinforcement Learning Meta-Strategy Update the knowledge graph: New Nodes: Ensemble Learning and Reinforcement Learning Meta-Strategies New relationship: Machine Learning → Ensemble Learning Ensemble learning → Reinforcement learning meta-strategy Function: The generated new topic chain logically continues the original system, and the nodes and relationships are directly added to the graph without the need for separate classification and judgment.
[0084] According to some optional embodiments of this disclosure, after outputting the second topic chain in step S104, the method further includes: calculating the pairwise similarity between the technical topics included in the second topic chain; determining the technical topic pairs with a pairwise similarity greater than a second threshold; using a large language model to determine the semantic relationship between the technical topic pairs; if the semantic relationship is a consistent relationship, merging the technical topic pairs; wherein the retained technical topics will inherit the statistical attributes of the removed technical topics; if the semantic relationship is an inclusion relationship, establishing the hierarchical relationship between the technical topic pairs.
[0085] Since step S104 cannot input all generated topics and hierarchical structures into prompt words, the large model lacks a "global perspective" in the previous stage of topic construction, resulting in redundant nodes and incomplete hierarchical relationships in the generated technical topic structure. To address this, this embodiment calculates the pairwise similarity between topic nodes, filters out highly similar topic pairs (e.g., similarity threshold > 0.5), and then the large language model determines their semantic relationships from a global perspective: (1) consistent; (2) containing; (3) other.
[0086] For consistent topic pairs, a merging operation will be performed, and the retained nodes will inherit the statistical attributes of the removed nodes (topics in the original seed system will be retained first).
[0087] For topics that are identified as contained, a new edge will be created or a marker will be added to supplement the hierarchical structure between nodes, thereby making up for the lack of global information and optimizing the overall topic architecture.
[0088] The above solution is illustrated below with an example: Objective: Remove duplicate nodes, fill in missing hierarchical relationships, and optimize the global structure.
[0089] Detailed example: Detect similar nodes: "Artificial Intelligence" VS "AI" → Determined to be consistent → Merged into "Artificial Intelligence" "Artificial Intelligence" VS "Deep Learning" → Determine if it contains → Add edge: Artificial Intelligence → Deep Learning Other judgments: Convolutional Neural Networks vs. Recurrent Neural Networks → Determined irrelevant → No processing Function: Reduce redundant nodes, complete hierarchical relationships, and make the technology topic tree complete and reasonable.
[0090] Step S105: Calculate the trust level of each edge in the second knowledge graph; and generate a second technical topic system based on the trust level and the topological relationship of the second knowledge graph.
[0091] like Figure 2 As shown, in this step, relation weights are calculated, hierarchical mining is completed, and the final technology topic tree is generated. (i.e., the second technology subject system).
[0092] According to some optional embodiments of this disclosure, step S105, which calculates the trust level of each edge in the second knowledge graph, includes the following steps: reversing the direction of each edge in the second knowledge graph; taking each node in the second knowledge graph as a target node, and using the Personalized-PageRank algorithm to randomly walk among the nodes in the second knowledge graph starting from the target node; using the similarity between nodes as the weight of the edges between nodes; calculating the PageRank value of the target node in each iteration round; reversing the direction of each edge in the second knowledge graph back to its initial direction; for any edge in the second knowledge graph, determining the ratio of the PageRank value of the source node to the sum of the PageRank values of the target node in each iteration round during the Personalized-PageRank calculation starting from the target node; and using the ratio as the trust level of any edge in the second knowledge graph.
[0093] To quantify the confidence of topic relationships (edges), this disclosure introduces an edge weight confidence mechanism to distinguish which adjacent nodes are connected. For the target node More importantly, this allows us to uncover accurate hierarchical relationships and construct the final technical theme system.
[0094] The trust level is primarily calculated using the Personalized-PageRank (PPR) method with random walks, and edges are weighted based on the similarity between nodes. Before starting the algorithm, considering the characteristics of the PPR algorithm, the graph needs to be... All edges in the middle are reversed, meaning that low-level nodes point to high-level nodes, such as "machine learning → artificial intelligence".
[0095] The PPR algorithm radiates its influence outward from the source node. Let's start with "deep learning" and try to find which higher-level concept it most likely belongs to. By reversing this, the PPR's distribution direction becomes "upward convergence." If "deep learning" allocates most of its weight to "artificial intelligence," it means that in the algorithm's view, "artificial intelligence" is its most important higher-level concept.
[0096] The PPR algorithm is based on the selected node. Start by randomly walking among the nodes of the graph structure, relative to the entire graph structure The more important a node is, the higher its score will be; and the higher the score, the more likely it is to be a higher-level node.
[0097] Simultaneously, similarity is used to weight edge weights, making it easier for nodes to move towards similar nodes rather than dissimilar nodes during random walks. This effectively prevents the PPR algorithm from causing higher-level nodes to "siphon" lower-level nodes (generally, the higher the level span, the lower the topic similarity). Cosine similarity is used for similarity calculation.
[0098] Given an initial node Under the premise that the target node The PageRank value is determined by the following recursive formula: ,in, d The damping coefficient is set to 0.85. N This represents the total number of nodes in the second knowledge graph. The target node; The source node of the incoming edge of the target node; This is the set of all incoming edges pointing to the target node; This is a similarity calculation function; for point to The directed edges; for The edge of the boundary; , For the initial node When the value is 1, it is 0 otherwise.
[0099] When calculating the trust score, the following will be considered: Each node in the graph is considered a target node, and a PPR (Pressure Point Redirection) process is completed. Finally, all edges in the graph are reversed back to their initial pointers, and the PR value of each node is normalized according to the source node of the incoming edge. The resulting score is recorded as the trust score of that edge.
[0100] The numerator of this formula: In the PPR calculation of the inverted spectrum, the source node Passed to the target node Energy value (Note: here) It is a child node that serves as the starting point during the reverse calculation, but in the final formula, it is treated as the source node of the incoming edge, i.e., the parent node.
[0101] The denominator of the formula: target node The sum of the PR values of all incoming source nodes received.
[0102] This improved PageRank algorithm effectively balances the weight distribution between existing and new topics by evaluating the importance of nodes in the global network, ensuring that the system does not become structurally skewed during expansion.
[0103] The following example illustrates the scheme for calculating the trust level of each edge in the second knowledge graph in step S105: Objective: Calculate the trust level of each edge to generate the final tree.
[0104] Detailed examples: Target node: Reinforcement learning Related edges (after reversal): Reinforcement learning → Artificial intelligence Reinforcement learning → Machine learning Reinforcement learning → Imitation learning PPR algorithm calculation (iteration): Artificial intelligence: 0.35 Machine learning: 0.48 Imitation learning: 0.14 Normalization to trust level: Reinforcement learning → Artificial intelligence: 0.35 Reinforcement learning → Machine learning: 0.48 Reinforcement learning → Imitation learning: 0.14 Function: Provides an importance index for each edge, providing a basis for tree construction and parent-child node selection.
[0105] In some optional embodiments of this disclosure, step S105, which generates a second technical topic system based on trust level and the topological relationship of the second knowledge graph, includes the following steps: Step S1: Select the node with the smallest degree in the second knowledge graph as the leaf node; Step S2: Starting from the leaf node, find the parent node corresponding to the edge with the highest trust degree of each level of node in turn, and push the parent node of each level of node onto the stack until the root node with an in-degree of 0 is found. Step S3: Remove the nodes from the stack one by one, and add each removed node as a child node of the previous removed node to the second technical theme system.
[0106] This step mines the graph by constructing a stack S (the path from the first-level node to the leaf node). The hierarchical relationships within the structure are then pieced together to form the updated technical theme system. .
[0107] Figure 3 This is a schematic diagram of constructing a new technology topic tree according to an embodiment of the present disclosure, such as... Figure 3 As shown, using the topological sorting algorithm, the node with the smallest out-degree is selected as the leaf node. A node stack is constructed using a depth-first search. Starting from the leaf node, leaf nodes are added to the stack S, and the parent node at the top of the stack is searched according to the trust value (Credit) until the top node is reached. The process continues until the in-degree reaches 0. Then, nodes are sequentially removed from stack S, with each removed node added to the technology system as a child node of the previous removed node. middle.
[0108] According to some optional embodiments of this disclosure, if the parent node being sought is already in the stack, the trust levels of each edge constituting the ring are compared, and the edge with the lowest trust level is deleted; all nodes related to the ring are then removed from the stack and pushed back onto the stack.
[0109] like Figure 3 As shown, during the construction of stack S, if the top node of the stack... If the selected parent node already exists in stack S, it forms a "cycle". It is necessary to remove the cycle according to the size of each edge Credit (delete the edge with the smallest Credit) and backtrack: take out all the nodes related to the cycle from S in turn and rebuild stack S.
[0110] According to some alternative embodiments of this disclosure, after each stack is constructed, leaf nodes are deleted from the second knowledge graph, and steps S1 to S3 are repeated until the technical topics included in the second technical topic system cover all nodes in the second knowledge graph.
[0111] After each stack S is constructed, it will be from the graph Remove the leaf node, and begin a new round of leaf node selection and stack S construction, iterating in a loop until... Covering the original This continues until all nodes are connected. The final assembled technical theme system is then obtained. This is the final, incrementally updated technical theme system.
[0112] Figure 4 This is a schematic diagram of incremental updates of a technical topic tree according to an embodiment of the present disclosure, such as... Figure 4 As shown, "Nodes marked as incremental updates, the remaining nodes are seed nodes." There are themed nodes in the Central Plains.
[0113] As some optional embodiments of this disclosure, target nodes corresponding to the technical topics included in the first technical topic system are determined in the second knowledge graph; the trust degree of the edges between the target nodes is set to infinity.
[0114] In the embodiments disclosed herein, users can choose to configure a "seed system freeze" mode, which maintains the original technical system node labels and relationships unchanged, i.e., when generating the second technical theme system. Before starting, set the relationship trust score Credit in the original seed system to infinity, allowing expansion only at the outer or end nodes of the system.
[0115] When incrementally updating a knowledge graph, the biggest fear is that the newly added data will "lead astray" or "overturn" the core system (seed system) that has already been organized and confirmed by experts.
[0116] By forcibly setting the original relationship credit in the seed system to infinity, the algorithm unconditionally prioritizes edges with infinite credit when searching for parent nodes. This means the core backbone structure is "welded in" and will never be modified or interrupted by new data. New data can only expand at the ends of the core system (attached to existing leaf nodes or forming new branches).
[0117] The seed system freezing mechanism ensures the stability of the core backbone structure and prevents incremental updates from undermining the authority of the original system. At the same time, it also supports flexible selection of whether to allow modifications to the original structure based on business needs, balancing system stability with dynamic evolution capabilities.
[0118] The following example illustrates the scheme for generating the second technical subject system in step S105: Objective: To generate the final technical topic tree based on edge weights and topological relationships. Detailed examples: Leaf nodes: Meta-policies in reinforcement learning Parent node selection: Select parent node based on trust level → Ensemble learning Further up → Machine Learning → Artificial Intelligence Build the tree:
[0119] Processing ring: If a path generation contains a cycle → delete the edge with the lowest trust level → reconstruct the path. Seed system freeze mode: The core nodes and relationships remain unchanged → new nodes are only added to the periphery. Function: To obtain the complete technology topic tree after incremental updates, maintain the stability of the original system, and add the latest technology topics.
[0120] The proposed solution enhances document semantics through "pre-generated hierarchical topic chains," effectively improving the retrieval accuracy of uncontrolled technical documents. It employs a multi-hop retrieval strategy focused on "relationships" with directional constraints, ensuring the structural completeness and logical coherence of the retrieval results. By embedding structured information from the retrieval context and seed graph into prompts and collaboratively inputting it into a large model, it drives the generation of new topic chains consistent with the existing system logic, achieving incremental updates with structure awareness. This achieves the technical effect of dynamically expanding the existing technical topic structure while maintaining stability in the face of continuously added technical documents.
[0121] The solution proposed in this disclosure will be further illustrated below with reference to a specific embodiment.
[0122] 1. Scene Setting Assuming an existing technology topic tree (seed system):
[0123] Node vectors (simplified to 3D numerical values):
[0124] Edge relationship: A → B; The large model has two new outputs for document d: A → B → D; C → D; C → B Add node D New edge relationships: B → D; C → D; C → B The vector of the new node D: =[0.85,0.15,0.25] Damping factor α = 0.85 Objective: To attach D to the appropriate parent node under incremental growth.
[0125] 2. Working principle of incremental growth PPR Step 2.1: Calculate edge similarity weights Calculate the matching degree of vectors between adjacent nodes using cosine similarity:
[0126] calculate:
[0127]
[0128]
[0129] Step 2.2: PPR Iteration Nodes: A, B, C, D Edge (after reversal, used in PPR): B → A (similarity weight 0.984) D → B (Similarity weight 0.996, can be determined by node contribution or similarity) Damping factor: α = 0.85 (1) For node D: Initial personalized vector (target node D): (A, B, C, D) Iteration 0:
[0130] A, B, and C do not have initial probabilities, and D = 1 (target node). Physical meaning: Starting from the new node D, a random walk is initiated to find a reliable parent node. Iteration formula:
[0131] Iteration 1:
[0132]
[0133] result: .
[0134] Physical meaning: D has a 0.85 probability of starting to wander (initial value is 1), and there is another The probability that the influence will be transmitted to B along D→B, The probability is passed from D to C to C.
[0135] Node B has The probability that the influence will be passed from B to C will be transferred to C. The probability is transmitted to A along B→A.
[0136] There is a probability (1-0.85) that D will jump back and restart (the probability of restarting on D is 1, and the probability of restarting on other nodes is 0).
[0137] Iteration 2:
[0138]
[0139] Results of Iteration 2: .
[0140] Iteration 3:
[0141]
[0142] Results of Iteration 3: .
[0143] Iterations 4~N: Probability gradually stabilizes → Steady-state PPR Normalize the PPR scores of the source nodes B and C of the incoming edge adjacent to node D in the original graph (before the edge direction is reversed) to obtain the edge trust score:
[0144] (2) For node B: Initial personalized vector (target node B): Iteration 0:
[0145] A, C, and D do not have initial probabilities, and B = 1 (target node). Physical meaning: Starting from the new node B, a random walk is initiated to find a reliable parent node. Iteration formula:
[0146] Iteration 1:
[0147]
[0148] Results of Iteration 1: .
[0149] Physical meaning: Node B has a 0.85 probability of starting to move (initially 1; node D has no chance of refreshing or moving to it, so the probability is always 0). Additionally... The probability that the influence will be passed from B to C will be transferred to C. The probability is transmitted to A along B→A.
[0150] Node B has The probability that the influence will be passed from B to C will be transferred to C. The probability is transmitted to A along B→A.
[0151] Node B has (1 There is a probability of 0.85 that the device will jump back to restart at B (the probability of restarting at B is 1, and the probability of restarting at other nodes is 0).
[0152] Iteration 2:
[0153]
[0154] Results of Iteration 2: .
[0155] Iterations 3~N: Probability gradually stabilizes → steady-state PPR Normalize the PPR scores of the source nodes A and C adjacent to node B in the original graph (before the edge direction is reversed) to obtain the edge trust score:
[0156] At this point, the trust weights of all edges in the weighted directed graph have been calculated, and the loop stops (otherwise, all nodes would be traversed, each completing the PPR iteration and assigning trust scores to the incoming edges of the target node). The trust weights of all edges are shown in the table below:
[0157] If it is necessary to respect the original technical subject system, the credit of the original technical subject system (such as A → B) should be set to infinity (inf). Step 2.3: Stack Construction & Incremental Mounting Choose the node (D) with the smallest out-degree as the bottom of the stack. Based on trust weight, perform a depth-first search along the incoming edges, and add the items to the stack in the following order: D → B(0.636) → A(0.714) → root (root, if there are no incoming edges, point it to the root) Popping order → Top-down incremental tree generation:
[0158] According to the topological sorting rules, delete the leaf node D in the graph and find a new node (B) with the smallest out-degree as the bottom of the stack.
[0159] Based on trust weight, perform a depth-first search along the incoming edges, and add the results sequentially to the stack. The order of addition to the stack is as follows: B → A(0.714) → root (root, if there are no incoming edges, point it to the root) Popping order → Generate incremental tree from top to bottom (if nodes A and B already exist, the tree remains unchanged):
[0160] According to the topological sorting rules, delete leaf node B in the graph and find a new node (C) with the smallest out-degree as the bottom of the stack.
[0161] Based on trust weight, perform a depth-first search along the incoming edges, and add the items to the stack in the following order: C → root (root, if there are no incoming edges, point to the root) Popping order → Top-down incremental tree generation:
[0162] At this point, the tree contains all the nodes of the original graph, and the loop iteration stops.
[0163] Physical meaning: D is attached as a leaf node to the most reliable parent node B, and B is attached to the most reliable parent node A. If Credit (e.g., A → B) should be set to infinity (inf), the original tree structure will remain stable during incremental growth.
[0164] The technical solution proposed in this disclosure provides core technical advantages for automated tools products that automatically construct and expand the technical subject system, giving them unique value and competitiveness compared with existing mainstream solutions when solving the core challenge of "dynamic incremental updates".
[0165] The algorithm proposed in this disclosure essentially reconstructs the incremental update of the technical topic system into a problem of "controllable knowledge generation and fusion based on structured context," rather than a traditional "classification and discrimination" or "structure matching" problem. Compared with existing technologies (such as TaxoExpan, TEMP, or fragmented applications based on retrieval enhancement), the technical solution proposed in this disclosure brings significant benefits to the product in the following aspects: 1) It achieves precise dynamic expansion under the premise of structural stability.
[0166] Compared to existing methods that search for optimal attachment points on a "static seed system," this approach precisely captures the local knowledge graph structure most relevant to the newly added technical concepts through "relationship-oriented retrieval" in step S103, and embeds this context to generate prompts. The new topic chains generated by the large model in step S104 are naturally constrained by the existing system architecture and logic. Combined with a "system freezing" mechanism, the absolute stability of the core backbone structure is ensured, while allowing for the safe expansion of leaf nodes. This enables the technical topic tree output by the product to reflect the latest technological developments while maintaining consistency and comparability over long-term evolution, solving the problem of traditional reconstruction methods destroying historical analysis benchmarks.
[0167] 2) Significantly improved adaptability to uncontrolled and non-standard technical documents.
[0168] Existing self-supervised or structure-feature-based methods show a significant decline in performance when processing real-world technical documents that are semantically ambiguous, loosely expressed, and have low information density. Step S102 of this disclosure (generating structured queries for unstructured documents) pre-generates a "hierarchical topic chain" through instructions driving a large model. This effectively performs a structured information purification and semantic enhancement on the original document, transforming non-standard text into query pairs with logical relationships. This allows subsequent retrieval and generation processes to proceed within a clearer and more focused semantic space, greatly improving the product's robustness and accuracy on complex real-world data sources.
[0169] 3) A better balance has been achieved between effectiveness and efficiency.
[0170] Compared to self-supervised models that require extensive fine-tuning for specific domains, the proposed solution leverages the fundamental capabilities of general-purpose large language models and combines them with the RAG framework to achieve domain adaptation. This reduces the dependence on model training and data annotation, enhancing the product's agility in rapidly adapting to new domains. Furthermore, compared to fragmented solutions that separate "topic recognition" and "relationship mounting" into two steps, step S104 (retrieval context-driven generation) in this solution integrates "retrieval-recognition-mounting," generating a complete new topic chain that can be integrated into the existing system in a single inference step. This reduces the number of model calls and overall computational overhead, making the product more efficient in scenarios with high-frequency incremental updates.
[0171] In summary, this disclosure provides automation tool products with a more adaptable, efficient, and controllable incrementally extended core algorithm. It demonstrates a differentiated competitive advantage in both product functionality and engineering practicality.
[0172] This disclosure provides an incremental update apparatus for a technical topic tree, such as... Figure 5 As shown, the device 50 may include: a conversion module 501, a first processing module 502, a second processing module 503, a third processing module 504, and a generation module 505, wherein, The conversion module 501 is used to convert the first technical topic system into a first knowledge graph and generate a structured topic description for each node of the first knowledge graph.
[0173] The first processing module 502 is used to compress and structure the information of the newly added document using a large language model to generate one or more first topic chains; wherein, the first topic chain includes technical topics that can represent the core content of the document and their hierarchical relationships.
[0174] The second processing module 503 is used to retrieve relations related to the first topic chain in the first knowledge graph, and to perform multi-hop expansion of the relations with directional constraints to determine the target number of relations; wherein, the relations are the edges of the knowledge graph.
[0175] The third processing module 504 is used to input the relationship of the target quantity as context information into the large language model for processing and output the second topic chain; update the new technical topics included in the second topic chain and the hierarchical relationship between the new technical topics and the technical topics included in the first technical topic system to the first knowledge graph to generate the second knowledge graph.
[0176] The generation module 505 is used to calculate the trust degree of each edge in the second knowledge graph; and to generate a second technical topic system based on the trust degree and the topological relationship of the second knowledge graph.
[0177] The apparatus of this disclosure embodiment can execute the method provided in this disclosure embodiment, and its implementation principle is similar, and it has corresponding technical effects. The actions performed by each module in the apparatus of each embodiment of this disclosure correspond to the steps in the method of each embodiment of this disclosure. For a detailed functional description of each module of the apparatus, please refer to the description in the corresponding method shown above, and it will not be repeated here.
[0178] This disclosure provides an electronic device including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method provided in any optional embodiment of this disclosure. Compared with the prior art, this achieves the technical effect of dynamically expanding while maintaining the stability of the original technical subject structure when facing continuously added technical documents. In one alternative embodiment, an electronic device is provided, such as Figure 6 As shown, Figure 6 The illustrated electronic device 6000 includes a processor 6001 and a memory 6003. The processor 6001 and the memory 6003 are connected, for example, via a bus 6002. Optionally, the electronic device 6000 may further include a transceiver 6004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 6004 is not limited to one type, and the structure of the electronic device 6000 does not constitute a limitation on the embodiments of this disclosure.
[0179] Processor 6001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. Processor 6001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0180] Bus 6002 may include a pathway for transmitting information between the aforementioned components. Bus 6002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 6002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0181] The memory 6003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0182] The memory 6003 stores computer programs that execute embodiments of the present disclosure and is controlled by the processor 6001. The processor 6001 executes the computer programs stored in the memory 6003 to implement the steps shown in the foregoing method embodiments.
[0183] Electronic devices include, but are not limited to, computer equipment. This disclosure provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0184] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0185] It should be understood that although arrows indicate various operation steps in the flowcharts of the embodiments of this disclosure, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of the embodiments of this disclosure, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured as required, and the embodiments of this disclosure do not limit this.
[0186] The above description is only an optional implementation method for some implementation scenarios of this disclosure. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this disclosure without departing from the technical concept of this disclosure also fall within the protection scope of the embodiments of this disclosure.
Claims
1. A method for incrementally updating a technology topic tree, characterized in that, include: The first technical topic system is transformed into a first knowledge graph, and a structured topic description is generated for each node of the first knowledge graph; The newly added documents are compressed and structured using a large language model to generate one or more first topic chains; wherein the first topic chain includes technical topics that can characterize the core content of the document and their hierarchical relationships; Retrieve relationships related to the first topic chain in the first knowledge graph, and perform multi-hop expansion with directional constraints on the relationships to determine the target number of relationships; wherein, the relationships are the edges of the knowledge graph; The multi-hop expansion of the relationship with directional constraints to determine the target number of relationships includes: performing multi-hop expansion in the inbound and outbound directions of the relationship respectively; sorting the relationships according to their weighted scores, and determining the relationship with the highest score for the target number of relationships; The relationship of the target quantity is input as context information into the large language model for processing, and a second topic chain is output; the newly added technical topics included in the second topic chain and the hierarchical relationship between the newly added technical topics and the technical topics included in the first technical topic system are updated to the first knowledge graph to generate a second knowledge graph; Calculate the trust level of each edge in the second knowledge graph; and generate a second technical topic system based on the trust level and the topological relationship of the second knowledge graph; The calculation of the trust level of each edge in the second knowledge graph includes: reversing the direction of each edge in the second knowledge graph; taking each node in the second knowledge graph as a target node, and using the Personalized-PageRank algorithm to randomly walk among the nodes in the second knowledge graph starting from the target node; using the similarity between nodes as the weight of the edges between the nodes; calculating the PageRank value of the target node in each iteration round; reversing the direction of each edge in the second knowledge graph back to its initial direction; for any edge in the second knowledge graph, determining the ratio of the PageRank value of the source node to the sum of the PageRank values of the target node in each iteration round during the Personalized-PageRank calculation starting from the target node; and using the ratio as the trust level of any edge in the second knowledge graph. The generation of the second technical topic system based on the trust degree and the topological relationship of the second knowledge graph includes: step S1, selecting the node with the smallest out-degree in the second knowledge graph as a leaf node; step S2, starting from the leaf node, sequentially finding the parent node corresponding to the edge with the highest trust degree of each level of node, and pushing the parent node of each level of node onto the stack, until the root node with an in-degree of 0 is found; step S3, sequentially removing the nodes from the stack, and adding each removed node as a child node of the previous removed node to the second technical topic system.
2. The method according to claim 1, characterized in that, The process of converting the first technical topic system into the first knowledge graph includes: The technical topics included in the first technical topic system are used as nodes of the first knowledge graph; The directed edges of the first knowledge graph are determined based on the hierarchical relationships between the technical topics.
3. The method according to claim 1 or 2, characterized in that, The step of generating a structured topic description for each node of the first knowledge graph includes: The information of each node in the first knowledge graph and its neighboring nodes is input into the large language model as context information, and the structured topic description of each node is output.
4. The method according to claim 1, characterized in that, The step of retrieving relationships related to the first topic chain in the first knowledge graph includes: The first topic chain is broken down into topic keyword queries and relationship pair queries; Semantic vectorization is performed on each edge of the first knowledge graph to obtain the semantic vector corresponding to each edge of the first knowledge graph. Calculate the similarity between the semantic vector corresponding to each edge and the topic word query and relation pair query, respectively; Edges with similarity values greater than a first threshold are identified as relationships related to the first topic chain.
5. The method according to claim 1, characterized in that, After outputting the second topic chain, the method further includes: Calculate the pairwise similarity between the technical topics included in the second topic chain; Identify the pairs of technical topics whose pairwise similarity is greater than the second threshold; The semantic relationships between the pairs of technical topics are determined using a large language model. If the semantic relationship is consistent, the technical topic pairs will be merged; wherein, the retained technical topics will inherit the statistical attributes of the removed technical topics; If the semantic relationship is an inclusion relationship, establish the hierarchical relationship between the technical topic pairs.
6. The method according to claim 1, characterized in that, Given an initial node Under the premise that the target node The PageRank value is determined by the following recursive formula: ,in, d The damping coefficient is set to 0.
85. The target node; The source node of the incoming edge of the target node; This is the set of all incoming edges pointing to the target node; This is a similarity calculation function; for point to The directed edges; for The edge of the boundary; , For the initial node When the value is 1, it is 0 otherwise.
7. The method according to claim 1, characterized in that, The method further includes: If the parent node being sought is already in the stack, compare the trust scores of each edge forming the cycle and delete the edge with the lowest trust score. All nodes related to the ring are sequentially removed from the stack and pushed back onto the stack.
8. The method according to claim 1, characterized in that, The method further includes: After each stack is constructed, the leaf node is deleted from the second knowledge graph, and steps S1 to S3 are repeated until the technical topics included in the second technical topic system cover all nodes in the second knowledge graph.
9. The method according to claim 1, characterized in that, The method further includes: In the second knowledge graph, identify the target nodes corresponding to the technical topics included in the first technical topic system; Set the trust level of the edges between the target nodes to infinity.
10. An incremental update device for a technology topic tree, characterized in that, include: The conversion module is used to convert the first technical topic system into a first knowledge graph, and generate a structured topic description for each node of the first knowledge graph; The first processing module is used to compress and structure the newly added document using a large language model to generate one or more first topic chains; wherein, the first topic chain includes technical topics that can characterize the core content of the document and their hierarchical relationships; The second processing module is used to retrieve relationships related to the first topic chain in the first knowledge graph, and to perform multi-hop expansion with directional constraints on the relationships to determine the target number of relationships; wherein, the relationships are the edges of the knowledge graph; The second processing module is further configured to perform multi-hop expansion in the inbound and outbound directions of the relation respectively; sort the relations according to their weighted scores, and determine the relation with the highest score for the target number of relations; The third processing module is used to input the relationship of the target quantity as context information into the large language model for processing, and output the second topic chain; update the newly added technical topics included in the second topic chain and the hierarchical relationship between the newly added technical topics and the technical topics included in the first technical topic system to the first knowledge graph, and generate the second knowledge graph. A generation module is used to calculate the trust level of each edge in the second knowledge graph; and to generate a second technical topic system based on the trust level and the topological relationship of the second knowledge graph. The generation module is further configured to: reverse the direction of each edge in the second knowledge graph; take each node in the second knowledge graph as a target node, and use the Personalized-PageRank algorithm to randomly walk among the nodes in the second knowledge graph starting from the target node; use the similarity between nodes as the weight of the edges between the nodes; calculate the PageRank value of the target node in each iteration round; reverse the direction of each edge in the second knowledge graph back to its initial direction; for any edge in the second knowledge graph, determine the ratio of the PageRank value of the source node to the sum of the PageRank values of the target node in each iteration round during the Personalized-PageRank calculation starting from the target node; and use the ratio as the confidence level of any edge in the second knowledge graph. The generation module is further configured to perform the following steps: Step S1, select the node with the smallest out-degree in the second knowledge graph as a leaf node; Step S2, starting from the leaf node, sequentially find the parent node corresponding to the edge with the highest trust degree of each level of node, and push the parent node of each level of node onto the stack until the root node with an in-degree of 0 is found; Step S3, sequentially remove the nodes from the stack, and add each removed node as a child node of the previous removed node to the second technical topic system.
11. An electronic device, comprising: A memory, a processor, and a computer program stored on the memory, characterized in that the processor executes the computer program to implement the method of any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 9.