Event disambiguation method based on graph neural network and related device thereof

By using a graph neural network-based method, interaction coefficients are calculated and a multi-layer convolutional neural network is constructed to achieve end-to-end event coreference resolution, solving the problem of error propagation in existing technologies and improving disambiguation accuracy.

CN115062136BActive Publication Date: 2026-02-24华润数字科技有限公司
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202210442385.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-25
Publication Date
2026-02-24
Estimated Expiration
2042-04-25

AI Technical Summary

Technical Problem

Existing event coreference resolution methods suffer from cascading resolution, which leads to error propagation and affects disambiguation accuracy.

Method used

A graph neural network-based approach is adopted to generate target vectors by calculating the interaction coefficients of words, entities, and event elements. A multi-layer convolutional neural network is constructed and combined with a binary classification neural network to perform end-to-end event coreference resolution.

Benefits of technology

This reduces the error propagation effect caused by cascaded resolution and improves the accuracy of disambiguation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115062136B_ABST
    Figure CN115062136B_ABST
Patent Text Reader

Abstract

The embodiment of the application belongs to the computer field and relates to an event disambiguation method based on a graph neural network and a related device thereof, which comprises the following steps: performing a word segmentation operation, a named entity recognition operation and an event extraction operation on an event corpus to obtain words, entities and event elements; calculating a first interaction coefficient, a second interaction coefficient, a third interaction coefficient and a fourth interaction coefficient to generate an initial vector, normalizing the initial vector to obtain a target vector; composing an adjacency matrix of a target connection graph from the target vector, generating a target matrix based on the adjacency matrix; constructing a multi-layer convolutional neural network based on the target matrix, converting nodes in the target connection graph into a node feature matrix, inputting the node feature matrix into the multi-layer convolutional neural network to obtain a graph feature vector; calculating the average value of the graph feature vector to obtain an event feature vector; and inputting the event feature vector into a binary classification neural network to obtain a binary classification result. The application improves the accuracy of disambiguation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and in particular to an event disambiguation method based on a graph neural network and a related device thereof. BACKGROUND

[0002] Event extraction is an important task in the field of natural language processing and has wide application in the fields of intelligent question answering and machine reading. Event coreference resolution is an important subtask of event extraction, and its main purpose is to identify the same event with inconsistent expressions, thereby reducing the interference brought by subsequent semantic analysis.

[0003] At present, the main method of event coreference resolution is based on feature engineering. For example, the patent with application number CN202010860468.3 discloses a method for event coreference resolution. The method obtains text data by performing stage-by-stage disambiguation on collected text data. However, the disambiguation method mentioned in the patent is relatively simple, and the cascading disambiguation of stage-by-stage will cause the errors of the previous stage to be transmitted to the next stage, thereby causing the error multiplication effect of the final result, which greatly affects the accuracy of disambiguation. SUMMARY

[0004] The purpose of the embodiments of the present application is to provide an event disambiguation method based on a graph neural network and a related device thereof, which improves the accuracy of disambiguation.

[0005] To solve the above technical problems, the embodiments of the present application provide an event disambiguation method based on a graph neural network, which adopts the following technical solutions:

[0006] An event disambiguation method based on a graph neural network includes the following steps:

[0007] Receiving event corpus, performing word segmentation operation, named entity recognition operation and event extraction operation on the event corpus respectively, and obtaining a plurality of words, a plurality of entities and a plurality of event elements;

[0008] Calculating first interaction coefficients, second interaction coefficients, third interaction coefficients and fourth interaction coefficients based on the words, entities and event elements;

[0009] Generating an initial vector according to the first interaction coefficients, the second interaction coefficients, the third interaction coefficients and the fourth interaction coefficients, and performing normalization processing on the initial vector to obtain a target vector;

[0010] Constructing a target connection graph based on the words, the entities and the event elements, all the target vectors forming an adjacency matrix of the target connection graph, and generating a target matrix based on the adjacency matrix;

[0011] constructing a multi-layer convolutional neural network based on the target matrix, converting nodes in the target connection graph into a node feature matrix, inputting the node feature matrix into the multi-layer convolutional neural network, and obtaining a graph feature vector of each node in the target connection graph as output;

[0012] calculating an average value of the graph feature vectors corresponding to the event elements in each of the event corpora to obtain an event feature vector;

[0013] inputting any two of the event feature vectors into a pre-trained binary classification neural network to obtain a binary classification result as output.

