# US 2021/0263974 A1 · Category tag mining method, electronic device and non-transitory computer-readable storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0263974 A1
- Document ID: US20210263974A1
- Status: Published application
- Kind: A1
- Application number: 17/173,318
- Filed: 2021-02-11
- Published: 2021-08-26
- Earliest claimed: 2020-02-20
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science Technology Co., Ltd.
- Inventors: Qian LI; Yabing SHI; Ye JIANG; Chunguang CHAI; Yong ZHU
- Web page: https://patentgrep.com/patent/US20210263974A1

## CPC

- G06F 16/36: Creation of semantic tools, e.g. ontology or thesauri
- G06F 16/90332: {Natural language query formulation or dialogue systems}
- G06F 16/90335: {Query processing}
- G06F 16/906: Clustering; Classification
- G06F 40/295: Named entity recognition
- G06F 40/30: Semantic analysis
- G06N 3/049: Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

Provided by the present disclosure is a new category tag mining method, involving the field of knowledge graph technology, and including: obtaining a plurality of queries during a current preset time period; labeling a category tag on each query of the plurality of queries, by using a pre-trained sequence labeling model, to extract the category tag currently corresponding to the query from the query; and removing a category tag already existing in a preset current category tag library from category tags currently corresponding to all the queries, and determining a remaining category tag as a new category tag. The present disclosure also provides an electronic device and a non-transitory computer-readable storage medium.

## Claims

### Claim 1

A new category tag mining method, comprising:
obtaining a plurality of queries during a current preset time period;
labeling a category tag on each query of the plurality of queries, by using a pre-trained sequence labeling model, to extract the category tag currently corresponding to the query from the query; and
removing a category tag already existing in a preset current category tag library from category tags currently corresponding to all the queries, and determining a remaining category tag as a new category tag.

### Claim 2 (depends on 1)

The mining method according to claim 1, further comprising:
obtaining a plurality of samples of queries pre-labeled with category tags; and
performing model training on a preset neural network model, by using the plurality of samples of queries as an input of the preset neural network model and using the pre-labeled category tags of the plurality of samples of queries as an output of the preset neural network model, to obtain the sequence labeling model.

### Claim 3 (depends on 2)

The mining method according to claim 2, wherein the preset neural network model comprises a first semantic representation model, a second semantic representation model connected with the first semantic representation model, a first bidirectional Gated Recurrent Unit (GRU) layer connected with the second semantic representation model, a second bidirectional GRU layer connected with the first bidirectional GRU layer, a conditional random field connected with the second bidirectional GRU layer, and a conditional random field parsing layer connected with the conditional random field.

### Claim 4 (depends on 2)

The mining method according to claim 2, wherein the step of obtaining the plurality of samples of queries pre-labeled with the category tags comprises:
obtaining a plurality of historical queries and a plurality of preset category tags;
filtering all historical queries containing at least one of the preset category tags out from all the historical queries, by using a distant supervision method; and
determining the plurality of samples of queries from all the historical queries containing at least one of the preset category tags.

### Claim 5 (depends on 1)

The mining method according to claim 1, before the step of removing the category tag already existing in the preset current category tag library from the category tags currently corresponding to all the queries, and determining the remaining category tag as the new category tag, further comprising:
for each category tag currently corresponding to the query, extracting a word located before and adjacent to the category tag from the query as a current detection word, in response to the category tag being in the preset current category tag library;
detecting whether a part of speech of the current detection word is a preset part of speech, wherein the preset part of speech is any one of a noun, an adjective, and a noun adjective;
extracting a word located before and adjacent to the current detection word from the query as a new current detection word, in response to the part of speech of the current detection word being the preset part of speech;
repeating the step of detecting whether the part of speech of the current detection word is the preset part of speech, until a current detection word not having the preset part of speech is detected; and
combining the category tag and all detection words detected to have the preset part of speech, according to an order of the category tag and all the detected detection words in the query, and using a combined result as the category tag currently corresponding to the query.

### Claim 6 (depends on 1)

The mining method according to claim 1, before the step of removing the category tag already existing in the preset current category tag library from the category tags currently corresponding to all the queries, and determining the remaining category tag as the new category tag, further comprising:
for each category tag currently corresponding to the query during the current preset time period, determining whether the category tag ends with a category tag being in the current category tag library;
retaining the category tag, in response to the category tag ending with the category tag being in the current category tag library; and
removing the category tag, in response to the category tag not ending with the category tag being in the current category tag library.

### Claim 7 (depends on 1)

The mining method according to claim 1, before the step of removing the category tag already existing in the preset current category tag library from the category tags currently corresponding to all the queries, and determining the remaining category tag as the new category tag, further comprising:
for each category tag currently corresponding to the query, detecting whether a sentence of the category tag is fluency, by using a preset sentence fluency model;
retaining the category tag, in response to the sentence of the category tag being fluency; and
removing the category tag, in response to the sentence of the category tag being not fluency.

### Claim 8 (depends on 5)

The mining method according to claim 5, before the step of removing the category tag already existing in the preset current category tag library from the category tags currently corresponding to all the queries, and determining the remaining category tag as the new category tag, further comprising:
for each category tag currently corresponding to the query, detecting whether a sentence of the category tag is fluency, by using a preset sentence fluency model;
retaining the category tag, in response to the sentence of the category tag being fluency; and
removing the category tag, in response to the sentence of the category tag being not fluency.

### Claim 9 (depends on 1)

The mining method according to claim 1, before the step of removing the category tag already existing in the preset current category tag library from the category tags currently corresponding to all the queries, and determining the remaining category tag as the new category tag, further comprising:
for each category tag currently corresponding to the query, detecting a frequency of the category tag of appearing in the category tags currently corresponding to all the queries;
retaining the category tag, in response to the frequency being greater than or equal to a preset frequency threshold; and
removing the category tag, in response to the frequency being less than the preset frequency threshold.

### Claim 10 (depends on 5)

The mining method according to claim 5, before the step of removing the category tag already existing in the preset current category tag library from the category tags currently corresponding to all the queries, and determining the remaining category tag as the new category tag, further comprising:
for each category tag currently corresponding to the query, detecting a frequency of the category tag of appearing in the category tags currently corresponding to all the queries;
retaining the category tag, in response to the frequency being greater than or equal to a preset frequency threshold; and
removing the category tag, in response to the frequency being less than the preset frequency threshold.

### Claim 11

An electronic device, comprising:
at least one processor;
a memory storing at least one program thereon; and
at least one I/O interface connected between the at least one processor and the memory, and configured to implement information interaction between the at least one processor and the memory;
wherein when the at least one program is executed by the at least one processor, the at least one processor implements:
obtaining a plurality of queries during a current preset time period;
labeling a category tag on each query of the plurality of queries, by using a pre-trained sequence labeling model, to extract the category tag currently corresponding to the query from the query; and
removing a category tag already existing in a preset current category tag library from category tags currently corresponding to all the queries, and determining a remaining category tag as a new category tag.

### Claim 12 (depends on 11)

The electronic device according to claim 11, wherein the at least one processor is configured to:
obtain a plurality of samples of queries pre-labeled with category tags; and
perform model training on a preset neural network model, by using the plurality of samples of queries as an input of the preset neural network model and using the pre-labeled category tags of the plurality of samples of queries as an output of the preset neural network model, to obtain the sequence labeling model;
wherein the preset neural network model comprises a first semantic representation model, a second semantic representation model connected with the first semantic representation model, a first bidirectional Gated Recurrent Unit (GRU) layer connected with the second semantic representation model, a second bidirectional GRU layer connected with the first bidirectional GRU layer, a conditional random field connected with the second bidirectional GRU layer, and a conditional random field parsing layer connected with the conditional random field.

### Claim 13 (depends on 12)

The electronic device according to claim 12, wherein the at least one processor is configured to:
obtain a plurality of historical queries and a plurality of preset category tags;
filter all historical queries containing at least one of the preset category tags out from all the historical queries, by using a distant supervision method; and
determine the plurality of samples of queries from all the historical queries containing at least one of the preset category tags.

### Claim 14 (depends on 11)

The electronic device according to claim 11, wherein before removing the category tag already existing in the preset current category tag library from the category tags currently corresponding to all the queries, and determining the remaining category tag as the new category tag, the at least one processor is configured to:
for each category tag currently corresponding to the query, extract a word located before and adjacent to the category tag from the query as a current detection word, in response to the category tag being in the preset current category tag library;
detect whether a part of speech of the current detection word is a preset part of speech, wherein the preset part of speech is any one of a noun, an adjective, and a noun adjective;
extract a word located before and adjacent to the current detection word from the query as a new current detection word, in response to the part of speech of the current detection word being the preset part of speech;
repeat the step of detecting whether the part of speech of the current detection word is the preset part of speech, until a current detection word not having the preset part of speech is detected; and
combine the category tag and all detection words detected to have the preset part of speech, according to an order of the category tag and all the detected detection words in the query, and use a combined result as the category tag currently corresponding to the query.

### Claim 15 (depends on 11)

The electronic device according to claim 11, wherein before removing the category tag already existing in the preset current category tag library from the category tags currently corresponding to all the queries, and determining the remaining category tag as the new category tag, the at least one processor is configured to:
for each category tag currently corresponding to the query during the current preset time period, determine whether the category tag ends with a category tag being in the current category tag library;
retain the category tag, in response to the category tag ending with the category tag being in the current category tag library; and
remove the category tag, in response to the category tag not ending with the category tag being in the current category tag library.

### Claim 16 (depends on 11)

The electronic device according to claim 11, wherein before removing the category tag already existing in the preset current category tag library from the category tags currently corresponding to all the queries, and determining the remaining category tag as the new category tag, the at least one processor is configured to:
for each category tag currently corresponding to the query, detect whether a sentence of the category tag is fluency, by using a preset sentence fluency model;
retain the category tag, in response to the sentence of the category tag being fluency; and
remove the category tag, in response to the sentence of the category tag being not fluency.

### Claim 17 (depends on 11)

The electronic device according to claim 11, wherein before removing the category tag already existing in the preset current category tag library from the category tags currently corresponding to all the queries, and determining the remaining category tag as the new category tag, the at least one processor is configured to:
for each category tag currently corresponding to the query, detect a frequency of the category tag of appearing in the category tags currently corresponding to all the queries;
retain the category tag, in response to the frequency being greater than or equal to a preset frequency threshold; and
remove the category tag, in response to the frequency being less than the preset frequency threshold.

### Claim 18 (depends on 1)

A non-transitory computer-readable storage medium storing a computer program thereon, wherein the computer program is executed for implementing the mining method according to claim 1.
