Entity relation joint extraction method and system based on convolution feature sharing
Through the convolution feature sharing method, the problem of insufficient feature misclassification and sub-task interaction in entity relationship extraction is solved, the accuracy of entity and relationship extraction and model expression ability are improved, and the two-way interaction between entities and relationships is realized.
Patent Information
- Application Number
- CN202411152567.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-06
AI Technical Summary
The prior art has problems of misclassification of features and insufficient interaction between sub-tasks in entity relationship extraction, resulting in error propagation and overlapping features, affecting the accuracy of entity recognition and relationship extraction.
Using a method based on convolution feature sharing, the feature representation of entities and relationships is obtained through multi-layer perceptrons, and a shared feature is obtained by combining one-dimensional and two-dimensional convolutions to construct an intersection attention score matrix to realize two-way interaction between entities and relationships. Improve the performance of subtasks.
It significantly improves the accuracy of entity and relationship extraction, avoids misclassification of features, enhances the model's expression ability and text understanding ability, and improves the interaction effect of sub-tasks.
Smart Images

Figure CN119089904A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of artificial intelligence technology and natural language processing technology, and in particular to a method and system for jointly extracting entity relationships based on convolutional feature sharing. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] With the rapid development of Internet technology, the amount of data that people need to process has increased dramatically, especially in the field of data information processing such as artificial intelligence. How to quickly and efficiently extract entities and the relationship information between entities from text has become an important problem that needs to be solved urgently. In the field of Internet information processing, entities often refer to a collection that can indicate a certain type of specific things. They can be specific people, things, or abstract concepts, connections, etc. Entity relationship extraction is a core task for information extraction from unstructured data. Its main goal is to simultaneously detect entities from text and identify the semantic relationship between entity pairs. It is widely used in knowledge graph construction, information retrieval, dialogue generation, and question-answering systems.
[0004] Joint entity relationship extraction is a key link in the information extraction task. It includes two subtasks: named entity extraction (NER) and relation extraction (RE). Although the current joint extraction has made some progress, there are still problems such as feature misclassification and insufficient interaction between subtasks. Specifically, the existing methods will have problems of error propagation and exposure bias in the process of relationship extraction; the errors generated in named entity recognition will directly affect relationship extraction; when obtaining shared features, there will be problems such as feature overlap or feature misclassification, that is, when obtaining a certain feature, some features of other categories will be mixed; there is insufficient interaction between the two subtasks. The existing joint models have made some progress, but there are still certain limitations. These methods only focus on using entity information to help with relationship extraction, ignoring that relationship information can also be helpful for entity recognition, or only use a small amount of local relationship information to help entity recognition. Summary of the invention
[0005] The embodiments of the present invention provide a method and system for joint extraction of entity relationships based on convolutional feature sharing, so as to solve the problems of feature misclassification and insufficient sub-task interaction in existing solutions.
[0006] According to a first aspect of an embodiment of the present invention, a method for jointly extracting entity relationships based on convolutional feature sharing is provided, comprising:
[0007] For the text data to be extracted from entity relations, a contextual semantic representation of the text data is obtained based on a preset encoder;
[0008] Based on the contextual semantic representation of text data, feature interaction between entity extraction and relationship extraction tasks is performed through a convolutional feature sharing module to obtain entity extraction features and relationship extraction features; wherein the convolutional feature sharing module specifically performs the following processing procedures: based on a multi-layer perceptron, a first feature representation for entity recognition and a second feature representation for relationship extraction are respectively obtained; based on the first feature representation, the second feature representation and a pre-constructed relative position matrix, a splicing feature is constructed, based on the splicing feature, a third feature representation is obtained by using a one-dimensional convolution, and a fourth feature representation of entities and relationships is obtained by using a two-dimensional convolution; based on the weighted fusion of the third feature representation and the fourth feature representation, a shared feature matrix for entity extraction and relationship extraction is obtained; based on the shared feature matrix, a cross-attention score matrix is constructed, and the cross-attention score matrix is integrated into the first feature representation and the second feature representation to obtain the entity recognition feature and the relationship recognition feature after interaction;
[0009] Based on the entity recognition features, relationship recognition features, shared feature matrix and cross-attention score matrix, a preset classifier is used to realize the joint extraction of entity relationships.
[0010] Furthermore, based on the splicing features, one-dimensional convolution is used to obtain the third feature representation, and two-dimensional convolution is used to obtain the fourth feature representation of entities and relationships. Specifically, based on the splicing features, one-dimensional convolution is used to capture the surface semantic features and display features of entities and relationships; based on two-dimensional convolution, deep contextual relationships and potential features of entities and relationships are captured.
[0011] Furthermore, the cross-attention score matrix is constructed based on the shared feature matrix, specifically: based on the shared feature matrix, a feedforward neural network and a softmax activation function are used to obtain the attention weights from the relationship to the entity and the attention weights from the entity to the relationship, thereby realizing the construction of the cross-attention score matrix.
[0012] Furthermore, the cross attention score matrix is integrated into the first feature representation and the second feature representation to obtain the entity recognition feature and the relationship recognition feature after interaction, which is specifically expressed as follows:
[0013]
[0014]
[0015] in, is the element in the first eigenrepresentation, is the element in the second characteristic representation, γ ij is the correlation between the feature representation at named entity i and the feature representation at relation j, δ ijis the correlation between the feature representation at relation i and the feature representation at named entity j, Elements in the entity recognition feature, Identify elements in a feature for a relationship.
[0016] Furthermore, based on the entity recognition features, relationship recognition features, shared feature matrix and cross-attention score matrix, a preset classifier is used to realize the joint extraction of entity relationships, specifically: based on the entity recognition features and the shared feature matrix, an entity extraction result is obtained using a preset classifier; based on the relationship recognition features and the cross-attention score matrix, a preset classifier is used to obtain a relationship extraction result.
[0017] Furthermore, the entity-relationship joint extraction method regards the named entity recognition and relationship extraction tasks as multi-label classification tasks, and uses binary cross entropy as the loss function of the classification task.
[0018] Furthermore, the preset encoder adopts a BRET model.
[0019] According to a second aspect of an embodiment of the present invention, a system for joint extraction of entity relations based on convolutional feature sharing is provided, comprising:
[0020] A context feature extraction unit, which is used to obtain context semantic representation of text data based on a preset encoder for text data to be extracted from entity relationships;
[0021] A convolutional feature sharing unit, which is used to perform feature interaction between entity extraction and relationship extraction tasks based on the contextual semantic representation of text data through a convolutional feature sharing module to obtain entity extraction features and relationship extraction features; wherein the convolutional feature sharing module specifically performs the following processing procedures: based on a multi-layer perceptron, a first feature representation for entity recognition and a second feature representation for relationship extraction are respectively obtained; based on the first feature representation, the second feature representation and a pre-constructed relative position matrix, a splicing feature is constructed, based on the splicing feature, a third feature representation is obtained by using a one-dimensional convolution, and a fourth feature representation of entities and relationships is obtained by using a two-dimensional convolution; based on the weighted fusion of the third feature representation and the fourth feature representation, a shared feature matrix for entity extraction and relationship extraction is obtained; based on the shared feature matrix, a cross-attention score matrix is constructed, and the cross-attention score matrix is integrated into the first feature representation and the second feature representation to obtain the entity recognition feature and the relationship recognition feature after interaction;
[0022] An entity relationship joint extraction unit is used to realize the joint extraction of entity relationships based on the entity identification features, relationship identification features, shared feature matrix and cross-attention score matrix using a preset classifier.
[0023] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising a memory, a processor, and a computer program stored and running on the memory, wherein when the processor executes the program, the method for joint extraction of entity relationships based on convolutional feature sharing is implemented.
[0024] According to a fourth aspect of an embodiment of the present invention, a non-transitory computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for joint extraction of entity relationships based on convolutional feature sharing is implemented.
[0025] One or more of the above technical solutions have the following beneficial effects:
[0026] (1) The present invention provides a method and system for joint extraction of entity relationships based on convolutional feature sharing, which effectively solves the problems of feature misclassification and insufficient sub-task interaction in existing schemes. The scheme realizes two-way interaction between entities and relationships based on a constructed feature sharing module through convolutional feature sharing, thereby significantly improving the performance of the two sub-tasks.
[0027] (2) The scheme uses two independent multi-layer perceptrons to extract the feature representation of entity relationships, which effectively avoids the occurrence of feature misclassification. In addition, by combining one-dimensional and two-dimensional convolutions to obtain shared features, the model's expressive power and text comprehension capabilities are enhanced.
[0028] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0030] Figure 1 It is a flow chart of a method for joint extraction of entity relations based on convolutional feature sharing described in an embodiment of the present invention;
[0031] Figure 2 This is a schematic diagram of the network model framework structure adopted by the entity relationship joint extraction method based on convolutional feature sharing described in an embodiment of the present invention. DETAILED DESCRIPTION
[0032] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0033] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.
[0034] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0035] like Figure 1 As shown, the embodiment of the present invention provides a method for joint extraction of entity relationships based on convolutional feature sharing, which specifically includes the following processing procedures:
[0036] Step 1: For the text data to be extracted from entity relationships, obtain the contextual semantic representation of the text data based on the preset encoder;
[0037] In the specific implementation, the preset encoder uses BERT as an encoder to process the input text. For example, a sentence Z containing K tokens is input into the encoding module, and the text is preprocessed by BERT to capture the contextual semantic relationship in the sentence, thereby generating the context embedding C we need, as shown in the following formula.
[0038] C=BERT(Z)
[0039] Step 2: Based on the contextual semantic representation of text data, feature interaction between entity extraction and relationship extraction tasks is performed through a convolutional feature sharing module to obtain entity extraction features and relationship extraction features; wherein the convolutional feature sharing module specifically performs the following processing procedures: based on a multi-layer perceptron, a first feature representation for entity recognition and a second feature representation for relationship extraction are respectively obtained; based on the first feature representation, the second feature representation and a pre-constructed relative position matrix, a splicing feature is constructed, based on the splicing feature, a third feature representation is obtained by using a one-dimensional convolution, and a fourth feature representation of entities and relationships is obtained by using a two-dimensional convolution; based on the weighted fusion of the third feature representation and the fourth feature representation, a shared feature matrix for entity extraction and relationship extraction is obtained; based on the shared feature matrix, a cross-attention score matrix is constructed, and the cross-attention score matrix is integrated into the first feature representation and the second feature representation to obtain the entity recognition feature and the relationship recognition feature after interaction;
[0040] In a specific implementation, based on the splicing features, one-dimensional convolution is used to obtain the third feature representation, and two-dimensional convolution is used to obtain the fourth feature representation of entities and relationships. Specifically, based on the splicing features, one-dimensional convolution is used to capture the surface semantic features and display features of entities and relationships; based on two-dimensional convolution, deep contextual relationships and potential features of entities and relationships are captured.
[0041] In a specific implementation, the cross-attention score matrix is constructed based on the shared feature matrix, specifically: based on the shared feature matrix, a feedforward neural network and a softmax activation function are used to obtain the attention weights from the relationship to the entity and the attention weights from the entity to the relationship, thereby realizing the construction of the cross-attention score matrix.
[0042] In a specific implementation, the cross attention score matrix is integrated into the first feature representation and the second feature representation to obtain entity recognition features and relationship recognition features, which are specifically expressed as follows:
[0043]
[0044]
[0045] in, is the element in the first eigenrepresentation, is the element in the second characteristic representation, γ ij is the correlation between the feature representation at named entity i and the feature representation at relation j, δ ij is the correlation between the feature representation at relation i and the feature representation at named entity j, Elements in the entity recognition feature, Identify elements in a feature for a relationship.
[0046] Specifically, named entity recognition (NER) and relation extraction (RE) tasks require different contextual representations for entity recognition and relation extraction. For NER tasks, vocabulary-level features may be more emphasized, while for RE tasks, contextual representations between entity ranges may be more important. If shared features between the two subtasks are directly obtained to meet these requirements, feature misclassification may occur. The feature sharing module of the CSFRE network model can effectively avoid this problem. First, the model adopts a parallel encoding method, that is, two different multi-layer perceptrons (MLPs) are used to obtain specific feature representations for the two subtasks of named entity recognition and relation extraction, respectively, which can effectively avoid feature misclassification.
[0047] C NER =MLP NER (C)
[0048] C RE =MLP RE (C)
[0049] Among them, C NER represents the named entity feature representation, C RE Represents the relationship feature representation.
[0050] To capture the semantic relationship between word vectors in space, we embed a relative position matrix D to obtain the relative distance between word vectors. We then combine the specific representations of the NER and RE tasks with the relative position matrix D as the input of the convolutional layer. Inspired by the PFN (Partition Filter Network) model, we introduce a feature sharing mechanism that can pass valuable information to each subtask, thereby improving the performance of the subtasks. In the shared feature module, we use one-dimensional convolution to capture the surface semantic features and explicit features of entities and relations. We use two-dimensional convolution to capture the deep contextual relationships and latent features of entities and relations. Finally, we perform weighted fusion on the results after one-dimensional convolution and two-dimensional convolution to obtain the shared feature matrix of the two subtasks.
[0051] G=[C NER ; C RE ; D]
[0052] C share =α·Conv1d(G)+β·Conv2d(G)
[0053] Where G represents the concatenation of named entity, relation and position matrix features. α and β are weight coefficients that can be adjusted through training. represents the shared feature matrix obtained after convolution. We use the cross-attention score matrix obtained by feedforward neural network (FN) and softmax activation function.
[0054] CA=FN(C share )
[0055] γ=softmax(CA)
[0056] β=softmax(CA T )
[0057] Among them, γ represents the attention weight from entity to relation, that is, it represents the importance of relation features to entities. δ represents the attention weight from relation to entity, that is, it represents the importance of entity features to relations. Next, we use the shared feature mechanism to realize the interaction between the two subtasks, and then integrate the interaction results into the initial features.
[0058] Step 3: Based on the entity recognition features, relationship recognition features, shared feature matrix and cross-attention score matrix, a preset classifier is used to realize the joint extraction of entity relationships.
[0059] In a specific implementation, the entity recognition features, relationship recognition features, shared feature matrix and cross-attention score matrix are based on a preset classifier to achieve joint extraction of entity relationships, specifically: based on the entity recognition features and the shared feature matrix, an entity extraction result is obtained using a preset classifier; based on the relationship recognition features and the cross-attention score matrix, a relationship extraction result is obtained using a preset classifier.
[0060] In the specific implementation, the preset classifier includes two parts: named entity recognition and relationship extraction. The role of the classifier is to convert these two subtasks into table filling problems to solve. For named entity recognition and relationship extraction tasks, two-dimensional tables can be used to represent entity labels and relationship labels. In the named entity recognition task, the model can identify the entity span in the sentence. In the relationship extraction task, the model only needs to identify the head word of the entity without classifying the entire entity. We combine the feature representation of named entities and relationships with shared features and use them as input for named entity recognition and relationship extraction tasks.
[0061]
[0062]
[0063] in, Belongs to C share .
[0064] Predict word pairs (z i ,z j ) is of type e. The conditional probability is P(e|z i ,z j ), the probability of predicting the relationship type r for the same word pair is P(r|z i ,z j ). The calculation process of the above operation is as follows:
[0065]
[0066]
[0067] Among them, M and b are parameters that can be continuously adjusted through learning, and σ(·) is the activation function.
[0068] Next, the named entity recognition and relation extraction tasks are considered as multi-label classification tasks, and then the binary cross entropy is used as the loss function of the classification task. The calculation process is as follows:
[0069]
[0070]
[0071] In the above formula is the indicator function.
[0072] The loss function of this model is is the loss function of the named entity recognition task And the relation extraction loss function The sum of the results can be used to fine-tune the entire model by adjusting the loss function. The calculation process is as follows:
[0073]
[0074] like Figure 2 The figure shows a schematic diagram of the network model structure adopted in this embodiment.
[0075] In the specific implementation, the partial matching model is used to evaluate the NYT dataset and the WebNLG dataset, and only the tail words of the entities in the annotated dataset are used. For the SciERC, ACE04, and ACE05 datasets, a strict matching strategy is used, in which the complete part of the annotated entity is considered. In order to ensure a fair comparison with existing methods, BERT is used for the NYT and WebNLG datasets, SciBERT is used for the SciERC dataset, and finally ALBERT is used to process the ACE04 and ACE05 datasets. To ensure the feasibility of the experiment, the model is run three times on each dataset using different random seeds, and the average of the three runs is reported as the final result.
[0076] This example calculates the Micro-F1 scores for NER and RE respectively. Specifically, for NER evaluation, we only consider an entity’s type and boundary to be correct. For regularization, we consider the predicted entity-relation triplet to be correct only when the type, boundary, and relation type match.
[0077] We compare the CSFRE model with other baseline models and the experimental results are shown in Table 1.
[0078] Table 1 Performance comparison on NYT, WebNLG, ACE04, ACE05 and SciERC datasets. (PM = pre-trained model, BE, ALBR, SciBE refer to Bert, ALBert, SCIBert respectively).
[0079]
[0080] In one or more implementations, the embodiment of the present invention corresponds to the above-mentioned entity relationship joint extraction method based on convolutional feature sharing, and provides an entity relationship joint extraction system based on convolutional feature sharing, including:
[0081] A context feature extraction unit, which is used to obtain context semantic representation of text data based on a preset encoder for text data to be extracted from entity relationships;
[0082] A convolutional feature sharing unit, which is used to perform feature interaction between entity extraction and relationship extraction tasks based on the contextual semantic representation of text data through a convolutional feature sharing module to obtain entity extraction features and relationship extraction features; wherein the convolutional feature sharing module specifically performs the following processing procedures: based on a multi-layer perceptron, a first feature representation for entity recognition and a second feature representation for relationship extraction are respectively obtained; based on the first feature representation, the second feature representation and a pre-constructed relative position matrix, a splicing feature is constructed, based on the splicing feature, a third feature representation is obtained by using a one-dimensional convolution, and a fourth feature representation of entities and relationships is obtained by using a two-dimensional convolution; based on the weighted fusion of the third feature representation and the fourth feature representation, a shared feature matrix for entity extraction and relationship extraction is obtained; based on the shared feature matrix, a cross-attention score matrix is constructed, and the cross-attention score matrix is integrated into the first feature representation and the second feature representation to obtain the entity recognition feature and the relationship recognition feature after interaction;
[0083] An entity relationship joint extraction unit is used to realize the joint extraction of entity relationships based on the entity identification features, relationship identification features, shared feature matrix and cross-attention score matrix using a preset classifier.
[0084] It can be understood that the system described in this embodiment corresponds to the method described in the above embodiment, and its technical details have been described in detail in Embodiment 1 and will not be repeated here.
[0085] In further embodiments, there is also provided:
[0086] An electronic device includes a memory and a processor and computer instructions stored in the memory and executed on the processor, wherein the computer instructions, when executed by the processor, perform the method described in the above embodiment. For the sake of brevity, no further description is given here.
[0087] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0088] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0089] A computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the method described in the above embodiment is completed.
[0090] The method in the above embodiment can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
[0091] Those skilled in the art will appreciate that the units, i.e., algorithm steps, of the various examples described in the present embodiment can be implemented in electronic hardware or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0092] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for joint extraction of entity relations based on convolutional feature sharing, characterized in that: include: For the text data to be extracted from entity relations, a contextual semantic representation of the text data is obtained based on a preset encoder; Based on the contextual semantic representation of text data, feature interaction between entity extraction and relationship extraction tasks is performed through a convolutional feature sharing module to obtain entity extraction features and relationship extraction features; wherein the convolutional feature sharing module specifically performs the following processing procedures: based on a multi-layer perceptron, a first feature representation for entity recognition and a second feature representation for relationship extraction are respectively obtained; based on the first feature representation, the second feature representation and a pre-constructed relative position matrix, a splicing feature is constructed, based on the splicing feature, a third feature representation is obtained by using a one-dimensional convolution, and a fourth feature representation of entities and relationships is obtained by using a two-dimensional convolution; based on the weighted fusion of the third feature representation and the fourth feature representation, a shared feature matrix for entity extraction and relationship extraction is obtained; based on the shared feature matrix, a cross-attention score matrix is constructed, and the cross-attention score matrix is integrated into the first feature representation and the second feature representation to obtain the entity recognition feature and the relationship recognition feature after interaction; Based on the entity recognition features, relationship recognition features, shared feature matrix and cross-attention score matrix, a preset classifier is used to realize the joint extraction of entity relationships.
2. The entity relationship joint extraction method based on convolutional feature sharing according to claim 1, characterized in that: The third feature representation is obtained based on the splicing features by using one-dimensional convolution, and the fourth feature representation of entities and relationships is obtained by using two-dimensional convolution. Specifically, based on the splicing features, the surface semantic features and display features of entities and relationships are captured by one-dimensional convolution; and the deep contextual relationships and potential features of entities and relationships are captured based on two-dimensional convolution.
3. The entity relationship joint extraction method based on convolutional feature sharing according to claim 1, characterized in that: The cross-attention score matrix is constructed based on the shared feature matrix, specifically: based on the shared feature matrix, a feedforward neural network and a softmax activation function are used to obtain the attention weights from the relationship to the entity and the attention weights from the entity to the relationship, so as to realize the construction of the cross-attention score matrix.
4. The entity relationship joint extraction method based on convolutional feature sharing according to claim 1, characterized in that: The cross attention score matrix is integrated into the first feature representation and the second feature representation to obtain the entity recognition feature and the relationship recognition feature after interaction, which is specifically expressed as follows: in, is the element in the first eigenrepresentation, is the element in the second characteristic representation, γ ij is the correlation between the feature representation at named entity i and the feature representation at relation j, δ ij is the correlation between the feature representation at relation i and the feature representation at named entity j, Elements in the entity recognition feature, Identify elements in a feature for a relationship.
5. The entity relationship joint extraction method based on convolutional feature sharing according to claim 1, characterized in that: The joint extraction of entity relationships is achieved based on the entity recognition features, relationship recognition features, shared feature matrix and cross-attention score matrix using a preset classifier, specifically: based on the entity recognition features and the shared feature matrix, an entity extraction result is obtained using a preset classifier; based on the relationship recognition features and the cross-attention score matrix, a relationship extraction result is obtained using a preset classifier.
6. The entity relationship joint extraction method based on convolutional feature sharing according to claim 1, characterized in that: The entity-relation joint extraction method regards the named entity recognition and relationship extraction tasks as multi-label classification tasks, and uses binary cross entropy as the loss function of the classification task.
7. The entity relationship joint extraction method based on convolutional feature sharing according to claim 1, characterized in that: The preset encoder adopts the BRET model.
8. A joint entity relationship extraction system based on convolutional feature sharing, characterized in that: include: A context feature extraction unit, which is used to obtain context semantic representation of text data based on a preset encoder for text data to be extracted from entity relationships; A convolutional feature sharing unit, which is used to perform feature interaction between entity extraction and relationship extraction tasks based on the contextual semantic representation of text data through a convolutional feature sharing module to obtain entity extraction features and relationship extraction features; wherein the convolutional feature sharing module specifically performs the following processing procedures: based on a multi-layer perceptron, a first feature representation for entity recognition and a second feature representation for relationship extraction are respectively obtained; based on the first feature representation, the second feature representation and a pre-constructed relative position matrix, a splicing feature is constructed, based on the splicing feature, a third feature representation is obtained by using a one-dimensional convolution, and a fourth feature representation of entities and relationships is obtained by using a two-dimensional convolution; based on the weighted fusion of the third feature representation and the fourth feature representation, a shared feature matrix for entity extraction and relationship extraction is obtained; based on the shared feature matrix, a cross-attention score matrix is constructed, and the cross-attention score matrix is integrated into the first feature representation and the second feature representation to obtain the entity recognition feature and the relationship recognition feature after interaction; An entity relationship joint extraction unit is used to realize the joint extraction of entity relationships based on the entity identification features, relationship identification features, shared feature matrix and cross-attention score matrix using a preset classifier.
9. An electronic device comprising a memory, a processor and a computer program stored and running on the memory, characterized in that: When the processor executes the program, it implements a method for joint extraction of entity relationships based on convolutional feature sharing as described in any one of claims 1-7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a method for joint extraction of entity relationships based on convolutional feature sharing as described in any one of claims 1 to 7 is implemented.
