Event relationship identification method, device, computer equipment and storage medium
By constructing an event group and target event relationship diagram and combining the target event relationship recognition model, the problem of event relationship recognition in the existing technology relying on manual rules is solved, and the accuracy and efficiency of recognition are improved.
Patent Information
- Application Number
- CN202210365299.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-07
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2042-04-07
AI Technical Summary
Existing event relationship recognition methods rely on artificially designed heuristic rules, which leads to the recognition results being easily disturbed by subjective factors and affecting accuracy.
By obtaining pending text data, identifying multiple target events, building event groups, and building a target event relationship diagram based on event groups, identifying event relationships, avoiding interference from manual rules, and using the target event relationship recognition model for automatic identification.
It improves the accuracy and efficiency of event relationship identification, reduces the impact of noise, and obtains a richer and comprehensive event relationship.
Smart Images

Figure CN114648019B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of natural language processing, and in particular, to an event relationship recognition method, apparatus, computer equipment, and storage medium. Background Art
[0002] In the field of natural language processing, many intelligent tasks can be completed by extracting the relationship between events in the text. For example, in machine reading comprehension technology, the text review task can be automatically completed by extracting the event relationship between texts. However, the existing event relationship recognition methods usually use manually designed heuristic rules to construct event graphs, and determine the event relationship by determining the edge relationship in the event graph, so that the event relationship between the events in the recognized text is easily interfered by more subjective factors, which in turn affects the accuracy of event relationship recognition. Summary of the invention
[0003] The embodiments of the present disclosure at least provide a method, apparatus, computer device, and storage medium for identifying event relationships.
[0004] In a first aspect, an embodiment of the present disclosure provides an event relationship identification method, the method comprising: obtaining text data to be processed, and determining multiple target events in the text data to be processed; constructing at least one event group based on the multiple target events, wherein each of the event groups contains at least two target events; constructing a target event relationship graph based on the at least one event group; the target event relationship graph is used to indicate the association relationship between event groups containing the same target event in each event group; and identifying the event relationship between each target event in the text data to be processed based on the target event relationship graph.
[0005] It can be known from the above description that after obtaining the text data to be processed, multiple target events can be first determined in the text data to be processed, and at least one event group can be constructed based on the multiple target events. Afterwards, a target event relationship graph can be constructed based on the at least one event group, and the event relationship between the target events in the text data to be processed can be identified based on the target event relationship graph. In the above implementation, a target event relationship graph can be constructed based on the event group, so that the event relationship between any two target events can be identified based on the target event relationship graph. At the same time, the event relationship between the event groups can also be identified, so that the event relationship between multiple target events can be identified, and then a richer and more comprehensive event relationship between the target events can be obtained.
[0006] In an optional implementation, constructing a target event relationship graph based on the at least one event group includes: when the number of the at least one event group is multiple, constructing event pair nodes based on the multiple event groups to obtain multiple event pair nodes, wherein each event group corresponds to an event pair node; establishing a node association relationship between any two of the event pair nodes to obtain an initial event relationship graph; obtaining node constraints between each event pair node, and deleting the node association relationships in the initial event relationship graph that do not satisfy the node constraints to obtain the target event relationship graph.
[0007] In the above implementation, when the number of at least one event group is multiple, event pair nodes can be constructed based on multiple event groups to obtain multiple event pair nodes, and an initial event relationship graph can be obtained by establishing a node association relationship between any two event pair nodes, so that the obtained initial event relationship graph does not rely on manually set heuristic rules, thereby avoiding the introduction of unnecessary noise during event relationship identification, thereby avoiding affecting the accuracy of event relationship identification. At the same time, in the above implementation, the target event relationship graph can be obtained by obtaining the node constraints between each event pair node and deleting the node association relationships that do not meet the node constraints in the initial event relationship graph, thereby simplifying the complexity of identifying the event relationship between each target event based on the target event relationship graph, thereby improving the recognition efficiency.
[0008] In an optional implementation, the identifying the event relationship between each target event in the text data to be processed based on the target event relationship graph includes: obtaining a target event relationship recognition model; inputting the target event relationship graph into the target event relationship recognition model for recognition processing to obtain the event relationship between each target event in the text data to be processed, wherein the event relationship includes: a first event relationship between the target events included in each of the event groups, and / or a second event relationship between each event group to obtain the event relationship between each target event in the text data to be processed.
[0009] In the above implementation, the target event relationship recognition model can be first obtained, and the target event relationship graph can be input into the target event relationship recognition model for recognition, so as to obtain the event relationship between each target event in the text data to be processed, thereby realizing automatic and efficient recognition of the event relationship in the text data to be processed. At the same time, in the above implementation, the event relationship between the target events included in each event group and the event relationship between each event group can also be identified, so that a more comprehensive and rich event relationship in the text data to be processed can be obtained, thereby improving the effectiveness of the event relationship recognition method.
[0010] In an optional embodiment, the method further includes: obtaining a training data set; wherein the training data set includes multiple training samples and training labels, each of the training samples includes an event relationship graph to be trained, and the training label of each of the training samples includes relationship labels of event relationships of events included in each event group to be trained in the event relationship graph to be trained and / or relationship labels of event relationships between event groups; training the event relationship recognition model to be trained based on the training data set to obtain the target event relationship recognition model.
[0011] In an optional embodiment, the event relationship recognition model to be trained is trained based on the training data set to obtain the target event relationship recognition model, including: inputting the training data set into the event relationship recognition model to be trained to obtain an initial training result for each of the training samples; wherein the initial training result is used to indicate the prediction results of the event relationships of the events contained in each event group to be trained in the event relationship graph to be trained and / or the prediction results of the event relationships between the event groups; determining the target training result in the initial training result, wherein the target training result is a training result that is different from the corresponding training label; adjusting the calculation weight of the focus loss function based on the target training result, and determining the function value of the focus loss function based on the adjusted calculation weight; adjusting the model parameters of the event relationship recognition model to be trained based on the function value of the focus loss function until the event relationship recognition model to be trained that meets the training requirements is obtained, and the event relationship recognition model to be trained that meets the training requirements is determined as the target event relationship recognition model.
[0012] In the above implementation, the event relationship recognition model to be trained can be trained based on the training data set, and the calculation weight of the focus loss function can be adjusted based on the target training result, so that the event relationship recognition model to be trained can pay more attention to the training samples with recognition errors, thereby alleviating the false positive prediction problem of the event relationship recognition model to be trained, and then the recognition accuracy of the obtained target event relationship recognition model can be improved.
[0013] In an optional implementation, constructing at least one event group based on the multiple target events includes: generating a corresponding event representation identifier for each target event in the multiple target events to obtain multiple event representation identifiers; constructing the at least one event group based on the multiple event representation identifiers, wherein each of the event groups contains the event representation identifier of the target event corresponding to the event group.
[0014] In an optional implementation, generating a corresponding event representation identifier for each target event among the multiple target events includes: obtaining text information of each target event among the multiple target events; encoding the text information to obtain an encoding result, and determining the event representation identifier of the corresponding target event based on the encoding result.
[0015] In the above implementation, after obtaining the text information of each target event, the text information can be encoded to obtain an encoding result, and the event representation identifier of each target event can be determined based on the encoding result, so that multiple target events in the text data to be processed can be converted into the form of event representation identifiers that can be recognized by the target event relationship recognition model, so that the target event relationship recognition model can be better used to identify the event relationship between each target event in the text data to be processed. Afterwards, the method of constructing at least one event group based on multiple event representation identifiers corresponding to multiple target events can reduce the complexity of the target event relationship recognition model in identifying the event relationship between target events, thereby improving the efficiency of event relationship recognition.
[0016] In an optional implementation, determining the event representation identifier corresponding to the target event based on the encoding result includes: when there are multiple encoding results, determining the sum of the multiple encoding results to obtain the target encoding result; and calculating the average value of the target encoding result and the number of encoding results to obtain the event representation identifier of the target event.
[0017] In the above implementation, when there are multiple encoding results for each target event, the multiple encoding results can be aggregated and averaged to obtain a unique event representation identifier for each target event, thereby reducing the error of the event relationship identification method, avoiding the introduction of unnecessary noise, and further improving the accuracy of the event relationship identification method.
[0018] In an optional implementation, the determining of multiple target events in the text data to be processed includes: determining window parameters of a dynamic window; the dynamic window is a window used to traverse the text data to be processed; determining the target text data in the text data to be processed that is located within the dynamic window at the current moment, and identifying an event identification identifier in the target text data; identifying text information of a corresponding event in the target text data based on the event identification identifier, obtaining at least one initial event, and determining the target event based on the at least one initial event.
[0019] In the above implementation, the text data to be processed can be traversed through the dynamic window to obtain multiple target events, so that the text data to be processed can be divided into blocks using the dynamic window when the text data to be processed is long, and the target events can be identified at the same time, thereby improving the efficiency of determining multiple target events in the text data to be processed, thereby improving the efficiency of event relationship identification. At the same time, the event identification identifier can also be used to accurately locate the event in the text data to be processed, thereby improving the accuracy of determining the target event in the text data to be processed, thereby improving the accuracy of event relationship identification.
[0020] In an optional implementation, determining the target event based on the at least one initial event includes: when there are multiple events of the at least one initial event, performing event deduplication processing on the multiple initial events, and determining the target event based on the initial events after deduplication.
[0021] In the above implementation, when there are multiple initial events, deduplication processing can be performed on the multiple initial events, thereby reducing interference in the process of event relationship identification, thereby improving the accuracy of event relationship identification.
[0022] In a second aspect, an embodiment of the present disclosure also provides an event relationship identification device, comprising: an acquisition unit, used to acquire text data to be processed, and determine multiple target events in the text data to be processed; a first construction unit, used to construct at least one event group based on the multiple target events, wherein each of the event groups contains at least two target events; a second construction unit, used to construct a target event relationship graph based on the at least one event group; the target event relationship graph is used to indicate the association relationship between event groups containing the same target event in each event group; and an identification unit, used to identify the event relationship between each target event in the text data to be processed based on the target event relationship graph.
[0023] In a third aspect, an embodiment of the present disclosure further provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are performed.
[0024] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect or any possible implementation of the first aspect are executed.
[0025] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0027] Figure 1 A flow chart of an event relationship identification method provided by an embodiment of the present disclosure is shown;
[0028] Figure 2 A schematic diagram showing a target event relationship diagram provided by an embodiment of the present disclosure is shown;
[0029] Figure 3 A schematic diagram showing another target event relationship diagram provided by an embodiment of the present disclosure;
[0030] Figure 4 A flowchart of a method for constructing a target event relationship graph based on at least one event group provided by an embodiment of the present disclosure is shown;
[0031] Figure 5 A flow chart of a method for obtaining a target event relationship recognition model provided by an embodiment of the present disclosure is shown;
[0032] Figure 6 A schematic diagram of an event relationship identification device provided by an embodiment of the present disclosure is shown;
[0033] Figure 7 A schematic diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0035] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0036] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0037] Research has found that in the field of natural language processing, many intelligent tasks can be completed by extracting the relationship between events in the text. For example, in machine reading comprehension technology, the text review task can be automatically completed by extracting the event relationship between texts. However, existing event relationship recognition methods usually use manually designed heuristic rules to construct event graphs, and determine event relationships by determining the edge relationships in the event graph, so that the event relationships between events in the identified text are easily interfered by more subjective factors, which in turn affects the accuracy of event relationship recognition.
[0038] Based on the above research, the present disclosure provides an event relationship identification method. It can be seen from the above description that after obtaining the text data to be processed, multiple target events can be first determined in the text data to be processed, and at least one event group can be constructed based on the multiple target events. Afterwards, a target event relationship graph can be constructed based on the at least one event group, and the event relationship between each target event in the text data to be processed can be identified based on the target event relationship graph. In the above implementation, a target event relationship graph can be constructed based on the event group, so that the event relationship between any two target events can be identified based on the target event relationship graph. At the same time, the event relationship between the event groups can also be identified, so that the event relationship between multiple target events can be identified, and then a richer and more comprehensive event relationship between each target event can be obtained.
[0039] To facilitate understanding of this embodiment, an event relationship identification method disclosed in the embodiment of the present disclosure is first introduced in detail. The executor of the event relationship identification method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities.
[0040] The event relationship that can be identified by the event relationship identification method disclosed in the embodiment of the present disclosure may be a temporal relationship (eg, a temporal sequence relationship), a causal relationship, a sub-event relationship, a co-reference relationship, etc. The present disclosure does not specifically limit the type of the event relationship.
[0041] See also Figure 1 FIG. 1 is a flowchart of an event relationship identification method provided by an embodiment of the present disclosure, wherein the method includes steps S101 to S107, wherein:
[0042] S101: Acquire text data to be processed, and determine a plurality of target events in the text data to be processed.
[0043] In the embodiments of the present disclosure, the above-mentioned text data to be processed can be text data containing multiple sentences, or text data containing a single sentence. Among them, the size of the text data can be a document containing 512 characters, or a document containing 2048 characters. The present disclosure does not limit the size of the text data to be processed, and it is subject to meeting actual needs. In addition, the content of the text data to be processed can be a story or a report. The present disclosure does not limit the content of the text data to be processed, and it is subject to meeting actual needs.
[0044] In the embodiments of the present disclosure, the text data to be processed may be in Chinese or English. The present disclosure does not limit the language type of the text data to be processed, whichever is feasible.
[0045] In the embodiments of the present disclosure, a target event may include a subject, a predicate, and an object, or a target event may include a subject and an object, or a target event may only include a subject, etc., which are not listed one by one here. The present disclosure does not make specific limitations on the content included in the target event, which is subject to meeting actual needs.
[0046] S103: Construct at least one event group based on the multiple target events, wherein each of the event groups includes at least two target events.
[0047] In the embodiment of the present disclosure, after a plurality of target events are determined in the text data to be processed, at least one event group may be constructed based on the plurality of target events.
[0048] In a specific implementation, assuming that the number of the multiple target events determined in the text data to be processed is 5, at least one event group can be constructed based on the 5 target events.
[0049] Assume that the above five target events are: 1, 2, 3, 4, 5. In the case that each event group contains two target events, 10 event groups can be constructed based on the five target events. In this case, the letter e can be used ij represents an event group, where i and j represent different target events. At this time, the 10 event groups can be: e 12 、e 13 、e 14 、e 15 、e 23 、e 24 、e 25 、e 34 、e 35 、e 45 .
[0050] S105: constructing a target event relationship graph based on the at least one event group; the target event relationship graph is used to indicate the association relationship between event groups containing the same target event in each event group.
[0051] Here, the target event relationship graph may include event pair nodes and node association relationships (ie, edges). At this time, an event group may be determined as an event pair node in the target event relationship graph, and the association relationships between the event groups may be determined as edges.
[0052] In the embodiment of the present disclosure, the target event relationship graph can be used to indicate the association relationship between event groups containing the same event in each event group. At this time, the event groups containing the same target event can be connected to establish the association relationship between the event groups containing the same target event, thereby constructing a target event relationship graph.
[0053] For example, in the case where at least one event group is the above 10 event groups, the target event relationship graph constructed based on the 10 event groups may be as follows: Figure 2 The target event relationship diagram shown in Figure 2 In the event group e 13 The target event relationship diagram constructed for the center. The gray part does not contain the corresponding node association relationship.
[0054] In addition, the target event relationship graph can be constructed based on at least one event group by associating any two event groups in the at least one event group to obtain the target event relationship graph. In this case, the target event relationship graph can indicate the association relationship between the event groups.
[0055] For example, in the case where at least one event group is the above 10 event groups, the target event relationship graph constructed in the above manner may be as follows: Figure 3 The target event relationship diagram shown in Figure 3 In the event group e 13 The target event relationship diagram built for the center.
[0056] S107: Identifying event relationships between target events in the text data to be processed based on the target event relationship graph.
[0057] In the embodiment of the present disclosure, after obtaining the target event relationship graph, the event relationship between the target events in the text data to be processed can be identified based on the target event relationship graph. The event relationship between the target events in the text data to be processed can be determined by determining the event relationship corresponding to each event pair node in the target event relationship graph.
[0058] For example, in the target event relationship diagram as Figure 2 In the case of the target event relationship diagram shown in Figure 2 The event pair node e in the target event relationship graph shown 12 When the corresponding event relationship is a causal relationship, it can be determined that the event has an impact on node e 12 The event relationship between target events 1 and 2 in the corresponding event group is a causal relationship.
[0059] In addition, in the embodiment of the present disclosure, the event relationship between multiple target events can also be determined by determining the event relationship corresponding to each node association relationship in the target event relationship graph.
[0060] For example, in the target event relationship diagram as Figure 2 In the case of the target event relationship diagram shown in Figure 2 The event pair node e in the target event relationship graph shown 12and event pair node e 13 When the event relationship corresponding to the node association relationship between the nodes is a causal relationship, it can be determined that the event has an impact on the node e. 12 and event pair node e 13 The correlation relationship between them is a causal relationship. At this time, it can be determined that the event relationship between target events 1 and 3 is also a causal relationship.
[0061] It can be known from the above description that after obtaining the text data to be processed, multiple target events can be first determined in the text data to be processed, and at least one event group can be constructed based on the multiple target events. Afterwards, a target event relationship graph can be constructed based on the at least one event group, and the event relationship between the target events in the text data to be processed can be identified based on the target event relationship graph. In the above implementation, a target event relationship graph can be constructed based on the event group, so that the event relationship between any two target events can be identified based on the target event relationship graph. At the same time, the event relationship between the event groups can also be identified, so that the event relationship between multiple target events can be identified, and then a richer and more comprehensive event relationship between the target events can be obtained.
[0062] In an optional embodiment, if Figure 4 As shown, for S105: constructing a target event relationship graph based on the at least one event group, specifically includes the following steps:
[0063] Step S21: when there are multiple event groups, construct event pair nodes based on the multiple event groups to obtain multiple event pair nodes, wherein each event group corresponds to one event pair node;
[0064] Step S22: establishing a node association relationship between any two event pair nodes to obtain an initial event relationship graph;
[0065] Step S23: Obtain node constraints between nodes of each event pair, and delete the node association relationships that do not meet the node constraints in the initial event relationship graph to obtain the target event relationship graph.
[0066] In the embodiment of the present disclosure, when establishing a node association relationship between any two event pair nodes, the association relationship between the two event pair nodes can be established by connecting the two event pair nodes.
[0067] The node constraint condition may be used to indicate the requirements that the two event pair nodes need to meet when establishing an association relationship between the two event pair nodes.
[0068] For example, when the target event relationship graph is used to indicate the association relationship between event groups containing the same target event in each event group, the node constraint condition may be: having the same target event.
[0069] In the embodiment of the present disclosure, after obtaining at least one event group and constructing an event pair node based on the at least one event group, a node association relationship between any two event pair nodes can be established to obtain an initial event relationship graph, for example, Figure 3 The event relationship graph shown in FIG. Then, the node constraint condition can be obtained, and the node association relationship that does not meet the node constraint condition in the initial event relationship graph is deleted according to the node constraint condition, and the event relationship graph after deletion is determined as the target event relationship graph, for example, Figure 2 The event relationship diagram shown.
[0070] In the above implementation, when the number of at least one event group is multiple, event pair nodes can be constructed based on multiple event groups to obtain multiple event pair nodes, and an initial event relationship graph can be obtained by establishing a node association relationship between any two event pair nodes, so that the obtained initial event relationship graph does not rely on manually set heuristic rules, thereby avoiding the introduction of unnecessary noise during event relationship identification, thereby avoiding affecting the accuracy of event relationship identification. At the same time, in the above implementation, the target event relationship graph can be obtained by obtaining the node constraints between each event pair node and deleting the node association relationships that do not meet the node constraints in the initial event relationship graph, thereby simplifying the complexity of identifying the event relationship between each target event based on the target event relationship graph, thereby improving the recognition efficiency.
[0071] In an optional implementation, with respect to S107: identifying the event relationship between target events in the text data to be processed based on the target event relationship graph, specifically includes the following steps:
[0072] Step S31: obtaining a target event relationship recognition model;
[0073] Step S32: Input the target event relationship graph into the target event relationship recognition model for recognition processing to obtain the event relationship between the target events in the text data to be processed, wherein the event relationship includes: a first event relationship between the target events included in each of the event groups, and / or a second event relationship between the event groups to obtain the event relationship between the target events in the text data to be processed.
[0074] Here, the target event relationship recognition model may be a network model, based on which the type of each event pair node in the target event relationship graph and the type of the association relationship of each node can be identified. For example, the target event relationship recognition model may be a graph transformer network (GTN).
[0075] In the disclosed embodiment, after the target event relationship graph is input into the target event relationship recognition model for recognition processing, the event relationship between the events in the text data to be processed can be obtained. Among them, the first event relationship can be understood as the event relationship between the events included in the event group corresponding to each event pair node in the target event graph; the second event relationship can be understood as the event relationship between the events included in the two event groups corresponding to each node association relationship in the target event graph.
[0076] In the above implementation, the target event relationship recognition model can be first obtained, and the target event relationship graph can be input into the target event relationship recognition model for recognition, so as to obtain the event relationship between each target event in the text data to be processed, thereby realizing automatic and efficient recognition of the event relationship in the text data to be processed. At the same time, in the above implementation, the event relationship between the target events included in each event group and the event relationship between each event group can also be identified, so that a more comprehensive and rich event relationship in the text data to be processed can be obtained, thereby improving the effectiveness of the event relationship recognition method.
[0077] In an optional embodiment, if Figure 5 As shown, for the above steps S31-S32, the method disclosed herein further includes the following steps:
[0078] Step S41: obtaining a training data set; wherein the training data set includes a plurality of training samples and training labels, each of the training samples includes a to-be-trained event relationship graph, and the training label of each of the training samples includes a relationship label of an event relationship of events included in each to-be-trained event group in the to-be-trained event relationship graph and / or a relationship label of an event relationship between event groups;
[0079] Step S42: training the event relationship recognition model to be trained based on the training data set to obtain the target event relationship recognition model.
[0080] In the disclosed embodiment, the target event relationship recognition model for identifying the target event relationship graph can be obtained by training. In specific implementation, a training data set can be first obtained, and the event relationship recognition model to be trained is trained based on the training data set to obtain the target event relationship recognition model.
[0081] In the specific implementation, for the above: based on the training data set, the event relationship recognition model to be trained is trained to obtain the target event relationship recognition model, which specifically includes the following process:
[0082] (1) Inputting the training data set into the event relationship recognition model to be trained to obtain an initial training result for each training sample; wherein the initial training result is used to indicate the prediction result of the event relationship of the events included in each event group to be trained in the event relationship graph to be trained and / or the prediction result of the event relationship between each event group;
[0083] (2) determining a target training result in the initial training result, wherein the target training result is a training result that is different from the corresponding training label;
[0084] (3) adjusting the calculation weight of the focus loss function based on the target training result, and determining the function value of the focus loss function based on the adjusted calculation weight;
[0085] (4) Adjust the model parameters of the event relationship recognition model to be trained based on the function value of the focus loss function until the event relationship recognition model to be trained that meets the training requirements is obtained, and determine the event relationship recognition model to be trained that meets the training requirements as the target event relationship recognition model.
[0086] In the disclosed embodiment, the initial training result of each training sample may include the prediction results of the event relations of the events included in each event group to be trained in the event relation graph to be trained and / or the prediction results of the event relations between the event groups. The above prediction results may be used to indicate whether the event relations of the events included in each event group to be trained and / or the event relations between the event groups satisfy the event relations identified by the pre-set event relation identification model to be trained.
[0087] For example, when the event relationship identified by the event relationship recognition model to be trained is a causal relationship, and when the event relationship of the events included in each event group to be trained and / or the event relationship between each event group is a causal relationship, the prediction result can be "yes" or "YES"; when the event relationship of the events included in each event group to be trained and / or the event relationship between each event group is not a causal relationship, the prediction result can be "no" or "NO".
[0088] Afterwards, the training results that are different from the corresponding training labels in the initial training results (i.e., the results of event relationship recognition errors) can be determined based on the obtained initial training results to obtain the target training results. Afterwards, the calculation weights of the focus loss function can be adjusted based on the target training results, and the function value of the focus loss function can be determined based on the adjusted calculation weights.
[0089] In the embodiment of the present disclosure, after determining the function value of the focus loss function, the model parameters of the event relationship recognition model of the to-be-trained model can be adjusted based on the function value of the focus loss function. After obtaining the to-be-trained event relationship recognition model that meets the training requirements, the to-be-trained event relationship recognition model that meets the training requirements can be determined as the above-mentioned target event relationship recognition model.
[0090] Among them, satisfying the training requirements may be: the function value of the focal loss function converges, or the training accuracy of the event relationship recognition model to be trained meets the preset requirements. The present disclosure does not make any specific limitation on satisfying the training requirements, which is subject to achievable performance.
[0091] In an embodiment of the present disclosure, when an event relationship recognition model to be trained that meets the training requirements is obtained, the value of the weight parameter gamma in the calculation weight of the focus loss function can be 2, and the value of alpha can be 0.6 (the present disclosure does not make any specific limitation on the value of alpha, which is subject to the final adjustment result).
[0092] In the above implementation, the event relationship recognition model to be trained can be trained based on the training data set, and the calculation weight of the focus loss function can be adjusted based on the target training result, so that the event relationship recognition model to be trained can pay more attention to the training samples with recognition errors, thereby alleviating the false positive prediction problem of the event relationship recognition model to be trained, and then the recognition accuracy of the obtained target event relationship recognition model can be improved.
[0093] In an optional implementation, with respect to S105: constructing at least one event group based on the multiple target events, specifically includes the following steps:
[0094] Step S51: generating a corresponding event representation identifier for each target event in the multiple target events to obtain multiple event representation identifiers;
[0095] Step S52: constructing the at least one event group based on the multiple event representation identifiers, wherein each of the event groups includes the event representation identifier of the target event corresponding to the event group.
[0096] In the embodiment of the present disclosure, the event representation identifier can be understood as a feature vector corresponding to the target event.
[0097] In the embodiment of the present disclosure, the above-mentioned generating a corresponding event representation identifier for each target event in the multiple target events may specifically include the following steps:
[0098] Step S61: Acquire text information of each target event among the multiple target events;
[0099] Step S62: Encode the text information to obtain an encoding result, and determine an event representation identifier corresponding to the target event based on the encoding result.
[0100] In the embodiment of the present disclosure, the text information of each target event may be text data corresponding to the target event in the text data to be processed.
[0101] In the embodiment of the present disclosure, after obtaining text information corresponding to each target event among multiple target events included in the text data to be processed, the text information corresponding to each target event may be encoded to obtain an encoding result.
[0102] In specific implementation, the obtained text information of each target event can be input into a pre-trained language model for encoding to obtain an encoding result.
[0103] In the disclosed embodiment, the pre-trained language model may be a combination of a BERT (Bidirectional Encoder Representations from Transformers) model and a Longformer (The Long-Document Transformer) model, so that while ensuring the accuracy of the encoded text information, efficient local and global attention modes may be adopted, thereby enabling the pre-trained language model to better process long text information.
[0104] In addition, the above-mentioned pre-trained language model may also be only a Longformer model, or may also be only a BERT model. The present disclosure does not specifically limit the pre-trained language model, which is subject to implementation.
[0105] In the disclosed embodiment, after obtaining the encoding result corresponding to each target event, when the number of encoding results corresponding to each target event is 1, the encoding result corresponding to the target event can be determined as the event representation identifier of the target event.
[0106] It should be noted here that when encoding is performed on the same target event, the encoding results obtained are also the same.
[0107] In the above implementation, after obtaining the text information of each target event, the text information can be encoded to obtain an encoding result, and the event representation identifier of each target event can be determined based on the encoding result, so that multiple target events in the text data to be processed can be converted into the form of event representation identifiers that can be recognized by the target event relationship recognition model, so that the target event relationship recognition model can be better used to identify the event relationship between each target event in the text data to be processed. Afterwards, the method of constructing at least one event group based on multiple event representation identifiers corresponding to multiple target events can reduce the complexity of the target event relationship recognition model in identifying the event relationship between target events, thereby improving the efficiency of event relationship recognition.
[0108] In an optional implementation, the method of determining the event representation identifier corresponding to the target event based on the encoding result further includes the following steps:
[0109] Step S71: when there are multiple encoding results, determine the sum of the multiple encoding results to obtain a target encoding result;
[0110] Step S72: Calculate the average value of the target encoding result and the number of encoding results to obtain an event representation identifier of the target event.
[0111] In a specific implementation, when there are multiple encoding results corresponding to the target event, the corresponding positions of the multiple encoding results can be summed to obtain the sum of the multiple encoding results. After that, the sum of the encoding results and the number corresponding to the multiple encoding results can be averaged, and the obtained calculation result can be determined as the event representation identifier of the target event.
[0112] In the above implementation, when there are multiple encoding results for each target event, the multiple encoding results can be aggregated and averaged to obtain a unique event representation identifier for each target event, thereby avoiding reducing the error of the event relationship identification method and introducing unnecessary noise, thereby improving the accuracy of the event relationship identification method.
[0113] In an optional implementation, with respect to S101: determining a plurality of target events in the text data to be processed, the following steps are specifically included:
[0114] Step S81: determining window parameters of a dynamic window; the dynamic window is a window used to traverse the text data to be processed;
[0115] Step S82: determining the target text data in the text data to be processed at the current moment and located in the dynamic window, and identifying an event identification mark in the target text data;
[0116] Step S83: Identify text information of a corresponding event in the target text data based on the event identification identifier, obtain at least one initial event, and determine the target event based on the at least one initial event.
[0117] In an embodiment of the present disclosure, the window parameters of the dynamic window may include at least the following information: the size of the dynamic window, the number of dynamic windows. The size of the dynamic window may be 512 characters or 256 characters. The present disclosure does not limit the size of the dynamic window, and the size is subject to actual needs. The number of dynamic windows may be understood as the number of dynamic windows used to traverse the text data to be processed. For example, the number of dynamic windows may be 9 or 8. The present disclosure does not specifically limit the number of dynamic windows, and the number is subject to actual needs.
[0118] The window parameters of the dynamic window can be determined based on the size of the text data to be processed. For example, the product of the numerical value corresponding to the size of the dynamic window and the numerical value corresponding to the number of dynamic windows in the window parameters of the dynamic window can be made greater than or equal to the size of the text data to be processed. For example, when the size of the text data to be processed is 2048 characters, the window parameters of the dynamic window can be determined as follows: the size of the dynamic window is 512 characters, and the number of dynamic windows is 4. Alternatively, the window parameters of the dynamic window can also be determined as follows: the size of the dynamic window is 512 characters, and the number of dynamic windows is 5.
[0119] In addition, the window parameters of the dynamic window may be preset values, and the product of the values corresponding to the size of the dynamic window and the number of dynamic windows in the window parameters of the dynamic window is greater than the size of the text data to be processed in general.
[0120] Exemplarily, assuming that the size of the text data to be processed is generally less than or equal to 2048 characters, the window parameters of the dynamic window can be preset as follows: the size of the dynamic window is 512 characters, and the number of dynamic windows is 6; or, the window parameters of the dynamic window can be preset as follows: the size of the dynamic window is 512 characters, and the number of dynamic windows is 9. The present disclosure does not specifically limit the window parameters of the dynamic window, which shall be based on actual needs.
[0121] In the disclosed embodiment, after determining the window parameters of the dynamic window, the text data to be processed can be traversed based on the dynamic window. Then, the target text data located in the above dynamic window in the text data to be processed at the current moment can be determined, and the event identification identifier can be identified in the target text data.
[0122] The event identification mark can be understood as a special symbol used to locate the event in the text data to be processed. For example, the special symbol can be <t> and< / t> , or the special symbol can also be <s> and< / s> The present disclosure does not make any specific limitation on the event identification identifier, and is subject to meeting actual needs.
[0123] Among them, special symbols <t> Can be the starting symbol of the event, special symbol< / t> It can be the end symbol of an event. In addition, special symbols can be determined as the start symbol of an event. <t>It is the termination symbol of the event. The present disclosure does not limit this, and it is subject to what can be implemented.
[0124] After an event identification identifier is identified in the target text data, text information of a corresponding event can be identified in the target text data based on the event identification identifier to obtain at least one initial event, and a target event can be determined based on the at least one initial event.
[0125] When the number of the obtained at least one initial event is one, the initial event may be determined as the target event.
[0126] In the above implementation, the text data to be processed can be traversed through the dynamic window to obtain multiple target events, so that the text data to be processed can be divided into blocks using the dynamic window when the text data to be processed is long, and the target events can be identified at the same time, thereby improving the efficiency of determining multiple target events in the text data to be processed, thereby improving the efficiency of event relationship identification. At the same time, the event identification identifier can also be used to accurately locate the event in the text data to be processed, thereby improving the accuracy of determining the target event in the text data to be processed, thereby improving the accuracy of event relationship identification.
[0127] In an optional implementation, when there are multiple events of the at least one initial event, event deduplication processing is performed on the multiple initial events, and the target event is determined based on the initial events after deduplication.
[0128] Among them, the above-mentioned deduplication processing can be performed by averaging as described in the above steps S71 to S72, or it can also be performed by deleting redundant initial events in the at least one initial event and retaining only one initial event. The present disclosure does not limit the method of the deduplication processing, which is subject to what can be implemented.
[0129] Afterwards, the initial event after deduplication can be determined as the target event.
[0130] In the above implementation, when there are multiple initial events, deduplication processing can be performed on the multiple initial events, thereby reducing interference in the process of event relationship identification, thereby improving the accuracy of event relationship identification.
[0131] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0132] Based on the same inventive concept, an event relationship identification device corresponding to the event relationship identification method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned event relationship identification method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0133] Reference Figure 6 FIG. 1 is a schematic diagram of an event relationship identification device provided by an embodiment of the present disclosure, wherein the device comprises: an acquisition unit 61, a first construction unit 62, a second construction unit 63, and an identification unit 64; wherein:
[0134] An acquisition unit 61 is used to acquire text data to be processed and determine a plurality of target events in the text data to be processed;
[0135] A first constructing unit 62, configured to construct at least one event group based on the multiple target events, wherein each of the event groups includes at least two target events;
[0136] A second construction unit 63 is used to construct a target event relationship graph based on the at least one event group; the target event relationship graph is used to indicate the association relationship between event groups containing the same target event in each event group;
[0137] The identification unit 64 is used to identify the event relationship between each target event in the text data to be processed based on the target event relationship graph.
[0138] It can be known from the above description that after obtaining the text data to be processed, multiple target events can be first determined in the text data to be processed, and at least one event group can be constructed based on the multiple target events. Afterwards, a target event relationship graph can be constructed based on the at least one event group, and the event relationship between the target events in the text data to be processed can be identified based on the target event relationship graph. In the above implementation, a target event relationship graph can be constructed based on the event group, so that the event relationship between any two target events can be identified based on the target event relationship graph. At the same time, the event relationship between the event groups can also be identified, so that the event relationship between multiple target events can be identified, and then a richer and more comprehensive event relationship between the target events can be obtained.
[0139] In a possible implementation, the second construction unit is further used to: when the number of the at least one event group is multiple, construct event pair nodes based on the multiple event groups to obtain multiple event pair nodes, wherein each event group corresponds to an event pair node; establish a node association relationship between any two of the event pair nodes to obtain an initial event relationship graph; obtain node constraints between each event pair node, and delete the node association relationships in the initial event relationship graph that do not meet the node constraints to obtain the target event relationship graph.
[0140] In a possible implementation, the recognition unit is further used to: obtain a target event relationship recognition model; input the target event relationship graph into the target event relationship recognition model for recognition processing to obtain the event relationship between the target events in the text data to be processed, wherein the event relationship includes: a first event relationship between the target events included in each of the event groups, and / or a second event relationship between the event groups to obtain the event relationship between the target events in the text data to be processed.
[0141] In one possible implementation, the identification unit is further used to: obtain a training data set; wherein the training data set includes multiple training samples and training labels, each of the training samples includes an event relationship graph to be trained, and the training label of each of the training samples includes relationship labels of event relationships of events included in each event group to be trained in the event relationship graph to be trained and / or relationship labels of event relationships between event groups; and train the event relationship recognition model to be trained based on the training data set to obtain the target event relationship recognition model.
[0142] In one possible implementation, the identification unit is further used to: input the training data set into the event relationship identification model to be trained for training to obtain an initial training result for each of the training samples; wherein the initial training result is used to indicate the prediction result of the event relationship of the events contained in each event group to be trained in the event relationship graph to be trained and / or the prediction result of the event relationship between each event group; determine the target training result in the initial training result, wherein the target training result is a training result that is different from the corresponding training label; adjust the calculation weight of the focus loss function based on the target training result, and determine the function value of the focus loss function based on the adjusted calculation weight; adjust the model parameters of the event relationship identification model to be trained based on the function value of the focus loss function until the event relationship identification model to be trained that meets the training requirements is obtained, and the event relationship identification model to be trained that meets the training requirements is determined as the target event relationship identification model.
[0143] In a possible implementation manner, the first construction unit is further configured to: generate a corresponding event representation identifier for each target event in the multiple target events, to obtain multiple event representation identifiers;
[0144] The at least one event group is constructed based on the multiple event representation identifiers, wherein each of the event groups includes an event representation identifier of a target event corresponding to the event group.
[0145] In a possible implementation, the first construction unit is further used to: obtain text information of each target event among the multiple target events; encode the text information to obtain an encoding result, and determine an event representation identifier corresponding to the target event based on the encoding result.
[0146] In a possible implementation, the first construction unit is further used to: when there are multiple encoding results, determine the sum of the multiple encoding results to obtain a target encoding result; and calculate the average value of the target encoding result and the number of encoding results to obtain an event representation identifier of the target event.
[0147] In a possible implementation, the acquisition unit is also used to: determine window parameters of a dynamic window; the dynamic window is a window used to traverse the text data to be processed; determine the target text data in the text data to be processed at the current moment that is located within the dynamic window, and identify an event identification identifier in the target text data; identify text information of a corresponding event in the target text data based on the event identification identifier, obtain at least one initial event, and determine the target event based on the at least one initial event.
[0148] In a possible implementation, the acquisition unit is further used to: when there are multiple events of the at least one initial event, deduplicate the multiple initial events, and determine the target event based on the deduplicated initial events.
[0149] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0150] Corresponds to Figure 1 The event relationship identification method in the present disclosure also provides a computer device 700, such as Figure 7 FIG. 7 is a schematic diagram of the structure of a computer device 700 provided in an embodiment of the present disclosure, including:
[0151] Processor 71, memory 72, and bus 73; memory 72 is used to store execution instructions, including internal memory 721 and external memory 722; the internal memory 721 is also called internal memory, which is used to temporarily store the operation data in the processor 71 and the data exchanged with the external memory 722 such as a hard disk. The processor 71 exchanges data with the external memory 722 through the internal memory 721. When the computer device 700 is running, the processor 71 communicates with the memory 72 through the bus 73, so that the processor 71 executes the following instructions:
[0152] Acquire text data to be processed, and determine a plurality of target events in the text data to be processed;
[0153] constructing at least one event group based on the multiple target events, wherein each of the event groups includes at least two target events;
[0154] Building a target event relationship graph based on the at least one event group; the target event relationship graph is used to indicate the association relationship between event groups containing the same target event in each event group;
[0155] The event relationship between target events in the text data to be processed is identified based on the target event relationship graph.
[0156] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the event relationship identification method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0157] The present disclosure also provides a computer program product that carries a program code. The program code includes instructions that can be used to execute the steps of the event relationship identification method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0158] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0159] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0160] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0161] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0162] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0163] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.< / t>
Claims
1. A method for identifying event relations, characterized in that: include: Acquire text data to be processed, and determine a plurality of target events in the text data to be processed; constructing at least one event group based on the multiple target events, wherein each of the event groups includes at least two target events; In the case where the number of the at least one event group is plural, constructing event pair nodes based on the multiple event groups to obtain multiple event pair nodes, wherein each event group corresponds to one event pair node; Establishing a node association relationship between any two event pair nodes to obtain an initial event relationship graph; Obtaining node constraints between nodes of each event pair, and deleting node associations that do not satisfy the node constraints in the initial event relationship graph, to obtain a target event relationship graph; the target event relationship graph is used to indicate associations between event groups that contain the same target event in each event group; The event relationship between target events in the text data to be processed is identified based on the target event relationship graph.
2. The method according to claim 1, characterized in that The identifying the event relationship between target events in the to-be-processed text data based on the target event relationship graph includes: Obtaining a target event relationship recognition model; The target event relationship graph is input into the target event relationship recognition model for recognition processing to obtain the event relationship between the target events in the text data to be processed, wherein the event relationship includes: a first event relationship between the target events included in each of the event groups, and / or a second event relationship between the event groups to obtain the event relationship between the target events in the text data to be processed.
3. The method according to claim 2, characterized in that The method further comprises: Acquire a training data set; wherein the training data set includes a plurality of training samples and training labels, each of the training samples includes a to-be-trained event relationship graph, and the training label of each of the training samples includes a relationship label of an event relationship of events included in each to-be-trained event group in the to-be-trained event relationship graph and / or a relationship label of an event relationship between event groups; The event relationship recognition model to be trained is trained based on the training data set to obtain the target event relationship recognition model.
4. The method according to claim 3, characterized in that The step of training the event relationship recognition model to be trained based on the training data set to obtain the target event relationship recognition model includes: The training data set is input into the event relationship recognition model to be trained to obtain an initial training result for each training sample; wherein the initial training result is used to indicate the prediction result of the event relationship of the events included in each event group to be trained in the event relationship graph to be trained and / or the prediction result of the event relationship between each event group; Determining a target training result in the initial training result, wherein the target training result is a training result that is different from the corresponding training label; Adjusting the calculation weight of the focus loss function based on the target training result, and determining the function value of the focus loss function based on the adjusted calculation weight; Based on the function value of the focus loss function, the model parameters of the event relationship recognition model to be trained are adjusted until the event relationship recognition model to be trained that meets the training requirements is obtained, and the event relationship recognition model to be trained that meets the training requirements is determined as the target event relationship recognition model.
5. The method according to any one of claims 1 to 4, characterized in that The constructing at least one event group based on the multiple target events comprises: Generating a corresponding event representation identifier for each target event in the multiple target events to obtain multiple event representation identifiers; The at least one event group is constructed based on the multiple event representation identifiers, wherein each of the event groups includes an event representation identifier of a target event corresponding to the event group.
6. The method according to claim 5, characterized in that Generating a corresponding event representation identifier for each target event among the multiple target events includes: Acquire text information of each target event among the multiple target events; The text information is encoded to obtain an encoding result, and an event representation identifier corresponding to the target event is determined based on the encoding result.
7. The method according to claim 6, characterized in that The determining of an event representation identifier corresponding to the target event based on the encoding result includes: In the case where there are multiple encoding results, determining the sum of the multiple encoding results to obtain a target encoding result; The target encoding result and the number of encoding results are averaged to obtain an event representation identifier of the target event.
8. The method according to claim 1, characterized in that: The step of determining a plurality of target events in the text data to be processed includes: Determining window parameters of a dynamic window; the dynamic window is a window used to traverse the text data to be processed; Determine the target text data located in the dynamic window in the text data to be processed at the current moment, and identify the event identification mark in the target text data; Based on the event identification identifier, text information of a corresponding event is identified in the target text data to obtain at least one initial event, and the target event is determined based on the at least one initial event.
9. The method according to claim 8, characterized in that The determining the target event based on the at least one initial event comprises: In the case that there are multiple events of the at least one initial event, event deduplication processing is performed on the multiple initial events, and the target event is determined based on the initial events after deduplication.
10. An event relationship recognition device, characterized in that: include: An acquisition unit, used for acquiring text data to be processed and determining a plurality of target events in the text data to be processed; A first constructing unit, configured to construct at least one event group based on the multiple target events, wherein each of the event groups includes at least two target events; A second construction unit is used to construct event pair nodes based on the multiple event groups to obtain multiple event pair nodes when the number of the at least one event group is multiple, wherein each event group corresponds to an event pair node; establish a node association relationship between any two of the event pair nodes to obtain an initial event relationship graph; obtain node constraints between each event pair node, and delete the node association relationships that do not meet the node constraints in the initial event relationship graph to obtain a target event relationship graph; the target event relationship graph is used to indicate the association relationship between event groups containing the same target event in each event group; The identification unit is used to identify the event relationship between each target event in the text data to be processed based on the target event relationship graph.
11. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the event relationship identification method as described in any one of claims 1 to 9 are performed.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the event relationship identification method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Atlas construction method and device
CN113127649A
Fusion map construction method and device
CN113157931A
