A semantic and structure drift oriented self-adaptive continuous entity alignment method in a knowledge graph
Patent Information
- Application Number
- CN202611099693.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]针对现有技术中存在的缺陷,本发明提供一种面向语义与结构漂移的知识图谱中自适应持续实体对齐方法,以期能提高商品推荐的候选召回和排序准确性,从而能适用于电商商品知识图谱动态更新中的商品实体对齐,以解决动态知识图谱中漂移难以度量、历史样本重放比例固定、参数更新范围缺少动态控制以及灾难性遗忘严重的问题
1、本发明以增量三元组涉及的实体为扰动源,构建局部漂移观测窗口,并利用距离综合度量新旧实体表示的均值变化和协方差变化,能够同时反映语义漂移与结构漂移,从而提高了动态知识图谱漂移检测的准确性和针对性。
Smart Images

Figure CN122927461A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of knowledge graph entity alignment, and mainly relates to an adaptive and persistent entity alignment method in knowledge graphs that is oriented towards semantic and structural drift. Background Technology
[0002] Knowledge graphs, through entities, relations, and triples, provide a structured representation of facts in the objective world, serving as a crucial foundation for applications such as intelligent question answering, recommendation systems, knowledge discovery, and data fusion. Since knowledge graphs from different sources, languages, or domains are often constructed independently, the same real-world object may exist as different entities in different knowledge graphs. Therefore, entity alignment is needed to identify semantically equivalent entities or entities referring to the same object across different knowledge graphs. Most existing entity alignment methods are based on the assumption of static knowledge graphs, assuming that the graph structure remains relatively stable during the training and application phases. However, in practical applications, knowledge graphs typically evolve dynamically with the addition of new entities, new relational facts, and new descriptive information. This causes changes in the neighbor relationships, path structures, and semantic contexts of existing entities, thereby affecting the original entity representation space and cross-graph alignment relationships.
[0003] In continuous entity alignment scenarios, the model needs to absorb new knowledge brought by newly added entities and triples, while maintaining cross-graph alignment relationships established in previous stages. If updates are based solely on new data, model parameters and entity representations are prone to over-migrating, leading to historical alignment space shifts and catastrophic forgetting. Conversely, if model parameters are over-frozen, they struggle to adapt to semantic and structural changes caused by new knowledge, reducing the alignment effectiveness of new entities. Existing dynamic entity alignment methods typically focus on updating the representations of affected entities or using a fixed proportion of historical sample replays to mitigate forgetting, but they still lack explicit measures of the degree of change across snapshot representation spaces, making it difficult to adaptively adjust the historical sample replay ratio and parameter update range based on drift intensity. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides an adaptive and persistent entity alignment method for knowledge graphs that addresses semantic and structural drift. This method aims to improve the accuracy of candidate recall and ranking in product recommendations, making it applicable to product entity alignment in dynamically updated e-commerce product knowledge graphs. It solves the problems of difficult-to-measure drift, fixed historical sample replay ratio, lack of dynamic control over parameter update range, and severe catastrophic forgetting in dynamic knowledge graphs.
[0005] To solve the technical problem, the present invention adopts the following technical solution: The adaptive persistent entity alignment method in a knowledge graph oriented towards semantic and structural drift, as described in this invention, is performed according to the following steps: Step 1: Define and initialize the time snapshot number as , obtain the The first snapshot in time A continuously growing knowledge graph and the The first snapshot in time A continuously growing knowledge graph , ;in, and They represent and A collection of entities and They represent and A set of relationships, and They represent and The set of triples; Get the Seed entity alignment set available for training at each time snapshot ; Step 2: Based on as well as , for the Entity alignment model under a snapshot of time Training was conducted to obtain the first The entity alignment model trained at a snapshot time ; right Perform incremental training to obtain the first... The entity alignment model trained at a snapshot time and output the first Potential entity alignment results under a snapshot of time ; Step 3: Determine using equation (1) New entity set and Incremental triple set : (1) In equation (1), the symbol This represents the set difference operation; Step 4: , as well as Together constitute the first Incremental training batches under each time snapshot ; Step 5: Construct the first Local drift observation window under a time snapshot ,in, express The first in One entity, express The total number of entities in; Step 6: Based on Calculate the statistical measures of the new and old entity representations, including the mean vector and the covariance matrix; Step 7: Based on the statistics of new and old entity representations and Calculate the first The drift intensity under the first time snapshot is obtained by adaptive sample replay. Replay sample batches under a time snapshot and the number of samples ; Step 8: Calculate the first... The snapshot relative to the first Entity growth rate in a snapshot of time Therefore, based on , No. Covariance drift at each snapshot and Control the first A snapshot of time The parameter update range, as well as the learning rate and gradient mask; Step 9: Incremental training batches and replay sample batch Construct the first using equation (14) Total loss function under each time snapshot This enables the entity alignment model Joint optimization based on the learning rate and gradient mask yields the... The entity alignment model trained at a snapshot time : (14) In equation (14), Indicates the use of learning the first Incremental alignment loss in the current incremental data under each snapshot; Indicates the use of maintaining the first Historical replay loss of historical reliable alignment sample matching relationship under a snapshot of time; Indicates the constraint used for the first Spatial regularization constraints on the local geometric relationships between old and new entity representations under a snapshot of time; Indicates the weight of historical replay loss; Represents the weights of space regularization constraints; Step 10: Calculate the first step using equation (15). A snapshot of time and Candidate entity pairs The similarity is represented by : (15) In equation (15), Represents the cosine similarity function; Indicates the first The first continuously growing knowledge graph under a snapshot in time. Candidate entities in, and ; Indicates the first The second continuously growing knowledge graph under the snapshot time. Candidate entities in, and ; and They represent and A collection of entities; Step 11: Use equation (16) to obtain the first... Entity alignment results under a snapshot : (16) In equation (16), Indicates the alignment confidence threshold; Step 12: Assign to If the process fails, return to step 2 to continue execution; otherwise, output the entity alignment model and its entity alignment result under the last time snapshot.
[0006] The adaptive persistent entity alignment method in a knowledge graph oriented towards semantic and structural drift, as described in this invention, is characterized in that step 5 is performed as follows: Step 5.1: Construct using equation (2) Set of disturbance source entities : (2) In equation (2), Represents the set of incremental triples The set of entities consisting of all head entities and tail entities; Step 5.2: In In China, with Extract its starting point Skip topological neighborhood and with Taking the intersection, we get The set of affected historical entities ,in, Indicates the number of hops in the topological neighborhood expansion; Step 5.3: Place the first The first continuously growing knowledge graph under a snapshot in time. The set of affected historical entities and the The second continuously growing knowledge graph under a snapshot in time. The set of affected historical entities Merge to obtain the first Local drift observation window under a time snapshot .
[0007] Furthermore, step 6 is performed as follows: Step 6.1: Utilize and To each Encode to obtain the first A collection of old entity representations from a snapshot in time. and the The new entity representation set under each snapshot. ; Step 6.2: Calculate using equation (3) mean vector and mean vector : (3) Step 6.3: Calculation covariance matrix and covariance matrix ;in, (·) represents the covariance calculation function.
[0008] Furthermore, step 7 is performed as follows: Step 7.1: Calculate the first step using equation (4). The drift distance is represented in a snapshot at time. : (4) In equation (4), Represents the L2 norm; Represents the matrix trace operation; Step 7.2: Use equation (5) to... Normalization to the first Drift score at a snapshot in time : (5) In equation (5), Represents the scaling constant, and ; Step 7.3: Calculate the first step using equation (6). Mean drift at each snapshot Covariance drift : (6) In equation (6), Denotes the Frobenius norm; Represents the L2 norm; Step 7.4: Utilize the first Entity alignment model under a snapshot of time , for the Entity alignment set under a snapshot of time Any entity pair The alignment confidence of the entity pairs is obtained through processing. ;in, Indicates the first The entity in the first continuously growing knowledge graph under the snapshot of time. Indicates the first The entity in the second continuously growing knowledge graph under the first snapshot; This represents the first continuously growing knowledge graph. A collection of entities This represents the second continuously growing knowledge graph. A collection of entities; Using equation (7) from the first The first entity alignment set obtained by filtering from the first snapshot time is... A collection of historical reliable samples from a snapshot in time. : (7) In equation (7), This is the preset high-confidence screening threshold.
[0009] Step 7.5: Calculate the first step using equation (8). Historical sample replay ratio under a snapshot time : (8) In equation (8), Indicates the base replay ratio; Indicates the drift gain coefficient; Indicates the lower limit of the replay ratio; Indicates the upper limit of the replay ratio; This represents the truncation function; Step 7.6: Using equation (9) from The middle sampling obtained the first Replay sample batches under a snapshot in time and determine Number of samples : (9) In equation (9), express The number of samples in the middle; This indicates the rounding up operation; This represents the sampling function.
[0010] Furthermore, step 8 is performed as follows: Step 8.1: Use equation (10) to obtain the first... The snapshot relative to the first Entity growth rate in a snapshot of time : (10) In equation (10), express The newly added set of entities; express The newly added set of entities; Indicates the first The first continuously growing knowledge graph under a snapshot in time. A collection of entities; Indicates the first The second continuously growing knowledge graph under a snapshot in time. A collection of entities; Step 8.2: Place the first Entity alignment model under a snapshot of time The set of relation embedding parameters used to represent the semantics of relations in a knowledge graph is denoted as . Let the set of attention propagation parameters used to calculate neighbor attention weights and perform graph structure message propagation be denoted as ; when Exceeding the preset relational semantic adjustment threshold At that time, the thawing relationship is embedded in the parameter set. ;in, ; when Exceeding the preset structural adjustment threshold At that time, the set of attention propagation parameters is unfrozen. ;in, ; when Exceeding the preset old entity adjustment threshold When, use equation (11) to determine the first... The local unfreezing ratio of the old entity embedding parameters under each time snapshot, where... ; (11) In equation (11), Indicates an indicator function; Indicates the maximum thawing percentage of the old entity; Indicates the thawing adjustment factor; Step 8.3: Use equation (12) to process the first... Apply a topology-aware gradient mask to the old entity embedding parameters in each snapshot: (12) In equation (12), Indicates the first A collection of historical entities under a snapshot in time; Indicates the observation window based on local drift. and the proportion of partial thawing of the old entity The selected set of old entities to be updated; Indicates the first Old entity in a snapshot of time The gradient mask value; Represents the old entity Allow updates; Represents the old entity The gradient is masked; Using equation (13) to obtain the first Learning rate of affected old entity embeddings at each snapshot time : (13) In equation (13), Indicates the base learning rate; This represents the growth inhibition coefficient.
[0011] The present invention provides an electronic device, including a memory and a processor, characterized in that the memory is used to store a program supporting the processor in performing the method described therein, and the processor is configured to execute the program stored in the memory.
[0012] The present invention discloses a computer-readable storage medium storing a computer program, characterized in that the computer program is executed by a processor to perform the steps of the method described thereon.
[0013] Compared with the prior art, the beneficial effects of the present invention are reflected in: 1. This invention uses the entities involved in the incremental triplet as the perturbation source to construct a local drift observation window, and utilizes... The distance measurement, which integrates the mean and covariance changes of the old and new entity representations, can simultaneously reflect semantic and structural drift, thereby improving the accuracy and relevance of dynamic knowledge graph drift detection.
[0014] 2. Based on the drift score under the current time snapshot, this invention adaptively adjusts the replay ratio and replay number of historical reliable samples, so that when the drift is strong, the historical alignment constraint is increased, and when the drift is weak, the replay of redundant samples is reduced, thereby improving the stability of continuous entity alignment and reducing unnecessary computational overhead.
[0015] 3. This invention dynamically controls the unfreezing range of relationship embedding parameters, attention propagation parameters, and old entity embedding parameters based on drift states and entity growth ratios. Combined with topology-aware gradient masks, differentiated learning rates, and joint loss functions, it enables the model to maintain historical alignment relationships while learning new knowledge, thereby mitigating catastrophic forgetting. In the scenario of dynamically updating e-commerce product knowledge graphs, it reduces the interference of newly added products and attribute relationships on historical product alignment results, improves the stability of same-product identification, product deduplication, and attribute fusion, and thus enhances the accuracy of candidate recall and ranking in product recommendation.
[0016] 4. This invention utilizes the entity alignment model, entity representation, and high-confidence entity alignment results from the previous snapshot to form subsequent incremental training constraints. This eliminates the need to continuously add manually labeled seed entity alignment data in each snapshot, thereby reducing the cost of manual labeling and improving the practicality of the continuous entity alignment method in dynamic knowledge graphs. Attached Figure Description
[0017] Figure 1 This is an overall flowchart of the method of the present invention; Figure 2 A schematic diagram of the adaptive continuous update module for drift perception. Detailed Implementation
[0018] To make the technical solution, implementation process, and technical effects of the present invention clearer, the following is combined with... Figure 1 and Figure 2 Taking the alignment of product entities in the dynamic updating of e-commerce product knowledge graph as an example, we will further explain each step. Figure 1 This illustrates the overall process of the Base phase and the incremental phase; Figure 2 The processing relationships between local drift observation, drift measurement, adaptive historical sample replay, dynamic parameter control, and joint optimization are illustrated.
[0019] In this embodiment, the first continuously growing knowledge graph can be constructed from a merchant product database, supplier product data, or on-site product information. The second continuously growing knowledge graph can be constructed from a platform knowledge base, including: products, brands, categories, models, and attribute values. Relationships include the brand, category, color, capacity, and specifications. The goal of entity alignment is to identify entities in the two knowledge graphs that refer to the same actual product or the same standard product, providing a unified product identifier for product deduplication, attribute fusion, and recommendation candidate recall.
[0020] Specifically, such as Figure 1 As shown, an adaptive persistent entity alignment method for knowledge graphs oriented towards semantic and structural drift is performed according to the following steps: Step 1: Define and initialize the time snapshot number as , obtain the The first snapshot in time A continuously growing knowledge graph and the The first snapshot in time A continuously growing knowledge graph , In this embodiment, the two knowledge graphs correspond to the merchant product database and the platform product knowledge database, respectively, and are updated according to the batch time snapshot of product data. and They represent and A collection of entities and They represent and A set of relationships, and They represent and The set of triples.
[0021] Get the Seed entity alignment set available for training at each time snapshot Seed entity alignment sets can be obtained from platform product numbers or pairs of identical products that have been manually verified.
[0022] Step 2: Based on as well as , for the Entity alignment model under a snapshot of time Training was conducted to obtain the first The entity alignment model trained at a snapshot time The basic model can use a relation-aware graph neural network, and the entity representation dimension can be set to 256.
[0023] right Perform incremental training to obtain the first... The entity alignment model trained at a snapshot time and output the first Potential entity alignment results under a snapshot of time .
[0024] Step 3: Determine using equation (1) New entity set and Incremental triple set : (1) In equation (1), the symbol This represents set difference operations; in product recommendation scenarios, the new entity can be a newly listed product or a product with a new specification, and the incremental triple can be a new brand, category, or attribute relationship.
[0025] Step 4: , as well as Together constitute the first Incremental training batches under each time snapshot Candidate product pairs can be constructed first by brand, category, or model to reduce irrelevant products from entering the training batch.
[0026] like Figure 2 As shown, in obtaining the first After incremental training batches under the first time snapshot, local drift observation, drift intensity calculation, adaptive historical sample replay, dynamic adjustment of model parameters, and joint optimization are performed sequentially to complete the first batch. Continuous updates of the entity alignment model under each time snapshot.
[0027] Step 5: Construct the first Local drift observation window under a time snapshot ,in, express The first in One entity, express The total number of entities in the list.
[0028] Step 5.1: Construct using equation (2) Set of disturbance source entities : (2) In equation (2), Represents the set of incremental triples The set of entities consisting of all head entities and tail entities.
[0029] Step 5.2: In In China, with Extract its starting point Skip topological neighborhood and with Taking the intersection, we get The set of affected historical entities ,in, This indicates the number of hops for expanding the topological neighborhood. In this embodiment, the number of hops for expanding the topological neighborhood can be set to 2 to cover historical products that share the same brand, category, or attribute value as the newly added products.
[0030] Step 5.3: Place the first The first continuously growing knowledge graph under a snapshot in time. The set of affected historical entities and the The second continuously growing knowledge graph under a snapshot in time. The set of affected historical entities Merge to obtain the first Local drift observation window under a time snapshot This allows us to observe drift only within the localized area affected by this product update, reducing the computational cost of the entire map.
[0031] Step 6: Based on The new and old entity representation statistics are calculated, including the mean vector and the covariance matrix. Changes in the mean reflect the shift of the semantic center of the product, and changes in the covariance reflect changes in the neighborhood structure of the product.
[0032] Step 6.1: Utilize and To each Encode to obtain the first A collection of old entity representations from a snapshot in time. and the The new entity representation set under each snapshot. .
[0033] Step 6.2: Calculate using equation (3) mean vector and mean vector : (3) Step 6.3: Calculation covariance matrix and covariance matrix in, (·) represents the covariance calculation function.
[0034] Step 7: Based on the statistics of new and old entity representations and Calculate the first The drift intensity under the first time snapshot is obtained by adaptive sample replay. Replay sample batches under a snapshot in time and the number of samples .
[0035] Step 7.1: Calculate the first step using equation (4). The drift distance is represented in a snapshot at time. : (4) In equation (4), Represents the L2 norm; This represents the matrix trace operation; this distance is used to uniformly measure semantic and structural drift of goods.
[0036] Step 7.2: Use equation (5) to... Normalization to the first Drift score at a snapshot in time : (5) In equation (5), Represents the scaling constant, and The scaling constant can be determined based on the median drift distance of historical snapshots.
[0037] Step 7.3: Calculate the first step using equation (6). Mean drift at each snapshot Covariance drift : (6) In equation (6), Denotes the Frobenius norm; This represents the L2 norm.
[0038] Step 7.4: Utilize the first Entity alignment model under a snapshot of time , for the Entity alignment set under a snapshot of time Any entity pair The alignment confidence of the entity pairs is obtained through processing. ;in, Indicates the first The entity in the first continuously growing knowledge graph under the snapshot of time. Indicates the first The entity in the second continuously growing knowledge graph under the first snapshot; This represents the first continuously growing knowledge graph. A collection of entities This represents the second continuously growing knowledge graph. A collection of entities.
[0039] Using equation (7) from the first Entity alignment set under a snapshot of time The first was obtained through screening. A collection of historical reliable samples from a snapshot in time. : (7) In equation (7), and The characters in the aforementioned entity pairs have the same meaning; This is the preset high-confidence screening threshold. The high-confidence screening threshold can be set to 0.90, and will exclude product entity pairs with one-to-many conflicts.
[0040] Step 7.5: Calculate the first step using equation (8). Historical sample replay ratio under a snapshot time : (8) In equation (8), Indicates the base replay ratio; Indicates the drift gain coefficient; Indicates the lower limit of the replay ratio; Indicates the upper limit of the replay ratio; This represents the truncation function.
[0041] Step 7.6: Using equation (9) from The middle sampling obtained the first Replay sample batches under a time snapshot and determine Number of samples : (9) In equation (9), express The number of samples in the middle; This indicates the rounding up operation; This represents the sampling function; sampling can be stratified by product category to avoid the concentration of samples in the top category.
[0042] Step 8: Calculate the first... The snapshot relative to the first Entity growth rate in a snapshot of time Therefore, based on , No. Covariance drift at each snapshot and Control the first A snapshot of time The parameter update range is as follows: when the proportion of newly added products is low, the newly added products and their local neighborhood are mainly updated; when the proportion is high, the updateable range is expanded.
[0043] Step 8.1: Use equation (10) to obtain the first... The snapshot relative to the first Entity growth rate in a snapshot of time : (10) In equation (10), express The newly added set of entities; express The newly added set of entities; Indicates the first The first continuously growing knowledge graph under a snapshot in time. A collection of entities; Indicates the first The second continuously growing knowledge graph under a snapshot in time. A collection of entities.
[0044] Step 8.2: Place the first Entity alignment model under a snapshot of time The set of relation embedding parameters used to represent the semantics of relational relationships in a knowledge graph is defined as follows: The set of attention propagation parameters used to calculate neighbor attention weights and perform graph structure message propagation is defined as follows: .
[0045] Preset relational semantic adjustment threshold Structural adjustment threshold Adjusting thresholds with old entities ,in, , , The above thresholds can be determined by the validation set, for example, set to 0.30, 0.15 and 0.40 respectively.
[0046] when Exceeding the relational semantic adjustment threshold At that time, the thawing relationship is embedded in the parameter set. ; when Exceeding the structural adjustment threshold At that time, the set of attention propagation parameters is unfrozen. ; when Exceeding the old entity adjustment threshold When, use equation (11) to determine the first... The local unfreezing ratio of old entity embedding parameters under a snapshot time.
[0047] (11) In equation (11), Indicates an indicator function; Indicates the maximum thawing percentage of the old entity; This represents the thawing adjustment coefficient.
[0048] Step 8.3: For the first Apply a topology-aware gradient mask to the old entity embedding parameters in each snapshot: (12) In equation (12), Indicates the first A collection of historical entities under a snapshot in time; Indicates the observation window based on local drift. and the proportion of partial thawing of the old entity The selected set of updatable old entities; Indicates the first Old entity in a snapshot of time The gradient mask value; Represents the old entity Allow updates; Represents the old entity The gradient is masked, and the old entities can be updated by sorting them according to their shortest path distance to the disturbance source.
[0049] Using equation (13) to obtain the first Learning rate of affected old entity embeddings at each snapshot time : (13) In equation (13), Indicates the base learning rate; This represents the growth inhibition coefficient; updated old entities can be selected by sorting them according to their shortest path distance to the disturbance source.
[0050] Step 9: Incremental training batches and replay sample batch After mixing, the first equation is constructed using equation (14). Total loss function under each time snapshot : (14) In equation (14), This represents the incremental alignment loss used to learn the alignment error in the current incremental data; This represents the historical replay loss used to maintain the historically reliable alignment sample matching relationship; This represents a spatial regularization constraint used to constrain the local geometric relationships between the old and new entity representations. Indicates the weight of historical replay loss; The spatial regularization constraint weights are represented by three loss terms: learning new product alignment, maintaining historical similarity relationships, and constraining local product representation structures. The historical replay loss weight and the spatial regularization constraint weight can be set to 1.0 and 0.1, respectively.
[0051] Using the total loss function right During the backpropagation process, the embedding parameters of the old entities in the set of old entities to be updated are adopted using the first... Learning rate of affected old entity embeddings at each snapshot time Update the parameters; apply the base learning rate to the newly added entity embedding parameters, as well as the unfrozen relation embedding parameters and attention propagation parameters. The model is updated; the remaining old entity embedding parameters are kept unchanged by topology-aware gradient masks, thus obtaining the entity alignment model trained at the current time snapshot. By updating the embedded parameters of the affected old entities with a smaller learning rate, it is possible to learn the semantic and structural information of new products while reducing the perturbation of the historical product entity representations, thereby maintaining the stability of the historical product alignment relationships.
[0052] Step 10: Calculate the first step using equation (15). A snapshot of time and Candidate entity pairs The similarity is represented by : (15) In equation (15), Represents the cosine similarity function; Indicates the first The first continuously growing knowledge graph under a snapshot in time. Candidate entities in, and ; Indicates the first The second continuously growing knowledge graph under the snapshot time. Candidate entities in, and ; and They represent and A collection of entities; and These represent the use of the trained entity alignment model. The obtained candidate entities and The more consistent the combination of product name, brand, model, and attributes, the higher the similarity is generally considered to be.
[0053] Step 11: Filter potential entity alignments based on similarity ranking and alignment confidence threshold, and obtain the entity alignment results for the current time snapshot using equation (16): (16) In equation (16), Indicates the first Potential entity alignment results under a snapshot of time; This represents the alignment confidence threshold. The more consistent the product name, brand, model, and attribute combination, the higher the similarity is generally considered to be.
[0054] Step 12: Save the entity alignment model at the current time snapshot Entity representation, drift statistics , , , and entity alignment results If there exists the first A snapshot of time, then Assign to If the system fails, it returns to step 2 to continue execution; otherwise, it outputs the entity alignment model and entity alignment results for the last snapshot. The output product entity alignment results can be used to update the product-side knowledge of the recommendation system: mapping cross-source identical products to a unified product representation, enabling consistent aggregation of product attributes, graph relationships, and user interactions in the recommendation model, reducing the interference of duplicate candidates on the recall results, and improving the accuracy of candidate recall and ranking for similar and related products.
[0055] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the above-described method, and the processor is configured to execute the program stored in the memory.
[0056] In this embodiment, a computer-readable storage medium stores a computer program, which is executed by a processor to perform the steps of the above method.
Claims
1. An adaptive persistent entity alignment method for knowledge graphs oriented towards semantic and structural drift, characterized in that, The procedure is as follows: Step 1: Define and initialize the time snapshot number as , obtain the The first snapshot in time A continuously growing knowledge graph and the The first snapshot of time A continuously growing knowledge graph , ;in, and They represent and A collection of entities and They represent and A set of relationships, and They represent and The set of triples; Get the Seed entity alignment set available for training at each time snapshot ; Step 2: Based on as well as , for the Entity alignment model under a snapshot of time Training was conducted to obtain the first The entity alignment model trained at a snapshot time ; right Perform incremental training to obtain the first... The entity alignment model trained at a snapshot time and output the first Potential entity alignment results under a snapshot of time ; Step 3: Determine using equation (1) New entity set and Incremental triple set : (1) In equation (1), the symbol This represents the set difference operation; Step 4: , as well as Together constitute the first Incremental training batches under each time snapshot ; Step 5: Construct the first Local drift observation window under a time snapshot ,in, express The first in One entity, express The total number of entities in; Step 6: Based on Calculate the statistical measures of the new and old entity representations, including the mean vector and the covariance matrix; Step 7: Based on the statistics of new and old entity representations and Calculate the first The drift intensity under the first time snapshot is obtained by adaptive sample replay. Replay sample batches under a snapshot in time and the number of samples ; Step 8: Calculate the first... The snapshot relative to the first Entity growth rate in a snapshot of time Therefore, based on , No. Covariance drift at each snapshot and Control the first A snapshot of time The parameter update range, as well as the learning rate and gradient mask; Step 9: Incremental Training Batch and replay sample batch Construct the first using equation (14) Total loss function under each time snapshot This enables the entity alignment model Joint optimization based on the learning rate and gradient mask yields the... The entity alignment model trained at a snapshot time : (14) In equation (14), Indicates the use of learning the first Incremental alignment loss in the current incremental data under each snapshot; Indicates the use of maintaining the first Historical replay loss of historical reliable alignment sample matching relationship under a snapshot of time; Indicates the constraint used for the first Spatial regularization constraints on the local geometric relationships between old and new entity representations under a snapshot of time; Indicates the weight of historical replay loss; Represents the weights of space regularization constraints; Step 10: Calculate the first step using equation (15). A snapshot of time and Candidate entity pairs The similarity is represented by : (15) In equation (15), Represents the cosine similarity function; Indicates the first The first continuously growing knowledge graph under a snapshot in time. Candidate entities in, and ; Indicates the first The second continuously growing knowledge graph under the snapshot time. Candidate entities in, and ; and They represent and A collection of entities; Step 11: Use equation (16) to obtain the first... Entity alignment results under a snapshot : (16) In equation (16), Indicates the alignment confidence threshold; Step 12: Assign to If the process fails, return to step 2 to continue execution; otherwise, output the entity alignment model and its entity alignment result under the last time snapshot.
2. The adaptive persistent entity alignment method in a knowledge graph oriented towards semantic and structural drift, as described in claim 1, is characterized in that... Step 5 is performed as follows: Step 5.1: Construct using equation (2) Set of disturbance source entities : (2) In equation (2), Represents the set of incremental triples The set of entities consisting of all head entities and tail entities; Step 5.2: In In China, with Extract its starting point Skip topological neighborhood and with Taking the intersection, we get The set of affected historical entities ,in, Indicates the number of hops in the topological neighborhood expansion; Step 5.3: Place the first The first continuously growing knowledge graph under a snapshot in time. The set of affected historical entities and the The second continuously growing knowledge graph under a snapshot in time. The set of affected historical entities Merge to obtain the first Local drift observation window under a time snapshot .
3. The adaptive persistent entity alignment method in a knowledge graph oriented towards semantic and structural drift, as described in claim 2, is characterized in that... Step 6 is performed as follows: Step 6.1: Utilize and To each Encode to obtain the first A collection of old entity representations from a snapshot in time. and the The new entity representation set under each snapshot. ; Step 6.2: Calculate using equation (3) mean vector and mean vector : (3) Step 6.3: Calculation covariance matrix and covariance matrix ;in, (·) represents the covariance calculation function.
4. The adaptive persistent entity alignment method in a knowledge graph oriented towards semantic and structural drift, as described in claim 3, is characterized in that... Step 7 is performed as follows: Step 7.1: Calculate the first step using equation (4). The drift distance is represented in a snapshot at time. : (4) In equation (4), Represents the L2 norm; Represents the matrix trace operation; Step 7.2: Use equation (5) to... Normalization to the first Drift score at a snapshot in time : (5) In equation (5), Represents the scaling constant, and ; Step 7.3: Calculate the first step using equation (6). Mean drift at each snapshot Covariance drift : (6) In equation (6), Denotes the Frobenius norm; Represents the L2 norm; Step 7.4: Utilize the first Entity alignment model under a snapshot of time , for the Entity alignment set under a snapshot of time Any entity pair The alignment confidence of the entity pairs is obtained through processing. ;in, Indicates the first The entity in the first continuously growing knowledge graph under the snapshot of time. Indicates the first The entity in the second continuously growing knowledge graph under the first snapshot; This represents the first continuously growing knowledge graph. A collection of entities This represents the second continuously growing knowledge graph. A collection of entities; Using equation (7) from the first The first entity alignment set obtained by filtering from the first snapshot time is... A collection of historical reliable samples under a snapshot time. : (7) In equation (7), The preset high-confidence screening threshold; Step 7.5: Calculate the first step using equation (8). Historical sample replay ratio under a snapshot time : (8) In equation (8), Indicates the base replay ratio; Indicates the drift gain coefficient; Indicates the lower limit of the replay ratio; Indicates the upper limit of the replay ratio; This represents the truncation function; Step 7.6: Using equation (9) from The middle sampling obtained the first Replay sample batches under a snapshot in time and determine Number of samples : (9) In equation (9), express The number of samples in the middle; This indicates the rounding up operation; This represents the sampling function.
5. The adaptive persistent entity alignment method in a knowledge graph oriented towards semantic and structural drift, as described in claim 4, is characterized in that... Step 8 is performed as follows: Step 8.1: Use equation (10) to obtain the first... The snapshot relative to the first Entity growth rate in a snapshot of time : (10) In equation (10), express The newly added set of entities; express The newly added set of entities; Indicates the first The first continuously growing knowledge graph under a snapshot in time. A collection of entities; Indicates the first The second continuously growing knowledge graph under a snapshot in time. A collection of entities; Step 8.2: Place the first Entity alignment model under a snapshot of time The set of relation embedding parameters used to represent the semantics of relations in a knowledge graph is denoted as . Let the set of attention propagation parameters used to calculate neighbor attention weights and perform graph structure message propagation be denoted as ; when Exceeding the preset relational semantic adjustment threshold At that time, the thawing relationship is embedded in the parameter set. ;in, ; when Exceeding the preset structural adjustment threshold At that time, the set of attention propagation parameters is unfrozen. ;in, ; when Exceeding the preset old entity adjustment threshold When, use equation (11) to determine the first... The local unfreezing ratio of the old entity embedding parameters under each time snapshot, where... ; (11) In equation (11), Indicates an indicator function; Indicates the maximum thawing percentage of the old entity; Indicates the thawing adjustment factor; Step 8.3: Use equation (12) to process the first... Apply a topology-aware gradient mask to the old entity embedding parameters in each snapshot: (12) In equation (12), Indicates the first A collection of historical entities under a snapshot in time; Indicates the observation window based on local drift. and the proportion of partial thawing of the old entity The selected set of old entities to be updated; Indicates the first Old entity in a snapshot of time The gradient mask value; Represents the old entity Allow updates; Represents the old entity The gradient is masked; Using equation (13) to obtain the first Learning rate of affected old entity embeddings at each snapshot time : (13) In equation (13), Indicates the base learning rate; This represents the growth inhibition coefficient.
6. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports a processor in executing the method of any one of claims 1-5, the processor being configured to execute the program stored in the memory.
7. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program is executed by the processor to perform the steps of the method according to any one of claims 1-5.