A method, apparatus, electronic device and storage medium for named entity extraction

By extracting multiple features of text information in the named entity extraction method and inputting it into the entity extraction network, the problem of existing methods performing poorly during testing is solved, and higher accuracy of named entity prediction is achieved.

CN114386414BActive Publication Date: 2025-07-01SHANJIE INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111463995.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2025-07-01
Estimated Expiration
2041-12-03

AI Technical Summary

Technical Problem

The existing naming entity extraction method has poor results during testing, mainly because the model trained in corpus that only performs word segmentation processing fails to effectively extract text features.

Method used

Before inputting text features into preset entities to extract networks, the channel features, spatial features and context information features of text information are extracted, and these features are input into preset entities to extract networks to improve the prediction accuracy of named entities.

Benefits of technology

By extracting multiple text features and inputting entities to extract the network, the prediction accuracy of named entities is significantly improved and the performance of the model in testing is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114386414B_ABST
    Figure CN114386414B_ABST
Patent Text Reader

Abstract

The present application discloses a named entity extraction method, apparatus, electronic device and storage medium, relating to the technical field of deep learning. The named entity extraction method includes: obtaining the text information of the to-be-processed corpus information; extracting the text features of the text information, where the text features include the channel features, spatial features and context information features of the text information; inputting the text features into a preset entity extraction network to output the named entity extraction result of the to-be-processed corpus. Therefore, the present application improves the accuracy of the prediction of named entities by extracting the text features of the text information before inputting the text features into the preset entity extraction network and then inputting the text features into the preset entity extraction network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of deep learning, and in particular, to a named entity extraction method, apparatus, electronic device, and storage medium. Background Art

[0002] Named entity extraction is a subtask of information extraction, which refers to extracting entity information such as time, location, and person names predefined from text data.

[0003] Generally, the obtained corpus is input into a model of a recurrent neural network, and after a series of trainings, a target neural network model is obtained, and then the target neural network model is applied to an actual scenario.

[0004] In the existing named entity extraction method, only word segmentation processing is performed on the corpus after obtaining the corpus, and the word-segmented corpus is input into a model of a recurrent neural network. The model trained with only the word-segmented corpus has a poor performance result during testing. Summary of the Invention

[0005] The purpose of the present application is to provide a named entity extraction method, apparatus, electronic device, and storage medium, which can extract text features of text information before inputting the text features into a preset entity extraction network, and input the text information after the extraction of the text features into the preset entity extraction network, thereby improving the accuracy of predicting named entities.

[0006] The first aspect of the embodiment of the present application provides a named entity extraction method, including: obtaining text information of to-be-processed corpus information; extracting text features of the text information, where the text features include channel features, spatial features, and context information features of the text information; inputting the text features into a preset entity extraction network, and outputting a named entity extraction result of the to-be-processed corpus.

[0007] In one embodiment, the extracting text features of the text information, where the text features include channel features, spatial features, and context information features of the text information, includes: inputting the text information into a first feature extraction network, and outputting channel features and spatial features of the text information; inputting the text information into a second feature extraction network, and outputting context information features of the text information.

[0008] In one embodiment, the first feature extraction network includes: a feature extraction module for extracting initial features of the text information; a feature filtering module for filtering the initial features to obtain channel features and spatial features of the text information.

[0009] In one embodiment, the second feature extraction network is a recurrent neural network.

[0010] In one embodiment, before extracting the text features of the text information, it includes: performing word segmentation on the text information to obtain the text after word segmentation; performing name annotation on the text after word segmentation to obtain the annotated text information.

[0011] In one embodiment, the method further includes: filtering redundant information of non-target label types from the named entity extraction result to obtain the final entity extraction result of the corpus to be processed.

[0012] The second aspect of the embodiments of the present application provides a named entity extraction device, including: an acquisition module, configured to acquire the text information of the corpus to be processed; an extraction module, configured to extract the text features of the text information, where the text features include the channel feature, spatial feature, and context information feature of the text information; an extraction module, configured to input the text features into a preset entity extraction network and output the named entity extraction result of the corpus to be processed.

[0013] In one embodiment, the extraction module includes: a first extraction unit, configured to input the text information into a first feature extraction network and output the channel feature and spatial feature of the text information; a second extraction unit, configured to input the text information into a second feature extraction network and output the context information feature of the text information.

