Entity type identification method, device, computer equipment and storage medium
By obtaining the syntactic information and knowledge information vectors of entity sequences and combining with deep learning models, the problem of inaccurate entity type recognition in the prior art is solved, and the accurate identification of entity types in different scenarios is achieved.
Patent Information
- Application Number
- CN202210555605.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-20
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-05-20
AI Technical Summary
The existing entity type recognition methods rely on dictionary recognition and cannot accurately identify the different meanings of entities in different scenarios, resulting in a high classification error rate.
By obtaining the syntactic information vector and knowledge information vector of the entity sequence, fuse it to form the target sequence, use the deep learning model to determine the entity category, and accurately identify it in combination with syntactic relationships and knowledge information.
It improves the accuracy of entity type recognition and can accurately identify the type of entity in different scenarios.
Smart Images

Figure CN114880476B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an entity type identification method, apparatus, computer device, and storage medium. Background Art
[0002] Entity type recognition refers to extracting text with specific meanings from text and determining its corresponding entity type. Entity types mainly include names of people, places, organizations, proper nouns, etc. Conventional entity recognition tools or methods can only recognize names of people, places, and organizations according to dictionaries, but cannot further recognize entities according to different meanings. In particular, when the same entity represents different meanings in different scenarios, the type corresponding to the entity is also different. Entity type recognition based solely on dictionaries may lead to an increase in the error rate of entity recognition classification, that is, the accuracy of the type corresponding to the entity after identification and classification based on this method is low. Summary of the Invention
[0003] In order to solve the above technical problems, the present application provides an entity type identification method, apparatus, computer device and storage medium.
[0004] In a first aspect, the present application provides an entity type identification method, comprising:
[0005] Acquire an entity sequence, wherein the entity sequence includes syntactic information vectors corresponding to a plurality of entities to be identified, the syntactic information vectors including syntactic relations between a target entity and each of the entities to be identified, and the target entity is any one of the entities to be identified;
[0006] Obtaining a knowledge information vector corresponding to the target entity;
[0007] Concatenate the entity sequence and the knowledge information vector to form a target sequence;
[0008] An entity category corresponding to the target entity is determined according to the target sequence.
[0009] In a second aspect, the present application provides an entity type identification device, comprising:
[0010] An acquisition module is configured to acquire an entity sequence, wherein the entity sequence includes syntactic information vectors corresponding to a plurality of entities to be identified, the syntactic information vectors including syntactic relationships between a target entity and each of the entities to be identified, the target entity being any one of the entities to be identified; and acquire a knowledge information vector corresponding to the target entity;
[0011] A splicing module, configured to splice the entity sequence and the knowledge information vector to form a target sequence;
[0012] A classification module is used to determine the entity category corresponding to the target entity according to the target sequence.
[0013] In a third aspect, the present application provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0014] Acquire an entity sequence, wherein the entity sequence includes syntactic information vectors corresponding to a plurality of entities to be identified, the syntactic information vectors including syntactic relations between a target entity and each of the entities to be identified, and the target entity is any one of the entities to be identified;
[0015] Obtaining a knowledge information vector corresponding to the target entity;
[0016] Concatenate the entity sequence and the knowledge information vector to form a target sequence;
[0017] An entity category corresponding to the target entity is determined according to the target sequence.
[0018] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0019] Acquire an entity sequence, wherein the entity sequence includes syntactic information vectors corresponding to a plurality of entities to be identified, the syntactic information vectors including syntactic relations between a target entity and each of the entities to be identified, and the target entity is any one of the entities to be identified;
[0020] Obtaining a knowledge information vector corresponding to the target entity;
[0021] Concatenate the entity sequence and the knowledge information vector to form a target sequence;
[0022] An entity category corresponding to the target entity is determined according to the target sequence.
[0023] The above-mentioned entity type identification method is applied to the field of knowledge graph technology for realizing entity type identification by utilizing graph construction. Based on the above-mentioned entity type identification method, an entity sequence is obtained. The entity sequence includes multiple syntactic information vectors corresponding to entities to be identified. Each syntactic information vector contains the syntactic relationship between the target entity and each entity to be identified. The target entity is any entity to be identified, that is, the syntactic information vector corresponding to each entity to be identified contains the syntactic relationship between the entity to be identified and other entities to be identified. The entity sequence and the knowledge information vector corresponding to the target entity are then spliced to form a target sequence. The entity category corresponding to the target entity is determined according to the target sequence. Since the target sequence integrates the corresponding syntactic information and knowledge information of the target entity, the entity category corresponding to the target entity can be accurately determined according to the target sequence, thereby improving the accuracy of entity type identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0026] Figure 1 Schematic diagram of a flow chart of an entity type identification method in one embodiment;
[0027] Figure 2 A schematic diagram of a syntactic dependency tree result in one embodiment;
[0028] Figure 3 is a structural block diagram of an entity type identification device in one embodiment;
[0029] Figure 4 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0030] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0031] In one embodiment, Figure 1A flow chart of an entity type identification method in one embodiment is shown in FIG. Figure 1 , provides an entity type identification method. This embodiment mainly uses the method applied to a server as an example to illustrate, and the entity type identification method specifically includes the following steps:
[0032] Step S110: Obtain entity sequence.
[0033] Among them, the entity sequence includes syntactic information vectors corresponding to multiple entities to be identified, and the entities to be identified can be specifically represented by different text characters, and the text characters can be specifically at least one of Chinese characters, English characters, digital characters, etc. The syntactic information vector contains the syntactic relationship between the target entity and each of the entities to be identified, and the target entity is any one of the entities to be identified.
[0034] Specifically, the entity sequence corresponds to a text, which includes multiple entities to be identified. The syntactic information vector corresponding to the entity to be identified contains the syntactic relationship between the entity to be identified and other entities to be identified in the text. The syntactic relationship is used to indicate the dependency relationship between the entity to be identified and other entities to be identified in the text. The syntactic relationship specifically includes subject-predicate relationship, verb-object relationship, attributive-predicate relationship, etc., that is, the syntactic relationship between each entity to be identified and the context can be analyzed according to the entity sequence, that is, the entity type of the entity to be identified is identified in combination with the context.
[0035] Step S120: Acquire the knowledge information vector corresponding to the target entity.
[0036] Specifically, each entity to be identified corresponds to a knowledge information vector that matches it. The knowledge information vector is used to indicate the knowledge information corresponding to the entity to be identified in the corpus knowledge graph. The knowledge information specifically includes subject information, relationship information, object information, attribute information, attribute value, etc.
[0037] Step S130: Concatenate the entity sequence and the knowledge information vector to form a target sequence.
[0038] Specifically, the entity sequence containing syntactic information and the knowledge information vector corresponding to the knowledge information are fused to form a target sequence. That is, by fusing the syntactic relationship between the contexts in the text and the knowledge information corresponding to the entity to be identified, the fused target sequence is obtained. The target sequence contains both syntactic information and knowledge information, that is, it contains two different types of information corresponding to the entity to be identified.
[0039] Step S140: determining the entity category corresponding to the target entity according to the target sequence.
[0040] Specifically, entity category recognition is performed using a target sequence containing two different types of information corresponding to the entity to be recognized. The entity category corresponding to the entity to be recognized can be accurately determined based on the syntactic relationship between the contexts and the knowledge information corresponding to the entity to be recognized. The existing technology only performs entity type recognition based on the dictionary and cannot determine the different meanings of the entity in different scenarios. Therefore, the above-mentioned entity type recognition method improves the accuracy of entity type recognition compared with the existing technology.
[0041] In one embodiment, the obtaining of entity sequences includes: obtaining a text sequence; constructing a corresponding syntactic dependency tree based on the text sequence; performing vector initialization on the syntactic dependency tree and the text sequence to obtain a corresponding syntactic vector tree and a text vector sequence; and determining the syntactic information vector corresponding to each entity to be identified based on the syntactic vector tree and the text vector sequence.
[0042] In which, the text sequence includes the multiple entities to be recognized, the syntactic dependency tree includes multiple child nodes and syntactic relationships between each of the child nodes, each of the child nodes corresponds to one of the entities to be recognized, the syntactic vector tree includes multiple relationship vectors, and the relationship vectors are used to indicate the syntactic relationships between each of the entities to be recognized, and the text vector sequence includes multiple initial vectors corresponding to the entities to be recognized.
[0043] Specifically, the text sequence includes unprocessed entities to be recognized. The syntactic analyzer is used to analyze and process the text sequence to generate a corresponding syntactic dependency tree. The syntactic dependency tree corresponds to a directed graph, that is, there are directed edges between each child node in the syntactic dependency tree. The directed edges are used to indicate the syntactic relationship between different child nodes, such as Figure 2 As shown, JetBlue and canceled are different entities to be identified. The directed edge nsubj between JetBlue and canceled points from canceled to JetBlue, indicating that the syntactic relationship between the two entities to be identified indicates that JetBlue is a noun subject.
[0044] The syntactic dependency tree is vector-initialized, that is, the syntactic relationship between each child node in the syntactic dependency tree is represented by a vector, and a relationship vector for representing the syntactic relationship is obtained; the text sequence is vector-initialized, that is, each entity to be recognized is represented by a vector, and an initial vector for representing the entity to be recognized is obtained.
[0045] In one embodiment, the syntactic information vector corresponding to each entity to be identified is determined based on the syntactic vector tree and the text vector sequence, including: obtaining a semantic vector; updating the initial vector of the root node in the syntactic vector tree to the semantic vector, wherein the root node is used to indicate any one of the entities to be identified; determining a pointing path between the target entity and each entity to be identified based on the syntactic vector tree, the pointing path being the entity to be identified pointing to the target entity through at least one of the relationship vectors; determining the syntactic information vector corresponding to the target entity based on the initial vector and the relationship vector of the entity to be identified on each of the pointing paths.
[0046] Specifically, the semantic vector is recorded as a CLS vector. The semantic vector can be used to integrate the syntactic relationships between the entities to be recognized in the text sequence, and can be used to indicate the semantics corresponding to the entire text sequence. Each syntactic dependency tree has a unique root node. The entity to be recognized corresponding to the root node does not depend on other entities to be recognized. The semantic vector is used to update the initial vector of the root node.
[0047] Since the syntactic vector tree contains relationship vectors corresponding to multiple pointing edges, the pointing path between the target entity and each entity to be identified can be determined based on the pointing edges. For example, the pointing path between canceled and JetBlue is canceled pointing to JetBlue through nsubj.
[0048] According to the corresponding initial vectors and relationship vectors of the entities to be identified on the pointing paths between the entities to be identified and the target entity, the corresponding syntactic information vector of the target entity is comprehensively determined so that the syntactic information vector contains the syntactic relationship between the target entity and the entities to be identified.
[0049] In one embodiment, the syntactic information vector corresponding to the target entity is determined based on the initial vectors of the entities to be identified on each of the pointing paths and the relationship vectors, including: adding the initial vectors of the entities to be identified on each of the pointing paths and the relationship vectors to obtain a syntactic vector; adding the syntactic vector and the initial vector corresponding to the target entity to obtain the syntactic information vector corresponding to the target entity.
[0050] Specifically, since the directed edge has a direction, the relationship vector corresponding to the directed edge has a direction sign, which is determined by the direction of the directed edge and the direction of the pointing path. When the direction of the directed edge is the same as the direction of the pointing path, the direction sign of the relationship vector is +; when the direction of the directed edge is opposite to the direction of the pointing path, the direction sign of the relationship vector is -.
[0051] Add the initial vector and the relationship vector of each entity to be identified on the pointing path. For example, the pointing path is canceled and points to JetBlue through nsubj. At this time, the direction of nsubj is the same as the pointing direction of the pointing path, and the pointing sign of the relationship vector corresponding to nsubj is +, that is, the syntactic vector corresponding to the pointing path is the initial vector corresponding to canceled plus the relationship vector corresponding to nsubj. When the pointing path is morning and points to canceled through mod, the pointing sign of the relationship vector corresponding to mod is -, and the syntactic vector corresponding to the pointing path is the initial vector corresponding to morning minus the relationship vector corresponding to mod. In this way, the syntactic vector corresponding to each pointing path pointing to the target entity can be determined, and the syntactic vector corresponding to each pointing path can be added to obtain the syntactic vector corresponding to the target entity, thereby fusing the syntactic relationship between each entity to be identified and the target entity.
[0052] Then, the syntactic vector corresponding to the target entity is added to the initial vector of the target entity to obtain the syntactic information vector corresponding to the target entity.
[0053] In one embodiment, obtaining the knowledge information vector corresponding to the target entity includes: obtaining knowledge information related to candidate entities in the corpus knowledge graph, wherein the candidate entities are entities other than the target entity among the multiple entities to be identified; converting the knowledge information into a corresponding vector representation to obtain the knowledge information vector.
[0054] Specifically, a corpus knowledge graph includes knowledge information from multiple different fields, including medicine, education, film and television, and science and technology. The structure of the corpus knowledge graph can be specifically subject information - relationship information - object information, or subject information - attribute information - attribute value. For example, if the subject information is Zhang, the related relationship information can be at least one of wife, daughter, son, father, and mother. When the relationship information is wife, the related object information is Chen. Alternatively, if the subject information is Zhang, the related attribute information is director, and the attribute value associated with this attribute information is the director's film "A," a corpus knowledge graph can be formed in this manner.
[0055] Search the corpus knowledge graph for knowledge information related to candidate entities. Candidate entities are entities to be identified in the text sequence other than the target entity. For example, if the target entity is "JetBlue" in the above example, then candidate entities include "canceled," "our," "flight," "this," "morning," "which," etc. Obtain knowledge information related to entities to be identified other than the target entity to determine the contextual semantics of the target entity. This is used to determine the semantic scenario in which the target entity resides, and convert the indicative information into a corresponding vector representation, namely a knowledge information vector, which is then used to accurately analyze the entity category of the target entity in combination with the scenario in which the target entity resides.
[0056] In one embodiment, the entity sequence and the knowledge information vector are spliced together to form a target sequence, including: adding the semantic vector to the first position of the entity sequence, and adding a separation identification vector to the last position of the entity sequence to obtain a spliced sequence; and splicing the knowledge information vector after the separation identification vector in the spliced sequence to form the target sequence.
[0057] Specifically, the CLS vector is added to the first position of the entity sequence, and the SEP vector is added to the last position of the entity sequence. The SEP vector is used as a separator to separate the entity sequence from the knowledge information vector, and each knowledge information vector is also separated by a separator. The separator can be " / ", "|", "—", etc. In this embodiment, "|" is used to separate each knowledge information vector to form a target sequence.
[0058] In one embodiment, determining the entity category corresponding to the target entity based on the target sequence includes: performing deep learning on the target sequence to obtain a corresponding output sequence; extracting a feature vector from the output vector corresponding to the target entity in the output sequence; determining the classification probability of the target entity belonging to each classification category based on the feature vector; and taking the classification category corresponding to the classification probability with the largest value as the entity category corresponding to the target entity.
[0059] The output sequence includes output vectors corresponding to each of the entities to be identified, and the feature vector includes the first word vector and the last word vector of the target entity.
[0060] Specifically, a language model is used to perform deep learning on the target sequence. The language model can be a LSTM model or a BERT model. In this embodiment, a BERT model is used to perform deep learning on the target sequence. The target sequence is input into the BERT model for deep learning. The BERT model outputs an output sequence corresponding to the target sequence. The output sequence includes an output vector corresponding to each entity to be identified, and the output vector is composed of a character vector corresponding to each character in the entity to be identified. For example, if the entity to be identified is "Minglu Technology", then the output vector corresponding to the entity to be identified is composed of character vectors corresponding to four characters. The first character vector and the last character vector are extracted from the output vector corresponding to the target entity. Taking the above example, if the target entity is "Minglu Technology", then the first character vector is the vector corresponding to "Ming", and the last character vector is the vector corresponding to "Technology".
[0061] Since the first and last characters in an entity are used to define an entity and a non-entity, or to define one entity from the next, the first and last characters in an entity contain more information. The feature vector composed of the first and last character vectors is input into the fully connected layer to obtain the classification probability of the target entity for each classification category. The classification category corresponding to the classification probability with the largest value is used as the entity category corresponding to the target entity. In this way, the entity type recognition of each entity to be identified in the text sequence is achieved.
[0062] Figure 1 FIG. 1 is a flow chart of an entity type identification method in one embodiment. It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0063] In one embodiment, Figure 3 As shown, an entity type identification device is provided, comprising:
[0064] An acquisition module 210 is configured to acquire an entity sequence, wherein the entity sequence includes syntactic information vectors corresponding to a plurality of entities to be identified, the syntactic information vectors including syntactic relationships between a target entity and each of the entities to be identified, the target entity being any one of the entities to be identified; and acquire a knowledge information vector corresponding to the target entity;
[0065] A concatenation module 220 is configured to concatenate the entity sequence and the knowledge information vector to form a target sequence;
[0066] The classification module 230 is configured to determine an entity category corresponding to the target entity according to the target sequence.
[0067] In one embodiment, the acquisition module 210 is specifically configured to:
[0068] Acquire a text sequence, wherein the text sequence includes the multiple entities to be recognized;
[0069] Constructing a corresponding syntactic dependency tree according to the text sequence, wherein the syntactic dependency tree includes a plurality of child nodes and syntactic relationships between the child nodes, and each child node corresponds to one of the entities to be identified;
[0070] Performing vector initialization on the syntactic dependency tree and the text sequence to obtain corresponding syntactic vector trees and text vector sequences, wherein the syntactic vector tree includes a plurality of relationship vectors, each of which is used to indicate a syntactic relationship between each of the entities to be identified, and the text vector sequence includes a plurality of initial vectors corresponding to the entities to be identified;
[0071] The syntactic information vector corresponding to each of the entities to be identified is determined according to the syntactic vector tree and the text vector sequence.
[0072] In one embodiment, the acquisition module 210 is specifically configured to:
[0073] Get semantic vector;
[0074] Updating the initial vector of the root node in the syntax vector tree to the semantic vector, wherein the root node is used to indicate any one of the entities to be identified;
[0075] Determine, based on the syntax vector tree, a pointing path between the target entity and each of the entities to be identified, wherein the pointing path is the entity to be identified pointing to the target entity through at least one of the relationship vectors;
[0076] The syntactic information vector corresponding to the target entity is determined according to the initial vector and the relationship vector of the entity to be identified on each of the pointing paths.
[0077] In one embodiment, the acquisition module 210 is specifically configured to:
[0078] Adding the initial vector of the entity to be identified on each pointing path and the relationship vector to obtain a syntax vector;
[0079] The syntax vector is added to the initial vector corresponding to the target entity to obtain the syntax information vector corresponding to the target entity.
[0080] In one embodiment, the acquisition module 210 is specifically configured to:
[0081] Acquire knowledge information related to a candidate entity in the corpus knowledge graph, wherein the candidate entity is an entity other than the target entity among the multiple entities to be identified;
[0082] The knowledge information is converted into a corresponding vector representation to obtain the knowledge information vector.
[0083] In one embodiment, the splicing module 220 is specifically configured to:
[0084] Adding the semantic vector to the first position of the entity sequence and adding the separation identification vector to the last position of the entity sequence to obtain a concatenated sequence;
[0085] The knowledge information vector is spliced after the separation identification vector in the splicing sequence to form the target sequence.
[0086] In one embodiment, the classification module 230 is specifically configured to:
[0087] Performing deep learning on the target sequence to obtain a corresponding output sequence, wherein the output sequence includes an output vector corresponding to each of the entities to be identified;
[0088] Extracting a feature vector from the output vector corresponding to the target entity in the output sequence, wherein the feature vector includes a first word vector and a last word vector of the target entity;
[0089] Determining the classification probability that the target entity belongs to each classification category according to the feature vector;
[0090] The classification probability corresponding to the largest value is used as the entity category corresponding to the target entity.
[0091] Figure 4 FIG1 shows an internal structure diagram of a computer device in one embodiment. The computer device may be a server. Figure 4As shown, the computer device includes a processor, a memory, a network interface, an input device and a display screen connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor may implement the entity type identification method. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor may implement the entity type identification method. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen. The input device of the computer device may be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.
[0092] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0093] In one embodiment, the entity type identification device provided by the present application can be implemented in the form of a computer program. The computer program can be used in Figure 4 The computer device is run on the computer device shown. The memory of the computer device can store various program modules that constitute the entity type identification device, such as, Figure 3 The acquisition module 210, the splicing module 220 and the classification module 230 are shown. The computer program composed of various program modules enables the processor to execute the steps of the entity type identification method of each embodiment of the present application described in this specification.
[0094] Figure 4 The computer device shown can be Figure 3 The acquisition module 210 in the entity type recognition device shown in the figure acquires an entity sequence, wherein the entity sequence includes syntactic information vectors corresponding to multiple entities to be identified, and the syntactic information vector contains the syntactic relationship between the target entity and each of the entities to be identified, and the target entity is any one of the entities to be identified; and acquires the knowledge information vector corresponding to the target entity. The computer device can execute splicing of the entity sequence and the knowledge information vector to form a target sequence through the splicing module 220. The computer device can execute determination of the entity category corresponding to the target entity based on the target sequence through the classification module 230.
[0095] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any one of the above embodiments when executing the computer program.
[0096] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in any one of the above embodiments is implemented.
[0097] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware to perform the processes through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When executed, the program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media used in the various embodiments provided herein may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).
[0098] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0099] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is intended to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for identifying entity types, characterized in that: The method comprises: Obtaining an entity sequence, wherein the entity sequence includes syntactic information vectors corresponding to a plurality of entities to be identified, the syntactic information vectors including syntactic relationships between a target entity and each of the entities to be identified, the target entity being any one of the entities to be identified, and the syntactic relationships including subject-predicate relationships, verb-object relationships, and attributive-predicate relationships; Obtaining a knowledge information vector corresponding to the target entity, wherein the knowledge information vector is used to indicate the knowledge information corresponding to the entity to be identified in the corpus knowledge graph, and the knowledge information includes subject information, relationship information, object information, attribute information, and attribute value; Concatenate the entity sequence and the knowledge information vector to form a target sequence; An entity category corresponding to the target entity is determined according to the target sequence.
2. The method according to claim 1, characterized in that The obtaining of the entity sequence includes: Acquire a text sequence, wherein the text sequence includes the multiple entities to be recognized; Constructing a corresponding syntactic dependency tree according to the text sequence, wherein the syntactic dependency tree includes a plurality of child nodes and syntactic relationships between the child nodes, and each child node corresponds to one of the entities to be identified; Performing vector initialization on the syntactic dependency tree and the text sequence to obtain corresponding syntactic vector trees and text vector sequences, wherein the syntactic vector tree includes a plurality of relationship vectors, each of which is used to indicate a syntactic relationship between each of the entities to be identified, and the text vector sequence includes a plurality of initial vectors corresponding to the entities to be identified; The syntactic information vector corresponding to each of the entities to be identified is determined according to the syntactic vector tree and the text vector sequence.
3. The method according to claim 2, characterized in that Determining the syntax information vector corresponding to each of the entities to be identified based on the syntax vector tree and the text vector sequence includes: Get semantic vector; Updating the initial vector of the root node in the syntax vector tree to the semantic vector, wherein the root node is used to indicate any one of the entities to be identified; Determine, based on the syntax vector tree, a pointing path between the target entity and each of the entities to be identified, wherein the pointing path is the entity to be identified pointing to the target entity through at least one of the relationship vectors; The syntactic information vector corresponding to the target entity is determined according to the initial vector and the relationship vector of the entity to be identified on each of the pointing paths.
4. The method according to claim 3, characterized in that The determining the syntactic information vector corresponding to the target entity according to the initial vectors and the relationship vectors of the entities to be identified on each of the pointing paths includes: Adding the initial vector of the entity to be identified on each pointing path and the relationship vector to obtain a syntax vector; The syntax vector is added to the initial vector corresponding to the target entity to obtain the syntax information vector corresponding to the target entity.
5. The method according to claim 3, characterized in that The acquiring of the knowledge information vector corresponding to the target entity includes: Acquire knowledge information related to a candidate entity in the corpus knowledge graph, wherein the candidate entity is an entity other than the target entity among the multiple entities to be identified; The knowledge information is converted into a corresponding vector representation to obtain the knowledge information vector.
6. The method according to claim 5, characterized in that The step of concatenating the entity sequence and the knowledge information vector to form a target sequence includes: Adding the semantic vector to the first position of the entity sequence and adding the separation identifier vector to the last position of the entity sequence to obtain a concatenated sequence; The knowledge information vector is spliced after the separation identification vector in the splicing sequence to form the target sequence.
7. The method according to claim 6, characterized in that The determining the entity category corresponding to the target entity according to the target sequence includes: Performing deep learning on the target sequence to obtain a corresponding output sequence, wherein the output sequence includes an output vector corresponding to each of the entities to be identified; Extracting a feature vector from the output vector corresponding to the target entity in the output sequence, wherein the feature vector includes a first word vector and a last word vector of the target entity; Determining the classification probability that the target entity belongs to each classification category according to the feature vector; The classification probability corresponding to the largest value is used as the entity category corresponding to the target entity.
8. An entity type identification device, characterized in that: The device comprises: An acquisition module is configured to acquire an entity sequence, wherein the entity sequence includes syntactic information vectors corresponding to a plurality of entities to be identified, the syntactic information vectors including syntactic relationships between a target entity and each of the entities to be identified, the target entity being any one of the entities to be identified, the syntactic relationships including subject-predicate relationships, verb-object relationships, and attributive-predicate relationships; and acquire a knowledge information vector corresponding to the target entity, wherein the knowledge information vector is used to indicate knowledge information corresponding to the entity to be identified in a corpus knowledge graph, the knowledge information including subject information, relationship information, object information, attribute information, and attribute values. A splicing module, configured to splice the entity sequence and the knowledge information vector to form a target sequence; A classification module is used to determine the entity category corresponding to the target entity according to the target sequence.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Entity relationship extraction method and system, electronic device and storage medium
CN113536795A