Method and device for determining sentiment category of evaluation information

By calculating the probability of words in the evaluation information and combining the emotion classification model, the evaluation information is emotionally classified, which solves the accuracy of user emotional tendency analysis and classification in the prior art, and achieves more accurate emotional classification results.

CN111966822BActive Publication Date: 2025-03-21BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN201910417377.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-05-20
Publication Date
2025-03-21
Estimated Expiration
2039-05-20

AI Technical Summary

Technical Problem

It is difficult for the prior art to accurately analyze and classify user emotional tendencies in evaluation information, especially in the emotional classification of different evaluation objects.

Method used

The probability of words in the evaluation information is calculated based on the preset evaluation keyword database of the target evaluation object, and the emotion classification model has been trained, such as long-term memory networks and classifiers, is used to perform emotion classification to obtain the emotion category information corresponding to the target evaluation object.

Benefits of technology

It realizes more accurate results for the emotional classification of evaluation information, and can distinguish the emotional classification of different evaluation objects, and avoid the mutual influence of the emotional tendencies of different evaluation objects in the same evaluation information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111966822B_ABST
    Figure CN111966822B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a method and device for determining the sentiment category of evaluation information. A specific implementation of the method includes: calculating the probability that the words contained in the evaluation information constitute the evaluation language for the target evaluation object based on the preset evaluation keyword library of the target evaluation object, and based on the probability that the words contained in the evaluation information constitute the evaluation language for the target evaluation object, using a trained sentiment classification model to perform sentiment classification on the evaluation information, and obtaining the sentiment category information for the target evaluation object corresponding to the evaluation information. This implementation can distinguish the sentiment categories for different evaluation objects represented by the evaluation information, and improve the accuracy of the sentiment classification results of the evaluation information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, specifically to the field of information processing, and in particular to a method and apparatus for determining a sentiment category of evaluation information. Background Art

[0002] With the development of Internet technology, more and more Internet data is generated. By mining and analyzing Internet data, we can obtain potentially valuable information more accurately, such as the habits and preferences of users when accessing the Internet, or predict event trends.

[0003] Evaluation information is information generated by Internet users evaluating events they have participated in, items they have obtained, etc. It is an important type of Internet data. Evaluation information can include users' objective descriptions of the evaluation object, such as size, color, appearance, etc.; it can also include personal emotional tendencies towards the evaluation object, such as the degree of liking. Analyzing the user's emotional tendencies in evaluation information can help adjust the evaluation object to meet the needs and preferences of users, thereby improving the reliability of Internet services. Summary of the invention

[0004] The embodiments of the present application provide a method, an apparatus, an electronic device, and a computer-readable medium for determining a sentiment category of evaluation information.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for determining the sentiment category of evaluation information, comprising: calculating the probability that words contained in the evaluation information constitute evaluation terms for the target evaluation object based on a preset evaluation keyword library of the target evaluation object; based on the probability that words contained in the evaluation information constitute evaluation terms for the target evaluation object, using a trained sentiment classification model to perform sentiment classification on the evaluation information, and obtaining sentiment category information for the target evaluation object corresponding to the evaluation information.

[0006] In some embodiments, the above-mentioned calculation of the probability that the words contained in the evaluation information constitute the evaluation language for the target evaluation object based on the preset evaluation keyword library of the target evaluation object includes: splitting the evaluation information into a word sequence; constructing a feature function set of a conditional random field based on the preset evaluation keyword library of the target evaluation object, and constructing a conditional probability function based on the feature function set of the conditional random field, wherein the conditional probability function represents the probability of outputting a corresponding evaluation language label sequence when a text word sequence is input in the conditional random field, and the evaluation language label in the evaluation language label sequence is used to identify whether the corresponding input text word constitutes an evaluation language for the target evaluation object or does not constitute an evaluation language for the target evaluation object; and calculating the probability of each word in the word sequence constituting an evaluation language for the target evaluation object based on the conditional probability function.

[0007] In some embodiments, the above-mentioned feature function set includes a first feature function set and a second feature function set, the first feature function in the first feature function set is used to characterize the transfer characteristics between adjacent evaluation word labels corresponding to adjacent text words in the input text word sequence, and the second feature function in the second feature function set is used to characterize the mapping characteristics of words in the input text word sequence mapped to corresponding evaluation word labels; the above-mentioned feature function set based on conditional random fields constructs a conditional probability function, including: constructing a conditional probability function based on the weighted sum of each first feature function and the weighted sum of each second feature function.

[0008] In some embodiments, the above-mentioned probability that the words contained in the evaluation information constitute the evaluation words for the target evaluation object is used to perform sentiment classification on the evaluation information using a trained sentiment classification model to obtain the sentiment category information for the target evaluation object corresponding to the evaluation information, including: converting the words in the evaluation information into word vectors, and multiplying them with the corresponding probability of constituting the evaluation words for the target evaluation object, and inputting the trained sentiment classification model for classification to obtain the sentiment category information for the target evaluation object corresponding to the evaluation information.

