IP Library › Granted Patent US 12,430,512
Granted Patent B2
US 12,430,512 · App. 17/685,283 · Granted Sep 30, 2025

Artificial intelligence-based named entity recognition method and apparatus, and electronic device

Inventors: Funan Mu (Guangdong, CN); Chenguang Wu (Guangdong, CN); Lifeng Wang (Guangdong, CN)
Assignee: Tencent Technology (Shenzhen) Company Limited
G06F40/295G06F40/166G06N3/044G06N3/045G06N3/048G06F40/30
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,430,512
App. No.
17/685,283
Granted
Sep 30, 2025
Kind
B2
Abstract

Aspects of this disclosure are directed to an artificial intelligence (AI)-based named entity recognition (NER) method and apparatus, an electronic device, and a non-transitory computer-readable storage medium. The method can include performing, by an electronic device, vector transformation processing on text elements in a to-be-recognized text to obtain text representations of the text elements, and constructing a candidate entity phrase according to text elements that are in the to-be-recognized text and whose total quantity does not exceed an element quantity threshold. The method can further include performing integration processing on text representations corresponding to the text elements in the candidate entity phrase to obtain a text representation of the candidate entity phrase, and performing classification processing on the text representation of the candidate entity phrase to determine a category to which the candidate entity phrase belongs in a non-named entity category and a plurality of named entity categories.

Claims (87)

1. An artificial intelligence (AI)-based named entity recognition (NER) method, the method comprising:

performing, by processing circuitry, vector transformation processing on text elements in a to-be-recognized text to obtain text representations of the text elements;

constructing, by the processing circuitry, a plurality of candidate entity phrases by generating sub-strings of the to-be-recognized text, each candidate entity phrase including a total quantity of consecutive text elements that is less than an element quantity threshold;

performing, by the processing circuitry, integration processing on the text representations corresponding to the text elements in each candidate entity phrase to obtain a phrase-level text representation for the respective candidate entity phrase; and

performing, by the processing circuitry, classification processing on the phrase-level text representation of each candidate entity phrase to determine a category to which the respective candidate entity phrase belongs in a non-named entity category and a plurality of named entity categories by:

performing fully connected processing on the phrase-level text representation of the respective candidate entity phrase; and

using a first classification function and a second classification function, wherein both of the first classification function and the second classification function perform mapping processing on the same phrase-level text representation of the respective candidate entity phrase after the fully connected processing, the first classification function performs binary classification on the respective candidate entity phrase based on the non-named entity category and the plurality of named entity categories, and the second classification function performs multi-class classification on the respective candidate entity phrase into one of the plurality of named entity categories.

2. The NER method according to claim 1 , wherein the constructing the plurality of candidate entity phrases further comprises:

performing traversing processing on the text elements in the to-be-recognized text;

performing a scan cycle that includes a plurality times of scan processing of a traversed text element;

determining a scan quantity that synchronously increases or decreases based on a quantity of times that the scan processing has been performed in the scan cycle, and performing the scan processing starting from the traversed text element based on the scan quantity; and

combining the traversed text element and a text element obtained through the scan processing into a candidate entity phrase of the plurality of candidate entity phrases until the scan quantity that is initially zero increases to a scan quantity threshold, or the scan quantity that is initially the scan quantity threshold decreases to zero,

wherein the scan quantity threshold is a result obtained by subtracting one from the element quantity threshold.

3. The NER method according to claim 2 , wherein the performing, according to the scan quantity, the scan processing starting from the traversed text element comprises:

selecting, starting from the traversed text element, a text element in the to-be-recognized text as a text element obtained through the scan processing, until a total quantity of the text elements obtained through the scan processing is equal to the scan quantity.

4. The NER method according to claim 1 , wherein the performing the integration processing on the text representations further comprises:

sequentially performing cyclic update processing on the text representations of a plurality of the text elements in the respective candidate entity phrase in an order from a first text element to a last text element in the to-be-recognized text to obtain a text representation update result of each text element in the candidate entity phrase; and

using a text representation update result of the last text element in the candidate entity phrase as the phrase-level text representation of the candidate entity phrase.

5. The NER method according to claim 4 , wherein the sequentially performing the cyclic update processing on the text representations of the plurality of the text elements in the respective candidate entity phrase further comprises:

performing fusion processing on the text representation of any text element and a first hidden state of a text representation of a previous text element to obtain a first hidden state of the text representation of the any text element;

performing fusion processing on the text representation of the any text element and a second hidden state of a text representation of a next text element to obtain a second hidden state of the text representation of the any text element; and

performing fusion processing on the first hidden state and the second hidden state of the text representation of the any text element to obtain a text representation update result of the any text element.

6. The NER method according to claim 1 , wherein the constructing the plurality of candidate entity phrases further comprises performing for a plurality of convolutional windows with different lengths:

performing a slide operation of the respective convolutional window in the to-be-recognized text, an amplitude of each slide operation being one text element; and

combining the text elements covered by the respective convolutional window before each slide into a candidate entity phrase of the plurality of candidate entity phrases, and combining the text elements covered by the respective convolutional window in a case that the slide stops into the candidate entity phrase,

wherein the lengths of the convolutional windows are less than or equal to the element quantity threshold.

7. The NER method according to claim 6 , wherein the performing the integration processing on the text representations corresponding to the text elements in the candidate entity phrase further comprises:

performing convolution processing on the text representations corresponding to the text elements in the candidate entity phrase to obtain the phrase-level text representation of the candidate entity phrase,

wherein a size of a convolution kernel used for the convolutional processing is consistent with a length of a convolutional window used for constructing the candidate entity phrase.

8. The NER method according to claim 1 , wherein the binary classification performed by the first classification function comprises:

obtaining a probability of corresponding to the non-named entity category and probabilities of respectively corresponding to the plurality of named entity categories; and

determining a category corresponding to a probability with a maximum value as the category to which the respective candidate entity phrase belongs.

9. The NER method according to claim 1 , wherein the multi-class classification performed by the second classification function comprises:

obtaining a probability of corresponding to the non-named entity category and probabilities of respectively corresponding to the plurality of named entity categories; and

determining a category corresponding to a probability exceeding a probability threshold as the category to which the respective candidate entity phrase belongs.

10. The NER method according to claim 1 , further comprising:

performing segmentation processing on the to-be-recognized text to obtain a plurality of sentences;

determining, as an abstract keyword, a candidate entity phrase of the plurality of candidate entity phrases that belongs to any named entity category and having an occurrence frequency that meets a frequency condition;

determining a score of the sentence according to a quantity of abstract keywords included in the sentence; and

determining a sentence whose score meets a score condition as a text abstract of the to-be-recognized text.

11. The NER method according to claim 1 , further comprising:

determining a candidate entity phrase of the plurality of candidate entity phrases belonging to any named entity category as a keyword of a to-be-recommended object when the to-be-recognized text is used for indicating the to-be-recommended object;

obtaining a user portrait keyword and determining a keyword coincidence degree between the user portrait keyword and the keyword of the to-be-recommended object; and

performing an operation of recommending the to-be-recommended object when the keyword coincidence degree exceeds a first coincidence degree threshold.

12. The NER method according to claim 11 , wherein the determining the keyword coincidence degree between the user portrait keyword and the keyword of the to-be-recommended object further comprises:

determining an intersection set between the user portrait keyword and the keyword of the to-be-recommended object and determining a first quantity of keywords included in the intersection set;

determining a union set between the user portrait keyword and the keyword of the to-be-recommended object and determining a second quantity of keywords included in the union set; and

determining a ratio of the first quantity to the second quantity as the keyword coincidence degree between the user portrait keyword and the keyword of the to-be-recommended object.

13. The NER method according to claim 1 , further comprising:

determining a candidate entity phrase of the plurality of candidate entity phrases belonging to any named entity category as a keyword;

determining a keyword coincidence degree between a first to-be-recognized text and a second to-be-recognized text; and

classifying the first to-be-recognized text and the second to-be-recognized text into a same text class when the keyword coincidence degree exceeds a second coincidence degree threshold.

14. The NER method according to claim 1 , further comprising:

determining a candidate entity phrase of the plurality of candidate entity phrases belonging to any named entity category as a keyword;

performing syntactic analysis processing on the to-be-recognized text to obtain a subject keyword, a relative word, and an object keyword in the to-be-recognized text, the relative word being used for indicating a relationship between the subject keyword and the object keyword; and

constructing a triplet based on the subject keyword, the relative word, and the object keyword, and adding the triplet to a knowledge graph,

wherein the knowledge graph is used for responding to an object query request comprising the subject keyword and the relative word.

15. The NER method according to claim 1 , further comprising:

adding a candidate entity phrase of the plurality of candidate entity phrases belonging to any named entity category to a knowledge graph,

wherein the knowledge graph is used for responding to a category query request for the candidate entity phrase belonging to any named entity category.

16. The NER method according to claim 1 , further comprising performing either of following operations to obtain the text elements in the to-be-recognized text:

using each word in the to-be-recognized text as a text element; and

performing word segmentation processing on the to-be-recognized text and using a phrase obtained through the word segmentation processing as a text element.

17. An electronic device, comprising:

a memory that stores executable instructions; and

a processor that executes the executable instructions stored in the memory to perform the artificial intelligence (AI)-based named entity recognition (NER) method according to claim 1 .

18. An artificial intelligence (AI)-based named entity recognition (NER) apparatus, comprising:

processing circuitry configured to:

perform vector transformation processing on text elements in a to-be-recognized text to obtain text representations of the text elements;

construct a plurality of candidate entity phrases by generating sub-strings of the to-be-recognized text, each candidate entity phrase including a total quantity of consecutive text elements that is less than an element quantity threshold;

perform integration processing on the text representations corresponding to the text elements in each candidate entity phrase to obtain a phrase-level text representation for the respective candidate entity phrase; and

perform classification processing on the phrase-level text representation of each candidate entity phrase to determine a category to which the respective candidate entity phrase belongs in a non-named entity category and a plurality of named entity categories by:

performing fully connected processing on the phrase-level text representation of the respective candidate entity phrase; and

using a first classification function and a second classification function, wherein both of the first classification function and the second classification function perform mapping processing on the same phrase-level text representation of the respective candidate entity phrase after the fully connected processing, the first classification function performs binary classification on the respective candidate entity phrase based on the non-named entity category and the plurality of named entity categories, and the second classification function performs multi-class classification on the respective candidate entity phrase into one of the plurality of named entity categories.

19. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to implement operations comprising:

performing vector transformation processing on text elements in a to-be-recognized text to obtain text representations of the text elements;

constructing a plurality of candidate entity phrases by generating sub-strings of the to-be-recognized text, each candidate entity phrase including a total quantity of consecutive text elements that is less than an element quantity threshold;

performing integration processing on the text representations corresponding to the text elements in each candidate entity phrase to obtain a phrase-level text representation for the respective candidate entity phrase; and

performing classification processing on the phrase-level text representation of each candidate entity phrase to determine a category to which the respective candidate entity phrase belongs in a non-named entity category and a plurality of named entity categories by:

performing fully connected processing on the phrase-level text representation of the candidate entity phrase; and

using a first classification function and a second classification function, wherein both of the first classification function and the second classification function perform mapping processing on the same phrase-level text representation of the respective candidate entity phrase after the fully connected processing, the first classification function performs binary classification on the respective candidate entity phrase based on the non-named entity category and the plurality of named entity categories, and the second classification function performs multi-class classification on the respective candidate entity phrase into one of the plurality of named entity categories.

20. The non-transitory computer-readable storage medium according to claim 19 , wherein the constructing the plurality of candidate entity phrases further comprises:

performing traversing processing on the text elements in the to-be-recognized text;

performing a scan cycle that includes a plurality times of scan processing of a traversed text element;

determining a scan quantity that synchronously increases or decreases based on a quantity of times that the scan processing has been performed in the scan cycle, and performing the scan processing starting from the traversed text element based on the scan quantity; and

combining the traversed text element and a text element obtained through the scan processing into a candidate entity phrase of the plurality of candidate entity phrases until the scan quantity that is initially zero increases to a scan quantity threshold, or the scan quantity that is initially the scan quantity threshold decreases to zero,

wherein the scan quantity threshold is a result obtained by subtracting one from the element quantity threshold.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 8, 2022
From: MU, FUNAN; WU, CHENGUANG; WANG, LIFENG
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 059195/0301 →
Priority Claims (1)
CN 202010127101.0 · Feb 28, 2020 · national
Continuity (2)
Continuation PCTCN2020127737 · Nov 10, 2020
Related Publication 20220188521A1 · Jun 16, 2022
References Cited (27)
US 9087297B1 · Filippova · 2015 [cited by examiner]
US 9971763B2 · Abdel-Reheem · 2018 [cited by examiner]
US 11010561B2 · Bellegarda · 2021 [cited by examiner]
US 20120117082A1 · Koperda · 2012 [cited by examiner]
US 20190108219A1 · Barrett · 2019 [cited by examiner]
US 20200035222A1 · Sypniewski · 2020 [cited by examiner]
US 20210176203A1 · Nizar · 2021 [cited by examiner]
CN 101075228A · 2007 [cited by applicant]
CN 110232183A · 2008 [cited by applicant]
CN ON102179048A · 2011 [cited by applicant]
CN 103678569A · 2014 [cited by applicant]
CN ON106547733A · 2017 [cited by applicant]
CN 108665492A · 2018 [cited by applicant]
CN 109101481A · 2018 [cited by applicant]
CN ON109118562A · 2019 [cited by applicant]
CN 110033505A · 2019 [cited by applicant]
CN 110047121A · 2019 [cited by applicant]
CN 110502738A · 2019 [cited by applicant]
CN 110637326A · 2019 [cited by applicant]
CN 110668854A · 2020 [cited by applicant]
CN 110858409A · 2020 [cited by applicant]
CN 111353310A · 2020 [cited by applicant]
CN 110533752A · 2025 [cited by applicant]
JP 2019197368 · 2019 [cited by applicant]
WO WO2020027294A1 · 2020 [cited by applicant]
International Search Report and Written Opinion issued Feb. 18, 2021 in international Application No. PCT/CN2020/127737 with English translation, 11 pgs. [cited by applicant]
Chinese Office Action issued Sep. 29, 2020 in Chinese Application No. 202010142920.2 with English translation, 17 pgs. [cited by applicant]