Comment classification method and device, equipment, medium and program product

By combining the variational autoencoder and the convolutional neural network model, the review classification method solves the problems of low efficiency and subjective impact of review classification in the existing technology, achieves fast and accurate emotion recognition, and deeply mines the emotions in review data. information.

CN118535740APending Publication Date: 2024-08-23INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410879934.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing review classification and identification methods are inefficient and susceptible to subjective factors, making it difficult to accurately obtain users' emotional feedback on mobile banking applications.

Method used

Using a review classification method based on variational autoencoder models and convolutional neural network models, through data preprocessing, feature extraction and model training, we can automatically identify emotional tendencies in reviews, reduce noise and redundant information, and improve recognition efficiency and accuracy. sex.

Benefits of technology

It achieves fast and accurate emotion recognition of a large amount of comment data, extracts more representative features, deeply mines complex emotional information, improves the efficiency and accuracy of comment classification, and reduces the impact of subjective assumptions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535740A
    Figure CN118535740A
Patent Text Reader

Abstract

The invention relates to a comment classification method and device, computer equipment, a storage medium and a computer program product. Relates to the technical field of artificial intelligence. The method comprises the steps of obtaining comment data of a target object in an emotion recognition instruction under the condition that the emotion recognition instruction is received; performing data processing on the comment data to obtain to-be-input features for the comment data; inputting the to-be-input features into a variational auto-encoder model in the sentiment classification model to obtain reconstruction features for the comment data; inputting the to-be-input features and the reconstructed features into a convolutional neural network model in a sentiment classification model to obtain a corresponding prediction result; and determining the satisfaction degree of the target object based on the prediction result. By adopting the method, the comment classification and recognition efficiency and accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a comment classification method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] With the popularity of smartphones and the development of the Internet, more and more users choose to use mobile banking applications for daily financial activities, such as transferring money, paying bills, checking account balances, etc. However, as competition in the application market becomes increasingly fierce, it becomes crucial to understand users' emotional feedback on mobile banking applications.

[0003] In traditional technology, user comments are classified and identified through manual analysis to obtain user satisfaction.

[0004] However, the current method of comment classification and identification is not only inefficient, but also easily affected by subjective factors. Summary of the invention

[0005] Based on this, it is necessary to provide a comment classification method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency and accuracy of comment classification and identification in response to the above technical problems.

[0006] In a first aspect, the present application provides a review classification method. The method comprises:

[0007] When receiving an emotion recognition instruction, obtaining comment data of a target object in the emotion recognition instruction;

[0008] Process the comment data to obtain input features for the comment data;

[0009] Obtain the trained sentiment classification model, which is based on a variational autoencoder model and a convolutional neural network model;

[0010] Input the input features to the variational autoencoder model in the sentiment classification model to obtain the reconstructed features for the comment data;

[0011] Input the features to be input and the reconstructed features into the convolutional neural network model in the sentiment classification model to obtain the corresponding prediction results;

[0012] Based on the prediction results, the satisfaction level of the target object is determined.

[0013] In one embodiment, the comment data is processed to obtain features to be input for the comment data, including:

[0014] De-duplicate and clean the comment data;

[0015] Perform word segmentation on the comment data after deduplication and cleaning to obtain the word segmentation of each comment data;

[0016] By presetting a stop word list, stop words are removed from the comment data after word segmentation processing;

[0017] Each remaining word in the comment data after the stop words are removed is subjected to feature processing, and the word segmentation after feature post-processing is subjected to feature combination processing to obtain the features to be input.

[0018] In one embodiment, the variational autoencoder model includes an encoder, a sampling module, and a decoder; inputting the input features into the variational autoencoder model in the sentiment classification model to obtain the reconstructed features for the comment data includes:

[0019] Input the features to be input into the encoder to obtain the encoded features for the comment data;

[0020] Based on the coding features, the sampling module is input to obtain the corresponding sampling features;

[0021] The sampled features are input into the decoder to obtain the reconstructed features for the comment data.

[0022] In one embodiment, the input features and the reconstructed features are input into a convolutional neural network model in a sentiment classification model to obtain corresponding prediction results, including:

[0023] Perform feature combination processing on the input features and the reconstructed features to obtain the combined features;

[0024] In the convolutional neural network model, the combined features are subjected to multi-layer convolution operations and multi-layer pooling operations, and the combined features that have undergone multi-layer convolution operations and multi-layer pooling operations are input into the fully connected layer to obtain the corresponding prediction results.

[0025] In one embodiment, the prediction result includes a satisfaction type and a probability value corresponding to the satisfaction type; and based on the prediction result, determining the satisfaction level of the target object includes:

[0026] The satisfaction type corresponding to the maximum probability value in the prediction result is taken as the satisfaction degree of the target object.

[0027] In one embodiment, the method further comprises:

[0028] Obtaining a review sample set; the review sample set includes sample features to be input for the review data sample and the corresponding satisfaction level;

[0029] Train the sentiment classification model based on the review sample set;

[0030] During the training process, the corresponding loss function of the sentiment classification model is used to determine whether the sentiment classification model converges; the loss function is based on reconstruction loss, relative entropy and adversarial loss.

[0031] When it is determined that the sentiment classification model has converged, a trained sentiment classification model is obtained.

[0032] In a second aspect, the present application also provides a comment classification device. The device comprises:

[0033] A data acquisition module, for acquiring comment data of a target object in the emotion recognition instruction when receiving the emotion recognition instruction;

[0034] A feature acquisition module is used to process the comment data to obtain input features for the comment data;

[0035] The model acquisition module is used to obtain the trained sentiment classification model, which is based on the variational autoencoder model and the convolutional neural network model.

[0036] A feature acquisition module is used to input the features to be input into the variational autoencoder model in the sentiment classification model to obtain the reconstructed features for the comment data;

[0037] A result acquisition module is used to input the features to be input and the reconstructed features into the convolutional neural network model in the sentiment classification model to obtain the corresponding prediction results;

[0038] The degree determination module is used to determine the satisfaction degree of the target object based on the prediction result.

[0039] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0040] When receiving an emotion recognition instruction, obtaining comment data of a target object in the emotion recognition instruction;

[0041] Process the comment data to obtain input features for the comment data;

[0042] Obtain the trained sentiment classification model, which is based on a variational autoencoder model and a convolutional neural network model;

[0043] Input the input features to the variational autoencoder model in the sentiment classification model to obtain the reconstructed features for the comment data;

[0044] Input the features to be input and the reconstructed features into the convolutional neural network model in the sentiment classification model to obtain the corresponding prediction results;

[0045] Based on the prediction results, the satisfaction level of the target object is determined.

[0046] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0047] When receiving an emotion recognition instruction, obtaining comment data of a target object in the emotion recognition instruction;

[0048] Process the comment data to obtain input features for the comment data;

[0049] Obtain the trained sentiment classification model, which is based on a variational autoencoder model and a convolutional neural network model;

[0050] Input the input features to the variational autoencoder model in the sentiment classification model to obtain the reconstructed features for the comment data;

[0051] Input the features to be input and the reconstructed features into the convolutional neural network model in the sentiment classification model to obtain the corresponding prediction results;

[0052] Based on the prediction results, the satisfaction level of the target object is determined.

[0053] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0054] When receiving an emotion recognition instruction, obtaining comment data of a target object in the emotion recognition instruction;

[0055] Process the comment data to obtain input features for the comment data;

[0056] Obtain the trained sentiment classification model, which is based on a variational autoencoder model and a convolutional neural network model;

[0057] Input the input features to the variational autoencoder model in the sentiment classification model to obtain the reconstructed features for the comment data;

[0058] Input the features to be input and the reconstructed features into the convolutional neural network model in the sentiment classification model to obtain the corresponding prediction results;

[0059] Based on the prediction results, the satisfaction level of the target object is determined.

[0060] The above-mentioned comment classification method, device, computer equipment, storage medium and computer program product, when receiving an emotion recognition instruction, obtain the comment data of the target object in the emotion recognition instruction; process the comment data to obtain the input features for the comment data; input the input features to the variational autoencoder model in the emotion classification model to obtain the reconstructed features for the comment data; input the input features and the reconstructed features to the convolutional neural network model in the emotion classification model to obtain the corresponding prediction results; based on the prediction results, determine the satisfaction of the target object. By adopting this method, the comment data is reconstructed through the variational autoencoder model, so as to extract more representative features and reduce noise and redundant information to better adapt to different comment data. By combining the variational autoencoder model and the convolutional neural network model, it is possible to deeply mine the complex emotional information in the comment data. Similarly, through automated data processing and the trained emotion classification model, fast and accurate emotion recognition of a large amount of comment data can be achieved, which greatly improves the efficiency and accuracy of comment recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 A diagram of an application environment of a comment classification method in one embodiment;

[0062] Figure 2 A flowchart of a comment classification method in one embodiment;

[0063] Figure 3 A schematic diagram of a process of obtaining reconstruction features in one embodiment;

[0064] Figure 4 is a structural diagram of a sentiment classification model in one embodiment;

[0065] Figure 5 is a structural diagram of a convolutional neural network model in one embodiment;

[0066] Figure 6 A schematic diagram of a process for training a sentiment classification model in one embodiment;

[0067] Figure 7 A structural diagram of a classification network in one embodiment;

[0068] Figure 8 A flowchart of a comment classification method according to another embodiment;

[0069] Fig. 9 It is a structural block diagram of a comment classification device in one embodiment;

[0070] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0071] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0072] The comment classification method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0073] When receiving the emotion recognition instruction sent by the terminal 102, the server 104 obtains the comment data of the target object in the emotion recognition instruction; processes the comment data to obtain the features to be input for the comment data; obtains the trained emotion classification model, which is based on a variational autoencoder model and a convolutional neural network model; inputs the features to be input into the variational autoencoder model in the emotion classification model to obtain reconstructed features for the comment data; inputs the features to be input and the reconstructed features into the convolutional neural network model in the emotion classification model to obtain corresponding prediction results; and determines the satisfaction level of the target object based on the prediction results.

[0074] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0075] In one embodiment, Figure 2 As shown, a comment classification method is provided, which is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:

[0076] Step 202: upon receiving an emotion recognition instruction, obtaining comment data of a target object in the emotion recognition instruction.

