CN114942974A - E-commerce platform commodity user evaluation emotional tendency classification method - Google Patents

E-commerce platform commodity user evaluation emotional tendency classification method Download PDF

Info

Publication number
CN114942974A
CN114942974A CN202210566701.6A CN202210566701A CN114942974A CN 114942974 A CN114942974 A CN 114942974A CN 202210566701 A CN202210566701 A CN 202210566701A CN 114942974 A CN114942974 A CN 114942974A
Authority
CN
China
Prior art keywords
data
evaluation
layer
model
adopting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210566701.6A
Other languages
Chinese (zh)
Inventor
黄华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202210566701.6A priority Critical patent/CN114942974A/en
Publication of CN114942974A publication Critical patent/CN114942974A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0282Rating or review of business operators or products

Abstract

The application creatively provides a rapid and high-accuracy model to analyze the emotional tendency of commodity user evaluation, a large amount of E-commerce platform commodity user evaluation data are calculated and analyzed to obtain the emotional tendency of a user to a commodity, the evaluation data are firstly preprocessed, the weight of each word is obtained by adopting a TF-IDF algorithm, word vectors are weighted, then W2D2vec characteristics are aggregated and learned to improve the commodity user evaluation emotional analysis model, a commodity user evaluation emotional analysis method based on deep multistage learning is further optimized to obtain the classification performance of the commodity emotional analysis model, the accuracy, the F value and the AUC of E-commerce platform commodity user evaluation emotional tendency classification are obviously improved, a merchant can know the satisfaction degree of the user on the product on the whole according to the obtained commodity user evaluation emotional tendency to obtain a commercial precursor, and the potential purchaser can also take the reference as an important reference for purchasing the commodity, so that the method has great practical value.

Description

E-commerce platform commodity user evaluation emotional tendency classification method
Technical Field
The application relates to a commodity evaluation and analysis method of an online shopping platform, in particular to a classification method for evaluating emotional tendency of commodity users of an e-commerce platform, and belongs to the technical field of online shopping big data processing.
Background
With the rapid development of socioeconomic and internet, online shopping has become an important part of people's lives, and each consumer participates in the internet where information is explosively grown as an information producer. The method has important significance and effect on acquiring the evaluation emotional tendency of the commodity for the E-commerce platform with massive commodities, a merchant can know the general satisfaction degree of the user to the product according to the evaluation emotional tendency of the commodity user, and acquires a business opportunity from the evaluation emotional tendency, and a potential purchaser can also use the evaluation emotional tendency as an important reference for purchasing the commodity. For massive commodities and evaluation information with huge quantity of each commodity, manual classification is almost impossible, so that a method with high speed and high accuracy is needed to analyze the emotional tendency of the commodities in order to improve user experience and bring convenience to merchants and consumers.
Emotion analysis is the analysis and prediction of subjective text with emotional tendencies. People's opinion tendencies are analyzed through natural language processing, linguistics, and text analysis for extracting and analyzing subjective information from ratings information for online shopping and social media platforms. The analyzed data quantifies the public's emotional tendencies toward certain products, such as positive, negative, neutral, that is, what is commonly referred to as positive, negative, and neutral emotions. Sentiment analysis is important and can help to understand goods that a customer likes or dislikes. If the commodity is improved, the marketing strategy is changed, and the emotional tendency of the customers to the commodity is checked regularly, so that the market change dynamics can be more actively known.
The user evaluation of the online shopping commodities has the following properties: firstly, data acquisition is relatively easy, and a large amount of data can be easily acquired through crawler software; secondly, the data is diversified, the evaluation information in online shopping comes from different fields, and the types of online commodities are different; thirdly, the data length is relatively short: generally, online shopping user evaluation is not too large, so that emotional tendency analysis of paragraphs and chapters is not considered for the moment. Through the analysis, the online commodity user evaluation emotion analysis has important significance for both consumers and merchants, so the evaluation emotion analysis has great research and application values.
Most of current text emotional tendency analysis is based on English, foreign related achievements are directly applied to Chinese, and the classification effect is not ideal.
In the prior art, the tendency of word semantics is judged, the Chinese word semantics is subjected to emotional tendency calculation by adopting HowNet, and the semantic tendency metric value of each word of a text is determined by the semantic association degree of the word and a reference word. If the word is closely related to the derogatory reference word, the word is biased to derogatory, and if the word is closely related to the commendatory reference word, the word is biased to commendatory. However, the method based on the emotion dictionary has the defect of over-dependence on the external dictionary.
In the prior art, when a general emotion dictionary is used for emotion analysis, for description of different characteristics, the same emotion word may express different emotion tendencies and cannot identify field-specific emotion words in a specific field. However, online evaluation data is not standardized, the syntactic structure of the text is not considered in the processes of emotion word and feature word extraction and emotion analysis, only the emotion tendency of feature granularity is considered, Chinese conjunctions are not considered, and the influence of context factors on emotion classification is not considered.
In summary, the prior art still has several problems and defects, and the key technical difficulties of the e-commerce platform commodity user in evaluating the emotional tendency classification include the following points:
(1) for an E-commerce platform with massive commodities, the method for acquiring the evaluation emotional tendency of the commodities has important significance and effect, but the massive commodities and the evaluation information with huge quantity of each commodity are almost impossible to classify by manpower, and the method based on the emotional dictionary excessively depends on an external dictionary. According to the emotion analysis method based on the field, the syntactic structure of a text is not considered in the processes of emotion word and feature word extraction and emotion analysis, only the emotion tendency of feature granularity is considered, Chinese conjunctions are not considered, the influence of context factors on emotion classification is not considered, and the accuracy is low. The prior art lacks a rapid and high-accuracy model for analyzing the emotional tendency evaluated by commodity users. In the existing model, the Word2vec model ignores the sequence between words, and the doc2vec model does not consider the difference of the influence degree of a single Word on the document in evaluation. In the prior art, the weight of each word in comments is not considered, weighting processing on word vectors is lacked, and a W2D2vec feature improvement commodity user evaluation emotion analysis model is lacked in aggregation learning, so that the training speed of the model is very slow, and the evaluation emotion tendency classification performance of the commodity user evaluation emotion tendency for an E-commerce platform is weak.
(2) The evaluation emotional tendency of the commodity of the merchant platform is obtained, the merchant can know the general satisfaction degree of the user to the product, the commercial opportunity is obtained from the satisfaction degree, and the evaluation emotional tendency is also used as an important reference for whether the commodity is purchased or not by a potential purchaser. However, the prior art lacks a classification method specially aiming at evaluating emotional tendency of commodity users of the Chinese and electronic commerce platform. In the face of massive comment data, a commodity user evaluation information preprocessing method is lacked, a series of processing such as evaluation data de-duplication and evaluation data de-noising is lacked, subjective and objective classification cannot be performed on the evaluation data, and subjective evaluation is a data set. The prior art is lack of aggregation learning W2D2vec feature improved commodity user evaluation emotion analysis, a Word2vec feature improved commodity user evaluation emotion analysis model based on aggregation learning and a Word2vec feature representation algorithm based on TF-IDF feature weight, the prior art simply averages Word vectors to ignore the arrangement sequence between words, does not consider the difference of the influence degree of a single Word on evaluation information, cannot obtain the importance degree of each Word in a text, and is lack of aggregation learning model based on voting for classification. The prior art lacks of commodity user evaluation emotion analysis based on deep multi-level learning. The accuracy, the F value and the AUC cannot meet the requirements when the emotional tendency classification is evaluated for the commodity users of the E-commerce platform, and the value of large-scale application is lost.
(3) The prior art lacks an emotional tendency classification method designed aiming at the evaluation characteristics of e-commerce platform commodity users, because the e-commerce platform commodity users are easy to evaluate and acquire and have large data quantity, the prior art hardly meets the requirements on the classification efficiency and precision, the evaluation information in online shopping comes from different fields, the types of online commodities are different, the data has diversity, and the prior art lacks a targeted classification model, so that the reliability and the speed of the commodity user evaluation emotional classification are poor. The evaluation data length of commodity users is short, methods for analyzing emotional tendency of paragraphs and chapters are not specifically considered in the prior art, so that the model training speed is very low, the classification performance is weak, the accuracy, the precision, the recall rate and the F value of the evaluation emotional tendency classification of the commodity users of the E-commerce platform cannot meet the requirements by adopting the models of the prior art, the merchants cannot know the satisfaction degree of the users to products according to the evaluation emotional tendency of the commodity users, the business initiatives cannot be obtained, potential purchasers cannot use the evaluation data as an important reference for purchasing the commodity, and the models lose the actual utilization value.
Disclosure of Invention
The method creatively provides a model with high speed and high accuracy to analyze the emotional tendency of commodity user evaluation, and solves the problems that in the existing model, a Word2vec model ignores the sequence of words, and a doc2vec model does not consider the difference of the influence degree of a single Word on a document in evaluation. The method obtains the emotional tendency of the user to the commodity by calculating and analyzing a large amount of commodity user evaluation data of the E-commerce platform, firstly carries out pre-processing on the evaluation data, obtains the weight of each word by adopting a TF-IDF algorithm, carrying out weighting processing on the word vectors, then performing aggregation learning on the W2D2vec characteristics to improve the commodity user evaluation emotion analysis model, and further optimizing to obtain a commodity user evaluation emotion analysis method based on deep multistage learning, improving the classification performance of a commodity emotion analysis model, obviously improving the accuracy, F value and AUC of the classification of the evaluation emotion tendencies of commodity users of the E-commerce platform, enabling a merchant to know the satisfaction degree of the users on the products as a whole according to the obtained evaluation emotion tendencies of the commodity users, obtaining commercial opportunity from the evaluation emotion tendencies, and the potential purchaser can also take the reference as an important reference for purchasing the commodity, so that the method has great practical value.
In order to achieve the technical effects, the technical scheme adopted by the application is as follows:
the E-commerce platform commodity user evaluation emotional tendency classification method obtains the emotional tendency of a user to commodities by calculating and analyzing a large amount of E-commerce platform commodity user evaluation data: firstly, preprocessing evaluation data, obtaining the weight of each word by adopting a TF-IDF algorithm, weighting word vectors, then performing convergent learning on W2D2vec characteristics to improve a commodity user evaluation emotion analysis model, further optimizing to obtain a commodity user evaluation emotion analysis method based on deep multistage learning, and improving the classification performance of the commodity emotion analysis model;
p1-commodity user evaluation information preprocessing: removing duplication of evaluation data, including repeated data and corpus centralized repeated evaluation in single evaluation, removing the noise of the evaluation data, such as removing garbage evaluation information and invalid characters, and finally carrying out subjective and objective classification on the evaluation data, wherein the obtained subjective evaluation is used as a data set of the application experiment;
p2-aggregation learning W2D2vec feature improvement commodity user evaluation emotion analysis, which comprises the following steps: processing subjective evaluation data by Word segmentation and stop words, training a Word2vec model to extract features, expressing the Word2vec features based on TF-IDF feature weight, and performing a voting-based aggregation learning model; training the pre-processed evaluation data by adopting a Word2vec model trained by a large amount of Chinese corpora to obtain a Word vector of evaluation information, weighting the Word vector by adopting a TF-IDF algorithm to obtain the importance degree of each Word in the text, and finally classifying by adopting a voting-based aggregation learning model
P3-commodity user evaluation emotion analysis based on deep multi-level learning: and (3) processing the input three-dimensional matrix by adopting a 1D convolution as a first layer of the model, then processing the input data of the previous layer by respectively adopting a maximum downsampling layer, a dropping layer, an LSTM layer and a threshold circulating layer, and finally determining the evaluated emotional tendency according to the result of an output layer.
Further, the deep multi-level learning commodity evaluation emotion analysis method comprises the following steps:
inputting: a three-dimensional matrix (x, y, z), x representing each item of ratings data, y representing a word in each item of ratings data, and z representing a vector for each word;
and (3) outputting: evaluating the emotional tendency category R of the data;
step 1: training a Word vector by adopting a trained Word2vec model, and performing TF-IDF weighting processing on the Word vector to obtain a three-dimensional input matrix (x, y, z) of the model;
step 2: the first layer of the model adopts a 1D convolution layer to process an input three-dimensional matrix and output the processed three-dimensional matrix;
and 3, step 3: pooling a three-dimensional matrix output by the convolutional layer by adopting a maximum down-sampling layer to obtain a new three-dimensional matrix, and processing the pooled three-dimensional matrix by adopting a dropped layer to prevent data overfitting;
and 4, step 4: processing the three-dimensional matrix output by the dropped layer by adopting an LSTM layer to obtain a new three-dimensional matrix;
and 5, step 5: processing a three-dimensional matrix output by the LSTM layer by adopting a threshold cycle unit layer, and outputting a two-dimensional matrix;
and 6, a step of: converting the vectors of sentences in the two-dimensional matrix from multiple dimensions into one dimension by adopting a full link layer;
and 7, step 7: and processing the two-dimensional matrix output by the full link layer by adopting a sigmoid function in the activation layer to obtain an emotion classification result of the commodity evaluation data.
Further, commodity user evaluation information preprocessing: searching commodity user evaluation information on a commercial platform as a corpus for analysis, wherein the corpus comprises two types of data information of positive emotion and negative emotion;
the method comprises the following steps: evaluating data for duplication removal;
step two: denoising evaluation data: cleaning the evaluation data in the corpus set to remove invalid data, wherein the junk evaluation data are removed, non-Chinese corpora in the evaluation data are cleaned, and invalid characters in the evaluation data are cleaned;
step three: and (3) evaluating data subjective and objective classification: firstly, extracting correlation characteristics, then training corpora by adopting a machine learning algorithm to obtain a classification model, and finally classifying data; dividing the obtained data into training data and testing data, carrying out manual classification and labeling on the training data, labeling the training data into subjective evaluation data and objective evaluation data, then extracting various associated characteristics of the training data to form a characteristic vector, inputting the characteristic vector into a machine learning model for training to obtain a classifier, and classifying the testing corpus to obtain classified subjective evaluation data;
the emotional tendency of the user only exists in the subjective evaluation, and the subjective evaluation of the user is extracted from the data set.
Further, the subjective evaluation data is subjected to word segmentation and word stop: segmenting data by adopting a crust segmentation Python library, and converting positive and negative corpus segmentation words into a two-dimensional matrix form respectively, wherein each row is data obtained after evaluation data segmentation;
the method comprises the steps of obtaining a stop word bank by combining a Baidu stop word list and a Haugh stop word bank for duplication removal, storing matrixes of positive and negative evaluation data after stop words removal into pos _ review.
Further, training a Word2vec model to extract features: the method comprises the steps that a Word2vec model is trained, wherein the Word2vec model is accurately trained on the basis of a large amount of Chinese corpora by adopting full-network news corpora data downloaded from a dog searching laboratory;
extracting content part data from dog searching news corpus data, integrating all data of all files into a Word2vec _ data.cvs file, storing the file locally, reading the Word2vec _ data.cvs file locally when a Word2vec model needs to be trained, training by adopting a skip-gram method to obtain a trained Word2vec model, storing the trained Word2vec model as a Word2vec _ data.model.bin file in a C language analyzable mode, converting subjective evaluation data into Word vectors according to the trained Word2vec model, obtaining the vector of each piece of evaluation data aiming at the whole piece of evaluation data when the evaluation data are subjected to emotion classification, adding the vectors of each Word in evaluation, averaging to obtain the vector of each piece of evaluation data, and taking the vector of each piece of evaluation data as the characteristic of the evaluation data.
Further, the Word2vec feature representation based on the TF-IDF feature weight is as follows: calculating the weight of the word vector by adopting a TF-IDF algorithm, and performing weighting operation on the word vector;
there is an evaluation data set J which,wherein J i (i ═ 1, 2.. times, m), we get the feature vector for each participle in each evaluation, then the n-dimensional feature vector set is represented as follows:
C={x 1 ,x 2 ,...,x n is equal to n and 1
For the participle in each evaluation, firstly, calculating the word frequency TF of the participle in the evaluation, and then calculating the inverse document frequency IDF of the word in the whole evaluation set, wherein the calculation formula of the word frequency TF is as follows:
Figure BDA0003658426890000051
wherein, f (w, J) i ) Representing the total number of occurrences of the participle w in the evaluation,
Figure BDA0003658426890000052
the total number of the participles in the evaluation, and the inverse document frequency IDF of the participle w is calculated as follows:
Figure BDA0003658426890000053
wherein m is the total number of evaluation data, y w In order to evaluate the evaluation number of w in the data set, in order to set a constant of 0.3 in formula 3 to ensure smoothness, in a certain evaluation, a constant is set to ensure that the denominator is not zero;
therefore, the feature weight is calculated as follows:
Figure BDA0003658426890000061
wherein the content of the first and second substances,
Figure BDA0003658426890000062
carrying out normalization processing;
for evaluation set J i The feature vector of the middle evaluation data is expressed as follows:
Figure BDA0003658426890000063
wherein, c w Word vector, sum (J), representing a participle w i ) Representing the number of the evaluation participles;
and adopting vectors weighted by TF-IDF as features, and adopting SVC, SGD and naive Bayes as classifiers respectively to train the classifiers and classify test data.
Further, the voting-based aggregation learning model: the accuracy of a single model is improved through aggregation learning, a plurality of classification models are established by adopting an aggregation strategy based on voting, then the prediction result of each model is calculated, and finally the combined prediction is carried out by adding weights to the prediction results of multiple models;
inputting: word2vec feature vector list [ [ vec ] based on TF-IDF feature weight 1 ],[vec 2 ],…,[vec m ]];
And (3) outputting: emotional tendency category R of the evaluation data:
Figure BDA0003658426890000064
q i represents the weight of the ith classifier,
Figure BDA0003658426890000065
refers to the probability that the ith classifier outputs an aggressive class,
Figure BDA0003658426890000066
the probability that the ith classifier outputs a negative class;
the first step is as follows: initializing the weight of each classifier, q i 1/N, i is 1,2, …, and N is the total number of classifiers;
the second step is that: the result of the prediction by the classifier 1,
Figure BDA0003658426890000067
the result of the prediction by the classifier 2,
Figure BDA0003658426890000068
……
the result of the prediction by the classifier N,
Figure BDA0003658426890000069
updating the weight of each classifier, and taking the correct rate of classification of each classifier as the new weight of the classifier;
the third step: and selecting the category with the highest probability as an output result.
Further, commodity user evaluation emotion analysis based on deep multi-level learning: the method comprises the steps of adopting Word2vec model training data and a vector matrix weighted by TF-IDF as input data, taking a 1D convolutional layer as a first layer of a model, adding downsampling layer compression data, adding a dropped layer to the model to prevent overfitting, adding an LSTM layer and a threshold cycle layer to process data output by an upper layer, adding a full link layer to convert the vector dimension of each piece of evaluation data into one dimension, and finally adopting sigmoid as an activation function to classify the evaluation data according to emotional tendency.
Further, the commodity user evaluation emotion analysis model based on deep multistage learning comprises:
(1) processing Word2vec model data based on TF-IDF weight: the data is converted into a vector form through pre-training the data, a vector matrix is suitable for being used as the input of deep multi-stage learning, a Word2vec training Word vector is adopted in a model, a Word2vec feature representation algorithm based on TF-IDF feature weight is adopted to process a pre-processed data set, a weighted feature vector is obtained, and the obtained data is used as the input data of the model;
(2)1D convolutional layer: the first layer of the model adopts a 1D convolutional layer to carry out convolution operation on an input three-dimensional matrix and outputs a new three-dimensional matrix, the number of 1-dimensional convolution kernels in the 1D convolutional layer is 64, the length of the convolution kernels is 4, relu is adopted as an activation function of the layer, the relu transfers gradient, and the gradient is not greatly reduced after multiple times of reverse propagation;
(3) down-sampling layer: performing pooling treatment on the three-dimensional matrix output by the convolution layer by adopting a maximum down-sampling layer to obtain a new three-dimensional matrix;
(4) layer dropped: in the training process, input neurons of a certain proportion are randomly disconnected in the dropped layer when parameters are updated each time, so that data overfitting is prevented, a three-dimensional matrix output by the dropped layer is processed by the dropped layer, and the processed three-dimensional matrix is output;
(5) LSTM layer: avoiding gradual disappearance by adding one memory block to each node in the hidden layer, structure of memory blocks: comprises a cell unit C, a forgetting gate f, an input gate i and an output gate o, wherein the states of the cell unit are controlled by three gates, the specific information discarded is determined by the forgetting gate, and the gate reads x t And h t-1 Output f t F is a number between 0 and 1, and the output f at t is calculated by the following equation t
Figure BDA0003658426890000071
The next step is to determine the information to be updated, to determine the information stored in the cell state, and to enter the portal to determine the updated information i t New candidate value for tanh layer
Figure BDA0003658426890000072
Add to state:
Figure BDA0003658426890000073
Figure BDA0003658426890000074
this step updates the state of the cell, state C t-1 Is updated toC t Old cell state C t-1 And f t Multiplying to obtain the retained information, and adding the information to be updated to obtain C t
Figure BDA0003658426890000075
Finally, the output information is determined, the output information is based on C t To C t Filtering to obtain output information, determining partial information to be output in a cell state by using a sigmoid layer, processing the cell state by using tanh, multiplying the result by the information output by the sigmoid layer, and determining output information h t
Figure BDA0003658426890000081
Figure BDA0003658426890000082
W is a weight matrix, sigma represents the operation of the sigmoid neural network layer,
Figure BDA0003658426890000083
representing vector multiplication operation, adopting a storage block of each hidden node, overcoming the gradient disappearance problem by using an LSTM layer, and processing a three-dimensional matrix output by a dropped layer by using the LSTM layer to obtain a new three-dimensional matrix;
(6) threshold cycle layer: the forgetting gates and the input gate are combined into an updating gate, the threshold loop layer does not have a special memory unit, and each hidden node only retains h j Except for h j The threshold cycle unit comprises alternative hidden nodes
Figure BDA0003658426890000084
A reset gate r and an update gate z, the reset gate r being calculated first at time j j At the computing of candidate hidden nodes
Figure BDA0003658426890000085
It is determined whether the previous hidden node is employed:
r j =g(W r x+U r h j-1 +b r ) Formula 13
Alternative hidden node
Figure BDA0003658426890000086
Calculated from the following formula:
Figure BDA0003658426890000087
computing and determining candidate hidden nodes
Figure BDA0003658426890000088
And previous hidden node h j-1 Weighted update gate z j And according to the updated door z j Updating hidden node h j
z j =g(W z x+U z h j-1 +b z ) Formula 15
Figure BDA0003658426890000089
The memory unit of the LSTM memory block is removed, whether the previous long-term memory or the new short-term memory is adopted is controlled through an updating gate and a resetting gate, if the updating gate is close to 1, the output is very biased to the long-term memory, and conversely, if the updating gate and the resetting gate are both close to 0, the output exceeds the short-term memory. Processing the three-dimensional matrix output by the LSTM layer by adopting a threshold cycle layer, and outputting a two-dimensional moment (x, z), wherein x refers to each piece of evaluation data, and z refers to a multi-dimensional vector for representing each piece of evaluation data;
(7) a full link layer: each node is linked with each node of the previous layer, the characteristics output by the previous layer are integrated, the full link layer is used as the last layer and is also used as the output layer of the model, and the multi-dimensional characteristic vector of the previous layer is compressed into a one-dimensional vector, namely a two-dimensional matrix (x, z) is output, wherein the multi-dimensional vector representing each piece of evaluation data is converted into a one-dimensional vector in the full link layer;
(8) an active layer: the input data is processed by adopting an activation function, the activation function defines the mapping of the output of the neuron, the output of the neuron is processed by the activation function and then output, and the activation function is adopted to introduce a nonlinear factor and learn a smooth curve segmentation plane.
Compared with the prior art, the innovation points and advantages of the application are as follows:
firstly, the application creatively provides a rapid and high-accuracy model to analyze the emotional tendency of commodity user evaluation, and solves the problems that in the existing model, a Word2vec model ignores the sequence of words, and a doc2vec model does not consider the different degrees of influence of a single Word on a document in evaluation. The method obtains the emotional tendency of the user to the commodity by calculating and analyzing a large amount of commodity user evaluation data of the E-commerce platform, firstly carries out pre-processing on the evaluation data, adopts TF-IDF algorithm to obtain the weight of each word, carrying out weighting processing on the word vectors, then performing aggregation learning on the W2D2vec characteristics to improve the commodity user evaluation emotion analysis model, and further optimizing to obtain a commodity user evaluation emotion analysis method based on deep multistage learning, improving the classification performance of a commodity emotion analysis model, obviously improving the accuracy, F value and AUC of the classification of the evaluation emotion tendencies of commodity users of the E-commerce platform, enabling a merchant to know the satisfaction degree of the users on the products as a whole according to the obtained evaluation emotion tendencies of the commodity users, obtaining commercial opportunity from the evaluation emotion tendencies, and the potential buyer can also take the commodity as an important reference for purchasing the commodity, so that the method has great practical value.
Secondly, the method is an accurate and efficient classification method specially for evaluating emotional tendency of commodity users of the E-commerce platform. A Word2vec feature improved commodity user evaluation emotion analysis model based on aggregation learning is provided. The method comprises the steps of training pre-processed evaluation data by adopting a Word2vec model trained by a large amount of Chinese corpora to obtain Word vectors of evaluation information, obtaining the weight of each Word by adopting a TF-IDF algorithm, then synthesizing a polymerization learning method, and providing a Word2vec characteristic improved commodity user evaluation emotion analysis model based on polymerization learning. Through the comparison of test results, compared with a doc2vec model, the model provided by the application has certain improvement in the aspects of accuracy, precision, recall rate and F value. Helping to know the goods that the customer likes or dislikes. If the commodity is improved, the marketing strategy is changed, and the emotional tendency of the customers to the commodity is checked regularly, so that the market change dynamics can be more actively known.
Thirdly, the weight of each word is obtained by adopting a TF-IDF algorithm, word vectors are weighted, a converged learning W2D2vec characteristic improved commodity user evaluation emotion analysis model is provided, the model has the advantages that the training speed is very high, but the classification performance is weaker than that of a multi-layer network, the commodity user evaluation emotion analysis model based on deep multi-stage learning is further provided, a 1D convolution is adopted as a first layer of the model to process an input three-dimensional matrix, then a maximum down-sampling layer, a drop-off layer, an LSTM layer and a threshold cycle layer are adopted to process data input by a previous layer, and finally the evaluation emotion tendency is determined according to the result of an output layer. Compared with the existing several classical neural network models and the experimental results of the aggregation learning-based Word2vec characteristic improvement evaluation emotion analysis model, the method has certain improvement in accuracy, F value and AUC, and shows that the model provided by the application has better classification performance.
Drawings
Fig. 1 is a flow chart of a cleaning work of commodity user evaluation data.
Fig. 2 is a flowchart of subjective and objective evaluation data classification.
Fig. 3 is a flowchart of product user evaluation emotion analysis classification.
FIG. 4 is a workflow diagram of the subjective-assessment-data-segmentation and word-deactivation operation.
FIG. 5 is a diagram of a voting-based multi-classifier aggregation model framework.
Fig. 6 is a block diagram of memory blocks within the LSTM layer.
FIG. 7 is a block diagram of a threshold cycle level memory block.
Fig. 8 is a schematic diagram of the corresponding coordinate transformation performed on the target image.
FIG. 9 is a graph showing comparison between emotion classification effects of models tested in the present application.
Detailed description of the invention
The technical scheme of the classification method for evaluating the emotional tendency of the commodity user on the e-commerce platform provided by the application is further described below with reference to the accompanying drawings, so that a person skilled in the art can better understand the application and can implement the application.
For an e-commerce platform with massive commodities, the method has important significance for acquiring the evaluation emotional tendency of the commodities, and a model with high speed and high accuracy is needed for analyzing the emotional tendency evaluated by commodity users. In the existing model, the Word2vec model ignores the sequence between words, and the doc2vec model does not consider the difference of the influence degree of a single Word on the document in evaluation. The method adopts a TF-IDF algorithm to obtain the weight of each word, carries out weighting processing on word vectors, and provides a W2D2vec feature improved commodity user evaluation emotion analysis model for aggregation learning.
1. According to the method and the device, the emotional tendency of the user to the commodity is obtained by analyzing a large amount of commodity user evaluation data of the E-commerce platform, and the problems that the de-duplication and de-noising are carried out on a large amount of evaluation information, and the classification performance of a commodity emotion analysis model is improved are solved.
2. And (4) preprocessing commodity user evaluation information. The method comprises the steps of firstly removing duplication of evaluation data, then denoising the evaluation data, and finally carrying out subjective and objective classification on the evaluation data, wherein the obtained subjective evaluation is used as a data set of the application experiment.
3. Aggregation learning W2D2vec features improve commodity user evaluation emotion analysis. And providing a Word2vec feature improved commodity user evaluation emotion analysis model based on aggregation learning and a Word2vec feature representation algorithm based on TF-IDF feature weight. Simple averaging of word vectors ignores the arrangement sequence between words, and the doc2vec model does not consider the difference of the influence degree of a single word on evaluation information. And training by adopting a Word2vec model to obtain a Word vector of the evaluation information, then weighting the Word vector by adopting a TF-IDF algorithm to obtain the importance degree of each Word in the text, and finally classifying by adopting a voting-based aggregation learning model. Compared with a doc2vec model, the model provided by the application is improved to a certain extent in the aspects of accuracy, precision, recall rate and F value.
4. And carrying out commodity user evaluation emotion analysis based on deep multistage learning. And (3) adopting 1D convolution as a first layer of the model, then respectively adopting a maximum downsampling layer, a dropping layer, an LSTM layer and a threshold circulating layer to process the input data of the previous layer, and finally determining the evaluated emotional tendency according to the result of an output layer. Compared with the experimental results of several conventional neural network models, the method has the advantages that the accuracy, the F value and the AUC are improved to a certain extent, and the model provided by the application has better classification performance.
Product user evaluation information preprocessing
According to the method and the system, emotional tendency analysis is carried out on the commodity user evaluation information, so that the commodity user evaluation information on the commercial platform needs to be searched and used as a corpus to be analyzed. The method comprises two types of data information of positive emotion and negative emotion, the data processing is not perfect enough, some errors exist, and further processing is needed to ensure the accuracy of the data, so that the best effect is achieved.
The method comprises the following steps: evaluating data for duplication removal;
step two: denoising evaluation data: based on the great freedom of user evaluation, part of information filled by users has no meaning for evaluating emotion classification, even influences the training of a classification model, such data information cannot be used as training corpora, and evaluation data needs to be cleaned in corpus set to remove invalid data. The working flow chart of the evaluation data cleaning is shown in fig. 1, wherein the junk evaluation data is removed, the non-Chinese linguistic data in the evaluation data are cleaned, and the invalid characters in the evaluation data are cleaned.
Step three: and (3) evaluating data subjective and objective classification: firstly, extracting the associated features, then training the corpora by adopting a machine learning algorithm to obtain a classification model, and finally classifying the data, wherein a work flow chart is shown in fig. 2. Dividing the obtained data into training data and test data, carrying out manual classification labeling on the training data, labeling the training data into subjective evaluation data and objective evaluation data, then extracting various associated characteristics of the training data to form a characteristic vector, inputting the characteristic vector into a machine learning model for training to obtain a classifier, classifying the test corpus to obtain classified subjective evaluation data, wherein the characteristic extraction of the subjective and objective evaluation data comprises the following steps:
(1) emotional words: emotional words are not included in the objective evaluation, and the emotional tendency of the user exists in the subjective evaluation, so that the subjective evaluation and the objective evaluation are distinguished.
(2) Punctuation marks: the symbols with emotional colors in the evaluation data include question marks and exclamation marks, and the probability of occurrence in subjective evaluation is high.
(3) The Chinese character: the probability of the occurrence of the language word at the end of the subjective sentence is high.
(4) Some verbs: including sensory and suggested verb-like, the probability of appearing in subjective evaluations is high.
(5) Some degree of adverb: including ad hoc, extra, and tenth, the probability of appearing in subjective evaluations is high.
The emotional tendency of the user only exists in the subjective evaluation, and the subjective evaluation of the user is extracted from the data set.
Aggregation learning W2D2vec feature improved commodity user evaluation emotion analysis
Commodity user evaluation emotion analysis system demand analysis
The data are classified twice, the data are subjected to preprocessing firstly, then the data are divided into subjective evaluation and objective evaluation through classification, and finally the subjective evaluation is subjected to sentiment classification. The emotion classification flow of the evaluation data is shown in fig. 3.
Although the doc2vec model can well express evaluation information, the influence degree of a single Word on the whole evaluation is not considered, so that in the model, Word vectors trained by the Word2vec model are weighted based on a TF-IDF algorithm, the weighted Word vectors are used as features, and the voting-based aggregation learning algorithm is adopted to train data to obtain a more accurate classification result. The model flow diagram is shown in fig. 3.
(II) existing model analysis
1. Word2 vec-based text classification model
Considering that the One-hot Representation word vector Representation can cause the problem that the dimension of the word vector is too high to cause dimension disaster and the problem that the vector distance between words cannot be represented and the similarity of the words cannot be calculated, the model text of the application adopts the Distributed Representation word vector Representation. Word2vec utilizes context information of words, semantic information is richer, but the Word2vec model has the fatal defect that the importance of different words in a text cannot be well distinguished.
2. Doc2 vec-based text classification model
The Word2vec model obtains an evaluation information vector by averaging Word vectors, but ignores the arrangement sequence between words, and the Word vectors have certain influence on emotional tendency analysis. Therefore, the model based on Word2vec feature extraction can only perform semantic analysis based on Word dimension, but cannot perform semantic analysis based on context. A paragraph vector is added in the Doc2vec vector training method, firstly, DM and DBOW method models are instantiated, then DM and DBOW models are obtained through training of a large corpus, Doc vectors of training corpuses and testing corpuses after word segmentation and word deactivation are obtained through the DM and DBOW models, then a support vector machine, naive Bayes and a stochastic gradient descent method are respectively trained to serve as classifiers by adopting the characteristics of the Doc vectors of the testing corpuses, and finally the emotional tendency classification is carried out on the testing corpuses through the classifiers.
(III) processing the segmentation and stop word of subjective evaluation data
The method comprises the steps of segmenting data by adopting a crust segmentation Python library, segmenting positive and negative linguistic data and then converting the segmented positive and negative linguistic data into a two-dimensional matrix form respectively, wherein each row is data obtained after the segmentation of evaluation data;
in the evaluation data after word segmentation, many words are words without any effect on emotional tendency classification, and even the words can influence the classification accuracy, so stop word processing is required to be performed on the evaluation data, many useless word bank networks exist, the stop word bank is obtained after duplication removal by combining a Baidu stop word list and a Hadamard stop word bank, then matrixes of positive and negative type evaluation data after word removal are respectively stored into pos _ review.pkl and neg _ review.pkl files, the data are directly imported into the pkl files to obtain the data when the data are adopted, and a work flow chart of operations of word segmentation and stop word removal on the subjective evaluation data is shown in FIG. 4.
(IV) training Word2vec model extraction features
The Word2vec model is trained by the application by adopting full-network news corpus data downloaded from a dog searching laboratory, and the accurate Word2vec model is trained on the basis of a large amount of Chinese corpuses.
The dog searching news corpus data consists of a plurality of files, the data in the files are all in the format of Html, the data of the content part is extracted from the files, and integrates all the data of all files into a Word2vec _ data. cvs file, then storing the data in the local, reading the Word2vec _ data. cvs file from the local when the Word2vec model needs to be trained, training by adopting a skip-gram method to obtain the trained Word2vec model, stored as a Word2vec _ data.model.bin file in a manner that C language can be parsed, and then subjectivity evaluation data is converted into Word vectors according to the trained Word2vec model, when emotion classification is performed on evaluation data, aiming at the whole evaluation data, obtaining a vector of each evaluation data, wherein each evaluation data is composed of a plurality of words, adding the vectors of each word in one evaluation, then, the average value is calculated to obtain a vector of the evaluation data, and the obtained vector of each piece of evaluation data is used as the characteristic of the evaluation data.
(V) Word2vec feature representation based on TF-IDF feature weights
Although compared with the traditional vector space model, the text vector space represented by the Word2vec model not only solves the problem of vector dimension disaster, but also enables the trained vector space to have semantic information, the Word vector trained by the Word2vec model does not know the influence degree of each Word in the text on the evaluation of emotional tendency, so the TF-IDF algorithm is adopted in the model to calculate the weight of the Word vector, and the Word vector is subjected to weighting operation.
There is an evaluation data set J, wherein J i (i ═ 1, 2.. times, m), we get the feature vector for each participle in each evaluation, then the n-dimensional feature vector set is represented as follows:
C={x 1 ,x 2 ,...,x n is equal to n and 1
For the participle in each evaluation, firstly, calculating the word frequency TF of the participle in the evaluation, and then calculating the inverse document frequency IDF of the word in the whole evaluation set, wherein the calculation formula of the word frequency TF is as follows:
Figure BDA0003658426890000131
wherein, f (w, J) i ) Representing the total number of occurrences of the participle w in the evaluation,
Figure BDA0003658426890000132
the total number of the participles in the evaluation is shown, and the inverse document frequency IDF of the participle w is calculated as follows:
Figure BDA0003658426890000133
wherein m is the total number of evaluation data, y w In order to evaluate the number of evaluations of w appearing in the data set, in order to set a constant of 0.3 in equation 3 to ensure smoothness, when a certain feature word may not appear in a certain evaluation, a constant is also set to ensure that the denominator is not zero.
Therefore, the feature weight is calculated as follows:
Figure BDA0003658426890000134
wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003658426890000135
carrying out normalization processing;
for evaluation set J i The feature vector of the middle evaluation data is expressed as follows:
Figure BDA0003658426890000141
wherein, c w Word vector, sum (J), representing a participle w i ) Representing the number of the evaluation participles;
and adopting vectors weighted by TF-IDF as features, and adopting SVC, SGD and naive Bayes as classifiers respectively to train the classifiers and classify test data.
(VI) voting-based aggregate learning model
The accuracy of a single model is improved through aggregation learning, a plurality of classification models are established through an aggregation strategy based on voting, then the prediction result of each model is calculated, and finally the combined prediction is carried out by adding weights to the prediction results of multiple models. Considering that each classification model has defects, the overall prediction accuracy can be effectively improved through aggregation learning. The voting-based multi-classifier aggregation model framework is shown in fig. 5.
Inputting: word2vec feature vector list [ [ vec ] based on TF-IDF feature weight 1 ],[vec 2 ],…,[vec m ]];
And (3) outputting: emotional tendency category R of the evaluation data:
Figure BDA0003658426890000142
q i represents the weight of the ith classifier,
Figure BDA0003658426890000143
refers to the probability that the ith classifier outputs an aggressive class,
Figure BDA0003658426890000144
the probability that the ith classifier outputs a negative class;
the first step is as follows: initializing the weight of each classifier, q i 1/N, i is 1,2, …, and N is the total number of classifiers;
the second step is that: the result of the prediction by the classifier 1,
Figure BDA0003658426890000145
the result of the prediction by the classifier 2,
Figure BDA0003658426890000146
……
the result of the prediction by the classifier N,
Figure BDA0003658426890000147
updating the weight of each classifier, and taking the correct rate of classification of each classifier as the new weight of the classifier;
the third step: and selecting the category with the highest probability as an output result.
Third, commodity user evaluation emotion analysis based on deep multistage learning
Commodity user evaluation emotion analysis model based on deep multistage learning
The method comprises the steps of adopting Word2vec model training data and a vector matrix weighted by TF-IDF as input data, taking a 1D convolutional layer as a first layer of a model, adding downsampling layer compressed data, adding a dropped layer to the model in order to prevent overfitting, adding LSTM layer and threshold cycle layer to process data output by an upper layer, adding a full link layer to convert the vector dimension of each piece of evaluation data into one dimension, and finally adopting sigmoid as an activation function to classify the evaluation data according to emotional tendency.
(1) Processing Word2vec model data based on TF-IDF weight: the data is pre-trained, the data is converted into a vector form, a vector matrix is suitable for being used as the input of deep multistage learning, a Word2vec training Word vector is adopted in a model, a Word2vec feature representation algorithm based on TF-IDF feature weight is adopted to process a pre-processed data set, a weighted feature vector is obtained, and the obtained data is used as the input data of the model.
(2)1D convolutional layer: the first layer of the model adopts the 1D convolutional layer to carry out convolution operation on the input three-dimensional matrix and outputs a new three-dimensional matrix, the number of 1-dimensional convolution kernels in the 1D convolutional layer is 64, the length of the convolution kernels is 4, relu is adopted as an activation function of the layer, the relu transfers the gradient, and the gradient is still not greatly reduced after multiple times of reverse propagation.
(3) Down-sampling layer: and performing pooling treatment on the three-dimensional matrix output by the convolution layer by adopting a maximum down-sampling layer to obtain a new three-dimensional matrix.
(4) Layer dropped: the over-fitting problem is solved by adding the dropped layer, in the training process, the dropped layer randomly breaks off input neurons in a certain proportion when parameters are updated each time, the generation of data over-fitting is prevented, the dropped layer is adopted to process a three-dimensional matrix output by the down-sampling layer, and the processed three-dimensional matrix is output.
(5) LSTM layer: the gradual disappearance is avoided by adding a memory block to each node in the hidden layer, and the structure diagram of the memory block is shown in fig. 6: comprises a cell unit C, a forgetting gate f, an input gate i and an output gate o, three gates control the cell unit state, the specific information discarded is determined by the forgetting gate, and the gate reads x t And h t-1 Output f t F is a number between 0 and 1, and the output f at t is calculated by the following equation t
Figure BDA0003658426890000151
The next step is to determine the information to be updated and to determine the state of the deposited cellsInformation in (1), information input gate decides to update i t New candidate value for tanh layer
Figure BDA0003658426890000152
Add to state:
Figure BDA0003658426890000153
Figure BDA0003658426890000154
this step updates the state of the cell, state C t-1 Update to C t Old cell state C t-1 And f t Multiplying to obtain the retained information, and adding the information to be updated to obtain C t
Figure BDA0003658426890000155
Finally, the output information is determined, the output information is based on C t To C t Filtering to obtain output information, determining partial information to be output in a cell state by using a sigmoid layer, processing the cell state by using tanh, multiplying the result by the information output by the sigmoid layer, and determining output information h t
Figure BDA0003658426890000156
Figure BDA0003658426890000161
W is a weight matrix, sigma represents the operation of the sigmoid neural network layer,
Figure BDA0003658426890000162
multiplication of representative vectors, samplingAnd (3) using the storage block of each hidden node, overcoming the gradient disappearance problem by the LSTM, and processing the three-dimensional matrix output by the dropped layer by using the LSTM layer to obtain a new three-dimensional matrix.
(6) Threshold cycle layer: the forgetting and the input gate are combined into an updating gate, and the structure diagram is shown in fig. 7. The threshold cycle layer does not have a special memory unit, and each hidden node only retains h j Except for h j The threshold cycle unit comprises an alternative hidden node
Figure BDA0003658426890000163
A reset gate r and an update gate z, the reset gate r being calculated first at time j j At the computation of candidate hidden nodes
Figure BDA0003658426890000164
It is determined whether the previous hidden node is employed:
r j =g(W r x+U r h j-1 +b r ) Formula 13
Alternative hidden node
Figure BDA0003658426890000165
Calculated from the following formula:
Figure BDA0003658426890000166
computing and determining candidate hidden nodes
Figure BDA0003658426890000167
And previously hidden node h j-1 Weighted update gate z j And according to the updated door z j Updating hidden node h j
z j =g(W z x+U z h j-1 +b z ) Formula 15
Figure BDA0003658426890000168
Removing the memory cells of the LSTM memory block makes the model simpler, but still controls whether to use the previous long term memory or the new short term memory by updating and resetting the gates, with the output being very biased toward long term memory if the update gate is close to 1, and conversely, the output will exceed short term memory if both the update and reset gates are close to 0. And processing the three-dimensional matrix output by the LSTM layer by adopting a threshold cycle layer, and outputting a two-dimensional moment (x, z), wherein x refers to each piece of evaluation data, and z refers to a multi-dimensional vector representing each piece of evaluation data.
(7) And (3) full link layer: each node is linked with each node of the previous layer, the features output by the previous layer are integrated, the full link layer is used as the last layer and is also used as the output layer of the model, and the multi-dimensional feature vectors of the previous layer are compressed into one-dimensional vectors, namely a two-dimensional matrix (x, z) is output, wherein the multi-dimensional vectors representing each piece of evaluation data are converted into one-dimensional vectors in the full link layer.
(8) An active layer: processing input data by using an activation function, defining mapping of the activation function to neuron output, processing the neuron output by using the activation function and then outputting, introducing nonlinear factors by using the activation function, learning a smooth curve segmentation plane,
deep multistage learning commodity evaluation emotion analysis method
Inputting: a three-dimensional matrix (x, y, z), x representing each item of ratings data, y representing a word in each item of ratings data, and z representing a vector for each word;
and (3) outputting: evaluating the emotional tendency category R of the data;
step 1: training a Word vector by adopting a trained Word2vec model, and performing TF-IDF weighting processing on the Word vector to obtain a three-dimensional input matrix (x, y, z) of the model;
step 2: the first layer of the model adopts a 1D convolution layer to process an input three-dimensional matrix and output the processed three-dimensional matrix;
and 3, step 3: pooling a three-dimensional matrix output by the convolutional layer by adopting a maximum down-sampling layer to obtain a new three-dimensional matrix, and processing the pooled three-dimensional matrix by adopting a dropped layer to prevent data overfitting;
and 4, step 4: processing the three-dimensional matrix output by the dropped layer by adopting an LSTM layer to obtain a new three-dimensional matrix;
and 5, step 5: processing a three-dimensional matrix output by the LSTM layer by adopting a threshold cycle unit layer, and outputting a two-dimensional matrix;
and 6, step 6: and converting the vectors of sentences in the two-dimensional matrix from multiple dimensions into one dimension by adopting a full link layer.
And 7, step 7: and processing the two-dimensional matrix output by the full link layer by adopting a sigmoid function in the activation layer to obtain an emotion classification result of the commodity evaluation data.
Fourth, experimental results and analysis
The commodity user evaluation emotion analysis model based on deep multistage learning is analyzed through experiments, and in order to better compare the classification effect of the models, three existing models are selected for experimental analysis, namely a convolutional neural network emotion analysis model, an LSTM recursive neural network emotion analysis model and a FastText emotion analysis model. The experimental results of these models were then analyzed in comparison.
(one) Experimental setup
Experimental data were pre-processed to yield approximately 4000 evaluation data, of which positive and negative evaluations each account for half. A Word2vec model is trained by adopting a news data set published in a dog search laboratory, then a comment data set is trained by adopting the trained Word2vec model to obtain a Word vector of each Word in evaluation, then the weight of the words in the evaluation data set is obtained by adopting a TF-IDF algorithm to obtain a weighted Word vector, and finally a three-dimensional matrix (x, y, z) is constructed to be used as input data of the model, wherein x represents each evaluation data, y represents each Word in the evaluation, and z represents a multi-dimensional Word vector of each Word.
The effect of the test model is verified by adopting five-fold cross validation in the experiment, and the effect of the model is analyzed by adopting the accuracy, the F value, the ROC curve and the AUC value as the evaluation standard of the experiment.
(II) results of the experiment
Experiments are respectively carried out by adopting a convolutional neural network emotion classification based model, an LSTM recurrent neural network emotion classification based model, a FastText emotion classification based model and a multilayer neural network emotion classification based model, and the accuracy, the F value and the AUC value of each model are calculated, and the result is shown in figure 8.
(III) analysis of the results of the experiment
In the experiment, about 4000 evaluation data are subjected to sentiment analysis by adopting a plurality of models to obtain classification performance parameters of each model, the final model of the application is compared with the three existing models and the improved Word2vec model of the application in classification effect, and the differences of some detailed performance indexes of the plurality of models on the classification effect can be visually seen through the line graph shown in figure 9.
According to observation, the commodity user evaluation emotion classification effect based on deep multistage learning is better than that of a tfidf-Word2vec model based on aggregation learning in all aspects. The LSTM model accuracy and the F value in the existing model are the highest and respectively reach 0.8858 and 0.89, and the AUC is 0.94. Then FastText model, accuracy and F value are slightly lower than LSTM model, 0.8841 and 0.88 respectively, but AUC reaches 0.95 and is slightly higher than LSTM model. The final 1D convolution model with an accuracy of 0.8825 being the lowest of the three models, the F-value was 0.88 and 0.95 as AUC and FastText model, respectively. The tfidf-Word2vec model based on ensemble learning is the lowest in classification accuracy, F-value and AUC, 0.86 and 0.93, respectively. By comparison, the commodity user evaluation emotion analysis model based on deep multistage learning provided by the application is better than other four models in accuracy, F value and AUC value, wherein the accuracy reaches 0.9167, the F value is 0.91, and the AUC is 0.96.

Claims (9)

1. The E-commerce platform commodity user evaluation emotional tendency classification method is characterized in that a large amount of E-commerce platform commodity user evaluation data are calculated and analyzed to obtain the emotional tendency of a user to commodities: firstly, preprocessing evaluation data, obtaining the weight of each word by adopting a TF-IDF algorithm, weighting word vectors, then performing convergent learning on W2D2vec characteristics to improve a commodity user evaluation emotion analysis model, further optimizing to obtain a commodity user evaluation emotion analysis method based on deep multistage learning, and improving the classification performance of the commodity emotion analysis model;
p1-commodity user evaluation information preprocessing: removing duplication of evaluation data, including repeated data and corpus centralized repeated evaluation in single evaluation, removing the noise of the evaluation data, such as removing garbage evaluation information and invalid characters, and finally carrying out subjective and objective classification on the evaluation data, wherein the obtained subjective evaluation is used as a data set of the application experiment;
p2-aggregation learning W2D2vec feature improved commodity user evaluation emotion analysis, which comprises the following steps: processing subjective evaluation data by Word segmentation and stop words, training a Word2vec model to extract features, expressing the Word2vec features based on TF-IDF feature weight, and performing a voting-based aggregation learning model; training the pre-processed evaluation data by adopting a Word2vec model trained by a large amount of Chinese corpora to obtain a Word vector of evaluation information, weighting the Word vector by adopting a TF-IDF algorithm to obtain the importance degree of each Word in the text, and finally classifying by adopting a voting-based aggregation learning model
P3-commodity user evaluation emotion analysis based on deep multi-level learning: and (3) processing the input three-dimensional matrix by adopting a 1D convolution as a first layer of the model, then processing the input data of the previous layer by respectively adopting a maximum downsampling layer, a dropping layer, an LSTM layer and a threshold circulating layer, and finally determining the evaluated emotional tendency according to the result of an output layer.
2. The E-commerce platform commodity user evaluation emotional tendency classification method as claimed in claim 1, is characterized in that the deep multi-stage learning commodity evaluation emotional analysis method comprises the following steps:
inputting: a three-dimensional matrix (x, y, z), x representing each item of ratings data, y representing a word in each item of ratings data, and z representing a vector for each word;
and (3) outputting: evaluating the emotional tendency category R of the data;
step 1: training a Word vector by adopting a trained Word2vec model, and performing TF-IDF weighting processing on the Word vector to obtain a three-dimensional input matrix (x, y, z) of the model;
step 2: the first layer of the model adopts a 1D convolution layer to process an input three-dimensional matrix and output the processed three-dimensional matrix;
and 3, step 3: pooling a three-dimensional matrix output by the convolutional layer by adopting a maximum downsampling layer to obtain a new three-dimensional matrix, and processing the pooled three-dimensional matrix by adopting a dropping layer to prevent data overfitting;
and 4, step 4: processing the three-dimensional matrix output by the dropped layer by adopting an LSTM layer to obtain a new three-dimensional matrix;
and 5, step 5: processing a three-dimensional matrix output by the LSTM layer by adopting a threshold cycle unit layer, and outputting a two-dimensional matrix;
and 6, step 6: converting vectors of sentences in the two-dimensional matrix from multiple dimensions into one dimension by adopting a full link layer;
and 7, step 7: and processing the two-dimensional matrix output by the full link layer by adopting a sigmoid function in the activation layer to obtain an emotion classification result of the commodity evaluation data.
3. The e-commerce platform commodity user evaluation emotional tendency classification method as claimed in claim 1, wherein commodity user evaluation information is preprocessed: searching commodity user evaluation information on a commercial platform as a corpus for analysis, wherein the corpus comprises two types of data information of positive emotion and negative emotion;
the method comprises the following steps: evaluating data for duplication removal;
step two: denoising evaluation data: cleaning the evaluation data in the corpus set to remove invalid data, wherein the junk evaluation data are removed, non-Chinese corpora in the evaluation data are cleaned, and invalid characters in the evaluation data are cleaned;
step three: and (3) evaluating data subjective and objective classification: firstly, extracting correlation characteristics, then training corpora by adopting a machine learning algorithm to obtain a classification model, and finally classifying data; dividing the obtained data into training data and testing data, carrying out manual classification and labeling on the training data, labeling the training data into subjective evaluation data and objective evaluation data, then extracting various associated characteristics of the training data to form a characteristic vector, inputting the characteristic vector into a machine learning model for training to obtain a classifier, and classifying the testing corpus to obtain classified subjective evaluation data;
the emotional tendency of the user only exists in the subjective evaluation, and the subjective evaluation of the user is extracted from the data set.
4. The e-commerce platform commodity user evaluation emotional tendency classification method as claimed in claim 1, wherein the subjective evaluation data word segmentation and stop word processing: segmenting data by adopting a crust segmentation Python library, and converting positive and negative corpus segmentation words into a two-dimensional matrix form respectively, wherein each row is data obtained after evaluation data segmentation;
the method comprises the steps of obtaining a stop word bank by combining a Baidu stop word list and a Haugh stop word bank for duplication removal, storing matrixes of positive and negative evaluation data after stop words removal into pos _ review.
5. The e-commerce platform commodity user evaluation emotional tendency classification method as claimed in claim 1, wherein a Word2vec model is trained to extract features: the method comprises the steps that a Word2vec model is trained, wherein the Word2vec model is accurately trained on the basis of a large amount of Chinese corpora by adopting full-network news corpora data downloaded from a dog searching laboratory;
extracting content part data from dog searching news corpus data, integrating all data of all files into a Word2vec _ data.cvs file, storing the file locally, reading the Word2vec _ data.cvs file locally when a Word2vec model needs to be trained, training by adopting a skip-gram method to obtain a trained Word2vec model, storing the trained Word2vec model as a Word2vec _ data.model.bin file in a C language analyzable mode, converting subjective evaluation data into Word vectors according to the trained Word2vec model, obtaining the vector of each piece of evaluation data aiming at the whole piece of evaluation data when the evaluation data are subjected to emotion classification, adding the vectors of each Word in evaluation, averaging to obtain the vector of each piece of evaluation data, and taking the vector of each piece of evaluation data as the characteristic of the evaluation data.
6. The e-commerce platform commodity user evaluation emotional tendency classification method as claimed in claim 1, wherein the Word2vec feature representation based on the TF-IDF feature weight is as follows: calculating the weight of the word vector by adopting a TF-IDF algorithm, and performing weighting operation on the word vector;
there is an evaluation data set J, wherein J i (i ═ 1, 2.. times, m), we get the feature vector for each participle in each evaluation, then the n-dimensional feature vector set is represented as follows:
C={x 1 ,x 2 ,...,x n is }, i ∈ n formula 1
For the participle in each evaluation, firstly, calculating the word frequency TF of the participle in the evaluation, and then calculating the inverse document frequency IDF of the word in the whole evaluation set, wherein the calculation formula of the word frequency TF is as follows:
Figure FDA0003658426880000031
wherein, f (w, J) i ) Representing the total number of occurrences of the participle w in the evaluation,
Figure FDA0003658426880000036
the total number of the participles in the evaluation is shown, and the inverse document frequency IDF of the participle w is calculated as follows:
Figure FDA0003658426880000032
wherein m is the total number of evaluation data, y w In order to evaluate the evaluation number of w in the data set, in order to set a constant of 0.3 in formula 3 to ensure smoothness, in a certain evaluation, a constant is set to ensure that the denominator is not zero;
therefore, the feature weight is calculated as follows:
Figure FDA0003658426880000033
wherein, the first and the second end of the pipe are connected with each other,
Figure FDA0003658426880000034
carrying out normalization processing;
for evaluation set J i The feature vector of the middle evaluation data is expressed as follows:
Figure FDA0003658426880000035
wherein, c w Word vector, sum (J), representing a participle w i ) Representing the number of the evaluation participles;
and adopting vectors weighted by TF-IDF as features, and adopting SVC, SGD and naive Bayes as classifiers respectively to train the classifiers and classify test data.
7. The e-commerce platform commodity user evaluation emotional tendency classification method as claimed in claim 1, wherein the voting-based aggregation learning model is: the accuracy of a single model is improved through aggregation learning, a plurality of classification models are established by adopting an aggregation strategy based on voting, then the prediction result of each model is calculated, and finally the combined prediction is carried out by adding weights to the prediction results of multiple models;
inputting: word2vec feature vector list [ [ vec ] based on TF-IDF feature weight 1 ],[vec 2 ],…,[vec m ]];
And (3) outputting: emotional tendency category R of the evaluation data:
Figure FDA0003658426880000041
q i represents the weight of the ith classifier,
Figure FDA0003658426880000042
refers to the probability that the ith classifier outputs an aggressive class,
Figure FDA0003658426880000043
the probability that the ith classifier outputs a negative class;
the first step is as follows: initializing the weight of each classifier, q i 1/N, i is 1,2, …, and N is the total number of classifiers;
the second step is that: the result of the prediction by the classifier 1,
Figure FDA0003658426880000044
the result of the prediction by the classifier 2,
Figure FDA0003658426880000045
……
the result of the prediction by the classifier N,
Figure FDA0003658426880000046
updating the weight of each classifier, and taking the correct rate of classification of each classifier as the new weight of the classifier;
the third step: and selecting the category with the highest probability as an output result.
8. The E-commerce platform commodity user evaluation emotional tendency classification method as claimed in claim 1, wherein the commodity user evaluation emotional analysis based on deep multi-level learning is as follows: the method comprises the steps of adopting Word2vec model training data and a vector matrix weighted by TF-IDF as input data, taking a 1D convolutional layer as a first layer of a model, adding downsampling layer compression data, adding a dropped layer to the model to prevent overfitting, adding an LSTM layer and a threshold cycle layer to process data output by an upper layer, adding a full link layer to convert the vector dimension of each piece of evaluation data into one dimension, and finally adopting sigmoid as an activation function to classify the evaluation data according to emotional tendency.
9. The E-commerce platform commodity user evaluation emotional tendency classification method as claimed in claim 1, wherein the commodity user evaluation emotional analysis model based on deep multi-level learning is as follows:
(1) processing Word2vec model data based on TF-IDF weight: the data is converted into a vector form through pre-training the data, a vector matrix is suitable for being used as the input of deep multi-stage learning, a Word2vec training Word vector is adopted in a model, a Word2vec feature representation algorithm based on TF-IDF feature weight is adopted to process a pre-processed data set, a weighted feature vector is obtained, and the obtained data is used as the input data of the model;
(2)1D convolutional layer: the first layer of the model adopts a 1D convolutional layer to carry out convolution operation on an input three-dimensional matrix and outputs a new three-dimensional matrix, the number of 1-dimensional convolution kernels in the 1D convolutional layer is 64, the length of the convolution kernels is 4, relu is adopted as an activation function of the layer, the relu transfers gradient, and the gradient is not greatly reduced after multiple times of reverse propagation;
(3) down-sampling layer: performing pooling treatment on the three-dimensional matrix output by the convolution layer by adopting a maximum down-sampling layer to obtain a new three-dimensional matrix;
(4) a layer of shedding: the over-fitting problem is solved by adding a dropped layer, in the training process, the dropped layer randomly disconnects a certain proportion of input neurons when parameters are updated each time, the generation of data over-fitting is prevented, the dropped layer is adopted to process a three-dimensional matrix output by the down-sampling layer, and the processed three-dimensional matrix is output;
(5) LSTM layer: avoiding gradual disappearance by adding one memory block to each node in the hidden layer, structure of memory blocks: comprises a cell unit C, a forgetting gate f, an input gate i and an output gate o, wherein the states of the cell unit are controlled by three gates, the specific information discarded is determined by the forgetting gate, and the gate reads x t And h t-1 Output f t F is a number between 0 and 1, and the output f at t is calculated by the following equation t
Figure FDA0003658426880000051
The next step is to determine the information to be updated, to determine the information stored in the cell state, and to enter the portal to determine the updated information i t New candidate value for tanh layer
Figure FDA0003658426880000052
Add to state:
Figure FDA0003658426880000053
Figure FDA0003658426880000054
this step updates the state of the cell, state C t-1 Update to C t Old cell state C t-1 And f t Multiplying to obtain the retained information, and adding the information to be updated to obtain C t
Figure FDA0003658426880000055
Finally, the output information is determined, the output information is based on C t To C, to t Filtering to obtain output information, determining partial information to be output in a cell state by using a sigmoid layer, processing the cell state by using tanh, multiplying the result by the information output by the sigmoid layer, and determining output information h t
Figure FDA0003658426880000056
Figure FDA0003658426880000057
W is a weight matrix, sigma represents the operation of the sigmoid neural network layer,
Figure FDA0003658426880000058
representing vector multiplication operation, adopting a storage block of each hidden node, overcoming the gradient disappearance problem by using an LSTM layer, and processing a three-dimensional matrix output by a dropped layer by using the LSTM layer to obtain a new three-dimensional matrix;
(6) threshold cycle layer: the forgetting gates and the input gate are combined into an updating gate, the threshold loop layer does not have a special memory unit, and each hidden node only retains h j Except for h j The threshold cycle unit comprises an alternative hidden node
Figure FDA0003658426880000059
A reset gate r and an update gate z, the reset gate r being calculated first at time j j At the computation of candidate hidden nodes
Figure FDA0003658426880000061
It is determined whether the previous hidden node is employed:
r j =g(W r x+U r h j-1 +b r ) Formula 13
Alternative hidden node
Figure FDA0003658426880000062
Calculated from the following formula:
Figure FDA0003658426880000063
computing and determining candidate hidden nodes
Figure FDA0003658426880000064
And previous hidden node h j-1 Weighted update gate z j And according to the updated door z j Updating hidden node h j
z j =g(W z x+U z h j-1 +b z ) Formula 15
Figure FDA0003658426880000065
Removing the memory unit of the LSTM memory block, controlling whether to adopt a previous long-term memory or a new short-term memory through an updating gate and a resetting gate, if the updating gate is close to 1, outputting the memory to be very biased to the long-term memory, and if the updating gate and the resetting gate are both close to 0, outputting the memory to exceed the short-term memory, processing a three-dimensional matrix output by the LSTM layer by adopting a threshold cycle layer, and outputting a two-dimensional moment (x, z), wherein x refers to each piece of evaluation data, and z refers to a multi-dimensional vector representing each piece of evaluation data;
(7) a full link layer: each node is linked with each node of the previous layer, the characteristics output by the previous layer are integrated, the full link layer is used as the last layer and is also used as the output layer of the model, and the multi-dimensional characteristic vector of the previous layer is compressed into a one-dimensional vector, namely a two-dimensional matrix (x, z) is output, wherein the multi-dimensional vector representing each piece of evaluation data is converted into a one-dimensional vector in the full link layer;
(8) an active layer: the input data is processed by adopting an activation function, the activation function defines the mapping of the output of the neuron, the output of the neuron is processed by the activation function and then output, and the activation function is adopted to introduce a nonlinear factor and learn a smooth curve segmentation plane.
CN202210566701.6A 2022-05-24 2022-05-24 E-commerce platform commodity user evaluation emotional tendency classification method Pending CN114942974A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210566701.6A CN114942974A (en) 2022-05-24 2022-05-24 E-commerce platform commodity user evaluation emotional tendency classification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210566701.6A CN114942974A (en) 2022-05-24 2022-05-24 E-commerce platform commodity user evaluation emotional tendency classification method

Publications (1)

Publication Number Publication Date
CN114942974A true CN114942974A (en) 2022-08-26

Family

ID=82908302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210566701.6A Pending CN114942974A (en) 2022-05-24 2022-05-24 E-commerce platform commodity user evaluation emotional tendency classification method

Country Status (1)

Country Link
CN (1) CN114942974A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116340520A (en) * 2023-04-11 2023-06-27 重庆邮电大学 E-commerce comment emotion classification method
CN116957740A (en) * 2023-08-01 2023-10-27 哈尔滨商业大学 Agricultural product recommendation system based on word characteristics

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116340520A (en) * 2023-04-11 2023-06-27 重庆邮电大学 E-commerce comment emotion classification method
CN116957740A (en) * 2023-08-01 2023-10-27 哈尔滨商业大学 Agricultural product recommendation system based on word characteristics
CN116957740B (en) * 2023-08-01 2024-01-05 哈尔滨商业大学 Agricultural product recommendation system based on word characteristics

Similar Documents

Publication Publication Date Title
CN108399158B (en) Attribute emotion classification method based on dependency tree and attention mechanism
CN111222332B (en) Commodity recommendation method combining attention network and user emotion
Alharbi et al. Evaluation of sentiment analysis via word embedding and RNN variants for Amazon online reviews
CN110472042B (en) Fine-grained emotion classification method
CN112364638B (en) Personality identification method based on social text
CN110502626B (en) Aspect level emotion analysis method based on convolutional neural network
CN107688870B (en) Text stream input-based hierarchical factor visualization analysis method and device for deep neural network
CN110929034A (en) Commodity comment fine-grained emotion classification method based on improved LSTM
CN112884551B (en) Commodity recommendation method based on neighbor users and comment information
CN114942974A (en) E-commerce platform commodity user evaluation emotional tendency classification method
CN112070543B (en) Method for detecting comment quality in E-commerce website
CN112861541A (en) Commodity comment sentiment analysis method based on multi-feature fusion
CN111259140A (en) False comment detection method based on LSTM multi-entity feature fusion
CN112905739A (en) False comment detection model training method, detection method and electronic equipment
CN115688024A (en) Network abnormal user prediction method based on user content characteristics and behavior characteristics
CN114911945A (en) Knowledge graph-based multi-value chain data management auxiliary decision model construction method
CN111708865B (en) Technology forecasting and patent early warning analysis method based on improved XGboost algorithm
CN116956228A (en) Text mining method for technical transaction platform
Sheng et al. A paper quality and comment consistency detection model based on feature dimensionality reduction
CN112950019B (en) Electricity selling company evaluation emotion classification method based on joint attention mechanism
CN111666410B (en) Emotion classification method and system for commodity user comment text
CN113111257A (en) Collaborative filtering-based recommendation method for fusing multi-source heterogeneous information
Shanthini et al. Advanced Data Mining Enabled Robust Sentiment Analysis on E-Commerce Product Reviews and Recommendation Model
Urkude et al. Comparative analysis on machine learning techniques: a case study on Amazon product
Gupta et al. Food Review Analysis and Sentiment Prediction using Machine Learning Models

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination