An adaptive fusion sparse knowledge graph completion method and related equipment

By calculating multi-dimensional scores and generating dynamic fusion weights, the problem of insufficient information utilization in sparse knowledge graphs is solved, and adaptive multi-source information collaborative utilization is realized, which improves the accuracy and robustness of sparse knowledge graph completion.

CN122490414APending Publication Date: 2026-07-31XI AN JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XI AN JIAOTONG UNIV
Filing Date
2026-04-30
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing knowledge graph completion methods fail to adaptively and fully utilize effective supporting information in sparse knowledge graph scenarios, resulting in limited candidate coverage and accurate discrimination of entities in long-tail regions, and insufficient accuracy and robustness of the completion results.

Method used

By acquiring candidate triples and calculating multi-dimensional scores, including basic structure score, basic semantic score, path topology score and structural prototype score, normalization processing and statistical feature concatenation are performed to generate dynamic fusion weights, thereby achieving adaptive evaluation of each score channel and collaborative utilization of multi-source information.

Benefits of technology

It improves the accuracy and robustness of completion results in sparse knowledge graph scenarios, enhances the completeness and knowledge service capabilities of knowledge graphs, and solves the completion problem caused by sparsity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122490414A_ABST
    Figure CN122490414A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of knowledge graph technology and discloses an adaptive fusion method and related equipment for sparse knowledge graph completion. By acquiring candidate triples and calculating multi-dimensional scores, the method enriches the sources of supporting information and effectively solves the problem of insufficient information mining in existing methods. Through multi-score channel normalization processing, the comparability of information in each dimension is ensured. Dynamic fusion weights are generated by combining statistical features to achieve adaptive evaluation of the contribution of each score channel, overcoming the drawbacks of fixed fusion methods. This method can fully utilize multi-source information, improve the coverage and accurate discrimination of long-tail entity candidates, enhance the accuracy and robustness of completion results in sparse knowledge graph scenarios, effectively improve the completion problem caused by the sparsity of knowledge graphs, and improve the completeness and knowledge service capabilities of knowledge graphs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of knowledge graph technology, specifically an adaptive fusion sparse knowledge graph completion method and related equipment. Background Technology

[0002] Knowledge graphs organize entities and relationships in the form of triples and are an important foundation for tasks such as intelligent question answering and semantic retrieval. However, due to various factors, real-world knowledge graphs generally suffer from missing facts and incomplete structures. Knowledge graph completion technology is a key means to solve this problem and improve knowledge service capabilities.

[0003] In practical applications, knowledge graphs exhibit significant sparsity and long-tail characteristics. There are few known facts related to a large number of entities, and the local neighborhood structure is insufficient to support them. This leads to significant differences in the observable supporting information of different queries to be completed, which limits the applicability of traditional completion methods in sparse regions.

[0004] The current mainstream knowledge graph completion methods are mainly divided into two categories. One category is based on local graph structure modeling, relying on the neighborhood topology of entities to complete the inference of missing triples. The other category is to enhance the model by combining external information such as text semantics, and to make up for the deficiencies of local structure by introducing multi-source information. Both methods can improve the fact prediction ability to a certain extent and are suitable for entity completion scenarios with dense local connections.

[0005] Existing technical solutions still have significant shortcomings in sparse knowledge graph scenarios. The core problem is the failure to adaptively and fully utilize effective supporting information to achieve accurate completion. Specifically, on the one hand, existing methods have limitations in utilizing effective supporting information. The information sources are singular and insufficiently mined. For entities in long-tail regions, due to insufficient local topological clues and the lack of sufficient collaborative mining of extra-graph semantics, cross-regional structural analogies, and potential higher-order associations, the candidate coverage and accurate discrimination capabilities are limited. On the other hand, even if some methods introduce multi-source heterogeneous information, they adopt fixed information modeling and fusion methods, which cannot adaptively evaluate the actual contribution of each information channel according to the current query, making it difficult to prioritize the use of supporting information with greater discriminative value, ultimately affecting the accuracy and robustness of the completion results. Summary of the Invention

[0006] This invention provides an adaptive fusion method and related equipment for sparse knowledge graph completion, which solves the problems of insufficient local topological support, scattered multi-source information, and dynamic changes in information contribution under different query conditions in sparse knowledge graphs.

[0007] To achieve the above objectives, the present invention provides the following technical solution: An adaptive fusion method for sparse knowledge graph completion includes: Retrieve candidate triples from the knowledge graph; Calculate the basic structure score, basic semantic score, path topology score, and structural prototype score of the candidate triples respectively; A candidate set is generated based on the infrastructure score and the basic semantic score; The basic structure score, basic semantic score, path topology score, and structural prototype score of all candidate entities in the candidate set are normalized in each score channel to obtain the normalized score of each score channel. The statistical features of the normalized scores of each score channel on the current candidate set are extracted separately. The statistical features of each score channel are concatenated to obtain the fusion feature vector of the current query. The fusion feature vector is input into the weight generation network to obtain the dynamic fusion weight of each score channel. The normalized scores of each score channel are weighted and summed according to the dynamic fusion weight to obtain the final fusion score of the candidate triple. The candidate entities are sorted according to the final fusion score, and the completion result is output.

[0008] Preferably, calculating the basic structure score of candidate triples specifically includes: The RotatE model is used to learn the embedding representations of head entities, relations, and candidate tail entities, and the infrastructure score is calculated based on the rotational interaction relationship of the three in the complex embedding space. The calculation method for the infrastructure score is as follows:

[0009] in, , , These represent the embedding representations of the head entity, relation, and candidate tail entity, respectively. This represents the Hadamard product.

[0010] Preferably, the steps for calculating the basic semantic score of candidate triples specifically include: Construct an enhanced query text, wherein the enhanced query text includes relational semantic information, external background information, local structural factual information, and reference example information; The enhanced query text is used as the query-side input, and the name and text description of the candidate tail entity are used as the entity-side input, and then input into the semantic coding model respectively. Extract sentence-level semantic representation from query output Sentence-level semantic representation output from the entity side ; The sentence-level semantic representation is subjected to linear projection and normalization to obtain the query semantic vector. and candidate entity semantic vectors ; Calculate the dot product similarity between the two, which serves as the underlying semantic score: .

[0011] Preferably, calculating the path topology score of candidate triples specifically includes: Retrieve multi-hop relationship paths between head entities and candidate tail entities, group paths with the same relationship type sequence into path patterns, and obtain a set of candidate paths and the frequency of each path pattern; The relational sequences of each path pattern are input into a bidirectional long short-term memory network for encoding, and the path representations of each path pattern are obtained by aggregating them through a step-by-step attention mechanism. ; The query anchor vector is constructed by concatenating the embedded representations of the head entity, relation, and candidate tail entity. ; According to the path representation Query anchor vector And based on path frequency characteristics, calculate the contribution weight of each path pattern. The path representations are then weighted and aggregated according to the contribution weights to obtain the path topology representation. ; Map the path topology representation to the path topology score. .

[0012] Preferably, the structural prototype score of the candidate triplet is calculated, including: Using the embedded representation of the head entity as the retrieval anchor, candidate prototype entities are jointly selected from the entity set based on vector similarity, relational constraints, and statistical priors to form a structural prototype pool. ; The embedded representations of the head entity, relation, and tail entity of the candidate triples are concatenated and a query vector is constructed using linear projection. ; For each prototype entity in the structural prototype pool, a key vector and a value vector are constructed. An attention weight is calculated based on the correlation between the query vector and the key vector, wherein a relation-aware temperature coefficient is introduced to adjust the attention distribution. The value vectors of the prototype entities are weighted and aggregated according to the attention weights to obtain the structural prototype representation. The structural prototype representation is then mapped to the structural prototype score. .

[0013] Preferably, the final fusion score of the candidate triples is calculated, specifically including: For each scoring channel, perform max-min normalization on the unified candidate set to obtain the normalized score. ; The mean and variance of the normalized scores for each scoring channel are calculated as statistical features and concatenated to form a fusion feature vector. The fused feature vector is input into a multilayer perceptron and normalized using Softmax to obtain the dynamic fusion weights for each scoring channel. ; The final fusion score is obtained by weighted summation as follows:

[0014] .

[0015] An adaptive fusion sparse knowledge graph completion system includes: Data acquisition module: used to acquire candidate triples in the knowledge graph; Calculation module: used to calculate the basic structure score, basic semantic score, path topology score, and structural prototype score of candidate triples respectively; Candidate set generation module: used to generate candidate sets based on infrastructure score and basic semantic score; The scoring processing module is used to normalize the basic structure score, basic semantic score, path topology score, and structural prototype score of all candidate entities in the candidate set within each scoring channel to obtain the normalized score for each scoring channel. Fusion module: used to extract the statistical features of the normalized scores of each score channel on the current candidate set, concatenate the statistical features of each score channel to obtain the fusion feature vector of the current query, input the fusion feature vector into the weight generation network to obtain the dynamic fusion weight of each score channel, and perform weighted summation of the normalized scores of each score channel according to the dynamic fusion weight to obtain the final fusion score of the candidate triple. The completion module is used to sort candidate entities according to the final fusion score and output the completion result.

[0016] A computer device includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement an adaptive fusion sparse knowledge graph completion method.

[0017] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of an adaptive fusion sparse knowledge graph completion method.

[0018] A computer program product includes a computer program that, when executed by a processor, implements the steps of an adaptive fusion sparse knowledge graph completion method.

[0019] Compared with existing technologies, the present invention has the following beneficial effects: The present invention provides an adaptive fusion sparse knowledge graph completion method. By obtaining candidate triples and calculating multi-dimensional scores, it enriches the sources of supporting information, effectively solving the problem of insufficient information mining in existing methods. Through multi-score channel normalization processing, it ensures the comparability of information in each dimension. By combining statistical features to generate dynamic fusion weights, it achieves adaptive evaluation of the contribution of each score channel, overcoming the drawbacks of fixed fusion methods. This method can fully utilize multi-source information, improve the coverage and accurate discrimination of long-tail entity candidates, enhance the accuracy and robustness of completion results in sparse knowledge graph scenarios, effectively improve the completion problem caused by the sparsity of knowledge graphs, and improve the completeness and knowledge service capabilities of knowledge graphs. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart of an adaptive fusion sparse knowledge graph completion method according to an embodiment of the present invention; Figure 2 This is a framework diagram of the adaptive fusion sparse knowledge graph according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the construction of the prompt text in an embodiment of the present invention; Figure 4 This is a schematic diagram of the path topology representation construction according to an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the structural prototype of an embodiment of the present invention; Figure 6 This is a block diagram of an adaptive fusion sparse knowledge graph completion system according to an embodiment of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0023] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0024] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0025] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.

[0026] like Figure 1 As shown, this invention provides an adaptive fusion method for sparse knowledge graph completion, including: S1: Obtain candidate triples from the knowledge graph; S2: Calculate the basic structure score, basic semantic score, path topology score, and structural prototype score of the candidate triples respectively; S3: Generate a candidate set based on the basic structure score and basic semantic score; S4: Normalize the basic structure score, basic semantic score, path topology score, and structural prototype score of all candidate entities in the candidate set within each score channel to obtain the normalized score for each score channel. S5: Extract the statistical features of the normalized scores of each score channel on the current candidate set, concatenate the statistical features of each score channel to obtain the fusion feature vector of the current query, input the fusion feature vector into the weight generation network to obtain the dynamic fusion weight of each score channel, and perform weighted summation of the normalized scores of each score channel according to the dynamic fusion weight to obtain the final fusion score of the candidate triplet. S6: Sort the candidate entities according to the final fusion score and output the completion result.

[0027] By acquiring candidate triples and calculating multi-dimensional scores, this method enriches the sources of supporting information and effectively solves the problem of insufficient information mining in existing methods. Through multi-score channel normalization, the comparability of information in each dimension is ensured. Dynamic fusion weights are generated by combining statistical features to achieve adaptive evaluation of the contribution of each score channel, overcoming the drawbacks of fixed fusion methods. This method can fully utilize multi-source information, improve the coverage and accurate discrimination of long-tail entity candidates, enhance the accuracy and robustness of completion results in sparse knowledge graph scenarios, effectively improve the completion problem caused by the sparsity of knowledge graphs, and improve the completeness and knowledge service capabilities of knowledge graphs.

