IP Library › Granted Patent US 11,507,751
Granted Patent B2
US 11,507,751 · App. 16/938,355 · Granted Nov 22, 2022

Comment information processing method and apparatus, and medium

Inventors: Hao Liu (Beijing, CN); Bolei He (Beijing, CN); Xinyan Xiao (Beijing, CN)
Assignee: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
G06F40/30G06F40/242G06F40/289G06N3/0454G06N3/088
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 11,507,751
App. No.
16/938,355
Granted
Nov 22, 2022
Kind
B2
Abstract

The present disclosure discloses a comment information processing method and apparatus, and a medium. The specific implementation solution is: in response to a user operation, determining an opinion category corresponding to each opinion phrase in a comment opinion dictionary; obtaining a target corpus matching each opinion phrase from a plurality of comment corpora; for each opinion phrase, using a corresponding opinion category to label the target corpus matching each opinion phrase to obtain a first training sample; and training a classification model with the first training sample to identify the opinion category of a comment by using a trained classification model.

Claims (60)

1. A comment information processing method, comprising:

in response to a user operation, determining an opinion category corresponding to each opinion phrase in a comment opinion dictionary;

obtaining a target corpus matching with each opinion phrase from a plurality of comment corpora;

labeling the target corpus with the opinion phrase matched to obtain a second training sample;

determining a comment corpus that does not match with any opinion phrase in the plurality of comment corpora as a latent corpus, and labeling an opinion phrase of the latent corpus in a manual information labeling manner to obtain a third training sample; and

training an encoding-decoding model with the second training sample and the third training sample, and extracting an opinion phrase of the comment by using the encoding- decoding model;

for a comment that the opinion phrase needs to be extracted, determining whether the opinion phrase matching with the comment exists in the comment opinion dictionary;

in response to that the opinion phrase matching with the comment exists in the comment opinion dictionary, determining the opinion phrase matching with the comment as the opinion phrase of the comment; and

in response to that the opinion phrase matching with the comment does not exist in the comment opinion dictionary, inputting the comment into the encoding-decoding model, and determining the opinion phrase outputted from the encoding-decoding model as the opinion phrase of the comment;

for each opinion phrase, using the opinion category to label the target corpus to obtain a first training sample; and

training a classification model with the first training sample, and identifying an opinion category of a comment by using the classification model.

2. The method of claim 1 , wherein each opinion phrase comprises a substantive word and a descriptive word; and obtaining the target corpus matching with each opinion phrase from the plurality of comment corpora comprises:

for each opinion phrase, filtering the plurality of comment corpora to obtain a candidate corpus containing the substantive word and the descriptive word in the opinion phrase; and

in response to the substantive word and the descriptive word in the candidate corpus appearing in a same short sentence, and a number of words between the substantive word and the descriptive word being smaller than a threshold, determining the candidate corpus as the target corpus matching with the opinion phrase.

3. The method of claim 1 , wherein the encoding-decoding model comprises an encoder and a decoder;

wherein the encoder is configured to perform semantic encoding on the comment to obtain a hidden state vector of the comment; and

the decoder is configured to decode the hidden state vector to output the opinion phrase of the comment, wherein the decoder has learned a mapping relationship between the hidden state vector and the opinion phrase.

4. The method of claim 1 , wherein each opinion phrase in the comment opinion dictionary has a fixed collocation of emotion word; and

after the opinion phrase matching with the comment is determined as the opinion phrase of the comment, the method further comprises:

determining an emotional tendency of the comment based on the fixed collocation of emotion word of the opinion phrase matching with the comment.

5. The method of claim 1 , before determining the opinion category corresponding to each opinion phrase in the comment opinion dictionary in response to the user operation, further comprising:

performing, based on a preset extraction rule, phrase extraction on the plurality of comment corpora to obtain a plurality of candidate phrases; and

filtering, based on an appearance frequency of each candidate phrase in the plurality of comment corpora, the plurality of candidate phrases to obtain a plurality of comment opinion phrases.

6. A comment information processing apparatus, comprising:

one or more processors;

a memory storing instructions executable by the one or more processors;

wherein the one or more processors are configured to:

in response to a user operation, determine an opinion category corresponding to each opinion phrase in a comment opinion dictionary;

obtain a target corpus matching with each opinion phrase from a plurality of comment corpora;

for each opinion phrase, use the opinion category to label the target corpus to obtain a first training sample; and

train a classification model with the first training sample, and identify an opinion category of a comment by using the classification model,

the one or more processors are configured to label the target corpus with the opinion phrase matched to obtain a second training sample; and to determine a comment corpus that does not match with any opinion phrase in the plurality of comment corpora as a latent corpus, and to label an opinion phrase of the latent corpus in a manual information labeling manner to obtain a third training sample; and

the one or more processors are configured to train an encoding-decoding model with the second training sample and the third training sample, and to extract an opinion phrase of the comment by using the encoding-decoding model,

the one or more processors are configured to:

for a comment that the opinion phrase needs to be extracted, determine whether the opinion phrase matching with the comment exists in the comment opinion dictionary;

in response to that the opinion phrase matching with the comment exists in the comment opinion dictionary, determine the opinion phrase matching with the comment as the opinion phrase of the comment; and

in response to that the opinion phrase matching with the comment does not exist in the comment opinion dictionary, input the comment into the encoding-decoding model, and determine the opinion phrase outputted from the encoding-decoding model as the opinion phrase of the comment.

7. The apparatus of claim 6 , wherein each opinion phrase comprises a substantive word and a descriptive word; and the one or more processors are configured to:

for each opinion phrase, filter the plurality of comment corpora to obtain a candidate corpus containing the substantive word and the descriptive word in the opinion phrase; and

in response to the substantive word and the descriptive word in the candidate corpus appearing in a same short sentence, and a number of words between the substantive word and the descriptive word being smaller than a threshold, determine the candidate corpus as the target corpus matching with the opinion phrase.

8. The apparatus of claim 6 , wherein

the encoding-decoding model comprises an encoder and a decoder;

wherein the encoder is configured to perform semantic encoding on the comment to obtain a hidden state vector of the comment; and

the decoder is configured to decode the hidden state vector to output the opinion phrase of the comment, wherein the decoder has learned a mapping relationship between the hidden state vector and the opinion phrase.

9. The apparatus of claim 6 , wherein each opinion phrase in the comment opinion dictionary has a fixed collocation of emotion word; and the one or more processors are configured to:

determine an emotional tendency of the comment based on the fixed collocation of emotion word of the opinion phrase matching with the comment..

10. The apparatus of claim 6 , wherein the one or more processors are configured to:

perform, based on a preset extraction rule, phrase extraction on the plurality of comment corpora to obtain a plurality of candidate phrases; and

filter, based on an appearance frequency of each candidate phrase in the plurality of comment corpora, the plurality of candidate phrases to obtain a plurality of comment opinion phrases.

11. A non-transitory computer-readable storage medium having a computer instruction stored thereon, wherein the computer instruction is configured to cause a computer to implement a comment information processing method, wherein the method comprises:

in response to a user operation, determining an opinion category corresponding to each opinion phrase in a comment opinion dictionary;

obtaining a target corpus matching with each opinion phrase from a plurality of comment corpora;

labeling the target corpus with the opinion phrase matched to obtain a second training sample;

determining a comment corpus that does not match with any opinion phrase in the plurality of comment corpora as a latent corpus, and labeling an opinion phrase of the latent corpus in a manual information labeling manner to obtain a third training sample; and

training an encoding-decoding model with the second training sample and the third training sample, and extracting an opinion phrase of the comment by using the encoding- decoding model;

for a comment that the opinion phrase needs to be extracted, determining whether the opinion phrase matching with the comment exists in the comment opinion dictionary;

in response to that the opinion phrase matching with the comment exists in the comment opinion dictionary, determining the opinion phrase matching with the comment as the opinion phrase of the comment; and

in response to that the opinion phrase matching with the comment does not exist in the comment opinion dictionary, inputting the comment into the encoding-decoding model, and determining the opinion phrase outputted from the encoding-decoding model as the opinion phrase of the comment;

for each opinion phrase, using the opinion category to label the target corpus to obtain a first training sample; and

training a classification model with the first training sample, and identifying an opinion category of a comment by using the classification model.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 21, 2022
From: LIU, HAO; HE, BOLEI; XIAO, YINYAN
To: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
Reel/Frame 061173/0276 →
Priority Claims (1)
CN 201911380220.0 · Dec 27, 2019 · national
Continuity (1)
Related Publication 20210200958A1 · Jul 1, 2021