[0077] It should be noted that, when there is a need to identify the user's satisfaction with the application, the emotion recognition instruction is triggered, and generally a preset period can be set to trigger the identification of the satisfaction of different users. The target object is the target user. The comment data can be the comment data of the user in a preset time period, or it can be all the comment data of the user on this application.

[0078] For example, when receiving an emotion recognition instruction, the target object in the emotion recognition instruction is determined by parsing the information in the emotion recognition instruction, and then the comment data of the target object is obtained from the database or external interface. Specifically, an HTTP request can be sent from the mobile phone manufacturer's application store through a related program to obtain the comment data of the target user in the application.

[0079] Step 204 , processing the comment data to obtain features to be input for the comment data.

[0080] Among them, data processing can include cleaning processing, word segmentation processing, feature processing, etc.

[0081] Exemplarily, the comment data is processed to obtain features to be input for the comment data. Specifically, the obtained comment data is preprocessed to obtain text data, including removing irrelevant characters, normalizing punctuation marks, and segmenting words. Then, the text data is converted into a numerical vector through word embedding technology to obtain features to be input.

[0082] Step 206, obtaining a trained sentiment classification model, where the sentiment classification model is based on a variational autoencoder model and a convolutional neural network model.

[0083] The sentiment classification model is based on a variational autoencoder model and a convolutional neural network model. The trained sentiment classification model is obtained through deep learning and is used to predict the user's satisfaction with the application.

[0084] Step 208: input the features to be input into the variational autoencoder model in the sentiment classification model to obtain reconstructed features for the comment data.

[0085] The reconstructed features for the comment data may include the feature information to be input, while removing noise information and redundant information from the feature information to be input for the comment data.

[0086] Specifically, the input features are input into the variational autoencoder model in the trained sentiment classification model to obtain reconstructed features for the comment data.

[0087] Step 210, input the features to be input and the reconstructed features into the convolutional neural network model in the sentiment classification model to obtain corresponding prediction results.

[0088] The prediction results include satisfaction types and probability values ​​corresponding to the satisfaction types.

[0089] Specifically, the features to be input and the reconstructed features are input into the convolutional neural network model in the sentiment classification model, and the convolutional neural network model obtains the corresponding prediction results through multi-layer convolution operations and pooling operations.

[0090] Step 212, determining the satisfaction level of the target object based on the prediction result.

[0091] For example, based on the prediction results, the emotional tendency (such as positive, negative, neutral) expressed by the target object's comments can be determined. Based on the statistics of the emotional tendency, the satisfaction of the target object can be determined. For example, if the proportion of positive emotional comments exceeds a certain threshold, the target object can be considered satisfied.

[0092] In specific practice, the review data of users whose satisfaction levels are dissatisfied can be obtained to improve the design and services of the application, thereby improving customer satisfaction.

[0093] In the above comment classification method, when receiving the emotion recognition instruction, the comment data of the target object in the emotion recognition instruction is obtained; the comment data is processed to obtain the input features for the comment data; the input features are input into the variational autoencoder model in the emotion classification model to obtain the reconstructed features for the comment data; the input features and the reconstructed features are input into the convolutional neural network model in the emotion classification model to obtain the corresponding prediction results; based on the prediction results, the satisfaction of the target object is determined. By adopting this method, the comment data is reconstructed through the variational autoencoder model, so that more representative features can be extracted, and noise and redundant information can be reduced to better adapt to different comment data. By combining the variational autoencoder model and the convolutional neural network model, the complex emotional information in the comment data can be deeply mined. Similarly, through automated data processing and the trained emotion classification model, fast and accurate emotion recognition of a large amount of comment data can be achieved, which greatly improves the efficiency and accuracy of comment classification.

[0094] In one embodiment, step 204 includes:

[0095] Step 2042, deduplicate and clean the comment data.

[0096] Step 2044, segment the comment data after deduplication and cleaning to obtain the segmentation of each comment data.

[0097] Step 2046, using a preset stop word list, remove stop words from the comment data after word segmentation processing.

[0098] Step 2048: Perform feature extraction on each remaining token in the comment data after removing stop words, and perform feature combination processing on the tokens after feature post-processing to obtain the features to be input.

[0099] Among them, the comment data is saved in the form of text documents.

[0100] Specifically, duplicate data removal processing can be performed on the comment data. Among them, the data removal processing can read the comment data through the corresponding duplicate data removal processing data packet to remove punctuation marks in the comment data and completely duplicate comments.

[0101] Perform data cleaning operations on the comment data after duplicate data removal to remove letters, numbers, and special symbols mixed in the comment data, and filter out words that are meaningless for sentiment analysis. For example, use regular expressions to match and filter, and filter out words that are meaningless for sentiment analysis, such as usernames, advertising URL links, etc.

[0102] Perform word segmentation processing on the comment data after duplicate data removal and cleaning using a word segmentation tool to obtain the word segmentation of each comment data. Remove stop words in the comment data after word segmentation processing through a preset stop word list. For example, "I", "just", "of", "in", "and", "is", etc.

[0103] Perform feature extraction on each remaining token in the comment data after removing stop words, and perform feature combination processing on the tokens after feature post-processing to obtain the features to be input. Among them, the feature combination processing can be feature splicing processing.

[0104] In the above embodiment, through duplicate data removal processing, the influence of duplicate data on sentiment analysis can be avoided; through cleaning processing, the accuracy of subsequent word segmentation and feature extraction can be improved, and the influence of noise on sentiment recognition can be reduced; through word segmentation processing, it is helpful to capture key information in the comment; through feature extraction processing and feature combination processing, it is helpful to capture complex emotions in the comment, improve the accuracy and fine-grainedness of sentiment recognition, and thus significantly improve the accuracy of sentiment recognition.

[0105] In one embodiment, the variational autoencoder model includes an encoder, a sampling module, and a decoder; refer to Figure 3 , which shows a schematic flow diagram of obtaining reconstructed features in one embodiment. Step 208 includes:

[0106] Step 302: Input the features to be input into the encoder to obtain encoded features for the comment data.

[0107] Step 304: Based on the encoded features, input them into the sampling module to obtain corresponding sampled features.

[0108] Step 306: input the sampled features into a decoder to obtain reconstructed features for the comment data.

[0109] The variational autoencoder model mainly consists of an encoder, a sampling module, and a decoder. The encoder can be used to encode the input features to obtain the encoded features for the comment data. The encoded features can be used to capture the potential structure and information of the comment data. The sampling module can be used to randomly sample the encoded features generated by the encoder to generate sampled features. The decoder can be used to receive the sampled features and try to reconstruct them into a form similar to the original data, thereby generating reconstructed features. The encoded features can be the mean features and variance features for the comment data.

[0110] Specifically, after receiving the features to be input, the encoder compresses the input data into low-dimensional encoded features through a series of nonlinear transformations (such as fully connected layers, convolutional layers, etc.). The sampling module receives the encoded features for the features to be input, and randomly samples the encoded features to generate sampled features that are similar but not identical to the features to be input. The sampled features retain certain characteristics of the features to be input and have a certain degree of randomness. The decoder receives the sampled features and generates reconstructed features through a series of nonlinear transformations. These reconstructed features contain the information of the features to be input and may introduce new changes due to the sampling process.

[0111] Specifically, refer to Figure 4 , shows a structural diagram of a sentiment classification model in an embodiment. The sentiment classification model includes a variational autoencoder model 40 and a convolutional neural network model 41; the variational autoencoder model includes an encoder 402, a sampling module 404, and a decoder 406. The encoder 402 includes a first input layer 4022, a first hidden layer 4024, and a second hidden layer 4026. The decoder 406 includes a third hidden layer 4062, a fourth hidden layer 4064, and a first output layer 4066.

[0112] The encoding features may include a mean feature for the comment data and a variance feature for the comment data. In the sampling module, Gaussian sampling may be performed on the mean feature and the variance feature to obtain corresponding sampling features.

[0113] In the above embodiment, by inputting the features to be input into the encoder, the encoding features for the comment data are obtained; based on the encoding features, the features are input into the sampling module to obtain the corresponding sampling features; the sampling features are input into the decoder to obtain the reconstructed features for the comment data, which can accurately capture the inherent structure and characteristics of the comment data and generate reconstructed features that are similar to but different from the original data style.

[0114] In one embodiment, step 210 includes: performing feature combination processing on the input features and the reconstructed features to obtain combined features; performing multi-layer convolution operations and multi-layer pooling operations on the combined features in the convolutional neural network model, and inputting the combined features that have undergone multi-layer convolution operations and multi-layer pooling operations into the fully connected layer to obtain corresponding prediction results.

[0115] Among them, the combined features contain both direct information of the comment data and latent structural information, which helps to improve the accuracy of sentiment classification.

[0116] Exemplarily, the input features (i.e., the feature representation of the original comment data) and the reconstructed features obtained by the variational autoencoder model are combined. The feature combination method can be feature concatenation, where two feature vectors are connected end to end to form a longer combined feature. The combined feature is used as the input of the convolutional neural network model, and feature extraction is performed through multiple convolutional layers. Each convolutional layer uses multiple convolution kernels to slide on the input features and extract local features through convolution operations. As the convolutional layer deepens, the model can capture more abstract and higher-level feature representations. After the convolutional layer, a pooling layer is usually followed to perform a pooling operation to filter out the most critical features for the sentiment classification task and input them into the fully connected layer to obtain the prediction results. The pooling operation can be maximum pooling, average pooling, etc.

[0117] Specifically, refer to Figure 5 , shows a structural diagram of a convolutional neural network model in an embodiment, including a first one-dimensional convolutional layer 502, a first maximum pooling layer 504, a second one-dimensional convolutional layer 506, a second maximum pooling layer 508 and a fully connected layer 510 which are cascaded in sequence.

[0118] The first one-dimensional convolution layer 502 and the second one-dimensional convolution layer 506 can be used to perform feature extraction to extract corresponding local features.

[0119] The first maximum pooling layer 504 and the second maximum pooling layer 508 are used to perform pooling operations on local features to filter out the most critical features for the sentiment classification task and input them into the fully connected layer 510.

[0120] In the above embodiment, by combining the input features and the reconstructed features, the original information and potential structural information of the data are simultaneously utilized, thereby improving the accuracy of sentiment classification. Through multi-layer convolution and pooling operations, feature representations from low-level to high-level can be extracted layer by layer, which helps to capture the key sentiment information in the comment data. The reconstructed features can remove noise and redundant information, thereby improving the robustness and generalization ability of the model.

[0121] In one embodiment, the prediction result includes a satisfaction type and a probability value corresponding to the satisfaction type; step 212 includes: taking the satisfaction type corresponding to the maximum probability value in the prediction result as the satisfaction degree of the target object.

[0122] The prediction result may include a satisfaction type and a probability value corresponding to the satisfaction type. The satisfaction type may include but is not limited to very satisfied, satisfied, average, dissatisfied, and very dissatisfied.

[0123] In the above embodiment, judgment is made based on the probability distribution output by the sentiment classification model, which avoids subjective assumptions and human intervention and improves the objectivity of the judgment result.

[0124] In one embodiment, reference Figure 6 , showing a schematic diagram of the process of training a sentiment classification model in an embodiment.

[0125] Step 602, obtaining a review sample set; the review sample set includes sample features to be input for the review data sample and the corresponding satisfaction levels.

[0126] The review sample set includes sample features to be input for the review data sample and the corresponding satisfaction level. Specifically, the satisfaction level of the review data sample can be calculated based on a preset scoring system. For example, the corresponding satisfaction level is determined according to the score of the review data sample determined by the preset scoring system. It can also be based on the satisfaction level corresponding to different review data samples manually calibrated.

[0127] Each comment data sample in the comment sample set is deduplicated and cleaned; the comment data samples after deduplication and cleaning are segmented to obtain the segmentation of each comment data sample; the stop words in the comment data samples after the segmentation are removed by a preset stop word list; each remaining segmentation in the comment data sample after the stop words are removed is characterized, and the segmentation after feature post-processing is feature combined to obtain the feature sample to be input. Specifically, after the segmentation, according to the segmentation results, a counter object or a dictionary can be used to count the word frequency, sort the word frequency in descending order, select a preset number of words as keywords, and draw a word cloud diagram to intuitively display the keywords with higher frequency in the comments.

[0128] Step 604: Use the comment sample set to train the sentiment classification model.

[0129] Step 606, during the training process, determine whether the sentiment classification model converges through the loss function corresponding to the sentiment classification model; the loss function is based on reconstruction loss, relative entropy and adversarial loss.

[0130] Exemplarily, training is performed based on the input feature samples corresponding to each comment data sample in the comment sample set. During the training process, the loss function corresponding to the sentiment classification model is used to determine whether the sentiment classification model converges. Specifically, the loss function is based on reconstruction loss, relative entropy and adversarial loss. The corresponding expression is:

[0131] ;

[0132] in, represents the input sample of the i-th comment; N represents the number of samples of input data; represents the reconstruction loss; is the relative entropy, also known as KL divergence; represents adversarial loss, and It is a hyperparameter used to balance the contribution of the three factors. ; .

[0133] ;

[0134] in, To reconstruct the sample.

[0135] ;

[0136] in, and Represents the mean and variance of the i-th sample at the encoder output.

[0137] The adversarial loss is the error between the real sample and the generated sample, expressed as:

[0138] ;

[0139] in, represents the real data sample, represents the noise vector (i.e., sampled features) sampled from the potential space of the variational autoencoder ; Is a random number. Represents the prediction result of the convolutional neural network for the real sample data, Indicates that the autoencoder generates reconstruction features, Represents the function The expectation of The probability density function of Represents the probability density function of the Gaussian distribution.

[0140] Step 608: When it is determined that the sentiment classification model has converged, a trained sentiment classification model is obtained.

[0141] Specifically, during the training process, when the value of the loss function L is minimum and converges, the model training is stopped and the sentiment classification model after the training is extracted.

[0142] In practice, in order to ensure the performance of the encoder in the trained sentiment classification model, it is necessary to use a validation set to verify the encoder. Specifically, with the help of a classification network, the classification network is trained and tested using a review sample set to obtain the test evaluation classification effect. The evaluation indicators for the test evaluation classification effect can be accuracy, sensitivity, and specificity. Figure 7 , shows a structural diagram of a classification network; the classification network 70 may include a second input layer 702, a second fully connected layer 704, and an activation network layer 706, which are cascaded in sequence. In the classification network, the input is the encoding feature obtained by the convergence of the encoder training, thereby obtaining the class probability of the sample.

[0143] In the above embodiment, the sentiment classification model is trained by obtaining a real review sample set, and the convergence state of the model is determined by using a loss function. The loss function combines multiple aspects such as reconstruction loss, relative entropy and adversarial loss, and can comprehensively evaluate the performance of the model, so that the trained sentiment classification model has a higher sentiment recognition accuracy.

[0144] To better understand the review classification process, let’s take an example. Figure 8 , shows a flow chart of a comment classification method in another embodiment. It includes:

[0145] Step 802, obtaining a sample set of comments; and training a sentiment classification model based on the sample set of comments.

[0146] Step 804: during the training process, determine whether the sentiment classification model has converged by using the loss function corresponding to the sentiment classification model; if it is determined that the sentiment classification model has converged, obtain the trained sentiment classification model.

[0147] Step 806, upon receiving an emotion recognition instruction, obtaining comment data of the target object in the emotion recognition instruction; performing deduplication processing and cleaning on the comment data; performing word segmentation processing on the deduplication- and cleansing-processed comment data to obtain word segments for each comment data; and removing stop words from the comment data after word segmentation processing by using a preset stop word list.

[0148] Step 808 , perform feature processing on each remaining word in the comment data after the stop words are removed, and perform feature combination processing on the word after feature post-processing to obtain the features to be input.

[0149] Step 810, input the input features to the encoder to obtain the encoded features for the comment data; input the encoded features to the sampling module to obtain the corresponding sampling features; input the sampling features to the decoder to obtain the reconstructed features for the comment data.

[0150] Step 812, perform feature combination processing on the features to be input and the reconstructed features to obtain combined features; in the convolutional neural network model, perform multi-layer convolution operations and multi-layer pooling operations on the combined features, and input the combined features that have undergone multi-layer convolution operations and multi-layer pooling operations into the fully connected layer to obtain the corresponding prediction results.

[0151] Step 814: The satisfaction type corresponding to the maximum probability value in the prediction result is used as the satisfaction degree of the target object.

[0152] In this embodiment, when an emotion recognition instruction is received, the comment data of the target object in the emotion recognition instruction is obtained; the comment data is processed to obtain the input features for the comment data; the input features are input into the variational autoencoder model in the emotion classification model to obtain the reconstructed features for the comment data; the input features and the reconstructed features are input into the convolutional neural network model in the emotion classification model to obtain the corresponding prediction results; based on the prediction results, the satisfaction of the target object is determined. With this method, the comment data is reconstructed through the variational autoencoder model, so that more representative features can be extracted, and noise and redundant information can be reduced to better adapt to different comment data. By combining the variational autoencoder model and the convolutional neural network model, in-depth mining of complex emotional information in the comment data is achieved. Similarly, through automated data processing and trained emotion classification models, fast and accurate emotion recognition of a large amount of comment data can be achieved, greatly improving the efficiency and accuracy of emotion recognition.

[0153] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0154] Based on the same inventive concept, the embodiment of the present application also provides a review classification device for implementing the review classification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more review classification device embodiments provided below can refer to the limitations on the review classification method above, and will not be repeated here.

[0155] In one embodiment, Fig. 9 As shown, a review classification device is provided, including: a data acquisition module 902, a feature acquisition module 904, a model acquisition module 906, a feature acquisition module 908, a result acquisition module 910 and a degree determination module 912, wherein:

[0156] The data acquisition module 902 is used to acquire the comment data of the target object in the emotion recognition instruction when receiving the emotion recognition instruction;

[0157] The feature obtaining module 904 is used to process the comment data to obtain the input features for the comment data;

[0158] A model acquisition module 906 is used to acquire a trained sentiment classification model, where the sentiment classification model is based on a variational autoencoder model and a convolutional neural network model;

[0159] A feature acquisition module 908 is used to input the features to be input into the variational autoencoder model in the sentiment classification model to obtain reconstructed features for the comment data;

[0160] A result acquisition module 910 is used to input the features to be input and the reconstructed features into the convolutional neural network model in the sentiment classification model to obtain corresponding prediction results;

[0161] The degree determination module 912 is used to determine the satisfaction degree of the target object based on the prediction result.

[0162] In some embodiments, the feature acquisition module 904 is also used to: perform deduplication and cleaning on the comment data; perform word segmentation on the comment data after deduplication and cleaning to obtain the word segmentation of each comment data; remove stop words in the comment data after word segmentation by using a preset stop word list; perform feature processing on each word segmentation remaining in the comment data after the stop words are removed, and perform feature combination processing on the word segmentation after feature post-processing to obtain the features to be input.

[0163] In some embodiments, the feature acquisition module 908 is further used to: input the feature to be input into the encoder to obtain the encoded feature for the comment data;

[0164] Based on the coding features, the sampling module is input to obtain the corresponding sampling features;

[0165] The sampled features are input into the decoder to obtain the reconstructed features for the comment data.

[0166] In some embodiments, the result acquisition module 910 is also used to: perform feature combination processing on the features to be input and the reconstructed features to obtain combined features; in the convolutional neural network model, perform multi-layer convolution operations and multi-layer pooling operations on the combined features, and input the combined features that have undergone multi-layer convolution operations and multi-layer pooling operations into the fully connected layer to obtain corresponding prediction results.

[0167] In some embodiments, the degree determination module 912 is further used to: use the satisfaction type corresponding to the maximum probability value in the prediction result as the satisfaction degree of the target object.

[0168] In some embodiments, the comment classification device further includes:

[0169] The model training module is used to obtain a review sample set; the review sample set includes sample features to be input for the review data sample and the corresponding satisfaction level; the sentiment classification model is trained based on the review sample set; during the training process, the corresponding loss function of the sentiment classification model is used to determine whether the sentiment classification model converges; the loss function is based on reconstruction loss, relative entropy and adversarial loss; when it is determined that the sentiment classification model converges, the trained sentiment classification model is obtained.

[0170] Each module in the above-mentioned comment classification device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0171] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the trained sentiment classification model. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a comment classification method is implemented.

[0172] The display unit of the computer device is used to form a visually visible picture, and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball, or touchpad provided on the computer device housing, or an external keyboard, touchpad, or mouse, etc.

[0173] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0174] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0175] When receiving an emotion recognition instruction, obtaining comment data of a target object in the emotion recognition instruction;

[0176] Process the comment data to obtain input features for the comment data;

[0177] Obtain the trained sentiment classification model, which is based on a variational autoencoder model and a convolutional neural network model;

[0178] Input the input features to the variational autoencoder model in the sentiment classification model to obtain the reconstructed features for the comment data;

[0179] Input the features to be input and the reconstructed features into the convolutional neural network model in the sentiment classification model to obtain the corresponding prediction results;

[0180] Based on the prediction results, the satisfaction level of the target object is determined.

[0181] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0182] De-duplicate and clean the comment data;

[0183] Perform word segmentation on the comment data after deduplication and cleaning to obtain the word segmentation of each comment data;

[0184] By presetting a stop word list, stop words are removed from the comment data after word segmentation processing;

[0185] Each remaining word in the comment data after the stop words are removed is subjected to feature processing, and the word segmentation after feature post-processing is subjected to feature combination processing to obtain the features to be input.

[0186] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0187] Input the features to be input into the encoder to obtain the encoded features for the comment data;

[0188] Based on the coding features, the sampling module is input to obtain the corresponding sampling features;

[0189] The sampled features are input into the decoder to obtain the reconstructed features for the comment data.

[0190] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0191] Perform feature combination processing on the input features and the reconstructed features to obtain the combined features;

[0192] In the convolutional neural network model, the combined features are subjected to multi-layer convolution operations and multi-layer pooling operations, and the combined features that have undergone multi-layer convolution operations and multi-layer pooling operations are input into the fully connected layer to obtain the corresponding prediction results.

[0193] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0194] The prediction results include satisfaction types and probability values ​​corresponding to the satisfaction types; based on the prediction results, the satisfaction level of the target object is determined, including:

[0195] The satisfaction type corresponding to the maximum probability value in the prediction result is taken as the satisfaction degree of the target object.

[0196] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0197] Obtaining a review sample set; the review sample set includes sample features to be input for the review data sample and the corresponding satisfaction level;

[0198] Train the sentiment classification model based on the review sample set;

[0199] During the training process, the corresponding loss function of the sentiment classification model is used to determine whether the sentiment classification model converges; the loss function is based on reconstruction loss, relative entropy and adversarial loss.

[0200] When it is determined that the sentiment classification model has converged, a trained sentiment classification model is obtained.

[0201] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0202] When receiving an emotion recognition instruction, obtaining comment data of a target object in the emotion recognition instruction;

[0203] Process the comment data to obtain input features for the comment data;

[0204] Obtain the trained sentiment classification model, which is based on a variational autoencoder model and a convolutional neural network model;

[0205] Input the input features to the variational autoencoder model in the sentiment classification model to obtain the reconstructed features for the comment data;

[0206] Input the features to be input and the reconstructed features into the convolutional neural network model in the sentiment classification model to obtain the corresponding prediction results;

[0207] Based on the prediction results, the satisfaction level of the target object is determined.

[0208] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0209] De-duplicate and clean the comment data;

[0210] Perform word segmentation on the comment data after deduplication and cleaning to obtain the word segmentation of each comment data;

[0211] By presetting a stop word list, stop words are removed from the comment data after word segmentation processing;

[0212] Each remaining word in the comment data after the stop words are removed is subjected to feature processing, and the word segmentation after feature post-processing is subjected to feature combination processing to obtain the features to be input.

[0213] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0214] Input the features to be input into the encoder to obtain the encoded features for the comment data;

[0215] Based on the coding features, the sampling module is input to obtain the corresponding sampling features;

[0216] The sampled features are input into the decoder to obtain the reconstructed features for the comment data.

[0217] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0218] Perform feature combination processing on the input features and the reconstructed features to obtain the combined features;

[0219] In the convolutional neural network model, the combined features are subjected to multi-layer convolution operations and multi-layer pooling operations, and the combined features that have undergone multi-layer convolution operations and multi-layer pooling operations are input into the fully connected layer to obtain the corresponding prediction results.

[0220] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0221] The satisfaction type corresponding to the maximum probability value in the prediction result is taken as the satisfaction degree of the target object.

[0222] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0223] Obtaining a review sample set; the review sample set includes sample features to be input for the review data sample and the corresponding satisfaction level;

[0224] Train the sentiment classification model based on the review sample set;

[0225] During the training process, the corresponding loss function of the sentiment classification model is used to determine whether the sentiment classification model converges; the loss function is based on reconstruction loss, relative entropy and adversarial loss.

[0226] When it is determined that the sentiment classification model has converged, a trained sentiment classification model is obtained.

[0227] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0228] When receiving an emotion recognition instruction, obtaining comment data of a target object in the emotion recognition instruction;

[0229] Process the comment data to obtain input features for the comment data;

[0230] Obtain the trained sentiment classification model, which is based on a variational autoencoder model and a convolutional neural network model;

[0231] Input the input features to the variational autoencoder model in the sentiment classification model to obtain the reconstructed features for the comment data;

[0232] Input the features to be input and the reconstructed features into the convolutional neural network model in the sentiment classification model to obtain the corresponding prediction results;

[0233] Based on the prediction results, the satisfaction level of the target object is determined.

[0234] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0235] De-duplicate and clean the comment data;

[0236] Perform word segmentation on the comment data after deduplication and cleaning to obtain the word segmentation of each comment data;

[0237] By presetting a stop word list, stop words are removed from the comment data after word segmentation processing;

[0238] Each remaining word in the comment data after the stop words are removed is subjected to feature processing, and the word segmentation after feature post-processing is subjected to feature combination processing to obtain the features to be input.

[0239] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0240] Input the features to be input into the encoder to obtain the encoded features for the comment data;

[0241] Based on the coding features, the sampling module is input to obtain the corresponding sampling features;

[0242] The sampled features are input into the decoder to obtain the reconstructed features for the comment data.

[0243] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0244] Perform feature combination processing on the input features and the reconstructed features to obtain the combined features;

[0245] In the convolutional neural network model, the combined features are subjected to multi-layer convolution operations and multi-layer pooling operations, and the combined features that have undergone multi-layer convolution operations and multi-layer pooling operations are input into the fully connected layer to obtain the corresponding prediction results.

[0246] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0247] The satisfaction type corresponding to the maximum probability value in the prediction result is taken as the satisfaction degree of the target object.

[0248] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0249] Obtaining a review sample set; the review sample set includes sample features to be input for the review data sample and the corresponding satisfaction level;

[0250] Train the sentiment classification model based on the review sample set;

[0251] During the training process, the corresponding loss function of the sentiment classification model is used to determine whether the sentiment classification model converges; the loss function is based on reconstruction loss, relative entropy and adversarial loss.

[0252] When it is determined that the sentiment classification model has converged, a trained sentiment classification model is obtained.

[0253] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0254] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0255] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0256] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A review classification method, characterized in that: The method comprises: Upon receiving an emotion recognition instruction, obtaining comment data of a target object in the emotion recognition instruction; Processing the comment data to obtain features to be input for the comment data; Obtaining a trained sentiment classification model, wherein the sentiment classification model is based on a variational autoencoder model and a convolutional neural network model; Inputting the features to be input into the variational autoencoder model in the sentiment classification model to obtain reconstructed features for the comment data; Inputting the features to be input and the reconstructed features into the convolutional neural network model in the sentiment classification model to obtain corresponding prediction results; Based on the prediction result, the satisfaction level of the target object is determined.

2. The method according to claim 1, characterized in that The step of processing the comment data to obtain features to be input for the comment data includes: De-duplication and cleaning of the comment data; Perform word segmentation on the comment data after deduplication and cleaning to obtain the word segmentation of each comment data; By presetting a stop word list, stop words are removed from the comment data after word segmentation processing; Each remaining word in the comment data after the stop words are removed is subjected to feature processing, and the word segmentation after feature post-processing is subjected to feature combination processing to obtain the features to be input.

3. The method according to claim 1, characterized in that The variational autoencoder model includes an encoder, a sampling module, and a decoder; the variational autoencoder model inputting the features to be input into the sentiment classification model to obtain the reconstructed features for the comment data includes: Inputting the features to be input into the encoder to obtain encoding features for the comment data; Based on the coding feature, the coding feature is input into the sampling module to obtain the corresponding sampling feature; The sampled features are input into the decoder to obtain reconstructed features for the comment data.

4. The method according to claim 1, characterized in that The step of inputting the features to be input and the reconstructed features into the convolutional neural network model in the sentiment classification model to obtain corresponding prediction results includes: Performing feature combination processing on the feature to be input and the reconstructed feature to obtain a combined feature; In the convolutional neural network model, the combined features are subjected to multi-layer convolution operations and multi-layer pooling operations, and the combined features that have been subjected to multi-layer convolution operations and multi-layer pooling operations are input into the fully connected layer to obtain corresponding prediction results.

5. The method according to claim 1, characterized in that The prediction result includes a satisfaction type and a probability value corresponding to the satisfaction type; and determining the satisfaction degree of the target object based on the prediction result includes: The satisfaction type corresponding to the maximum probability value in the prediction result is used as the satisfaction degree of the target object.

6. The method according to claim 1, characterized in that The method further comprises: Obtaining a review sample set; the review sample set includes sample features to be input for the review data sample and the corresponding satisfaction level; Training the sentiment classification model according to the review sample set; During the training process, determining whether the sentiment classification model converges by using a loss function corresponding to the sentiment classification model; the loss function is based on reconstruction loss, relative entropy and adversarial loss; When it is determined that the sentiment classification model has converged, a trained sentiment classification model is obtained.

7. A comment classification device, characterized in that: The device comprises: A data acquisition module, configured to acquire comment data of a target object in the emotion recognition instruction when receiving the emotion recognition instruction; A feature obtaining module, used for processing the comment data to obtain features to be input for the comment data; A model acquisition module is used to acquire a trained sentiment classification model, wherein the sentiment classification model is based on a variational autoencoder model and a convolutional neural network model; A feature acquisition module, used for inputting the features to be input into the variational autoencoder model in the sentiment classification model to obtain reconstructed features for the comment data; A result acquisition module, used for inputting the features to be input and the reconstructed features into the convolutional neural network model in the sentiment classification model to obtain corresponding prediction results; The degree determination module is used to determine the satisfaction degree of the target object based on the prediction result.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.