[0014] Further, the step of calculating the first interaction coefficient, the second interaction coefficient, the third interaction coefficient, and the fourth interaction coefficient based on the words, the entities, and the event elements comprises:

[0015] calculating an interaction coefficient between the event elements and the entities as the first interaction coefficient, and calculating an interaction coefficient between the entities as the second interaction coefficient;

[0016] calling a syntax recognition tool to perform syntax recognition on the event corpus to obtain a dependency syntax tree, determining a dependency syntax interaction coefficient from the dependency syntax tree as the third interaction coefficient;

[0017] determining a number of synonyms and a number of hyponyms of each of the words in a preset knowledge base, calculating a semantic interaction coefficient between the words based on the number of synonyms and the number of hyponyms as the fourth interaction coefficient.

[0018] Further, the step of calculating the interaction coefficient between the event elements and the entities as the first interaction coefficient comprises:

[0019] The first interaction coefficient is calculated by the following formula:

[0020]

[0021] wherein EE i is the event element, ET j is the entity, is the first interaction coefficient, and EditDistance(EE i , ET j ) is an edit distance between EE i and ET j previously calculated.

[0022] Further, the step of calculating the interaction coefficient between the entities as the second interaction coefficient comprises:

[0023] convert the entity into a word vector, calculate the cosine similarity between the words according to the word vector as the second interaction coefficient.

[0024] Further, the step of determining a dependency syntax interaction coefficient according to the dependency syntax tree as a third interaction coefficient comprises:

[0025] In the dependency syntax tree, if there is a dependency relationship between the words in the same sentence, the corresponding third interaction coefficient is 1;

[0026] In the dependency syntax tree, if there is no dependency relationship between the words in the same sentence, the corresponding third interaction coefficient is 0;

[0027] If any two of the words are not in the same sentence, the corresponding third interaction coefficient is 0.

[0028] Further, the step of constructing a multi-layer convolutional neural network based on the target matrix comprises:

[0029] The calculation formula of the multi-layer convolutional neural network is:

[0030] Wherein, L (j) represents the jth layer of the multi-layer convolutional neural network, W0 is a preset weight matrix, and sigma is an activation function, is the target matrix.

[0031] Further, the step of converting the nodes in the target connection graph into a node feature matrix comprises:

[0032] Inputting the nodes in the target connection graph into a pre-trained BERT language model to obtain an output node feature vector;

[0033] Generating the node feature matrix according to all the node feature vectors.

[0034] To solve the above technical problems, the embodiment of the application also provides an event disambiguation device based on a graph neural network, which adopts the following technical scheme:

[0035] An event disambiguation device based on a graph neural network comprises:

[0036] A receiving module is configured to receive an event corpus, and perform a word segmentation operation, a named entity recognition operation and an event extraction operation on the event corpus respectively to obtain a plurality of words, a plurality of entities and a plurality of event elements;

[0037] A first calculation module is configured to calculate a first interaction coefficient, a second interaction coefficient, a third interaction coefficient and a fourth interaction coefficient based on the words, the entities and the event elements.

[0038] The generating module is configured to generate an initial vector according to the first interaction coefficient, the second interaction coefficient, the third interaction coefficient, and the fourth interaction coefficient, and perform normalization processing on the initial vector to obtain a target vector;

[0039] The constructing module is configured to construct a target connection graph based on the words, the entities, and the event elements, all the target vectors forming an adjacency matrix of the target connection graph, and generate a target matrix based on the adjacency matrix;

[0040] The input module is configured to construct a multi-layer convolutional neural network based on the target matrix, convert nodes in the target connection graph into a node feature matrix, input the node feature matrix into the multi-layer convolutional neural network, and obtain a graph feature vector of each node in the output target connection graph;

[0041] The second calculating module is configured to calculate an average value of the graph feature vectors corresponding to the event elements in each of the event corpora to obtain an event feature vector;

[0042] The obtaining module is configured to input any two event feature vectors into a pre-trained binary classification neural network to obtain a binary classification result.

[0043] To solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the technical scheme as follows:

[0044] A computer device includes a memory and a processor, the memory stores computer readable instructions, and the processor executes the computer readable instructions to realize the steps of the event disambiguation method based on the graph neural network.

[0045] To solve the above technical problems, the embodiment of the present application further provides a computer readable storage medium, which adopts the technical scheme as follows:

[0046] A computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by a processor to realize the steps of the event disambiguation method based on the graph neural network.

[0047] Compared with the prior art, the embodiment of the present application has the following beneficial effects:

[0048] This application calculates a first interaction coefficient, a second interaction coefficient, a third interaction coefficient, and a fourth interaction coefficient based on the aforementioned words, entities, and event elements, thereby generating a target vector. It integrates entity, syntactic, and semantic information, constructs a multi-layer convolutional neural network based on the target vector, and inputs the node feature matrix into the multi-layer convolutional neural network to obtain a graph feature vector. This achieves a deeper level of semantic vectors through the multi-layer convolutional neural network, and realizes event coreference resolution through the classification method of a binary classification neural network. This is an end-to-end event coreference resolution method, which reduces the error propagation effect caused by cascade resolution methods and improves the accuracy of disambiguation. Attached Figure Description

[0049] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;

[0051] Figure 2 This is a flowchart of an embodiment of the event disambiguation method based on graph neural networks according to this application;

[0052] Figure 3 This is a schematic diagram of the structure of an embodiment of the event disambiguation device based on a graph neural network according to this application;

[0053] Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application.

[0054] Reference numerals: 200, computer equipment; 201, memory; 202, processor; 203, network interface; 300, event disambiguation device based on graph neural network; 301, receiving module; 302, first calculation module; 303, generation module; 304, construction module; 305, input module; 306, second calculation module; 307, acquisition module. Detailed Implementation

[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0056] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0057] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0058] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0059] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0060] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.

[0061] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.

[0062] It should be noted that the event disambiguation method based on graph neural networks provided in this application is generally executed by a server / terminal device, and correspondingly, the event disambiguation device based on graph neural networks is generally set in the server / terminal device.

[0063] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0064] Continue to refer to Figure 2 The diagram illustrates a flowchart of an embodiment of the graph neural network-based event disambiguation method according to this application. The graph neural network-based event disambiguation method includes the following steps:

[0065] S1: Receive event corpus, and perform word segmentation, named entity recognition and event extraction operations on the event corpus to obtain multiple words, multiple entities and multiple event elements.

[0066] In this embodiment, the event corpus is segmented to obtain multiple words, which form a segmentation set W, W = {w1, w2, ..., wD}. Named entity recognition technology is used to identify entities in the event corpus, obtaining multiple entities, which form an entity set EN, EN = {et1, et2, ..., etN}. Event element roles are defined in the ACE (Auto Content Extraction) evaluation conference, including elements such as event type, event trigger words, people involved in the event, location involved in the event, and time involved in the event. An event extraction method is used to identify event element roles in an event (one event refers to one event corpus), obtaining multiple event elements, which form an event element set EE, EE = {ee1, ee2, ..., eeM}.

[0067] It should be noted that since word segmentation, named entity recognition, and event extraction technologies are already quite mature, this application does not limit the specific methods.

[0068] In this embodiment, the event disambiguation method based on graph neural networks is applied to electronic devices (e.g., Figure 1The server / terminal device shown can receive event data via wired or wireless connection. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra wideband) connections, and other currently known or future-developed wireless connection methods.

[0069] S2: Calculate the first interaction coefficient, the second interaction coefficient, the third interaction coefficient, and the fourth interaction coefficient based on the words, entities, and event elements.

[0070] In this embodiment, interaction coefficients of multiple dimensions are calculated using words, entities, and event elements, namely, the first interaction coefficient, the second interaction coefficient, the third interaction coefficient, and the fourth interaction coefficient.

[0071] S3: Generate an initial vector based on the first interaction coefficient, the second interaction coefficient, the third interaction coefficient, and the fourth interaction coefficient, and normalize the initial vector to obtain the target vector.

[0072] In this embodiment, based on the first interaction coefficient Second interaction coefficient Third interaction coefficient and the fourth interaction coefficient Generate initial vector

[0073] Specifically, the steps of calculating the first interaction coefficient, the second interaction coefficient, the third interaction coefficient, and the fourth interaction coefficient based on the words, entities, and event elements include:

[0074] Calculate the interaction coefficient between the event element and the entity as the first interaction coefficient, and calculate the interaction coefficient between the entities as the second interaction coefficient;

[0075] The event corpus is subjected to syntactic recognition by a syntactic recognition tool to obtain a dependency syntax tree. The dependency syntax interaction coefficient is determined based on the dependency syntax tree and used as the third interaction coefficient.

[0076] The number of synonyms and hyponyms of each word in the preset knowledge base is determined, and the semantic interaction coefficient between the words is calculated based on the number of synonyms and hyponyms, which is used as the fourth interaction coefficient.

[0077] In this embodiment, the frequency (i.e., quantity) of synonyms, hypernyms, and hyponyms of each word in the word segmentation set is found in the preset knowledge base WordNet. Let word W... i The number of synonyms for synon isnum (W i ), the number of hyponyms is hypon num (W i ). A word with a stronger generalization is called the hypernym of a word with a stronger specificity, and a word with a stronger specificity is called the hyponym of a word with a stronger generalization. For example, scarlet, bright red, carmine, and crimson are all hyponyms of "red", and "red" is the hypernym of scarlet.

[0078] Furthermore, the step of calculating the interaction coefficient between the event element and the entity as the first interaction coefficient includes:

[0079] Calculating the first interaction coefficient through the following formula:

[0080]

[0081] where EE i is the event element, ET j is the entity, is the first interaction coefficient, EditDistance(EE i , ET j ) is the pre-calculated edit distance between EE i and ET j .

[0082] In this embodiment, the first interaction coefficient is also referred to as the interaction coefficient between the event element and the entity. The edit distance is an index used to measure the similarity degree of two sequences. Generally speaking, the edit distance refers to the minimum number of single-character editing operations required to convert one word <w_1, w_2> to another word w_2. There are only three defined single-character editing operations here: insertion, deletion, and replacement. For example: converting December to the twelfth lunar month, first the character '十' needs to be deleted, and then '二' is replaced with '腊', so the edit distance from December to the twelfth lunar month is 2.

[0083] In addition, the step of calculating the interaction coefficient between the entities as the second interaction coefficient includes:

[0084] Converting the entity into a word vector, and calculating the cosine similarity between the words according to the word vector as the second interaction coefficient.

[0085] In this embodiment, the second interaction coefficient is also called the inter-entity interaction coefficient. For the identified entity, its corresponding word vector is searched in a preset word vector set. The preset word vector set can be a publicly available word vector set on the internet, such as those published by companies like Google and Tencent, which contains the word vector corresponding to each word. The inter-entity interaction coefficient is... Here, cosine represents the cosine similarity.

[0086] Simultaneously, the step of determining the dependency parsing interaction coefficients as the third interaction coefficients based on the dependency parsing tree includes:

[0087] In the dependency syntax tree, if there is a dependency relationship between words in the same sentence, the corresponding third interaction coefficient is 1;

[0088] In the dependency syntax tree, if there is no dependency relationship between words in the same sentence, the corresponding third interaction coefficient is 0;

[0089] If any two of the aforementioned words are not in the same sentence, then the corresponding third interaction coefficient is 0.

[0090] In this embodiment, the third interaction coefficient is also called the syntactic-based interaction coefficient. Using tools such as NLTK (Natural Language Toolkit), the dependency syntax relations of each sentence (i.e., each event corpus) are identified, forming a dependency syntax tree. This includes subject-verb relations, verb-object relations, etc. For example: "He plays the piano." After dependency parsing, a subject-verb relation can be identified between "he" and "plays," and a verb-object relation can be identified between "plays" and "piano." The dependency syntax interaction coefficients are then... As the third interaction coefficient.

[0091]

[0092] In addition, the step of calculating the semantic interaction coefficient between the words based on the number of synonyms and the number of hyponyms, as the fourth interaction coefficient, includes:

[0093] The fourth interaction coefficient is calculated according to the following formula:

[0094] in, For the fourth interaction coefficient, synon num (W i ) represents the number of synonyms, hypon num (W i ) represents the number of hyponyms, synon numThe total number of synonyms for all words, hypon num This represents the total number of all hyponyms.

[0095] In this embodiment, the total number of synonyms for all words in the word segmentation set is synon num The total number of all hyponyms is hypopon num The fourth interaction coefficient is also known as the semantic-based interaction coefficient.

[0096] Furthermore, the step of normalizing the initial vector to obtain the target vector includes:

[0097] The initial vector is normalized using the following formula:

[0098] Among them, a ij Let V be the target vector. ij Let q be the initial vector. T These are the preset initialization parameters.

[0099] In this embodiment, the initial vector is normalized to facilitate subsequent data processing. T q is a vector that can be learned during the training of a neural network. T The initial value is randomly assigned.

[0100] S4: Construct a target connection graph based on the words, entities, and event elements. All the target vectors form the adjacency matrix of the target connection graph. Generate a target matrix based on the adjacency matrix.

[0101] In this embodiment, a target connection graph is constructed that includes the words, entities, and event elements. The words, entities, and event elements all serve as nodes in the target connection graph.

[0102] Specifically, the step of generating the target matrix based on the adjacency matrix includes:

[0103] Calculate the in-degree matrix of the target connectivity graph;

[0104] The target matrix is ​​calculated based on the adjacency matrix and the in-degree matrix.

[0105] In this embodiment, the in-degree matrix of the target connectivity graph is calculated using the adjacency matrix, and the target matrix is ​​further calculated using the adjacency matrix and the in-degree matrix.

[0106] Furthermore, the in-degree matrix is ​​calculated using the following formula:

[0107] D ii =∑ j Aij , where D ii Let A be the in-degree matrix. ij Let be the adjacency matrix.

[0108] The target matrix is ​​calculated using the following formula:

[0109] in, Let D be the target matrix, D be the in-degree matrix, and A be the adjacency matrix.

[0110] In this embodiment, the adjacency matrix is ​​a matrix that represents the adjacency relationships (i.e., edges) between nodes. ij Let A be the adjacency matrix of the target connectivity graph, where A ∈ R. n×n The elements in A are the target vector a. ij Let n be the number of all nodes in graph G, and A be an n×n matrix.

[0111] S5: Construct a multi-layer convolutional neural network based on the target matrix, transform the nodes in the target connection graph into node feature matrices, input the node feature matrices into the multi-layer convolutional neural network, and obtain the graph feature vector of each node in the output target connection graph.

[0112] In this embodiment, based on the target matrix A multi-layer convolutional neural network (GCN) is constructed, and the number of layers can be set according to the needs of actual operation. The node feature matrix is ​​input into the multi-layer convolutional neural network. After iterative calculation, the output vector of the last layer of the multi-layer convolutional neural network is the graph feature vector corresponding to each node in the target connection graph.

[0113] Furthermore, the step of converting the nodes in the target connection graph into a node feature matrix includes:

[0114] The nodes in the target connectivity graph are input into a pre-trained BERT language model to obtain the output node feature vectors, wherein the dimension of each node feature vector is m;

[0115] The node feature matrix is ​​generated based on all the node feature vectors.

[0116] In this embodiment, BERT stands for Bidirectional Encoder Representation from Transformers, which is a pre-trained language representation model. The node feature matrix is ​​X∈R n×m, where n is the number of all nodes in the target connectivity graph (or graph G), and the dimension of the feature vector of each node is m.

[0117] Furthermore, the step of constructing a multi-layer convolutional neural network based on the target matrix includes:

[0118] The calculation formula for the multi-layer convolutional neural network is as follows:

[0119] Among them, L (j) This represents the j-th layer of the multi-layer convolutional neural network, where W0 is a preset weight matrix and σ is the activation function. Let be the target matrix.

[0120] In this embodiment, L (j) L represents the j-th layer of the multi-layer convolutional neural network. (0) =X, where X is the node feature matrix mentioned above.

[0121] S6: Calculate the average value of the graph feature vectors corresponding to the event elements in each event corpus to obtain the event feature vector.

[0122] In this embodiment, the average value (i.e., arithmetic mean) of the graph feature vectors corresponding to the event elements in each event corpus (or each event) is calculated to obtain the event feature vector of each event.

[0123] S7: Input any two of the event feature vectors into a pre-trained binary classification neural network to obtain the output binary classification result.

[0124] In this embodiment, the coreference relationship between two events is determined using supervised learning. Labels 1 and 0 are set, where 1 indicates that the two events are coreferences, and 0 indicates that they are not coreferences. A binary classification neural network is constructed and trained using the cross-entropy loss function. The event feature vector of each event is used as input to obtain the binary classification result output by the trained neural network, indicating whether the two events are the same event.

[0125] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0126] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0127] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware with computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium, and when executed, they can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0128] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0129] Further reference Figure 3 As a response to the above Figure 2 To implement the method shown, this application provides an embodiment of an event disambiguation device based on a graph neural network, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0130] like Figure 3As shown, the event disambiguation device 300 based on graph neural networks described in this embodiment includes: a receiving module 301, a first calculation module 302, a generation module 303, a construction module 304, an input module 305, a second calculation module 306, and an obtaining module 307. Specifically: the receiving module 301 receives event corpus and performs word segmentation, named entity recognition, and event extraction operations on the event corpus to obtain multiple words, multiple entities, and multiple event elements; the first calculation module 302 calculates a first interaction coefficient, a second interaction coefficient, a third interaction coefficient, and a fourth interaction coefficient based on the words, entities, and event elements; the generation module 303 generates an initial vector based on the first interaction coefficient, the second interaction coefficient, the third interaction coefficient, and the fourth interaction coefficient, and normalizes the initial vector to obtain a target vector; the construction module 304 constructs a target connection graph based on the words, the entities, and the event elements. All the target vectors form the adjacency matrix of the target connection graph, and a target matrix is ​​generated based on the adjacency matrix; input module 305 is used to construct a multi-layer convolutional neural network based on the target matrix, convert the nodes in the target connection graph into node feature matrices, input the node feature matrices into the multi-layer convolutional neural network, and obtain the graph feature vector of each node in the output target connection graph; second calculation module 306 is used to calculate the average value of the graph feature vectors corresponding to the event elements in each event corpus, and obtain the event feature vector; obtaining module 307 is used to input any two event feature vectors into a pre-trained binary classification neural network, and obtain the output binary classification result.

[0131] In this embodiment, the present application calculates a first interaction coefficient, a second interaction coefficient, a third interaction coefficient, and a fourth interaction coefficient based on the words, entities, and event elements, and then generates a target vector. It integrates entity, grammatical, and semantic information, constructs a multi-layer convolutional neural network based on the target vector, and inputs the node feature matrix into the multi-layer convolutional neural network to obtain a graph feature vector. This achieves a deeper level of semantic vectors through the multi-layer convolutional neural network, and uses a binary classification neural network to achieve event coreference resolution. This is an end-to-end event coreference resolution method, which reduces the error propagation effect caused by cascaded resolution methods and improves the accuracy of disambiguation.

[0132] The generation module 303 includes a first generation submodule, a second generation submodule, and a third generation submodule. The first generation submodule calculates the interaction coefficient between the event element and the entity as a first interaction coefficient, and calculates the interaction coefficient between the entities as a second interaction coefficient. The second generation submodule invokes a syntax recognition tool to perform syntax recognition on the event corpus, obtains a dependency syntax tree, and determines the dependency syntax interaction coefficient based on the dependency syntax tree as a third interaction coefficient. The third generation submodule determines the number of synonyms and hyponyms for each word in a preset knowledge base, and calculates the semantic interaction coefficient between the words based on the number of synonyms and hyponyms as a fourth interaction coefficient.

[0133] In some optional implementations of this embodiment, the first generation submodule is further configured to calculate the first interaction coefficient using the following formula:

[0134]

[0135] Among them, EE i For the event element, ET j For the entity, Let EditDistance(EE) be the first interaction coefficient. i ET j ) for pre-calculated EE i With ET j Edit distance between them.

[0136] In some optional implementations of this embodiment, the first generation submodule is further configured to convert the entity into word vectors, and calculate the cosine similarity between the words based on the word vectors, as the second interaction coefficient.

[0137] The second generation submodule includes a first generation unit, a second generation unit, and a third generation unit. The first generation unit includes a third interaction coefficient of 1 when there is a dependency relationship between words in the same sentence in the dependency syntax tree. The second generation unit includes a third interaction coefficient of 0 when there is no dependency relationship between words in the same sentence in the dependency syntax tree. The third generation unit includes a third interaction coefficient of 0 when any two words are not in the same sentence.

[0138] In some optional implementations of this embodiment, the third generation submodule is further configured to: calculate the fourth interaction coefficient according to the following formula:

[0139] in, For the fourth interaction coefficient, synon num (W i ) represents the number of synonyms, hypon num (W i ) represents the number of hyponyms, synon num The total number of synonyms for all words, hypon num This represents the total number of all hyponyms.

[0140] In some optional implementations of this embodiment, the generation module 303 is further configured to normalize the initial vector using the following formula:

[0141] Among them, a ij Let V be the target vector. ij Let q be the initial vector. T These are the preset initialization parameters.

[0142] The construction module 304 includes a first calculation submodule and a second calculation submodule, wherein the first calculation submodule is used to calculate the in-degree matrix of the target connectivity graph; and the second calculation submodule is used to calculate the target matrix based on the adjacency matrix and the in-degree matrix.

[0143] The first calculation submodule is further configured to calculate the in-degree matrix using the following formula:

[0144] D ii =∑ j A ij , where D ii Let A be the in-degree matrix. ij Let be the adjacency matrix.

[0145] The second calculation submodule is further used to calculate the target matrix using the following formula:

[0146] in, Let D be the target matrix, D be the in-degree matrix, and A be the adjacency matrix.

[0147] The input module 305 includes an input submodule and a matrix generation submodule. The input submodule is used to input the nodes in the target connectivity graph into a pre-trained BERT language model to obtain output node feature vectors, wherein the dimension of each node feature vector is m. The matrix generation submodule is used to generate the node feature matrix based on all the node feature vectors.

[0148] In some optional implementations of this embodiment, the input module 305 further includes the calculation formula of the multi-layer convolutional neural network as follows:

[0149] Among them, L (j) This represents the j-th layer of the multi-layer convolutional neural network, where W0 is a preset weight matrix and σ is the activation function. Let be the target matrix.

[0150] This application generates a target vector by calculating a first interaction coefficient, a second interaction coefficient, a third interaction coefficient, and a fourth interaction coefficient based on the aforementioned words, entities, and event elements. It integrates entity, syntactic, and semantic information, constructs a multi-layer convolutional neural network based on the target vector, and inputs the node feature matrix into the multi-layer convolutional neural network to obtain a graph feature vector. This achieves a deeper level of semantic vectors through the multi-layer convolutional neural network, and realizes event coreference resolution through a binary classification neural network. This is an end-to-end event coreference resolution method, which reduces the error propagation effect caused by cascade resolution methods and improves the disambiguation accuracy.

[0151] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0152] The computer device 200 includes a memory 201, a processor 202, and a network interface 203 that are interconnected via a system bus. It should be noted that only the computer device 200 with components 201-203 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0153] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0154] The memory 201 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 201 may be an internal storage unit of the computer device 200, such as the hard disk or memory of the computer device 200. In other embodiments, the memory 201 may also be an external storage device of the computer device 200, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Of course, the memory 201 may also include both internal storage units and external storage devices of the computer device 200. In this embodiment, the memory 201 is typically used to store the operating system and various application software installed on the computer device 200, such as computer-readable instructions for event disambiguation methods based on graph neural networks. Furthermore, the memory 201 can also be used to temporarily store various types of data that have been output or will be output.

[0155] In some embodiments, the processor 202 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 202 is typically used to control the overall operation of the computer device 200. In this embodiment, the processor 202 is used to execute computer-readable instructions stored in the memory 201 or to process data, for example, to execute computer-readable instructions of the graph neural network-based event disambiguation method.

[0156] The network interface 203 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 200 and other electronic devices.

[0157] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the event disambiguation method based on graph neural networks as described above.

[0158] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0159] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. An event disambiguation method based on graph neural networks, characterized in that, Includes the following steps: Receive event corpus, and perform word segmentation, named entity recognition and event extraction operations on the event corpus to obtain multiple words, multiple entities and multiple event elements respectively; Calculate the first interaction coefficient, the second interaction coefficient, the third interaction coefficient, and the fourth interaction coefficient based on the aforementioned words, entities, and event elements; An initial vector is generated based on the first interaction coefficient, the second interaction coefficient, the third interaction coefficient, and the fourth interaction coefficient, and the initial vector is normalized to obtain the target vector. A target connection graph is constructed based on the words, entities, and event elements. All the target vectors form the adjacency matrix of the target connection graph. A target matrix is ​​generated based on the adjacency matrix. The words, entities, and event elements are all nodes in the target connection graph. A multi-layer convolutional neural network is constructed based on the target matrix. The nodes in the target connection graph are transformed into node feature matrices. The node feature matrices are input into the multi-layer convolutional neural network to obtain the graph feature vector of each node in the output target connection graph. Calculate the average value of the graph feature vectors corresponding to the event elements in each event corpus to obtain the event feature vector; Input any two of the event feature vectors into a pre-trained binary classification neural network to obtain the output binary classification result; The steps for calculating the first interaction coefficient, the second interaction coefficient, the third interaction coefficient, and the fourth interaction coefficient based on the words, entities, and event elements include: Calculate the interaction coefficient between the event element and the entity as the first interaction coefficient, and calculate the interaction coefficient between the entities as the second interaction coefficient; The event corpus is subjected to syntactic recognition by a syntactic recognition tool to obtain a dependency syntax tree. The dependency syntax interaction coefficient is determined based on the dependency syntax tree and used as the third interaction coefficient. The number of synonyms and hyponyms of each word in the preset knowledge base is determined, and the semantic interaction coefficient between the words is calculated based on the number of synonyms and hyponyms, which is used as the fourth interaction coefficient. The step of generating the target matrix based on the adjacency matrix includes: Based on the adjacency matrix, calculate the in-degree matrix of the target connectivity graph; The target matrix is ​​calculated based on the adjacency matrix and the in-degree matrix.

2. The event disambiguation method based on graph neural networks according to claim 1, characterized in that, The step of calculating the interaction coefficient between the event element and the entity, as the first interaction coefficient, includes: The first interaction coefficient is calculated using the following formula: Among them, EE i For the event element, ET j For the entity, Let EditDistance(EE) be the first interaction coefficient. i ET j ) for pre-calculated EE i With ET j Edit distance between them.

3. The event disambiguation method based on graph neural networks according to claim 1, characterized in that, The step of calculating the interaction coefficient between the entities as the second interaction coefficient includes: The entities are converted into word vectors, and the cosine similarity between the words is calculated based on the word vectors, which is used as the second interaction coefficient.

4. The event disambiguation method based on graph neural networks according to claim 1, characterized in that, The step of determining the dependency parsing interaction coefficients as the third interaction coefficients based on the dependency parsing tree includes: In the dependency syntax tree, if there is a dependency relationship between words in the same sentence, the corresponding third interaction coefficient is 1; In the dependency syntax tree, if there is no dependency relationship between words in the same sentence, the corresponding third interaction coefficient is 0; If any two of the aforementioned words are not in the same sentence, then the corresponding third interaction coefficient is 0.

5. The event disambiguation method based on graph neural networks according to claim 1, characterized in that, The steps of constructing a multi-layer convolutional neural network based on the target matrix include: The calculation formula for the multi-layer convolutional neural network is as follows: Among them, L (j) This represents the j-th layer of the multi-layer convolutional neural network, where W0 is a preset weight matrix and σ is the activation function. Let be the target matrix.

6. The event disambiguation method based on graph neural networks according to claim 1, characterized in that, The step of converting the nodes in the target connectivity graph into a node feature matrix includes: The nodes in the target connectivity graph are input into a pre-trained BERT language model to obtain the output node feature vectors; The node feature matrix is ​​generated based on all the node feature vectors.

7. An event disambiguation device based on a graph neural network, characterized in that, include: The receiving module is used to receive event corpus, and perform word segmentation, named entity recognition and event extraction operations on the event corpus to obtain multiple words, multiple entities and multiple event elements respectively. The first calculation module is used to calculate a first interaction coefficient, a second interaction coefficient, a third interaction coefficient, and a fourth interaction coefficient based on the words, entities, and event elements; The generation module is used to generate an initial vector based on the first interaction coefficient, the second interaction coefficient, the third interaction coefficient, and the fourth interaction coefficient, and to normalize the initial vector to obtain the target vector. The generation module includes a first generation submodule, a second generation submodule, and a third generation submodule: The first generation submodule is used to calculate the interaction coefficient between the event element and the entity as the first interaction coefficient, and to calculate the interaction coefficient between the entities as the second interaction coefficient. The second generation submodule is used to call a syntax recognition tool to perform syntax recognition on the event corpus, obtain a dependency syntax tree, and determine the dependency syntax interaction coefficients based on the dependency syntax tree as the third interaction coefficients; The third generation submodule is used to determine the number of synonyms and hyponyms of each word in the preset knowledge base, and calculate the semantic interaction coefficient between the words based on the number of synonyms and hyponyms, as the fourth interaction coefficient; A construction module is used to construct a target connection graph based on the words, entities, and event elements. All the target vectors form the adjacency matrix of the target connection graph. A target matrix is ​​generated based on the adjacency matrix. The words, entities, and event elements are all nodes in the target connection graph. The construction module is further configured to calculate the in-degree matrix of the target connectivity graph based on the adjacency matrix; and calculate the target matrix based on the adjacency matrix and the in-degree matrix. The input module is used to construct a multi-layer convolutional neural network based on the target matrix, convert the nodes in the target connection graph into a node feature matrix, input the node feature matrix into the multi-layer convolutional neural network, and obtain the graph feature vector of each node in the output target connection graph; The second calculation module is used to calculate the average value of the graph feature vector corresponding to the event element in each event corpus, and obtain the event feature vector; The module is used to input any two event feature vectors into a pre-trained binary classification neural network to obtain the output binary classification result.

8. A computer device, characterized in that, The method includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the event disambiguation method based on a graph neural network as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the event disambiguation method based on a graph neural network as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Event unique ID construction method based on event disambiguation

    CN111737407A

  • Method and device for fusing machine translation systems by aid of word sense disambiguation

    CN103699529A

  • Chinese homodigital event recognition method and system

    CN105302794A

  • Event extraction system and method oriented to open domain

    CN106951438A

  • Text classification method and device, computer equipment and storage medium

    CN112818121A