WO2024021334A1 - 关系抽取方法、计算机设备及程序产品 - Google Patents
关系抽取方法、计算机设备及程序产品 Download PDFInfo
- Publication number
- WO2024021334A1 WO2024021334A1 PCT/CN2022/127698 CN2022127698W WO2024021334A1 WO 2024021334 A1 WO2024021334 A1 WO 2024021334A1 CN 2022127698 W CN2022127698 W CN 2022127698W WO 2024021334 A1 WO2024021334 A1 WO 2024021334A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- vector
- input text
- preset
- tuples
- word
- Prior art date
Links
- 238000000605 extraction Methods 0.000 title claims abstract description 51
- 239000013598 vector Substances 0.000 claims abstract description 100
- 239000011159 matrix material Substances 0.000 claims abstract description 45
- 238000013528 artificial neural network Methods 0.000 claims abstract description 41
- 238000000034 method Methods 0.000 claims abstract description 37
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 34
- 238000006243 chemical reaction Methods 0.000 claims abstract description 9
- 238000004590 computer program Methods 0.000 claims description 23
- 238000010586 diagram Methods 0.000 description 10
- 238000004364 calculation method Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 238000010276 construction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 239000006185 dispersion Substances 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/211—Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/35—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Definitions
- This application relates to the technical field of natural language processing, such as relationship extraction methods, computer equipment, and program products.
- the relationship extraction task aims to extract (predict) the relationship between two given entities based on a given sentence and two entities.
- the general relationship extraction task is to use the syntactic dependency between words to construct a word graph, encode the word graph, and use the information of the word graph to improve the performance of the model.
- the above methods require dependency syntax analysis tools to obtain the dependency syntactic relationships between words, and this process is often costly.
- the above methods fail to dynamically utilize word-to-word connections between word graphs, causing potential noise in the word graph to affect performance.
- This application provides a relationship extraction method, computer equipment and program products.
- This application provides a relationship extraction method, including:
- This application provides a relationship extraction device, including:
- the first module is configured to obtain the input text, encode the input text, and obtain the hidden vector of each word in the input text;
- the second module is configured to process the input text and obtain an attention matrix used to characterize the weights of the connection relationships between different words within the input text;
- the third module is configured to input the latent vector and the attention matrix into a preset neural network for processing to obtain the final output of the neural network, and calculate the final output through the preset first algorithm. overall vector;
- the fourth module is configured to perform classification conversion processing on the overall vector to obtain the predicted relationship type.
- the present application provides a computer device.
- the computer device includes a processor, a memory, and a computer program stored on the memory.
- the processor executes the computer program to implement the above relationship extraction method.
- the present application provides a computer program product, which includes computer program instructions.
- the computer program instructions When the computer program instructions are executed, the above relationship extraction method is implemented.
- the present application provides a computer storage medium that stores a computer program.
- the computer program is executed by a processor, the above-mentioned relationship extraction method is implemented.
- Figure 1 is a schematic flow chart of a relationship extraction method provided by an embodiment of the present application.
- Figure 2 is a schematic module structure diagram of a relationship extraction model provided by an embodiment of the present application.
- Figure 3 is a schematic structural diagram of a relationship extraction model provided by an embodiment of the present application.
- Figure 4 is a schematic diagram of the steps for obtaining an attention matrix provided by an embodiment of the present application.
- Figure 5 is a schematic diagram of a word graph construction provided by an embodiment of the present application.
- Figure 6 is a schematic structural diagram of a relationship extraction device provided by an embodiment of the present application.
- FIG. 7 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
- the embodiment of the present application provides a relationship extraction method, which is implemented through the relationship prediction model 2.
- the relationship prediction model 2 includes an encoder 20, a decoder 21 and an attention module 22.
- the prediction of the relationship prediction model 2 The steps are as follows: obtain the input text X, pass the input text X to the encoder 20 and encode it, and output the hidden vector of each word in the text Process and output an attention matrix that represents the weight of the connection between different words within the input sentence; input the latent vector and attention matrix into the preset neural network for processing, and obtain the final output of the neural network. And the final output of the neural network is calculated through a preset first algorithm to obtain the overall vector; the overall vector is classified and converted through the decoder 21 to obtain the predicted relationship type.
- the encoder 20 is a Bidirectional Encoder Representations from Transformers (BERT), encodes the input text X, and obtains the latent vector of each word in the input text X. Among them, the hidden vectors of the i-th word x i and the j-th word x j are respectively recorded as and
- the latent vector and attention matrix are input into a preset neural network for processing to obtain the final output of the neural network.
- the final output is calculated through the preset first algorithm to obtain the overall vector including The following steps: use the MaxPooling algorithm to calculate the final output of the neural network to obtain the first entity vector representation h E1 , the second entity vector representation h E2 and the sentence vector representation h X ; use the first entity vector representation h E1 and the second entity vector representation
- the vector representation h E2 representing the sentence and the vector representation h X of the sentence are concatenated to obtain the overall vector o.
- the final output of the neural network is calculated through the MaxPooling algorithm, and the first entity vector representation h E1 , the second entity vector representation h E2 and the sentence vector representation h X are obtained as intermediate variables, reflecting the relationship extraction model of the entity or sentence 2
- the vector representation of different positions in facilitates the subsequent calculation of the overall vector o.
- h E1 and h E2 are the representations of the two entities targeted by the relationship extraction task in the model.
- the neural network includes multiple processing layers, namely Adaptive Graph Convolutional Network (A-GCN).
- A-GCN Adaptive Graph Convolutional Network
- Inputting latent vectors and attention matrices into the preset neural network for processing includes: Hidden vector and / or As the input of the neural network, the input is processed in multiple layers through the preset second algorithm, in which the output of each layer of A-CGN processing is used as the input of the next layer of A-CGN processing, and the attention matrix participates in guiding each layer.
- To process the operation of the layer record the hidden vector output by the l-th layer A-CGN as The output of the last layer of A-CGN is After the last layer is processed, the final output is obtained Used to participate in the first algorithm calculation to obtain the overall vector o.
- the attention matrix output by the attention module 22 also includes the following steps: converting the input text into multiple n-tuples, and the multiple n-tuples are arranged according to the word order of the input text (
- the input text includes at least two given entities, each given entity itself is regarded as an n-tuple); based on the n-tuple, a connection is created between the words of the n-tuple, and the final result is obtained based on the connection Word graph; convert the final word graph into the corresponding adjacency matrix; calculate the attention matrix through the preset third algorithm on the adjacency matrix.
- the method in the background technology is to construct the word graph through the CYK (Cocke–Younger–Kasami) algorithm, and the time complexity is O(N 3 ).
- the relationship extraction method provided by the embodiment of the present application is constructed based on n-tuple Word graph, where n in the n-tuple represents the number of words contained in it. It only needs to be traversed once for each word in the n-tuple, and its time complexity is O(N). It can be seen that constructing word graphs based on n-tuples effectively reduces the time complexity of calculation, improves the efficiency of word graph construction, and reduces the cost of constructing word graphs.
- converting the input text into multiple n-tuples includes the following steps: obtaining a preset n-tuple vocabulary, matching other n-tuples in the input text through the n-tuple vocabulary, and obtaining multiple n-tuples. tuple.
- n-tuple vocabulary list sentences composed of words in the traditional sense are converted into n-tuples containing one or more words that are easier for computers or neural networks to recognize or process, and word graphs are constructed based on the n-tuples. , instead of relying on dependency syntax analysis tools, greatly reducing the cost of obtaining word maps.
- obtaining the final word graph based on connections includes the following steps: based on n-tuples, creating local connections between adjacent words within the n-tuples; Create global connections in pairs; merge local connections with global connections to obtain the final word graph.
- Local connections and global connections connect the words within n-tuples to the words between n-tuples to construct the final word graph, so that when processing vectors through the neural network, the connections between words between word graphs can be dynamically utilized , thus improving the accuracy of predicted relationships.
- the number of n-tuples contained between two n-tuples that create a global connection is no more than 1.
- the final word graph formed will be very complex, and if there is a connection between n-tuples that are far away, this connection will Noise is often introduced, making model identification more difficult.
- the connections between words will be insufficient and contextual information will not be fully utilized, resulting in inaccurate prediction results. Therefore, setting the number of n-tuples contained between the two n-tuples that create the global connection to no more than 1 can reduce the complexity of the final word graph while ensuring the accuracy of the prediction results.
- the given entity i.e., "information” and “information center” shown in Figure 5
- the given entity itself is regarded as an n-tuple.
- the second step is to use an n-tuple vocabulary list and use matching to find other n-tuples that exist in the input text. If there is overlap between the n-tuples obtained by matching, these n-tuples are combined into larger n-tuples.
- n-tuples represented by boxes
- “information" and “information center” are obtained by the entity itself
- "two days ago” is obtained by matching the vocabulary
- "sent” is obtained by combining the matched overlapping n-tuple "sent” and "sent” .
- the third step is to create local connections and global connections between words based on n-tuple.
- Local joins create joins between adjacent words inside an n-tuple.
- Global connections create connections between the first and last words of two different n-tuples, including "first word - first word”, “first word - last word”, “last word - first word”, “ “Tailword-Tailword” four connections.
- Figure 5 shows the global connections related to "information” (for the sake of readability, not all global connections are shown, for example, there is an unshown global connection between "two" and "information” in the "information center”).
- the fourth step is to merge the local connection and the global connection to obtain the final n-tuple-based word graph, and obtain the adjacency matrix A corresponding to the word graph.
- each layer of the A-GCN model consists of input Calculate output The method is:
- W (l) and b (l) are trainable parameter matrices and vectors
- formula (1) is the preset second algorithm.
- the weight is calculated as follows:
- Equation (2) is the preset third algorithm, which converts the adjacency matrix composed of a i, j into the weight Attention matrix composed of.
- the relationship extraction model 2 also includes a fully connected layer
- the decoder 21 is a SoftMax classifier. Classifying and converting the overall vector o includes the following steps: After passing the fully connected layer, the overall vector o is sent to SoftMax classification. device to get the predicted relationship type. The fully connected layer and SoftMax classifier can visualize the weight information of different connections contained in the overall vector and match it with the preset template, making it easier to predict the type of relationship between entities.
- This embodiment can also use the F1 algorithm to evaluate the performance of the relationship extraction model.
- F1 is calculated as follows. For each relationship category r, record the number of entity pairs with this type of relationship predicted by the model in the test set as Denote the number of manually labeled entity pairs with this type of relationship in the test set as n r , and record the number of entity pairs with this type of relationship predicted by the model and manually labeled in the test set (that is, the entity pairs of this type correctly predicted by the model) For c r , calculate the precision (p r ) and recall (r r ) for category r
- R is the label set of all relationship types.
- represents the number of tags contained in the tag set.
- the n-tuples involved in building a global connection are generally adjacent n-tuples or there is an n-tuple between two n-tuples, that is, the interval between n-tuples is 0 or the interval is 1.
- the above-mentioned algorithm for calculating the F value is used to calculate the average F1 score of the relationship extraction model in different states under the same set of data; for the baseline model that does not use the relationship extraction method provided by the embodiment of this application, the average F1 score is calculated between two The average F1 score on the data set is 82.6%; for the "interval is 0" relationship extraction model, the average F1 dispersion on the two data sets is 83.3% (compared to the baseline model, an improvement of 0.4%); for the "interval” For the 1" relationship extraction model, the average F1 dispersion on the two data sets is 83.7% (an improvement of 1.1% compared to the baseline model).
- the embodiment of the present application also provides a relationship extraction device, including: a first module 610, configured to obtain input text, encode the input text, and obtain the hidden meaning of each word in the input text. vector; the second module 620 is configured to process the input text and obtain an attention matrix used to characterize the weights of the connection relationships between different words within the input text; the third module 630 is configured to The latent vector and the attention matrix are input into the preset neural network for processing to obtain the final output of the neural network, and the final output is calculated through the preset first algorithm to obtain the overall vector; the fourth module 640. Set to perform classification conversion processing on the overall vector to obtain the predicted relationship type.
- a first module 610 configured to obtain input text, encode the input text, and obtain the hidden meaning of each word in the input text. vector
- the second module 620 is configured to process the input text and obtain an attention matrix used to characterize the weights of the connection relationships between different words within the input text
- the third module 630 is configured to The latent vector and the attention matrix are input into the
- the third module 630 is configured as:
- the final output of the neural network is calculated using the MaxPooling algorithm to obtain the first entity vector representation, the second entity vector representation and the vector representation of the sentence; the first entity vector representation, the second entity vector table and the sentence
- the vector representations are concatenated to obtain the overall vector.
- the third module 630 is configured as:
- the latent vector is used as the input of the neural network, and the input is processed in multiple layers through a preset second algorithm, where the output of each layer of processing is used as the input of the next layer of processing, and the attention
- the matrix participates in guiding the operation of each layer of processing, and the output obtained after the last layer is processed is the final output.
- the second module 620 is configured as:
- the second module 620 is configured as:
- a preset n-tuple vocabulary is obtained, and the n-tuples in the input text are matched through the n-tuple vocabulary to obtain the plurality of n-tuples.
- the second module 620 is configured as:
- n-tuple Based on the n-tuple, local connections are created between adjacent words within the n-tuple; global connections are created between the first words and the last words of two different n-tuples; and the The local connection is merged with the global connection to obtain the final word graph.
- the number of n-tuples included between the two n-tuples used to create the global connection is not greater than 1.
- the fourth module 640 is configured as:
- the preset SoftMax classifier After the overall vector passes through the preset fully connected layer, it is sent to the preset SoftMax classifier to obtain the predicted relationship type.
- an embodiment of the present application also provides a computer device 3, which includes a processor 30, a memory 31, and a computer program stored on the memory.
- the processor executes the computer program to implement the above method.
- Embodiments of the present application also provide a computer program product.
- the computer program product includes computer program instructions. When the computer program instructions are executed, the above method is implemented.
- Embodiments of the present application also provide a computer storage medium that stores a computer program.
- the computer program is executed by a processor, the above-mentioned relationship extraction method is implemented.
- B corresponding to A means that B is associated with A, and B can be determined based on A. Determining B based on A does not mean determining B only based on A, but can also determine B based on A and/or other information.
- the size of the sequence numbers of the above-mentioned processes does not necessarily mean the order of execution.
- the execution order of multiple processes should be determined by their functions and internal logic, and should not constitute the implementation process of the embodiments of the present application. Any limitations.
- each block in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions.
- the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending upon the functionality involved.
- Each block in the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration may be implemented by special purpose hardware-based systems that perform the specified functions or operations, or may be implemented using special purpose hardware implemented in combination with computer instructions.
- the first embodiment of the present application provides a relationship extraction method, which includes: obtaining input text and encoding the input text to obtain the hidden vector of each word in the input text; processing the input text to obtain the user
- the attention matrix is used to represent the weight of the connection between different words within the input sentence; the latent vector and the attention matrix are input into the preset neural network for processing, and the final output of the neural network is obtained.
- An algorithm calculates the final output to obtain the overall vector; performs classification and conversion processing on the overall vector to obtain the predicted relationship type.
- the attention module processes the input text and outputs an attention matrix that represents the different weights of different words on the relationship prediction task, so that the neural network can train the relationship prediction model and predict entity relationships. , can make more accurate predictions based on connections with different weights, and reduce the computing resources occupied by connections that have less impact on the relationship extraction task. It can be seen that the relationship extraction method provided by the embodiment of the present application not only improves the performance of the relationship prediction model, but also saves computing costs and time costs.
- the latent vector and the attention matrix are input into the preset neural network for processing to obtain the final output of the neural network, and the final output is calculated through the preset first algorithm to obtain the overall
- the vector includes: using the MaxPooling algorithm to calculate the final output of the neural network to obtain the first entity vector representation, the second entity vector representation, and the sentence vector representation; concatenating the first entity vector representation, the second entity vector representation, and the sentence vector representation, Get the overall vector.
- the final output of the neural network is calculated through the MaxPooling algorithm.
- the obtained first entity vector representation, second entity vector representation and sentence vector representation are used as intermediate variables, reflecting the vectors of different positions of entities or sentences in the relationship extraction model. representation to facilitate subsequent calculation of the overall vector.
- inputting the latent vector and attention matrix into the preset neural network for processing includes: using the latent vector as the input of the neural network, and performing multiple processing on the input through the preset second algorithm.
- Layer processing in which the output of each layer of processing is processed as the input of the next layer of processing, and the attention matrix participates in guiding the operation of each layer of processing.
- the output obtained after the last layer of processing is the final output, using Yu participates in the first algorithm to calculate the overall vector.
- the contextual information carried by the syntax in the input text enhances the representation of each word, making use of more distant contextual information, making it possible to participate in the first algorithm
- the semantics represented by the final output are more accurate.
- processing the input text to obtain the attention matrix also includes the following steps: convert the input text into multiple n-tuples, and the multiple n-tuples are in accordance with the word order of the input text. Arrange; based on the n-tuple, create a connection between the words of the n-tuple, and obtain the final word graph based on the connection; convert the final word graph into the corresponding adjacency matrix; calculate the adjacency matrix through the preset third algorithm Get the attention matrix.
- the method in the background technology is to construct a word graph through the CYK algorithm, and the time complexity is O(N 3 ).
- the word graph is constructed based on n-tuple, where, The n in the n-tuple represents the number of words contained. You only need to traverse each word in the n-tuple once, and its time complexity is O(N). It can be seen that constructing word graphs based on n-tuples effectively reduces the time complexity of calculation, improves the efficiency of word graph construction, and reduces the cost of constructing word graphs.
- converting the input text into multiple n-tuples includes the following steps: obtaining a preset n-tuple vocabulary, and matching other n in the input text through the n-tuple vocabulary. Tuples, get multiple n-tuples.
- sentences composed of words in the traditional sense are converted into n-tuples containing one or more words that are easier for computers or neural networks to recognize or process, and word graphs are constructed based on the n-tuples. , instead of relying on dependency syntax analysis tools, greatly reducing the cost of obtaining word maps.
- obtaining the final word graph based on connections includes the following steps: based on n-tuples, creating local connections between adjacent words within the n-tuples; Global connections are created between the first and last words of the group; local connections and global connections are merged to obtain the final word graph. Local connections and global connections connect the words within n-tuples to the words between n-tuples to construct the final word graph, so that when processing vectors through the neural network, the connections between words between word graphs can be dynamically utilized , thus improving the accuracy of predicted relationships.
- the number of n-tuples contained between two n-tuples that create a global connection is not greater than 1.
- the number of n-tuples contained between two n-tuples that create a global connection is too large, the final word graph formed will be very complex, and if there is a connection between n-tuples that are far away, this connection will Noise is often introduced, making model identification more difficult.
- the connections between words will be insufficient and contextual information will not be fully utilized, resulting in inaccurate prediction results. Therefore, setting the number of n-tuples contained between the two n-tuples that create the global connection to no more than 1 can reduce the complexity of the final word graph while ensuring the accuracy of the prediction results.
- the classification conversion process of the overall vector includes the following steps: After the entire vector passes through the preset fully connected layer, it is sent to the preset SoftMax classifier to obtain the predicted relationship type. .
- the fully connected layer and SoftMax classifier can visualize the weight information of different connections contained in the overall vector and match it with the preset template, making it easier to predict the type of relationship between entities.
- the embodiment of the present application also provides a relationship extraction device, which has the same effect as the above-mentioned relationship extraction method, and will not be described again here.
- the embodiment of the present application also provides a computer device, which has the same effect as the above-mentioned relationship extraction method, and will not be described in detail here.
- the embodiment of the present application also provides a computer program product, which has the same effect as the above-mentioned relationship extraction method, and will not be described in detail here.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Machine Translation (AREA)
Abstract
本文公开一种关系抽取方法,包括:获取输入文本,并对输入文本进行编码,得到输入文本中每个词的隐向量;对输入文本进行处理,得到用于表征输入句子内部不同的词与词之间连接关系所占权重的注意力矩阵;将隐向量与注意力矩阵输入预设的神经网络进行处理,得到所述神经网络的最终输出,通过预设的第一算法对所述最终输出进行计算得到整体向量;对整体向量进行分类转换处理,得到预测的关系类型。本申请还提供一种计算机设备和程序产品。
Description
本申请要求在2022年07月29日提交中国专利局、申请号为202210911110.8的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
本申请涉及自然语言处理技术领域,例如涉及关系抽取方法、计算机设备、及程序产品。
关系抽取任务旨在根据给定的句子和两个实体中,抽取(预测)这两个给定实体之间的关系。一般的关系抽取任务是利用词与词之间的依存句法关系(dependency),构建词图(word graph),对词图编码,利用词图的信息提升模型的性能。然而,上述方法需要依存句法分析工具获取词与词的依存句法关系,而这一过程往往成本高昂。同时,上述方法未能动态利用词图之间词与词的连接,使得词图内潜在的噪音影响性能。
发明内容
本申请提供一种关系抽取方法、计算机设备及程序产品。
本申请提供一种关系抽取方法,包括:
获取输入文本,并对所述输入文本进行编码,得到所述输入文本中每个词的隐向量;
对所述输入文本进行处理,得到用于表征所述输入文本内部不同的词与词之间连接关系所占权重的注意力矩阵;
将所述隐向量与所述注意力矩阵输入预设的神经网络进行处理,得到所述神经网络的最终输出,通过预设的第一算法对所述最终输出进行计算得到整体向量;
对所述整体向量进行分类转换处理,得到预测的关系类型。
本申请提供一种关系抽取装置,包括:
第一模块,设置为获取输入文本,并对所述输入文本进行编码,得到所述输入文本中每个词的隐向量;
第二模块,设置为对所述输入文本进行处理,得到用于表征所述输入文本 内部不同的词与词之间连接关系所占权重的注意力矩阵;
第三模块,设置为将所述隐向量与所述注意力矩阵输入预设的神经网络进行处理,得到所述神经网络的最终输出,通过预设的第一算法对所述最终输出进行计算得到整体向量;
第四模块,设置为对所述整体向量进行分类转换处理,得到预测的关系类型。
本申请提供一种计算机设备,所述计算机设备包括处理器、存储器以及存储在所述存储器上的计算机程序,所述处理器执行上述计算机程序以实现上述的关系抽取方法。
本申请提供一种计算机程序产品,包括计算机程序指令,所述计算机程序指令被执行时实现上述关系抽取方法。
本申请提供一种计算机存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现上述的关系抽取方法。
图1是本申请实施例提供的一种关系抽取方法流程示意图;
图2是本申请实施例提供的一种关系抽取模型的模块结构示意图;
图3是本申请实施例提供的一种关系抽取模型的结构示意图;
图4是本申请实施例提供的一种获取注意力矩阵的步骤示意图;
图5是本申请实施例提供的一种词图构建的示意图;
图6是本申请实施例提供的一种关系抽取装置的结构示意图;
图7是本申请实施例提供的一种计算机设备的结构示意图。
以下结合附图及实施实例,对本申请进行说明。此处所描述的具体实施例仅仅用以解释本申请。
请结合图1和图2,本申请实施例提供一种关系抽取方法,通过关系预测模型2实现,关系预测模型2包括编码器20、解码器21和注意力模块22,关系预测模型2的预测步骤如下:获取输入文本X,将输入文本X传入编码器20并编码,输出文本X中每个词的隐向量;将输入文本X传入注意力模块22,注意力模块22对输入文本X进行处理,输出用于表征输入句子内部不同的词与词之间连接关系所占权重的注意力矩阵;将隐向量与注意力矩阵输入预设的神经网络进行处理, 得到神经网络的最终输出,并将神经网络的最终输出通过预设的第一算法计算得到整体向量;对整体向量通过解码器21进行分类转换处理,得到预测的关系类型。
背景技术中的方式未能够动态利用词图之间词与词的连接,使得词图内潜在的噪音影响性能。而本方法提供的注意力模块对输入文本X进行处理,输出了表征不同词之间对关系预测任务所占的不同权重的注意力矩阵,使得神经网络在对关系预测模型2进行训练以及预测实体关系时,能够依据不同权重的连接来进行更加准确的预测,减少了对关系抽取任务影响较小的连接所占用的计算资源。可见,本申请实施例提供的关系抽取方法在提升了关系预测模型2性能的同时,节省了计算成本以及时间成本。
在一些实施例中,编码器20为变形器的双向编码器表示(Bidirectional Encoder Representations from Transformers,BERT),对输入文本X进行编码,得到了输入文本X中每个词的隐向量。其中,第i个词x
i和第j个词x
j的隐向量分别记为
和
请参阅图3,在一些实施例中,将隐向量与注意力矩阵输入预设的神经网络进行处理,得到神经网络的最终输出,通过预设的第一算法对最终输出进行计算得到整体向量包括以下步骤:对神经网络的最终输出使用MaxPooling算法计算得到第一实体向量表征h
E1、第二实体向量表征h
E2以及句子的向量表征h
X;将第一实体向量表征h
E1、第二实体向量表征h
E2以及句子的向量表征h
X串联,得到整体向量o。通过MaxPooling算法对神经网络的最终输出进行计算,得到的第一实体向量表征h
E1、第二实体向量表征h
E2以及句子的向量表征h
X作为中间变量,反映了实体或句子在关系抽取模型2中所处不同位置的向量表征,便于后续对整体向量o的计算。h
E1与h
E2是关系抽取任务针对的两个实体在模型中的表征。
在一些实施例中,神经网络包含多个处理层,即自适应图卷积网络(Adaptive Graph Convolutional Network,A-GCN),将隐向量与注意力矩阵输入预设的神经网络进行处理包括:将隐向量
和/或
作为神经网络的输入,通过预设的第二算法对输入进行多层处理,其中,每一层A-CGN处理的输出作为下一层A-CGN处理的输入,且注意力矩阵参与指导每一处理层的运算,记第l层A-CGN输出的隐向量为
最后一层A-CGN的输出为
最后一层处理完之后得到最终输出
用于参与第一算法计算得到整体向量o。
请参阅图4,在一些实施例中,注意力模块22输出得到注意力矩阵还包括以下步骤:将输入文本转换为多个n元组,多个n元组之间按照输入文本的语序排列(输入文本包括至少两个给定的实体,每个给定的实体本身被视为一个n 元组);基于n元组,在n元组的词与词之间创建连接,并基于连接得到最终词图;将最终词图转化为对应的邻接矩阵;对邻接矩阵通过预设的第三算法计算得到注意力矩阵。
背景技术中的方式是通过CYK(Cocke–Younger–Kasami)算法来构建词图,时间复杂度为O(N
3),而本申请实施例提供的关系抽取方法中,是基于n元组来构建词图,其中,n元组中的n表示包含词的数量,只需对n元组中每个词遍历一遍即可,其时间复杂度为O(N)。可见,基于n元组来构建词图有效地降低了计算的时间复杂度,提高了词图构建的效率,降低了构建词图的成本。
在一些实施例中,将输入文本转换为多个n元组包含以下步骤:获取预设的n元组词表,通过n元组词表匹配输入文本中其他的n元组,得到多个n元组。通过n元组词表,将由传统意义上词与词组成的句子,转换成计算机或神经网络更容易识别或处理的,包含一个或多个词的n元组,基于n元组来构建词图,而不依赖依存句法分析工具,大幅降低了获取词图的成本。
在一些实施例中,基于连接得到最终词图包括以下步骤:基于n元组,在n元组内部的相邻词之间创建本地连接;在两个不同的n元组的首词与尾词之间两两创建全局连接;将本地连接与全局连接合并,得到最终词图。本地连接和全局连接将n元组内部的词与n元组之间的词连接起来构建了最终词图,使得后续在通过神经网络处理向量时,能够动态利用词图之间词与词的连接,从而提高了预测关系的准确性。
在一些实施例中,创建全局连接的两个n元组之间包含的n元组个数不大于1。当创建全局连接的两个n元组之间包含的n元组个数过多,会使得形成的最终词图十分复杂,而且距离较远的n元组之间如果存在连接,则这种连接往往会引入噪音,从而增加模型识别的难度。而如果仅在相邻的n元组之间创建全局连接,这样会使得词与词之间得连接不充分,没有足够地利用上下文信息,从而会使得预测的结果准确性不高。因此,将创建全局连接的两个n元组之间包含的n元组个数设为不大于1,可在降低最终词图的复杂性的同时,保证预测结果的准确度。
示例性地,请参阅图5,按以下步骤构建n元组的词图:
第一步,给定的实体(即图5所示的“信息”和“信息中心”)本身被视为一个n元组。
第二步,使用一个n元组词表,采用匹配的方式,找到输入文本中存在的其它n元组。如果匹配得到的n元组之间有重合,则把这些n元组组合成更大的n元组。例如,在图1中,有4个n元组(由方框表示),“信息”、“两 天前”、“被送到”、“信息中心”。其中,“信息”和“信息中心”由实体本身得到;“两天前”由词表匹配得到;“被送到”由匹配到的重合n元组“被送”和“送到”组合得到。
第三步,基于n元组,在词与词之间创本地连接和全局连接。本地连接在n元组内部的相邻词之间创建连接。全局连接则在两个不同n元组的首词和尾词之间两两创建连接,即包括“首词-首词”、“首词-尾词”、“尾词-首词”、“尾词-尾词”四个连接。图5展示了与“信息”相关的全局连接(为了可读性,未展示所有全局连接,例如,“两”和“信息中心”中的“信息”之间有一条未展示的全局连接)。
第四步,把本地连接和全局连接合并,得到最终的,基于n元组的词图,并得到词图对应的邻接矩阵A。
式(2)中,a
i,j为组成邻接矩阵的元素,取值为0或1,表示x
i和x
j是否有连接,n表示输入文本中词的数量。式(2)即预设的第三算法,将由a
i,j组成的邻接矩阵转换为由权重
组成的注意力矩阵。
在一些实施例中,关系抽取模型2还包括全连接层,解码器21为SoftMax分类器,将整体向量o进行分类转换处理包含以下步骤:将整体向量o经过全连接层后,送入SoftMax分类器,得到预测的关系类型。全连接层和SoftMax分类器可将整体向量中包含的不同连接的权重信息可视化并与预设的模板进行匹配,从而能够更加方便地预测出实体之间的关系类型。
本实施例也可通过F1算法来评价关系抽取模型的性能。
F1的计算方式如下。对于每一种关系类别r,记测试集中模型预测的具有该类型关系的实体对的数量为
记测试集中人工标注的具有该类型关系的实体对的数量为n
r,记测试集中,模型预测与人工标注同样具有该类型关系的实体对(即模型正确预测的属于该类型的实体对)数量为c
r,计算针对类别r的准确 率(p
r)和召回率(r
r)
而后计算针对该类别的F1值,F1
r:
F1
r=2×p
r×r
r/(p
r+r
r)
计算所有类别r的F1
r,而后对这些F1
r求平均,得到最终的评价指标F1值
其中,R为所有关系类型的标签集。|R|表示标签集中含有标签的个数。
对于上述构建n元组的词图的第三步,建立全局连接的两个n元组如果相距较远,会使得形成的词图十分复杂。如果对参与建立全局连接的n元组不加以限制的话,距离很远的n元组之间也会有连接,而这种连接往往会引入噪音,增加模型识别的难度。因此,参与建全局连接的n元组一般为相邻的n元组或者两n元组之间相隔一个n元组,即n元组之间间隔为0或间隔为1。
采用上述计算F值的算法,对不同状态下的关系抽取模型在一组相同的数据集下的平均F1分数进行计算;对于不使用本申请实施例提供的关系抽取方法的基线模型,在两个数据集上的平均F1分数为82.6%;对于“间隔为0”的关系抽取模型,在两个数据集上的平均F1分散为83.3%(相比于基线模型提升了0.4%);对于“间隔为1”的关系抽取模型,在两个数据集上的平均F1分散为83.7%(相比于基线模型提升了1.1%)。
因此,参与建立全局连接的两个n元组之间间隔一个n元组。
请参阅图6,本申请实施例还提供一种关系抽取装置,包括:第一模块610,设置为获取输入文本,并对所述输入文本进行编码,得到所述输入文本中每个词的隐向量;第二模块620,设置为对所述输入文本进行处理,得到用于表征所述输入文本内部不同的词与词之间连接关系所占权重的注意力矩阵;第三模块630,设置为将所述隐向量与所述注意力矩阵输入预设的神经网络进行处理,得到所述神经网络的最终输出,通过预设的第一算法对所述最终输出进行计算得到整体向量;第四模块640,设置为对所述整体向量进行分类转换处理,得到预测的关系类型。
一实施例中,第三模块630设置为:
对所述神经网络的最终输出使用MaxPooling算法计算得到第一实体向量表征、第二实体向量表征以及句子的向量表征;将所述第一实体向量表征、所述 第二实体向量表以及所述句子的向量表征串联,得到所述整体向量。
一实施例中,第三模块630设置为:
将所述隐向量作为所述神经网络的输入,通过预设的第二算法对所述输入进行多层处理,其中,每一层处理的输出作为下一层处理的输入,且所述注意力矩阵参与指导每一层处理的运算,最后一层处理完之后得到的输出为所述最终输出。
一实施例中,第二模块620设置为:
将所述输入文本转换为多个n元组,所述多个n元组之间按照所述输入文本的语序排列;基于所述n元组,在n元组的词与词之间创建连接,并基于所述连接得到最终词图;将所述最终词图转化为邻接矩阵;对所述邻接矩阵通过预设的第三算法计算得到所述注意力矩阵。
一实施例中,第二模块620设置为:
获取预设的n元组词表,通过所述n元组词表匹配所述输入文本中的n元组,得到所述多个n元组。
一实施例中,第二模块620设置为:
基于所述n元组,在所述n元组内部的相邻词之间创建本地连接;在两个不同的n元组的首词之间与尾词之间分别创建全局连接;将所述本地连接与所述全局连接合并,得到所述最终词图。
一实施例中,创建所述全局连接的两个n元组之间包含的n元组个数不大于1。
一实施例中,第四模块640设置为:
将所述整体向量经过预设的全连接层后,送入预设的SoftMax分类器,得到所述预测的关系类型。
请参阅图7,本申请实施例还提供一种计算机设备3,包括处理器30、存储器31以及存储在所述存储器上的计算机程序,所述处理器执行上述计算机程序以实现如上述方法。
本申请的实施例还提供一种计算机程序产品,计算机程序产品包括计算机程序指令,计算机程序指令被执行时实现上述方法。
本申请的实施例还提供一种计算机存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现上述的关系抽取方法。
在本申请所提供的实施例中,“与A对应的B”表示B与A相关联,根据 A可以确定B。根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其他信息确定B。
说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定特征、结构或特性可以以任意适合的方式结合在一个或多个实施例中。本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在本申请的实施例中,上述过程的序号的大小并不意味着执行顺序的必然先后,多个过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在本申请的附图中的流程图和框图,图示了按照本申请实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现方案中,方框中所标注的功能也可以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,在此基于涉及的功能而确定。框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
与相关技术相比,本申请所提供的一种关系抽取方法,具有如下的效果:
1.本申请第一实施例提供一种关系抽取方法,包含:获取输入文本,并对所述输入文本进行编码,得到输入文本中中每个词的隐向量;对输入文本进行处理,得到用于表征输入句子内部不同的词与词之间连接关系所占权重的注意力矩阵;将隐向量与注意力矩阵输入预设的神经网络进行处理,得到神经网络的最终输出,通过预设的第一算法对最终输出进行计算得到整体向量;对整体向量进行分类转换处理,得到预测的关系类型。背景技术中的方法未能够动态利用词图之间词与词的连接,使得词图内潜在的噪音影响性能。而本方法提供的注意力模块对输入文本进行处理,输出了表征不同词之间对关系预测任务所占的不同权重的注意力矩阵,使得神经网络在对关系预测模型进行训练以及预测实体关系时,能够依据不同权重的连接来进行更加准确的预测,减少了对关系抽取任务影响较小的连接所占用的计算资源。可见,本申请实施例提供的关系抽取方法在提升了关系预测模型性能的同时,节省了计算成本以及时间成本。
2.本申请实施例提供的关系抽取方法中,将隐向量与注意力矩阵输入预设的神经网络进行处理,得到神经网络的最终输出,通过预设的第一算法对最终输出进行计算得到整体向量包括:对神经网络的最终输出使用MaxPooling算法计算得到第一实体向量表征、第二实体向量表征以及句子的向量表征;将第一实体向量表征、第二实体向量表征以及句子的向量表征串联,得到整体向量。通过MaxPooling算法对神经网络的最终输出进行计算,得到的第一实体向量表征、第二实体向量表征以及句子的向量表征作为中间变量,反映了实体或句子在关系抽取模型中所处不同位置的向量表征,便于后续对整体向量的计算。
3.本申请实施例提供的关系抽取方法中,将隐向量与注意力矩阵输入预设的神经网络进行处理包括:将隐向量作为神经网络的输入,通过预设的第二算法对输入进行多层处理,其中,每一层处理的输出作为下一层处理的输入的方式进行处理,且注意力矩阵参与指导每一层处理的运算,最后一层处理完之后得到的输出为最终输出,用于参与第一算法计算得到整体向量。经过神经网络的多层处理,输入文本中句法携带的上下文信息(即与当前词相连接的其他词)就增强了每个词的表征,利用了更远距离的上下文信息,使得参与第一算法的最终输出所表征的语义更加准确。
4.本申请实施例提供的关系抽取方法中,对输入文本进行处理得到注意力矩阵还包括以下步骤:将输入文本转换为多个n元组,多个n元组之间按照输入文本的语序排列;基于n元组,在n元组的词与词之间创建连接,并基于连接得到最终词图;将最终词图转化为对应的邻接矩阵;对邻接矩阵通过预设的第三算法计算得到注意力矩阵。背景技术中的方式是通过CYK算法来构建词图,时间复杂度为O(N
3),而本申请第一实施例提供的关系抽取方法中,是基于n元组来构建词图,其中,n元组中的n表示包含词的数量,只需对n元组中每个词遍历一遍即可,其时间复杂度为O(N)。可见,基于n元组来构建词图有效地降低了计算的时间复杂度,提高了词图构建的效率,降低了构建词图的成本。
5.本申请实施例提供的关系抽取方法中,将输入文本转换为多个n元组包含以下步骤:获取预设的n元组词表,通过n元组词表匹配输入文本中其他的n元组,得到多个n元组。通过n元组词表,将由传统意义上词与词组成的句子,转换成计算机或神经网络更容易识别或处理的,包含一个或多个词的n元组,基于n元组来构建词图,而不依赖依存句法分析工具,大幅降低了获取词图的成本。
6.本申请实施例提供的关系抽取方法中,基于连接得到最终词图包括以下步骤:基于n元组,在n元组内部的相邻词之间创建本地连接;在两个不同的n元组的首词与尾词之间两两创建全局连接;将本地连接与全局连接合并,得到 最终词图。本地连接和全局连接将n元组内部的词与n元组之间的词连接起来构建了最终词图,使得后续在通过神经网络处理向量时,能够动态利用词图之间词与词的连接,从而提高了预测关系的准确性。
7.本申请实施例提供的关系抽取方法中,创建全局连接的两个n元组之间包含的n元组个数不大于1。当创建全局连接的两个n元组之间包含的n元组个数过多,会使得形成的最终词图十分复杂,而且距离较远的n元组之间如果存在连接,则这种连接往往会引入噪音,从而增加模型识别的难度。而如果仅在相邻的n元组之间创建全局连接,这样会使得词与词之间得连接不充分,没有足够地利用上下文信息,从而会使得预测的结果准确性不高。因此,将创建全局连接的两个n元组之间包含的n元组个数设为不大于1,可在降低最终词图的复杂性的同时,保证预测结果的准确度。
8.本申请实施例提供的关系抽取方法中,对整体向量进行分类转换处理包含以下步骤:将整体向量经过预设的全连接层后,送入预设的SoftMax分类器,得到预测的关系类型。全连接层和SoftMax分类器可将整体向量中包含的不同连接的权重信息可视化并与预设的模板进行匹配,从而能够更加方便地预测出实体之间的关系类型。
9.本申请实施例还提供一种关系抽取装置,具有与上述一种关系抽取方法相同的效果,在此不做赘述。
10.本申请实施例还提供一种计算机设备,具有与上述一种关系抽取方法相同的效果,在此不做赘述。
11.本申请实施例还提供一种计算机程序产品,具有与上述一种关系抽取方法相同的效果,在此不做赘述。
Claims (12)
- 一种关系抽取方法,包括:获取输入文本,并对所述输入文本进行编码,得到所述输入文本中每个词的隐向量;对所述输入文本进行处理,得到用于表征所述输入文本内部不同的词与词之间连接关系所占权重的注意力矩阵;将所述隐向量与所述注意力矩阵输入预设的神经网络进行处理,得到所述神经网络的最终输出,通过预设的第一算法对所述最终输出进行计算得到整体向量;对所述整体向量进行分类转换处理,得到预测的关系类型。
- 如权利要求1所述的方法,其中,通过预设的第一算法对所述最终输出进行计算得到整体向量,包括:对所述神经网络的最终输出使用MaxPooling算法计算得到第一实体向量表征、第二实体向量表征以及句子的向量表征;将所述第一实体向量表征、所述第二实体向量表以及所述句子的向量表征串联,得到所述整体向量。
- 如权利要求1所述的方法,其中,将每个词的隐向量与所述注意力矩阵输入预设的神经网络进行处理,包括:将所述隐向量作为所述神经网络的输入,通过预设的第二算法对所述输入进行多层处理,其中,每一层处理的输出作为下一层处理的输入,且所述注意力矩阵参与指导每一层处理的运算,最后一层处理完之后得到的输出为所述最终输出。
- 如权利要求1所述的方法,其中,对所述输入文本进行处理,得到用于表征所述输入文本内部不同的词与词之间连接关系所占权重的注意力矩阵,包括:将所述输入文本转换为多个n元组,所述多个n元组之间按照所述输入文本的语序排列;基于所述n元组,在n元组的词与词之间创建连接,并基于所述连接得到最终词图;将所述最终词图转化为邻接矩阵;对所述邻接矩阵通过预设的第三算法计算得到所述注意力矩阵。
- 如权利要求4所述的方法,其中,将所述输入文本转换为多个n元组,包括:获取预设的n元组词表,通过所述n元组词表匹配所述输入文本中的n元组,得到所述多个n元组。
- 如权利要求4所述的方法,其中,基于所述连接得到最终词图,包括:基于所述n元组,在所述n元组内部的相邻词之间创建本地连接;在两个不同的n元组的首词与尾词之间两两创建全局连接;将所述本地连接与所述全局连接合并,得到所述最终词图。
- 如权利要求6所述的方法,其中,创建所述全局连接的两个n元组之间包含的n元组个数不大于1。
- 如权利要求1所述的方法,其中,对所述整体向量进行分类转换处理,得到预测的关系类型,包括:将所述整体向量经过预设的全连接层后,送入预设的SoftMax分类器,得到所述预测的关系类型。
- 一种关系抽取装置,包括:第一模块,设置为获取输入文本,并对所述输入文本进行编码,得到所述输入文本中每个词的隐向量;第二模块,设置为对所述输入文本进行处理,得到用于表征所述输入文本内部不同的词与词之间连接关系所占权重的注意力矩阵;第三模块,设置为将所述隐向量与所述注意力矩阵输入预设的神经网络进行处理,得到所述神经网络的最终输出,通过预设的第一算法对所述最终输出进行计算得到整体向量;第四模块,设置为对所述整体向量进行分类转换处理,得到预测的关系类型。
- 一种计算机设备,包括处理器、存储器以及存储在所述存储器上的计算机程序,所述处理器执行上述计算机程序以实现权利要求1-8任一项所述的关系抽取方法。
- 一种计算机程序产品,包括计算机程序指令,所述计算机程序指令被执行时实现如权利要求1-8任一项所述的关系抽取方法。
- 一种计算机存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-8任一项所述的关系抽取方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210911110.8 | 2022-07-29 | ||
CN202210911110.8A CN115392219A (zh) | 2022-07-29 | 2022-07-29 | 一种关系抽取方法、计算机设备及程序产品 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024021334A1 true WO2024021334A1 (zh) | 2024-02-01 |
Family
ID=84118839
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/127698 WO2024021334A1 (zh) | 2022-07-29 | 2022-10-26 | 关系抽取方法、计算机设备及程序产品 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115392219A (zh) |
WO (1) | WO2024021334A1 (zh) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200134422A1 (en) * | 2018-10-29 | 2020-04-30 | International Business Machines Corporation | Relation extraction from text using machine learning |
CN112163426A (zh) * | 2020-09-30 | 2021-01-01 | 中国矿业大学 | 一种基于注意力机制与图长短时记忆神经网络结合的关系抽取方法 |
WO2021159762A1 (zh) * | 2020-09-08 | 2021-08-19 | 平安科技(深圳)有限公司 | 数据关系抽取方法、装置、电子设备及存储介质 |
CN113468874A (zh) * | 2021-06-09 | 2021-10-01 | 大连理工大学 | 一种基于图卷积自编码的生物医学关系抽取方法 |
CN113505240A (zh) * | 2021-07-09 | 2021-10-15 | 吉林大学 | 一种基于注意力引导图lstm关系提取方法及装置 |
CN114722820A (zh) * | 2022-03-21 | 2022-07-08 | 河海大学 | 基于门控机制和图注意力网络的中文实体关系抽取方法 |
-
2022
- 2022-07-29 CN CN202210911110.8A patent/CN115392219A/zh active Pending
- 2022-10-26 WO PCT/CN2022/127698 patent/WO2024021334A1/zh unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200134422A1 (en) * | 2018-10-29 | 2020-04-30 | International Business Machines Corporation | Relation extraction from text using machine learning |
WO2021159762A1 (zh) * | 2020-09-08 | 2021-08-19 | 平安科技(深圳)有限公司 | 数据关系抽取方法、装置、电子设备及存储介质 |
CN112163426A (zh) * | 2020-09-30 | 2021-01-01 | 中国矿业大学 | 一种基于注意力机制与图长短时记忆神经网络结合的关系抽取方法 |
CN113468874A (zh) * | 2021-06-09 | 2021-10-01 | 大连理工大学 | 一种基于图卷积自编码的生物医学关系抽取方法 |
CN113505240A (zh) * | 2021-07-09 | 2021-10-15 | 吉林大学 | 一种基于注意力引导图lstm关系提取方法及装置 |
CN114722820A (zh) * | 2022-03-21 | 2022-07-08 | 河海大学 | 基于门控机制和图注意力网络的中文实体关系抽取方法 |
Also Published As
Publication number | Publication date |
---|---|
CN115392219A (zh) | 2022-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022237013A1 (zh) | 基于实体关系联合抽取的法律知识图谱构建方法及设备 | |
CN111090461B (zh) | 一种基于机器翻译模型的代码注释生成方法 | |
CN112633010B (zh) | 基于多头注意力和图卷积网络的方面级情感分析方法及系统 | |
WO2017092380A1 (zh) | 用于人机对话的方法、神经网络系统和用户设备 | |
CN113779996B (zh) | 基于BiLSTM模型的标准实体文本确定方法、装置及存储介质 | |
WO2023226292A1 (zh) | 从文本中进行关系抽取的方法、关系抽取模型及介质 | |
CN115455171B (zh) | 文本视频的互检索以及模型训练方法、装置、设备及介质 | |
CN115204143B (zh) | 一种基于prompt的文本相似度计算方法及系统 | |
CN114676687A (zh) | 基于增强语义句法信息的方面级情感分类方法 | |
CN115563314A (zh) | 多源信息融合增强的知识图谱表示学习方法 | |
CN115526236A (zh) | 一种基于多模态对比学习的文本网络图分类方法 | |
CN113918730A (zh) | 一种知识图谱关系补全方法 | |
CN113255360A (zh) | 基于层次化自注意力网络的文档评级方法和装置 | |
CN117540035B (zh) | 一种基于实体类型信息融合的rpa知识图谱构建方法 | |
CN112559741B (zh) | 核电设备缺陷记录文本分类方法、系统、介质及电子设备 | |
KR20210125449A (ko) | 업계 텍스트를 증분하는 방법, 관련 장치 및 매체에 저장된 컴퓨터 프로그램 | |
CN112528003B (zh) | 一种基于语义排序和知识修正的多项选择问答方法 | |
CN114238636A (zh) | 一种基于翻译匹配的跨语言属性级情感分类方法 | |
CN114169447A (zh) | 基于自注意力卷积双向门控循环单元网络的事件检测方法 | |
CN111382333B (zh) | 基于案件相关性联合学习与图卷积的新闻文本句中案件要素抽取方法 | |
WO2023103914A1 (zh) | 文本情感分析方法、装置及计算机可读存储介质 | |
WO2024021334A1 (zh) | 关系抽取方法、计算机设备及程序产品 | |
CN114579605B (zh) | 表格问答数据处理方法、电子设备及计算机存储介质 | |
WO2022227196A1 (zh) | 一种数据分析方法、装置、计算机设备及存储介质 | |
CN113988083B (zh) | 一种用于航运新闻摘要生成的事实性信息编码与评估方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22952772 Country of ref document: EP Kind code of ref document: A1 |