[0028] Adaptive fusion sparse knowledge graph framework such as Figure 2 As shown, the detailed steps are as follows: (1) Obtain the query triples Taking the tail entity prediction task as an example, given the query triples to be completed:

[0029] in, This indicates that the query needs to be completed. Indicates the head entity. Indicates a relationship. and These represent the entity set and relation set in the knowledge graph, respectively. This represents the tail entity to be predicted.

[0030] For any candidate tail entity The corresponding candidate triple can be represented as The goal of the tail entity prediction task is to predict the tail entity set. In the middle, for candidate tail entities Evaluate and rank, and determine and query. The entity with the highest matching degree is used as the prediction result.

[0031] (2) Constructing basic structural representation In sparse knowledge graph completion tasks, the structural rationality of candidate triples is an important basis for entity identification. Regarding the candidate triples obtained in step (1)... This invention employs the RotatE model to construct the basic structural representation, learning the embedding representations of head entities, relations, and candidate tail entities respectively, and calculating the basic structural score of candidate triples based on the rotational interaction relationships of these three entities in the complex embedding space. The structural score is expressed as:

[0032] in, , , These represent the embedding representations of the head entity, relation, and candidate tail entity, respectively. This represents the Hadamard product. This represents the matching score of the candidate triple in the structural embedding space. This score is used to characterize the degree of matching between the candidate tail entity and the current query at the graph structure level, and serves as a structural discrimination signal for subsequent candidate generation and multi-source fusion ranking.

[0033] (3) Constructing basic semantic representations In sparse knowledge graph completion tasks, some entities have limited local neighborhood structures, making it difficult to obtain sufficient discriminative information solely through structural embedding. To compensate for the impact of insufficient structural information, this invention further constructs a basic semantic representation to characterize the semantic matching relationship between queries and candidate entities.

[0034] This invention employs DeBERTa as a semantic encoding model to semantically encode query-related text. This model utilizes a decoupled attention mechanism to model text content information and location information separately, and explicitly characterizes the interaction between the two, thereby enhancing the representation capability of key semantic clues and providing a text representation foundation for subsequent semantic matching.

[0035] For queries that need to be completed This invention constructs query-oriented prompt text. For example... Figure 3 As shown, the prompt text includes four types of information: relation rewriting, external corpus enhancement, local structure injection, and few-shot paradigm retrieval. Relation rewriting clarifies the semantic constraints of the target relation; external corpus enhancement supplements the background semantics of the entity or relation; local structure injection introduces known structural facts from the query's neighborhood; and few-shot paradigm retrieval provides reference examples similar to the current query's relational pattern. Thus, the original query is transformed into enhanced query text containing relational semantics, external background, local structure, and factual references.

[0036] Subsequently, the enhanced query text is used as the query-side input, and the names and text descriptions of the candidate tail entities are used as the entity-side input, and these are respectively input into the DeBERTa encoder. For the query-side input, the DeBERTa output is extracted from... The position vector, used as a semantic representation of the query sentence, is denoted as... For entity-side input, extract the corresponding output results. The position vector, as a sentence-level semantic representation of the candidate entity, is denoted as... Then, a linear projection layer is used to map the two to the same semantic representation space:

[0037] in, Represents the linear projection matrix. Indicates the bias term. and These represent the projected query semantic representation and the candidate entity semantic representation, respectively. Further, the projected semantic representation is then... Normalization yields the query semantic vector and the candidate entity semantic vector:

[0038] in, and These represent the normalized query semantic vector and the candidate entity semantic vector, respectively.

[0039] Based on this, the dot product similarity between the query semantic vector and the candidate entity semantic vector is calculated to obtain the basic semantic score of the candidate tail entity:

[0040] in, Indicates a candidate triplet. Matching score in semantic space. This score serves as the basic semantic discrimination signal for candidate tail entities, and is used for subsequent dual-channel candidate generation and multi-source fusion ranking.

[0041] (4) Constructing path topology representation In sparse knowledge graph completion tasks, the first-order structural information relied upon by candidate triples is often limited due to incomplete local neighborhoods and insufficient observation of direct relationships, making it difficult to provide sufficient and stable structural support for entity discrimination. In contrast, multi-hop relationship paths between the head entity and the candidate tail entity can reflect their indirect reachability in the graph structure and provide higher-order topological clues for inferring missing facts. Based on this, this invention constructs a path topology representation, and extracts higher-order structural support information related to the current candidate triples by encoding, weighting, and aggregating multi-hop relationship paths. Specifically, as follows... Figure 4 As shown.

[0042] For candidate triples First, retrieve the header entity. With candidate tail entities Multi-hop relationship paths between them. Since different paths may have the same relationship type sequence, this invention groups paths with the same relationship type sequence into the same path pattern and counts the number of times they appear in the current search results to obtain a candidate path set:

[0043] in, Represents head entity With candidate tail entities The set of candidate paths between Indicates the first Types of path patterns This indicates the number of times the path pattern appears in the current search results. Indicates the number of path patterns.

[0044] Subsequently, each path pattern in the candidate path set is encoded. For each path pattern... Its relational sequence is denoted as ,in The path length is represented. After converting the relation sequence into a relation embedding sequence, it is input into a bidirectional long short-term memory network for context modeling, and key relation steps in the path are highlighted through a step-level attention mechanism to obtain the path representation. This process can be represented as:

[0045] in, Representing path pattern The Middle An embedded representation of a relation. Indicates the corresponding context state, Indicates step-level attention weights. Representing path pattern The path representation.

[0046] After obtaining the representations of each path, the contribution weights of different path patterns to the current candidate triples are further calculated. Specifically, the query anchor vector is constructed by concatenating the embedding representations of the head entity, relation, and candidate tail entity:

[0047] in, This represents the query anchor vector corresponding to the candidate triples, used to guide path importance evaluation. Subsequently, it is combined with the path representation. Query anchor vector and path frequency characteristics Calculation path pattern Contribution weight:

[0048] in, Indicates path frequency Frequency features obtained by normalization Representing path pattern The contribution weight to the current candidate triplet.

[0049] Finally, the path representations are weighted and aggregated according to their path contribution weights to obtain the path topology representations of the candidate triples, which are then further mapped to path topology scores:

[0050]

[0051] in, The path topology representation of candidate triples. This represents the path topology score of the candidate triples. This score is used to characterize the degree of higher-order structural support of multi-hop relation paths for the probability of the candidate triples being valid, and serves as a path topology discrimination signal for subsequent multi-source fusion ranking.

[0052] (5) Constructing structural prototype representations In sparse knowledge graph completion tasks, the local neighborhoods and reachable paths of some candidate triples may still be insufficient, making it difficult to obtain sufficient structural evidence by relying solely on basic structural representations and path topology representations. To further supplement non-local topological information under conditions of insufficient local structure, this invention constructs structural prototype representations. By retrieving prototype entities similar to the currently queried structural role from the global entity scope, and then filtering and aggregating them, supplementary structural discrimination signals are provided for candidate triples. Specifically, as follows... Figure 5 As shown.

[0053] For queries that need to be completed First, with the head entity The embedding is represented as a retrieval anchor from the entity set. The middle filter is based on the proximity of the head entity in the embedding space and the relationship. Candidate prototype entities with structural relationships. To reduce the influence of noisy prototypes, this invention jointly screens candidate prototypes from three aspects: vector similarity, relational constraints, and statistical priors, resulting in a structural prototype pool:

[0054] in, Indicates a query The constructed structural prototype pool, and Representing entities respectively With head entity Embedded representation, Represents the similarity between entity vectors. Representing entities With Relationship Relevant structural constraints, This indicates a correction term that includes statistical prior information. This indicates that the scores of those who scored higher are selected. A prototype entity.

[0055] After obtaining the structural prototype pool, a query vector for candidate triples is constructed. Specifically, the candidate triples are... The embedding representations of the head entity, relation, and candidate tail entity are concatenated and then linearly projected to obtain the query vector:

[0056] in, This represents the query vector corresponding to the candidate triplet. This represents the projection matrix.

[0057] Subsequently, for each prototype entity in the structural prototype pool Construct key vectors and value vectors, denoted as follows: and The key vector is used to calculate the correlation between the prototype entity and the current candidate triplet, while the value vector carries the structural compensation information of the prototype entity. Based on the correlation between the query vector and the key vector, the prototype entity... The attention weights can be expressed as:

[0058] in, Represents the prototype entity The contribution weight of the current candidate triplet Represents the dimension of the key vector. This represents the relationship-aware temperature coefficient, used to adjust the attention distribution under different relationship types. This indicates the number of prototypes in the prototype pool.

[0059] Finally, the value vectors in the structural prototype pool are weighted and aggregated according to the attention weights to obtain the structural prototype representation of the candidate triples, and then mapped to the structural prototype score:

[0060]

[0061] in, Indicates candidate triples Structural prototype representation, and This represents the structural prototype score mapping parameters. This represents the structural prototype score of the candidate triples. This score characterizes the degree to which the nonlocal structural prototypes provide supplementary topological support to the current candidate triples, and serves as a structural prototype discrimination signal for subsequent multi-source fusion ranking.

[0062] (6) Generate the basic candidate set For queries that need to be completed This invention generates a candidate set based on the infrastructure score obtained in step (2) and the basic semantic score obtained in step (3). Specifically, firstly, based on the infrastructure score... For entity sets The candidate tail entities are sorted, and the entities with the highest scores are selected to form a candidate structure set:

[0063] Then, based on the basic semantic score For entity sets The candidate tail entities are sorted, and the entities with the highest scores are selected to form a semantic candidate set:

[0064] Finally, the structural candidate set and the semantic candidate set are merged and duplicate entities are removed to obtain a unified candidate set:

[0065] in, Represents the candidate set of structures. Represents a semantic candidate set, This represents a unified candidate set. This step is used to narrow down the candidate range in the subsequent fusion and ranking stages, while also covering both structurally relevant and semantically relevant candidates.

[0066] (7) Perform adaptive fusion sorting After the aforementioned steps, for the unified candidate set Any candidate tail entity in The present invention obtains basic structure scores respectively. Basic semantic score Path topology score and structural prototype score Because different scoring channels have different numerical ranges and distribution patterns, directly using fixed weights for fusion can easily weaken the role of the highly reliable channel in the current query. Therefore, this invention dynamically generates fusion weights based on the output distribution of each channel in the current candidate set, and uses this weighting to sort the candidate entities.

[0067] Let the first Each scoring channel is used for candidate entities. The original score is ,in First, in the current candidate set The scores for each channel are then normalized using a min-max normalization method to obtain the normalized scores:

[0068] in, Indicates the first Normalized scores for each channel, This represents the unified candidate set corresponding to the current query.

[0069] Subsequently, statistical features are extracted based on the normalized score distribution of each channel in the current candidate set. Specifically, the mean and variance of the normalized score for each channel are calculated, and the statistical features of each channel are concatenated to obtain the fused feature vector corresponding to the current query.

[0070] in, and They represent the first The normalized mean and variance of the scores of each channel on the current candidate set. This represents the fused feature vector of the current query.

[0071] Next, the fused feature vectors are input into the weight generation network, and the dynamic fused weights of each score channel under the current query are obtained through Softmax normalization:

[0072] in, , representing the fusion weights of the basic structure channel, basic semantic channel, path topology channel, and structural prototype channel, respectively.

[0073] Finally, the normalized scores of each channel are weighted and summed according to the dynamic fusion weights to obtain the final fusion score of the candidate triples:

[0074]

[0075] in, Indicates candidate triples The final fusion score for the unified candidate set. Candidate entities are sorted in descending order of their scores, and the candidate entity with the highest score is used as the tail entity prediction result.

[0076] (8) Output the prediction results of missing entities Based on the final fusion score obtained in step (7) For a unified candidate set The candidate tail entities are sorted in descending order, and the candidate entity with the highest score is selected as the predicted tail entity:

[0077] Through the above steps, this invention uses the query to be completed as a unified input and sequentially constructs basic structural representations, basic semantic representations, path topology representations, and structural prototype representations. It obtains discriminative information for candidate triples from multiple levels, including graph structure, textual semantics, multi-hop paths, and non-local structural prototypes. Based on this, the invention first generates a basic candidate set using structural and semantic scores, then calculates multi-source channel scores for the candidate set, and dynamically generates fusion weights based on the output distribution of each representation channel under the current query, achieving adaptive and collaborative utilization of discriminative information from different sources. Therefore, this invention can complete the prediction of missing entities and the ranking of candidate triples in sparse knowledge graph scenarios with incomplete local neighborhoods, insufficient observation of direct relationships, and scattered supporting clues, thus forming an adaptive fusion method for sparse knowledge graph completion.

[0078] like Figure 6As shown, this embodiment of the invention provides an adaptive fusion sparse knowledge graph completion system, including: Data acquisition module: used to acquire candidate triples in the knowledge graph; Calculation module: used to calculate the basic structure score, basic semantic score, path topology score, and structural prototype score of candidate triples respectively; Candidate set generation module: used to generate candidate sets based on infrastructure score and basic semantic score; The scoring processing module is used to normalize the basic structure score, basic semantic score, path topology score, and structural prototype score of all candidate entities in the candidate set within each scoring channel to obtain the normalized score for each scoring channel. Fusion module: used to extract the statistical features of the normalized scores of each score channel on the current candidate set, concatenate the statistical features of each score channel to obtain the fusion feature vector of the current query, input the fusion feature vector into the weight generation network to obtain the dynamic fusion weight of each score channel, and perform weighted summation of the normalized scores of each score channel according to the dynamic fusion weight to obtain the final fusion score of the candidate triple. The completion module is used to sort candidate entities according to the final fusion score and output the completion result.

[0079] A computer device is provided according to an embodiment of the present invention. This computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the various method embodiments described above. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the various device embodiments described above.

[0080] The computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention.

[0081] The computer device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device may include, but is not limited to, a processor and memory.

[0082] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0083] The memory can be used to store the computer program and / or module, and the processor implements various functions of the computer device by running or executing the computer program and / or module stored in the memory, and by calling the data stored in the memory.

[0084] If the modules / units integrated into the computer device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory, random access memory, electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0085] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the scope of the invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0086] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be appropriately combined to form other embodiments that can be understood by those skilled in the art. The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.

Claims

1. An adaptive fusion method for sparse knowledge graph completion, characterized in that, include: Retrieve candidate triples from the knowledge graph; Calculate the basic structure score, basic semantic score, path topology score, and structural prototype score of the candidate triples respectively; A candidate set is generated based on the infrastructure score and the basic semantic score; The basic structure score, basic semantic score, path topology score, and structural prototype score of all candidate entities in the candidate set are normalized in each score channel to obtain the normalized score of each score channel. The statistical features of the normalized scores of each score channel on the current candidate set are extracted separately. The statistical features of each score channel are concatenated to obtain the fusion feature vector of the current query. The fusion feature vector is input into the weight generation network to obtain the dynamic fusion weight of each score channel. The normalized scores of each score channel are weighted and summed according to the dynamic fusion weight to obtain the final fusion score of the candidate triple. The candidate entities are sorted according to the final fusion score, and the completion result is output.

2. The adaptive fusion sparse knowledge graph completion method according to claim 1, characterized in that, The calculation of the basic structure score of candidate triples specifically includes: The RotatE model is used to learn the embedding representations of head entities, relations, and candidate tail entities, and the infrastructure score is calculated based on the rotational interaction relationship of the three in the complex embedding space. The calculation method for the infrastructure score is as follows: in, , , These represent the embedding representations of the head entity, relation, and candidate tail entity, respectively. This represents the Hadamard product.

