Enterprise time sequence knowledge graph entity alignment method and system
By adopting a multi-module collaborative modeling framework of local-global time dependence and semantic enhancement in the timing knowledge graph, the problem that existing methods are difficult to model time dynamics and relational semantics in timing scenarios is solved, efficient entity alignment and multi-dimensional information fusion, and the accuracy of data fusion and knowledge integration is improved.
Patent Information
- Application Number
- CN202510159122.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-04-25
AI Technical Summary
When handling complex timing knowledge graph entity alignment methods, it is difficult to effectively model time dynamic dependence, capture the interactive characteristics of relational semantics and neighborhood dynamics, and show inefficient and insufficient expression in multi-dimensional embedded information fusion.
A time-series knowledge graph entity alignment method based on local-global time dependence and semantic enhancement is proposed. Through the multi-module collaborative modeling framework, time dynamic modeling, joint modeling of relational semantics and neighborhood dynamics, and efficient fusion of multi-dimensional embedded information is optimized. Specifically, it includes building business relationships-enterprise entity diagrams, generating time-aware entity embedding, performing timing geometric embedding, dimensionality reduction and regularization, self-attention weight calculation and final entity embedding generation.
It improves the accuracy of enterprises in data fusion, trend prediction and knowledge integration, captures the complex interaction mode of enterprise data, improves the accuracy of cross-system data matching, and optimizes computing efficiency and generalization performance.
Smart Images

Figure CN119886143A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of temporal knowledge graph entity alignment, and in particular to a method and system for aligning enterprise temporal knowledge graph entities. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] With the rapid development of knowledge graph technology, static knowledge graphs play an important role in knowledge organization and information reasoning. However, its limitation is that it cannot capture the dynamic characteristics of entities and relationships over time, and it is difficult to meet the needs of enterprises in complex time series scenarios in data management, business analysis and intelligent decision-making. To solve this problem, the Temporal Knowledge Graph (TKG) introduces time information to model the evolution process of entity relationships, providing more accurate semantic representation for time series reasoning, trend analysis and cross-time domain knowledge fusion. Compared with static knowledge graphs, temporal knowledge graphs have time dependence, relationship dynamics and multi-dimensional data integration capabilities, and have become an important tool for intelligent management of enterprise data.
[0004] In enterprise applications, time series knowledge graphs can be widely used in key business scenarios such as multi-source data fusion, market trend forecasting, supply chain optimization, and financial risk control. For example, enterprises usually have information from different data sources such as customer relationship management (CRM), enterprise resource planning (ERP), and financial systems. Due to the heterogeneity of data formats and storage structures, the representation of the same entity in different systems is inconsistent. Time series knowledge graphs can use time dynamic modeling technology to achieve cross-system data alignment and unified representation, thereby improving the accuracy of data integration. In terms of market forecasting and business intelligence, time series knowledge graphs provide accurate business forecasting support based on historical transaction data, user behavior evolution, and market trend analysis. In supply chain management, time series knowledge graphs dynamically monitor changes in supplier relationships, logistics path optimization, and inventory adjustments to improve the level of supply chain intelligence. The field of financial risk control relies on cross-institutional data integration. Time series knowledge graphs identify the historical behavior of the same customers in different financial institutions through entity alignment, thereby improving the accuracy of credit assessment and risk prediction.
[0005] Although temporal knowledge graphs have shown great potential in the field of enterprise data management, their application still faces severe challenges in the entity alignment problem. In temporal knowledge graphs, the entity alignment task aims to identify semantically equivalent entities in different knowledge graphs to achieve data fusion and knowledge integration across graphs. This task not only requires processing semantic enhancement and temporal dependency modeling, but also requires a dynamic balance in the optimization of global and local information. However, existing methods have limited performance in solving these problems, especially in capturing complex temporal dynamics, jointly modeling multi-source information, and efficiently fusing embedded representations.
[0006] First, insufficient temporal dynamic modeling is one of the main problems of entity alignment in temporal knowledge graphs. The dynamic evolution of entities and relationships has multi-scale characteristics. Fine-grained rapid changes may occur at local time points, while long-term dependencies and evolution laws need to be captured within the global time span. Existing methods usually treat temporal information as a simple additional feature, fail to effectively internalize temporal dynamics, and have difficulty in processing local and global temporal characteristics at the same time, resulting in insufficient capture of the temporal behavior of entities.
[0007] Secondly, the joint modeling of relational semantics and neighborhood dynamics is limited. The entity semantics in the temporal knowledge graph is jointly determined by the relational semantics and the dynamic changes of the neighborhood structure. However, most existing methods independently handle relational semantics or neighborhood dynamics, ignoring the coupling relationship between the two. This split modeling method limits the comprehensive expression of entity interaction behaviors, especially in complex scenarios with multiple relations and multiple time points, the entity alignment effect is significantly reduced.
[0008] Finally, efficient fusion of multi-dimensional embedded information is still a key problem. The embedded representation in the temporal knowledge graph requires the integration of multi-source information such as time, semantics, and neighborhood topology. This information often has significant dimensional asymmetry and redundancy. Existing methods lack a dynamic fusion mechanism and it is difficult to reduce redundancy while maintaining the expressiveness of multi-source information, thus affecting the computational efficiency and generalization performance of the model, especially in large-scale knowledge graphs.
[0009] In summary, it can be seen that the existing methods have the following problems: 1. Insufficient temporal dynamic modeling: The existing methods fail to internalize temporal information and cannot simultaneously model the dynamic behavior of local time points and the global temporal evolution law. 2. Insufficient joint modeling of relational semantics and neighborhood dynamic information: Most methods do not sufficiently optimize the joint changes of relational semantics and neighborhood dynamics, making it difficult to fully characterize the complex interaction behaviors between entities and their dynamic evolution laws. 3. Weak multi-dimensional embedded information fusion capabilities: The existing methods are inefficient in dealing with embedded redundancy and multi-dimensional information fusion, making it difficult to improve computational efficiency and generalization performance while maintaining the expressiveness of multi-source information.
[0010] Due to the diverse sources of enterprise data, the same entity in the time series graph may have different representations, which makes data fusion and cross-system knowledge integration more difficult. For example, in supply chain management, a supplier may use different names or codes in different business systems. If the entity alignment is inaccurate, it may lead to wrong procurement decisions or chaotic logistics management. In the field of financial risk control, if customer data across institutions cannot be properly aligned, it will affect the accuracy of credit assessment and even cause the failure of fraud detection systems. In addition, market forecasting tasks require the integration of data from multiple industries and time spans. If there are deviations in entity alignment, it may lead to inaccurate trend analysis, thereby affecting corporate strategic decisions. Summary of the invention
[0011] In order to solve the above problems, the present invention proposes a method and system for entity alignment of enterprise temporal knowledge graph, which is based on local-global time dependency and semantic enhancement technology. It can simultaneously model the dynamic changes of local time points and the long-term dependency of global time spans, thereby improving the accuracy of enterprises in data fusion, trend prediction and knowledge integration.
[0012] In order to achieve the above object, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for aligning entities in a time-series knowledge graph of an enterprise, comprising: For each enterprise time series knowledge graph to be aligned, a business relationship-enterprise entity graph is constructed, and the relationship semantic embedding is obtained based on the semantic similarity of the two business relationships; According to the relational semantic embedding, the initial entity embedding and the timestamps related to the business relationship between the enterprise entities, the attention weights of the neighboring entities of the target enterprise entity are obtained to generate the time-aware entity embedding; Generate temporal geometric entity embeddings based on initial relation embeddings, timestamps, and time-aware entity embeddings; After reducing the dimension of temporal geometric entity embedding and applying norm constraints, local entity embedding is obtained; Generate query vector, key vector and value vector according to local entity embedding, obtain self-attention weight according to query vector, key vector and timestamp, and obtain global entity embedding according to self-attention weight and value vector; Get the final entity embedding based on the local entity embedding and the global entity embedding; According to the similarity of the final entity embedding of the enterprise time series knowledge graph to be aligned and the set similarity threshold, the matching enterprise entity pairs are screened to complete the entity alignment of the enterprise time series knowledge graph.
[0013] As an optional implementation, the business relationship-enterprise entity graph is constructed with enterprise entities and business relationships as nodes and interactions between enterprise entities and business relationships as edges.
[0014] As an optional implementation, the process of obtaining the relationship semantic embedding according to the semantic similarity of two business relationships includes: The semantic similarity between two business relations is quantified by calculating the inner product of the two business relation embedding vectors. Thus, the relation semantic embedding is expressed as: ;in, and are the i-th business relationship and the jth business relationship The low-dimensional embedding vector of And use the negative log-likelihood loss function as the objective function To optimize: ; in, For indirect adjacency, for and The weight between and The number of common business entities shared.
[0015] As an alternative implementation, the attention weights are: ; in, , and are the i-th initial entity embeddings , the jth initial entity embedding and relational semantic embedding The feature weight parameter, Embedded as a timestamp.
[0016] As an optional implementation, the process of generating time-aware entity embeddings includes: The updated target entity embedding is obtained by weighted summing of the attention weights of all neighboring entities of the target enterprise entity. : ; in, Target business entity The set of neighborhood entities, is the activation function; Using a multi-head attention mechanism to generate time-aware entity embeddings: ; in, is the number of attention heads, Represents a concatenation operation.
[0017] As an optional implementation, the process of generating a temporal geometric entity embedding includes: By introducing timestamp embedding in geometric distance calculation , optimize time-aware entity embeddings: ; in, For time-aware entity embedding, is the temporal geometric entity embedding, is the initial relation embedding.
[0018] As an optional implementation, in the process of generating temporal geometric entity embedding, a total loss function is designed for: ; in, and is the weight parameter; and is the marginal constant; is the geometric distance function; is a hard margin loss.
[0019] As an optional implementation, the self-attention weight for: ; in, is the scaling factor; is the query vector; is the key vector; According to the self-attention weight Sum value vector , compute weighted entity embeddings : ; in, Represents a business entity The set of neighborhood entities; Use multi-head attention mechanism to optimize weighted entity embedding and obtain global entity embedding : ; in, Represents the number of attention heads.
[0020] As an optional implementation, by calculating the fusion weight of local entity embedding and global entity embedding , get the final entity embedding; fusion weight for: ;in, yes Activation function; and are the learnable parameters of the feedforward neural network; Represents the concatenation operation of local entity embedding and global entity embedding.
[0021] As an optional implementation, the process of selecting matching enterprise entity pairs includes: using cosine similarity to calculate the similarity of the two final entity embeddings, introducing a contrast loss function , minimizing the embedding distance of matching entity pairs while maximizing the embedding distance of non-matching entity pairs: ; in, and Represent the sets of matching entity pairs and non-matching entity pairs respectively; Represents the marginal constant, which is used to control the distance threshold between positive and negative samples.
[0022] In a second aspect, the present invention provides an enterprise temporal knowledge graph entity alignment system, comprising: The relational semantic embedding module is configured to construct a business relationship-enterprise entity graph for each enterprise temporal knowledge graph to be aligned, and obtain the relational semantic embedding according to the semantic similarity of two business relationships; a time-aware graph attention module configured to generate time-aware entity embeddings by obtaining attention weights of neighboring entities of a target enterprise entity based on relational semantic embeddings, initial entity embeddings, and timestamps associated with business relationships between enterprise entities; A temporal geometry embedding module, configured to generate a temporal geometry entity embedding based on the initial relation embedding, the timestamp, and the time-aware entity embedding; The dimensionality reduction and regularization module is configured to reduce the dimensionality of the temporal geometric entity embedding and perform norm constraints to obtain the local entity embedding; a temporal geometric transformation module configured to generate a query vector, a key vector, and a value vector according to the local entity embedding, obtain a self-attention weight according to the query vector, the key vector, and the timestamp, and obtain a global entity embedding according to the self-attention weight and the value vector; A fusion module, configured to obtain a final entity embedding based on the local entity embedding and the global entity embedding; The entity alignment module is configured to screen matching enterprise entity pairs according to the similarity of the final entity embedding of the enterprise temporal knowledge graph to be aligned and the set similarity threshold, so as to complete the entity alignment of the enterprise temporal knowledge graph.
[0023] In a third aspect, the present invention provides an electronic device comprising a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in the first aspect is performed.
[0024] In a fourth aspect, the present invention provides a computer-readable storage medium for storing computer instructions, wherein when the computer instructions are executed by a processor, the method described in the first aspect is performed.
[0025] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in the first aspect.
[0026] Compared with the prior art, the present invention has the following beneficial effects: The present invention proposes a method for aligning entities in a temporal knowledge graph based on local-global time dependency modeling and semantic enhancement, which can simultaneously model the dynamic changes of local time points and the long-term dependencies of global time spans, thereby improving the accuracy of enterprises in data fusion, trend prediction, and knowledge integration. Through the joint optimization of relational semantics and neighborhood information, it is possible to capture the complex interaction patterns of enterprise data and improve the accuracy of cross-system data matching; the use of a multi-dimensional information adaptive fusion mechanism can optimize computing efficiency while reducing redundant information, and is suitable for large-scale enterprise data integration tasks. The method of the present invention has important application value in the fields of enterprise data management, supply chain optimization, market analysis, and financial risk control, and can effectively improve the accuracy of data alignment, optimize knowledge reasoning capabilities, and provide strong technical support for enterprise intelligent decision-making.
[0027] Because existing temporal knowledge graph entity alignment methods have difficulty in effectively modeling temporal dynamic dependencies, capturing the interactive characteristics of relationship semantics and neighborhood dynamics when dealing with complex temporal scenarios, and exhibiting problems of inefficiency and lack of expressiveness in multi-dimensional embedded information fusion. These limitations make it difficult for the model to achieve high-precision alignment results when dealing with complex interactive behaviors and dynamic evolution laws between entities in large-scale temporal graphs. In order to solve the above problems, the present invention proposes an enterprise temporal knowledge graph entity alignment method based on local-global temporal dependencies and semantic enhancement, which comprehensively optimizes temporal dynamic modeling, joint modeling of relationship semantics and neighborhood dynamics, and efficient fusion of multi-dimensional embedded information through an innovative multi-module collaborative modeling framework.
[0028] Specifically: (1) Temporal dynamics modeling: Through the time-aware graph attention module, timestamp embedding is combined with the temporal attention mechanism to deeply capture the impact of temporal information on the dynamic evolution of entities and relationships. Local temporal dynamics are modeled by the temporal geometry embedding module to optimize short-term temporal dependencies; global temporal dynamics are modeled by the temporal geometry transformation module to improve the ability to capture long-term dependencies.
[0029] (2) Joint optimization of relational semantics and neighborhood dynamics: The relational semantics embedding module combines second-order proximity and negative log-likelihood loss to optimize relational expression, ensuring the accuracy of the semantics of interaction between entities. The time-aware graph attention module captures the temporal changes of the neighborhood structure through dynamic neighborhood aggregation, and further combines the geometric embedding of the temporal geometry embedding module to generate high-quality multi-dimensional entity representation, which comprehensively improves the performance of the model in temporal semantics and neighborhood dynamics modeling.
[0030] (3) Information fusion and multi-task collaborative optimization: The dynamic weighting mechanism of the adaptive fusion module integrates local and global time embeddings to balance multi-task optimization objectives. The dimension reduction and regularization module improves computational efficiency by removing redundant embedded information, while enhancing generalization capabilities and providing efficient and reliable feature expression for the model.
[0031] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0033] Figure 1 The overall model framework diagram of the enterprise temporal knowledge graph entity alignment method provided in Example 1 of the present invention; Figure 2 A framework diagram of a relational semantic embedding module provided in Example 1 of the present invention; Figure 3 A framework diagram of a time-aware graph attention module provided in Example 1 of the present invention; FIG. 4 (a)-FIG. 4 (b) are framework diagrams of a temporal geometry embedding module provided in Embodiment 1 of the present invention; Figure 5 This is a framework diagram of the temporal geometry transformation module provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0034] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0035] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0036] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "comprise" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0038] Example 1 This embodiment provides an entity alignment method for an enterprise temporal knowledge graph, which is implemented based on local-global temporal dependency and semantic enhancement technology, and includes: For each enterprise time series knowledge graph to be aligned, a business relationship-enterprise entity graph is constructed, and the relationship semantic embedding is obtained based on the semantic similarity of the two business relationships; According to the relational semantic embedding, the initial entity embedding and the timestamps related to the business relationship between the enterprise entities, the attention weights of the neighboring entities of the target enterprise entity are obtained to generate the time-aware entity embedding; Generate temporal geometric entity embeddings based on initial relation embeddings, timestamps, and time-aware entity embeddings; After reducing the dimension of temporal geometric entity embedding and applying norm constraints, local entity embedding is obtained; Generate query vector, key vector and value vector according to local entity embedding, obtain self-attention weight according to query vector, key vector and timestamp, and obtain global entity embedding according to self-attention weight and value vector; Get the final entity embedding based on the local entity embedding and the global entity embedding; According to the similarity of the final entity embedding of the enterprise time series knowledge graph to be aligned and the set similarity threshold, the matching enterprise entity pairs are screened to complete the entity alignment of the enterprise time series knowledge graph.
[0039] like Figure 1As shown, the overall framework of the temporal knowledge graph entity alignment method (TLD-SE) based on local-global temporal dependency and semantic enhancement in this embodiment consists of multiple modules, including a relational semantic embedding module, a time-aware graph attention module, a temporal geometry embedding module, a dimensionality reduction and regularization module, a temporal geometry transformation module, an adaptive fusion module and an entity alignment module. Each module is designed through multi-perspective collaboration, aiming to comprehensively solve key problems such as temporal dynamic modeling, joint modeling of relational semantics and neighborhood dynamics, and multi-dimensional information fusion.
[0040] The method and each module of this embodiment are introduced in detail below.
[0041] 1. Relational semantic embedding module, the overall framework is as follows Figure 2 shown.
[0042] Step 1: Obtain the enterprise time series knowledge graph to be aligned.
[0043] In the field of enterprise data element management, each enterprise's time series knowledge graph Includes several quadruples containing time information; among them, It is a collection of entities, representing the key data elements in an enterprise. Specifically, it includes entities such as employees, departments, products, projects, customers, suppliers, etc. Each entity represents an independent business unit or management object. These entities are the basic building blocks of enterprise data analysis.
[0044] A set of relationships: It represents the business relationships between different entities in an enterprise and their forms of interaction. These relationships reveal the interactions and dependencies between entities. Common relationships include but are not limited to: "belong to", that is, the affiliation between employees and departments; "purchase", that is, the transaction relationship between customers and products; "supply", that is, the supply relationship between suppliers and products; "management", that is, the management relationship between departments and projects; "participation", that is, the participation relationship between employees and projects.
[0045] A timestamp collection refers to the time dimension information related to the relationship between entities, such as the contract signing time, project start and end time, transaction completion time, etc. These timestamps can not only provide a time sequence basis for data management, but also support modeling of dynamic changes in data, making it easier to track the evolution of entities and relationships over time.
[0046] A set of four : By entity ,relation and timestamp The four-tuples together represent the relationship between enterprise data elements at a specific point in time. For example, (employee A, belongs to, department B, January 2025) or (customer C, purchases, product D, December 2024). The introduction of the four-tuple enables enterprises to effectively represent dynamically changing entity relationships, which helps to conduct a comprehensive analysis of the company's historical data, current status and future trends. Under this framework, the four-tuple not only provides a time-series management perspective for enterprise data elements, but also provides solid data support for accurate data analysis, dynamic adjustment and strategic decision-making.
[0047] Step 2: For each enterprise temporal knowledge graph to be aligned, construct a business relationship-enterprise entity graph and use second-order proximity to generate the initial static relationship semantic embedding.
[0048] Specific: First, a business relationship-enterprise entity graph is constructed with enterprise entities and business relationships as nodes and the interactions between enterprise entities and business relationships as edges.
[0049] Then, in order to further capture the semantic similarity between relations, the calculation method of second-order proximity is introduced. Its core assumption is that relations that share more entities are closer in semantics; specifically, the similarity between relations depends on the number of entities they share. At the implementation level, this module quantifies the semantic similarity between relations by calculating the inner product of the embedding vectors. The size of the inner product directly reflects the proximity of the relations in the semantic space. Based on this observation, two indirectly related relations are defined and the relationship and The joint probability of It is expressed as: ; in, and Respectively express the relationship and The low-dimensional embedding vector of .
[0050] Step 3: In order to optimize the semantic expression of relation embedding, the negative log-likelihood loss function (NLL) is used as the objective function for optimization: ; in, Indicates an indirect adjacency relationship. Representing relationships and The weight between them reflects the number of common neighborhood entities shared by the two relations and the weight of the semantic similarity between the relations.
[0051] Through the above mechanism, the relational semantic embedding module achieves deep capture of the static semantics of the relationship, providing a solid foundation for the performance of subsequent modules in temporal dynamic modeling and entity alignment tasks.
[0052] 2. Time-aware graph attention module (T-GAT), the overall framework is as follows Figure 3 shown.
[0053] Step 1: Encode the entity name based on the BERT model to obtain the initial entity embedding.
[0054] Specific steps: (1) Load the pre-trained BERT model.
[0055] Choose bert-base-uncased or bert-large-uncased. If the entity name is long, use bert-large to get richer features.
[0056] (2) Tokenize the entity name and convert it into an input format acceptable to BERT: ; Use the output vector at the [CLS] position as the initial embedding for the entity: ; Therefore, the initial embedding of each entity is the output of BERT at the [CLS] position, which can capture the global semantic information of the entire name.
[0057] (3) In order to stabilize training and improve numerical stability, the initial entity embedding is L2 normalized: .
[0058] (4) Dimension adjustment: If the embedding dimension of BERT output is 768 or 1024, but the embedding dimension required by the model is lower (such as 300 dimensions), dimensionality reduction processing (MLP / PCA) can be used: .
[0059] Step 2: Timestamps are initially defined as: Trainable embedding of timestamps: Set a learnable time embedding matrix: ;in, is the total number of time points, is the embedding dimension. Each timestamp Mapped to a vector in this matrix: ;in, is a learnable time embedding matrix, where each timestamp Corresponding to a vector of fixed dimension .
[0060] Step 3: The time-aware attention module takes the relational semantic embedding output by the relational semantic embedding module , initial entity embedding and and embedding timestamps related to business relationships between enterprise entities As input, according to the relational semantic embedding , initial entity embedding and And timestamp embedding , obtain the attention weights of the neighborhood nodes of the target enterprise entity; by introducing timestamp embedding and combining the dynamic information of the entity neighborhood, a time-aware graph attention mechanism is constructed to capture the temporal change characteristics of entities and relationships.
[0061] Specific: For quad , the attention weights between business entities It is determined by entity embedding, relation embedding and timestamp difference. To target entity The influence of relationships is not only determined by the type of relationship Decision, also with time difference Closely related.
[0062] Therefore, the attention weight for: ; in, , and Represent the initial entity embedding , and relational semantic embedding The feature weight parameter, It is timestamp embedding, reflecting the dynamic characteristics of time information.
[0063] Step 4: Based on the time-aware graph attention mechanism, the weights of entity neighborhoods are dynamically adjusted to generate time-aware entity embeddings.
[0064] Specific: After calculating the attention weights of all neighboring entity nodes of the target entity, the target entity embedding is updated by weighted summation of the neighboring entity embeddings. The updated target entity embedding is expressed as: ; in, Represents the target entity The set of neighborhood entities, is the activation function (e.g. ReLU).
[0065] Step 5: In order to further enhance the model’s ability to capture complex temporal dependencies, a multi-head attention mechanism is used. Multiple attention heads are calculated in parallel, and the outputs of different heads are fused through concatenation or weighted average operations to finally generate optimized time-aware entity embeddings: ; in, is the number of attention heads, Represents a concatenation operation.
[0066] Step 6: During the optimization process, the time-aware graph attention module performs weighted aggregation of timestamp embedding and neighborhood information through the temporal attention mechanism to capture the temporal dependencies in the temporal knowledge graph.
[0067] The loss function of the module is defined as: ; in, and represents the initialized random entity embedding, Indicates timestamp embedding, represents the weighted operation of the temporal attention mechanism, Represents the marginal constant of the time-aware graph attention module, which is used to control the temporal difference between positive and negative samples.
[0068] 3. Temporal Geometry Embedding Module (TGeoE),The overall framework is shown in Figure 4 (a)-Figure 4 (b).
[0069] Step 1: Compute the initial relation embedding based on the mean of entity embeddings.
[0070] Specific steps: (1) Compute relation embedding. Suppose relation The set of all connected entities (head entity h and tail entity t) is : ; The initial relation embedding is represented as the mean of its connected entities: ; This approach ensures that relation embeddings inherit the semantic information of their associated entities.
[0071] (2) Normalized relation embedding. To maintain numerical stability, L2 normalization is used: .
[0072] Step 2: The input of the temporal geometry embedding module includes the time-aware entity embedding output by the time-aware graph attention module , initial relation embedding And timestamp embedding Combining timestamp embedding and entity dynamic features, temporal geometric entity embeddings at local time points are generated.
[0073] Specific: First, the inherent geometric structure properties of entities and relations are calculated through geometric distance: ; in, represents the time-aware entity embedding output by the time-aware graph attention module; is the initial relation embedding; represents the optimized time-aware entity embedding. The goal of the TGeoE module is to capture the geometric evolution relationship of entities in the temporal knowledge graph, so the output entity embedding uses the subscript ej, i.e. ,in Represents the head entity and the tail entity.
[0074] Then, in order to further reflect the local time-dependent characteristics, timestamp embedding is introduced in the geometric distance calculation. ; Therefore, the adjusted time-aware geometric distance is: ; This formula ensures that temporal information can accurately reflect the interaction behavior of entities and relationships, further improving the ability to capture local dynamic changes in temporal knowledge graphs.
[0075] Step 3: Capture the local dynamic behaviors of entities by optimizing the similarity between the time-aware embedding and the geometric embedding.
[0076] In this embodiment, in order to ensure the geometric distance difference between positive samples and negative samples, a marginal loss function is designed to comprehensively capture the temporal dynamic characteristics and static geometric structure.
[0077] The total loss function consists of the following two parts: ; in, represents the total loss function; the first part focuses on modeling local temporal dynamics, and the second part focuses on optimizing static geometric structures. and Respectively represent the weight parameters of the two parts, which are used to adjust the contribution of the two parts in the optimization; and Represents the marginal constant, which is used to control the geometric distance threshold of positive and negative samples; represents the geometric distance function, which measures the similarity between entity and relation embeddings; Represents the hard margin loss (hingeloss), which is corrected to zero when the distance difference between positive and negative samples is less than the marginal constant.
[0078] 4. Dimensionality reduction and regularization module.
[0079] Step 1: Use a multi-layer perceptron (MLP) to embed the high-dimensional temporal geometric entities output by the temporal geometric embedding module That is, dimensionality reduction is achieved through linear transformation, embedding high-dimensional entities into (This embedding is affected by the temporal relationship. Since the dimensionality reduction and regularization module mainly focuses on the feature representation of independent entities rather than the temporal interaction relationship, its input representation is uniformly adjusted to the subscript ei, that is, , to match the needs of subsequent model calculations), through the linear transformation matrix and the bias term Mapped to low-dimensional space. The specific calculation formula is as follows: ; in, High-dimensional entity embeddings representing the output of the temporal geometry embedding module; Represents the low-dimensional entity embedding after dimensionality reduction; and They are the linear transformation matrix and bias term, respectively, responsible for the embedded linear mapping.
[0080] Step 2: To prevent overfitting during dimensionality reduction, use Norm regularization constrains the norm of the embedded vector after dimensionality reduction to ensure that the complexity of the embedding remains within a reasonable range. The regularization mechanism reduces redundant information and improves the expressiveness of low-dimensional embedding.
[0081] The regularization loss function is defined as follows: ; in, represents the regularization loss; Represents the regularization coefficient, which controls the strength of regularization; express Norm, used to measure the complexity of the embedding vector.
[0082] 5. Temporal Geometric Transformer (TGeo-Transformer), the overall framework is as follows Figure 5 shown.
[0083] Step 1: First, generate a query vector from the low-dimensional local entity embedding through a linear transformation , key vector Sum value vector , which is used to capture the temporal interaction characteristics between entities. The calculation formula is as follows: ; ; ; in, , and are the linear transformation matrices of the query vector, key vector, and value vector respectively; and represents the local entity embedding after dimensionality reduction, is the initial relation embedding, Represents timestamp embedding. Through these vectors, the module can capture the complex temporal associations and interactions between entities.
[0084] Step 2: Then, calculate the self-attention weight , that is, by querying the vector With key vector The similarity calculation is combined with timestamp embedding for dynamic adjustment: ; in, is a scaling factor used to balance the numerical stability of the attention distribution.
[0085] Step 3: Based on self-attention weight Sum value vector , calculate the weighted entity embedding: ; in, Representing Entities The set of neighborhood entities, Represents the updated entity embedding.
[0086] Step 4: To further improve the model’s expressiveness, a multi-head attention mechanism is used to learn the temporal features of entities and relationships from multiple perspectives, optimize the updated entity embeddings, and finally obtain the global entity embeddings. : ; in, Indicates the number of attention heads, usually 2 to 8.
[0087] In this embodiment, the optimization goal of this module is achieved by minimizing the similarity difference between the query vector and the key vector, and its loss function is defined as: ; in, Indicates the similarity between the query vector and the key vector; is a marginal constant used to control the distance difference between positive and negative samples.
[0088] 6. Adaptive fusion module.
[0089] Step 1: Integrate local and global temporal information based on a dynamic weight allocation mechanism. The core of this module is to learn weights through a feedforward neural network (MLP). , dynamically adjust the contribution of local and global information according to task requirements. Calculated by the following formula: ; in, is the fusion weight of local entity embedding and global entity embedding; yes Activation function to ensure fusion weights The value of is between [0, 1]; and are the learnable parameters of the feedforward neural network; Represents the concatenation operation of local entity embedding and global entity embedding.
[0090] Step 2: Generate final entity embedding for entity alignment task: ; in, is the fusion weight of local entity embedding and global entity embedding.
[0091] 7. Entity alignment module.
[0092] Step 1: The input of the entity alignment module is the final entity embedding from different enterprise temporal knowledge graphs, which represent the final entity embedding from the enterprise temporal knowledge graphs. and These embeddings are optimized by the previous module.
[0093] Using cosine similarity, we calculate the similarity of the final entity embeddings of the two enterprise time series knowledge graphs to be aligned, and measure the similarity between the final entity embeddings: ; in, and Represents the temporal knowledge graphs from different enterprises and The final entity embedding of is the cosine similarity function, which calculates the similarity between two final entity embedding vectors.
[0094] Step 2: Based on the set similarity threshold , determine semantically equivalent entity pairs across graphs: .
[0095] Matching entity pairs are stored in a collection : .
[0096] Step 3: Through an iterative alignment optimization process, the newly aligned entity pairs are used to improve the alignment effect of the unaligned entities.
[0097] In order to improve the alignment accuracy, the contrast loss function is introduced , by minimizing the embedding distance of matching entity pairs and maximizing the embedding distance of non-matching entity pairs, the difference between positive and negative samples is ensured.
[0098] The loss function is defined as: ; in, and Represent the sets of matching entity pairs and non-matching entity pairs respectively; Represents the marginal constant, which is used to control the distance threshold between positive and negative samples.
[0099] Step 4: Global multi-module training optimization.
[0100] The loss function of the entity alignment module and other modules together form a comprehensive loss function to achieve global optimization: ; in, , , , , and They represent weight coefficients, which are used to adjust the contribution ratio of different modules in the loss function; represents the loss function of the entity alignment module; Represents the loss function of the TGeo-Transformer module; Represents the loss function of the dimension reduction and regularization processing module; represents the loss function of the TGeoE module; represents the loss function of the time-aware module; Represents the loss function of the relational semantic embedding module.
[0101] In order to verify the performance of the framework model of this embodiment in the task of entity alignment of temporal knowledge graphs, four large-scale datasets with rich temporal features were selected: DICEWS-200, DICEWS-1K, YAGO-Wikidata 50K-1K and YAGO-Wikidata 50K-5K. In view of the possible entity missing problems in the datasets and their potential bias on the experimental results, the study designed a targeted processing method to reduce its interference.
[0102] In the data preprocessing stage, the original data is strictly screened and processed for quality. For the quads containing missing entities, differentiated processing strategies are formulated and implemented according to the characteristics of the data set and the specific application scenarios: for the missing entity information that can be supplemented by reasonable inference, data interpolation technology is used to fill the data gaps; for the instances that cannot be effectively filled, based on the range and distribution characteristics of the missing data, data samples that may have a significant impact on the accuracy of entity alignment are selectively eliminated, thereby effectively improving the reliability and effectiveness of the experimental results. Table 1 shows the relevant statistical information of the data set, where |E1| and |E2| represent the number of entity sets; |R1| and |R2| represent the number of relationship sets, |Q1| and |Q2| represent the number of randomly assigned quad subsets, |T| represents the number of time sets, |S| represents the number of pre-aligned seed pairs, and |P| represents the number of test sets.
[0103] The DICEWS-200 dataset has clear timestamps, and each record represents the relationship between two entities and the time when the relationship occurs. This experiment is based on the ICEWS05-15 dataset, and its quadruplets are randomly divided into two subsets Q1 and Q2, ensuring that the sizes of the two subsets are similar and the overlap ratio is 50%. Subsequently, the DICEWS-1K and DICEWS-200 datasets are constructed using different numbers of alignment seeds (S), corresponding to 1000 and 200 pre-aligned seeds, respectively.
[0104] YAGO3 and Wikidata are two major knowledge bases, both of which contain various forms of temporal information, such as time points, time intervals, and their start and end times. Lacroix et al. extracted a subset from Wikidata, of which 90% of the facts were static facts and the rest were annotated with time. According to the frequency of entities in Wikidata, the first 50,000 entities were selected and associated with YAGO equivalent entities through the mapping relationship between qid and YAGO entities. Based on this, two temporal knowledge graphs (TKGs) containing Wikidata selected entities and YAGO facts were constructed, and temporal information was supplemented for YAGO entities. By removing non-temporal facts and using different numbers of alignment seeds, two datasets containing temporal information, YAGO-WIKI50K-5K and YAGO-WIKI50K-1K, were generated, corresponding to 5000 and 1000 pre-aligned seeds, respectively.
[0105] Table 1 Dataset
[0106] Baseline Method To ensure that the evaluation of the model is comprehensive and accurate, this example selects (I) an entity alignment method based on a translation method, (II) an entity alignment method based on graph neural networks (GNNs), and (III) an entity alignment method based on time perception as baseline methods.
[0107] MTransE(I) is a classic translation-based entity alignment method, which provides an effective alignment framework by mapping entities and relations into a low-dimensional vector space and computing entity alignments in different knowledge graphs via the translation principle.
[0108] JAPE(I) utilizes the joint learning of structural embedding and attribute information to capture cross-lingual entity correlations and further refine entity alignment when aligning knowledge graphs in multiple languages.
[0109] AlignE(I) This method samples subtle negative samples through an improved negative sampling strategy, thereby improving the accuracy of entity alignment, especially when processing complex data.
[0110] GCN-Align(II) is a framework based on graph convolutional networks (GCN). GCN-Align generates embedded representations by encoding information about entity neighborhoods and uses a predefined distance function to predict entity alignment, significantly improving the processing capabilities of graph-structured data.
[0111] MRAEA(II) optimizes the parameter settings in traditional alignment models by capturing information about graph structure and meta-relationships, and can effectively solve the entity alignment problem with fewer hyperparameters.
[0112] RREA(II) improves the capabilities of relation differentiation and dimensional isometry modeling by designing a special relation reflection transformation mechanism, thereby enhancing the performance in GNN-based entity alignment tasks.
[0113] MuGNN(II) combines two graph neural network models through a multi-channel robust encoding mechanism to learn knowledge graph embedding to improve the modeling ability of graph data.
[0114] KE-GCN(II) achieves efficient modeling and representation learning of multiple graphs by integrating multiple knowledge graph embedding methods with graph convolutional networks.
[0115] Dual-AMN(II) proposes a dual attention matching network, which innovatively models the relationships within and between graphs accurately to optimize the effect of entity alignment.
[0116] TEA-GNN (III) combines the advantages of graph neural networks, generates dynamic embeddings of entities through a time-aware neighbor aggregation mechanism, and uses a time-aware attention mechanism to assign different weights to different neighbors, thereby better capturing the temporal dependency in entity alignment.
[0117] TREA(III) fuses the embedding vectors of entities, relations, and timestamps, and uses graph neural networks to effectively capture the structural information between entities in the graph, while integrating temporal features and relational features to achieve entity alignment.
[0118] STEA(III) combines temporal information with embedded representation and uses the attention mechanism to accurately capture the key features in the entity alignment task, thereby improving the performance of the model in time-sensitive alignment tasks.
[0119] Evaluation indicators In order to evaluate the performance of different methods, this example uses Hits@K and mean reciprocal rank (MRR) as evaluation indicators, which are widely used in the evaluation of entity alignment models of knowledge graphs. This example models the entity alignment problem as a sorting task based on the similarity of entity representations. The alignment method is set to proceed from left to right by default. Taking the YAGO-WIKI50K dataset as an example, YAGO is used as the source temporal knowledge graph and WIKI50K is used as the target temporal knowledge graph for entity alignment.
[0120] Hits@K: It is used to evaluate the proportion of correct entities in the top K predicted entities. Specifically, the K value in this embodiment is 1 and 10, where Hits@1 and Hits@10 represent the proportion of correctly aligned entities in the top 1 and top 10 predictions, respectively, reflecting the model's ability to find the correct entity in the candidate entity set.
[0121] .
[0122] Mean Reciprocal Rank (MRR): It is the reciprocal average of the ranking of matching entities, which measures the ranking performance of the model for matching entities. The higher the MRR value, the higher the model is able to rank the correct entity, thus reflecting the accuracy of the model.
[0123] .
[0124] Implementation details Except for TLD-SE, other baseline models follow the original settings and baseline results of existing studies. Model training and parameter settings in this experiment, all experiments are carried out under the PyTorch framework. For different datasets, this experiment makes corresponding parameter adjustments to ensure that the model can best adapt to the data characteristics. Specifically, the parameter configurations of the DICEWS-1K and DICEWS-200 datasets are as follows: the embedding dimension is set to 128, the dropout rate is set to 0.5, the number of GNN layers is 2, the batch size is the sum of the entity sets |E1| and |E2|, that is, |E1|+|E2|, each training cycle (epoch) is 1200, to control the training scale, the maximum allowed number of iterations is set to 5, the optimizer uses RMSprop, the learning rate is set to 0.004, the number of heads of the multi-head attention mechanism is set to 4, the gradient clipping value is 5.0, and the hidden layer dimension of the feedforward neural network in the TGeo-Transformer module is set to 512. In addition, during the optimization of the loss function, different weight coefficients λ1, λ2, λ3, λ4, λ5, and λ6 are assigned to each module to balance the contribution of each module to the model training. Among them, λ1 is set to 0.4, and the others are set to 0.1. The marginal constant (γ) plays a key role in the loss functions of multiple modules, especially in the entity alignment module and the time-series graph-related modules (such as the TGeo-Transformer module, the time-aware module, etc.). In the experiment, the marginal constant For the YAGO-WIKI50K-5K and YAGO-WIKI50K-1K datasets, due to the long time interval and fewer time points, the balance factor is adjusted, and the weight coefficient λ1 is set to 0.3, and the marginal constant The other hyperparameters are set to 5.0 and remain the same as the DICEWS dataset to better fit the data characteristics.
[0125] All experiments were conducted on a single-core processor supported by a GPU. In order to verify the effectiveness of the model, different hyperparameter configurations were used on different data sets. All experimental results were trained five times independently and averaged to ensure the reliability and stability of the results.
[0126] Comparative analysis of baseline methods In order to fully verify the effectiveness of the TLD-SE model in the task of entity alignment in temporal knowledge graphs, this study selected four public datasets (DICEWS-200, DICEWS-1K, YAGO-Wikidata 50K-1K, and YAGO-Wikidata 50K-5K) and systematically compared their performance with a variety of baseline methods. The experimental results are summarized in Tables 2-5, showing the performance of different methods on the three core evaluation indicators of Hits@1, Hits@10, and mean reciprocal rank (MRR). Among them, the best results are marked in bold to highlight the best performance of each method. Based on the experimental results, the model performance was deeply analyzed and the following key conclusions were summarized.
[0127] On the DICEWS-200 dataset, TLD-SE's performance in Hits@1, Hits@10 and MRR was 0.959, 0.985 and 0.975 respectively. Compared with the translation-based methods MTransE, JAPE and AlignE, Hits@1 improved by 1331.3%, 878.6% and 332.0% respectively. This shows that in small-scale datasets, translation-based models cannot effectively capture complex temporal dynamic characteristics, while the TLD-SE model accurately models local temporal dependencies through the TGeoE module, and dynamically adjusts the weighted aggregation of neighborhood information in combination with the time-aware module, thus showing significant advantages in capturing temporal information and entity interaction characteristics.
[0128] On the larger DICEWS-1K dataset, the performance of TLD-SE further verifies its powerful temporal modeling capabilities. Hits@1 and MRR reach 0.963 and 0.980 respectively. Compared with the GNN baseline models GCN-Align, MRAEA, RREA, MuGNN, KE-GCN and Dual-AMN, the performance of Hits@1 is improved by 372.1%, 42.7%, 33.4%, 83.4%, 75.4% and 34.5% respectively. In addition, compared with the time-aware models TEA-GNN, TREA and STEA, the MRR indicators of TLD-SE are 7.6%, 5.0% and 2.7% higher. This result reflects the good adaptability of the model to more complex data structures, especially the TGeo-Transformer module captures global temporal dependencies through the multi-head attention mechanism, ensuring that the entity alignment task can still be accurately completed in large-scale graphs.
[0129] TLD-SE also performs well on the YAGO-Wikidata 50K-1K dataset. This dataset has a more complex graph structure and a wider range of knowledge coverage. Experimental results show that TLD-SE's Hits@1, Hits@10, and MRR reach 0.978, 0.965, and 0.992, respectively. Compared with the time-aware model STEA, Hits@1 is improved by 3.7%. In addition, compared with the translation-based model AlignE, MRR is improved by 60.5%. This result shows that the TLD-SE model can not only capture the temporal dynamic characteristics between entities in simple scenarios, but also has strong generalization and alignment performance on datasets with high complexity and high relationship density.
[0130] On the largest and most complex YAGO-Wikidata 50K-5K dataset, TLD-SE's Hits@10 and MRR reached 0.998 and 0.985, respectively, which are close to the ideal values. This shows that the TLD-SE model effectively integrates local temporal information and global temporal dependencies through the adaptive fusion module, further enhancing its ability to model complex knowledge graphs. In addition, the model's integration of semantic information and temporal characteristics makes its performance in large-scale graphs significantly ahead of traditional translation methods and some GNN methods. Compared with the time-aware model TREA, Hits@10 increased by 0.9%, while compared with the GNN methods MRAEA and RREA, MRR increased by 16.2% and 13.5%, respectively.
[0131] In summary, the performance of the TLD-SE model on the four datasets is significantly better than other baseline methods, and its performance advantage mainly comes from the multi-module collaborative optimization design. The model can effectively solve the shortcomings of traditional methods in temporal dynamics modeling and semantic enhancement by capturing local temporal dynamics through the TGeoE module, modeling global temporal dependencies with the TGeo-Transformer module, and flexibly integrating information from different perspectives with the adaptive fusion module. At the same time, experimental results show that the TLD-SE model exhibits extremely strong robustness and generalization capabilities, whether in small datasets or large and complex graphs, providing an efficient and reliable solution for the entity alignment task of temporal knowledge graphs.
[0132] Table 2 Comparative experimental results on the DICEWS-200 dataset
[0133] Table 3 Comparative experimental results on the DICEWS-1K dataset
[0134] Table 4 Comparative experimental results on the YAGO-Wikidata 50K-1K dataset
[0135] Table 5 Comparative experimental results on the YAGO-Wikidata 50K-5K dataset
[0136] It should be noted that all data is obtained in compliance with laws and regulations and user consent, and the data is used legally.
[0137] Example 2 This embodiment provides an enterprise time series knowledge graph entity alignment system, including: The relational semantic embedding module is configured to construct a business relationship-enterprise entity graph for each enterprise temporal knowledge graph to be aligned, and obtain the relational semantic embedding according to the semantic similarity of two business relationships; a time-aware graph attention module configured to generate time-aware entity embeddings by obtaining attention weights of neighboring entities of a target enterprise entity based on relational semantic embeddings, initial entity embeddings, and timestamps associated with business relationships between enterprise entities; A temporal geometry embedding module, configured to generate a temporal geometry entity embedding based on the initial relation embedding, the timestamp, and the time-aware entity embedding; The dimensionality reduction and regularization module is configured to reduce the dimensionality of the temporal geometric entity embedding and perform norm constraints to obtain the local entity embedding; a temporal geometric transformation module configured to generate a query vector, a key vector, and a value vector according to the local entity embedding, obtain a self-attention weight according to the query vector, the key vector, and the timestamp, and obtain a global entity embedding according to the self-attention weight and the value vector; A fusion module, configured to obtain a final entity embedding based on the local entity embedding and the global entity embedding; The entity alignment module is configured to screen matching enterprise entity pairs according to the similarity of the final entity embedding of the enterprise temporal knowledge graph to be aligned and the set similarity threshold, so as to complete the entity alignment of the enterprise temporal knowledge graph.
[0138] It should be noted that the above modules correspond to the steps described in Example 1, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above Example 1. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer executable instructions.
[0139] In further embodiments, there is also provided: An electronic device includes a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in Embodiment 1 is performed. For the sake of brevity, it will not be described in detail here.
[0140] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0141] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0142] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the method described in Example 1 is completed.
[0143] The method in Example 1 can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it is not described in detail here.
[0144] A computer program product includes a computer program, and when the computer program is executed by a processor, the method described in embodiment 1 is implemented.
[0145] The present invention also provides at least one computer program product tangibly stored on a non-transitory computer-readable storage medium. The computer program product includes computer executable instructions, such as instructions included in a program module, which are executed in a device on a real or virtual processor of the target to perform the process / method as described above. Typically, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform specific tasks or implement specific abstract data types. In various embodiments, the functions of program modules can be combined or divided between program modules as needed. Machine executable instructions for program modules can be executed in local or distributed devices. In distributed devices, program modules can be located in local and remote storage media.
[0146] The computer program code for implementing the method of the present invention can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the computer or other programmable data processing device, causes the function / operation specified in the flow chart and / or block diagram to be implemented. The program code can be executed completely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer or completely on a remote computer or server.
[0147] In the context of the present invention, computer program codes or related data may be carried by any appropriate carrier to enable a device, apparatus or processor to perform the various processes and operations described above. Examples of carriers include signals, computer readable media, etc. Examples of signals may include electrical, optical, radio, acoustic or other forms of propagation signals, such as carrier waves, infrared signals, etc.
[0148] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0149] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A method for aligning entities in enterprise temporal knowledge graphs, characterized in that: include: For each enterprise time series knowledge graph to be aligned, a business relationship-enterprise entity graph is constructed, and the relationship semantic embedding is obtained based on the semantic similarity of the two business relationships; According to the relational semantic embedding, the initial entity embedding and the timestamps related to the business relationship between the enterprise entities, the attention weights of the neighboring entities of the target enterprise entity are obtained to generate the time-aware entity embedding; Generate temporal geometric entity embeddings based on initial relation embeddings, timestamps, and time-aware entity embeddings; After reducing the dimension of temporal geometric entity embedding and applying norm constraints, local entity embedding is obtained; Generate query vector, key vector and value vector according to local entity embedding, obtain self-attention weight according to query vector, key vector and timestamp, and obtain global entity embedding according to self-attention weight and value vector; Get the final entity embedding based on the local entity embedding and the global entity embedding; According to the similarity of the final entity embedding of the enterprise time series knowledge graph to be aligned and the set similarity threshold, the matching enterprise entity pairs are screened to complete the entity alignment of the enterprise time series knowledge graph.
2. The method for aligning entities in a time series knowledge graph of an enterprise according to claim 1, characterized in that: The business relationship-enterprise entity graph is constructed by taking enterprise entities and business relationships as nodes and the interactions between enterprise entities and business relationships as edges; The process of obtaining the semantic embedding of a relationship based on the semantic similarity of two business relationships includes: The semantic similarity between two business relations is quantified by calculating the inner product of the two business relation embedding vectors. Thus, the relation semantic embedding is expressed as: ; in, and are the i-th business relationship and the jth business relationship The low-dimensional embedding vector of And use the negative log-likelihood loss function as the objective function To optimize: ; in, For indirect adjacency, for and The weight between and The number of common business entities shared.
3. The method for aligning entities in a time series knowledge graph of an enterprise according to claim 1, characterized in that: The attention weights are: ; in, , and are the i-th initial entity embeddings , the jth initial entity embedding and relational semantic embedding The feature weight parameter, Embed for timestamp; The process of generating time-aware entity embeddings involves: The updated target entity embedding is obtained by weighted summing of the attention weights of all neighboring entities of the target enterprise entity. : ; in, Target business entity The set of neighborhood entities, is the activation function; Using a multi-head attention mechanism to generate time-aware entity embeddings: ; in, is the number of attention heads, Represents a concatenation operation.
4. The method for aligning entities in a time series knowledge graph of an enterprise according to claim 1, characterized in that: The process of generating temporal geometric entity embeddings includes: By introducing timestamp embedding in geometric distance calculation , optimize time-aware entity embeddings: ; in, For time-aware entity embedding, is the temporal geometric entity embedding, is the initial relation embedding; In the process of generating temporal geometric entity embedding, design the total loss function for: ; in, and is the weight parameter; and is the marginal constant; is the geometric distance function; is a hard margin loss.
5. The method for aligning entities in a time series knowledge graph of an enterprise according to claim 1, characterized in that: Self-attention weight for: ; in, is the scaling factor; is the query vector; is the key vector; According to the self-attention weight Sum value vector , compute weighted entity embeddings : ; in, Represents a business entity The set of neighborhood entities; Use multi-head attention mechanism to optimize weighted entity embedding and obtain global entity embedding : ; in, Represents the number of attention heads.
6. The method for aligning entities in a time series knowledge graph of an enterprise according to claim 1, characterized in that: By calculating the fusion weight of local entity embedding and global entity embedding , get the final entity embedding; fusion weight for: ; in, yes Activation function; and are the learnable parameters of the feedforward neural network; represents the concatenation operation of local entity embedding and global entity embedding; The process of selecting matching enterprise entity pairs includes: using cosine similarity to calculate the similarity of the two final entity embeddings, introducing a contrast loss function , minimizing the embedding distance of matching entity pairs while maximizing the embedding distance of non-matching entity pairs: ; in, and Represent the sets of matching entity pairs and non-matching entity pairs respectively; Represents the marginal constant, which is used to control the distance threshold between positive and negative samples.
7. An enterprise temporal knowledge graph entity alignment system, characterized in that: include: The relational semantic embedding module is configured to construct a business relationship-enterprise entity graph for each enterprise temporal knowledge graph to be aligned, and obtain the relational semantic embedding according to the semantic similarity of two business relationships; a time-aware graph attention module configured to generate time-aware entity embeddings by obtaining attention weights of neighboring entities of a target enterprise entity based on relational semantic embeddings, initial entity embeddings, and timestamps associated with business relationships between enterprise entities; A temporal geometry embedding module, configured to generate a temporal geometry entity embedding based on the initial relation embedding, the timestamp, and the time-aware entity embedding; The dimensionality reduction and regularization module is configured to reduce the dimensionality of the temporal geometric entity embedding and perform norm constraints to obtain the local entity embedding; a temporal geometric transformation module configured to generate a query vector, a key vector, and a value vector according to the local entity embedding, obtain a self-attention weight according to the query vector, the key vector, and the timestamp, and obtain a global entity embedding according to the self-attention weight and the value vector; A fusion module, configured to obtain a final entity embedding based on the local entity embedding and the global entity embedding; The entity alignment module is configured to screen matching enterprise entity pairs according to the similarity of the final entity embedding of the enterprise temporal knowledge graph to be aligned and the set similarity threshold, so as to complete the entity alignment of the enterprise temporal knowledge graph.
8. An electronic device, characterized in that: The method comprises a memory and a processor and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method according to any one of claims 1 to 6 is completed.
9. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the method described in any one of claims 1 to 6.
10. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Citation Information
Cited By
Land affair intelligent decision support method oriented to cross-department collaboration
CN120297701A
Large model reasoning enhancement system based on knowledge graph
CN120822622A
Trusted time sequence prediction method based on big language model fusion knowledge graph
CN120910484A
Enterprise information collaborative management method and system based on multi-source data fusion
CN122021837A