Event temporal relationship identification method, device, equipment and medium
By acquiring and fusing the global semantic information and prior knowledge of the input text, the generated event temporal relationship recognition method solves the problems of manual dependence and insufficient generalization ability in traditional methods, and achieves accurate identification and robustness improvement of event temporal relationships. .
Patent Information
- Application Number
- CN202210201642.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-03
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-03-03
AI Technical Summary
Traditional event temporal relationship recognition methods rely on a lot of manual effort, lack generalization capabilities, and are difficult to capture the semantic information of words and the deep semantic information of sentences, and the model's performance in extracting common sense event temporal relationships is unstable.
By obtaining the global semantic information of the input text, we generate syntactic dependency triples and path dependency triples, fuse this information and add prior knowledge, and input the event temporal relationship classification model to identify temporal relationships.
It achieves accurate identification of event timing relationships, improves the robustness and accuracy of the model, reduces the interference of redundant information, avoids common sense errors, and improves the performance of extracting event timing relationships in complex sentences.
Smart Images

Figure CN116756267B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of deep learning and artificial intelligence technology, and more specifically to a method, device, equipment, medium and program product for identifying event temporal relationships. Background Art
[0002] The recognition of event sequence relations is a subtask in relation extraction. The purpose is to determine the order of occurrence of two target events in a timely manner, such as: before... and after..., etc. The recognition of event temporal relations has attracted the attention of more and more researchers. This task helps to automatically extract and generate event context. Therefore, this technology can be effectively applied to various vertical fields to solve characteristic scenario problems. For example, in the medical field, treatment plans can be selected more accurately based on the status and changes of certain diseases in different periods. In short, the recognition of event temporal relations can facilitate many other natural language processing tasks, such as question-answering systems, text summarization, text meaning, and knowledge graph construction.
[0003] Traditional rule-based and statistical methods for extracting event sequences rely on specific rules written by linguistic experts based on experience, carefully designed features, and complex natural language processing tools. Although these methods have been proven to be effective, they take up a lot of manual effort, lack generalization capabilities, and have problems such as incomplete rules and sparse features. In addition, traditional features make it difficult to capture the semantic information of words and the deep semantic information of sentences. Summary of the invention
[0004] In view of the above problems, the present disclosure provides a method, apparatus, device, medium and program product for identifying event temporal relationships.
[0005] According to a first aspect of the present disclosure, a method for identifying a temporal relationship of an event is provided, comprising:
[0006] Acquire global semantic information of events in an input text, wherein the input text includes at least two events, and the events include trigger words and event arguments;
[0007] The input text is processed to generate syntactic dependency triples of events and path dependency triples between events, wherein the syntactic dependency triples include: a first target event word, a word having syntactic dependency with the first target event word, and a syntactic dependency relationship; the path dependency triples include: the first target event word, the second target event word, and a path dependency relationship between the first target event word and the second target event word;
[0008] The syntactic dependency triples and path dependency triples are fused to obtain the key information of the events in the input text;
[0009] According to the prior probability of the event time series type, the constraint information of the prior knowledge of the event is obtained;
[0010] fusing the global semantic information of the event, the key information of the event, and the constraint information of the prior knowledge of the event to obtain fused information; and
[0011] The fused information is input into the event temporal relationship classification model to obtain the temporal relationship of events.
[0012] According to an embodiment of the present disclosure, according to the prior probability of the event time series type, the constraint information of the prior knowledge of the event is obtained, including:
[0013] Use encyclopedia data sets to calculate the frequency of occurrence of event time series types as the prior probability of event time series types;
[0014] Determine the probability of the event sequence type when the prior probability meets the threshold;
[0015] The probability of the event time series type is mapped into a vector to obtain the constraint information of the prior knowledge of the event.
[0016] According to an embodiment of the present disclosure, obtaining global semantic information of an event in an input text includes:
[0017] Get the word list and part-of-speech list of the input text;
[0018] Using a pre-trained language model, represent the word list as word embedding vectors, and the part-of-speech list as part-of-speech embedding vectors;
[0019] Fuse the word embedding vector and the part-of-speech embedding vector to obtain a fused embedding vector;
[0020] The fused embedding vector is input into the neural network model, and the global semantic information of the event in the input text is determined according to the output of the hidden layer of the neural network model.
[0021] According to an embodiment of the present disclosure, the neural network model includes a bidirectional long short-term memory network model.
[0022] According to an embodiment of the present disclosure, generating syntactic dependency triples of events and path dependency triples between events from input texts respectively includes:
[0023] Using the syntactic dependency tree, extract the first target event word, the words that are syntactically dependent on the first target event word, and the syntactic dependency relationship from the input text to generate syntactic dependency triples;
[0024] Extract the second target event word from the input text using the syntactic dependency tree;
[0025] Determining a path dependency relationship between the first target event word and the second target event word according to a path from the first target event word to the second target event word;
[0026] According to the first target event word, the second target event word, and the path dependency relationship between the first target event word and the second target event word, a path dependency triplet between events is generated.
[0027] According to an embodiment of the present disclosure, the event temporal relationship classification model is trained by minimizing the cross entropy loss function.
[0028] A second aspect of the present disclosure provides a device for identifying a temporal relationship of an event, comprising:
[0029] A global semantic information acquisition module, used to acquire global semantic information of events in an input text, wherein the text includes at least two events, and the events include trigger words and event arguments;
[0030] The triple generation module is used to process the input text to generate the syntactic dependency triple of the event and the path dependency triple between the events, wherein the syntactic dependency triple includes: the first target event word, the word with syntactic dependency on the first target event word, and the relationship of syntactic dependency; the path dependency triple includes: the first target event word, the second target event word, and the path dependency relationship between the first target event word and the second target event word;
[0031] The first fusion module is used to fuse the syntactic dependency triples and the path dependency triples to obtain key information of events in the input text;
[0032] A priori knowledge constraint information acquisition module is used to acquire the priori knowledge constraint information of the event according to the prior probability of the event time series type;
[0033] A second fusion module is used to fuse the global semantic information of the event, the key information of the event and the constraint information of the prior knowledge of the event to obtain fused information; and
[0034] The classification module is used to input the fusion information into the event temporal relationship classification model to obtain the temporal relationship of the events.
[0035] The third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned event timing relationship identification method.
[0036] The fourth aspect of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned event timing relationship identification method.
[0037] The fifth aspect of the present disclosure also provides a computer program product, including a computer program, which implements the above-mentioned event timing relationship identification method when executed by a processor.
[0038] According to the embodiments of the present disclosure, the global semantic information of events is obtained; the key information of events in complex sentences is obtained by using syntactic dependency and path dependency analysis; the constraint information of the prior knowledge of events is obtained by adding prior knowledge; and each information is integrated and the temporal relationship of events is classified. The acquisition of global semantic information retains global information; the acquisition of key information reduces the impact of redundant information on the judgment of event temporal relationships; the acquisition of constraint information of prior knowledge of events avoids common sense errors in event timing and improves model performance during the classification process; the integration of key information, global semantic information and constraint information of prior knowledge ensures the robustness of model temporal extraction. Accurate recognition of event temporal relationships is achieved, and then the task of extracting event temporal relationships in complex sentences is achieved, which at least partially solves the problems of existing methods that rely too much on external information, are not universal, and perform poorly in long sentences. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0040] Figure 1 The application scenario diagram of the event temporal relationship identification method, device, equipment, medium and program product according to the embodiment of the present disclosure is schematically shown;
[0041] Figure 2 A flowchart of a method for identifying a temporal relationship of an event according to an embodiment of the present disclosure is schematically shown;
[0042] Figure 3 A flowchart of a method for obtaining constraint information of prior knowledge of an event according to a priori probability of an event time series type according to an embodiment of the present disclosure is schematically shown;
[0043] Figure 4 The following schematically shows a schematic diagram of constructing a syntactic dependency triple of an event according to an embodiment of the present disclosure;
[0044] Figure 5 A schematic diagram of constructing a path dependency triplet between events according to an embodiment of the present disclosure is schematically shown;
[0045] Figure 6 The structure block diagram of the event temporal relationship identification device according to the embodiment of the present disclosure is schematically shown;
[0046] Figure 7A schematic diagram showing a structural block diagram of an event temporal relationship identification device according to another embodiment of the present disclosure; and
[0047] Figure 8 A block diagram of an electronic device suitable for implementing a method for identifying a temporal relationship of events according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0048] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0049] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0050] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0051] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0052] In the technical solution disclosed in the present invention, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations, necessary confidentiality measures are taken, and do not violate public order and good morals.
[0053] Early studies on temporal relationship extraction mainly modeled it as a pairwise classification problem, event clues, etc., using statistical machine learning techniques with handcrafted features and carefully designed rules to extract the temporal relations between them. Deep neural networks and large-scale pre-trained language models were further used and demonstrated advanced performance in temporal relationship extraction.
[0054] The event timing extraction method based on deep learning can automatically learn the context representation in the sentence without using a large number of expert rules and manually designed features. Compared with traditional methods, the use of pre-trained language models based on deep learning, such as BERT, has shown significant performance improvements due to the better context representation produced by the state-of-the-art Transformer encoder. However, unlike other natural language understanding tasks, temporal relationship recognition requires a more accurate representation of the connection between two event mentions and the clues indicating their temporal relationship, especially when the context is extensive and complex.
[0055] For some very complex texts, the use of LSTM structure can convey contextual information, but it will also bring interference from redundant information.
[0056] In addition, the model's performance in extracting common sense temporal relationships of events is very unstable, for example, "getting sick - seeing a doctor" and other temporal relationships that are relatively obvious to humans. Due to the model's lack of common sense knowledge, these judgments that are simple for humans are difficult for machines.
[0057] To this end, the present disclosure can select and capture the most meaningful time clues and key information of the context mentioned by two specific events. It is also possible to add prior knowledge and construct a probabilistic statistical model to correct the model performance during the classification process, and use the time sequence prior attributes of the event to avoid common sense errors.
[0058] Based on this, an embodiment of the present disclosure provides a method for identifying event temporal relationships, including: obtaining global semantic information of events in an input text, wherein the input text includes at least two events, and the events include trigger words and event arguments; processing the input text to generate syntactic dependency triples of events and path dependency triples between events, respectively, wherein the syntactic dependency triples include: a first target event word, a word that has syntactic dependency with the first target event word, and a syntactic dependency relationship; the path dependency triples include: a first target event word, a second target event word, and a path dependency relationship between the first target event word and the second target event word; fusing the syntactic dependency triples and the path dependency triples to obtain key information of the events in the input text; obtaining constraint information of prior knowledge of the events based on the prior probability of the event temporal type; fusing the global semantic information of the events, the key information of the events, and the constraint information of prior knowledge of the events to obtain fused information; and inputting the fused information into an event temporal relationship classification model to obtain the temporal relationship of the events.
[0059] Figure 1 The application scenario diagram of the event temporal relationship identification method, device, equipment, medium and program product according to the embodiments of the present disclosure is schematically shown.
[0060] like Figure 1 As shown, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0061] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as financial product applications, shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0062] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0063] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0064] It should be noted that the event timing relationship method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the event timing relationship device provided in the embodiment of the present disclosure can generally be set in the server 105. The event timing relationship method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the event timing relationship device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.
[0065] The event timing relationship method provided in the embodiment of the present disclosure may also be executed by the terminal devices 101, 102, 103. Accordingly, the event timing relationship apparatus provided in the embodiment of the present disclosure may also be generally arranged in the terminal devices 101, 102, 103. The event timing relationship method provided in the embodiment of the present disclosure may also be executed by other terminals different from the terminal devices 101, 102, 103. Accordingly, the event timing relationship apparatus provided in the embodiment of the present disclosure may also be arranged in other terminals different from the terminal devices 101, 102, 103.
[0066] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0067] The following will be based on Figure 1 The scene described by Figure 2 to Figure 5 The event timing relationship method of the disclosed embodiment is described in detail.
[0068] Figure 2 The flowchart of the event timing relationship method according to the embodiment of the present disclosure is schematically shown.
[0069] like Figure 2 As shown, the event timing relationship method 200 of this embodiment includes operations S201 to S205.
[0070] In operation S201, global semantic information of events in an input text is obtained, wherein the input text includes at least two events, and the events include trigger words and event arguments.
[0071] According to an embodiment of the present disclosure, the input text may be a single sentence or two sentences. The trigger word may be a verb or a predicate, etc. The event argument may be a subject, an object, an adverbial, a complement, etc. The global semantic information of the event may be the contextual semantic information of the event in the entire input text.
[0072] For example, when the input text is "XX was driving alone on the road, but had an accident and was sent to the hospital", the events are "XX was driving" and "he was sent to the hospital".
[0073] In operation S202, the input text is processed to generate syntactic dependency triples of events and path dependency triples between events.
[0074] Among them, the syntactic dependency triples include: the first target event word, the words that are syntactically dependent on the first target event word, and the syntactic dependency relationship; the path dependency triples include: the first target event word, the second target event word, and the path dependency relationship between the first target event word and the second target event word.
[0075] According to an embodiment of the present disclosure, the first target event word, the words that are syntactically dependent on the first target event word, and the relationship of the syntactic dependency can be extracted from the input text to generate the syntactic dependency triples of the event. The first target event word, the second target event word, and the path dependency relationship between the first target event word and the second target event word can also be extracted from the input text to generate the path dependency triples between the events. For example, the extraction can be performed through a syntactic dependency tree.
[0076] In operation S203, the syntactic dependency triples and the path dependency triples are fused to obtain key information of the event in the input text.
[0077] In operation S204, constraint information of prior knowledge of events is obtained according to the prior probability of the event time series type.
[0078] According to an embodiment of the present disclosure, the prior probability of an event time series type can be obtained by adopting the idea of big data statistics and using an encyclopedia data set, such as an encyclopedia corpus data set, to calculate the frequency of occurrence of the event time series type. When the prior probability meets the threshold, the probability of the event time series type is determined. Among them, the threshold P can be determined according to the type of event time series type. For example, there are six types of event time series types, so the threshold P can be determined as 1 / 6. If the obtained prior probability β is greater than the threshold P, it is considered that the threshold P is met, then the prior probability β is determined as the probability of the event time series type, and the constraint information of the prior knowledge of the event is obtained. If the obtained prior probability β does not meet the threshold P, then the prior probability is not reference-oriented, and the constraint information of the prior knowledge of the event cannot be obtained.
[0079] It should be noted that the constraint information of the prior knowledge of the event can be obtained by using h time Representation, which can be obtained by passing the probability distribution of the event time series type through the matrix Mapping to a high-dimensional vector is shown in the following formula (1):
[0080]
[0081] In addition, since events of the same type often have similar temporal type prior attributes, for events that do not exist in the encyclopedia corpus dataset, we can calculate their similarity with existing events and use the frequency of occurrence of the event with the highest degree of familiarity as its frequency of occurrence. Then, we map its frequency into a high-dimensional vector to obtain the constraint information of the prior knowledge of the event.
[0082] In operation S205, the global semantic information of the event, the key information of the event, and the constraint information of the prior knowledge of the event are fused to obtain fused information.
[0083] According to an embodiment of the present disclosure, the global semantic information of the event obtained in operation S201 and the key information of the event obtained in operation S203 may be fused to obtain first fused information; then, after obtaining the constraint information of the prior knowledge of the event based on the prior probability of the event time series type, the constraint information of the prior knowledge of the event and the first fused information may be fused to obtain fused information.
[0084] It should be noted that after obtaining the global semantic information of the event, the key information of the event and the constraint information of the prior knowledge of the event, they can be fused together to obtain fused information.
[0085] For example, the fusion information R' can be expressed as shown in the following formula (2):
[0086] R'=[h triggers ;h attention ;h time ] (2)
[0087] Among them, h triggers It can be expressed as the global semantic information of the event; h attention Indicates the key information of the event; time Constraint information that can be expressed as prior knowledge of events.
[0088] According to the embodiments of the present disclosure, the fusion information obtained through the above fusion can greatly improve the robustness and accuracy of the model after being input into the model.
[0089] In operation S205, the fusion information is input into an event temporal relationship classification model to obtain a temporal relationship of events.
[0090] According to an embodiment of the present disclosure, an event temporal relationship classification model can be obtained by pre-training. For example, the acquired training text can be processed according to the method of the above-mentioned operations S201 to S205 to obtain the global semantic information and key information of the events in the training text, and the constraint information of the prior knowledge of the events in the training text can also be obtained; then the training fusion information is obtained after fusion; the training fusion information is input into the event temporal relationship classification model to be trained for classification, and the probability distribution of the event on all temporal relationships is obtained, and the training event temporal relationship is determined according to the probability; based on the training event temporal relationship and the real event temporal relationship, the model parameters of the event temporal relationship classification model to be trained are adjusted. Among them, the event temporal relationship classification model to be trained may include a feedforward neural network. Event temporal relationships may include: including...,... is included, after..., before..., at the same time, uncertain, and other relationships.
[0091] According to the embodiments of the present disclosure, the global semantic information of events is obtained; the key information of events in complex sentences is obtained by using syntactic dependency and path dependency analysis; the constraint information of the prior knowledge of events is obtained by adding prior knowledge; and each information is integrated and the temporal relationship of events is classified. The acquisition of global semantic information retains global information; the acquisition of key information reduces the impact of redundant information on the judgment of event temporal relationships; the acquisition of constraint information of prior knowledge of events avoids common sense errors in event timing and improves model performance during the classification process; the integration of key information, global semantic information and constraint information of prior knowledge ensures the robustness of model temporal extraction. Accurate recognition of event temporal relationships is achieved, and then the task of extracting event temporal relationships in complex sentences is achieved, which at least partially solves the problems of existing methods that rely too much on external information, are not universal, and perform poorly in long sentences.
[0092] Figure 3 The flowchart schematically shows a method for acquiring constraint information of prior knowledge of events according to a priori probabilities of event time series types according to an embodiment of the present disclosure.
[0093] like Figure 3 As shown, the method 300 of acquiring constraint information of prior knowledge of events according to the prior probability of event time series type in this embodiment includes operations S301 to S303.
[0094] In operation S301, the frequency of occurrence of the event time series type is calculated using the encyclopedia data set to serve as the prior probability of the event time series type.
[0095] In operation S302 , when the prior probability satisfies a threshold, the probability of the event sequence type is determined.
[0096] In operation S303, the probability of the event time series type is mapped into a vector to obtain constraint information of the prior knowledge of the event.
[0097] According to an embodiment of the present disclosure, obtaining global semantic information of an event in an input text includes:
[0098] Get the word list and part-of-speech list of the input text;
[0099] Using a pre-trained language model, represent the word list as word embedding vectors, and the part-of-speech list as part-of-speech embedding vectors;
[0100] Fuse the word embedding vector and the part-of-speech embedding vector to obtain a fused embedding vector;
[0101] The fused embedding vector is input into a neural network model, and the global semantic information of the event in the input text is determined according to the output of the hidden layer of the neural network model; wherein the neural network model includes a bidirectional long short-term memory network model.
[0102] According to an embodiment of the present disclosure, the input text may be processed by a language analysis tool to obtain a word list and a part-of-speech list. The processing may include segmenting the input text and tagging the part-of-speech.
[0103] For example, the input text T can be expressed as T = [t1,…,t l ,…,t r ,…,t i ], t i Represents the i-th word in the input text. Using the pre-trained language model, the word list is represented as a word embedding vector c i , as shown in the following formula (3):
[0104] c i =Embedding BERT (t i ) (3)
[0105] Embed the word into vector c i And the part-of-speech embedding vector p i Fusion, we can get the fused embedding vector s i , as shown in the following formula (4):
[0106] s i =[c i ;p i ] (4)
[0107] At this time, the fused embedding vector of the input text can be expressed as S, as shown in the following formula (5):
[0108] S=[s1,…,s l ,…,s r ,…,s n ] (5)
[0109] The above fused embedding vector can be input into the bidirectional long short-term memory network model, and the global semantic information of the event in the input text can be determined according to the output of the hidden layer of the bidirectional long short-term memory network model; wherein h l and h r They represent the hidden layer states of the first target event and the second target event respectively. The global semantic information of the event can be expressed as h triggers =[h l ;h r ].
[0110] According to an embodiment of the present disclosure, by representing parts of speech and words as embedding vectors to obtain a fused embedding vector, the context representation can be strengthened; and the bidirectional long short-term memory network model can be used to transmit context information to obtain the global semantic information of the event.
[0111] According to an embodiment of the present disclosure, generating syntactic dependency triples of events and path dependency triples between events from input texts respectively includes:
[0112] Using the syntactic dependency tree, extract the first target event word, the words that are syntactically dependent on the first target event word, and the syntactic dependency relationship from the input text to generate syntactic dependency triples;
[0113] Extract the second target event word from the input text using the syntactic dependency tree;
[0114] Determining a path dependency relationship between the first target event word and the second target event word according to a path from the first target event word to the second target event word;
[0115] According to the first target event word, the second target event word, and the path dependency relationship between the first target event word and the second target event word, a path dependency triplet between events is generated.
[0116] Figure 4 The following schematically shows a schematic diagram of constructing a syntactic dependency triple of an event according to an embodiment of the present disclosure; Figure 5 The diagram schematically shows a construction diagram of path dependency triples between events according to an embodiment of the present disclosure.
[0117] like Figure 4 As shown, based on the target event in the input text, the target event word, the words that are syntactically dependent on the target event word, and the syntactic dependency relationship can be extracted from the input text to generate syntactic dependency triples.
[0118] A path from the first target event word to the second target event word can be constructed using the syntactic dependency tree. For events where the path does not exist, the two events are directly connected and their path dependency is defined as empty.
[0119] like Figure 5 As shown, based on the target event A and the target event B in the input text, the first target event word (corresponding to the target event A), the second target event word (corresponding to the target event B) and the path dependency relationship between the first target event word and the second target event word can be extracted from the input text to generate a path dependency triplet between the events.
[0120] According to an embodiment of the present disclosure, syntactic dependency triples and path dependency triples may be fused to obtain key information of events in the input text.
[0121] According to the embodiment of the present disclosure, a graph G = (V, E) can be constructed by using syntactic dependency tree analysis, where v l and v rRepresent the first target event and the second target event respectively. For each event node v i ,use To represent all i The connected node and itself, using d p To represent the dependency relationship category between two events. The syntactic dependency triples and path dependency triples of the first target event and the second target event can be mapped to equations (6) and (7) respectively:
[0122] q l =W q l ·s l +b q l (6)
[0123] q r =W q r ·s r +b q r (7)
[0124] Among them, s l and r Represent the vectors of the first target event l and the second target event r, respectively, and W q and b q is the parameter to be learned; q l and q r They respectively represent the syntactic dependency triples or path dependency triples of the first target event l and the syntactic dependency triples or path dependency triples of the second target event r.
[0125] The query vector Q of the two events can be obtained as shown in the following formula (8):
[0126] Q=[q l ;q r ] (8)
[0127] According to an embodiment of the present disclosure, the syntactic dependency tree extracts syntactic dependency triples and path dependency triples, and then the fusion can be performed by processing keys and values, where both keys and values are event triples corresponding to two events, and they are mapped to the same dimension.
[0128] For a triplet of two events t i =(s l ||dp lr ||s r ) i , dp lr Represents the category of syntactic dependency between events, i∈{1,n}, and N represents the total number of triples.
[0129] The event pair triplet can be mapped to a high-dimensional vector, as shown in formula (9):
[0130]
[0131] in, Represents the parameters to be learned.
[0132] Then, the triples can be mapped to the key space and value space, as shown in equations (10) and (11), respectively:
[0133]
[0134]
[0135] in, and Represents the parameters to be learned.
[0136] Then, the multi-head attention mechanism can be used to obtain the contextual representation of the key information of the event as shown in formula (12):
[0137]
[0138] Among them, h attention represents the key information of the event output by the syntactic attention module using 8 attention heads; W α Represents the parameters to be learned; α i represents the attention score of each event on the triple, as shown in formula (13):
[0139]
[0140] Among them, since the dot product of the vectors will be very large, and we need to i The function is scaled to areas where the gradient is small. represents the scaling factor, d k express The dimension of , T represents transpose.
[0141] According to the embodiments of the present disclosure, when acquiring the global semantic information of an event, interference from redundant information may be introduced. Redundancy can be avoided by acquiring key information of the event.
[0142] According to an embodiment of the present disclosure, the event temporal relationship classification model is trained by minimizing the cross entropy loss function.
[0143] It should be noted that the training method may be, for example, to process the acquired training text according to the method of the above operations S201 to S204 to obtain the global semantic information and key information of the event in the training text, and may also obtain the constraint information of the prior knowledge of the event in the training text; then obtain the training fusion information R after fusion; input the training fusion information R into the event temporal relationship classification model to be trained for classification, and obtain the probability distribution y of the event in all temporal relationships lr , according to the probability, the model is trained by minimizing the cross entropy loss function to obtain the trained classification model of the event time series relationship. Among them, the probability distribution y of the event in all time series relationships lr It can be expressed as shown in the following formula (14):
[0144] y lr =softmax(W r ·R+b r ) (14)
[0145] Among them, W r and b r are all training parameters.
[0146] Cross entropy loss function L r It can be expressed as shown in the following formula (15):
[0147]
[0148] Where N represents the number of events, M represents the number of all temporal relationship types, and y i,j Represents a judgment function whose value is 0 or 1.
[0149] According to another embodiment of the present disclosure, when the event temporal relationship classification model is trained by minimizing the cross entropy loss function, the model can be trained by a training set, the model can be verified by a verification set, and the accuracy of the model can be tested by a test set. The acquisition of these data can be, for example, but not limited to:
[0150] The dataset is obtained using the corpus TimeBank-Dense, which contains 36 documents and 12,715 event pairs, including 6 relationship categories. The relevant statistics are shown in Table 1-1.
[0151] Table 1-1
[0152]
[0153] The label distribution of the TimeBank-Dense dataset is shown in Table 1-2.
[0154] Among them, TimeML (Time Markup Language) is a set of annotation systems defined by the International Organization for Standardization (ISO), which aims to unify and standardize the annotation methods of time-related information in texts. In the process of continuous improvement of the system, corpus annotation methods have gradually been standardized, and a series of corpora such as TimeBank have come out. The TimeBank corpus is the mainstream corpus used by researchers to identify temporal relationships based on the TimeML annotation system. In addition, because the time links annotated in the TimeBank corpus are too sparse, the researchers adopted a mechanism of mandatory annotation between adjacent sentences to further process the corpus, thereby constructing a corpus with higher relationship density, TimeBank-Dense.
[0155] Table 1-2
[0156]
[0157] The event timing relationship method of the embodiment of the present disclosure will be described in detail below through a specific embodiment.
[0158] For example, the input text is: "Xiao Ming and Xiao Liang signed a house rental contract together in a coffee shop, and Xiao Liang's house rental contract ended."
[0159] For global semantic information, the input text can be segmented and POS tagged. Each word after segmentation can be represented as a 768-dimensional vector. For example, "Xiaoming" can be represented as: tensor([[0.3818,0.5628,0.1442,0.1489,……,0.4032,0.0536]], size=1*768)
[0160] The part of speech corresponding to each word is represented as a 50-dimensional random vector. For example, "noun" can be represented as: tensor([[0.7511,0.1621,0.7071,0.8868,……,0.2407,0.3988]], size=1*50)
[0161] Perform word embedding processing, connect the 768-dimensional word embedding representation with the 50-dimensional part-of-speech embedding representation, and get an 818-dimensional representation. For example, "Xiao Ming" can be represented as: tensor([[0.3818, 0.5628, 0.1442, 0.1489, ..., 0.2407, 0.3988]], size = 1 * 818)
[0162] After the 818-dimensional representation of the above input text passes through the bidirectional long short-term memory network model, the hidden layer representation corresponding to the first target event and the second target event is obtained, and the hidden layer dimension is set to 1000. For example, "Xiao Ming" can be represented as: tensor([[0.3818,0.5628,0.1442,0.1489,……,0.2407,0.3988]], size=1*1000)
[0163] For key information, for the first target event "signing", its syntactic dependency triples can be [(signing, prepositional modifier, in), (signing, noun subject, Xiaoliang), (signing, direct object, contract), (signing, connecting adverbial, end)]. For the second target event "end", its syntactic dependency triples can be [(end, noun subject, rent), (end, connecting adverbial, signing)]. The path dependency triples can be [(signing, contract (connecting noun), end)].
[0164] The global semantic information and key information are fused to obtain fused information. The corresponding vector mapping can be: In two triples, each word can be represented as an 818-dimensional word embedding, the dependency relationship can be represented as a 50-dimensional embedding, and each triple can be represented as an 818+50+818=1686-dimensional word embedding. For example, "(signed, noun subject, Xiaoliang)" can be represented as: tensor([[0.128, 0.3538, 0.6942, 0.2209, ..., 0.3655, 0.1889]], size = 1*1686)
[0165] Then, the event is used as the query, and each triple is used as the key. Attention is performed to obtain the weighted sum, and a new representation of the event is obtained and mapped to 500 dimensions. For example, "signed" is re-represented as tensor ([[0.2348, 0.3568, 0.4542, 0.1709, ..., 0.4657, 0.7989]], size = 1 * 500)
[0166] Similarly, two events are connected to become 818*2=1632-dimensional word embedding, and then the path triplet is subjected to attention operation to obtain a new event binary representation, which is mapped to 500 dimensions. For example, "signed & ended" can be represented as: tensor([[0.2891,0.0266,0.1881,0.2325,……,0.6692,0.1233]], size=1*500)
[0167] For the constraint information of the prior knowledge of events, a 768-dimensional representation of the constraint information of the prior knowledge of events in a high-dimensional space is obtained according to the calculation method of the prior information of event time series type.
[0168] Then the global semantic information, key information and constraint information of prior knowledge can be connected to obtain the final word embedding representation of the first target and second target event pair.
[0169] Finally, the final word embedding representation can be classified through the fully connected layer and softmax layer of the event temporal relationship classification model to obtain the category probability distribution of the event belonging to the six temporal relationships, namely [0.1518987341772152, 0.1729957805907173, 0.189873417721519, 0.4219409282700422, 0.016877637130801686, 0.046413502109704644]
[0170] According to the six pre-set timing relationships: include, is included, after, before, simultaneously, and uncertain, combined with the above probability distribution, it can be seen that the timing relationship between "signing" and "ending" here should be "before".
[0171] Based on the above event time sequence relationship identification method, the present disclosure also provides an event time sequence relationship identification device. Figure 6 and Figure 7 The device is described in detail.
[0172] Figure 6 The structural block diagram of the event temporal relationship identification device according to an embodiment of the present disclosure is schematically shown.
[0173] like Figure 6 As shown, the event temporal relationship identification device 600 of this embodiment includes a global semantic information acquisition module 610, a triple generation module 620, a first fusion module 630, a priori knowledge constraint information acquisition module 640, a second fusion module 650 and a classification module 660.
[0174] The global semantic information acquisition module 610 is used to acquire global semantic information of events in the input text, wherein the text includes at least two events, and the events include trigger words and event arguments. In one embodiment, the global semantic information acquisition module 610 can be used to perform the operation S201 described above, which will not be repeated here.
[0175] The triple generation module 620 is used to process the input text to generate the syntactic dependency triples of the event and the path dependency triples between the events, wherein the syntactic dependency triples include: the first target event word, the words that have syntactic dependency with the first target event word, and the syntactic dependency relationship; the path dependency triples include: the first target event word, the second target event word, and the path dependency relationship between the first target event word and the second target event word. In one embodiment, the triple generation module 620 can be used to perform the operation S202 described above, which will not be repeated here.
[0176] The first fusion module 630 is used to fuse the syntactic dependency triples and the path dependency triples to obtain key information of the event in the input text. In one embodiment, the first fusion module 630 can be used to perform the operation S203 described above, which will not be repeated here.
[0177] The prior knowledge constraint information acquisition module 640 is used to acquire the prior knowledge constraint information of the event according to the prior probability of the event time series type. In one embodiment, the prior knowledge constraint information acquisition module 640 can be used to perform the operation S204 described above, which will not be repeated here.
[0178] The second fusion module 650 is used to fuse the global semantic information of the event, the key information of the event and the constraint information of the prior knowledge of the event to obtain fusion information. In one embodiment, the second fusion module 650 can be used to perform the operation S205 described above, which will not be repeated here.
[0179] The classification module 660 is used to input the fusion information into the event temporal relationship classification model to obtain the temporal relationship of the events. In one embodiment, the classification module 660 can be used to perform the operation S206 described above, which will not be described in detail here.
[0180] According to an embodiment of the present disclosure, any multiple modules among the acquisition module 610, the triple generation module 620, the first fusion module 630, the prior knowledge constraint information acquisition module 640, the second fusion module 650 and the classification module 660 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 610, the triple generation module 620, the first fusion module 630, the prior knowledge constraint information acquisition module 640, the second fusion module 650 and the classification module 660 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware and firmware or in an appropriate combination of any of them. Alternatively, at least one of the acquisition module 610, the triple generation module 620, the first fusion module 630, the prior knowledge constraint information acquisition module 640, the second fusion module 650 and the classification module 660 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is executed.
[0181] Figure 7 The structural block diagram of an event temporal relationship identification device according to another embodiment of the present disclosure is schematically shown.
[0182] like Figure 7 As shown, the event temporal relationship identification device 700 of this embodiment includes a first data input module 710, a second data input module 720, a global semantic information module 730, a key information module 740, a priori knowledge constraint information module 750, an information fusion module 760 and a classification module 770.
[0183] The first data input module 710 is used to input a word list and a part-of-speech list of the input text obtained after processing.
[0184] The second data input module 720 is used to input the processed input text and the syntactic dependency relationship of events in the input text and the path dependency relationship between events.
[0185] The global semantic information module 730 is used to combine words and parts of speech through a pre-trained language model to obtain a fused embedding vector, and then input it into a bidirectional long short-term memory network to obtain global semantic information.
[0186] The key information module 740 is used to fuse the syntactic dependency triples and the path dependency triples to obtain the key information of the event in the input text.
[0187] The prior knowledge constraint information module 750 is used to obtain the prior knowledge constraint information of the event according to the prior probability of the event time series type.
[0188] The information fusion module 760 is used to fuse the constraint information, global semantic information and key information of the prior knowledge of the event to obtain fused information.
[0189] The classification module 770 is used to input the fusion information into the event temporal relationship classification model to obtain the temporal relationship of the events.
[0190] According to an embodiment of the present disclosure, any multiple modules among the first data input module 710, the second data input module 720, the global semantic information module 730, the key information module 740, the prior knowledge constraint information module 750, the information fusion module 760 and the classification module 770 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first data input module 710, the second data input module 720, the global semantic information module 730, the key information module 740, the constraint information module 750 of prior knowledge, the information fusion module 760 and the classification module 770 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware and firmware or by an appropriate combination of any of them. Alternatively, at least one of the first data input module 710, the second data input module 720, the global semantic information module 730, the key information module 740, the constraint information module 750 of prior knowledge, the information fusion module 760 and the classification module 770 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.
[0191] Figure 8 A block diagram of an electronic device suitable for implementing a method for identifying a temporal relationship of events according to an embodiment of the present disclosure is schematically shown.
[0192] like Figure 8As shown, the electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 908 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0193] In RAM 803, various programs and data required for the operation of electronic device 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other via bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0194] According to an embodiment of the present disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the I / O interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 809 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage portion 808 as needed.
[0195] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0196] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 802 and / or RAM 803 described above and / or one or more memories other than ROM 802 and RAM 803.
[0197] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present disclosure.
[0198] The above functions defined in the system / device of the embodiment of the present disclosure are executed when the computer program is executed by the processor 801. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0199] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0200] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0201] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0202] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0203] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0204] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A method for identifying temporal relations of events, comprising: Acquire global semantic information of events in an input text, wherein the input text includes at least two events, and the events include trigger words and event arguments; Processing the input text to generate syntactic dependency triples of events and path dependency triples between events, respectively, wherein the syntactic dependency triples include: a first target event word, a word having syntactic dependency with the first target event word, and a relationship of the syntactic dependency; the path dependency triples include: a first target event word, a second target event word, and a path dependency relationship between the first target event word and the second target event word; Merging the syntactic dependency triples and the path dependency triples to obtain key information of events in the input text; According to the prior probability of the event time series type, the constraint information of the prior knowledge of the event is obtained; fusing the global semantic information of the event, the key information of the event, and the constraint information of the prior knowledge of the event to obtain fused information; and The fusion information is input into an event temporal relationship classification model to obtain the temporal relationship of the events.
2. The method according to claim 1, wherein: The constraint information of obtaining the prior knowledge of the event according to the prior probability of the event time series type includes: Calculate the frequency of occurrence of the event time series type using the encyclopedia data set as the prior probability of the event time series type; When the prior probability satisfies a threshold, determining the probability of the event time series type; The probability of the event time series type is mapped into a vector to obtain constraint information of the prior knowledge of the event.
3. The method according to claim 1, wherein: The step of obtaining global semantic information of events in the input text includes: Obtain a word list and a part-of-speech list of the input text; Using a pre-trained language model, the word list is represented as a word embedding vector, and the part-of-speech list is represented as a part-of-speech embedding vector; Fusing the word embedding vector and the part-of-speech embedding vector to obtain a fused embedding vector; The fused embedding vector is input into a neural network model, and the global semantic information of the event in the input text is determined according to the output of the hidden layer of the neural network model.
4. The method according to claim 3, wherein: The neural network model includes a bidirectional long short-term memory network model.
5. The method according to claim 1, wherein: Generating syntactic dependency triples of events and path dependency triples between events from the input text respectively includes: Using a syntactic dependency tree, respectively extracting the first target event word, the words having syntactic dependency with the first target event word, and the syntactic dependency relationship from the input text to generate the syntactic dependency triples; Extracting the second target event word from the input text using a syntactic dependency tree; Determining a path dependency relationship between the first target event word and the second target event word according to a path from the first target event word to the second target event word; According to the first target event word, the second target event word, and the path dependency relationship between the first target event word and the second target event word, a path dependency triplet between the events is generated.
6. The method according to claim 1, wherein: The event temporal relationship classification model is trained by minimizing the cross entropy loss function.
7. An event temporal relationship recognition device, comprising: A global semantic information acquisition module, used to acquire global semantic information of events in an input text, wherein the text includes at least two events, and the events include trigger words and event arguments; A triple generation module is used to process the input text to generate a syntactic dependency triple of an event and a path dependency triple between events, wherein the syntactic dependency triple includes: a first target event word, a word having a syntactic dependency with the first target event word, and a relationship of the syntactic dependency; the path dependency triple includes: a first target event word, a second target event word, and a path dependency relationship between the first target event word and the second target event word; A first fusion module, used for fusing the syntactic dependency triples and the path dependency triples to obtain key information of events in the input text; A priori knowledge constraint information acquisition module is used to acquire the priori knowledge constraint information of the event according to the prior probability of the event time series type; a second fusion module, configured to fuse the global semantic information of the event, the key information of the event, and the constraint information of the prior knowledge of the event to obtain fused information; and The classification module is used to input the fusion information into the event temporal relationship classification model to obtain the temporal relationship of the events.
8. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Power grid environment model supporting man-machine two-way understanding and modeling method
CN112434532A
Text summarization method and device based on topic model and storage medium
CN113901200A
Chinese-Vietnamese bilingual news event causal relationship extraction method based on syntactic graph convolution
CN113901229A
Text keyword extraction method and device, equipment and storage medium
CN114020876A
Method, electronic device, and storage medium for generating relationship of events
US20210406295A1