3. The adaptive fusion sparse knowledge graph completion method according to claim 1, characterized in that, The specific steps for calculating the basic semantic score of candidate triples include: Construct an enhanced query text, wherein the enhanced query text includes relational semantic information, external background information, local structural factual information, and reference example information; The enhanced query text is used as the query-side input, and the name and text description of the candidate tail entity are used as the entity-side input, and then input into the semantic coding model respectively. Extract sentence-level semantic representation from query output Sentence-level semantic representation of entity output ; The sentence-level semantic representation is subjected to linear projection and normalization to obtain the query semantic vector. and candidate entity semantic vectors ; Calculate the dot product similarity between the two, which serves as the underlying semantic score: 。 4. The adaptive fusion sparse knowledge graph completion method according to claim 1, characterized in that, The calculation of the path topology score for candidate triples specifically includes: Retrieve multi-hop relationship paths between head entities and candidate tail entities, group paths with the same relationship type sequence into path patterns, and obtain a set of candidate paths and the frequency of each path pattern; The relational sequences of each path pattern are input into a bidirectional long short-term memory network for encoding, and the path representations of each path pattern are obtained by aggregating them through a step-by-step attention mechanism. ; The query anchor vector is constructed by concatenating the embedded representations of the head entity, relation, and candidate tail entity. ; According to the path representation Query anchor vector And based on path frequency characteristics, calculate the contribution weight of each path pattern. The path representations are then weighted and aggregated according to the contribution weights to obtain the path topology representation. ; Map the path topology representation to the path topology score. .

5. The adaptive fusion sparse knowledge graph completion method according to claim 1, characterized in that, Calculate the structural prototype score of candidate triples, including: Using the embedded representation of the head entity as the retrieval anchor, candidate prototype entities are jointly selected from the entity set based on vector similarity, relational constraints, and statistical priors to form a structural prototype pool. ; The embedded representations of the head entity, relation, and tail entity of the candidate triples are concatenated and a query vector is constructed using linear projection. ; For each prototype entity in the structural prototype pool, a key vector and a value vector are constructed. An attention weight is calculated based on the correlation between the query vector and the key vector, wherein a relation-aware temperature coefficient is introduced to adjust the attention distribution. The value vectors of the prototype entities are weighted and aggregated according to the attention weights to obtain the structural prototype representation. The structural prototype representation is then mapped to the structural prototype score. .

6. The adaptive fusion sparse knowledge graph completion method according to claim 1, characterized in that, The final fusion score of the candidate triples is calculated, specifically including: For each scoring channel, perform max-min normalization on the unified candidate set to obtain the normalized score. ; The mean and variance of the normalized scores for each scoring channel are calculated as statistical features and concatenated to form a fusion feature vector. The fused feature vector is input into a multilayer perceptron and normalized using Softmax to obtain the dynamic fusion weights for each scoring channel. ; The final fusion score is obtained by weighted summation as follows: 。 7. An adaptive fusion sparse knowledge graph completion system, characterized in that, include: Data acquisition module: used to acquire candidate triples in the knowledge graph; Calculation module: used to calculate the basic structure score, basic semantic score, path topology score, and structural prototype score of candidate triples respectively; Candidate set generation module: used to generate candidate sets based on infrastructure score and basic semantic score; The scoring processing module is used to normalize the basic structure score, basic semantic score, path topology score, and structural prototype score of all candidate entities in the candidate set within each scoring channel to obtain the normalized score for each scoring channel. Fusion module: used to extract the statistical features of the normalized scores of each score channel on the current candidate set, concatenate the statistical features of each score channel to obtain the fusion feature vector of the current query, input the fusion feature vector into the weight generation network to obtain the dynamic fusion weight of each score channel, and perform weighted summation of the normalized scores of each score channel according to the dynamic fusion weight to obtain the final fusion score of the candidate triple. The completion module is used to sort candidate entities according to the final fusion score and output the completion result.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the adaptive fusion sparse knowledge graph completion method according to any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of an adaptive fusion sparse knowledge graph completion method as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of an adaptive fusion sparse knowledge graph completion method as described in any one of claims 1-6.