Method for completing cultural relic time sequence knowledge graph based on dynamic message passing

By employing dynamic message passing and multi-granularity temporal coding, the problems of incomplete entity information and insufficient temporal information in existing temporal knowledge graph completion models are solved, achieving more efficient entity representation and temporal feature capture, and improving the completion accuracy of temporal knowledge graphs.

CN122196192APending Publication Date: 2026-06-12TAIYUAN UNIVERSITY OF TECHNOLOGY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TAIYUAN UNIVERSITY OF TECHNOLOGY
Filing Date
2026-03-02
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing temporal knowledge graph completion models fail to fully integrate the semantic and domain information of entities, ignoring the impact of temporal differences and temporal granularity, resulting in incomplete entity information representation and insufficient temporal information expression.

Method used

We employ a dynamic message passing approach to construct a cultural relic temporal knowledge graph completion model through multi-head attention fusion and gating mechanisms. We introduce a time decay weight mechanism and multi-granularity temporal coding, and combine graph neural networks and dynamic convolution to capture the complex dependencies between entities, relationships, and time.

🎯Benefits of technology

It significantly improves the completeness and accuracy of entity knowledge representation, accurately captures global features of time information, and enhances the accuracy and reliability of temporal knowledge graph completion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122196192A_ABST
    Figure CN122196192A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of deep learning and knowledge graph, specifically to a cultural relic time sequence knowledge graph completion method based on dynamic message passing, which comprises the following steps: obtaining cultural relic time sequence knowledge graph information to be completed; constructing a cultural relic time sequence knowledge graph completion model based on a message passing graph neural network and dynamic convolution; and using the cultural relic time sequence knowledge graph completion model to complete the cultural relic time sequence knowledge graph. The cultural relic time sequence knowledge graph completion model effectively aggregates entity neighborhood information and semantic information at different time nodes by introducing a dynamic relationship representation and a time decay weight mechanism. The method fuses a comprehensive time encoding mechanism of multi-granularity time information, accurately captures global features of time information through periodic encoding and feature fusion, and effectively improves the expression of time information in time sequence knowledge graph completion. The dynamic convolution operation is used to construct deep interaction among entities, relationships and time, which can efficiently capture complex time dependency relationships among the three.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical fields of deep learning and knowledge graphs, and in particular to a method for completing a time-series knowledge graph of cultural relics based on dynamic message passing. Background Technology

[0002] With the deepening of the Digital China strategy, the revitalization of digital cultural relics assets faces an urgent need to leap from static storage to dynamic cognition. While cultural heritage institutions generally adopt artificial intelligence technology to build cultural relic knowledge bases, existing systems are mostly confined to the static knowledge graph paradigm. Temporal knowledge graphs expand upon traditional knowledge graphs by introducing a time dimension. They add temporal information to the triple, using quadruples (head entity, relation, tail entity, timestamp) to represent facts. Compared to static knowledge graphs, temporal knowledge graphs possess higher dynamism and real-time performance, accurately capturing dynamic changes in cultural relic-related information.

[0003] Since most temporal knowledge graphs are constructed manually or semi-automatically, they suffer from severe data sparsity, greatly limiting their practicality. Therefore, temporal knowledge graph completion methods have emerged. Temporal knowledge graph completion aims to fill in missing entities or relations in a temporal knowledge graph, thereby improving its structure. Considering the dynamic changes in facts within temporal knowledge graphs, many models incorporate temporal information into fact representations in Euclidean or complex spaces, using transformations such as translation, rotation, or decomposition to represent the potential relationships between entities, relations, and temporal information. Building upon this, more advanced techniques introduce graph neural networks or recurrent neural networks to model event sequences, improving completion performance.

[0004] However, most existing temporal knowledge graph completion models tend to focus only on the semantic or neighborhood information of entities when processing entity information representation, failing to comprehensively integrate these two types of information. Furthermore, when processing entity neighborhood information, all neighboring nodes and relationships are treated with equal weight, ignoring temporal differences, resulting in incomplete representations of entity information. In addition, real-world temporal information has multi-granularity features (e.g., year, month, day). Different temporal granularities contain different semantic information and have different impacts on the representation of entities and relationships. For example, yearly and monthly granularities capture long-term trends and periodic information of events, while daily granularity captures instantaneous information of events. Most existing temporal knowledge graph completion algorithms treat time as an independent embedding, ignoring the impact of temporal granularity on the representation of entities and relationships. Summary of the Invention

[0005] To overcome the technical shortcomings of existing temporal knowledge graph completion models, such as the inability to fully integrate the semantic and domain information of entities and the neglect of temporal differences and temporal granularity, this invention provides a method for completing a cultural relic temporal knowledge graph based on dynamic message passing.

[0006] This invention provides a method for completing a cultural relic temporal knowledge graph based on dynamic message passing, comprising the following steps:

[0007] Step S1: Obtain the cultural relic chronological knowledge graph information to be completed; the cultural relic chronological knowledge graph information to be completed includes: cultural relic chronological knowledge graph. ,in , and These represent sets of entities, relations, and time, respectively.

[0008] Step S2: Construct a cultural relic temporal knowledge graph completion model based on message-passing graph neural network and dynamic convolution; its sub-steps are:

[0009] Step S21: Obtain dynamic relationship representation through multi-head attention fusion and gating mechanism. ;

[0010] Step S22: Based on the dynamic relation representation obtained in step S21, classify it according to relation type, generate entity neighborhood information with time weights for different relation types, and perform weighted aggregation to obtain the updated entity representation. ;

[0011] Step S23: Obtain time representations at three granularities: year, month, and day through periodic encoding and feature fusion. ;

[0012] Step S24: Express the time for each particle size spliced ​​into relational embedding In this process, a time-aware relational embedding representation is obtained. Then embed the relation into the representation. Entity representation of fusion dynamic neighborhood information with step S22 A matrix vector is obtained by performing a chessboard-like stitching. ; to transform matrix vector Transform into entity relationship feature matrix For entity relationship feature matrix Convolution is performed to obtain interactive feature representations at various granularities;

[0013] Step S25: Learn adaptive weights for year, month, and day using an attention mechanism, perform weighted fusion, and then apply nonlinear enhancement to the weighted fusion result to obtain the prediction vector for the output tail entity. ,calculate The similarity score between the candidate tail entity o in step S1 and the four-tuple score is used to obtain the candidate tail entity o as the query. Predicted probability of the answer Complete the construction of the cultural relic chronological knowledge graph completion model;

[0014] Step S3: Use the obtained cultural relic chronological knowledge graph completion model to complete the cultural relic chronological knowledge graph.

[0015] Preferably, the sub-step of step S21 is as follows:

[0016] Step S211: Use a multi-head attention mechanism to fuse relation, time, and entity features to obtain a relation representation containing temporal features and contextual information. The fusion method is as follows:

[0017] ,

[0018] In the formula, These are the initial relation embedding and entity embedding, respectively. The average of the initial embeddings at the year, month, and day time granularities. All are learnable weight matrices. This serves as the initial embedding dimension for entities and relationships. Indicates a splicing operation;

[0019] Step S212, to Embedded through gating mechanism and initial relationship By fusing the data and employing residual connections, the static semantic representation of relations is preserved while the relations are dynamically updated, resulting in a spatiotemporally aware dynamic relation representation. , The calculation formula is:

[0020] ,

[0021] ,

[0022] In the formula, For the gated vector, The weight matrix is ​​a learnable matrix. This indicates element-wise multiplication.

[0023] Preferably, the sub-step of step S22 is as follows:

[0024] Step S221: Aggregate according to different relation types. Neighborhood information;

[0025] First, regarding the target entity Aggregation is achieved using a cyclic cross-correlation function. Dynamic neighborhood relationships End-of-phase entity information The aggregation formula is:

[0026]

[0027] Step S222: Divide the relationships into positive relationships, negative relationships, and self-looping relationships, and introduce time decay weights to... We weight the neighborhood information to obtain the weighted result. Neighborhood information;

[0028] Considering the target entity Neighborhood information is time-sensitive; recent neighborhood information contributes more than historical neighborhood information. Therefore, a time decay weight is calculated. Come to The neighborhood information is weighted and calculated as follows:

[0029]

[0030] In the formula, The learnable time decay coefficient, The time difference between the tail entity and the target entity. This refers to the weighted neighborhood information of the entities.