[0014] In one embodiment, the first feature extraction network includes: a feature extraction module, configured to extract the initial features of the text information; a feature filtering module, configured to filter the initial features to obtain the channel feature and spatial feature of the text information.

[0015] In one embodiment, the second feature extraction network is a recurrent neural network.

[0016] In one embodiment, the named entity extraction device further includes: a word segmentation module, configured to perform word segmentation on the text information to obtain the text after word segmentation; an annotation module, configured to perform name annotation on the text after word segmentation to obtain the annotated text information.

[0017] In one embodiment, the named entity extraction device further includes: a filtering module, configured to filter redundant information of non-target label types from the named entity extraction result to obtain the final entity extraction result of the corpus to be processed.

[0018] The third aspect of the embodiments of the present application provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to execute the computer program to implement the method of the first aspect and any of its embodiments of the present application.

[0019] A fourth aspect of an embodiment of the present application provides a non-transitory computer-readable storage medium for an electronic device, including: a program, which when run by the electronic device, causes the electronic device to execute the method according to the first aspect and any one of its embodiments of the present application.

[0020] The named entity extraction method, device, electronic device, and storage medium provided by the present application extract features such as channel features, spatial features, and context information features from the text information before inputting the text features into a preset entity extraction network, and input the extracted text features into the preset entity extraction network to obtain the named entity extraction result of the to-be-processed corpus, thereby improving the accuracy of predicting named entities. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] To more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0022] Figure 1 It is a schematic structural diagram of an electronic device shown in an embodiment of the present application;

[0023] Figure 2 It is a schematic flowchart of a named entity extraction method shown in an embodiment of the present application;

[0024] Figure 3 It is a schematic structural diagram of CBAM shown in an embodiment of the present application;

[0025] Figure 4 It is a schematic flowchart of a named entity extraction method shown in an embodiment of the present application;

[0026] Figure 5 It is a schematic structural diagram of an improved Inception-v2 network shown in an embodiment of the present application;

[0027] Figure 6 It is a schematic structural diagram of GRU shown in an embodiment of the present application;

[0028] Figure 7 It is a schematic structural diagram of CRF shown in an embodiment of the present application;

[0029] Figure 8 It is a schematic diagram of the process of named entity extraction shown in an embodiment of the present application;

[0030] Figure 9 It is a schematic structural diagram of a named entity extraction device shown in an embodiment of the present application. Detailed implementation manners

[0031] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.

[0032] Similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present application, terms such as "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0033] Please refer to Figure 1 , which shows an electronic device 1 according to an embodiment of the present application. The electronic device 1 includes: at least one processor 11 and a memory 12. Figure 1 Taking one processor as an example. The processor 11 and the memory 12 are connected through a bus 10. The memory 12 stores instructions executable by the processor 11, and the instructions are executed by the processor 11. Among them, the processor 11 is configured to execute the named entity extraction method provided by the embodiments of the present application.

[0034] The processor 11 may be a device including a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units having data processing capabilities and / or instruction execution capabilities. It can process the data of other components in the electronic device 1 and can also control other components in the electronic device 1 to perform desired functions.

[0035] The memory 12 may include one or more computer program products. The computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium. The processor 11 may run the program instructions to implement the method for identifying sensitive data described below. Various application programs and various data may also be stored in the computer-readable storage medium, such as various data used and / or generated by the application programs, etc.

[0036] Figure 1 The components and structures of the electronic device 1 shown are exemplary and not restrictive. According to needs, in one embodiment, the electronic device 1 may also have other components and structures.

[0037] In one embodiment, the exemplary electronic device 1 for implementing the method for identifying sensitive data in the embodiments of the present application can be implemented as an intelligent device such as a smart phone, a tablet computer, a desktop computer, a laptop computer, a vehicle-mounted terminal, etc.

[0038] Please refer to Figure 2 , which is a schematic flowchart of a named entity extraction method shown in an embodiment of the present application. This method can be executed by the Figure 1 shown electronic device 1 and applied to the named entity extraction method to extract named entities. The method includes the following steps:

[0039] Step 201: Obtain the text information of the corpus to be processed.

