Critical event prediction method for strengthening relationship evolution rule between entities
By extracting short-term and global features of entities and relationships and combining them with a harmonic fitting algorithm to generate a crisis event prediction model, the adaptability problem of existing methods under multiple periodic features is solved, and more efficient crisis event prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-07
AI Technical Summary
Existing crisis event prediction methods struggle to adapt to the differentiated evolutionary patterns of various relationships when dealing with multiple cyclical characteristics, resulting in low prediction performance.
Short-term features of entities and relationships are extracted by sliding window, and a two-hop neighborhood query subgraph is constructed by combining graph convolutional network and gated recursion mechanism. Global features are extracted by graph attention mechanism, and temporal features of relationships are generated by harmonic fitting algorithm. Finally, a prediction model is generated by training with Transformer.
It enhances the model's ability to capture periodic patterns in long-term evolution, improves its robustness to irregular fluctuations and sudden changes, and significantly improves the accuracy of crisis event prediction.
Smart Images

Figure CN121809765A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a crisis event prediction method for strengthening the evolution law of inter-entity relationship, and belongs to the technical field of artificial intelligence. BACKGROUND
[0002] A crisis event generally refers to an event that causes a serious threat to a social system, an organization or a country, and requires an emergency response within a limited time. With the breakthrough of big data and artificial intelligence technology, crisis event prediction, as one of the key technologies of situation awareness, can capture weak signals and identify abnormal patterns from massive information, and generate forward-looking intelligence. This not only improves the monitoring and early warning accuracy of traditional risks such as natural disasters and safety accidents, but also provides key technical support for coping with increasingly complex non-traditional security threats, and becomes an important part of promoting the modernization of national governance capabilities. At present, crisis event prediction mainly relies on time-series knowledge graph reasoning technology. This technology extracts structural features and evolution patterns from historical knowledge graphs to infer the development trend of events, and ultimately predicts future events. Since crisis events are often influenced by long-term accumulation of political, economic and other factors, their evolution cycle may last for several months or even longer, so accurate modeling of evolution laws becomes a key link in crisis event prediction. In terms of feature extraction of crisis event evolution patterns, existing methods can be divided into two categories: implicit periodicity and explicit periodicity.
[0003] 1. Implicit periodicity
[0004] The method based on implicit periodicity refers to a method in which the model does not rely on explicit periodicity priori or structured design in the training process, but automatically extracts and represents periodic patterns from data through deep network architecture. This kind of method first inputs the historical sub-graph sequence into the model, and maps it to a dense vector through the embedding layer; then uses deep networks such as Transformer and recurrent neural network for highly nonlinear transformation, extracts features and fuses multi-scale information layer by layer; finally decodes the hidden representation obtained by encoding into the prediction result. Although this method can automatically capture periodic information, it has large model parameter quantity, high computational cost, limited efficiency in capturing global long-term periodic patterns, and is easily disturbed by local noise or non-stationarity; at the same time, it has weak interpretability, the extraction process of periodic features is difficult to analyze intuitively, and the modeling ability of long-time evolution law is limited.
[0005] 2. Explicit periodicity
[0006] The method based on explicit periodicity is a method for processing time sequence rules in a time sequence knowledge graph. The core idea is to directly use the repeated fact patterns in the history to predict future events. The method first analyzes the short-term dynamics and long-term trends of events through the coordinated action of the local window branch and the global sampling branch, and constructs an evolution sequence based on the change in the correlation degree between the two. Then, the trend component of the evolution sequence is extracted using moving average, and the evolution sequence is decomposed into trend component and seasonal component, and the seasonal component is aligned by period to capture regular patterns and sudden changes. Finally, the model extrapolates the learned periodic patterns to future time points and combines them with the trend prediction results to complete the event prediction. The performance of such methods is highly dependent on the prior knowledge of the period length, and the data itself must have a stable and known periodic pattern. In addition, as a key hyperparameter, the period length often needs to be adjusted repeatedly in different scenarios, affecting the stability and generalization ability of the model.
[0007] In summary, the implicit periodic method has the limitation of low efficiency of period learning, while the explicit periodic method can effectively extract the evolution pattern of the period, but its performance is highly dependent on accurate period prior. Existing explicit methods usually only set a single prior period, and when facing events with multiple periodic characteristics, the deviation between the single prior and the real period easily causes model mismatch. In addition, such methods consider the evolution period of different relationships between entities as the same period, which also makes it difficult for the model to adapt to the differentiated evolution rules of various relationships, resulting in lower prediction performance. Therefore, the present application proposes a crisis event prediction method that strengthens the evolution rules of relationships between entities. SUMMARY
[0008] The present application addresses the problem that existing methods consider the evolution period of different relationships as the same period, which greatly affects the prediction performance. By utilizing the time sequence characteristics of different relationships, the model can adapt to various relationship evolution rules, effectively improving the hit rate of crisis event prediction.
[0009] The design principle of the present application is as follows: first, extract the short-term features of entities and relationships from the time sequence knowledge graph using a sliding window; second, construct a 2-hop neighborhood query subgraph for the query entity and relationship based on the time sequence knowledge graph, and then use GAT to extract the global features of the query entity and relationship in combination with the short-term features; then calculate the cosine similarity between the short-term features and the global features of the query relationship to construct the relationship evolution sequence, and then use the harmonic fitting algorithm to generate the time sequence features of the query relationship by extracting the periodic features; finally, train the model using the short-term features, global features, and time sequence features of entities and relationships to generate a prediction model.
[0010] Step 1: Use a sliding window to segment the time sequence knowledge graph, and use a graph convolution network and a gated recurrent mechanism to extract the short-term features of entities and relationships.
[0011] Step 1.1, the time knowledge graph is segmented using a sliding window with a single step of 1 and a window size of m. For any timestamp t, there is a sequence of historical subgraphs with a length of m.
[0012] Step 1.2, each snapshot in the sequence of historical snapshots is processed in turn. For each entity, the information from its neighbor entities and corresponding relationships is aggregated using a relation-aware graph convolutional network (R-GCN) to obtain the current entity embedding. The entity embeddings in the m historical subgraphs are aggregated using a gated recurrent mechanism to obtain the final short-term feature of the entity at timestamp t. The short-term feature of a relationship is obtained by averaging the short-term features of its related entities.
[0013] Step 2, based on the time knowledge graph, a 2-hop neighborhood query subgraph for the query entity and relationship is constructed, and then combined with the short-term feature to extract the global feature of the query entity and relationship using GAT.
[0014] Step 2.1, for the query q = (s, r,?, t), extract the 1-hop historical events containing the query entity s; then, obtain the 1-hop target entities connected to s through the query relationship r, and further sample the 1-hop events involved in these target entities, and construct a 2-hop neighborhood query subgraph combining the above two parts of historical facts.
[0015] Step 2.2, use the short-term feature of the query time entity and relationship as the initial embedding of the query subgraph, and use the graph attention mechanism to extract the global feature of the query entity s and the query relationship r.
[0016] Step 3, calculate the cosine similarity between the short-term feature and the global feature of the query relationship to construct the relationship evolution sequence, and then use the harmonic fitting algorithm to generate the time sequence feature of the query relationship by extracting the periodic feature.
[0017] Step 3.1, at each timestamp, calculate the cosine similarity between the short-term feature and the global feature of the query relationship to construct a relationship evolution sequence that reflects the change in the correlation between the two types of features.
[0018] Step 3.2, construct a Lomb-Scargle periodogram of the relationship evolution sequence, and identify one or more periods by identifying significant peaks.
[0019] Step 3.3, based on the period, construct a parameterized sinusoidal wave superposition model, perform FFT analysis on the relationship evolution sequence, obtain the initial estimate of the amplitude and phase at the corresponding frequency, then use the least squares method to fit the linear parameters of the model, and finally obtain the period sequence of the relationship evolution. Subtract the period sequence from the evolution sequence to obtain the trend sequence of the relationship evolution.
[0020] Step 3.4, the periodic sequence and the trend sequence are respectively subjected to time sequence feature extraction by using the Transformer, and the features of the two are added to obtain the final query relationship time sequence feature.
[0021] Step 4, the model is trained by using the short-term feature, the global feature and the time sequence feature of the entity and the relationship to generate a crisis event prediction model.
[0022] Step 4.1, the short-term feature and the global feature of the entity are weighted and fused to obtain the final representation of the entity; the short-term feature, the global feature and the time sequence feature of the relationship are weighted and fused to obtain the final representation of the relationship.
[0023] Step 4.2, the final representation of the entity and the relationship is input into the decoder ConvTransE, the predicted entity result is output, and the entity prediction loss is calculated.
[0024] Step 4.3, the short-term feature and the global feature of the entity and the relationship in the query are input, a unified query representation is generated through a multilayer perceptron, and a positive and negative sample pair is constructed by using contrastive learning to learn the time context feature. Finally, a comprehensive supervised contrastive loss is output.
[0025] Step 4.4, the contrastive loss and the entity prediction loss are added to obtain the final loss function, and the crisis event prediction model is obtained through training.
[0026] Beneficial effects
[0027] Compared with the implicit periodicity method, the present application can effectively capture the periodicity mode of the event in the long-term evolution process, and decompose the event evolution rule into a periodic component and a trend component, so as to realize the separate modeling of the periodicity and the trend change. Not only the explanation ability of the model is enhanced, but also the robustness of the model to irregular fluctuations and sudden changes is improved.
[0028] Compared with the explicit periodicity method, the present application does not depend on a single preset period, and can depict the evolution rule of a multi-period event. By extracting the periodic features corresponding to different relationships, the model can flexibly adapt to diversified relationship evolution modes, and thus the accuracy of crisis event prediction is significantly improved. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 It is a principle diagram of the crisis event prediction method of the present application for strengthening the relationship evolution rule between entities. DETAILED DESCRIPTION
[0030] In order to better illustrate the purposes and advantages of the present application, the embodiments of the method of the present application are further described in detail below with examples.
[0031] The performance of the crisis event prediction model is evaluated using four subsets of the ICEWS and GDELT projects, namely ICEWS14 (2018), ICEWS18 (2019), ICEWS05-15 (2018), and GDELT (2013).
[0032] ICEWS14, ICEWS18, and ICEWS05-15 are all derived from the Integrated Crisis Early Warning System, covering a large number of international crisis events with precise timestamps. Among them, the ICEWS14 dataset is of moderate size and is suitable for evaluating the basic performance of the time knowledge graph completion model; ICEWS18 records a large number of complex dynamic interactions between entities in 2018, making it more suitable for evaluating the model's ability to model complex interactions; ICEWS05-15 covers a 10-year time span and has a large data size. The GDELT dataset is derived from the Global Database Language Dataset, covering 20 types of events. The characteristics of this dataset are relatively fewer nodes but higher out-degree and in-degree for individual nodes, i.e., dense connections between entities, making it suitable for studying the propagation and evolution rules of events under high-connectivity graph structures. The detailed information of each dataset is shown in Table 1.
[0033] Table 1: Crisis event prediction experiment data
[0034]
[0035] The parameter settings in the experiment are shown in Table 2.
[0036] Table 2: Experimental parameter settings
[0037]
[0038] The mean reciprocal rank (MRR) and hit rate (Hit@k) are used to evaluate the results of crisis event prediction in the experiment. The calculation method of MRR is shown in equation (1).
[0039]
[0040] where S is the set of quadruples in the test set, |S| is the number of quadruples, and rank i is the ranking of the i-th quadruple in the correct prediction result. The higher the value of this index, the better the performance.
[0041] The calculation method of hit rate is shown in equation (2).
[0042]
[0043] where I(·) is an indicator function that takes value 1 when the condition is true and 0 otherwise. Usually, k is set to 1, 3 or 10. The higher the value of the indicator, the better the predictive performance of the model in the retrieval or ranking task, and the stronger the predictive ability. Consistent with existing methods, the value of k is 1, 3, and 10.
[0044] The specific process of this experiment is as follows:
[0045] Step 1, the time series knowledge graph is segmented by using sliding window, and the short-term features of entities and relationships are extracted by using relationship perception graph convolution network and gate recurrent mechanism.
[0046] Step 1.1, set the window size of the sliding window as m, and the single step size as 1. For any timestamp t, extract its corresponding historical time series knowledge graph snapshot sequence as: {G t-m+1 ,G t-m+2 ,…,G t}.
[0047] Step 1.2, process each snapshot in the historical snapshot sequence in turn. For each entity, use the relationship perception graph convolution network to aggregate information from its neighbor entities and corresponding relationships to obtain the embedding of the entity in the current snapshot. In the l-th layer RGCN, the embedding update process of entity o at time t is shown in formula (3).
[0048]
[0049] where, and respectively represent the embedding of relationship r in the l-th layer, and the dynamic embedding of subject s and object o in the time t snapshot. and are learnable weights, the normalization constant c is the in-degree of the entity, and the activation function σ1 adopts the random rectified linear unit RReLU to enhance the nonlinear expression ability of the model.
[0050] Further, a time gating mechanism is introduced to fuse the entity embedding at the last time step with the current aggregation result to capture the dynamic features of the entity evolution over time. From time t-m+1, after m time steps of cyclic update, the short-term features of the entity are finally obtained. The gated recurrent unit (GRU) is implemented as shown in formula (4).
[0051]
[0052] where H t is the matrix composed of all entity short-term features is the entity feature matrix of the last layer output of RGCN at time stamp t.
[0053] The short-term feature of a relation is obtained by averaging the short-term features of its related entities, which also needs to be evolved through a cycle of m time steps. The calculation method of the short-term feature of a relation is shown in formula (5) and formula (6).
[0054] r′ r = pooling(H t,r ) + r t (5)
[0055] R t+1 = GRU rel (R t , R′ t ) (6)
[0056] wherein r t is the short-term feature of relation r at time stamp t, H t,r represents the set of short-term features of all entities connected with relation r at time t, r′ t is the context-enhanced short-term feature of relation obtained by averaging H t,r . R t refers to the embedding matrix composed of the short-term features of all relations at time stamp t, and R′ t is composed of r′ t of all relation short-term features at time stamp t.
[0057] Step 2, construct a 2-hop neighborhood query subgraph of the query entity and relation based on the time sequence knowledge graph, and then extract the global features of the query entity and relation by using the graph attention mechanism combined with the short-term features.
[0058] Step 2.1, for query q=(s, r,?, t), extract the 1-hop historical event containing the query entity s from the time sequence knowledge graph; then, obtain the 1-hop target entity connected with s through the query relation r, and further sample the 1-hop event involved in these target entities to construct a 2-hop neighborhood query subgraph.
[0059] Step 2.2, use the graph attention mechanism to extract the global features of the query entity and relation from the query subgraph, and the attention coefficient between adjacent nodes is shown in formula (7).
[0060]
[0061] wherein, is the short-term feature of the head entity and the tail entity, is the short-term feature of the relation between the entity s i and o j , a Tand W7 are learnable weight parameters, denotes the entity s i σ3 is a LeakyReLU activation function.
[0062] Subsequently, the structural information in the graph is adaptively aggregated by the attention coefficient, so as to obtain the global feature of the query entity and the query relationship. The calculation method of the global feature of the query entity is shown in formula (8).
[0063]
[0064] wherein, and are weight parameter matrices of each layer aggregation and self-loop.
[0065] The calculation method of the global feature of the query relationship is shown in formula (9).
[0066]
[0067] wherein, is the global feature of the relationship r in the (l+1)th layer, is the global feature of the relationship r in the lth layer, and are the global features of the entity s and the entity o in the lth layer, E r is the set of all edges with the relationship r, |E r is the size of the set E r , is a learnable weight parameter matrix, and σ1 is an activation function.
[0068] Step 3, constructing a relationship evolution sequence based on the cosine similarity between the short-term feature and the global feature of the query relationship r; identifying the period of the relationship evolution sequence by the Lomb-Scargle periodogram method; performing harmonic fitting on the evolution sequence based on the period to extract the periodic term as a periodic sequence, and subtracting the periodic sequence from the evolution sequence to obtain a trend sequence; after extracting the time sequence features by using the Transformer on the two, splicing them into time sequence features.
[0069] Step 3.1, calculating the cosine similarity between the short-term feature and the global feature of the query relationship according to formula (10) at each timestamp.
[0070]
[0071] wherein, denotes the global feature of the relationship r t is the relationship short-term feature extracted by the RGCN at the timestamp t.
[0072] The similarity values of the relationship on the continuous timestamps are arranged in chronological order to construct an evolution sequence that can reflect the correlation degree changes of the two types of features, as shown in equation (11).
[0073] seq r = {sim r,t-n , sim r,t-n+1 , …, sim r,t} (11)
[0074] Step 3.2, construct the Lomb-Scargle periodogram of the relationship evolution sequence, and determine one or more periods of the events under the relationship by identifying significant peaks. The power of the Lomb-Scargle periodogram at the angular frequency ω (or frequency f = ω / 2π) is defined as equation (12).
[0075]
[0076] wherein, is the mean of the relationship evolution sequence, σ is the variance of the relationship evolution sequence, N is the length of the sequence, t j is the time point corresponding to the jth similarity value, τ is a time offset used to make the calculation independent of the time origin, and is defined as equation (13).
[0077]
[0078] Based on the Lomb-Scargle periodogram P LS (ω), the significant period values are extracted according to equation (14) using a multi-peak identification algorithm. In the power spectrum of the periodogram, a set of local maximum points that satisfy the following conditions are identified.
[0079] P = {ω i | P LS (ω i ) > P LS (ω i±k ), P LS (ω i ) > P threshold} (14)
[0080] wherein, is the set of candidate peak frequencies detected, ω i is the ith candidate point of angular frequency, P LS (ω i ) is the Lomb-Scargle power value at the angular frequency ω i , ω i±k is the k frequency points adjacent to the frequency point ω i , and k is the neighborhood range parameter used to determine the comparison range of the local maximum value, P thresholdis a power threshold for screening significant peaks.
[0081] The detected peaks are sorted and screened by false alarm probability according to formula (15).
[0082]
[0083] where, is a set of significant peak frequencies, FAP(P LS (ω i )) is the corresponding false alarm probability when the power value is P LS (ω i ), and α is a significance level threshold, usually 0.01, 0.05, etc.
[0084] The false alarm probability is defined as the probability of falsely detecting a power peak in the case of pure noise, as shown in formula (16).
[0085]
[0086] where FAP(P) is the false alarm probability corresponding to the power peak P, N eff is the number of effective independent frequency points, N eff ≈f max ·(t N -t1), f max is the maximum frequency of scanning, t N -t1 is the total length of the time series, and e is the natural constant.
[0087] Convert the angular frequency corresponding to the significant peak to the event period, as shown in formula (17).
[0088]
[0089] where P i is the i-th significant event period, and ω i is the angular frequency corresponding to the significant peak.
[0090] Step 3.3. Perform FFT analysis on the relationship evolution sequence, obtain the initial estimates of amplitude A i and phase φ i at the corresponding frequency 1 / P i , and construct the initialized sine wave superposition model, as shown in formula (18).
[0091]
[0092] where P i is the i-th period, A i and φ iis the amplitude and phase of the i-th period, N is the number of periods whose power is greater than the significance power threshold, at most 3.
[0093] The model is represented in linear form as shown in equation (19).
[0094]
[0095] The linear parameters (a i ,b i ) are solved by least squares, and the objective function of the least squares is shown in equation (20).
[0096] min a i ,b i ∑t[seq r (t)-S(t)] 2 (20)
[0097] Finally, the period sequence S(t) of the relationship evolution sequence is obtained. Subtract the period sequence S(t) from the relationship evolution sequence to obtain the trend sequence T(t) of the relationship, and the calculation method is shown in equation (21).
[0098] T(t)=seq r (t)-S(t) (21)
[0099] Step 3.4, use Transformer to extract time sequence features for the period sequence and the trend sequence respectively, and add the features of the two to obtain the final time sequence feature, as shown in equation (22).
[0100]
[0101] where S and T represent the period sequence and the trend sequence respectively, is the final extracted time sequence feature.
[0102] Step 4, use the short-term features and global features of the entity, and the short-term features and global features and time sequence features of the relationship, to calculate the entity prediction loss and contrast loss, and train the model to generate a prediction model.
[0103] Step 4.1, according to equation (23), the short-term features and global features of the entity are weighted and fused to obtain the final representation H ALL of the entity.
[0104]
[0105] where λ is a hyperparameter for balancing the global and short-term features of the entity. represents the global features of the entity, which is composed of . H Sis the short-term feature of the entity.
[0106] According to formula (24), the global feature and the time sequence feature of the relationship are fused using a gating mechanism to obtain r L .
[0107]
[0108] wherein, and represent the time sequence feature and the global feature of the relationship respectively, b is a gating vector, σ4 is a sigmoid function, and represents an element-level multiplication operation.
[0109] According to formula (25), r L and the short-term feature are weighted and fused to obtain the final relationship representation R ALL .
[0110] R ALL = λR L +(1-λ)R S (25)
[0111] wherein, represents the global feature of the relationship, which is composed of R S is the short-term feature of the relationship.
[0112] Step 4.2, the final representation of the entity and the relationship is input into the decoder ConvTransE, and ConvTransE is used to calculate the probability that the subject entity e s and the object entity e o interact under the relationship r q at time t q , and the calculation method is shown in formula (26).
[0113]
[0114] The entity prediction is regarded as a multi-label learning problem. Therefore, the total entity prediction loss is shown in formula (27).
[0115]
[0116] wherein, is the label vector of the entity prediction task, and if the event occurs, the correct entity in the vector corresponds to 1, otherwise 0. refers to the set of all four-tuples in the dynamic knowledge graph at time step t. ε represents the set of all entities that the model can predict.
[0117] Step 4.3, the short-term features and global features of entities and relations in the query are input to generate a unified query representation through a multi-layer perception (MLP), and the calculation methods of the short-term query representation and the global query representation are shown in formulas (28) and (29).
[0118] q S = MLP[h S ||r S ] (28)
[0119]
[0120] where h S and r S are the short-term features of entities and relations, and r L are their global features.
[0121] For the same query, its short-term representation and global representation at time stamp t are constructed as a positive sample pair (q S,i , q L,i ), while the local and global representations of different queries constitute a negative sample pair (q S,i , q L,k ). Based on this, the calculation of the supervised contrast loss function L q at time stamp t lg is shown in formula (30).
[0122]
[0123] where Q represents the query set at time stamp t q , and |Q | represents the number of queries at this time; τ is the temperature parameter.
[0124] Similarly, by using the global query representation as an anchor point, a supervised contrast sample is constructed, and based on this, the global supervised loss L gl is defined. In order to further distinguish the different representations of queries in the semantic space, formula (30) is used to constrain the local and global query representations, thereby obtaining 2 supervised losses L ll and L gg . The final supervised contrast loss calculation is shown in formula (31).
[0125]
[0126] Step 4.4, according to formula (32), the contrast loss and the entity prediction loss are added to obtain the final loss function, and the crisis event prediction model is obtained through training.
[0127] L = L tkg + Lcl (32)
[0128] Test results: The crisis event prediction method based on the evolution law of the reinforced inter-entity relationship is used for crisis event prediction of ICEWS14, ICEWS18, ICEWS05-15 and GDELT, and the MMR of the application on ICEWS14 is 50.22%, Hit@1 is 39.14%, Hit@3 is 55.81%, and Hit@10 is 73.94%; the MMR on ICEWS18 is 37.20%, Hit@1 is 25.72%, Hit@3 is 42.55%, and Hit@10 is 60.42%; the MMR on ICEWS05-15 is 58.77%, Hit@1 is 47.56%, Hit@3 is 66.12%, and Hit@10 is 79.97%; the MMR on GDELT is 24.22%, Hit@1 is 14.52%, Hit@3 is 26.71%, and Hit@10 is 44.29%, and has good effect on crisis event prediction.
[0129] The above specific description further details the purpose, technical solution and beneficial effects of the application, and it should be understood that the above description is only a specific embodiment of the application and is not used to limit the protection scope of the application, and any modification, equivalent replacement, improvement, etc. within the spirit and principle of the application should be included in the protection scope of the application.
Claims
1. A crisis event prediction method that combines enhanced understanding of the evolutionary laws governing relationships between entities, characterized by... The method includes the following steps: Step 1: The temporal knowledge graph is segmented using a sliding window with a step size of 1 and a window size of m. For the m static snapshots in each window, the structural information of entities and relations is first encoded using a relation-aware graph convolutional network to obtain their structural representation. Then, the structural representation is input into a gated recursive unit to aggregate its historical temporal information and generate short-term feature representations of entities and relations at each timestamp. Step 2: For query q = (s, r, ?, t), extract the 1-hop historical events containing the query entity s from the temporal knowledge graph, then obtain the 1-hop target entities connected to s through the query relation r, and further sample the 1-hop events involved in these target entities to construct a 2-hop neighborhood query subgraph; then use the short-term features from Step 1 as the initial embeddings of entities and relations in the query subgraph, and use the graph attention mechanism to aggregate the structural information of the query subgraph to generate global features of query entity e and query relation r; Step 3: Calculate the cosine similarity between the short-term features and global features of the query relationship to construct the relationship evolution sequence, and then extract the periodic features of the relationship evolution sequence; perform harmonic fitting on the evolution sequence based on the periodic features, and use the fitting result as the periodic sequence of the relationship evolution; subtract the periodic sequence from the relationship evolution sequence to obtain the trend sequence; extract the time-series features from the periodic sequence and the trend sequence respectively, and splice them together to form the final time-series features. Step 4: Calculate entity prediction loss and contrastive learning loss using the short-term and global features of entities and the short-term, global, and temporal features of relationships, and train the model to generate a crisis event prediction model.
2. The crisis event prediction method based on the enhanced evolution law of inter-entity relationships according to claim 1, characterized in that: In step 3, the cosine similarity between the global features of the query relation r and the short-term features at each timestamp is calculated to construct the relation evolution sequence; the Lomb-Scargle periodogram method is used to identify several periods P in the relation evolution sequence. i At most 3; based on the extracted period P i FFT analysis was performed on the relationship evolution sequence, and the corresponding frequency 1 / P i Amplitude A is obtained at point i and phase φ i The initial estimate is used to construct an initialized sinusoidal superposition model. Then, based on the sinusoidal superposition model, the least squares method is used to perform harmonic fitting on the relation evolution sequence, and the fitting result is used as the periodic sequence of relation evolution. The periodic sequence is obtained by subtracting the periodic sequence from the relation evolution sequence. The periodic sequence and the evolution sequence are then processed using Transformer. periodic and Transformer trend Temporal features are extracted, and finally, the temporal features are added together to obtain the final temporal features.