[0031] Step S223: The weighted result obtained by aggregating the three relation types. The entity representation is obtained by fusing neighborhood information and its own semantic information. ,

[0032] Depending on the relationship type, neighborhood relationship and tail entity information are aggregated to update the target entity. Neighborhood information under self-loop relationships does not need to consider time weights and only represents the semantic information of the target entity itself. The aggregation formula is as follows:

[0033] , ,

[0034] In the formula, For a learnable parameter matrix, For target entity The set of neighborhood relations and tail entities, where T represents a self-circulating relation;

[0035] but The calculation formula is:

[0036]

[0037] Preferably, the sub-step of step S23 is as follows:

[0038] Step S231: Decompose the timestamp into three granularities: year, month, and day, and encode them with sine and cosine cycles respectively. While preserving the time sequence, capture the periodic features of different time granularities. The periodic encoding function is as follows:

[0039] , ,

[0040] In the formula, For time The initial embedding dimension, each Corresponding to a frequency component, . The weight matrix is ​​a learnable matrix. This is the scaling factor for time;

[0041] Step S232: Compare the obtained time period characteristics of each granularity with the initial time representation. By merging these components, time representations at various granularities containing global time features are obtained. , The calculation formula is:

[0042] ,

[0043] In the formula, This is the initial temporal embedding vector for each granularity.

[0044] Preferably, in step S24, the time-aware relation embedding representation The calculation formula is:

[0045] ,

[0046] In the formula, For the initial relation embedding vector, The LeakyReLU activation function is used. The weight matrix is ​​a learnable matrix. Bias terms for relation embedding;

[0047] The concatenated matrix vector is ,in, These represent the height and width of the reshaping matrix, respectively.

[0048] Preferably, in step S24, the concatenated matrix vector... Perform loop filling and unfolding operations to transform it into an entity relation feature matrix adapted for convolution operations. , Time representation for each granularity Dynamic convolution kernels are generated through linear transformation. , These represent the number of output channels and the number of input channels, respectively. The kernel size is specified, and the entity relation feature matrix is ​​convolved using the kernel. Then, an activation function is applied to obtain an intermediate feature representation that incorporates daily granular time information. ,Will Daily feature representation is obtained through a fully connected layer. , The calculation formula is:

[0049] , ,

[0050] In the formula, DC represents the dynamic convolutional layer. This represents the convolution operation. The weight matrix is ​​a learnable matrix. For bias terms;

[0051] Since daily features influence monthly features and thus yearly features, hierarchical iteration is used to calculate the feature representations at each granularity.

[0052] Intermediate feature representation containing daily granular time information The intermediate feature representation is obtained by performing cyclic padding and inputting it into the DC and convolving it with the monthly convolution kernel. ,right Perform a linear transformation to obtain the monthly feature representation. This process continues iteratively to obtain the annual feature representation. .

[0053] Preferably, in step S25, The calculation formula is:

[0054] ,

[0055] In the formula, Adaptive weights for each granularity;

[0056] The calculation formula is:

[0057] ,

[0058] In the formula, The transpose matrix represents the entity embedding.

[0059] Preferably, the sub-step of step S3 is:

[0060] Step S31: Sort the predicted probabilities of tail entities obtained from the cultural relic time-series knowledge graph completion model in descending order, and select the tail entity with the highest probability as the query. The correct answer yields an effective predicted quadruple;

[0061] Step S32: Update all valid prediction quadruples to the cultural relic time series knowledge graph completion model to complete the cultural relic time series knowledge graph.

[0062] Compared with existing technologies, the technical solution provided by this invention has the following technical effects: Addressing the technical problem that existing temporal knowledge graph completion models cannot fully integrate the semantic and domain information of entities, this invention proposes a cultural relic temporal knowledge graph completion model. This model, by introducing dynamic relation representation and a time decay weight mechanism, can effectively aggregate entity neighborhood information and semantic information at different time nodes, significantly improving the completeness and accuracy of entity knowledge representation embedding. Simultaneously, addressing the technical problem that existing temporal knowledge graph completion algorithms ignore differences in temporal granularity and lack sufficient temporal information expression, the method described in this invention proposes a comprehensive temporal encoding mechanism that integrates multi-granularity temporal information. Through periodic encoding and feature fusion, it accurately captures the global features of temporal information, effectively improving the expression of temporal information in temporal knowledge graph completion. Furthermore, this invention employs dynamic convolution operations to construct a deep interaction between entities, relations, and time, which can efficiently capture the complex temporal dependencies among the three, further improving the accuracy and reliability of temporal knowledge graph completion. Attached Figure Description

[0063] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0064] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0065] Figure 1 This is a flowchart of the method for completing the cultural relic temporal knowledge graph based on dynamic message passing according to a certain embodiment of the present invention;

[0066] Figure 2 This is an overall framework diagram of the method for completing the cultural relic temporal knowledge graph based on dynamic message passing according to a certain embodiment of the present invention;

[0067] Figure 3 This is a diagram of the dynamic relationship-entity aggregation module described in step S2 of a certain embodiment of the present invention;

[0068] Figure 4 This is a schematic diagram of feature splicing in step S24 of a certain embodiment of the present invention;

[0069] Figure 5 This is a schematic diagram of a module of the cultural relic time sequence knowledge graph completion system based on dynamic message passing, as described in a certain embodiment of the present invention. Detailed Implementation

[0070] To better understand the above-mentioned objectives, features, and advantages of the present invention, the solutions of the present invention will be further described below. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.

[0071] Many specific details are set forth in the following description in order to provide a full understanding of the invention, but the invention may also be practiced in other ways different from those described herein; obviously, the embodiments in the specification are only some embodiments of the invention, and not all embodiments.

[0072] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0073] In one embodiment, such as Figure 1 As shown, the method for completing the temporal knowledge graph of cultural relics based on dynamic message passing includes the following steps:

[0074] Step S1: Obtain the cultural relic chronological knowledge graph information to be completed; the cultural relic chronological knowledge graph information to be completed includes: cultural relic chronological knowledge graph. ,in , and These represent sets of entities, relations, and time, respectively.

[0075] Step S2: Construct a cultural relic temporal knowledge graph completion model based on message-passing graph neural network and dynamic convolution; its sub-steps are:

[0076] Step S21: Obtain dynamic relationship representation through multi-head attention fusion and gating mechanism. Its sub-steps are:

[0077] Step S211: Use a multi-head attention mechanism to fuse relation, time, and entity features to obtain a relation representation containing temporal features and contextual information. The fusion method is as follows:

[0078] ,

[0079] In the formula, These are the initial relation embedding and entity embedding, respectively. The average of the initial embeddings at the year, month, and day time granularities. All are learnable weight matrices. This serves as the initial embedding dimension for entities and relationships. Indicates a splicing operation;

[0080] Step S212, to Embedded through gating mechanism and initial relationship By fusing the data and employing residual connections, the static semantic representation of relations is preserved while the relations are dynamically updated, resulting in a spatiotemporally aware dynamic relation representation. , The calculation formula is:

[0081] ,

[0082] ,

[0083] In the formula, For the gated vector, The weight matrix is ​​a learnable matrix. Indicates element-wise multiplication;

[0084] Step S22: Based on the dynamic relation representation obtained in step S21, classify it according to relation type, generate entity neighborhood information with time weights for different relation types, and perform weighted aggregation to obtain the updated entity representation. ;

[0085] The sub-steps are as follows:

[0086] Step S221: Aggregate according to different relation types. Neighborhood information;

[0087] First, regarding the target entity Aggregation is achieved using a cyclic cross-correlation function. Dynamic neighborhood relationships End-of-phase entity information The aggregation formula is:

[0088]

[0089] Step S222: Divide the relationships into positive relationships, negative relationships, and self-looping relationships, and introduce time decay weights to... We weight the neighborhood information to obtain the weighted result. Neighborhood information;

[0090] Considering the target entity Neighborhood information is time-sensitive; recent neighborhood information contributes more than historical neighborhood information. Therefore, a time decay weight is calculated. Come to The neighborhood information is weighted and calculated as follows:

[0091]

[0092] In the formula, The learnable time decay coefficient, The time difference between the tail entity and the target entity. This refers to the weighted neighborhood information of the entities.

[0093] Step S223: The weighted result obtained by aggregating the three relation types. The entity representation is obtained by fusing neighborhood information and its own semantic information. ,

[0094] Depending on the relationship type, neighborhood relationship and tail entity information are aggregated to update the target entity. Neighborhood information under self-loop relationships does not need to consider time weights and only represents the semantic information of the target entity itself. The aggregation formula is as follows:

[0095] , ,

[0096] In the formula, For a learnable parameter matrix, For target entity The set of neighborhood relations and tail entities, where T represents a self-circulating relation;

[0097] but The calculation formula is:

[0098]

[0099] Step S23: Obtain time representations at three granularities: year, month, and day through periodic encoding and feature fusion. The sub-steps are as follows:

[0100] Step S231: Decompose the timestamp into three granularities: year, month, and day, and encode them with sine and cosine cycles respectively. While preserving the time sequence, capture the periodic features of different time granularities. The periodic encoding function is as follows:

[0101] , ,

[0102] In the formula, For time The initial embedding dimension, each Corresponding to a frequency component, . The weight matrix is ​​a learnable matrix. This is the scaling factor for time;

[0103] Step S232: Compare the obtained time period characteristics of each granularity with the initial time representation. By merging these components, time representations at various granularities containing global time features are obtained. , The calculation formula is:

[0104] ,

[0105] In the formula, This is the initial temporal embedding vector for each granularity;

[0106] Step S24: Express the time for each particle size spliced ​​into relational embedding In this process, a time-aware relational embedding representation is obtained. Time-aware relational embedding representation The calculation formula is:

[0107] ,

[0108] In the formula, For the initial relation embedding vector, The LeakyReLU activation function is used. The weight matrix is ​​a learnable matrix. Bias terms for relation embedding;

[0109] Then the relation embedding representation Entity representation of fusion dynamic neighborhood information with step S22 A matrix vector is obtained by performing a chessboard-like stitching. The concatenated matrix vector is ,in, These represent the height and width of the reshaped matrix, respectively.

[0110] matrix vector Transform into entity relationship feature matrix For entity relationship feature matrix Convolution is performed to obtain interaction feature representations at various granularities; specifically:

[0111] For the concatenated matrix vector Perform loop filling and unfolding operations to transform it into an entity relation feature matrix adapted for convolution operations. , Time representation for each granularity Dynamic convolution kernels are generated through linear transformation. , These represent the number of output channels and the number of input channels, respectively. The kernel size is specified, and the entity relation feature matrix is ​​convolved using the kernel. Then, an activation function is applied to obtain an intermediate feature representation that incorporates daily granular time information. ,Will Daily feature representation is obtained through a fully connected layer. , The calculation formula is:

[0112] , ,

[0113] In the formula, DC represents the dynamic convolutional layer. This represents the convolution operation. The weight matrix is ​​a learnable matrix. For bias terms;

[0114] Since daily features influence monthly features and thus yearly features, hierarchical iteration is used to calculate the feature representations at each granularity.

[0115] Intermediate feature representation containing daily granular time information The intermediate feature representation is obtained by performing cyclic padding and inputting it into the DC and convolving it with the monthly convolution kernel. ,right Perform a linear transformation to obtain the monthly feature representation. This process continues iteratively to obtain the annual feature representation. ;

[0116] Step S25: Learn adaptive weights for year, month, and day using an attention mechanism, perform weighted fusion, and then apply nonlinear enhancement to the weighted fusion result to obtain the prediction vector for the output tail entity. , The calculation formula is:

[0117] ,

[0118] In the formula, Adaptive weights for each granularity;

[0119] calculate The similarity score between the candidate tail entity o in step S1 and the four-tuple score is used to obtain the candidate tail entity o as the query. Predicted probability of the answer ,in The calculation formula is:

[0120] ,

[0121] In the formula, The transpose matrix representing entity embedding;

[0122] Finally, the construction of the cultural relic chronological knowledge graph completion model was completed;

[0123] Step S3: Use the obtained cultural relic chronological knowledge graph completion model to complete the cultural relic chronological knowledge graph. Its sub-steps are as follows:

[0124] Step S31: Sort the predicted probabilities of tail entities obtained from the cultural relic time-series knowledge graph completion model in descending order, and select the tail entity with the highest probability as the query. The correct answer yields an effective predicted quadruple;

[0125] Step S32: Update all valid prediction quadruples to the cultural relic time series knowledge graph completion model to complete the cultural relic time series knowledge graph.

[0126] In one embodiment of the present invention, a system for completing a cultural relic chronological knowledge graph based on dynamic message passing is also disclosed. The method for completing a cultural relic chronological knowledge graph based on dynamic message passing is implemented on this system, which includes a data acquisition module, a model building module, and a chronological knowledge graph completion module. The data acquisition module, model building module, and chronological knowledge graph completion module are connected in series. The data acquisition module is used to acquire entity, relation, and timestamp information in the cultural relic chronological knowledge graph to be completed, and upload the data information to the model building module. The model building module is used to construct a cultural relic chronological knowledge graph completion model based on message passing graph neural network and dynamic convolution according to the acquired data information. The chronological knowledge graph completion module is used to complete the cultural relic chronological knowledge graph using the obtained cultural relic chronological knowledge graph completion model.

[0127] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the present invention. Although detailed descriptions have been provided with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments, and they should all be covered within the protection scope of the claims.

Claims

1. A method for completing a cultural relic temporal knowledge graph based on dynamic message passing, characterized in that, The steps are as follows: Step S1: Obtain the chronological knowledge graph information of the cultural relics to be completed; The information in the cultural relic chronological knowledge graph to be completed includes: cultural relic chronological knowledge graph. ,in , and These represent sets of entities, relations, and time, respectively. Step S2: Construct a cultural relic temporal knowledge graph completion model based on message-passing graph neural network and dynamic convolution; its sub-steps are: Step S21: Obtain dynamic relationship representation through multi-head attention fusion and gating mechanism. ; Step S22: Based on the dynamic relation representation obtained in step S21, classify it according to relation type, generate entity neighborhood information with time weights for different relation types, and perform weighted aggregation to obtain the updated entity representation. ; Step S23: Obtain time representations at three granularities: year, month, and day through periodic encoding and feature fusion. ; Step S24: Express the time for each particle size spliced ​​into relational embedding In this process, a time-aware relational embedding representation is obtained. Then embed the relation into the representation. Entity representation of fusion dynamic neighborhood information with step S22 A matrix vector is obtained by performing a chessboard-like stitching. ; to transform matrix vector Transform into entity relationship feature matrix For entity relationship feature matrix Convolution is performed to obtain interactive feature representations at various granularities; Step S25: Learn adaptive weights for year, month, and day using an attention mechanism, perform weighted fusion, and then apply nonlinear enhancement to the weighted fusion result to obtain the prediction vector for the output tail entity. ,calculate The similarity score between the candidate tail entity o in step S1 and the four-tuple score is used to obtain the candidate tail entity o as the query. Predicted probability of the answer Complete the construction of the cultural relic chronological knowledge graph completion model; Step S3: Use the obtained cultural relic chronological knowledge graph completion model to complete the cultural relic chronological knowledge graph.

2. The method for completing a cultural relic temporal knowledge graph based on dynamic message passing according to claim 1, characterized in that, The sub-steps of step S21 are as follows: Step S211: Use a multi-head attention mechanism to fuse relation, time, and entity features to obtain a relation representation containing temporal features and contextual information. The fusion method is as follows: , In the formula, These are the initial relation embedding and entity embedding, respectively. The average of the initial embeddings at the year, month, and day time granularities. All are learnable weight matrices. This serves as the initial embedding dimension for entities and relationships. Indicates a splicing operation; Step S212, to Embedded through gating mechanism and initial relationship By fusing the data and employing residual connections, the static semantic representation of relations is preserved while the relations are dynamically updated, resulting in a spatiotemporally aware dynamic relation representation. , The calculation formula is: , , In the formula, For the gated vector, The weight matrix is ​​a learnable matrix. This indicates element-wise multiplication.

3. The method for completing a cultural relic temporal knowledge graph based on dynamic message passing according to claim 1, characterized in that, The sub-steps of step S22 are as follows: Step S221: Aggregate according to different relation types. Neighborhood information; First, regarding the target entity Aggregation is achieved using a cyclic cross-correlation function. Dynamic neighborhood relationships End-of-phase entity information The aggregation formula is: Step S222: Divide the relationships into positive relationships, negative relationships, and self-looping relationships, and introduce time decay weights to... We weight the neighborhood information to obtain the weighted result. Neighborhood information; Considering the target entity Neighborhood information is time-sensitive; recent neighborhood information contributes more than historical neighborhood information. Therefore, a time decay weight is calculated. Come to The neighborhood information is weighted and calculated as follows: In the formula, The learnable time decay coefficient, The time difference between the tail entity and the target entity. This refers to the weighted neighborhood information of the entities. Step S223: The weighted result obtained by aggregating the three relation types. The entity representation is obtained by fusing neighborhood information and its own semantic information. , Depending on the relationship type, neighborhood relationship and tail entity information are aggregated to update the target entity. Neighborhood information under self-loop relationships does not need to consider time weights and only represents the semantic information of the target entity itself. The aggregation formula is as follows: In the formula, For a learnable parameter matrix, For target entity The set of neighborhood relations and tail entities, where T represents a self-circulating relation; but The calculation formula is:

4. The method for completing a cultural relic temporal knowledge graph based on dynamic message passing according to claim 1, characterized in that, The sub-steps of step S23 are as follows: Step S231: Decompose the timestamp into three granularities: year, month, and day, and encode them with sine and cosine cycles respectively. While preserving the time sequence, capture the periodic features of different time granularities. The periodic encoding function is as follows: In the formula, For time The initial embedding dimension, each Corresponding to a frequency component, . The weight matrix is ​​a learnable matrix. This is the scaling factor for time; Step S232: Compare the obtained time period characteristics of each granularity with the initial time representation. By merging these components, time representations at various granularities containing global time features are obtained. , The calculation formula is: , In the formula, This is the initial temporal embedding vector for each granularity.

5. The method for completing a cultural relic temporal knowledge graph based on dynamic message passing according to claim 1, characterized in that, In step S24, the time-aware relation embedding representation The calculation formula is: , In the formula, For the initial relation embedding vector, The LeakyReLU activation function is used. The weight matrix is ​​a learnable matrix. Bias terms for relation embedding; The concatenated matrix vector is ,in, These represent the height and width of the reshaping matrix, respectively.

6. The method for completing a cultural relic temporal knowledge graph based on dynamic message passing according to claim 5, characterized in that, In step S24, the concatenated matrix vector Perform loop filling and unfolding operations to transform it into an entity relation feature matrix adapted for convolution operations. , ; Time representation for each granularity Dynamic convolution kernels are generated through linear transformation. , These are the number of output channels and the number of input channels, respectively. The kernel size is specified, and the entity relation feature matrix is ​​convolved using the kernel. Then, an activation function is applied to obtain an intermediate feature representation that incorporates daily granular time information. ,Will Daily feature representation is obtained through a fully connected layer. , The calculation formula is: In the formula, DC represents the dynamic convolutional layer. This represents the convolution operation. The weight matrix is ​​a learnable matrix. For bias terms; Since daily features influence monthly features and thus yearly features, hierarchical iteration is used to calculate the feature representations at each granularity. Intermediate feature representation containing daily granular time information The data is then padded with loops and input into the DC (Digital Array) and convolved with the monthly convolutional kernel to obtain intermediate feature representations. ,right A linear transformation is performed to obtain the monthly feature representation #imgpt100#, and then the iteration continues to obtain the annual feature representation #imgpt101#.

7. The method for completing a cultural relic temporal knowledge graph based on dynamic message passing according to claim 1, characterized in that, In step S25, the calculation formula for #imgpt102# is: #imgpt103# In the formula, #imgpt104# represents the adaptive weights for each granularity; The formula for calculating #imgpt105# is: #imgpt106# In the formula, #imgpt107# represents the transpose matrix of the entity embedding.

8. The method for completing a cultural relic temporal knowledge graph based on dynamic message passing according to claim 1, characterized in that, The sub-steps of step S3 are as follows: Step S31: Sort the predicted probabilities of tail entities obtained from the cultural relic time-series knowledge graph completion model in descending order, and take the tail entity with the highest probability as the correct answer to the query #imgpt108# to obtain the effective prediction quadruple. Step S32: Update all valid prediction quadruples to the cultural relic time series knowledge graph completion model to complete the cultural relic time series knowledge graph.