CN111651989A - Named entity recognition method and device, storage medium and electronic device - Google Patents

Named entity recognition method and device, storage medium and electronic device Download PDF

Info

Publication number
CN111651989A
CN111651989A CN202010286857.XA CN202010286857A CN111651989A CN 111651989 A CN111651989 A CN 111651989A CN 202010286857 A CN202010286857 A CN 202010286857A CN 111651989 A CN111651989 A CN 111651989A
Authority
CN
China
Prior art keywords
task
recognition
identification
target
determining
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.)
Granted
Application number
CN202010286857.XA
Other languages
Chinese (zh)
Other versions
CN111651989B (en
Inventor
伯仲璞
王道广
孙靖文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Minglue Artificial Intelligence Group Co Ltd
Original Assignee
Shanghai Minglue Artificial Intelligence Group Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Minglue Artificial Intelligence Group Co Ltd filed Critical Shanghai Minglue Artificial Intelligence Group Co Ltd
Priority to CN202010286857.XA priority Critical patent/CN111651989B/en
Publication of CN111651989A publication Critical patent/CN111651989A/en
Application granted granted Critical
Publication of CN111651989B publication Critical patent/CN111651989B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition

Abstract

The invention discloses a named entity identification method and device, a storage medium and an electronic device. Wherein, the method comprises the following steps: acquiring a target text to be identified, and determining attribute information of a first identification task in the target text; constructing an attribute identification task by taking the attribute information as a target, and determining the attribute identification task as a second identification task under the condition that the attribute identification task is a target task; the method comprises the steps of inputting a first recognition task and a second recognition task into a target neural network model, and outputting a named entity of a target text, wherein the target neural network model is obtained through training of marking information of a training sample and the training sample, the purpose of introducing the second recognition task and determining entity name recognition according to the first recognition task and the second recognition task is achieved, and the technical problem that in the prior art, in order to accurately achieve named entity recognition, cost is high is solved.

Description

Named entity recognition method and device, storage medium and electronic device
Technical Field
The invention relates to the field of named entity identification, in particular to a method and a device for identifying a named entity, a storage medium and an electronic device.
Background
Named entity recognition tasks are the classic tasks and the hot topic in the field of natural language processing, and have been widely concerned in academia and industry for the last decades of rapid development of natural language processing technology.
The current NER technology for named entity recognition is faced with simple tasks such as company name recognition, person name recognition, civilian recognition and the like, and indexes such as accuracy, recall rate and the like can reach higher levels on the premise of proper data volume, so that the indexes of industrial application are reached.
For complex named entity recognition, the prior art generally adopts the approach of not changing the NER model but by continuously adding training data sets in order to be able to achieve convergence of the sample space. On one hand, the method needs to pay more data labeling cost for increasing the training data set, and meanwhile, the time for labeling the data can lead to task progress; on the other hand, the problem often cannot be solved effectively by simply increasing the training data, and the capability of the model cannot be fundamentally improved by increasing the data.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a named entity identification method and device, a storage medium and an electronic device, which at least solve the technical problem of high cost for accurately realizing named entity identification in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a named entity identifying method, including: acquiring a target text to be identified, and determining attribute information of a first identification task in the target text; constructing an attribute identification task by taking the attribute information as a target, and determining the attribute identification task as a second identification task under the condition that the attribute identification task is a target task; and inputting the first recognition task and the second recognition task into a target neural network model, and outputting a named entity of the target text, wherein the target neural network model is obtained by training a training sample and the labeling information of the training sample.
According to another aspect of the embodiments of the present invention, there is also provided a named entity identifying device, including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a target text to be identified and determining attribute information of a first identification task in the target text; the determining unit is used for constructing an attribute identification task by taking the attribute information as a target, and determining the attribute identification task as a second identification task under the condition that the attribute identification task is a target task; and the output unit is used for inputting the first recognition task and the second recognition task into a target neural network model and outputting the named entity of the target text, wherein the target neural network model is obtained by training a training sample and the labeling information of the training sample.
According to a further aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above named entity recognition method when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the named entity identifying method through the computer program.
In the embodiment of the invention, the attribute information of a first recognition task in a target text is determined by acquiring the target text to be recognized; constructing an attribute identification task by taking the attribute information as a target, and determining the attribute identification task as a second identification task under the condition that the attribute identification task is a target class task; the method comprises the steps of inputting a first recognition task and a second recognition task into a target neural network model, and outputting a named entity of a target text, wherein the target neural network model is obtained through training of marking information of a training sample and the training sample, the purpose of introducing the second recognition task and determining entity named recognition according to the first recognition task and the second recognition task is achieved, and therefore the problem that in the prior art, the training sample is added for accurately realizing named entity recognition is avoided, and the technical problem that in the prior art, cost is high for accurately realizing named entity recognition is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention to a proper form. In the drawings:
FIG. 1 is a schematic diagram of an application environment of an alternative named entity recognition method according to an embodiment of the invention;
FIG. 2 is a flow diagram of an alternative named entity recognition method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an alternative multitasking serial named entity recognition network architecture according to embodiments of the present invention;
FIG. 4 is a schematic diagram of an alternative named entity recognition apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For a better understanding of the examples provided herein, some of the terms are now described below:
naming an entity: entities with special meaning or strong reference in the text, such as names of people, places, names of organizations, dates and times, proper nouns and the like.
Named entity recognition: named Entity recognition (Named Entity recognition) is a classic task in natural language processing, and the task aims to realize automatic recognition of Named entities in texts through algorithms.
Complex named entity recognition: the named entity identifies a subset of tasks, particularly NER tasks that need not only the characteristics of the entity itself, but also need to be completed in view of contextual semantic information. Such as extracting event subjects from news text.
According to an aspect of the embodiments of the present invention, a named entity recognition method is provided, and optionally, as an optional implementation manner, the named entity recognition method may be applied to a hardware environment as shown in fig. 1, and may include, but is not limited to, a terminal device 102, a network 110, and a server 112.
The terminal device 102 may include, but is not limited to: a human-computer interaction screen 104, a processor 106 and a memory 108. The man-machine interaction screen 104 is used for acquiring a man-machine interaction instruction through a man-machine interaction interface and is also used for a target text; the processor 106 is configured to complete the identification of the named entity in response to the human-computer interaction instruction. The memory 108 is used for storing information such as target text and attributes of the named entity identification task. Here, the server may include but is not limited to: the system comprises a database 114 and a processing engine 116, wherein the processing engine 116 is used for calling a target text to be identified in the database 114 and determining attribute information of a first identification task in the target text; constructing an attribute identification task by taking the attribute information as a target, and determining the attribute identification task as a second identification task under the condition that the attribute identification task is a target task; the method comprises the steps of inputting a first recognition task and a second recognition task into a target neural network model, and outputting a named entity of a target text, wherein the target neural network model is obtained through training of a training sample and label information of the training sample, so that the aim of introducing the second recognition task and determining entity named recognition according to the first recognition task and the second recognition task is fulfilled, the problem that in the prior art, the training sample is added for accurately realizing named entity recognition is avoided, and the technical problem that in the prior art, the cost for accurately realizing named entity recognition is high is solved.
The specific process comprises the following steps: in steps S102-S110, the target text is obtained and sent to the server 112 via the network 110. Determining, at the server 112, attribute information of the first recognition task in the target text; constructing an attribute identification task by taking the attribute information as a target, and determining the attribute identification task as a second identification task under the condition that the attribute identification task is a target class task; and inputting the first recognition task and the second recognition task into a target neural network model, and outputting a named entity of the target text, wherein the target neural network model is obtained by training a training sample and the labeling information of the training sample. And then returns the determined result to the terminal device 102.
Then, in step S102-S110, the terminal device 102 acquires a target text to be identified, and determines attribute information of a first identification task in the target text; constructing an attribute identification task by taking the attribute information as a target, and determining the attribute identification task as a second identification task under the condition that the attribute identification task is a target task; the method comprises the steps of inputting a first recognition task and a second recognition task into a target neural network model, and outputting a named entity of a target text, wherein the target neural network model is obtained through training of marking information of a training sample and the training sample, the purpose of introducing the second recognition task and determining entity named recognition according to the first recognition task and the second recognition task is achieved, and therefore the problem that in the prior art, the training sample is added for accurately realizing named entity recognition is avoided, and the technical problem that in the prior art, the cost is high for accurately realizing named entity recognition is solved.
Optionally, in this embodiment, the named entity identification method may be applied, but not limited to, in the server 112, for assisting the application client in performing named entity identification processing on the published target file. The application client may be but not limited to run in the terminal device 102, and the terminal device 102 may be but not limited to a mobile phone, a tablet computer, a notebook computer, a PC, and other terminal devices that support running the application client. The server 112 and the terminal device 102 may implement data interaction through a network, which may include but is not limited to a wireless network or a wired network. Wherein, this wireless network includes: bluetooth, WIFI, and other networks that enable wireless communication. Such wired networks may include, but are not limited to: wide area networks, metropolitan area networks, and local area networks. The above is merely an example, and this is not limited in this embodiment.
Optionally, as an optional implementation manner, as shown in fig. 2, the named entity identifying method includes:
step S202, a target text to be recognized is obtained, and attribute information of a first recognition task in the target text is determined.
And step S204, constructing an attribute identification task by taking the attribute information as a target, and determining the attribute identification task as a second identification task under the condition that the attribute identification task is a target task.
And S206, inputting the first recognition task and the second recognition task into a target neural network model, and outputting the named entity of the target text, wherein the target neural network model is obtained by training the training samples and the labeling information of the training samples.
Optionally, the solution in this embodiment may include, but is not limited to, application in: and identifying the name of a person and the name of a place in the news text. The target text may include, but is not limited to, picture text including place names and person names, and various complex identifications of named entities of person names and place names.
The scheme of the embodiment is described by taking an event body extraction task of a news text as an example, and the extraction of the news text event body refers to the extraction of the event body of the reported event in the news text, and the event body may be a person or an organization.
The second recognition task is a named entity recognition task which is low in extraction difficulty and the extraction target of which completely comprises the first recognition task. The second recognition task is simple, a good extraction result can be easily obtained, meanwhile, the second recognition task result can provide useful information for the first recognition task, and when the network structure can effectively utilize the information of the second recognition task, the accuracy of the first recognition task can be effectively improved.
The labeling process for determining the second recognition task is as follows:
step one, confirming an extraction target of a current task (an original task, namely a first identification task);
step two, summarizing the current task extraction target attribute;
step three, judging whether the task difficulty is lower by taking the target attribute as an extraction target;
step four, determining a second labeling task;
as shown in table 1, the second recognition task extracted from the main body of the news text event is described as follows:
TABLE 1
Figure BDA0002448849160000071
Optionally, in this embodiment, determining that the first recognition task belongs to the target class recognition task according to the attribute information may include:
acquiring a mapping relation table of the first identification task, wherein the difficulty of identification of the first identification task is recorded in the mapping relation table, and the attribute information comprises the difficulty;
and determining the difficulty degree of the first identification task according to the matching of the attribute information and the mapping table, wherein the target class identification task represents the difficulty degree of the first identification task.
Under the condition that the identification tasks recorded in the mapping table comprise three levels of simple, medium and difficult, the first identification task is determined to belong to the simple identification task according to the matching of the attribute information and the mapping table;
a second recognition task is determined from the first recognition task, wherein the second recognition task represents a subtask of the first recognition task.
Optionally, in this embodiment, inputting the first recognition task and the second recognition task into the target neural network model, and outputting the named entity of the target text may include:
acquiring training texts in a training sample set, and performing naming entity labeling on each training text in the training sample set;
acquiring the labeling information of a first recognition task and the labeling information of a second recognition task in a training text;
training a neural network model for the first recognition task and the second recognition task, and training the neural network model by adopting an error inverse propagation mode;
and determining the target neural network model when the parameters of the neural network model converge to the preset threshold value.
Wherein, the error inverse propagation mode includes:
adjusting parameters of the neural network model according to the prediction error of the first recognition task and the prediction error of the second recognition task;
and determining the neural network as a target neural network model under the condition that the parameters of the neural network model converge to a preset threshold value.
According to the embodiment provided by the application, the target text to be identified is obtained, and the attribute information of the first identification task in the target text is determined; constructing an attribute identification task by taking the attribute information as a target, and determining the attribute identification task as a second identification task under the condition that the attribute identification task is a target task; the method comprises the steps of inputting a first recognition task and a second recognition task into a target neural network model, and outputting a named entity of a target text, wherein the target neural network model is obtained through training of marking information of a training sample and the training sample, the purpose of introducing the second recognition task and determining entity naming recognition according to the first recognition task and the second recognition task is achieved, and therefore the problem that in the prior art, the training sample is added for accurately achieving named entity recognition is avoided, and the technical problem that in the prior art, cost is high for accurately achieving named entity recognition is solved.
As an alternative embodiment, the present application further provides a named entity identification method based on multitask learning.
The core idea of the method in the embodiment is as follows: firstly, the original task is summarized, an auxiliary recognition task with lower difficulty is introduced, and then the auxiliary task and the original task are simultaneously completed under a serial multitask neural network model to finally realize the complex named entity recognition. In addition, the serial multi-task network structure provided by the method can effectively increase information transmission among the subtasks so as to improve the final effect of the model.
The steps for realizing the scheme are as follows: 1, constructing an auxiliary task (corresponding to a second identification task) according to the original task (a first identification task). And 2, constructing a model, namely providing a serial multi-task learning deep network structure for processing a complex named entity recognition task. And 3, network training.
Step 1, constructing an auxiliary task (equivalent to a second identification task) according to an original task (a first identification task);
the auxiliary task definition is described by taking an event body extraction task of news text as an example, and the news text event body extraction refers to extracting an event body of a reported event in the news text, wherein the event body can be a person or an organization.
The auxiliary task is a named entity recognition task which is low in extraction difficulty and the extraction target completely comprises the original task. The auxiliary task is simple, a good extraction result can be obtained easily, meanwhile, the auxiliary task result can provide useful information for the original task, and when the network structure can effectively utilize the auxiliary task information, the accuracy of the original task can be effectively improved.
Step 2, constructing a neural network model;
in this embodiment, a serial named entity recognition network based on multitask learning is provided, and the network structure is as shown in fig. 3, which is a schematic diagram of a structure of a multitask serial named entity recognition network.
The whole network is a multi-task learning network architecture, and a plurality of tasks share a text embedding layer and a multi-head attention layer. The auxiliary task and the original task are used as sub-learning tasks to jointly participate in model training. It should be noted that fig. 3 shows the network structure when there is only one auxiliary task, and when there are multiple auxiliary tasks, each sub-network of the auxiliary task has one auxiliary task network (e.g. the left sub-network in fig. 3).
The text embedding layer can use various embedding methods such as word2vector, BERT, and the like. The role of the text embedding layer is to learn the vector representation of each character in the text, which may have different representation capabilities depending on the embedding method, e.g. BERT may consider the context when modeling the character vector, word2vec only considers the character's own features. The multi-head attention layer is used for providing full-text attention from various different angles, and the multi-head attention layer is followed by the full-connection layer of each subtask, so that each subtask can select a part suitable for the task from various attention (as shown in the process (b) in FIG. 3).
It should be noted that text embedding does not specify a specific embedding method, and multiple alternatives exist, such as word2vector, bert, and the like.
The CRF layer output results of each subtask have two functions. First, used for producing the task output; secondly, the output vector is spliced with the result of the main task full-link layer and then enters the CRF layer of the main task to be used for generating the output result of the main task (as shown in processes (c), (d) in FIG. 3). By the method, the main task network can consider the judgment result of each subtask when making the NER, and the problem of information communication between the main task and the subtask is solved.
In the network structure proposed in this embodiment, a dropout layer may be added after the network is shared, or a dropout layer may be added in each subtask network structure. The Droppout network structure can effectively prevent overfitting in the network training process, and the fundamental structure of the network is not changed by adding Droppout.
And step 3, training a model.
And optimizing model parameters by using an error inverse propagation mode during model training, respectively generating prediction errors during training of the auxiliary task and the main task, and optimizing the parameters by using the errors. The information transmission process from each subtask to the main task (process (a) in fig. 3) only participates in model phase parameter transmission, and does not participate in error inverse propagation during model training. Each auxiliary task only takes into account the current task label when optimizing the parameters, and does not have to take into account the main task. This makes the model more convergent as a whole.
Through the embodiment that this application provided, have following beneficial effect:
1. the network structure can effectively improve the accuracy and recall rate of the model when processing the complex named entity recognition task. By defining auxiliary tasks and applying the network structure provided by the invention, common knowledge (such as a news event subject is a person or an organization) can be effectively introduced into the named entity recognition model, so that the accuracy and recall rate of the model are effectively improved.
2. The network structure is easier to fit and train. A serial multi-task network structure is added on the basis of a multi-task learning network structure framework, and compared with other multi-task network structures, the serial network structure is easier to converge during training, and the training is simpler.
3. The network structure has fewer network parameters, and by introducing a multi-task learning framework and by means of the characteristic of multi-task learning to share part of the network structure, the network structure has fewer network parameters in a solution of multiple serial models, so that the network structure can run faster in practical use.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiment of the present invention, there is also provided a named entity recognition apparatus for implementing the named entity recognition method described above. As shown in fig. 4, the named entity identifying apparatus includes: an acquisition unit 41, a determination unit 43, and an output unit 45.
The acquiring unit 41 is configured to acquire a target text to be recognized and determine attribute information of a first recognition task in the target text.
The determining unit 43 is configured to construct an attribute identification task with the attribute information as a target, and in a case where the attribute identification task is a target class task, determine the attribute identification task as a second identification task.
And the output unit 45 is configured to input the first recognition task and the second recognition task into a target neural network model, and output a named entity of the target text, where the target neural network model is obtained by training a training sample and label information of the training sample.
Optionally, in this embodiment, the determining unit 43 may include:
the first acquisition module is used for acquiring a mapping relation table of the first identification task, wherein the mapping relation table records the difficulty level of identification of the first identification task, and the attribute information comprises the difficulty level;
and the first determining module is used for determining the difficulty degree of the first identification task according to the matching of the attribute information and the mapping table, wherein the target class identification task represents the difficulty degree of the first identification task.
Optionally, the apparatus further comprises:
the second determining module is used for determining that the first recognition task belongs to the simple recognition task under the condition that the recognition tasks recorded in the mapping table comprise three levels, namely simple, medium and difficult, according to the matching of the attribute information and the mapping table;
and the third determining module is used for determining a second recognition task according to the first recognition task, wherein the second recognition task represents a subtask of the first recognition task.
The output unit 45 may include:
the second acquisition module is used for acquiring the training texts in the training sample set and labeling the named entities of each training text in the training sample set;
the third acquisition module is used for acquiring the labeling information of the first recognition task and the labeling information of the second recognition task in the training text;
the adjusting module is used for training the neural network model for the first recognition task and the second recognition task and training the neural network model by adopting an error inverse propagation mode;
and the fourth determination module is used for determining the target neural network model when the parameters of the neural network model converge to the preset threshold value.
Wherein, the error inverse propagation mode includes: adjusting parameters of the neural network model according to the prediction error of the first recognition task and the prediction error of the second recognition task; and determining the neural network as a target neural network model under the condition that the parameters of the neural network model converge to a preset threshold value.
By the embodiment provided by the application, the obtaining unit 41 obtains a target text to be identified, and determines attribute information of a first identification task in the target text; the determining unit 43 determines the second recognition task from the first recognition task when determining that the first recognition task belongs to the target class recognition task according to the attribute information; the output unit 45 inputs the first recognition task and the second recognition task into a target neural network model, and outputs the named entity of the target text, wherein the target neural network model is obtained by training a training sample and the labeling information of the training sample. The method achieves the purpose of introducing the second recognition task and then determining the entity naming recognition according to the first recognition task and the second recognition task, thereby avoiding the addition of training samples for accurately realizing the naming entity recognition in the prior art and further solving the technical problem of high cost for accurately realizing the naming entity recognition in the prior art.
According to yet another aspect of an embodiment of the present invention, there is also provided an electronic device for implementing the named entity identifying method, as shown in fig. 5, the electronic device includes a memory 502 and a processor 504, the memory 502 stores a computer program therein, and the processor 504 is configured to execute the steps in any one of the method embodiments through the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring a target text to be recognized, and determining attribute information of a first recognition task in the target text;
s2, constructing an attribute identification task by taking the attribute information as a target, and determining the attribute identification task as a second identification task under the condition that the attribute identification task is a target task;
and S3, inputting the first recognition task and the second recognition task into a target neural network model, and outputting the named entity of the target text, wherein the target neural network model is obtained by training the training samples and the labeling information of the training samples.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 5 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 5 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
The memory 502 may be used to store software programs and modules, such as program instructions/modules corresponding to the named entity identifying method and apparatus in the embodiment of the present invention, and the processor 504 executes various functional applications and data processing by running the software programs and modules stored in the memory 502, that is, implementing the named entity identifying method. The memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 502 may further include memory located remotely from processor 504, which may be connected to a terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 502 may be, but is not limited to, specifically configured to store target text, named entities, and other information. As an example, as shown in fig. 5, the memory 502 may include, but is not limited to, the acquiring unit 41, the determining unit 43, and the outputting unit 45 of the named entity identifying apparatus. In addition, other module units in the named entity identifying apparatus may also be included, but are not limited to, and are not described in detail in this example.
Optionally, the transmission device 506 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 506 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 506 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In addition, the electronic device further includes: a display 508 for displaying the target text to be recognized; and a connection bus 510 for connecting the respective module parts in the above-described electronic apparatus.
According to a further aspect of an embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring a target text to be recognized, and determining attribute information of a first recognition task in the target text;
s2, constructing an attribute identification task by taking the attribute information as a target, and determining the attribute identification task as a second identification task under the condition that the attribute identification task is a target task;
and S3, inputting the first recognition task and the second recognition task into a target neural network model, and outputting the named entity of the target text, wherein the target neural network model is obtained by training the training samples and the labeling information of the training samples.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware related to the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may also be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A named entity recognition method, comprising:
acquiring a target text to be identified, and determining attribute information of a first identification task in the target text;
constructing an attribute identification task by taking the attribute information as a target, and determining the attribute identification task as a second identification task under the condition that the attribute identification task is a target task;
and inputting the first recognition task and the second recognition task into a target neural network model, and outputting the named entity of the target text, wherein the target neural network model is obtained by training a training sample and the labeling information of the training sample.
2. The method according to claim 1, wherein in the case that the attribute identification task is a target class task, determining the attribute identification task as a second identification task comprises:
acquiring a mapping relation table of the first identification task, wherein the mapping relation table records the difficulty level of identification of the first identification task, and the attribute information comprises the difficulty level;
and determining the difficulty degree of the first identification task according to the matching of the attribute information and the mapping table, wherein the target class identification task represents the difficulty degree of the first identification task.
3. The method of claim 2, comprising:
under the condition that identification tasks including simple, medium and difficult grades are recorded in the mapping table, the first identification task is determined to belong to a simple identification task according to the fact that the attribute information is matched with the mapping table;
determining the attribute identification task as a second identification task, wherein the second identification task represents a subtask of the first identification task.
4. The method of claim 1, wherein inputting the first recognition task and the second recognition task into a target neural network model, and outputting a named entity of the target text comprises:
acquiring training texts in a training sample set, and carrying out named entity labeling on each training text in the training sample set;
acquiring the labeling information of a first recognition task and the labeling information of a second recognition task in a training text;
training a neural network model for the first recognition task and the second recognition task, and training the neural network model by adopting an error inverse propagation mode;
determining the target neural network model when the parameters of the neural network model converge to a predetermined threshold.
5. The method of claim 4, wherein the error counter-propagating means comprises:
adjusting parameters of the neural network model according to the prediction error of the first recognition task and the prediction error of the second recognition task;
determining the neural network as the target neural network model if the neural network model parameters converge to a predetermined threshold.
6. A named entity recognition apparatus, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a target text to be identified and determining attribute information of a first identification task in the target text;
the determining unit is used for constructing an attribute identification task by taking the attribute information as a target, and determining the attribute identification task as a second identification task under the condition that the attribute identification task is a target class identification task;
and the output unit is used for inputting the first recognition task and the second recognition task into a target neural network model and outputting the named entity of the target text, wherein the target neural network model is obtained by training a training sample and the labeling information of the training sample.
7. The apparatus of claim 6, wherein the determining unit comprises:
a first obtaining module, configured to obtain a mapping relationship table of the first identification task, where a difficulty level of identification of the first identification task is recorded in the mapping relationship table, and the attribute information includes the difficulty level;
and the first determining module is used for determining the difficulty degree of the first identification task according to the matching of the attribute information and the mapping table, wherein the target class identification task represents the difficulty degree of the first identification task.
8. The apparatus of claim 7, comprising:
the second determining module is used for determining that the first identification task belongs to a simple identification task according to the matching of the attribute information and the mapping table under the condition that the identification tasks recorded in the mapping table comprise three levels of simplicity, medium and difficulty;
a third determining module, configured to determine the second recognition task according to the first recognition task, where the second recognition task represents a subtask of the first recognition task.
9. A computer-readable storage medium comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 5.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 5 by means of the computer program.
CN202010286857.XA 2020-04-13 2020-04-13 Named entity recognition method and device, storage medium and electronic device Active CN111651989B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010286857.XA CN111651989B (en) 2020-04-13 2020-04-13 Named entity recognition method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010286857.XA CN111651989B (en) 2020-04-13 2020-04-13 Named entity recognition method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN111651989A true CN111651989A (en) 2020-09-11
CN111651989B CN111651989B (en) 2024-04-02

Family

ID=72346462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010286857.XA Active CN111651989B (en) 2020-04-13 2020-04-13 Named entity recognition method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN111651989B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112270193A (en) * 2020-11-02 2021-01-26 重庆邮电大学 Chinese named entity identification method based on BERT-FLAT
CN112818701A (en) * 2021-02-01 2021-05-18 上海明略人工智能(集团)有限公司 Method, device and equipment for determining dialogue entity recognition model

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9058317B1 (en) * 2012-11-01 2015-06-16 Digital Reasoning Systems, Inc. System and method for machine learning management
CN107766787A (en) * 2016-08-16 2018-03-06 深圳云天励飞技术有限公司 Face character recognition methods, device, terminal and storage medium
CN108536679A (en) * 2018-04-13 2018-09-14 腾讯科技(成都)有限公司 Name entity recognition method, device, equipment and computer readable storage medium
CN109062901A (en) * 2018-08-14 2018-12-21 第四范式(北京)技术有限公司 Neural network training method and device and name entity recognition method and device
WO2019008394A1 (en) * 2017-07-07 2019-01-10 Cscout Ltd Digital information capture and retrieval
CN109190120A (en) * 2018-08-31 2019-01-11 第四范式(北京)技术有限公司 Neural network training method and device and name entity recognition method and device
CN110287480A (en) * 2019-05-27 2019-09-27 广州多益网络股份有限公司 A kind of name entity recognition method, device, storage medium and terminal device
CN110851566A (en) * 2019-11-04 2020-02-28 沈阳雅译网络技术有限公司 Improved differentiable network structure searching method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9058317B1 (en) * 2012-11-01 2015-06-16 Digital Reasoning Systems, Inc. System and method for machine learning management
CN107766787A (en) * 2016-08-16 2018-03-06 深圳云天励飞技术有限公司 Face character recognition methods, device, terminal and storage medium
WO2019008394A1 (en) * 2017-07-07 2019-01-10 Cscout Ltd Digital information capture and retrieval
CN108536679A (en) * 2018-04-13 2018-09-14 腾讯科技(成都)有限公司 Name entity recognition method, device, equipment and computer readable storage medium
CN109062901A (en) * 2018-08-14 2018-12-21 第四范式(北京)技术有限公司 Neural network training method and device and name entity recognition method and device
CN109190120A (en) * 2018-08-31 2019-01-11 第四范式(北京)技术有限公司 Neural network training method and device and name entity recognition method and device
CN110287480A (en) * 2019-05-27 2019-09-27 广州多益网络股份有限公司 A kind of name entity recognition method, device, storage medium and terminal device
CN110851566A (en) * 2019-11-04 2020-02-28 沈阳雅译网络技术有限公司 Improved differentiable network structure searching method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王蕾;谢云;周俊生;顾彦慧;曲维光;: "基于神经网络的片段级中文命名实体识别" *
郜成胜;张君福;李伟平;赵文;张世琨;: "一种基于混合神经网络的命名实体识别与共指消解联合模型" *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112270193A (en) * 2020-11-02 2021-01-26 重庆邮电大学 Chinese named entity identification method based on BERT-FLAT
CN112818701A (en) * 2021-02-01 2021-05-18 上海明略人工智能(集团)有限公司 Method, device and equipment for determining dialogue entity recognition model
CN112818701B (en) * 2021-02-01 2023-07-04 上海明略人工智能(集团)有限公司 Method, device and equipment for determining dialogue entity recognition model

Also Published As

Publication number Publication date
CN111651989B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
CN111277706B (en) Application recommendation method and device, storage medium and electronic equipment
CN107451274B (en) Method, device and equipment for pushing auxiliary customer service information and storage medium
CN116127020A (en) Method for training generated large language model and searching method based on model
US20220343183A1 (en) Human-computer interaction method and apparatus, storage medium and electronic device
CN111651989B (en) Named entity recognition method and device, storage medium and electronic device
WO2019217214A1 (en) Personal history recall
CN116303962A (en) Dialogue generation method, training method, device and equipment for deep learning model
CN116521841A (en) Method, device, equipment and medium for generating reply information
CN111191133A (en) Service search processing method, device and equipment
CA3147341A1 (en) Category phrase recognition method, model training method, device and system
CN111931503B (en) Information extraction method and device, equipment and computer readable storage medium
CN116501960B (en) Content retrieval method, device, equipment and medium
CN108509442B (en) Search method and apparatus, server, and computer-readable storage medium
CN113342948A (en) Intelligent question and answer method and device
US20210357682A1 (en) Artificial intelligence driven image retrieval
CN109829033A (en) Method for exhibiting data and terminal device
CN111814044A (en) Recommendation method and device, terminal equipment and storage medium
CN112148836A (en) Multi-modal information processing method, device, equipment and storage medium
WO2023040545A1 (en) Data processing method and apparatus, device, storage medium, and program product
JP2023554210A (en) Sort model training method and apparatus for intelligent recommendation, intelligent recommendation method and apparatus, electronic equipment, storage medium, and computer program
CN107071553A (en) A kind of method, device and computer-readable recording medium for changing video speech
CN116205686A (en) Method, device, equipment and storage medium for recommending multimedia resources
CN110232393B (en) Data processing method and device, storage medium and electronic device
CN110895924B (en) Method and device for reading document content aloud, electronic equipment and readable storage medium
CN111046161A (en) Intelligent dialogue method and device for commodity marketing scene

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