A multi-intervention subject prediction method based on event evolution knowledge
By combining event evolution knowledge and temporal logic rules with a large language model, a rule base is generated, which solves the problem of inaccurate prediction of missing entities in the event chain in existing methods and achieves a more efficient entity completion effect.
Patent Information
- Application Number
- CN202411264809.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2044-09-10
AI Technical Summary
Existing temporal knowledge graph methods lack the ability to learn knowledge about event chains and acquire event background information when dealing with real and widespread events in the real world. This results in poor performance in practical applications, especially in cases of noise interference and knowledge gaps, where it is difficult to accurately predict missing entities in the event chain.
By identifying the structural information of key nodes in the historical chain through a large language model, and combining event chain evolution knowledge and temporal logic rules, a rule base is generated. Event predicate transition matrix, subject-predicate association matrix and object-predicate association matrix are mined, and entity prediction and completion are performed using the capabilities of the large language model.
It improves the accuracy of predicting missing entities in event chains. By mining event evolution information and historical dependencies, it forms an efficient entity completion model that can more accurately predict missing entities in event chains.
Smart Images

Figure CN119358646B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a case knowledge graph multi-element intervention subject prediction method combining event evolution trends and historical co-occurrence knowledge, and belongs to the technical field of artificial intelligence and natural language processing.
[0002] BACKGROUND
[0003] As a collection of human knowledge, a knowledge graph has a good research prospect in the field of natural language processing. A traditional knowledge graph is usually a static knowledge base, and uses a data topology of a graph structure to integrate facts (also referred to as events) in the form of a triple (s, p, o), wherein s and o represent subject and object entities respectively, and p represents a predicate as a relationship type. In the real world, knowledge is constantly evolving, and therefore a time-sequenced knowledge graph (TKG) is constructed and applied, that is, a timestamp t is added to the event triple.
[0004] Time-sequenced knowledge graph completion (TKGC) aims to automatically infer missing links of a knowledge graph by learning from existing facts. That is, a relationship p is inferred under the condition of a given query q, or an entity o or s is inferred under the condition of a given query q. The TKG provides a new perspective and insight for many downstream application scenarios, such as policy making, stock prediction and dialogue systems, thereby arousing people's interest in TKG reasoning.
[0005] Many researchers have modeled the structure and time characteristics of the TKG for future event prediction. For example, Ma introduced the first learning method based on embedding representation, embedding the four-tuple into a hidden latent space by encoding the learned representation to capture the event evolution pattern; BoxTE introduced a dynamic entity representation dependent on the relationship, enabling individual relationships to learn different time behaviors, thereby effectively capturing the time reasoning pattern. However, the embedding-based method needs to separately design a model for training different data sets, and loses the information on the event semantics in the TKG, and therefore, even slight data set modification operations and time adaptability modifications are difficult for the model to handle.
[0006] The rule-based method adopts understandable time logic rules to predict missing links. For example, AnyBURL extends from static rules to time-sequenced logic rules to obtain a path from a query entity to a predicted entity containing a timestamp; xERTE and TLogic provide understandable evidence that can explain the prediction, and obtain reliable rules by learning confidence scores in the knowledge graph, the confidence scores are determined according to the similarity between the rule head and the rule body, and the obtained rules can be used for construction and quality assurance of the knowledge graph. However, the rule-based method has limited scalability, and only similar data sets share similar rules, and cannot capture long-term dependency relationships.
[0007] Since the timestamped knowledge graph can be seen as a series of knowledge graph snapshots / subgraphs, some researches also regard TKG as time-evolving subgraphs with different relationship connections. For example, RTFE uses different Markov models for relations and entities to obtain the evolution pattern of the knowledge graph, RE-NET models the dynamic evolution of facts in an autoregressive manner, TANGO uses a neural ordinary differential equation for modeling, and RE-GCN uses multiple graph convolution layers on each graph snapshot to capture the dependency relationship of concurrent facts, and uses a gate recurrent component to effectively learn long-term temporal patterns from historical facts. Generally, the facts that occur before the query and are related to the query are regarded as its historical context. Methods such as xERTE, TGAP, etc. selectively focus on the attention mechanism of important aspects, sample adjacent historical facts by calculating edge attention scores, and iteratively generate explainable reasoning subgraphs to automatically capture relevant facts. Another method using historical context uses external / domain knowledge as a heuristic or guideline during the relevance measurement of historical facts, CyGNet uses a copy generation mechanism to identify high-frequency repeated events, and summarizes historical facts according to trend scores in order to use more relevant clues for prediction.
[0008] The commonly used benchmark dataset for TKGC methods is the ICEWS and GDELT dataset, which contains timestamped events extracted from the Integrated Crisis Early Warning System Repository and the Global Events, Language and Tone Database. The dataset is a discrete event four-tuple, and existing TKGC methods are also designed, learned and implemented for such datasets. However, real and widely existing events in the real world often have relatively complete plots and a series of event development paths. In actual application problems, the information that needs to be completed is the key entity node of an event tuple existing in a complete event chain, and existing methods are mainly suitable for discrete four-tuple information situations. In actual application, due to the lack of learning of event chain knowledge and the acquisition of event background information, they perform poorly due to noise interference and knowledge loss. SUMMARY
[0009] The purpose of the present application is to solve the technical problems of knowledge graph multi-intervention subject prediction in the prior art, and creatively propose a multi-intervention subject prediction method based on event evolution knowledge.
[0010] The method uses the ability of a large language model (LLM) to identify the structural information of key nodes in a historical chain, and by fusing event chain evolution knowledge and event triple historical dependency relationship knowledge in different dimensions, it mines temporal logic rules and forms a rule base, improves the ability of the model to efficiently acquire and utilize effective information in the dataset, and thus more accurately predicts missing entities in the event chain.
[0011] The innovation points of the present application include: obtaining event evolution information transfer matrix including event predicate transfer matrix, event subject-predicate association matrix and event object-predicate association matrix by tracing similar event cases in evolution trend, obtaining regularized event case evolution information as event chain level support for model generation to predict entities. By obtaining the dependency relationship between entities and predicates in the data set, the historical entities highly related to the to-be-completed event predicate are identified, and the core role of the predicate in the event triple is played. The ability of the large language model to identify the structural information of the key nodes in the historical chain is used, combined with the retrieval strategy based on the time sequence logic rule and a small amount of parameter efficient instruction optimization, the potential of the large language model in the time sequence knowledge graph completion field is tapped, and a complete entity prediction and completion model based on event evolution knowledge is obtained.
[0012] The present application adopts the following technical solutions.
[0013] A multi-intervention subject prediction method based on event evolution knowledge, comprising the following steps:
[0014] Step 1: Process the original event data set to generate an event chain data set.
[0015] For example, first, based on the security event text news data in the event data set EEOK and THUCNews, a large language model ChatGPT3.5 can be used to automatically generate part of the relevant department response policy text, and the original text information and the generated strategy are fused, and after manual screening and processing, a reliable security event case library with event process description and response strategy is obtained.
[0016] Then, event triple extraction is performed on each event case (event chain) in the event case library (OmniEvent open source event extraction toolkit can be used to realize the extraction). The relative order of event occurrence in the event chain is used as a timestamp to construct a time sequence event chain data set.
[0017] Step 2: Perform semantic fusion preprocessing on the event chain data set.
[0018] In order to improve the accuracy of event representation in the data set and reduce redundant representation forms in the entity and event predicate representation set, the different representation methods of the same entity in the data set need to be processed consistently. Specifically, semantic fusion can be performed on the elements in the event chain by using similar fusion and co-reference resolution methods.
[0019] For the entity set and predicate set in the data set, BERT model can be used for embedding representation, cosine similarity is used as the similarity evaluation index, and the global entity representation with a unified similarity reaching the threshold. On the other hand, the INCEpTION open source tool can be used for entity linking annotation to unify the co-reference entities existing in the event chain and complete the semantic fusion preprocessing of the event chain.
[0020] Step 3: Design an event chain evolution information transfer matrix generation module to generate evolution information representation combined with similar event chain information.
[0021] In the transfer matrix generation module, in order to efficiently obtain and use the evolution information in the data set, the top k similar event chains are selected as the knowledge source of the incomplete event chain.
[0022] In this process, taking the predicate of the triple in which the entity to be completed in the event chain as the core information, the structure information of the event chain is fused, and the BERT model can be used to represent the whole event chain. Cosine similarity is used as the semantic similarity index. By fusing the key predicate, structure similarity information and semantic similarity information as the similarity index, the corresponding similar event chain set is generated.
[0023] Then, the corresponding similar event chains are traversed, and the event predicate transfer matrix, event subject-predicate association matrix and event object-predicate association matrix are constructed according to the frequency of occurrence, which respectively represent the event development transfer information, the association information between the event entity as the event subject and the predicate, and the association information between the event entity as the event object and the predicate, and thus the event case evolution information is regularized.
[0024] Step 4: Design an event triple historical dependency relationship generation module.
[0025] First, the frequency of all entities associated with the subject or object and the predicate is calculated to capture different types of dependency relationships from two aspects: one is the similarity score vector between the query and the entity set, and the other is the corresponding frequency information of the query.
[0026] Then, for the isolated event predicate without historical dependency, the non-historical information is used as the contrast of historical dependency through the conversion of the indicator function to realize the dependency relationship representation at the triple granularity.
[0027] Step 5: Fuse the generated logical rules to obtain an entity completion model based on the fusion of event chain evolution knowledge.
[0028] First, obtain the time sequence logical rule set based on the transfer matrix and the historical dependency relationship, and sort them according to the relevance confidence score with the query. Apply the learned rules and select the top k rule subjects to add historical events to the given query.
[0029] Then, the time knowledge graph prediction task is adjusted to an instruction task of a large language model, and different parts are self-adapted. In addition to fixed task instructions, task input is modeled as a historical case chain retrieved from a given query, and each fact is filled in a template. Among them, the query content is represented in a similar way so that the large language model can complete the generation of the prediction.
[0030] Step 6: Train the neural network, use cross-entropy as the loss function to calculate the loss value, and realize self-generation of event chain completion entities.
[0031] Among them, within the set training rounds, the gap loss between the predicted generated entity and the real entity is calculated using cross-entropy, and the model parameters are adjusted through back propagation optimization, and finally the model performance is optimized.
[0032] By then, the intervention entity completion model that fuses the evolution knowledge of the event chain and the historical dependency relationship is completed, the ability of the completion model to efficiently obtain and utilize effective information in the data set is improved, and the model can more accurately predict the missing intervention subject in the event chain by mining the time sequence logical rules and forming a rule library.
[0033] Advantages
[0034] Compared with the prior art, the method has the following advantages.
[0035] 1. The method performs knowledge mining on the event chain, obtains an event evolution information transfer matrix by tracing similar event cases with evolution trends, including an event predicate transfer matrix, an event subject-predicate association matrix, and an event object-predicate association matrix, obtains regularized event case evolution information, and uses the information as an event chain level support for model generated prediction entities.
[0036] 2. The method obtains the dependency relationship between entities and predicates in the data set, identifies historical entities highly related to the to-be-completed event predicate, and plays a core role of the predicate in the event triple.
[0037] 3. The method uses the ability of the large language model to identify the structural information of the key nodes in the historical chain, combines the retrieval strategy based on the time sequence logical rules and a small number of parameter efficient instruction optimization, and mines the potential of the large language model in the time sequence knowledge graph completion field. DETAILED DESCRIPTION
[0038] Figure 1 The flowchart of the method of the present application.
[0039] Figure 2 The implementation framework diagram of the method of the present application. DETAILED DESCRIPTION
[0040] The application will be further described in detail below with reference to the accompanying drawings and examples.
[0041] Examples
[0042] The data set selected in this example is from the following website:
[0043] https: / / github.com / RingBDStack / KGEvetPred
[0044] As shown in the following figure, a multi-intervention subject prediction method based on event evolution knowledge includes the following steps: Figure 1
[0045] Step 1: Generate an event chain data set.
[0046] Since the existing TKGC data set is in the form of isolated event quadruples, in order to address the actual problem that real events often have complete plots and development paths, the social security part of the event prediction data set EEOK and the news text data set THUCNews needs to be processed to generate an event chain data set.
[0047] Specifically, the EEOK data set and the social security part of the THUCNews can be read into the text collection. For each event description d D in the text collection D=(d1, d2, …, d i ), a generative large language model ChatGPT3.5 is used to generate an application strategy set M=M=(m1, m2, …, m D ), which is adjusted by manual review and fused with text information to obtain a complete social security event case library text data set Events= (event1, event2, …, event D ) including event description and coping strategies.
[0048] For each event text event i in the data set Events, the open source event extraction toolkit OmniEvent is used to extract its event chain information in the form of triple=(s, p, o), where s represents the event subject, p represents the event predicate (relationship), and o represents the event object, forming an entity set E=(e1, e2, …, e n ) and a relationship set R=(r1, r2, …, r k ), where e n represents an event entity composed of event subject s and event object o, and r k represents event predicate p. Finally, an event chain data set EL=(el1, el2, …, el D ), each event chain el in the set i comprises several event triples, el i = (triple1, triple2, …, triple in ), triple in represents a triple constituting an event chain.
[0049] In this embodiment, the completed data set EEOK comprises 221 event chains. The THUCNews security event data comprises 2433 event chains.
[0050] Step 2: Semantic fusion preprocessing of the event chain data set.
[0051] Since the event original text of the constructed event chain data set has contextual relevance, the event extraction process also has certain errors, and there is a large amount of redundant information in the event entity set and the relationship set, such as using “men” and “a man” to represent the same entity in the same event chain description, using “people engaged in curing diseases” and “doctors” to represent the common entity “doctors” in different event chains, and generating noise information in the entity completion prediction and evaluation process, therefore, it is necessary to perform semantic fusion preprocessing on the event data before use.
[0052] Specifically, first, the entity set E and the relationship set R are embedded and represented (BERT model can be used to realize), cosine similarity is used as a similarity evaluation index, and a similarity threshold is set to unify the global entity representation with a similarity reaching the threshold.
[0053] Then, the event chain is annotated for entity linking (INCEpTION open source tool can be used to realize), and the unified global entity representation is obtained. i The internal co-reference entity is unified, and the semantic fusion preprocessing of the event chain is completed.
[0054] Step 3: Design an event chain evolution information transfer matrix generation module to generate evolution information representation combined with similar event chain information.
[0055] Specifically, the following steps are included:
[0056] Step 3.1: Construct a similar event chain set.
[0057] The event chain is fused by key predicate matching, semantic similarity, and structural similarity to mine similar event chains in the data set that match the evolution relationship of the event chain to be completed, and to realize efficient use of the data set information.
[0058] First, for the current query event chain to be completed el i = (triple1, triple2, …, triplein ), the to-be-completed query event triple is q=(s, r,?), q=triple in The known subject s and predicate r are key information, and the parameter a is set as flag information. If the flag is 1, it indicates that the key information is included in other event chains. If the flag is 0, it indicates that the key information is not included.
[0059] Then, in order to obtain the semantic similarity of the event chain, the to-be-completed event chain el i The event original text event i The BERT semantic representation is generated, the cosine similarity is used as the semantic similarity index, and the parameter b is set as the semantic similarity representation.
[0060] Then, the GCN (Graph Convolutional Networks) is used to model the structure of the event chain, and the MVGRL model is used to convert entities into nodes and relationships into edges. The structural similarity between event chains is calculated by comparing the representations of nodes and edges, and the parameter c is used as the structural similarity representation.
[0061] Finally, the three parts of knowledge are combined as the event chain similarity representation, and the similarity sim ij is calculated as follows:
[0062] sim ij = c key a i +c sem b i +c st c i
[0063] Wherein, a i is the flag information, b i is the semantic similarity representation, and c i is the structural similarity representation; c key , c sem , and c st represent the weight parameters of the flag information, the semantic similarity representation, and the structural similarity representation, respectively.
[0064] According to the similarity corresponding to the current to-be-completed query event chain el i , the TOP k similar event chains are taken as The similar event chains constitute a similar time chain set, denoted as
[0065] Step 3.2: Generate event chain evolution information transfer matrix.
[0066] The current to-be-completed query event chain eli the corresponding similar chain set SIM i Mining, constructing the event predicate transition matrix measuring the evolution relationship of event predicates, and the subject / object-predicate association matrix measuring the co-occurrence association relationship between entities as subjects or objects and event predicates.
[0067] Specifically, for a similar event chain Generating a similar event chain entity set for the entities and predicates contained therein and a relationship set The dimension of the similar entity set is d1, The dimension of the similar relationship set is d2, which corresponds to the event predicate transition matrix M r The frequency of the co-occurrence of the predicate and its next event predicate as a context tuple in the similar event chain, The subject-predicate association matrix and the object-predicate association matrix respectively represent the frequency of the co-occurrence of entities as predicate subjects or objects and predicates in similar event chains.
[0068] Then, the entire similar event chain set is processed to construct the event evolution information transition matrix, and the event evolution pattern corresponding to the query event chain is mined.
[0069] Step 4: Design the event triple historical dependency relationship generation module.
[0070] In addition to the event chain level knowledge, at the event triple granularity, non-similar event chains also provide certain prior information. For most event triples, especially disposal strategy event triples, the predicate often appears frequently in other event chains, so common historical collocations can contain reliable historical dependency information.
[0071] Specifically, in the historical and non-historical information part of the event triple, for the entity to be completed query q = (s, r,?), the historical event set is defined as D s,r The corresponding historical entity set is defined as H s,r Entities not in H s,r are called non-historical entities:
[0072] D s,r = ∪ {(s, r, o) ∈ EL}
[0073] H s,r = {o | (s, r, o) ∈ D s,r}
[0074] Where s represents the event subject, p represents the event predicate (relationship), o represents the event object, and EL represents the event chain data set.
[0075] In most knowledge graphs, while many events often present a recurring pattern, new events can have no historical events to refer to. For this reason, not only historical entities but also non-historical entities need to be considered. First, the frequency of historical entities for a given query triple in = (s, r,?) is studied during data preprocessing. Specifically, the frequency of all entities that are associated entities of the subject s and the predicate r is calculated, and since the frequency of non-historical entities cannot be calculated, the frequency representation is converted to
[0076] Z s,r (o) = λ (Φ ∑|{o|(s,r,o)∈EL}|>0 - Φ ∑|{o|(s,p,o)∈EL}|=0 )
[0077] where Φ β is an indicator function that returns 1 if β is true, otherwise returns 0. |ε| represents the number of elements. λ represents the function parameter.
[0078] A learning strategy based on the copying mechanism is adopted, and Z s,r (o) captures different kinds of dependencies from two aspects: one is the similarity score vector between the query and the entity set, and the other is the corresponding frequency information of the query.
[0079] For historical dependencies, a latent context vector is generated for the query q, which scores the historical dependencies of different object entities, The calculation formula is:
[0080]
[0081] where tanh is an activation function, and ⊕ represents a concatenation operator, W his and b his are trainable parameters. A linear layer with tanh activation is used to aggregate the information of the query. Then, the output of the linear layer is multiplied by E to obtain a |ε| dimensional vector, where each element represents the similarity score between the corresponding entity o and the query q.
[0082] After that, Z s,r is added according to the copying mechanism, directly increasing the index score of the historical entity in to a higher value without participating in gradient update. Z s,r makes pay more attention to historical entities.
[0083] Similarly, for non-historical dependencies, the latent context vector is defined as:
[0084]
[0085] where tanh is an activation function, E T denotes the transpose of E, W nhis and b nhis are trainable parameters.
[0086] In contrast to the historical dependency, Z s,r is subtracted from focusing on non-historical entities.
[0087] By obtaining historical and non-historical dependency information, a dependency representation at the triple granularity is achieved.
[0088] Step 5: Combine event chain evolution information and event history knowledge to generate logical rules, and use a large language model to realize intervention subject prediction and completion.
[0089] Step 5.1: In step 3, the event evolution information transition matrix is obtained, and a confidence score threshold P is set. Extract the evolution information with a co-occurrence frequency higher than the threshold in the evolution matrix as the evolution rule to generate a rule base.
[0090] Similarly, for the historical dependency information obtained in step 4, obtain the high-frequency corresponding entities corresponding to each predicate as historical rules to form a set of temporal logic rules. The co-occurrence frequency is used as the confidence score for rule reliability sorting.
[0091] Step 5.2: Use a large language model (such as ChatGLM3-6b) as the base model, adjust the temporal knowledge graph prediction task to a large language model (instruction task), and in the implementation process, design the task instruction and task input, and specify the task output format.
[0092] Among them, the task instruction clearly defines the event chain missing intervention subject completion task of the large language model, helps it understand the task definition, and gives a clear solution for the large language model to follow and execute. The task input provides the query event chain that needs to be completed for the large language model, and inputs the corresponding event evolution information rules as a restriction condition.
[0093] In the task output restriction condition, the evolution indicators required for the intervention subject completion task are set, i.e. entity semantic consistency, predicted logic consistency, entity role consistency, event chain context consistency, and time consistency. At the same time, the output format of the large language model is limited, and finally the normalized model prediction entity distribution
[0094] Step 6: Use the cross-entropy loss function to calculate the real entity distribution P i (Y) and the predicted entity distribution The gap between
[0095]
[0096] wherein, represents the number of categories.
[0097] So far, the intervention entity completion model that integrates event chain evolution knowledge and historical dependency relationships is completed, and the ability of the completion model to efficiently obtain and utilize effective information in the data set is improved. The model predicts the missing intervention subject in the event chain more accurately by mining time sequence logic rules and forming a rule base.
[0098] Figure 2 The implementation framework diagram of the method.
[0099] Table 1 Effect comparison of 10 generation modes-2 data sets
[0100]
[0101] The performance of the method for completing the missing intervention subject in the data set on the HIT@1, HIT@3, HIT@10, and MRR indicators is shown in the last row of Table 1.
Claims
1. An event evolution knowledge-based multi-intervention agent prediction method, characterized in that, The method comprises the following steps: Step 1: generating an event chain dataset; In step 1, based on the social security part data in the event dataset, the coping strategy text is automatically generated using a large language model, the original text information and the generated strategy are fused, and after manual screening and processing, a reliable security event case library with event process description and coping strategy is obtained; Then, event triples are extracted from each event case in the event case library; The relative order of event occurrence in the event chain is taken as a timestamp to construct a time-series event chain dataset; Step 2: semantic fusion preprocessing is performed on the event chain dataset; The different representations of the same entity in the data are processed to be consistent, and the elements in the event chain are semantically fused; Step 3: an event chain evolution information transfer matrix generation module is designed, and evolution information is generated in combination with similar event chain information; In the transfer matrix generation module, the top k similar event chains are selected as the knowledge source of the incomplete event chain; In this process, the predicate of the triple in which the entity to be completed in the event chain is taken as the core information, the event chain structure information is fused, the event chain is represented as a whole, and the cosine similarity is used as a semantic similarity index; By fusing the key predicate, structural similarity information and semantic similarity information as similarity indexes, a corresponding similar event chain set is generated; Then, the corresponding similar event chains are traversed, and an event predicate transfer matrix, an event subject-predicate association matrix and an event object-predicate association matrix are constructed according to the frequency of occurrence, which respectively represent event development transfer information, association information between an event entity as an event subject and a predicate, and association information between an event entity as an event object and a predicate, and the event case evolution information is regularized according to the rules; The event predicate transfer matrix represents the frequency at which a predicate and its next event predicate appear together as a context tuple in similar event chains; Step 4: an event triple historical dependency relationship generation module is designed; First, the frequency of all entities associated with the subject or object and the predicate is calculated to capture different types of dependency relationships from two aspects: one is the similarity score vector between the query and the entity set, and the other is the corresponding frequency information of the query; Then, for isolated event predicates without historical dependencies, non-historical information is used as a contrast for historical dependencies through the conversion of an indicator function to realize the representation of dependency relationships at the triple granularity; In step 4, for an entity-incomplete query q = (s, r,?) in the history and non-history information part of the captured event triplets, the history event set is defined as D s,r The corresponding history entity set is defined as H s,r Entities not in H s,r are called non-history entities: D s,r = U {(s, r, o) E EL} H s,r = { o | (s, r, o) G D s,r} Wherein, s represents the event subject, p represents the event predicate, o represents the event object, and EL represents the event chain dataset; First, the frequency of the historical entities of a given query triple in = (s, r,?) is studied during data pre-processing; the frequency of all entities associated to the entity of the subject s and predicate r is computed; the frequency representation is converted into Z s,r (o) = λ(Φ ∑|{o|(s,r,o)∈EL}|>0 -Φ ∑|{o|(s,p,o)∈EL}|=0 ) where Φ β is an indicator function that returns 1 if β is true and 0 otherwise; |ε| denotes the number of elements; and λ denotes a function parameter; Adopting a learning strategy based on the copy mechanism, according to the input Z s,r (o) capture different kinds of dependencies from two aspects: one is the similarity score vector between the query and the entity set, and the other is the corresponding frequency information of the query; For historical dependency, generate a latent context vector for query q It scores the historical dependency of different object entities, The calculation formula is: where tanh is an activation function, denotes a concatenation operator, W his and b his are trainable parameters; a linear layer with tanh activation is used to aggregate information of the query; then, the output of the linear layer is multiplied by E to obtain a |e| -dimensional vector, where each element represents a similarity score between the corresponding entity o and the query q; After that, Z is added according to the copy mechanism s,r , directly increasing the index score of the historical entity in to a higher value without participating in gradient update; Z s,r makes pay more attention to historical entities; Similarly, for non-historical dependencies, the potential context vector is defined as: wherein tanh is an activation function, E T denotes the transpose of E, W nhis and b nhis are denoted as trainable parameters; As opposed to historical dependency, subtract Z s,r Make Focus on non-historical entities; Through the acquisition of historical and non-historical dependency information, the representation of dependency relationships at the triple granularity is realized; Step 5: a logical rule fusion is performed to obtain an entity completion model fused with event chain evolution knowledge based on a large language model; First, the time-series logical rule set is obtained based on the transfer matrix and the historical dependency relationship, and they are sorted according to the relevant confidence score of the query; the learned rules are applied, and the top k rule subjects are selected to add historical events to the given query; In step 3, the event evolution information transfer matrix is obtained, the confidence score threshold P is set, and the evolution information with a co-occurrence frequency higher than the threshold in the evolution matrix is extracted as the evolution rule to generate the rule base; Similarly, for the historical dependency information obtained in step 4, the high-frequency corresponding entities corresponding to each predicate are obtained as historical rules to form a set of timing logic rules, and the co-occurrence frequency is used as the confidence score for rule reliability sorting; Then, the time knowledge graph prediction task is adjusted to a large language model instruction task, and different parts are adapted; in addition to the fixed task instructions, the task input is modeled as a historical case chain retrieved from a given query, and each fact is filled in the template; Step 6: Train the neural network using cross-entropy as the loss function to calculate the loss value and realize self-generated event chain completion entities; Among them, within the set training rounds, the cross-entropy is used to calculate the gap loss between the predicted generated entities and the real entities, and the model parameters are optimized and adjusted through back propagation, so that the model performance reaches the optimal.
2. The multi-agent prediction method based on event evolution knowledge according to claim 1, wherein, In step 1, the social security part data in the event data set is read in as a text collection; For each event description d D in the text set D=(d1,d2,…,d i , the application strategy set M is generated by using the generative large language model, M=(m1,m2,…,m D ), and after manual review and adjustment, the complete social safety event case library text data set Events including event description and coping strategy is obtained by fusing text information, Events=(event1,event2,…,event D ); For each event text event in the dataset Events i , the event chain information is extracted in the form of triples triple = (s, p, o) by the open source event extraction toolkit OmniEvent, where s represents the event subject, p represents the event predicate (relationship), and o represents the event object, forming the entity set E = (e1, e2, …, e n ) and the relationship set R = (r1, r2, …, r k ) respectively, where e n represents an event entity composed of the event subject s and the event object o, and r k represents the event predicate p; finally, the event chain dataset EL is generated, EL = (el1, el2, …, el D ), each event chain el i in the set includes several event triples, el i = (triple1, triple2, …, triple in ), and triple in represents the triple that constitutes the event chain.
3. The multi-agent prediction method based on event evolution knowledge of claim 1, wherein, In step 2, the event chain data set is preprocessed by similarity fusion and co-reference resolution; First, the entity set and predicate set in the data set are embedded and represented, and the cosine similarity is used as the similarity evaluation index, and the global entity representation with a similarity threshold is unified; Then, the event chain is annotated for entity linking, and the co-reference entities existing in each event chain are unified to complete the semantic fusion preprocessing of the event chain.
4. The multi-agent prediction method based on event evolution knowledge of claim 2, wherein, In step 3, the similar event chain set is constructed by the following method: First, for the current to be completed query event chain el i = (triple1, triple2, …, triple in ), the to-be-completed query event triple thereof is q = (s, r,?), q = triple in The known subject s and predicate r in triple are key information, and the indication parameter a is set as flag information. If the flag is 1, it indicates that the key information is contained in other event chains, and if the flag is 0, it indicates that the key information is not contained. Then, to obtain the semantic similarity of the event chain, the event chain el to be completed i The corresponding event original text event i Generate BERT semantic representation, use cosine similarity as semantic similarity index, and set parameter b as semantic similarity representation; After that, the graph convolution network uses GCN to model the structure of the event chain by converting entities into nodes and relationships into edges; through the comparison learning representation of nodes and edges, the structural similarity between event chains is calculated, and the parameter c is used as the structural similarity representation; Finally, the three parts of knowledge are combined as the event chain similarity representation, and the similarity sim ij The calculation is as follows: sim ij = c key a i + c sem b i + c st c i wherein a i is a flag information, b i is a semantic similarity representation, c i is a structural similarity representation; c key , c sem , c st respectively represent weight parameters of the flag information, the semantic similarity representation, and the structural similarity representation. According to the current query event chain el to be completed i The corresponding similarity ranking, and the TOP k similar event chains are recorded as The multiple similar event chains constitute a similar event chain set, recorded as 5. The multi-agent prediction method based on event evolution knowledge according to claim 4, characterized in that, In step 3, the event chain evolution information transfer matrix is generated by the following method: to the current to-be-completed query event chain el i the corresponding similar chain set SIM i Mining, constructing the event predicate transition matrix measuring the development and evolution relationship of event predicates, and the subject / object-predicate association matrix of the co-occurrence association relationship between entities as subjects or objects and event predicates; For similar event chains Generate a set of similar event chain entities for the entities and predicates contained therein And a set of relations The dimension of the similar entity set is d1, The dimension of the similar relation set is d2, which corresponds to the event predicate transition matrix M r The frequency of the predicate and its next event predicate appearing together as a context tuple in the similar event chain is represented by Subject-predicate association matrix And object-predicate association matrix The frequency of the entity appearing together with the predicate as the subject or object of the predicate in the similar event chain is represented by Then, the whole similar event chain set is processed to construct the event evolution information transfer matrix, and the event evolution mode corresponding to the query event chain is mined.
6. The multi-agent prediction method based on event evolution knowledge of claim 1, wherein, In step 6, the difference between the true entity distribution P i (Y) and the model predicted entity distribution is computed using the cross-entropy loss function wherein represents the number of classes.
Citation Information
Patent Citations
Event extraction method fusing attention mechanism and convolutional neural network
CN115964497A
Knowledge mining-combined large-model complex event prediction method and device, electronic equipment and storage medium
CN118227735A