[0009] In some embodiments, the trained sentiment classification model includes a long short-term memory network and a classifier; the method also includes: obtaining a trained sentiment classification model based on a sample evaluation information set, wherein the sample evaluation information set includes sample evaluation information and labeling information of the sample evaluation information for the sentiment category of the target evaluation object.

[0010] In some embodiments, the above method also includes: determining that the emotion category information for the target evaluation object is evaluation information with preset emotion category information, as the evaluation information to be pushed, and pushing the evaluation information to be pushed to the content provider associated with the target evaluation object in the evaluation information to be pushed.

[0011] In a second aspect, an embodiment of the present disclosure provides a device for determining the sentiment category of evaluation information, comprising: a calculation unit, configured to calculate the probability that the words contained in the evaluation information constitute the evaluation terms for the target evaluation object based on a preset evaluation keyword library of the target evaluation object; a classification unit, configured to perform sentiment classification on the evaluation information using a trained sentiment classification model based on the probability that the words contained in the evaluation information constitute the evaluation terms for the target evaluation object, and obtain sentiment category information for the target evaluation object corresponding to the evaluation information.

[0012] In some embodiments, the above-mentioned computing unit is further configured to calculate the probability that the words contained in the evaluation information constitute evaluation terms for the target evaluation object in the following manner: split the evaluation information into word sequences; construct a feature function set of a conditional random field based on a preset evaluation keyword library of the target evaluation object, and construct a conditional probability function based on the feature function set of the conditional random field, wherein the conditional probability function represents the probability of outputting a corresponding evaluation term label sequence when a text word sequence is input in the conditional random field, and the evaluation term label in the evaluation term label sequence is used to identify whether the corresponding input text word constitutes an evaluation term for the target evaluation object or does not constitute an evaluation term for the target evaluation object; and calculate the probability of each word in the word sequence constituting an evaluation term for the target evaluation object based on the conditional probability function.

[0013] In some embodiments, the above-mentioned feature function set includes a first feature function set and a second feature function set, the first feature function in the first feature function set is used to characterize the transfer characteristics between adjacent evaluation word labels corresponding to adjacent text words in the input text word sequence, and the second feature function in the second feature function set is used to characterize the mapping characteristics of words in the input text word sequence mapped to corresponding evaluation word labels; the above-mentioned computing unit is further configured to construct a conditional probability function in the following manner: construct a conditional probability function based on the weighted sum of each first feature function and the weighted sum of each second feature function.

[0014] In some embodiments, the above-mentioned classification unit is further configured to perform sentiment classification on the evaluation information in the following manner to obtain sentiment category information for the target evaluation object corresponding to the evaluation information: convert the words in the evaluation information into word vectors, and multiply them with the corresponding probabilities of the evaluation words constituting the target evaluation object, and input them into the trained sentiment classification model for classification to obtain the sentiment category information for the target evaluation object corresponding to the evaluation information.

[0015] In some embodiments, the trained sentiment classification model includes a long short-term memory network and a classifier; the above-mentioned device also includes: a training unit, which is configured to train the trained sentiment classification model based on a sample evaluation information set, and the sample evaluation information set includes sample evaluation information and labeling information of the sample evaluation information for the sentiment category of the target evaluation object.

[0016] In some embodiments, the above-mentioned device also includes: a pushing unit, which is configured to determine that the emotion category information for the target evaluation object is the evaluation information of the preset emotion category information, as the evaluation information to be pushed, and push the evaluation information to be pushed to the content provider associated with the target evaluation object in the evaluation information to be pushed.

[0017] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining the emotion category of evaluation information as provided in the first aspect.

[0018] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for determining the emotion category of evaluation information provided in the first aspect is implemented.

[0019] The method and device for determining the sentiment category of evaluation information in the above-mentioned embodiments of the present application calculate the probability that the words contained in the evaluation information constitute the evaluation terms for the target evaluation object based on the preset evaluation keyword library of the target evaluation object; based on the probability that the words contained in the evaluation information constitute the evaluation terms for the target evaluation object, a trained sentiment classification model is used to perform sentiment classification on the evaluation information to obtain sentiment category information for the target evaluation object corresponding to the evaluation information, which can distinguish the sentiment classification for different evaluation objects when sentiment classification of the evaluation information is performed, and obtain a more accurate sentiment classification result of the evaluation information. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0021] Figure 1 is an exemplary system architecture diagram in which embodiments of the present disclosure may be applied;

[0022] Figure 2 is a flowchart of an embodiment of a method for determining a sentiment category of evaluation information according to the present disclosure;

[0023] Figure 3 is a schematic diagram of the computational logic of the long short-term memory network in the sentiment classification model disclosed in the present invention;

[0024] Figure 4 is a schematic diagram of the implementation principle of the method for determining the emotion category of evaluation information according to the present disclosure;

[0025] Figure 5 is a flowchart of another embodiment of a method for determining a sentiment category of evaluation information according to the present disclosure;

[0026] Figure 6 is a structural schematic diagram of an embodiment of a device for determining a sentiment category of evaluation information disclosed in the present invention;

[0027] Figure 7It is a schematic diagram of the structure of a computer system of an electronic device suitable for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0029] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0030] Figure 1 An exemplary system architecture to which the method for determining the emotion category of evaluation information or the apparatus for determining the emotion category of evaluation information of the present application can be applied is shown.

[0031] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables.

[0032] The user 110 can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various life service applications can be installed on the terminal devices 101, 102, 103, such as multimedia playback applications, online shopping applications, search applications, knowledge sharing applications, etc.

[0033] The terminal devices 101 , 102 , and 103 may be various electronic devices that support Internet access, including but not limited to smart phones, tablet computers, smart watches, e-books, desktop computers, laptop computers, and the like.

[0034] The server 105 may be a server that provides support for life service applications of terminal devices. In the application scenario of the present disclosure, the user 110 may send a service content acquisition request through the terminal devices 101, 102, 103 to obtain the service content provided by the server 105, and report the service content to the server 105 through the terminal devices 101, 102, 103 after evaluating the service content. The server 105 may parse the service content acquisition request sent by the terminal devices 101, 102, 103, generate corresponding service content according to user needs, and feedback to the terminal devices 101, 102, 103. The server 105 may also perform sentiment analysis on the evaluation information reported by the terminal devices 101, 102, 103 to determine the sentiment category of the user's evaluation of the service content.

[0035] It should be noted that the method for determining the emotion category of evaluation information provided in the embodiments of the present disclosure is generally executed by the server 105. Accordingly, the device for determining the emotion category of evaluation information is generally set in the terminal device 101, 102, 103 or the server 105.

[0036] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0037] Continue to refer Figure 2 , which shows a process 200 of an embodiment of a method for determining the emotion category of evaluation information according to the present application. The method for determining the emotion category of evaluation information comprises the following steps:

[0038] Step 201 : calculating the probability that the words included in the evaluation information constitute the evaluation language for the target evaluation object based on the preset evaluation keyword library of the target evaluation object.

[0039] The execution subject of the method for determining the sentiment category of evaluation information (e.g. Figure 1 The server 105 shown in the figure can first obtain the evaluation information of the user. Here, the evaluation information is text information generated by the user evaluating at least one evaluation object.

[0040] As an example, the evaluation information may be evaluation information for goods and logistics services purchased on an e-commerce platform, such as "the quality of this product is good, but the logistics is a bit slow", or "the quality of the item is not very good, but the courier is very capable".

[0041] Evaluation information usually contains relevant information for identifying the evaluation object, such as the type and name of the evaluation object. The evaluation object can be identified based on a preset evaluation object keyword table. Here, the evaluation object keyword table may include a correspondence table between each evaluation object and the keyword representing the evaluation object. For example, the evaluation object keyword table includes keywords such as "logistics", "express delivery", "brother", "delivery", "transportation", etc. corresponding to the evaluation object "logistics", as well as keywords such as "commodity", "things", "baby", etc. corresponding to the evaluation object "article". In the evaluation information example of "this product is of good quality, but the logistics is a bit slow", the evaluation objects include "articles" and "logistics". In the evaluation information example of "the quality of the things is not very good, but the courier brother is very awesome", the evaluation objects also include "articles" and "logistics".

[0042] In this embodiment, the target evaluation object can be specified in advance, and the sentiment category implied by the evaluation information for the specified target evaluation object can be analyzed. For example, the target evaluation object can be specified as "logistics". The acquired evaluation information can also include evaluation content for other evaluation objects, and the sentiment tendency of the same evaluation information for different evaluation objects may be different. For example, in the above example of "This product is of good quality, but the logistics is a bit slow", the sentiment tendency of the evaluation of "items" is positive, while the sentiment tendency of the evaluation of "logistics" is negative.

[0043] In order to avoid the inaccuracy of the emotional category of the evaluation information caused by the mutual influence between the emotional tendencies of different evaluation objects in the evaluation information, the emotional category of the target evaluation object specified in the evaluation information can be analyzed independently.

[0044] In this embodiment, the evaluation keyword library of the target evaluation object can be obtained in advance, and the evaluation keyword library of the target evaluation object includes keywords constituting the evaluation language of the target evaluation object. For example, the evaluation keyword library of the target evaluation object "logistics" may include: "fast logistics speed", "slow delivery speed", "good courier attitude", "fast delivery speed", "intact packaging", "good attitude of the courier", etc.

[0045] The probability that the words included in the evaluation information constitute the evaluation words for the target evaluation object can be calculated based on the evaluation keyword library of the above-mentioned target evaluation object. Specifically, the probability that the words included in the evaluation information constitute the evaluation words for the target evaluation object can be determined based on the matching degree or correlation degree between the words included in the evaluation information and the evaluation keywords in the evaluation keyword library of the above-mentioned target evaluation object. For example, if the matching degree between the words included in the evaluation information and the evaluation keywords in the evaluation keyword library reaches a preset threshold interval, it can be determined that the probability that the words constitute the evaluation words for the target evaluation object is a preset probability value corresponding to the preset threshold interval.

[0046] In some optional implementations, the probability that the words contained in the evaluation information constitute the evaluation words for the target evaluation object can be calculated based on the conditional random field. Specifically, the conditional random field can be used to construct a relationship model between the evaluation information and the probability that the words contained in the evaluation information constitute the evaluation words for the target evaluation object, and the model based on the conditional random field can be used to calculate the probability that the words contained in the acquired evaluation information constitute the evaluation words for the target evaluation object.

[0047] Specifically, word segmentation and other methods can be used to split the evaluation information into word sequences, and the word sequences can be used as the observation sequence of the conditional random field. The evaluation word label sequence formed by the labels corresponding to the word sequence, which are used to characterize whether each word constitutes an evaluation word for the target evaluation object, can be used as the state sequence of the conditional random field to construct a conditional probability model from the observation sequence to the state sequence.

[0048] A characteristic function set of a conditional random field can be constructed based on a preset evaluation keyword library of the target evaluation object, and then a conditional probability function can be constructed based on the characteristic function set of the conditional random field. The conditional probability function represents the probability of outputting a corresponding evaluation word label sequence when a text word sequence is input into the conditional random field, and the evaluation word label in the evaluation word label sequence is used to identify whether the corresponding input text word constitutes an evaluation word for the target evaluation object or does not constitute an evaluation word for the target evaluation object. For example, when the input text word constitutes an evaluation word for the target evaluation object, the corresponding evaluation word label is 1; when the input text word does not constitute an evaluation word for the target evaluation object, the corresponding evaluation word label is 0.

[0049] The characteristic function set of the conditional random field is a characteristic function that characterizes the implicit relationship between the evaluation word labels in the evaluation word label sequence corresponding to the input word sequence. The characteristic function set of the conditional random field can be designed according to the evaluation keyword library of the target evaluation object.

[0050] As an example, a characteristic function can be expressed as f i (x,i,y i ,y i-1), i = 1, 2, 3, ..., n; n is the total number of words in the input word sequence, x is the input word sequence, y is the number of words in the input word sequence, i is the evaluation label corresponding to the i-th word input, y i-1 is the evaluation label corresponding to the i-1th word input. Here, if it constitutes an evaluation for the target evaluation object, the corresponding evaluation label is 1, otherwise the corresponding evaluation label is 0. For example, when the i-1th word and the i-th word are both words in the evaluation keyword library, or the i-1th word and the i-th word are combined to form a word in the evaluation keyword library, for example, the i-1th word is "express delivery" and the i-th word is "very fast", the corresponding feature function f i (x,i,y i ,y i-1 ) can take the value of 1; when the i-1th word and the i-th word are words that are not in the evaluation keyword library of the target evaluation object, such as "commodity" and "good quality" respectively, the corresponding feature function f i (x,i,y i ,y i-1 ) can take the value 0.

[0051] The above method can be used to set a feature function set, and based on the feature function set, a conditional probability function P(y|x) can be constructed, where x is the input word sequence and y is the corresponding evaluation label sequence. For example, the logarithm of the weighted sum of all feature functions can be taken as the conditional probability function.

[0052] Optionally, the feature function may include a first feature function set and a second feature function set. The first feature function in the first feature function set is used to characterize the transfer features between adjacent evaluation word labels corresponding to adjacent text words in the input text word sequence, and the second feature function in the second feature function set is used to characterize the mapping features of words in the input text word sequence mapped to corresponding evaluation word labels. At this time, a conditional probability function can be constructed based on the weighted sum of each first feature function and the weighted sum of each second feature function.

[0053] The above transfer feature indicates whether the evaluation label of the adjacent words will be transferred due to a certain feature, and the mapping feature is used to characterize whether the word has the corresponding evaluation label.

[0054] For example, the first characteristic function in the first characteristic function set is t k (y i ,y i-1 , x, i), where k = 1, 2, 3, ..., the second characteristic function in the second characteristic function set is s l (y i , x, i), where l = 1, 2, 3, ..., where:

[0055]

[0056]

[0057] The conditional probability function P(y|x) is:

[0058]

[0059]

[0060] Among them, λ k , μ l The first characteristic function t k (y i ,y i-1 , x, i) and the second characteristic function s l (y i , the weight of x, i) can be a preset value.

[0061] The conditional probability function can be constructed according to equations (3) and (4). After that, the word sequence obtained after splitting the evaluation information can be used as the observation sequence x in the conditional probability function to calculate the probability of each word constituting an evaluation statement for the target evaluation object, thereby obtaining the probability sequence of the word sequence constituting an evaluation statement for the target evaluation object.

[0062] Step 202 , based on the probability that the words included in the evaluation information constitute evaluation words for the target evaluation object, the evaluation information is sentimentally classified using the trained sentiment classification model to obtain sentiment category information for the target evaluation object corresponding to the evaluation information.

[0063] In this embodiment, the probability of each word constituting an evaluation statement for the target evaluation object obtained in step 201 can be used to perform corresponding weighting processing on each word and then input into the trained sentiment classification model for classification. The greater the probability that a word constitutes an evaluation statement for the target evaluation object, the higher the corresponding weight. In this way, the weight of the words constituting the evaluation statement for the target object in the input data of the trained sentiment classification model is higher, and its influence on the sentiment classification result is also greater.

[0064] The above-mentioned sentiment classification model can classify the sentiment tendency of the input evaluation information. Here, the sentiment category can be a pre-defined category, such as a positive sentiment category and a negative sentiment category, or a category determined by a more refined division method, such as a strong positive sentiment category, a generally positive sentiment category, a slightly negative sentiment category, a strong negative sentiment category, etc. The embodiments of the present disclosure do not specifically limit the division method of the sentiment category.

[0065] The sentiment classification model can be pre-trained based on sample evaluation information that has been labeled with the sentiment category of the target evaluation object.

[0066] Optionally, the evaluation information can be sentimentally classified in the following manner: the words in the evaluation information are converted into word vectors, and multiplied by the corresponding probabilities of the evaluation words for the target evaluation object, and input into a trained sentiment classification model for classification to obtain the sentiment category information for the target evaluation object corresponding to the evaluation information.

[0067] In the above implementation, the word sequence obtained by splitting the evaluation information can be vectorized using the word-to-vector method, converted into a word vector sequence, and multiplied with the probability corresponding to each word in the word sequence obtained in step 201 as input data of the sentiment classification model, thereby increasing the influence weight of words with a higher probability of constituting evaluation words for the target evaluation object in the sentiment classification, and reducing the influence weight of words with a lower probability of not constituting evaluation words for the target evaluation object in the sentiment classification.

[0068] Further optionally, the above-mentioned trained sentiment classification model includes a long short-term memory network and a classifier. The product of the word vector sequence obtained after the word sequence conversion and the corresponding probability sequence constituting the evaluation language for the target evaluation object can be used as the input of the long short-term memory network, and the long short-term memory network is used to calculate the corresponding implicit state sequence of the input sequence, and then the implicit state is input into the classifier for classification, so as to map the input word sequence to a specific sentiment category label. Among them, the sentiment category label can be a label pre-set according to different sentiment categories, for example, the label of the positive sentiment class can be pre-set to 1, and the label of the negative sentiment class can be pre-set to 0.

[0069] The calculation logic of the above long short-term memory network is as follows Figure 3 As shown. Among them, c t is a hidden state, called the cell state, i t , f t , o t They are input gate, forget gate and output gate. t It is used to control the input of data and is responsible for the input of the current position in the sequence (t represents the current position, t = 1, 2, 3, ..., n, n is the length of the input sequence), the forget gate f t It is used to control the forgetting of data and to control whether the cell state of the previous layer is forgotten with a certain probability. The output gate o t Used to control the output of data. The calculation formula is as follows:

[0070] i t =σ(W i x t +Ui h t-1 +b i ), (5)

[0071] f t =σ(W f x t +U f h t-1 +b f ), (6)

[0072] o t =σ(W o x t +U o h t-1 +b o ), (7)

[0073]

[0074]

[0075]

[0076] Among them, W i , U i is the weight parameter of the input gate, b i is the bias parameter of the input gate; W f , U f is the weight parameter of the forget gate, b f is the bias parameter of the forget gate; W o , U o is the weight parameter of the output gate, b o is the bias parameter of the output gate; W c , U c is the weight parameter of the hidden state, b c is the bias parameter of the hidden state; σ is the activation function, which can be a sigmoid function; represents the Hadamard product of the matrix, x t is the element at position t in the input sequence, h t The output of the long short-term memory network corresponds to x t The implicit state of i , U i , b i , W f , U f , b f , W o , U o , b o , W c , U c , b care parameters that need to be trained.

[0077] The classifier can be constructed based on the softmax function (normalized exponential function), and the probability of the emotional category of the evaluation information for the target evaluation object can be determined according to the following formula (11):

[0078]

[0079] Among them, L i represents the probability that the emotional category of the evaluation information for the target evaluation object is the i-th set emotional category, w i is the weight parameter of the i-th set emotion category, i = 1, 2, 3, ..., K; K is the total number of set emotion categories, h n is the output hidden state corresponding to the last (nth) word of the input sequence in the long short-term memory network, b is the bias parameter in the softmax function, and w i and b are parameters that need to be trained.

[0080] According to the calculation result of the above formula (11), the probability value L can be determined from the set emotion category. i The largest sentiment category is the sentiment category information corresponding to the evaluation information for the target evaluation object.

[0081] Continue to refer Figure 4 , which shows a schematic diagram of the implementation principle of the method for determining the emotion category of evaluation information according to the present application.

[0082] like Figure 4 As shown in the figure, the evaluation information is split into word sequences X1, X2, X3, ..., Xn, and then the corresponding conditional probabilities K1, K2, K3, ..., Kn are calculated using conditional random fields. Then, the words in the word sequences X1, X2, X3, ..., Xn are vectorized and multiplied with the corresponding conditional probabilities X1, X2, X3, ..., Xn respectively, and then input into LSTM (Long Short-Term Memory). After that, the implicit state of the last level output gate is input into the classifier built based on the softmax function to obtain the sentiment label for the target evaluation object.

[0083] The recognition results of the emotional categories of the target evaluation objects can help quickly classify the target evaluation objects. In actual scenarios, the evaluation information can be summarized according to different emotional categories and pushed to interested users. For example, users can view good or bad reviews of logistics by category, without requiring users who have used logistics services to select labels such as "bad review" or "good review" when submitting evaluation information, thus realizing intelligent emotional classification of evaluation information.

[0084] Optionally, the above method for determining the emotion category of evaluation information may further include: obtaining a trained emotion classification model based on a sample evaluation information set, wherein the sample evaluation information set includes the sample evaluation information and labeling information of the emotion category of the sample evaluation information for the target evaluation object.

[0085] The sample evaluation information may be data containing evaluation content collected from the Internet. The corresponding annotation information may be obtained by manually determining the emotion category and annotating it. During training, the sample evaluation information may be input into the emotion classification model to be trained to obtain the emotion classification result of the sample evaluation information. By comparing the difference between the emotion classification result of the sample evaluation information and the annotation information of the emotion category of the target evaluation object of the sample evaluation information, the parameters of the emotion classification model to be trained are iteratively adjusted, so that the difference between the emotion classification result of the emotion classification model to be trained for the sample evaluation information and the annotation information of the emotion category of the sample evaluation information for the target evaluation object is gradually reduced to a certain range.

[0086] The process of the method for determining the sentiment category of evaluation information in the above-mentioned embodiment of the present application calculates the probability that the words contained in the evaluation information constitute the evaluation language for the target evaluation object based on the preset evaluation keyword library of the target evaluation object, and based on the probability that the words contained in the evaluation information constitute the evaluation language for the target evaluation object, uses a trained sentiment classification model to perform sentiment classification on the evaluation information, and obtains the sentiment category information for the target evaluation object corresponding to the evaluation information, thereby realizing the introduction of an attention mechanism in the sentiment classification of the evaluation information, being able to distinguish the sentiments of different evaluation objects in the evaluation information and classify them, thereby avoiding the mutual influence of the sentiment tendency judgment results for different evaluation objects in the same evaluation information, and being able to obtain a more accurate sentiment classification result of the evaluation information.

[0087] Moreover, in some implementations, by using conditional random fields to estimate the conditional probability that each word in the evaluation information constitutes an evaluation statement for the target evaluation object, the accuracy of sentiment category recognition can be improved by limiting the characteristic function of the evaluation statement characteristics that conform to the target evaluation object in the conditional random field.

[0088] In some implementations, by using a long short-term memory network and a classifier as a sentiment classification model, the sentiment category of the evaluation information for the target evaluation object can be effectively determined in combination with context information, thereby improving the accuracy of the sentiment category recognition results.

[0089] Continue to refer Figure 5 , which shows a flowchart of another embodiment of the method for determining the emotion category of evaluation information according to the present disclosure. Figure 5 As shown, the process 500 of the method for determining the emotion category of evaluation information of this embodiment includes the following steps:

[0090] Step 501 : calculating the probability that the words included in the evaluation information constitute the evaluation language for the target evaluation object based on the preset evaluation keyword library of the target evaluation object.

[0091] Step 502 , based on the probability that the words included in the evaluation information constitute evaluation words for the target evaluation object, the evaluation information is sentimentally classified using the trained sentiment classification model to obtain sentiment category information for the target evaluation object corresponding to the evaluation information.

[0092] Step 501 and step 502 of this embodiment are respectively consistent with step 201 and step 202 of the aforementioned embodiment. The specific implementation methods of step 501 and step 502 can refer to the description of step 201 and step 202 in the aforementioned embodiment, and will not be repeated here.

[0093] Step 503: Determine the evaluation information whose emotion category information for the target evaluation object is the preset emotion category information as the evaluation information to be pushed, and push the evaluation information to be pushed to the content provider associated with the target evaluation object in the evaluation information to be pushed.

[0094] According to the emotion category information of the target evaluation object obtained in each evaluation information in step 502, the evaluation information whose emotion category information of the target evaluation object is preset emotion category information can be screened out as the evaluation information to be pushed.

[0095] The content provider associated with the target evaluation object can be a content provider that uses the target evaluation object as service content, specifically a subject that produces, manufactures, or edits content details information of the target evaluation object. The preset emotion category information can be emotion category information subscribed to by the content provider of the target evaluation object.

[0096] In an exemplary scenario, the target evaluation object may be a commodity on an online shopping platform, and the content provider of the target evaluation object may be the manufacturer of the target evaluation object or a store user who provides commodity purchase information and detailed information. The preset emotion category information may be, for example, information that characterizes a negative emotion tendency. By pushing the evaluation information to be pushed to the content provider who is interested in the preset emotion category information, accurate evaluation feedback information can be provided to the content provider associated with the target evaluation object, thereby helping the content provider to adjust the content it provides (i.e., the target evaluation object) based on the evaluation information, such as adjusting inventory, changing product design, and so on.

[0097] Further references Figure 6 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a device for determining the emotion category of evaluation information. Figure 2 and Figure 5 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0098] like Figure 6 As shown, the apparatus 600 for determining the sentiment category of evaluation information of this embodiment may include a calculation unit 601 and a classification unit 602. The calculation unit 601 is configured to calculate the probability that the words included in the evaluation information constitute the evaluation words for the target evaluation object based on the preset evaluation keyword library of the target evaluation object; the classification unit 602 is configured to perform sentiment classification on the evaluation information using the trained sentiment classification model based on the probability that the words included in the evaluation information constitute the evaluation words for the target evaluation object, and obtain the sentiment category information for the target evaluation object corresponding to the evaluation information.

[0099] In some embodiments, the above-mentioned calculation unit 601 can be further configured to calculate the probability that the words contained in the evaluation information constitute the evaluation language for the target evaluation object in the following manner: split the evaluation information into a word sequence; construct a feature function set of a conditional random field based on a preset evaluation keyword library of the target evaluation object, and construct a conditional probability function based on the feature function set of the conditional random field, wherein the conditional probability function represents the probability of outputting a corresponding evaluation language label sequence when a text word sequence is input in the conditional random field, and the evaluation language label in the evaluation language label sequence is used to identify whether the corresponding input text word constitutes an evaluation language for the target evaluation object or does not constitute an evaluation language for the target evaluation object; and calculate the probability of each word in the word sequence constituting an evaluation language for the target evaluation object based on the conditional probability function.

[0100] In some embodiments, the above-mentioned feature function set includes a first feature function set and a second feature function set, the first feature function in the first feature function set is used to characterize the transfer characteristics between adjacent evaluation word labels corresponding to adjacent text words in the input text word sequence, and the second feature function in the second feature function set is used to characterize the mapping characteristics of words in the input text word sequence mapped to corresponding evaluation word labels; the above-mentioned calculation unit 601 can be further configured to construct a conditional probability function in the following manner: construct a conditional probability function based on the weighted sum of each first feature function and the weighted sum of each second feature function.

[0101] In some embodiments, the above-mentioned classification unit 602 can be further configured to perform sentiment classification on the evaluation information in the following manner to obtain sentiment category information for the target evaluation object corresponding to the evaluation information: convert the words in the evaluation information into word vectors, and multiply them with the corresponding probabilities of the evaluation words constituting the target evaluation object, and input them into the trained sentiment classification model for classification to obtain the sentiment category information for the target evaluation object corresponding to the evaluation information.

[0102] In some embodiments, the above-mentioned trained sentiment classification model includes a long short-term memory network and a classifier; the above-mentioned device 600 may also include: a training unit, configured to train a trained sentiment classification model based on a sample evaluation information set, and the sample evaluation information set includes sample evaluation information and labeling information of the sample evaluation information for the sentiment category of the target evaluation object.

[0103] In some embodiments, the above-mentioned device 600 may also include: a pushing unit, which is configured to determine that the emotion category information for the target evaluation object is the evaluation information of preset emotion category information, as the evaluation information to be pushed, and push the evaluation information to be pushed to the content provider associated with the target evaluation object in the evaluation information to be pushed.

[0104] It should be understood that the units described in the apparatus 600 are similar to those described in the reference Figure 2 and Figure 5 Therefore, the operations and features described above for the method are also applicable to the device 600 and the units included therein, and will not be described in detail here.

[0105] The device for determining the sentiment category of evaluation information in the above-mentioned embodiment of the present application calculates the probability that the words contained in the evaluation information constitute the evaluation terms for the target evaluation object by utilizing the conditional random field, and based on the probability that the words contained in the evaluation information constitute the evaluation terms for the target evaluation object, uses the trained sentiment classification model to perform sentiment classification on the evaluation information, and obtains the sentiment category information for the target evaluation object corresponding to the evaluation information. When sentiment classification of the evaluation information is performed, the sentiment classification for different evaluation objects can be distinguished, and a more accurate sentiment classification result of the evaluation information can be obtained.

[0106] Reference below Figure 7 , which shows an electronic device (eg, Figure 1 A schematic diagram of the structure of the server 700. Figure 7 The server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0107] like Figure 7As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0108] The following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 7 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0109] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, the above functions defined in the method of the embodiment of the present disclosure are executed. It should be noted that the computer-readable medium described in the embodiment of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus, or a device. In an embodiment of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus, or a device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wire, optical cable, RF (radio frequency), etc., or any suitable combination of the foregoing.

[0110] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: calculates the probability that the words included in the evaluation information constitute the evaluation words for the target evaluation object based on the preset evaluation keyword library of the target evaluation object; based on the probability that the words included in the evaluation information constitute the evaluation words for the target evaluation object, uses the trained sentiment classification model to perform sentiment classification on the evaluation information, and obtains the sentiment category information for the target evaluation object corresponding to the evaluation information.

[0111] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0112] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0113] The units involved in the embodiments described in the present application may be implemented by software or by hardware. The described units may also be arranged in a processor, for example, may be described as: a processor includes a computing unit and a classification unit. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances, for example, the computing unit may also be described as "a unit that calculates the probability that the words contained in the evaluation information constitute an evaluation term for the target evaluation object based on a preset evaluation keyword library of the target evaluation object".

[0114] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A method for determining a sentiment category of evaluation information, comprising: Splitting the evaluation information into word sequences, wherein the evaluation information is text information generated by evaluating at least one evaluation object; Calculating a sequence of evaluation word labels corresponding to the word sequence based on a preset evaluation keyword library of the target evaluation object, wherein each evaluation word label in the evaluation word label sequence corresponding to the word sequence is used to identify the probability that the corresponding word constitutes or does not constitute an evaluation word for the target evaluation object; Based on the evaluation language label sequence corresponding to the word sequence, the trained sentiment classification model is used to perform sentiment classification on the evaluation information to obtain sentiment category information corresponding to the evaluation information and for the target evaluation object.

2. The method according to claim 1, wherein: The step of calculating the evaluation language label sequence corresponding to the word sequence based on the preset evaluation keyword library of the target evaluation object includes: A characteristic function set of a conditional random field is constructed based on a preset evaluation keyword library of the target evaluation object, and a conditional probability function is constructed based on the characteristic function set of the conditional random field, wherein the conditional probability function represents the output of a corresponding evaluation language label sequence when a text word sequence is input into the conditional random field; The evaluation language label sequence corresponding to the word sequence is calculated based on the conditional probability function.

3. The method according to claim 2, wherein: The feature function set includes a first feature function set and a second feature function set, wherein the first feature function in the first feature function set is used to characterize the transfer characteristics between adjacent evaluation word labels corresponding to adjacent text words in the input text word sequence, and the second feature function in the second feature function set is used to characterize the mapping characteristics of words in the input text word sequence mapped to corresponding evaluation word labels; The constructing of a conditional probability function based on the characteristic function set of the conditional random field comprises: The conditional probability function is constructed based on a weighted sum of the first characteristic functions and a weighted sum of the second characteristic functions.

4. The method according to claim 1, wherein: The method of using a trained sentiment classification model to perform sentiment classification on the evaluation information based on the evaluation language label sequence corresponding to the word sequence to obtain sentiment category information corresponding to the evaluation information for a target evaluation object includes: The words in the evaluation information are converted into word vectors, and multiplied with the corresponding probabilities of the evaluation words for the target evaluation object, and input into the trained sentiment classification model for classification to obtain the sentiment category information for the target evaluation object corresponding to the evaluation information.

5. The method according to claim 4, wherein: The trained sentiment classification model includes a long short-term memory network and a classifier; The method further comprises: The trained sentiment classification model is obtained by training based on a sample evaluation information set, wherein the sample evaluation information set includes sample evaluation information and labeling information of the sample evaluation information for a sentiment category of a target evaluation object.

6. The method according to any one of claims 1 to 5, wherein: The method further comprises: The emotion category information for the target evaluation object is determined to be the evaluation information of the preset emotion category information, and is used as the evaluation information to be pushed, and the evaluation information to be pushed is pushed to the content provider associated with the target evaluation object in the evaluation information to be pushed.

7. A device for determining the sentiment category of evaluation information, comprising: A calculation unit is configured to split the evaluation information into word sequences, wherein the evaluation information is text information generated by evaluating at least one evaluation object; calculate an evaluation word label sequence corresponding to the word sequence based on a preset evaluation keyword library of a target evaluation object, wherein each evaluation word label in the evaluation word label sequence corresponding to the word sequence is used to identify the probability that the corresponding word constitutes or does not constitute an evaluation word for the target evaluation object; The classification unit is configured to perform sentiment classification on the evaluation information based on the evaluation language label sequence corresponding to the word sequence using a trained sentiment classification model to obtain sentiment category information corresponding to the evaluation information for a target evaluation object.

8. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Identification method and device of evaluation objects of Chinese texts

    CN104298665A

  • Information monitoring method and device

    CN105786929A

  • Evaluation object recognition method based on semantic features

    CN109086340A

  • Method and device for classifying evaluation object emotion by fusing user and overall evaluation information

    CN109241993A