[0040] In this step, the electronic device 1 can obtain the text information to be processed. The corresponding text information can be obtained by manual input or by the electronic device 1 executing a corresponding computer program.

[0041] In one embodiment, the text information is presented in Chinese characters and is retrieved from the memory 12 of the electronic device 1 by the electronic device 1 executing a corresponding computer program.

[0042] Step 202: Extract the text features of the text information. The text features include the channel feature, the spatial feature, and the context information feature of the text information.

[0043] In this step, the electronic device 1 can extract the text features in the text information obtained in step 201. Among them, the text features include the channel feature, the spatial feature, and the context information feature.

[0044] In one embodiment, the CBAM (Convolutional Block Attention Module) shown in Figure 3 can be used to perform the first feature extraction on the text information obtained in step 201, so as to obtain the channel feature and the spatial feature of the text information. Then, the text information with the channel feature and the spatial feature is subjected to the second feature extraction through an RNN (Recurrent Neural Network), so as to obtain the text features including the channel feature, the spatial feature, and the context information feature.

[0045] Step 203: Input the text features into a preset entity extraction network and output the named entity extraction result of the corpus to be processed.

[0046] In this step, the electronic device 1 can input the text features including channel features, spatial features, and context information features extracted in step 202 into a preset entity extraction network. After being processed by the entity extraction network, the named entity extraction result of the corpus to be processed can be obtained.

[0047] In one embodiment, the preset entity extraction network can be an FC (Fully Connected layers) and a Softmax layer connected to the bottom of the FC. Through the above FC and Softmax layer, the text features including channel features, spatial features, and context information features can be analyzed and processed, and the named entity extraction result of the corpus to be processed can be output.

[0048] In the above embodiment, by inputting Chinese text information into the electronic device 1, at least one named entity extraction result can be obtained. During the process of the electronic device 1 extracting the named entity, by inputting the text information into the CBAM, the channel features and spatial features of the text information are obtained, and then the text information with channel features and spatial features is input into the RNN to obtain text features including channel features, spatial features, and context information features. Then, the text features including channel features, spatial features, and context information features are input into an entity extraction network including an FC and a Softmax layer connected to the bottom of the FC to obtain the named entity extraction result of the corpus to be processed. In the above process, the RNN used for the second feature extraction can be a Bi-RNN (Bidirectional RNN), which can process natural languages where the output at the current moment is related not only to the previous state but also to the subsequent state, improving the accuracy of the named entity extraction result and saving the computing power of the electronic device 1.

[0049] Please refer to Figure 4 , which is a schematic flowchart of the named entity extraction method shown in an embodiment of the present application. This method can be executed by the Figure 1 electronic device 1 shown and applied to the named entity extraction method to extract named entities. The method includes the following steps:

[0050] Step 401: Obtain the text information of the corpus to be processed.

[0051] In this step, the text information can be obtained by storing the text data crawled from the network in the memory 12 of the electronic device 1, or directly input and stored in the memory 12 in the electronic device 1, or by storing the text data generated by voice recognition of the voice data in the video or audio in the memory 12. The acquisition method of the text information is not a limitation to the present application.

[0052] Step 402: Perform word segmentation on the text information to obtain the segmented text.

[0053] In this step, the text information is segmented using the Jieba word segmentation tool to obtain the segmented text.

[0054] In an embodiment, the obtained text information is: Wang Wu played at Disneyland in Shanghai yesterday. After segmenting the text using the Jieba word segmentation tool, the segmented text can be obtained: Wang Wu / yesterday / in / Shanghai / played / at / Disneyland.

[0055] Step 403: Perform name annotation on the segmented text to obtain the annotated text information.

[0056] In this step, name annotation is performed on the segmented text in Step 401 to obtain the annotated text information. The segmented text can be annotated according to the following rules (i.e., the BIO algorithm):

[0057] 1. The first characters in person names, place names, and organization names are represented by B-Person, B-Place, and B-Organization respectively;

[0058] 2. The other characters in person names, place names, and organization names except the first characters are represented by I-Person, I-Place, and I-Organization respectively;

[0059] 3. The other characters in the text except person names, place names, and organization names are represented by O.

[0060] In an embodiment, after annotating each character in the obtained segmented text "Wang Wu / yesterday / in / Shanghai / played / at / Disneyland" using the above BIO algorithm, it is as follows:

[0061] [B-Person, I-Person], [O, O], [O], [B-Place, I-Place], [O, O], [O], [B-Organization, I-Organization, I-Organization].

[0062] Step 404: Input the text information into the first feature extraction network and output the channel feature and spatial feature of the text information.

[0063] In this step, the first feature extraction network can be the improved Inception-Resnet-V2 network. As Figure 5As shown in the figure, in the improved Inception-Resnet-V2 network, a CBAM (Convolutional Block Attention Module) for extracting channel features and spatial attention features of text information is added to each Inception-Resnet layer of the Inception-Resnet-V2 network. Since only feature extraction is required and the network does not need to classify text, the original Softmax layer of the Inception-Resnet-V2 network is deleted and connected to an FC (Fully Connected layers) for mapping the distributed feature representation to the sample label space. Thus, the output of the improved Inception-Resnet-V2 network is a three-dimensional matrix text information of 1*1*512 with channel features and spatial attention features.

[0064] Specifically, if the feature extracted by each Inception-Resnet layer in the improved Inception-Resnet-V2 network is F, and the feature F' is obtained after being processed by the CBAM (Convolutional Block Attention Module), its calculation formula is as follows:

[0065] F' = channel_feature(spatial_feature(F))

[0066] Among them, channel_feature and spatial_feature represent the channel attention and spatial attention functions respectively. The calculation formulas of channel_feature and spatial_feature are as follows:

[0067]

[0068]

[0069] In the formula, F represents the initial feature, F' represents the channel feature, that is, spatial_feature, f represents the convolutional kernel with a dimension of 7*7, AvgPool represents average pooling, MaxPool represents max pooling, and σ represents the sigmoid activation function. is the average pooling feature. is the max pooling feature.

[0070] Therefore, this application improves the Inception-Resnet-V2 network and adds CBAM to each Inception-Resnet layer in the Inception-Resnet-V2 network to filter the features extracted by the deep-level Inception-resnet network module, increase the attention to channel features and spatial features, and make the extracted text features more accurate. By deleting the original Softmax layer of the Inception-Resnet-V2 network and connecting it to FC, the output of the first feature extraction network is a 1*1*512 three-dimensional matrix of text information with channel features and spatial attention features, so that the connection between the first feature extraction network and the second feature extraction network is smoother, thereby saving the computing power of the electronic device 1.

[0071] Step 405: Input text features including channel features and spatial features into a second feature extraction network, and output context information features of the text information.

[0072] In this step, the second feature extraction network may include multiple Figure 6 The Bi-RNN (bidirectional RNN) with a GRU (Gated Recurrent Unit) structure shown in the figure, multiple GRUs in the Bi-RNN that are connected side by side and stacked up and down form a Bi-GRU (bidirectional GRU) structure. In the Bi-GRU structure, the upper layer GRU units connected side by side are connected from left to right in sequence, and the lower layer GRU units connected side by side are connected from right to left in sequence.

[0073] Specifically, GRU is composed of interconnected reset gate structures z t and update gate structure r t The module that completes the memory function is mainly the reset gate z t , the information to be forgotten is reset with the gate z t The above two gate structures are controlled by Sigmoid function. The calculation formulas of each parameter are as follows:

[0074] z t =σ(W z [h t-1 ,x t ])

[0075] r t =σ(W r [h t-1 ,x t ])

[0076]

[0077]

[0078] Where: x t is the input information, z t is the updated information, r t is the reset information, is the memorized information, h t is the output information, σ is the sigmoid function, W is the feature matrix, Wz is the reset gate feature matrix, Wr is the update gate feature matrix, t is the current moment, and t - 1 is the previous moment. According to the above formula, GRU can analyze the input text features to output the context information features of the text information. In the Bi - GRU structure, through the mutual connection between GRU structures, the context connection of the text to be processed is realized, that is, the context connection of the text to be processed from front to back and from back to front is realized, so as to obtain the context information features.

[0079] Therefore, through the Bi - GRU structure in the second feature extraction network of the present application, natural language in which the output at the current moment is related to the previous state and also related to the subsequent state can be processed. It can not only memorize information for a long time, but also not miss the context information from back to front, so that the context information in both the front - to - back and back - to - front directions can be processed, improving the accuracy of the named entity extraction result and saving the computing power of the electronic device 1.

[0080] Step 406: Input the text features into a preset entity extraction network to output the named entity extraction result of the corpus to be processed.

[0081] In this step, an FC layer and a SOFTMAX layer can be added after the first feature extraction network and the second feature extraction network to implement the entity extraction network. In this way, the entire entity extraction model includes: the first feature extraction network, the second feature extraction network, and the entity extraction network.

[0082] Step 407: Filter out the redundant information of non - target label types from the named entity extraction result to obtain the final entity extraction result of the corpus to be processed.

[0083] In this step, since there may still be parts of speech in the extraction result output in the above step 406 that do not meet the prediction requirements (such as the predicted part of speech may start with I -), the CRF (conditional random field) as shown in Figure 7 is used to filter the above extraction result, filter out the redundant information of non - target label types, and obtain the final entity extraction result of the corpus to be processed.

[0084] Specifically, Figure 7It can be seen that there is an obvious dependency relationship between the source sequence and the target sequence. The probability formula of this model is as follows:

[0085]

[0086] In the formula: Y is the first random variable; x is the second random variable; θ is the third random variable; P(Y|x:θ) represents the probability that the first random variable is Y when the second random variable is x and the third random variable is θ; Z x (θ) is the partition function; k represents the number of features; f i (D i ) represents the unified feature representation of the state feature and the transition feature; θ i represents the weight parameter; D represents the parameter set.

[0087] Among them, the specific expressions of Z x (θ) and f i (D i ) are as follows:

[0088]

[0089]

[0090] In the formula: w represents the feature matrix, t i represents the i-th node feature, s i represents the i-th local feature, and k represents the number of nodes.

[0091] Therefore, in this application, the extraction result obtained in step 406 can be filtered by CRF to filter out redundant information of non-target label types, so as to obtain a more accurate extraction result.

[0092] Please refer to Figure 8 , which is a schematic diagram of the process of named entity extraction shown in an embodiment of this application. In this embodiment, it is assumed that the text information obtained by the electronic device 1 is "Wang Wu played at Disneyland in Shanghai yesterday". The method includes:

[0093] Step 801: The obtained text information is "Wang Wu played at Disneyland in Shanghai yesterday";

[0094] Step 802: After the above text information is subjected to word segmentation processing, the word-segmented text "Wang Wu / yesterday / in / Shanghai / played / at / Disneyland" is obtained;

[0095] Step 803: Annotate the segmented text through the BIO algorithm to obtain the annotated text "[B-Person, I-Person], [O, O], [O], [B-Place, I-Place], [O, O], [O], [B-Organization, I-Organization, I-Organization]".

[0096] Step 804: Input the segmented text into the improved Inception-v2 network to obtain the spatial features and channel features of each unit of the text; then input the spatial features and channel features of each unit into a Bi-RNN including a Bi-GRU structure to obtain the spatial features, channel features, and context information features of the text; then input the spatial features, channel features, and context information features of each unit into a preset entity extraction network to obtain the extraction results of each unit in "[B-Person, I-Person], [O, O], [O], [B-Place, I-Place], [O, O], [O], [B-Organization, I-Organization, I-Organization]".

[0097] Step 805: Input the extraction results of each unit into the CRF model to obtain the final entity extraction results such as: B-Person[0.83], I-Person[0.87], O[0.81], O[0.81], O[0.87], B-Place[0.97], I-Place[0.96], O[0.89], O[0.86], O[0.87], B-Organization[0.89], I-Organization[0.93], I-Organization[0.89]. Finally, the final result after processing the obtained text information by the electronic device 1 can be displayed as: "Wang Wu" is a person's name, "Shanghai" is a place name, and "Disney" is an organization name.

[0098] Please refer to Figure 9 , which shows a named entity extraction device 900 according to an embodiment of the present application. This device can be applied to Figure 1 the electronic device shown to accurately and efficiently extract named entities. The device includes: an acquisition module 901, an extraction module 902, and an extraction module 903. The principle relationships of each module are as follows:

[0099] The acquisition module 901 is used to acquire the text information of the corpus to be processed.

[0100] An extraction module 902 is configured to extract text features of text information, where the text features include channel features, spatial features, and context information features of the text information.

[0101] An extraction module 903 is configured to input the text features into a preset entity extraction network and output a named entity extraction result of a corpus to be processed.

[0102] In one embodiment, the extraction module 902 includes: a first extraction unit configured to input the text information into a first feature extraction network and output channel features and spatial features of the text information; a second extraction unit configured to input the text information into a second feature extraction network and output context information features of the text information.

[0103] In one embodiment, the first feature extraction network includes: a feature extraction module configured to extract initial features of the text information; a feature filtering module configured to filter the initial features to obtain channel features and spatial features of the text information.

[0104] In one embodiment, the second feature extraction network is a recurrent neural network.

[0105] In one embodiment, the named entity extraction device 900 further includes: a word segmentation module configured to perform word segmentation processing on the text information to obtain segmented text; a labeling module configured to perform name labeling on the segmented text to obtain labeled text information.

[0106] In one embodiment, the named entity extraction device 900 further includes: a filtering module configured to filter redundant information of non-target label types from the named entity extraction result to obtain a final entity extraction result of the corpus to be processed.

[0107] For the detailed description of the above named entity extraction device 900, please refer to the description of the relevant method steps in the above embodiments.

[0108] In several embodiments provided by this application, the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and a module, a program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0109] In addition, the functional modules in each embodiment of this application can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.

[0110] The embodiments of the present invention also provide a non-transitory computer-readable storage medium for an electronic device, including: a program, which when running on the electronic device, enables the electronic device to execute all or part of the processes of the methods in the above embodiments. Among them, the storage medium can be a disk, an optical disc, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (abbreviation: HDD), or a solid-state drive (SSD), etc. The storage medium can also include a combination of the above types of memories.

[0111] Although the embodiments of the present invention are described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A named entity extraction method, characterized in that, including: obtaining text information of the corpus to be processed; extracting text features of the text information, where the text features include channel features, spatial features, and context information features of the text information; inputting the text features into a preset entity extraction network and outputting a named entity extraction result of the corpus to be processed; wherein, extracting text features of the text information, where the text features include channel features, spatial features, and context information features of the text information, includes: inputting the text information into a first feature extraction network and outputting channel features and spatial features of the text information; inputting the text features including the channel features and the spatial features into a second feature extraction network and outputting context information features of the text information; wherein, the second feature extraction network includes a plurality of bidirectional gated recurrent units, and the bidirectional gated recurrent units are used to process natural language where the output at the current moment is related to the previous state and also related to the subsequent state, and to process context information in two directions from front to back and from back to front.

2. The method according to claim 1, characterized in that, The first feature extraction network includes: a feature extraction module for extracting initial features of the text information; a feature filtering module for filtering the initial features to obtain channel features and spatial features of the text information.

3. The method according to claim 1, characterized in that, The second feature extraction network is a recurrent neural network.

4. The method according to claim 1, wherein Before extracting text features of the text information, it includes: performing word segmentation on the text information to obtain segmented text; performing name annotation on the segmented text to obtain annotated text information.

5. The method according to claim 1, wherein It further includes: filtering redundant information of non-target label types from the named entity extraction result to obtain a final entity extraction result of the corpus to be processed.

6. A named entity extraction device, characterized in that, including: an acquisition module for obtaining text information of the corpus to be processed; an extraction module for extracting text features of the text information, where the text features include channel features, spatial features, and context information features of the text information; an extraction module for inputting the text features into a preset entity extraction network and outputting a named entity extraction result of the corpus to be processed; wherein, the extraction module includes: a first extraction unit for inputting the text information into a first feature extraction network and outputting channel features and spatial features of the text information; a second extraction unit for inputting the text information into a second feature extraction network and outputting context information features of the text information; wherein, the second feature extraction network includes a plurality of bidirectional gated recurrent units, and the bidirectional gated recurrent units are used to process natural language where the output at the current moment is related to the previous state and also related to the subsequent state, and to process context information in two directions from front to back and from back to front.

7. An electronic device, characterized in that, including: a memory for storing a computer program; a processor for executing the computer program to implement the method according to any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium, characterized in that, including: a program, when it runs on an electronic device, causing the electronic device to execute the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Chinese request text intention analysis method

    CN112446219A