CN110597965B - Emotion polarity analysis method and device for article, electronic equipment and storage medium - Google Patents

Emotion polarity analysis method and device for article, electronic equipment and storage medium Download PDF

Info

Publication number
CN110597965B
CN110597965B CN201910935218.9A CN201910935218A CN110597965B CN 110597965 B CN110597965 B CN 110597965B CN 201910935218 A CN201910935218 A CN 201910935218A CN 110597965 B CN110597965 B CN 110597965B
Authority
CN
China
Prior art keywords
article
training
target article
feature
training sample
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.)
Active
Application number
CN201910935218.9A
Other languages
Chinese (zh)
Other versions
CN110597965A (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.)
Shenzhen Yayue Technology Co ltd
Original Assignee
Shenzhen Yayue Technology 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 Shenzhen Yayue Technology Co ltd filed Critical Shenzhen Yayue Technology Co ltd
Priority to CN201910935218.9A priority Critical patent/CN110597965B/en
Publication of CN110597965A publication Critical patent/CN110597965A/en
Application granted granted Critical
Publication of CN110597965B publication Critical patent/CN110597965B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/55Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an emotion polarity analysis method, an emotion polarity analysis device, electronic equipment and a storage medium of an article, wherein a target article to be analyzed is obtained, feature vectors of each word and picture in the target article are respectively determined, the feature vectors of the word and the picture are spliced according to the sequence of the word and the picture in the target article to obtain multi-modal features of the target article, then the multi-modal features are subjected to feature screening by a reinforcement learning feature screening device which is trained in advance, the comprehensive feature vector of the target article is output, and the comprehensive feature vector of the target article is subjected to polarity prediction by a classifier which is trained in advance to obtain an emotion polarity classification result of the target article. Based on the technical scheme provided by the invention, whether the article is a nausea and objection article can be accurately identified.

Description

Emotion polarity analysis method and device for article, electronic equipment and storage medium
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to an emotion polarity analysis method and device for an article, electronic equipment and a storage medium.
Background
At present, various information platforms are more and more, and people can acquire a large amount of information from the information platforms. For example, the information platform may push various types of articles to the user device. The quality of the articles stored by the information platform may be highly undesirable, for example, some articles may cause the user to experience nausea and dislike, which may severely impact the user's reading experience. Therefore, it is important to analyze the article in advance to determine whether the article is an nausea-countered article.
Currently, the following schemes are mainly adopted for the analysis of articles: keywords related to nausea and dislikeness (such as bloody, boa and cadaver) are pre-designated, the content of the article is matched according to the pre-designated keywords, and if the article comprises a predetermined number of keywords, the article is determined to be the nausea and dislikeness article.
However, the processing mode for the articles at present has larger defects: the keywords need to be manually specified, which results in high labor cost and high misjudgment rate. Especially for the articles containing pictures, the false positive rate can be further improved.
Disclosure of Invention
In view of the above, the present invention aims to provide a method, a device, an electronic device and a storage medium for emotion polarity analysis of an article, so as to accurately identify whether the article is a nausea and objection article.
In order to achieve the above purpose, the present invention provides the following technical solutions:
On one hand, the invention provides an emotion polarity analysis method for an article, comprising the following steps:
obtaining a target article, wherein the target article comprises texts and pictures;
processing the target article to obtain a plurality of segmentation words contained in the target article;
Respectively determining feature vectors of all the word segmentation in the target article, and respectively determining feature vectors of all the pictures in the target article;
Splicing feature vectors of the word segmentation and the picture according to the sequence of the word segmentation and the picture in the target article to obtain multi-mode features of the target article;
Utilizing a reinforcement learning feature filter which completes training in advance to perform feature screening on the multi-modal features, and outputting comprehensive feature vectors of the target articles; the reinforcement learning feature filter sequentially performs action decision on each feature vector in the multi-mode features, wherein the action decision at least comprises deletion and reservation;
And carrying out polarity prediction on the comprehensive feature vector of the target article by using a classifier which is trained in advance to obtain the emotion polarity classification result of the target article.
Optionally, in the above method, the processing the target article to obtain a plurality of segmentation words contained in the target article includes:
Preprocessing the target article;
and performing word segmentation processing on the preprocessed target articles to obtain a plurality of segmented words.
Optionally, in the above method, the processing the target article to obtain a plurality of segmentation words contained in the target article includes:
Preprocessing the target article;
performing word segmentation processing on the preprocessed target articles to obtain a plurality of initial word segments;
respectively determining whether the plurality of initial word segments belong to a pre-established word segment dictionary;
and taking the initial word belonging to the word segmentation dictionary in the initial word segmentation as the word segmentation of the target article.
Optionally, the preprocessing includes removing one or more of special symbols, english case conversions, and complex font conversions.
Optionally, the training process of the reinforcement learning feature filter and the classifier includes:
obtaining a training sample, wherein the training sample comprises training texts and training pictures, and the labeling information of the training sample is nausea and objection;
Processing the training sample to obtain a plurality of training segmentation words contained in the training sample;
respectively determining feature vectors of each training word in the training sample;
respectively determining feature vectors of all training pictures in the training samples;
Splicing the feature vectors of the training word segmentation and the training pictures according to the sequence of the training word segmentation and the training pictures in the training samples to obtain multi-modal features of the training samples;
Performing reinforcement learning-based feature screening on the multi-modal features of the training sample by using a reinforcement learning feature screening device to be trained, and outputting a comprehensive feature vector of the training sample; the reinforcement learning feature filter performs action decision on each feature vector in the multi-mode features of the training sample, wherein the action decision at least comprises deletion and reservation;
performing polarity prediction on the comprehensive feature vector of the training sample by using a classifier to be trained to obtain an emotion polarity classification result of the training sample;
Calculating a loss function value according to the emotion polarity classification result of the training sample;
and taking the minimized loss function value as a training target, and updating parameters of the reinforcement learning feature filter and the classifier to be trained until a preset convergence condition is met.
Optionally, in the above method, the calculating a loss function value according to the emotion polarity classification result of the training sample includes:
Calculating a reward value according to the emotion polarity classification result of the training sample, the number of feature vectors contained in the multi-modal features of the training sample and the number of the feature vectors deleted in the current training of the multi-modal features of the training sample;
and calculating a loss function value based on the reward value.
Optionally, the action decision further comprises doubling.
On the other hand, the invention also provides an emotion polarity analysis device of the article, which comprises:
the target article acquisition unit is used for acquiring a target article, wherein the target article comprises texts and pictures;
the target article processing unit is used for processing the target article to obtain a plurality of segmentation words contained in the target article;
The feature vector determining unit is used for determining feature vectors of all the word segmentation in the target article respectively and determining feature vectors of all the pictures in the target article respectively;
The feature vector processing unit is used for splicing the feature vectors of the word segmentation and the picture according to the sequence of the word segmentation and the picture in the target article to obtain the multi-modal feature of the target article;
The feature vector screening unit is used for carrying out feature screening on the multi-mode features by utilizing a reinforcement learning feature screening device which completes training in advance and outputting the comprehensive feature vector of the target article; the reinforcement learning feature filter sequentially performs action decision on each feature vector in the multi-mode features, wherein the action decision at least comprises deletion and reservation;
And the emotion polarity prediction unit is used for predicting the polarity of the comprehensive feature vector of the target article by utilizing a classifier which completes training in advance, so as to obtain an emotion polarity classification result of the target article.
Optionally, the target article processing unit processes the target article to obtain a plurality of segmentation words contained in the target article, specifically:
And preprocessing the target article, and performing word segmentation processing on the preprocessed target article to obtain a plurality of segmented words.
Optionally, the target article processing unit processes the target article to obtain a plurality of segmentation words contained in the target article, specifically:
Preprocessing the target article; performing word segmentation processing on the preprocessed target articles to obtain a plurality of initial word segments; respectively determining whether the plurality of initial word segments belong to a pre-established word segment dictionary; and taking the initial word belonging to the word segmentation dictionary in the initial word segmentation as the word segmentation of the target article.
Optionally, on the basis of the device, the device further comprises a model training unit, wherein the model training unit is used for:
Obtaining a training sample, wherein the training sample comprises training texts and training pictures, and the labeling information of the training sample is nausea and objection; processing the training sample to obtain a plurality of training segmentation words contained in the training sample; respectively determining feature vectors of each training word in the training sample; respectively determining feature vectors of all training pictures in the training samples; splicing the feature vectors of the training word segmentation and the training pictures according to the sequence of the training word segmentation and the training pictures in the training samples to obtain multi-modal features of the training samples; utilizing a reinforcement learning feature filter to be trained to perform feature screening on the multi-modal features of the training sample, and outputting a comprehensive feature vector of the training sample; the reinforcement learning feature filter performs action decision on each feature vector in the multi-mode features of the training sample, wherein the action decision at least comprises deletion and reservation; performing polarity prediction on the comprehensive feature vector of the training sample by using a classifier to be trained to obtain an emotion polarity classification result of the training sample; calculating a loss function value according to the emotion polarity classification result of the training sample; and taking the minimized loss function value as a training target, and updating parameters of the reinforcement learning feature filter and the classifier to be trained until a preset convergence condition is met.
Optionally, the model training unit calculates the loss function value according to the emotion polarity classification result of the training sample, specifically:
Calculating a reward value according to the emotion polarity classification result of the training sample, the number of feature vectors contained in the multi-modal features of the training sample and the number of the feature vectors deleted in the current training of the multi-modal features of the training sample; and calculating a loss function value based on the reward value.
In another aspect, the present invention also provides an electronic device, including a processor and a memory;
The processor is used for calling and executing the program stored in the memory;
The memory is used for storing the program, and the program is at least used for:
obtaining a target article, wherein the target article comprises texts and pictures;
processing the target article to obtain a plurality of segmentation words contained in the target article;
Respectively determining feature vectors of all the word segmentation in the target article, and respectively determining feature vectors of all the pictures in the target article;
Splicing feature vectors of the word segmentation and the picture according to the sequence of the word segmentation and the picture in the target article to obtain multi-mode features of the target article;
Utilizing a reinforcement learning feature filter which completes training in advance to perform feature screening on the multi-modal features, and outputting comprehensive feature vectors of the target articles; the reinforcement learning feature filter sequentially performs action decision on each feature vector in the multi-mode features, wherein the action decision at least comprises deletion and reservation;
And carrying out polarity prediction on the comprehensive feature vector of the target article by using a classifier which is trained in advance to obtain the emotion polarity classification result of the target article.
On the other hand, the invention also provides a storage medium, wherein the storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by a processor, the emotion polarity analysis method is realized.
Therefore, the invention has the beneficial effects that:
According to the emotion polarity analysis method of the article, feature vectors are respectively extracted aiming at the word segmentation and the picture in the target article, and then the feature vectors of the word segmentation and the picture are spliced according to the sequence of the word segmentation and the picture in the target article to obtain the multi-modal features of the target article; then, performing action decision on each feature vector in the multi-mode features in sequence by using a reinforcement learning feature filter to determine whether the feature vector is to be reserved or deleted, so as to obtain a comprehensive feature vector of the target article; and then, carrying out polarity prediction on the comprehensive feature vectors of the target articles by using a classifier to obtain emotion polarity classification results of the target articles.
It can be seen that in the emotion polarity analysis method of the article disclosed by the invention, the fact that the picture in the target article possibly brings nausea and objection to the user is considered, so that the multi-modal characteristics of the target article combine the multi-dimensional characteristics of the picture and the text, and the characteristic information for emotion polarity recognition is more comprehensive; in addition, the context relationship in the target article also affects the emotion polarity recognition result, so that the multi-modal characteristics of the target article keep the structural characteristics of the target article, namely the sequential relationship between word segmentation and pictures in the target article, and the accuracy of emotion polarity recognition is improved; in addition, the multi-modal features are subjected to feature screening through the reinforcement learning feature screening device, so that more definite nausea and anti-sense features can be reserved, and features irrelevant to emotion polarity identification tasks are deleted, so that the classifier can accurately predict emotion polarities of target articles; in addition, the classifier predicts the emotion polarity of the target article at one time based on the comprehensive feature vector of the target article output by the reinforcement learning feature filter, so that the calculation complexity is reduced, and the training cost of the classifier can be reduced. In conclusion, based on the emotion polarity analysis method of the article disclosed by the invention, whether the article is a nausea and objection article can be more accurately identified.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block diagram of an article processing system according to the present invention;
FIG. 2 is a flowchart of an emotion polarity analysis method for an article according to the present invention;
FIG. 3 is a schematic diagram of an emotion polarity analysis model of an article according to the present invention;
FIG. 4 is a flow chart of a method of training a reinforcement learning feature filter and classifier provided by the present invention;
FIG. 5 is a signaling diagram of the emotion polarity analysis method of an article in an application scenario according to the present invention;
FIG. 6 is a schematic illustration of a nausea-countering article according to the present invention;
FIG. 7 is a schematic diagram of an interface of an application provided by the present invention;
FIG. 8 is a schematic diagram of an emotion polarity analysis device of an article according to the present invention;
Fig. 9 is a hardware configuration diagram of an electronic device according to the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides an emotion polarity analysis method for an article, so as to accurately identify whether the article is a nausea and objection article.
The emotion polarity analysis method provided by the invention can be applied to a server or a terminal. The aforementioned terminals may be electronic devices such as desktop computers, mobile terminals (e.g., smartphones and tablet computers), and the like. The server may be a server, a server cluster formed by a plurality of servers, or a cloud computing service center.
Referring to fig. 1, fig. 1 is a block diagram of an article processing system according to the present invention. The article processing system includes a terminal 101 and a server 102. Data interaction is performed between the terminal 101 and the server 102 via a communication network.
In one possible implementation, the terminal 101 sends an article acquisition request to the server 102. The server 102 responds to the article acquisition request sent by the terminal 101 to obtain corresponding articles, analyzes emotion polarities of the obtained articles to obtain emotion polarity classification results of the articles, and pushes the articles with the emotion polarity classification results of being non-nausea and anti-sense to the terminal 101.
In another possible implementation manner, the server 102 obtains an article to be pushed, performs emotion polarity analysis on the article to be pushed, obtains an emotion polarity classification result of the article to be pushed, and pushes the article with the emotion polarity classification result of being non-nausea and anti-susceptibility to the terminal 101.
In the two possible implementations, the server 101 pushes, to the terminal 101, an article whose emotion polarity classification result is not nausea and objection, which may be: the identification of articles whose emotional polarity classification results are not nausea-countering is sent to the terminal 101. When the user selects the identity of a certain article, the terminal 101 transmits a request for acquiring article data to the server 102, and the server 102 transmits a file of the article to the terminal 101 in response to the request, so that the user reads the article at the terminal 101. In practice, the identification of an article may be a combination of one or more of a title, abstract, and icon of the article.
Referring to fig. 2, fig. 2 is a flowchart of an emotion polarity analysis method for an article according to the present invention.
The method comprises the following steps:
S201: a target article is obtained, the target article containing text and pictures.
The target article, i.e. the article to be identified, contains text and pictures.
S202: and respectively determining the feature vectors of the segmented words in the target article.
In implementation, processing the target article to obtain a plurality of segmented words contained in the target article, and then respectively determining the feature vectors of the segmented words in the target article.
In one possible implementation, the target article is first preprocessed, and then the preprocessed target article is subjected to word segmentation processing, so as to obtain a plurality of segmented words.
In one possible implementation manner, the target article is preprocessed first, then the preprocessed target article is subjected to word segmentation processing to obtain a plurality of initial words, then whether the initial words belong to a pre-established word segmentation dictionary is respectively determined, the initial words belonging to the word segmentation dictionary are used as final words of the target article, the subsequent operation of determining feature vectors is performed for the words, and the initial words which do not exist in the word segmentation dictionary are deleted.
In implementation, the method can segment the articles in a preset time period, count word frequencies of the segmented words, and construct a segmented word dictionary by utilizing segmented words with word frequencies reaching preset values.
Wherein the preprocessing of the target article includes one or more of: special symbols, english case conversion and simplified font conversion are removed.
S203: and respectively determining the feature vectors of the pictures in the target article.
The feature vector of the word is also called word vector, and the feature vector of the picture is also called picture feature.
In implementation, the existing image feature extraction network may be used to determine the image feature of the image, and the existing word vector extraction network may be used to determine the word vector of the segmented word. For example, each Word segment is mapped to a corresponding Word Vector using a Word2vec model (Word-to-Vector).
It should be noted that the feature vectors of the segmentation and the picture are the same in dimension. For example, the feature vector of the segmentation and the feature vector of the picture are both 200 dimensions.
S204: and splicing the feature vectors of the word segmentation and the picture according to the sequence of the word segmentation and the picture in the target article to obtain the multi-modal feature of the target article.
The order in which the plurality of tokens and pictures appear in the target article is fixed. After the feature vectors of the word and the picture are obtained, the feature vectors of the word and the picture are spliced in sequence according to the sequence of the word and the picture in the target article, so that the multi-mode feature of the target article is obtained.
In one possible implementation, the i-th row element in the multi-modal feature is: the segmentation words or the feature vectors of the pictures at the ith position in all segmentation words and pictures.
For example, if the word 1, the word 2, the picture 1, and the word 3 appear in the target article in sequence, the feature vector of the word 1 is taken as the first row of the multi-modal feature, the feature vector of the word 2 is taken as the second row of the multi-modal feature, the feature vector of the picture 1 is taken as the third row of the multi-modal feature, and the feature vector of the word 3 is taken as the 4 th row of the multi-modal feature.
If the object article contains n pictures and m segmented words, feature vectors of the n pictures are sequentially represented as p 1、p2、p3、…、pn, feature vectors of the m segmented words are sequentially represented as w 1、w2、w3、…、wm, and each feature vector is 200 dimensions. Then the multi-modal feature of the target article is (n+m) 200.
The picture in the target article can also bring nausea and objection to the user, and in the invention, the multi-modal characteristics of the target article combine the multi-dimensional characteristics of the picture and the text, so that the characteristic information for carrying out emotion polarity recognition is more comprehensive. In addition, the context in the target article can also have an impact on the result of emotion polarity recognition. In the invention, the multi-modal characteristics of the target article keep the structural characteristics of the target article, namely the sequence relation of the word segmentation and the picture in the target article, which is beneficial to improving the accuracy of emotion polarity identification.
S205: and carrying out feature screening on the multi-modal features by utilizing a reinforcement learning feature screening device which completes training in advance, and outputting the comprehensive feature vector of the target article. The reinforcement learning (Reinforcement Learning, RL) feature filter sequentially performs action decision on each feature vector in the multi-modal feature, wherein the action decision at least comprises deletion and retention.
The reinforcement learning feature filter is completed based on reinforcement learning training, and effective expression of features strongly related to emotion polarity recognition tasks can be obtained by sequentially performing action decision on each feature vector in the multi-modal features. That is, the reinforcement learning feature filter is used for filtering feature vectors in the multi-modal features, so that more definite nausea and objectivity features can be reserved, and features irrelevant to emotion polarity recognition tasks are deleted, so that the classifier can accurately predict emotion polarities of target articles. In addition, the reinforcement learning feature filter sequentially makes action decisions on each feature vector in the multi-mode features according to the sequence of the word segmentation and the picture in the target article, so that the reinforcement learning feature filter can better represent the structural features of the article and also better accords with the reading habit used for the article.
S206: and carrying out polarity prediction on the comprehensive feature vectors of the target articles by utilizing a classifier which is trained in advance to obtain the emotion polarity classification result of the target articles.
The emotion polarity classification result of the target article comprises: the target article is a nausea objection article or the target article is a non-nausea objection article.
It should be noted that, the classifier predicts the polarity of the comprehensive feature vector of the target article, and outputs the probability value of the target article belonging to the nausea and objection article, where the probability value is between 0 and 1, including the endpoint value. And then determining whether the target article is a nausea and objection article or a non-nausea and objection article according to the probability value output by the classifier. For example, if the probability value output by the classifier is greater than a preset value, the target article is determined to be a nausea and objection article, and if the probability value output by the classifier is less than or equal to the preset value, the target article is determined to be a non-nausea and objection article. The preset value may be configured to be 0.5.
According to the emotion polarity analysis method of the article, feature vectors are respectively extracted aiming at the word segmentation and the picture in the target article, and then the feature vectors of the word segmentation and the picture are spliced according to the sequence of the word segmentation and the picture in the target article to obtain the multi-modal features of the target article; then, performing action decision on each feature vector in the multi-mode features in sequence by using a reinforcement learning feature filter to determine whether the feature vector is to be reserved or deleted, so as to obtain a comprehensive feature vector of the target article; and then, carrying out polarity prediction on the comprehensive feature vectors of the target articles by using a classifier to obtain emotion polarity classification results of the target articles.
It can be seen that in the emotion polarity analysis method of the article disclosed by the invention, the fact that the picture in the target article possibly brings nausea and objection to the user is considered, so that the multi-modal characteristics of the target article combine the multi-dimensional characteristics of the picture and the text, and the characteristic information for emotion polarity recognition is more comprehensive; in addition, the context relationship in the target article also affects the emotion polarity recognition result, so that the multi-modal characteristics of the target article keep the structural characteristics of the target article, namely the sequential relationship between word segmentation and pictures in the target article, and the accuracy of emotion polarity recognition is improved; in addition, the multi-modal features are subjected to feature screening through the reinforcement learning feature screening device, so that more definite nausea and anti-sense features can be reserved, and features irrelevant to emotion polarity identification tasks are deleted, so that the classifier can accurately predict emotion polarities of target articles. In conclusion, based on the emotion polarity analysis method of the article disclosed by the invention, whether the article is a nausea and objection article can be more accurately identified; in addition, the classifier predicts the polarity of the target article at one time based on the comprehensive feature vector of the target article output by the reinforcement learning feature filter, so that the calculation complexity is reduced, and the training cost of the classifier can be reduced.
The emotion polarity analysis method of the article provided by the invention can be realized through an emotion polarity analysis model. Fig. 3 is a schematic diagram of an emotion polarity analysis model of an article provided by the invention. The emotion polarity analysis model mainly includes a feature extractor 301, a reinforcement learning feature filter 302, and a classifier 303.
The feature extractor 301 is configured to: processing the target article to obtain a plurality of segmented words contained in the target article, respectively determining word vectors of the segmented words in the target article, respectively determining picture features of the pictures in the target article, and splicing the word vectors of the segmented words and the picture features of the pictures according to the sequence of the segmented words and the pictures in the target article to obtain multi-mode features of the target article.
The reinforcement learning feature filter 302 is configured to: and sequentially performing action decision on each feature vector in the multi-mode features to obtain the comprehensive feature vector of the target article, and outputting the comprehensive feature vector of the target article to the classifier 303. Wherein the action decision for each feature vector by the reinforcement learning feature filter 302 includes at least deletion and retention.
Assume that the multi-modal feature of the target article includes (n+m) feature vectors, each of which is taken as a state. The reinforcement learning feature filter 302 makes a motion decision on the feature vector of the current state according to the previous state transition and the feature vector of the current state, and transitions to the next state after performing a corresponding motion on the feature vector of the current state. The reinforcement learning feature filter 302 obtains the comprehensive feature vector of the target article after completing (n+m) action decisions on the multi-modal features of the target article.
Taking fig. 3 as an example, the feature filter 302 performs an action decision on the feature vector in the s1 state, performs a corresponding action on the feature vector in the s1 state, then transfers to the s2 state, performs an action decision on the feature vector in the s2 state, performs a corresponding action on the feature vector in the s2 state, then transfers to the s3 state, and so on, and after performing a corresponding action on the feature vector in the s (n+m) state, obtains the integrated feature vector of the object article.
Classifier 303 is used to: and (3) performing polarity prediction on the comprehensive feature vectors of the target articles output by the reinforcement learning feature filter 302 to obtain emotion polarity classification results of the target articles.
In one possible implementation, the classifier 303 employs a convolutional neural network (Convolutional Neural Networks, CNN). In another possible implementation, classifier 303 employs a Long Short-Term Memory network (LSTM).
In implementations, the feature extractor may be trained separately while the reinforcement learning feature filter and classifier are trained simultaneously. The training process of the reinforcement learning feature filter and classifier used in the present invention is described below.
Referring to fig. 4, fig. 4 is a flowchart of a method for training a reinforcement learning feature filter and classifier according to the present invention. The training method comprises the following steps:
s401: training samples are obtained. The training samples comprise training texts and training pictures, and the labeling information of the training samples is nausea and objection.
In the training method disclosed by the invention, the training samples are nausea and objection articles. The text in the training sample is referred to as training text, and the pictures in the training sample are referred to as training pictures.
S402: and respectively determining the feature vectors of each training word in the training sample.
And processing the training sample to obtain a plurality of training words contained in the training sample, and then respectively determining the feature vectors of the training words in the training sample.
In one possible implementation, the training samples are first preprocessed, and then the preprocessed training samples are subjected to word segmentation processing, so as to obtain a plurality of training word segments.
In one possible implementation manner, a training sample is preprocessed, word segmentation processing is performed on the preprocessed training sample, a plurality of initial training words are obtained, whether the initial training words exist in a pre-established word segmentation dictionary or not is determined, the initial training words existing in the word segmentation dictionary are used as final training words, subsequent operation for determining feature vectors is performed on the training words, and initial training words which do not exist in the word segmentation dictionary are deleted.
Wherein the preprocessing of the training samples includes one or more of: special symbols, english case conversion and simplified font conversion are removed.
S403: and respectively determining the feature vectors of all the training pictures in the training samples.
The feature vector of the training word is also called word vector, and the feature vector of the training picture is also called picture feature.
In the implementation, the picture characteristics of the training pictures are determined by using the existing image characteristic extraction network, and the word vectors of the training word segmentation are determined by using the existing word vector extraction network. For example, each training word is mapped to a corresponding word vector using a word2vec model. It should be noted that the dimensions of feature vectors of the training word and the training picture are the same.
S404: and splicing the feature vectors of the training word segmentation and the training pictures according to the sequence of the training word segmentation and the training pictures in the training samples to obtain the multi-modal features of the training samples.
The sequence of the training word segmentation and the training pictures in the training sample is fixed. After the feature vectors of each training word and each training picture are obtained, the feature vectors of each training word and each training picture are spliced in sequence according to the sequence of the training word and the training picture in the appearance of the training sample, so that the multi-modal features of the training sample are obtained.
In one possible implementation, the i-th row element in the multimodal feature of the training sample is: and training word segmentation or feature vectors of training pictures at the ith position in all training word segmentation and training pictures.
S405: and carrying out feature screening on the multi-modal features of the training sample by utilizing the reinforcement learning feature screening device to be trained, and outputting the comprehensive feature vector of the training sample. The reinforcement learning feature filter performs action decision on each feature vector in the multi-modal features of the training sample, wherein the action decision at least comprises deletion and retention.
State and action policies are defined in the reinforcement learning feature filter.
The reinforcement learning feature filter makes action decisions on feature vectors corresponding to the current state s t according to the previous state transition and the feature vectors of the current state, and transitions to the next state s t+1 after executing corresponding actions on the feature vectors of the current state s t.
Action a t of the reinforcement learning feature filter includes preserving and deleting feature vectors corresponding to the preserving current state s t and deleting feature vectors corresponding to the current state s t, respectively, and defines a policy at the current time (i.e., time t) as pi, which is expressed as follows:
π(at|st;θ)=σ(W*st+b)
Where pi (a t|st; θ) represents the probability of execution of the selection action a t, σ represents the activation function, θ= { W, b } represents the parameters of the reinforcement learning feature filter. During the training phase of the reinforcement learning feature filter, the actions are sampled and executed according to the probability of pi (a t|st; theta). In the use stage of the reinforcement learning feature filter, selecting an action with the highest probability under the current state s t, and carrying out the retention or deletion processing of the feature vectors, namely:
at=argmaxaπ(a|st;θ)
S406: and carrying out polarity prediction on the comprehensive feature vector of the training sample by utilizing the classifier to be trained to obtain the emotion polarity classification result of the training sample.
S407: and calculating a loss function value according to the emotion polarity classification result of the training sample.
S408: and updating parameters of the reinforcement learning feature filter and the classifier to be trained by taking the minimized loss function value as a training target until a preset convergence condition is met.
In one possible implementation, calculating the loss function value according to the emotion polarity classification result of the training sample includes:
Calculating a reward value according to the emotion polarity classification result of the training sample, the number of feature vectors contained in the multi-modal features of the training sample and the number of the feature vectors deleted in the current training of the multi-modal features of the training sample; a loss function value is calculated based on the prize value.
Calculating a prize value according to formula (1):
wherein R L is a reward value, P (y|X) is a probability value that the training sample is a nausea and objection article, gamma is a preset super parameter, L' is the number of feature vectors of the multi-modal feature of the training sample deleted in the training, and L is the number of feature vectors contained in the multi-modal feature of the training sample.
The loss function value is calculated according to equation (2).
In formula (2), R L is a reward value, L is the number of feature vectors included in the multi-modal feature of the training sample, t is the current time, θ is a network parameter, and policy pi θ(at|st) represents a probability of selecting an action a t to be performed in the current state s t based on the network parameter θ.
The reward value in the invention is delay reward (DELAYED REWARD), after the classifier finishes emotion polarity prediction on the training sample, the reward value is calculated according to the formula (1), and then the loss function value is calculated according to the formula (2).
In one possible implementation, the preset convergence condition is: the loss function value is smaller than a preset value. In another possible implementation, the preset convergence condition is: the training times of the reinforcement learning feature filter and the classifier reach the preset iteration times.
In one possible implementation, the action policy includes doubling in addition to deletion and retention. If the reinforcement learning feature filter makes a doubling action decision on the feature vector in the multi-modal feature, then the feature vector is doubled using the trained doubling factor, which is greater than 1.
That is, the reinforcement learning feature filter is used for carrying out feature screening on the multi-modal features, deleting the features irrelevant to the emotion polarity recognition task, retaining the more definite nausea and dislike features, and doubling the nausea and dislike features with higher relevance to the emotion polarity recognition task, so that the classifier can accurately predict the emotion polarity of the target article.
The emotion polarity analysis method of the article provided by the present invention will be described below by taking an example of requesting the article from the server by the "see-through" function in the first application of the terminal.
Referring to fig. 5, fig. 5 is a signaling diagram of an emotion polarity analysis method of an article in an application scenario provided by the present invention. The method comprises the following steps:
S501: and the terminal runs the first application and displays an interface of the first application.
The terminal can be a mobile phone or a tablet computer. The first application may be a communication application or a reading application, and of course, the first application may also be other types of applications.
The interface of the first application contains a plurality of functional options including, for example: "see one view" function option, "sweep one sweep" function option, "search one search" function option, "shopping" function option, game "function option, and" applet "function option, as shown in fig. 7.
S502: the terminal generates a request for acquiring an article in response to a user operation for selecting the "see at first" function.
S503: and the terminal sends an article acquisition request to the server.
S504: and the server receives the article acquisition request and acquires the article to be pushed.
S505: and the server carries out emotion polarity recognition on the articles to be pushed to obtain emotion polarity classification results of the articles to be pushed.
The server carries out emotion polarity recognition on the article to be pushed based on the method provided by the invention so as to determine whether the article to be pushed is a nausea article or a non-nausea article.
S506: and the server generates article pushing information according to the emotion polarity classification result of the articles to be pushed.
The article pushing information comprises identification of articles with the emotion polarity classification result of non-nausea and anti-emotion in the articles to be pushed. That is, the server pushes only the non-nausea objectionable articles among the articles to be pushed to the terminal. Fig. 6 is an example of a nausea and objection article containing pictures that can cause discomfort to the user.
S507: and the server sends the article push information to the terminal.
S508: and the terminal generates a 'looking at one' page based on the article push information and displays the page.
The "see at one glance" page contains the article push information, as shown in fig. 7. Then, if the user wants to read a certain article, the user selects the identification of the article to be read, the terminal acquires the file of the article from the server and displays the file, and the user can read the article.
On the other hand, the invention also provides an emotion polarity analysis device of the article.
The emotion polarity analysis device of the article provided by the invention is described below. The emotion polarity analysis device described below may be considered as a program module that is required to be set by the electronic device to implement the emotion polarity analysis method provided in the embodiment of the present invention. The description of the emotion polarity analysis device hereinafter may be referred to with the description of the emotion polarity analysis method hereinabove.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an emotion polarity analysis device of an article according to the present invention. The device comprises:
a target article obtaining unit 801, configured to obtain a target article, where the target article includes a text and a picture;
A target article processing unit 802, configured to process a target article to obtain a plurality of segmentation words contained in the target article;
A feature vector determining unit 803, configured to determine feature vectors of respective segmented words in the target article, and determine feature vectors of respective pictures in the target article;
the feature vector processing unit 804 is configured to splice feature vectors of the word segmentation and the picture according to the sequence of the word segmentation and the picture in the target article, so as to obtain multi-modal features of the target article;
A feature vector screening unit 805, configured to perform feature screening on the multi-modal features by using a reinforcement learning feature screening device that completes training in advance, and output a comprehensive feature vector of the target article; the reinforcement learning feature filter sequentially performs action decision on each feature vector in the multi-mode features, wherein the action decision at least comprises deletion and reservation;
and the emotion polarity prediction unit 806 is configured to perform polarity prediction on the comprehensive feature vector of the target article by using a classifier that completes training in advance, so as to obtain an emotion polarity classification result of the target article.
In an alternative embodiment, the target article processing unit 802 is specifically configured to: preprocessing the target article; and performing word segmentation processing on the preprocessed target articles to obtain a plurality of segmented words.
In an alternative embodiment, the target article processing unit 802 is specifically configured to: preprocessing the target article; performing word segmentation processing on the preprocessed target articles to obtain a plurality of initial word segments; respectively determining whether a plurality of initial word segments belong to a pre-established word segment dictionary; and taking the initial word belonging to the word segmentation dictionary in the initial word segmentation as the word segmentation of the target article.
Wherein the preprocessing includes removing one or more of special symbols, english case conversion, and simplified font conversion.
In an alternative embodiment, the emotion polarity analysis device further comprises a model training unit.
The model training unit is used for: obtaining a training sample, wherein the training sample comprises training texts and training pictures, and the labeling information of the training sample is nausea and objection; processing the training sample to obtain a plurality of training segmentation words contained in the training sample; respectively determining feature vectors of each training word in the training sample; respectively determining feature vectors of all training pictures in a training sample; splicing feature vectors of the training word segmentation and the training pictures according to the sequence of the training word segmentation and the training pictures in the training samples to obtain multi-modal features of the training samples; utilizing the reinforcement learning feature screening device to be trained to perform feature screening on the multi-modal features of the training sample, and outputting the comprehensive feature vector of the training sample; the reinforcement learning feature filter performs action decision on each feature vector in the multi-modal features of the training sample, wherein the action decision at least comprises deletion and retention; performing polarity prediction on the comprehensive feature vector of the training sample by using a classifier to be trained to obtain the emotion polarity classification result of the training sample; calculating a loss function value according to the emotion polarity classification result of the training sample; and updating parameters of the reinforcement learning feature filter and the classifier to be trained by taking the minimized loss function value as a training target until a preset convergence condition is met.
In an alternative embodiment, the model training unit calculates the loss function value according to the emotion polarity classification result of the training sample, specifically:
Calculating a reward value according to the emotion polarity classification result of the training sample, the number of feature vectors contained in the multi-modal features of the training sample and the number of the feature vectors deleted in the current training of the multi-modal features of the training sample; a loss function value is calculated based on the prize value.
On the other hand, the embodiment of the invention also provides electronic equipment.
Referring to fig. 9, fig. 9 is a hardware configuration diagram of an electronic device according to an embodiment of the present invention. The electronic device 900 may include a processor 901 and a memory 902.
Optionally, the terminal may further include: a communication interface 903, an input unit 904, a display 905 and a communication bus 906. The processor 901, the memory 902, the communication interface 903, the input unit 904, and the display 905 all perform communication with each other through the communication bus 906.
In an embodiment of the present invention, the processor 901 may be a central processing unit (Central Processing Unit, CPU), an asic, a dsp, an off-the-shelf programmable gate array, or other programmable logic device.
The processor 901 may call a program stored in the memory 902.
The memory 902 is used to store one or more programs, which may include program code comprising computer-operating instructions. In the embodiment of the present invention, at least a program for realizing the following functions is stored in the memory:
obtaining a target article, wherein the target article comprises texts and pictures;
Processing the target article to obtain a plurality of segmentation words contained in the target article;
Respectively determining feature vectors of all the segmentation words in the target article, and respectively determining feature vectors of all the pictures in the target article;
Splicing the feature vectors of the word segmentation and the picture according to the sequence of the word segmentation and the picture in the target article to obtain the multi-modal feature of the target article;
Utilizing a reinforcement learning feature filter which completes training in advance to perform feature screening on the multi-modal features, and outputting comprehensive feature vectors of the target articles; the reinforcement learning feature filter sequentially performs action decision on each feature vector in the multi-mode features, wherein the action decision at least comprises deletion and reservation;
And carrying out polarity prediction on the comprehensive feature vectors of the target articles by utilizing a classifier which is trained in advance to obtain the emotion polarity classification result of the target articles.
In one possible implementation, the memory 902 may include a stored program area and a stored data area, where the stored program area may store an operating system, the above-mentioned programs, and the like; the storage data area may store data or the like created during use of the computer device.
In addition, the memory 902 may include high-speed random access memory, and may also include nonvolatile memory.
The communication interface 903 may be an interface of a communication module.
The input unit 904 may include a touch sensing unit sensing a touch event on the touch display panel, a keyboard, and the like.
The display 905 includes a display panel such as a touch display panel or the like.
Of course, the electronic device structure shown in fig. 9 is not limited to the electronic device in the embodiment of the present invention, and the electronic device may include more or fewer components than those shown in fig. 9 or may combine some components in practical applications.
In some embodiments, the electronic device may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the plurality of nodes through a network communication. Among them, the nodes may form a Peer-To-Peer (P2P) network, and any type of computing device, such as a server, a terminal, etc., may become a node in the blockchain system by joining the Peer-To-Peer network.
On the other hand, the embodiment of the invention also provides a storage medium, wherein computer executable instructions are stored in the storage medium, and when the computer executable instructions are loaded and executed by a processor, the emotion polarity analysis method of the article in any one embodiment is realized.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. The apparatus, the electronic device and the storage medium disclosed in the embodiments correspond to the method disclosed in the embodiments, so that the description is simpler, and the relevant parts refer to the description of the method section.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A method for emotion polarity analysis of an article, comprising:
obtaining a target article, wherein the target article comprises texts and pictures;
processing the target article to obtain a plurality of segmentation words contained in the target article;
Respectively determining feature vectors of all the word segmentation in the target article, and respectively determining feature vectors of all the pictures in the target article;
Splicing feature vectors of the word segmentation and the picture according to the sequence of the word segmentation and the picture in the target article to obtain multi-mode features of the target article; the multi-modal feature is used for reserving structural features of the target article;
Utilizing a reinforcement learning feature filter which is trained in advance to perform feature screening on the multi-modal features so as to keep nausea and objection features, and outputting comprehensive feature vectors of the target articles; the reinforcement learning feature filter sequentially makes action decisions on each feature vector in the multi-modal features according to the sequence of the word segmentation and the pictures in the target article, wherein the action decisions at least comprise deletion and reservation;
Carrying out emotion polarity prediction on the comprehensive feature vector of the target article by using a classifier which is trained in advance to obtain an emotion polarity classification result of the target article; the emotion polarity classification result comprises that the target article is a nausea and objection article or a non-nausea and objection article;
Generating article pushing information according to the emotion polarity classification result; the article pushing information comprises article marks with emotion polarity classification results of non-nausea and non-objection;
sending the article push information to a terminal;
Wherein the training process of the reinforcement learning feature filter and the classifier comprises the following steps: performing reinforcement learning-based feature screening on the multi-modal features of the training sample by using a reinforcement learning feature screening device to be trained, and outputting the comprehensive feature vector of the training sample; wherein the reinforcement learning feature filter makes action decisions for each feature vector in the multi-modal features of the training sample; performing polarity prediction on the comprehensive feature vector of the training sample by using a classifier to be trained to obtain an emotion polarity classification result of the training sample; calculating a reward value according to the emotion polarity classification result of the training sample, the number of feature vectors contained in the multi-modal features of the training sample and the number of the feature vectors deleted in the current training of the multi-modal features of the training sample; calculating a loss function value based on the reward value; calculating a loss function value based on the reward value and on a probability of the network parameter selecting action to be performed in the current state; and taking the minimized loss function value as a training target, and updating parameters of the reinforcement learning feature filter and the classifier to be trained until a preset convergence condition is met.
2. The method of claim 1, wherein the processing the target article to obtain a plurality of segments contained in the target article comprises:
Preprocessing the target article;
and performing word segmentation processing on the preprocessed target articles to obtain a plurality of segmented words.
3. The method of claim 1, wherein the processing the target article to obtain a plurality of segments contained in the target article comprises:
Preprocessing the target article;
performing word segmentation processing on the preprocessed target articles to obtain a plurality of initial word segments;
respectively determining whether the plurality of initial word segments belong to a pre-established word segment dictionary;
and taking the initial word belonging to the word segmentation dictionary in the initial word segmentation as the word segmentation of the target article.
4. A method according to claim 2 or 3, wherein the preprocessing comprises removing one or more of special symbols, english case conversion and simplified font conversion.
5. The method according to claim 1, wherein the method further comprises:
obtaining a training sample, wherein the training sample comprises training texts and training pictures, and the labeling information of the training sample is nausea and objection;
Processing the training sample to obtain a plurality of training segmentation words contained in the training sample;
respectively determining feature vectors of each training word in the training sample;
respectively determining feature vectors of all training pictures in the training samples;
And splicing the feature vectors of the training word segmentation and the training pictures according to the sequence of the training word segmentation and the training pictures in the training samples to obtain the multi-modal features of the training samples.
6. The method of claim 1 or 5, wherein the action decision further comprises doubling.
7. An emotion polarity analysis device for an article, comprising:
the target article acquisition unit is used for acquiring a target article, wherein the target article comprises texts and pictures;
the target article processing unit is used for processing the target article to obtain a plurality of segmentation words contained in the target article;
The feature vector determining unit is used for determining feature vectors of all the word segmentation in the target article respectively and determining feature vectors of all the pictures in the target article respectively;
the feature vector processing unit is used for splicing the feature vectors of the word segmentation and the picture according to the sequence of the word segmentation and the picture in the target article to obtain the multi-modal feature of the target article; the multi-modal feature is used for reserving structural features of the target article;
the feature vector screening unit is used for carrying out feature screening on the multi-mode features by utilizing a reinforcement learning feature screening device which completes training in advance so as to keep nausea and dislike features and output the comprehensive feature vector of the target article; the reinforcement learning feature filter sequentially makes action decisions on each feature vector in the multi-modal features according to the sequence of the word segmentation and the pictures in the target article, wherein the action decisions at least comprise deletion and reservation;
The emotion polarity prediction unit is used for predicting the polarity of the comprehensive feature vector of the target article by using a classifier which is trained in advance to obtain an emotion polarity classification result of the target article; the emotion polarity classification result comprises that the target article is a nausea and objection article or a non-nausea and objection article; the emotion polarity classification result is used for generating article pushing information; the article pushing information comprises article marks with emotion polarity classification results of non-nausea and non-objection; the article pushing information is used for being sent to the terminal;
The model training unit is used for carrying out reinforcement learning-based feature screening on the multi-mode features of the training sample by utilizing the reinforcement learning feature screening device to be trained and outputting the comprehensive feature vector of the training sample; wherein the reinforcement learning feature filter makes action decisions for each feature vector in the multi-modal features of the training sample; performing polarity prediction on the comprehensive feature vector of the training sample by using a classifier to be trained to obtain an emotion polarity classification result of the training sample; calculating a reward value according to the emotion polarity classification result of the training sample, the number of feature vectors contained in the multi-modal features of the training sample and the number of the feature vectors deleted in the current training of the multi-modal features of the training sample; calculating a loss function value based on the reward value; calculating a loss function value based on the reward value and on a probability of the network parameter selecting action to be performed in the current state; and taking the minimized loss function value as a training target, and updating parameters of the reinforcement learning feature filter and the classifier to be trained until a preset convergence condition is met.
8. The apparatus of claim 7, wherein the target article processing unit is configured to pre-process the target article; and performing word segmentation processing on the preprocessed target articles to obtain a plurality of segmented words.
9. The apparatus of claim 7, wherein the target article processing unit is configured to pre-process the target article; performing word segmentation processing on the preprocessed target articles to obtain a plurality of initial word segments; respectively determining whether the plurality of initial word segments belong to a pre-established word segment dictionary; and taking the initial word belonging to the word segmentation dictionary in the initial word segmentation as the word segmentation of the target article.
10. The apparatus of claim 7, wherein the model training unit is further configured to obtain a training sample, the training sample includes training text and training pictures, and the labeling information of the training sample is nausea and objection; processing the training sample to obtain a plurality of training segmentation words contained in the training sample; respectively determining feature vectors of each training word in the training sample; respectively determining feature vectors of all training pictures in the training samples; and splicing the feature vectors of the training word segmentation and the training pictures according to the sequence of the training word segmentation and the training pictures in the training samples to obtain the multi-modal features of the training samples.
11. An electronic device comprising a processor and a memory;
The processor is used for calling and executing the program stored in the memory;
The memory is used for storing the program, and the program is at least used for:
obtaining a target article, wherein the target article comprises texts and pictures;
processing the target article to obtain a plurality of segmentation words contained in the target article;
Respectively determining feature vectors of all the word segmentation in the target article, and respectively determining feature vectors of all the pictures in the target article;
Splicing feature vectors of the word segmentation and the picture according to the sequence of the word segmentation and the picture in the target article to obtain multi-mode features of the target article; the multi-modal feature is used for reserving structural features of the target article;
Utilizing a reinforcement learning feature filter which is trained in advance to perform feature screening on the multi-modal features so as to keep nausea and objection features, and outputting comprehensive feature vectors of the target articles; the reinforcement learning feature filter sequentially makes action decisions on each feature vector in the multi-modal features according to the sequence of the word segmentation and the pictures in the target article, wherein the action decisions at least comprise deletion and reservation;
Performing polarity prediction on the comprehensive feature vectors of the target articles by using a classifier which is trained in advance to obtain emotion polarity classification results of the target articles; the emotion polarity classification result comprises that the target article is a nausea and objection article or a non-nausea and objection article; generating article pushing information according to the emotion polarity classification result; the article pushing information comprises article marks with emotion polarity classification results of non-nausea and non-objection; sending the article push information to a terminal;
Wherein the training process of the reinforcement learning feature filter and the classifier comprises the following steps: performing reinforcement learning-based feature screening on the multi-modal features of the training sample by using a reinforcement learning feature screening device to be trained, and outputting the comprehensive feature vector of the training sample; wherein the reinforcement learning feature filter makes action decisions for each feature vector in the multi-modal features of the training sample; performing polarity prediction on the comprehensive feature vector of the training sample by using a classifier to be trained to obtain an emotion polarity classification result of the training sample; calculating a reward value according to the emotion polarity classification result of the training sample, the number of feature vectors contained in the multi-modal features of the training sample and the number of the feature vectors deleted in the current training of the multi-modal features of the training sample; calculating a loss function value based on the reward value; calculating a loss function value based on the reward value and on a probability of the network parameter selecting action to be performed in the current state; and taking the minimized loss function value as a training target, and updating parameters of the reinforcement learning feature filter and the classifier to be trained until a preset convergence condition is met.
12. A storage medium having stored therein computer executable instructions which when loaded and executed by a processor implement the emotion polarity analysis method of the article of any one of claims 1 to 6.
CN201910935218.9A 2019-09-29 2019-09-29 Emotion polarity analysis method and device for article, electronic equipment and storage medium Active CN110597965B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910935218.9A CN110597965B (en) 2019-09-29 2019-09-29 Emotion polarity analysis method and device for article, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910935218.9A CN110597965B (en) 2019-09-29 2019-09-29 Emotion polarity analysis method and device for article, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110597965A CN110597965A (en) 2019-12-20
CN110597965B true CN110597965B (en) 2024-04-16

Family

ID=68864807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910935218.9A Active CN110597965B (en) 2019-09-29 2019-09-29 Emotion polarity analysis method and device for article, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110597965B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111738015B (en) * 2020-06-22 2024-04-12 北京百度网讯科技有限公司 Article emotion polarity analysis method and device, electronic equipment and storage medium
CN111611981A (en) * 2020-06-28 2020-09-01 腾讯科技(深圳)有限公司 Information identification method and device and information identification neural network training method and device
CN111985216A (en) * 2020-08-25 2020-11-24 武汉长江通信产业集团股份有限公司 Emotional tendency analysis method based on reinforcement learning and convolutional neural network
CN113408282B (en) * 2021-08-06 2021-11-09 腾讯科技(深圳)有限公司 Method, device, equipment and storage medium for topic model training and topic prediction

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160010746A (en) * 2014-07-17 2016-01-28 건국대학교 산학협력단 System and method for analyzing emotion of user of social network service
CN107066583A (en) * 2017-04-14 2017-08-18 华侨大学 A kind of picture and text cross-module state sensibility classification method merged based on compact bilinearity
CN107832663A (en) * 2017-09-30 2018-03-23 天津大学 A kind of multi-modal sentiment analysis method based on quantum theory
CN109597876A (en) * 2018-11-07 2019-04-09 中山大学 A kind of more wheels dialogue answer preference pattern and its method based on intensified learning
CN109934260A (en) * 2019-01-31 2019-06-25 中国科学院信息工程研究所 Image, text and data fusion sensibility classification method and device based on random forest

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160010746A (en) * 2014-07-17 2016-01-28 건국대학교 산학협력단 System and method for analyzing emotion of user of social network service
CN107066583A (en) * 2017-04-14 2017-08-18 华侨大学 A kind of picture and text cross-module state sensibility classification method merged based on compact bilinearity
CN107832663A (en) * 2017-09-30 2018-03-23 天津大学 A kind of multi-modal sentiment analysis method based on quantum theory
CN109597876A (en) * 2018-11-07 2019-04-09 中山大学 A kind of more wheels dialogue answer preference pattern and its method based on intensified learning
CN109934260A (en) * 2019-01-31 2019-06-25 中国科学院信息工程研究所 Image, text and data fusion sensibility classification method and device based on random forest

Also Published As

Publication number Publication date
CN110597965A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
CN110597965B (en) Emotion polarity analysis method and device for article, electronic equipment and storage medium
US20190364123A1 (en) Resource push method and apparatus
US20180174037A1 (en) Suggesting resources using context hashing
CN110717099B (en) Method and terminal for recommending film
CN111428010B (en) Man-machine intelligent question-answering method and device
CN111079056A (en) Method, device, computer equipment and storage medium for extracting user portrait
CN109034203B (en) Method, device, equipment and medium for training expression recommendation model and recommending expression
CN112559800B (en) Method, apparatus, electronic device, medium and product for processing video
CN109033261B (en) Image processing method, image processing apparatus, image processing device, and storage medium
CN112528637A (en) Text processing model training method and device, computer equipment and storage medium
CN110858226A (en) Conversation management method and device
CN116501960B (en) Content retrieval method, device, equipment and medium
CN110377733A (en) A kind of text based Emotion identification method, terminal device and medium
CN107291774B (en) Error sample identification method and device
CN110909768B (en) Method and device for acquiring marked data
CN110059172B (en) Method and device for recommending answers based on natural language understanding
CN110929014B (en) Information processing method, information processing device, electronic equipment and storage medium
CN112069786A (en) Text information processing method and device, electronic equipment and medium
CN114223012A (en) Push object determination method and device, terminal equipment and storage medium
CN114297380A (en) Data processing method, device, equipment and storage medium
CN110895924B (en) Method and device for reading document content aloud, electronic equipment and readable storage medium
CN114428838A (en) Content recall method and device, computer equipment and storage medium
CN113515701A (en) Information recommendation method and device
CN112115300A (en) Text processing method and device, electronic equipment and readable storage medium
CN111753548A (en) Information acquisition method and device, computer storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40015684

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20221207

Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518000

Applicant after: Shenzhen Yayue Technology Co.,Ltd.

Address before: 518000 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 Floors

Applicant before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant