CN110457677B - Entity relationship identification method and device, storage medium and computer equipment - Google Patents
Entity relationship identification method and device, storage medium and computer equipment Download PDFInfo
- Publication number
- CN110457677B CN110457677B CN201910559111.9A CN201910559111A CN110457677B CN 110457677 B CN110457677 B CN 110457677B CN 201910559111 A CN201910559111 A CN 201910559111A CN 110457677 B CN110457677 B CN 110457677B
- Authority
- CN
- China
- Prior art keywords
- entity
- training sample
- entity relationship
- text
- preset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/36—Creation of semantic tools, e.g. ontology or thesauri
- G06F16/367—Ontology
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Mathematical Physics (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Evolutionary Computation (AREA)
- Software Systems (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Animal Behavior & Ethology (AREA)
- Character Discrimination (AREA)
- Machine Translation (AREA)
Abstract
The application discloses a method and a device for identifying entity relationships, a storage medium and computer equipment, relates to the technical field of information processing, and can effectively improve the accuracy of identifying entity relationships. The method comprises the following steps: obtaining a text vector of the text to be recognized according to the obtained text to be recognized by utilizing a preset first entity relation recognition model; obtaining a convolution operation result of a text vector according to the text vector of the text to be identified; determining entity relations contained in the text to be identified according to the text vectors and the obtained convolution operation results; the preset first entity relation recognition model is obtained based on a trusted training sample set. The method is suitable for identifying the text entity relationship.
Description
Technical Field
The present application relates to the field of information processing technologies, and in particular, to a method and apparatus for identifying entity relationships, a storage medium, and a computer device.
Background
Along with the development of science and technology, more and more methods for identifying the relationships between words are used, and the applicable scenes are also more and more extensive, such as the upper and lower relationships between some place names, the hierarchical relationships between national institutions, the containing relationships of article types and the like, which require training a neural network by using a large amount of sample data, so as to establish a corresponding identification model to realize extraction of the relationships (i.e., entity relationships) between the words and the words in the text.
The prior art has the defects that a training sample set can be effectively constructed based on remote supervision so as to realize training of the recognition model, but the training sample set is easy to mix with an incorrect training sample in the construction process, so that the recognition accuracy of the recognition model obtained through later training is greatly influenced, the accuracy of the trained recognition model on the text extraction entity relationship is lower, and the use experience of a user is influenced.
Disclosure of Invention
In view of this, the application provides a method and a device for identifying entity relationships, a storage medium and a computer device, and mainly aims to solve the technical problem that the accuracy of an identification model after training on text extraction entity relationships is low due to the fact that an error training sample is easy to mix in when a training sample is built based on remote supervision at present.
According to an aspect of the present application, there is provided a method of entity relationship identification, the method comprising:
obtaining a text vector of the text to be recognized according to the obtained text to be recognized by utilizing a preset first entity relation recognition model;
obtaining a convolution operation result of a text vector according to the text vector of the text to be identified;
determining entity relations contained in the text to be identified according to the text vectors and the obtained convolution operation results;
the preset first entity relation recognition model is obtained based on a trusted training sample set.
According to another aspect of the present application, there is provided an entity relationship recognition apparatus, comprising:
the acquisition module is used for acquiring a text vector of the text to be identified according to the acquired text to be identified by utilizing a preset first entity relation identification model;
the convolution operation module is used for obtaining a convolution operation result of the text vector according to the text vector of the text to be recognized;
the entity relation module is used for determining entity relation contained in the text to be identified according to the text vector and the obtained convolution operation result;
the preset first entity relation recognition model is obtained based on a trusted training sample set.
According to still another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described entity relationship identification method.
According to still another aspect of the present application, there is provided a computer device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, the processor implementing the above-mentioned entity relationship identification method when executing the program.
By means of the technical scheme, the entity relation recognition method, the entity relation recognition device, the storage medium and the computer equipment provided by the application are compared with a training sample set which is constructed based on remote supervision and is easy to mix with an error training sample at present, and further compared with a recognition model which is obtained through training and is used for extracting an entity relation from a text and has lower accuracy, the entity relation recognition method, the entity relation recognition device and the computer equipment are used for obtaining a text vector of the text to be recognized according to the obtained text to be recognized, obtaining a convolution operation result of the text vector according to the obtained text vector of the text to be recognized and determining an entity relation contained in the text to be recognized according to the text vector and the obtained convolution operation result, wherein the preset first entity relation recognition model is obtained through training based on a trusted training sample set, and therefore, the recognition accuracy of the entity relation can be effectively improved through the preset first entity relation recognition model obtained through training based on a high-quality trusted training sample set.
The foregoing description is only an overview of the present application, and is intended to be implemented in accordance with the teachings of the present application in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present application more readily apparent.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
fig. 1 is a schematic flow chart of an entity relationship identification method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of another method for identifying entity relationships according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an entity relationship recognition device according to an embodiment of the present application.
Detailed Description
The application will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other.
The method aims at solving the technical problem that the accuracy of the trained recognition model on the text extraction entity relationship is low due to the fact that the error training sample is easy to mix in when the training sample is built through remote supervision at present. The embodiment provides a method for identifying entity relationships, which can improve the accuracy of identifying entity relationships in texts by constructing an entity relationship identification model with higher accuracy of extracting entity relationships from texts, as shown in fig. 1, and comprises the following steps:
101. and obtaining a text vector of the text to be recognized according to the acquired text to be recognized by utilizing a preset first entity relation recognition model. The preset first entity relation recognition model is obtained through training based on a trusted training sample set, and the trusted training sample set is constructed by a trusted training sample with entity relation marks.
The method comprises the steps of obtaining a text to be identified, preprocessing the obtained text to be identified to obtain an initialized text vector, inputting the initialized text vector into an embedded layer of a preset first entity relation identification model, and generating a text vector used for representing the text to be identified.
The preprocessing can be specifically set according to an actual application scene, for example, the preprocessing is set to be word segmentation processing, namely word segmentation marking is carried out on the text to be identified by taking words as units; or the preprocessing is set to be word screening processing, namely, after word segmentation marking is carried out on the text to be recognized by taking words as units, unimportant words are removed, for example, auxiliary verbs such as 'capable, should' and the like, and unimportant words such as exclamation words such as 'o, o' and the like are removed, so that the recognition efficiency of entity relation in the text to be recognized is improved, and the preprocessing is not particularly limited.
102. And obtaining a convolution operation result of the text vector according to the text vector of the text to be recognized.
After a series of operations are completed on the text vector of the text to be recognized through the convolution layer, the pooling layer and the full connection layer, a multidimensional feature vector containing entity relations in the initialized text vector is output, and therefore the capturing and the extracting of relation information among words in the text vector of the text to be recognized are achieved.
103. And determining entity relations contained in the text to be identified according to the text vector and the obtained convolution operation result.
Inputting the convolution operation result obtained by the convolution layer and the pooled convolution operation result obtained by the pooling layer into a full-connection layer of a preset first entity relationship identification model, correlating the convolution operation result output by each convolution kernel by the full-connection layer through an activation function softmax to obtain a correlated convolution operation result, combining the obtained correlated convolution operation result with the pooled convolution operation result output by the pooling layer, and outputting hidden features in the text to be identified, wherein the hidden features are used for representing entity relationships among words in the text to be identified.
According to the scheme, a preset first entity relationship recognition model is utilized, a text vector of the text to be recognized is obtained according to the obtained text to be recognized, a convolution operation result of the text vector is obtained according to the text vector of the text to be recognized, and an entity relationship contained in the text to be recognized is determined according to the text vector and the obtained convolution operation result, wherein the preset first entity relationship recognition model is obtained by training based on a trusted training sample set, and compared with a training sample set which is built based on remote supervision and is easy to mix with an error training sample at present, and further compared with a recognition model which is obtained by training and is used for extracting the entity relationship of the text and has lower accuracy, the entity relationship recognition accuracy can be effectively improved based on the preset first entity relationship recognition model obtained by training based on the high-quality trusted training sample set.
Further, as a refinement and extension of the foregoing embodiment, in order to fully describe a specific implementation procedure of the embodiment, another entity relationship identifying method is provided, as shown in fig. 2, where the method includes:
201. training the initialized second entity relationship recognition model to obtain a preset second entity relationship recognition model.
The preset second entity relationship recognition model is used for constructing a trusted training sample set, and the initialized training sample set for training the initialized second entity relationship recognition model is obtained before the initialized second entity relationship recognition model is trained. The method comprises the steps of obtaining an initialization training sample set, namely obtaining a large amount of text data as training samples of the initialization training sample set, wherein each training sample comprises a triplet, namely three characteristics of text, and the three characteristics are used for representing named entities of words in the training sample and entity relations among the words, namely two named entities E1 and E2 and a relation R among the named entities E1 and E2, and the three characteristics are represented as (E1, R and E2). And labeling each training sample to obtain a labeled training sample with an entity relationship label, wherein the label is an entity relationship category contained in the training sample, for example, the entity relationship category among words in the training sample belongs to an internet transaction category, a financial category, a geographic category and the like, or specific entity relationship categories are refined, for example, "China", "Shanghai" are geographic inclusion relationships, and the like, based on the "financial service" and the "insurance product" in the knowledge graph of the insurance product intelligent customer service are clause inclusion relationships and the like, so that an initialized second entity relationship recognition model carries out label prediction on the labeled training sample according to a triplet in the labeled training sample, and the label prediction result is compared with a real label actually labeled by the labeled training sample, thereby obtaining a preset second entity relationship recognition model with higher recognition accuracy through iterative training.
To illustrate a specific implementation of step 201, as a preferred embodiment, step 201 may specifically include: carrying out entity relationship prediction on a marked training sample with entity relationship marks by using the initialized second entity relationship recognition model; and training network parameters in the initialized second entity relationship identification model according to the entity relationship prediction result and the entity relationship mark of the mark training sample to obtain a preset second entity relationship identification model.
The label training sample with the entity relation label is an initialized text vector with the entity relation label, the initialized second entity relation recognition model completes a series of operations through an embedding layer, a convolution layer, a pooling layer and a full connection layer according to the initialized text vector with the entity relation label so as to capture and extract relation information among words in the initialized text vector, and therefore multidimensional feature vectors containing entity relations in the initialized text vector are output, and a preset second entity relation recognition model for recognizing the entity relations in the text is trained according to the output multidimensional feature vectors.
In an actual application scene, an initialized text vector with an entity relation mark is output through an embedding layer of an initialized second entity relation recognition model to obtain a word vector corresponding to the initialized text vector, the word vector obtained through output is input into a convolution layer of the initialized second entity relation recognition model, specifically, the convolution layer carries out convolution operation on n adjacent word vectors in the word vector output by the embedding layer, for example, the length of a convolution kernel is set to be 3, namely, all the adjacent 3 word vectors are checked by using convolution with the dimension of 3 to carry out convolution operation, and a convolution operation result output by each convolution kernel is obtained. The convolution operation result output by each convolution kernel is input into a pooling layer of the initialized second entity relation recognition model, specifically, the pooling layer carries out pooling operation on the convolution operation result output by each input convolution kernel, the pooled convolution operation result within a certain step length is extracted, and the pooling operation can be maximum pooling, average pooling and the like. And capturing the relation information between adjacent word vectors by utilizing a convolution layer and a pooling layer so as to capture the local information of the initialized text vector.
Inputting the convolution operation result obtained by the convolution layer and the pooled convolution operation result of the pooling layer into a full-connection layer of the initialized second entity relationship identification model, correlating the convolution operation result output by each obtained convolution kernel by the full-connection layer to obtain a correlated convolution operation result, and combining the obtained correlated convolution operation result with the pooled convolution operation result output by the pooling layer to obtain hidden characteristics in the initialized text vector, thereby capturing global information contained in the initialized text vector. Wherein the implicit features are used to characterize the entity relationships between words in the initialized text vector.
And obtaining a preset second entity relationship recognition model for recognizing the entity relationship in the text after repeated iterative training according to the implicit characteristics of the obtained initialized text vector.
202. And constructing a trusted training sample set according to the trusted training samples with the entity relation marks.
In an actual application scene, the remote supervision training samples are screened to obtain the credible training samples with entity relation marks. The method comprises the steps of obtaining a remote supervision training sample, inputting the remote supervision training sample into a preset second entity relation recognition model, obtaining an output result used for representing entity relations contained in the remote supervision training sample by utilizing a constructed Gaussian mixture model, and obtaining a trusted training sample used for constructing a trusted training sample set according to the output result and a marked training sample with entity relation marks.
To illustrate the specific implementation of step 202, as a preferred embodiment, constructing a trusted training sample set from trusted training samples with entity relationship labels may specifically include: predicting the entity relationship of the remote supervision training sample by using a preset second entity relationship identification model; and obtaining a trusted training sample with the entity relationship mark according to the entity relationship prediction result and the mark training sample with the entity relationship mark.
To further illustrate the specific implementation of step 202, as a preferred embodiment, performing entity relationship prediction on the remote supervision training sample using the preset second entity relationship identification model may specifically include: carrying out convolution operation on the marked training sample with the entity relation mark by using a preset second entity relation recognition model to obtain a convolution operation result; training the initialized Gaussian mixture model according to the convolution operation result and the entity relation mark in the mark training sample to obtain a trained Gaussian mixture model; and predicting the entity relationship of the remote supervision training sample by using the trained Gaussian mixture model.
In an actual application scene, inputting a large number of remote supervision training samples into a preset second entity relationship recognition model, sequentially outputting output results for representing entity relationships contained in the remote supervision training samples by using a full-connection layer of the preset second entity relationship recognition model, sequentially associating the output results with labels in the remote supervision training samples corresponding to the output results according to the output sequence of the output results by using a constructed Gaussian mixture model (GMM: gaussian Mixed Model), and taking a first group of output results as an example, wherein the implementation process for associating the first group of output results with the labels in the remote supervision training samples corresponding to the output results is specifically as follows:
it should be noted that, in the specific training process of the trained GMM, the output result (i.e., the training sample set for training the initialized GMM) for characterizing the entity relationship contained in the remote monitoring training samples, which is sequentially output by the full-connection layer of the preset second entity relationship recognition model, includes L groups of marked training samples (x i ,y i ) And u groups of remote supervision training samples x extracted by remote supervision L +j, where 1.ltoreq.i.ltoreq.L, 1.ltoreq.j.ltoreq.u, training sample set D= { (x) 1 ,y 1 ),(x 2 ,y 2 ),…,(x L ,y L ),x L +1,x L +2,…,x L And +u, constructing an initialized GMM according to the marked training samples with the entity relation marks in the training sample set, and training according to the marked training samples with the entity relation marks to obtain network parameters of the GMM, thereby obtaining the trained GMM.
Assuming that the marked training samples with the entity relationship marks comprise m classes, taking L groups of marked training samples with the entity relationship marks as examples, if gamma ij Representing a marker training sample x j Probability value belonging to class i, then gamma ij The value is marked 1 for the category shown in the tag and 0 for the remaining categories shown. For example, according to the requirements of the actual application scene, the ith Gaussian component is the ith class in the marked training sample, i.e. the ith class is the clause inclusion relation, gamma ij Representing a marker training sample x j The term comprises a probability value for the relationship.
The probability distribution of GMM is calculated as follows:
wherein N (x|mu) i ,∑ i ) The i-th Gaussian component in the GMM is represented, pi is a mixing coefficient, the weight of each component is equivalent, x is a feature vector (i.e. training sample), mu is a mean vector of x, and sigma is a covariance matrix.
Determining the initial parameter pi of the GMM from the L sets of labeled training samples using the maximum Expectation algorithm (EM: expectation-Maximization algorithm) i 、μ i 、∑ i Initial network parameter pi of GMM i 、μ i 、∑ i The calculation formula of (2) is as follows:
in the process of parameter estimation of GMM, using estimation step (E step), according to initial network parameter pi i 、μ i 、∑ i Predicting the label category to which the mark training sample belongs; and updating the initial parameter pi based on the tag class of the predicted tag training samples using Maximization step (M step) i 、μ i 、∑ i 。
Wherein, E step's calculation formula is as follows:
the calculation formula of M step is as follows:
e step and M step are repeated in sequence based on a semi-supervised learning method until convergence is achieved, and a trained parameter pi is obtained i 、μ i 、∑ i Thereby obtaining a trained GMM. And predicting the entity relationship of the remote supervision training sample by using the trained GMM, and obtaining a trusted training sample with the entity relationship mark according to the entity relationship prediction result and the marked training sample with the entity relationship mark.
To further illustrate the specific implementation of step 202, as a preferred embodiment, obtaining a trusted training sample with an entity relationship tag according to the entity relationship prediction result and the tag training sample with the entity relationship tag may specifically include: if the predicted entity relationship of the remote supervision training sample is consistent with the initial entity relationship mark in the remote supervision training sample, taking the remote supervision training sample and the marked training sample as trusted training samples with entity relationship marks; and if the predicted entity relationship of the remote supervision training sample is inconsistent with the initial entity relationship mark in the remote supervision training sample, deleting the remote supervision training sample.
If the predicted entity relationship is consistent with the initial label of the remote supervision training sample, determining that the remote supervision training sample is a high-reliability remote supervision training sample, if the predicted entity relationship is inconsistent with the initial label of the remote supervision training sample, determining that the remote supervision training sample is a low-reliability remote supervision training sample, and directly discarding the remote supervision training sample.
And correlating the second group of output results with the labels in the remote supervision training samples corresponding to the output results, and repeating the steps in sequence until all the output results are processed completely to obtain a screened training text set, namely a trusted training sample set.
203. And training based on the trusted training sample set to obtain a preset first entity relationship identification model.
To illustrate a specific implementation of step 203, as a preferred embodiment, step 203 may specifically include: utilizing the initialized first entity relation recognition model to predict entity relation of the trusted training sample with entity relation marks in the trusted training sample set; and training network parameters in the initialized first entity relationship identification model according to the entity relationship prediction result and the entity relationship mark of the trusted training sample to obtain a preset first entity relationship identification model.
Filtering low-credibility remote supervision training samples through a preset second entity relation recognition model and the constructed GMM to obtain a credible training sample set so as to improve the existing remote supervision training method; and training based on the initialized first entity relation recognition model according to the trusted training sample set to obtain a preset first entity relation recognition model, improving the recognition accuracy of the preset first entity relation recognition model by improving the quality of the training sample set, and further enabling the obtained preset first entity relation recognition model to recognize entity relations among words in the text to be recognized more quickly and accurately so as to determine the semantic represented by the text to be recognized according to the entity relations obtained by recognition.
204. And acquiring a word vector and a word vector of the text to be recognized by using a preset first entity relation recognition model and using a word vector dictionary.
The method comprises the steps of obtaining an initialized text vector after Word segmentation processing is carried out on an obtained text to be recognized, inputting the initialized text vector into an embedded layer of a preset first entity relation recognition model, and matching the initialized text vector by the embedded layer on the basis of a Word2Vec model by utilizing a preset Word vector dictionary to obtain a Word vector and a Word vector used for representing the text to be recognized. The preset word vector dictionary comprises word vectors corresponding to each word in the initialized text vectors and word vectors corresponding to each word.
205. And carrying out convolution operation on the obtained adjacent multiple word vectors and word vectors to obtain a text vector of the text to be recognized.
The embedded layer of the preset first entity relation recognition model also comprises a double-layer one-dimensional full convolution structure, and the word vector of the text to be recognized are output to obtain the text vector of the text to be recognized through the double-layer one-dimensional full convolution structure. Specifically, convolution operation (i.e., dot product operation) is performed on the word vector and the word vector of the text to be recognized by using the convolution kernel, and all obtained convolution operation results are used as text vectors of the text to be recognized.
206. And obtaining a convolution operation result of the text vector according to the text vector of the text to be recognized.
Inputting a text vector of a text to be recognized, which is output by an embedded layer, into a convolution layer of a preset first entity relation recognition model, carrying out convolution operation on the text vector by utilizing a convolution check in the convolution layer to obtain a convolution operation result, and carrying out pooling operation on the convolution operation result by utilizing a pooling layer of the preset first entity relation recognition model to obtain a pooled convolution operation result, namely, the convolution operation result of the text vector consists of the convolution operation result obtained by the convolution layer and the pooled convolution operation result obtained by the pooling layer.
207. And determining entity relations contained in the text to be identified according to the convolution operation results of the text vectors and the obtained text vectors.
And outputting hidden features in the text to be identified according to the text vector, the convolution operation result obtained by the convolution layer and the pooled convolution operation result obtained by the pooling layer by the full connection layer, wherein the hidden features are used for representing entity relations among words in the text to be identified. For example, if the text to be identified is "Shanghai located in China", it is determined that the entity relationship included in the text to be identified is a geographic inclusion relationship.
By applying the technical scheme of the embodiment, a preset first entity relationship recognition model is utilized, a text vector of the text to be recognized is obtained according to the acquired text to be recognized, a convolution operation result of the text vector is obtained according to the text vector of the text to be recognized, and an entity relationship contained in the text to be recognized is determined according to the text vector and the obtained convolution operation result, wherein the preset first entity relationship recognition model is obtained based on the training of a trusted training sample set. Compared with the existing training sample set which is built based on remote supervision and is easy to mix with an error training sample, and further the recognition model which is obtained through training and is used for extracting the entity relation from the text and has low accuracy is obtained, the recognition accuracy of the entity relation can be effectively improved through the preset first entity relation recognition model which is obtained through training based on the high-quality trusted training sample set.
Further, as a specific implementation of the method of fig. 1, an embodiment of the present application provides an entity relationship identifying apparatus, as shown in fig. 3, where the apparatus includes: the system comprises an acquisition module 31, a convolution operation module 32 and an entity relation module 33.
The obtaining module 31 may be configured to obtain a text vector of the text to be recognized according to the obtained text to be recognized by using a preset first entity relationship recognition model; the preset first entity relation recognition model is obtained by training based on a trusted training sample set; the obtaining module 31 is a main functional module for identifying entity relationship of the device.
The convolution operation module 32 may be configured to obtain a convolution operation result of the text vector according to the text vector of the text to be recognized obtained by the obtaining module 31; the convolution operation module 32 is a main functional module for identifying entity relationship of the device.
The entity relation module 33 may be configured to determine an entity relation included in the text to be recognized according to the text vector of the text to be recognized obtained by the obtaining module 31 and the convolution operation result of the text vector obtained by the convolution operation module 32; the entity relationship module 33 is a main functional module for identifying entity relationship of the device, and is also a core functional module of the device.
In a specific application scenario, the obtaining module 31 may be specifically configured to obtain a word vector and a word vector of the text to be recognized by using a word vector dictionary; and carrying out convolution operation on the obtained adjacent multiple word vectors and word vectors to obtain a text vector of the text to be recognized.
In a specific application scenario, the obtaining module 31 may be further specifically configured to predict an entity relationship of the trusted training sample with the entity relationship label in the trusted training sample set by using the initialized first entity relationship identification model; and training network parameters in the initialized first entity relationship identification model according to the entity relationship prediction result and the entity relationship mark of the trusted training sample to obtain a preset first entity relationship identification model.
The apparatus further comprises a sample module 34, a second entity relationship identification model 35.
The sample module 34 may be used to construct a trusted training sample set constructed from trusted training samples with entity relationship markers.
In a specific application scenario, the sample module 34 may be specifically configured to predict an entity relationship of the remote supervision training sample by using a preset second entity relationship identification model; and determining to obtain a trusted training sample with the entity relationship mark according to the entity relationship prediction result and the mark training sample with the entity relationship mark.
In a specific application scenario, the sample module 34 may be further specifically configured to perform a convolution operation on the labeled training sample with the entity relationship label by using a preset second entity relationship identification model to obtain a convolution operation result; training the initialized Gaussian mixture model according to the convolution operation result and the entity relation mark in the mark training sample to obtain a trained Gaussian mixture model; and predicting the entity relationship of the remote supervision training sample according to the marked training sample by using the trained Gaussian mixture model.
In a specific application scenario, the sample module 34 may be further specifically configured to, if the predicted entity relationship of the remote supervision training sample is consistent with the initial entity relationship mark in the remote supervision training sample mark training sample, mark the entity relationship of the remote supervision training sample, and use the remote supervision training sample marked with the entity relationship and the marked training sample as a trusted training sample with the entity relationship mark; and if the predicted entity relationship of the remote supervision training sample is inconsistent with the initial entity relationship mark in the remote supervision mark training sample, deleting the remote supervision training sample.
The second entity relationship recognition model 35 may be used to train the initialized second entity relationship recognition model to obtain the preset second entity relationship recognition model.
In a specific application scenario, the second entity relationship recognition model 35 may be specifically configured to predict the entity relationship of the labeled training sample with the entity relationship label by using the initialized second entity relationship recognition model; and training network parameters in the initialized second entity relationship identification model according to the entity relationship prediction result and the entity relationship mark of the mark training sample to obtain a preset second entity relationship identification model.
It should be noted that, for other corresponding descriptions of each functional unit related to the entity relationship identifying apparatus provided by the embodiment of the present application, reference may be made to corresponding descriptions in fig. 1 and fig. 2, and details are not repeated herein.
Based on the above-mentioned methods shown in fig. 1 and 2, correspondingly, the embodiment of the present application further provides a storage medium, on which a computer program is stored, which when executed by a processor, implements the above-mentioned entity relationship identification method shown in fig. 1 and 2.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.), and includes several instructions for causing a computer device (may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective implementation scenario of the present application.
Based on the methods shown in fig. 1 and fig. 2 and the virtual device embodiment shown in fig. 3, in order to achieve the above objects, the embodiment of the present application further provides a computer device, which may specifically be a personal computer, a server, a network device, etc., where the entity device includes a storage medium and a processor; a storage medium storing a computer program; a processor for executing a computer program to implement the above-described entity relationship identification method as shown in fig. 1 and 2.
Optionally, the computer device may also include a user interface, a network interface, a camera, radio Frequency (RF) circuitry, sensors, audio circuitry, WI-FI modules, and the like. The user interface may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., bluetooth interface, WI-FI interface), etc.
It will be appreciated by those skilled in the art that the architecture of a computer device provided in this embodiment is not limited to this physical device, but may include more or fewer components, or may be combined with certain components, or may be arranged in a different arrangement of components.
The storage medium may also include an operating system, a network communication module. An operating system is a program that manages the hardware and software resources of a computer device, supporting the execution of information handling programs, as well as other software and/or programs. The network communication module is used for realizing communication among all components in the storage medium and communication with other hardware and software in the entity equipment.
From the above description of the embodiments, it will be apparent to those skilled in the art that the present application may be implemented by means of software plus necessary general hardware platforms, or may be implemented by hardware. By applying the technical scheme of the application, compared with the existing training sample set which is built based on remote supervision and is easy to mix with an error training sample, and further the recognition model which is obtained through training and is used for extracting the entity relation of the text and has lower accuracy is obtained, the recognition accuracy of the entity relation can be effectively improved through the preset first entity relation recognition model which is obtained through training based on the high-quality credible training sample set.
Those skilled in the art will appreciate that the drawing is merely a schematic illustration of a preferred implementation scenario and that the modules or flows in the drawing are not necessarily required to practice the application. Those skilled in the art will appreciate that modules in an apparatus in an implementation scenario may be distributed in an apparatus in an implementation scenario according to an implementation scenario description, or that corresponding changes may be located in one or more apparatuses different from the implementation scenario. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above-mentioned inventive sequence numbers are merely for description and do not represent advantages or disadvantages of the implementation scenario. The foregoing disclosure is merely illustrative of some embodiments of the application, and the application is not limited thereto, as modifications may be made by those skilled in the art without departing from the scope of the application.
Claims (8)
1. A method for identifying an entity relationship, comprising:
obtaining a text vector of the text to be recognized according to the obtained text to be recognized by utilizing a preset first entity relation recognition model;
obtaining a convolution operation result of a text vector according to the text vector of the text to be identified;
determining entity relations contained in the text to be identified according to the text vectors and the obtained convolution operation results;
the preset first entity relation recognition model is obtained by training based on a trusted training sample set, and the trusted training sample set is constructed by a trusted training sample with entity relation marks;
the trusted training sample set is constructed by trusted training samples with entity relation marks, and specifically comprises the following steps:
predicting the entity relationship of the remote supervision training sample by using a preset second entity relationship identification model;
obtaining a trusted training sample with an entity relationship mark according to the entity relationship prediction result and the mark training sample with the entity relationship mark;
the predicting the entity relationship of the remote supervision training sample by using a preset second entity relationship identification model specifically comprises the following steps:
carrying out convolution operation on the marked training sample with the entity relation mark by using a preset second entity relation recognition model to obtain a convolution operation result;
training the initialized Gaussian mixture model according to the convolution operation result and the entity relation mark in the mark training sample to obtain a trained Gaussian mixture model;
and predicting the entity relationship of the remote supervision training sample by using the trained Gaussian mixture model.
2. The method according to claim 1, wherein the obtaining a text vector of the text to be recognized according to the obtained text to be recognized specifically includes:
li Yongci vector dictionary obtains word vectors and word vectors of text to be recognized;
and carrying out convolution operation on the obtained adjacent multiple word vectors and word vectors to obtain a text vector of the text to be recognized.
3. The method according to claim 1, wherein the obtaining the trusted training sample with the entity relationship mark according to the entity relationship prediction result and the marked training sample with the entity relationship mark specifically comprises:
if the predicted entity relationship of the remote supervision training sample is consistent with the initial entity relationship mark of the remote supervision training sample, the remote supervision training sample and the marked training sample are used as trusted training samples with entity relationship marks;
and if the predicted entity relationship of the remote supervision training sample is inconsistent with the initial entity relationship mark in the remote supervision training sample, deleting the remote supervision training sample.
4. The method according to claim 1, wherein the preset second entity relationship identification model is obtained by training an initialized second entity relationship identification model;
the preset second entity relationship recognition model is obtained by training the initialized second entity relationship recognition model, and specifically comprises the following steps:
carrying out entity relationship prediction on a marked training sample with entity relationship marks by using the initialized second entity relationship recognition model;
and training network parameters in the initialized second entity relationship identification model according to the entity relationship prediction result and the entity relationship mark of the mark training sample to obtain a preset second entity relationship identification model.
5. The method according to claim 1, wherein the preset first entity relationship recognition model is trained based on a trusted training sample set, and specifically comprises:
utilizing the initialized first entity relation recognition model to predict entity relation of the trusted training sample with entity relation marks in the trusted training sample set;
and training network parameters in the initialized first entity relationship identification model according to the entity relationship prediction result and the entity relationship mark of the trusted training sample to obtain a preset first entity relationship identification model.
6. An entity relationship identification apparatus, comprising:
the acquisition module is used for acquiring a text vector of the text to be identified according to the acquired text to be identified by utilizing a preset first entity relation identification model;
the convolution operation module is used for obtaining a convolution operation result of the text vector according to the text vector of the text to be recognized;
the entity relation module is used for determining entity relation contained in the text to be identified according to the text vector and the obtained convolution operation result;
the preset first entity relation recognition model is obtained by training based on a trusted training sample set;
the device also comprises a sample module, wherein the sample module is used for constructing a trusted training sample set, and the trusted training sample set is constructed by a trusted training sample with entity relation marks;
the sample module is further for: predicting the entity relationship of the remote supervision training sample by using a preset second entity relationship identification model;
obtaining a trusted training sample with an entity relationship mark according to the entity relationship prediction result and the mark training sample with the entity relationship mark;
the sample module is further for: carrying out convolution operation on the marked training sample with the entity relation mark by using a preset second entity relation recognition model to obtain a convolution operation result;
training the initialized Gaussian mixture model according to the convolution operation result and the entity relation mark in the mark training sample to obtain a trained Gaussian mixture model;
and predicting the entity relationship of the remote supervision training sample by using the trained Gaussian mixture model.
7. A storage medium having stored thereon a computer program, wherein the program when executed by a processor implements the entity-relationship identification method of any one of claims 1 to 5.
8. A computer device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the entity relationship identification method of any one of claims 1 to 5 when the program is executed by the processor.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910559111.9A CN110457677B (en) | 2019-06-26 | 2019-06-26 | Entity relationship identification method and device, storage medium and computer equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910559111.9A CN110457677B (en) | 2019-06-26 | 2019-06-26 | Entity relationship identification method and device, storage medium and computer equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110457677A CN110457677A (en) | 2019-11-15 |
| CN110457677B true CN110457677B (en) | 2023-11-17 |
Family
ID=68481090
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910559111.9A Active CN110457677B (en) | 2019-06-26 | 2019-06-26 | Entity relationship identification method and device, storage medium and computer equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110457677B (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111192692B (en) * | 2020-01-02 | 2023-12-08 | 上海联影智能医疗科技有限公司 | A method, device, electronic equipment and storage medium for determining entity relationships |
| CN111274412A (en) * | 2020-01-22 | 2020-06-12 | 腾讯科技(深圳)有限公司 | Information extraction method, information extraction model training device and storage medium |
| CN111338338B (en) * | 2020-02-20 | 2024-01-16 | 山东科技大学 | Robot speed adaptive control method based on cluster analysis of road surface characteristics |
| CN111552812B (en) * | 2020-04-29 | 2023-05-12 | 深圳数联天下智能科技有限公司 | Method, device and computer equipment for determining relationship category between entities |
| CN111651575B (en) * | 2020-05-29 | 2023-09-12 | 泰康保险集团股份有限公司 | Session text processing method, device, medium and electronic equipment |
| CN112069329B (en) * | 2020-09-11 | 2024-03-15 | 腾讯科技(深圳)有限公司 | Text corpus processing method, device, equipment and storage medium |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107239446A (en) * | 2017-05-27 | 2017-10-10 | 中国矿业大学 | A kind of intelligence relationship extracting method based on neutral net Yu notice mechanism |
| CN107729497A (en) * | 2017-10-20 | 2018-02-23 | 同济大学 | A kind of word insert depth learning method of knowledge based collection of illustrative plates |
| CN107943784A (en) * | 2017-11-02 | 2018-04-20 | 南华大学 | Relation extraction method based on generation confrontation network |
| CN109299457A (en) * | 2018-09-06 | 2019-02-01 | 北京奇艺世纪科技有限公司 | A kind of opining mining method, device and equipment |
| WO2019094895A1 (en) * | 2017-11-13 | 2019-05-16 | Promptu Systems Corporation | Systems and methods for adaptive proper name entity recognition and understanding |
| CN109815339A (en) * | 2019-01-02 | 2019-05-28 | 平安科技(深圳)有限公司 | Knowledge extraction method, device, computer equipment and storage medium based on TextCNN |
-
2019
- 2019-06-26 CN CN201910559111.9A patent/CN110457677B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107239446A (en) * | 2017-05-27 | 2017-10-10 | 中国矿业大学 | A kind of intelligence relationship extracting method based on neutral net Yu notice mechanism |
| CN107729497A (en) * | 2017-10-20 | 2018-02-23 | 同济大学 | A kind of word insert depth learning method of knowledge based collection of illustrative plates |
| CN107943784A (en) * | 2017-11-02 | 2018-04-20 | 南华大学 | Relation extraction method based on generation confrontation network |
| WO2019094895A1 (en) * | 2017-11-13 | 2019-05-16 | Promptu Systems Corporation | Systems and methods for adaptive proper name entity recognition and understanding |
| CN109299457A (en) * | 2018-09-06 | 2019-02-01 | 北京奇艺世纪科技有限公司 | A kind of opining mining method, device and equipment |
| CN109815339A (en) * | 2019-01-02 | 2019-05-28 | 平安科技(深圳)有限公司 | Knowledge extraction method, device, computer equipment and storage medium based on TextCNN |
Non-Patent Citations (1)
| Title |
|---|
| Typing Textual Entities and M2T/T2M Transformations in a Model Management Environment;Andres Vignaga;《2009 International Conference of the Chilean Computer Science Society》;115-122 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110457677A (en) | 2019-11-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110457677B (en) | Entity relationship identification method and device, storage medium and computer equipment | |
| CN110287312B (en) | Text similarity calculation method, device, computer equipment and computer storage medium | |
| CN111476284B (en) | Image recognition model training and image recognition method and device and electronic equipment | |
| CN107610709B (en) | Method and system for training voiceprint recognition model | |
| CN110222330B (en) | Semantic recognition method and device, storage medium and computer equipment | |
| CN108416370B (en) | Image classification method, device and storage medium based on semi-supervised deep learning | |
| Goodfellow et al. | Multi-digit number recognition from street view imagery using deep convolutional neural networks | |
| CN109902672B (en) | Image labeling method and device, storage medium and computer equipment | |
| CN104463101B (en) | Answer recognition methods and system for character property examination question | |
| CN107545038B (en) | A text classification method and device | |
| CN108805583B (en) | E-commerce fraud detection method, device, equipment and medium based on address mapping | |
| CN111522942B (en) | Training method and device for text classification model, storage medium and computer equipment | |
| CN108846835A (en) | The image change detection method of convolutional network is separated based on depth | |
| CN111723870B (en) | Artificial intelligence-based data set acquisition method, apparatus, device and medium | |
| CN110287311B (en) | Text classification method and device, storage medium and computer equipment | |
| CN109871686A (en) | Malware program identification method and device based on icon representation and software behavior consistency analysis | |
| CN109284372A (en) | User's operation behavior analysis method, electronic device and computer readable storage medium | |
| CN114463798A (en) | Training method, device and equipment of face recognition model and storage medium | |
| CN111860671A (en) | Classification model training method, apparatus, terminal device and readable storage medium | |
| CN110110610B (en) | Event detection method for short video | |
| Li et al. | Dating ancient paintings of Mogao Grottoes using deeply learnt visual codes | |
| CN111445928A (en) | Voice quality inspection method, device, equipment and storage medium | |
| US20230394865A1 (en) | Methods and systems for performing data capture | |
| CN113053395A (en) | Pronunciation error correction learning method and device, storage medium and electronic equipment | |
| CN115019175B (en) | A pest identification method based on transfer meta-learning |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |