CN112732921A - False user comment detection method and system - Google Patents

False user comment detection method and system Download PDF

Info

Publication number
CN112732921A
CN112732921A CN202110070347.3A CN202110070347A CN112732921A CN 112732921 A CN112732921 A CN 112732921A CN 202110070347 A CN202110070347 A CN 202110070347A CN 112732921 A CN112732921 A CN 112732921A
Authority
CN
China
Prior art keywords
comment
vector
comments
representing
word
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.)
Granted
Application number
CN202110070347.3A
Other languages
Chinese (zh)
Other versions
CN112732921B (en
Inventor
陈羽中
徐闽樟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuzhou University
Original Assignee
Fuzhou University
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 Fuzhou University filed Critical Fuzhou University
Priority to CN202110070347.3A priority Critical patent/CN112732921B/en
Publication of CN112732921A publication Critical patent/CN112732921A/en
Application granted granted Critical
Publication of CN112732921B publication Critical patent/CN112732921B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/35Clustering; Classification
    • G06F16/353Clustering; Classification into predefined classes
    • 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

Abstract

The invention provides a false user comment detection method and a false user comment detection system, which comprise the following steps: collecting product comments of users and subject texts related to the comments, and establishing a user comment data set; using user comment data setsSPre-training a false user comment detection model, wherein the model consists of a text generator G, a discriminator D and a classifier C; using user comment data setsSCarrying out countermeasure training on the false user comment detection model; and inputting the user comment and the subject into a classifier of the false user comment detection model, and outputting a detection result of the user comment, namely the user comment is a false comment or a real comment. The method can obtain a detection result with higher accuracy.

Description

False user comment detection method and system
Technical Field
The invention relates to the technical field of natural language processing, in particular to a false user comment detection method and system.
Background
The false user comment refers to unreal comment for intentionally promoting or defatting the reputation of a commodity and a public praise, and the detection of false user comment is a basic task of a text classification task in natural language processing, and the basic goal is to analyze the semantic relationship of the text classification task according to the related information of the user comment and detect the false. With the rapid development and the gradual maturity of e-commerce platforms, the problem of false user comment is more and more prominent, and many domestic and foreign researchers begin to work on the problem.
Early studies of false user comment detection typically employed traditional supervised learning algorithms, which focused on extracting features by methods such as N-gram, LDA, etc. to train classifiers. These methods require complicated feature engineering to extract text features, which is cumbersome. Recently, deep-learning Neural Network models, such as Convolutional Neural Network (CNN) and Recurrent Neural Network (RNN), have shown the most advanced performance on this task without any laborious feature engineering. LiL, the like, uses a convolutional neural network to perform semantic representation on a document level to perform false comment classification, and adds an attention mechanism into a CNN, uses KL divergence as weight calculation, calculates the importance of each word in a sentence, further obtains the importance weight of the comment sentence, and combines the importance weight of the comment sentence with a comment sentence vector after weighting into a document vector for classification; zhao et al propose to embed word order features in the convolutional layer and the pooling layer of CNN to capture semantic features related to the word order of comments, making CNN more suitable for solving the problem of false comment detection; wang et al propose a CNN model based on attention mechanism, which performs feature extraction through CNN, and analyzes two dimensions of semantics and behaviors of comments by combining the attention mechanism, so that the model learns to classify from the perspective of semantics or behaviors, even by referring to the two angles at the same time; ren et al use convolutional neural networks and combine with recurrent neural networks to build models to identify false comments, where convolutional neural networks are used to learn comment sentence expressions, then gated recurrent neural networks with attention mechanisms are used to combine them, modeling is performed on dialog information and document vectors are generated, and finally, the document expression forms are directly used for false comment identification; yuan et al combines with reviewers and products to perform feature extraction and false comment classification, provides a self-attention-based model, obtains semantic representation by performing self-attention coding on comment texts, obtains reviewer-related representation and product-related representation by utilizing vector decomposition, and performs classification after combining features; li et al propose a false comment detection based on Graph Convolutional neural Network (GCN), which uses an heteromorphic Graph and a homographic Graph to acquire local information and global information, extracts key features from complex Graph data structure information and multi-modal attribute information through aggregation, and performs false comment detection by combining the key features to adapt to more varied comment environments; deng et al propose a self-coding model based on PU learning, construct a feature vector based on the input comment-related metadata, perform coding learning on the feature vector through the self-coding model, calculate clustering distance by using a K-means method to determine categories, and perform PU learning; the model FakeGAN for introducing the GAN into a false comment detection task for the first time is proposed by Aghakhani and the like, a small part of marking data is used for generating a GAN sample by adopting a SeqGAN-based framework, and a large amount of marking data generated by the GAN are utilized to meet the huge sample requirement of a classified neural network, so that a good result is obtained; stantong et al propose SpamGAN, which is improved on the basis of FakeGAN, to reduce the amount of calculation and optimize the reward function, thereby achieving performance improvement.
Although the introduction of deep learning greatly improves the performance of the false comment detection model, the false comment has certain concealment and confusion, the number of comments is large, the difficulty of manual detection is high, the marked data set is deficient, the existing deep learning model is easy to over-fit, so that the model still has a large optimization space, meanwhile, the identification dimensionality of the false comment detection is only a comment text, the angle is too single, and the model detection performance is easily interfered by outlier noise.
Disclosure of Invention
In view of this, the present invention provides a method and a system for detecting false user comments, where the model detection is not easily interfered by outlier noise, and the obtained result is more accurate.
The invention is realized by adopting the following scheme: a false user comment detection method specifically comprises the following steps:
step A: collecting product comments of users and subject texts related to the comments, and establishing a user comment data set S-SL∪SUIn which S isLRepresenting a marked user comment data set, SURepresenting an unlabeled user comment dataset;
and B: pre-training a false user comment detection model by using a user comment data set S, wherein the model consists of a text generator G, a discriminator D and a classifier C;
and C: carrying out countermeasure training on the false user comment detection model by using the user comment data set S;
step D: and inputting the user comment and the subject into a classifier of the false user comment detection model, and outputting a detection result of the user comment, namely the user comment is a false comment or a real comment.
Further, the step B specifically includes the steps of:
step B1: pre-training a text generator by using a user comment data set S;
step B2: generating comments by using the text generator obtained in the step B1, and using the comments together with the comments in the user comment data set S to pre-train the identifier and the evaluator thereof;
step B3: the classifier and its evaluator are pre-trained using a user review data set S.
Further, step B1 specifically includes the following steps:
step B11: traversing the comment training set S, and comparing SLRepresents S as (r, t, c), SUEach unlabeled training sample in (a) is represented as s ═ r, t, where r represents the comment text, t represents the subject text to which the comment relates, and c is a category label of whether the comment is false or not; segmenting the comment r and the subject t in the training sample s and removing stop words, then setting the texts of the comment r and the subject t to be fixed lengths N and M respectively, and if the number of words in the comment r and the subject t after segmentation and removal of the stop words is smaller than the fixed length value, using the supplementary symbols<PAD>Make up, greater than stationaryThe length value is cut off;
after the comment r is subjected to word segmentation and stop word removal and is set to be a fixed length, the comment r is represented as:
Figure BDA0002905791190000031
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000032
the method comprises the following steps that i is 1,2, RN is the ith word in a text after a comment r is subjected to word segmentation and stop word removal, and the fixed length is set, i is 1,2, and RN is not more than N;
after the topic t is subjected to word segmentation and stop word removal and is set to be a fixed length, the topic t is represented as follows:
Figure BDA0002905791190000033
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000034
the method comprises the following steps that i is 1,2, wherein TM is a subject t, words are segmented, stop words are removed, and the i is the ith word in a text with a fixed length, i is 1,2, TM is less than or equal to M;
step B12: coding the comment text r and the subject text t processed in the step B11 to respectively obtain the representation vectors v of the comment and the subjectrAnd vt
Wherein v isrExpressed as:
Figure BDA0002905791190000041
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000042
as the ith word of comment text
Figure BDA0002905791190000043
Corresponding word vectors are obtained by pre-training a word vector matrix
Figure BDA0002905791190000044
The method includes searching, wherein i is 1,2, N, d represents the dimension of a word vector, and | V | is the number of words in a dictionary;
wherein v istExpressed as:
Figure BDA0002905791190000045
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000046
as the ith word of the subject text
Figure BDA0002905791190000047
Corresponding word vectors are obtained by pre-training a word vector matrix
Figure BDA0002905791190000048
Where, i ═ 1, 2., M, d denote the dimension of the word vector, | V | is the number of words in the dictionary;
step B13: characterization vector v for a topictExtracting the characterization vector of the trunk information of the theme by adopting maximum pooling after linear transformation and activation function
Figure BDA0002905791190000049
Figure BDA00029057911900000410
Wherein the content of the first and second substances,
Figure BDA00029057911900000411
is a characterization vector of the stem information of the topic,
Figure BDA00029057911900000412
is a weight valueMatrix, representing a matrix dot product operation,
Figure BDA00029057911900000413
is a bias term;
step B14: will form vrVector sequence of
Figure BDA00029057911900000414
Sequentially inputting a multi-head attention unit of the fusion subject in the generator, and inputting the ith time step as
Figure BDA00029057911900000415
At each time step will
Figure BDA00029057911900000416
And
Figure BDA00029057911900000417
combining the comments with the topic information through a multi-head attention mechanism to obtain a feature vector of the fusion topic of each time step and random noise
Figure BDA00029057911900000418
Splicing to obtain the vector sequence { x1,x2,...,xi,...,xN};
Step B15: the vector sequence { x ] obtained in the step B141,x2,...,xi,...,xNInputting bidirectional GRU, at the ith time step, outputting hidden layer state vector of bidirectional GRU
Figure BDA00029057911900000419
Figure BDA0002905791190000051
1, 2.. N, for the reverse layer of a bidirectional GRU, the output hidden layer state vector is
Figure BDA0002905791190000052
i=1,2,..N, D is an activation function; updating each weight matrix of GRU by adopting spectral normalization at each time step, and using Wi GA certain weight matrix representing GRU at the ith time step is obtained to obtain Wi GMaximum singular value of
Figure BDA0002905791190000053
To Wi GPerforming spectrum normalization to obtain a weight matrix of GRU at the (i + 1) th time step
Figure BDA0002905791190000054
Is represented as follows:
Figure BDA0002905791190000055
repeating the steps to obtain a forward hidden layer state vector sequence
Figure BDA0002905791190000056
And reverse hidden layer state vector sequence
Figure BDA0002905791190000057
Step B16: connecting the forward hidden layer state vector with the reverse hidden layer state vector to obtain a comment characterization vector H of the fusion subject, wherein H is [ H ═ H1,...,hi,...,hN]T
Figure BDA0002905791190000058
hiAs forward hidden layer state vectors
Figure BDA0002905791190000059
And reverse hidden layer state vector
Figure BDA00029057911900000510
The connection of (1);
step B17: linearly transforming the comment characterization vector H of the fusion subject, inputting softmax to obtain a word probability distribution matrix B, and obtaining word probability distribution matrix according to word probability distribution matrixThe matrix B carries out random sampling to generate a word sequence y of the comment text which is { y ═ y1,y2,...,yi,...,yN};
Step B18: the text generator G is trained according to the following objective loss function:
Figure BDA00029057911900000511
wherein the content of the first and second substances,
Figure BDA00029057911900000512
representing the conditional probability, theta, calculated by the generator at the target word positiongTo generate a set of parameters, c is the class label and z is random noise.
Further, the step B14 is specifically:
first, with XiInput representing the ith time step
Figure BDA00029057911900000513
To XiIn that
Figure BDA00029057911900000514
Is subjected to orthogonal decomposition operation in the vector direction to obtain XiThe information about the subject part and other information in (1) respectively correspond to the parallel vectors
Figure BDA00029057911900000515
And a vertical vector
Figure BDA0002905791190000061
Expressed as:
Figure BDA0002905791190000062
Figure BDA0002905791190000063
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000064
is a parallel vector, and is a parallel vector,
Figure BDA0002905791190000065
is a vertical vector, and is,
Figure BDA0002905791190000066
representing a vector
Figure BDA0002905791190000067
Transposing;
then, information screening is carried out by using a multi-head attention mechanism: for each attention head, the pair of parallel vectors
Figure BDA0002905791190000068
Is subjected to linear transformation to obtain
Figure BDA0002905791190000069
As Q in a multi-head attention mechanism; to pair
Figure BDA00029057911900000610
Is subjected to linear transformation to obtain
Figure BDA00029057911900000611
And
Figure BDA00029057911900000612
as K and V in the multi-head attention mechanism, respectively, are expressed as:
Figure BDA00029057911900000613
Figure BDA00029057911900000614
Figure BDA00029057911900000615
in the formula (I), the compound is shown in the specification,
Figure BDA00029057911900000616
respectively are weight matrixes to be trained;
then, will
Figure BDA00029057911900000617
Inputting into a multi-head attention unit to perform multi-head attention calculation, and expressing as follows:
Figure BDA00029057911900000618
in the formula (I), the compound is shown in the specification,
Figure BDA00029057911900000619
the output vector of the multi-head attention mechanism in the parallel direction is shown, M pieces A show the multi-head attention mechanism, H shows the total number of the attention heads,
Figure BDA00029057911900000620
representing the result of the calculation of the ith head of attention,
Figure BDA00029057911900000621
is a weight matrix to be trained;
after that, the function of softmax is used to control the operation of the computer
Figure BDA00029057911900000622
Mapping between 0 and 1 to obtain parallel vector
Figure BDA00029057911900000623
Information gate vector in parallel direction after multi-head attention mechanism
Figure BDA00029057911900000624
Expressed as:
Figure BDA00029057911900000625
for vertical vector
Figure BDA00029057911900000626
Is subjected to linear transformation to obtain
Figure BDA00029057911900000627
As Q in a multi-head attention mechanism, pair
Figure BDA00029057911900000628
Is subjected to linear transformation to obtain
Figure BDA00029057911900000629
And
Figure BDA00029057911900000630
as K and V in the attention mechanism, respectively, will
Figure BDA00029057911900000631
Figure BDA0002905791190000071
Inputting the data into a multi-head attention unit to perform multi-head attention calculation to obtain
Figure BDA0002905791190000072
And obtaining a vertical vector through a softmax function
Figure BDA0002905791190000073
Information gate vector in vertical direction after multi-head attention mechanism
Figure BDA0002905791190000074
By using
Figure BDA0002905791190000075
And
Figure BDA0002905791190000076
two are providedPair of gate vectors XiScreening information to obtain the characterization vector of the fusion subject of the ith time step
Figure BDA0002905791190000077
Expressed as:
Figure BDA0002905791190000078
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000079
representing the weight matrices in the parallel and vertical directions respectively,
Figure BDA00029057911900000710
representing the input bias terms in the parallel and vertical directions, respectively, representing the matrix dot product operation;
then will be
Figure BDA00029057911900000711
And random noise
Figure BDA00029057911900000712
Splicing to obtain the output vector x of the ith time stepiExpressed as:
Figure BDA00029057911900000713
in the formula (I), the compound is shown in the specification,
Figure BDA00029057911900000714
(ii) a It is shown that the connection operation is performed,
Figure BDA00029057911900000715
random noise, expressed as:
Figure BDA00029057911900000716
in the formula (I), the compound is shown in the specification,
Figure BDA00029057911900000717
random distribution P from a standard-Gauss distributionzObtained by intermediate sampling, PzRandom distribution P conforming to a standard Gaussian distribution and class labels c from conforming to a standard Bernoulli distributioncAnd c is obtained, wherein the normal comment is represented when c is 1, and the false comment is represented when c is 0.
Further, step B2 specifically includes the following steps:
step B21: after the pre-training of the generator G is completed, the generator G is utilized to generate a comment data set SGFrom SGAnd randomly extracting marked comments and unmarked comments from the S to form a pre-training set S of the discriminator DD,SDEach training sample in (a) is denoted as s ═ (r, c)D) Where r denotes comment text, cDWhether the comment text is a category label generated by the generator or not is shown, SDInputting the training sample in (1) into a Transformer-based discriminator D for pre-training;
step B22: to SDAccording to the step B11, obtaining an initial characterization vector v of the comment text r for each training sample in the comment text rrAdding position vector to obtain position sensing characterization vector
Figure BDA0002905791190000081
Expressed as:
Figure BDA0002905791190000082
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000083
for the position vector, by consulting the position vector matrix Ep∈Rd×NObtained, expressed as:
Figure BDA0002905791190000084
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000085
representing a position coding vector corresponding to the ith word, d representing the dimension of the position vector, wherein the dimension of the position vector is the same as the dimension of the word vector, and N is the fixed maximum length of the comment text;
step B23: will be provided with
Figure BDA0002905791190000086
Inputting the feature vector of the comment into a Transformer network of a discriminator D
Figure BDA0002905791190000087
Step B24: to ODAfter linear transformation, softmax is input, and the class probability distribution Q of the discriminator D on all the words of the comment is calculatedD
QD=softmax(ODWD+bD);
In the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000088
representing the actual class probability distribution of comments over all terms, QDThe ith row in the figure represents the actual class probability distribution of the discriminator at the ith word,
Figure BDA0002905791190000089
as a weight matrix, the weight matrix is,
Figure BDA00029057911900000810
is a bias term;
from a review of the class probability distribution Q over all termsDGet the entire sentence about category cDAverage class probability distribution of discriminator:
Figure BDA00029057911900000811
in the formula (I), the compound is shown in the specification,
Figure BDA00029057911900000812
representing the conditional probability of the class, θ, calculated by the discriminator on the commentsdParameter set, Q, representing discriminator DD iRepresenting the actual class probability distribution of the discriminator on the ith term;
step B25: token vector O of the commentDInput evaluator DcriticThe evaluator consists of a fully connected layer, ODAfter linear transformation and softmax, obtaining the category probability distribution V of the commentsD
Figure BDA00029057911900000813
In the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000091
expressing the probability distribution of the target category of the comments on all the terms, and evaluating the probability distribution Q of the actual category by taking the probability distribution as a standardD,VDRow i in the figure shows the target class probability distribution of the discriminator on the ith term,
Figure BDA0002905791190000092
is an evaluator weight matrix for the discriminator,
Figure BDA0002905791190000093
is a bias term;
step B26: using cross entropy losses
Figure BDA0002905791190000094
Training the discriminator by using the loss of mean square error
Figure BDA0002905791190000095
To evaluator DcriticTraining is carried out;
wherein the content of the first and second substances,
Figure BDA0002905791190000096
expressed as:
Figure BDA0002905791190000097
Figure BDA0002905791190000098
Figure BDA0002905791190000099
in the formula (I), the compound is shown in the specification,
Figure BDA00029057911900000910
represents a pair SDThe loss of classification of the sample extracted from S,
Figure BDA00029057911900000911
represents a pair SDIs extracted from SGIs lost in the classification of the sample(s),
Figure BDA00029057911900000912
indicating that a desired calculation of the comments upsampled on the dataset S resulted in a category cDThe expected value of the cross-entropy loss of (c),
Figure BDA00029057911900000913
indicating that a desired calculation of a generator-generated comment resulted with respect to category cD(ii) a cross entropy loss expectation;
wherein the content of the first and second substances,
Figure BDA00029057911900000914
expressed as:
Figure BDA00029057911900000915
in the formula (I), the compound is shown in the specification,
Figure BDA00029057911900000916
expected value of mean square error loss, V, representing the target class probability distribution and actual class probability distribution of the evaluatorD iRepresenting the target class probability distribution of the discriminator on the ith term.
Further, step B3 specifically includes the following steps:
step B31: using annotated data sets SLPre-training the classifier, and performing SLS ═ r, t, c), the process steps of B11-B12 are followed to obtain a comment characterization vector vrAnd a topic characterization vector vtObtaining the main information representation of the subject according to the processing step of B13
Figure BDA00029057911900000919
Step B32: according to the processing procedure of B14, the structure vrThe vector sequence of (a) is input into a multi-head attention unit of the fusion topic in turn, and
Figure BDA00029057911900000917
combining, fusing the comments and the topics through a multi-head attention mechanism to obtain a fusion vector of each time step, and fusing the fusion vector of each time step with random noise
Figure BDA00029057911900000918
Splicing to obtain the comment characterization vector of the fusion subject
Figure BDA0002905791190000101
Wherein
Figure BDA0002905791190000102
Representing the feature vector of the ith word in the comment feature vector of the fusion subject; query location vector matrix Ep∈Rd×NObtaining a position vector
Figure BDA0002905791190000103
And
Figure BDA0002905791190000104
adding to obtain the comment characterization vector of position perception
Figure BDA0002905791190000105
Inputting the words into a Transformer network to obtain a representation matrix of all the words in the comment
Figure BDA0002905791190000106
Step B33: to OCAfter linear transformation, softmax is input, and the class probability distribution of all the words of the comment by the classifier is calculated
Figure BDA0002905791190000107
QC=softmax(OCWC+bC);
In the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000108
as a weight matrix, the weight matrix is,
Figure BDA0002905791190000109
is a bias term;
according to QCGet the average class probability distribution of the classifier for the whole sentence with respect to class c:
Figure BDA00029057911900001010
in the formula, QC iRepresenting the probability distribution of the actual category of the comment on the ith word,
Figure BDA00029057911900001011
representing the category conditional probability obtained by the evaluator through calculation on the comments;
using cross entropy losses
Figure BDA00029057911900001012
To the classifierThe pre-training is carried out in advance,
Figure BDA00029057911900001013
the calculation formula of (a) is as follows:
Figure BDA00029057911900001014
in the formula (I), the compound is shown in the specification,
Figure BDA00029057911900001015
representing pairs of slave data sets SLThe expected calculation of the mid-sampled samples yields the expected value of cross-entropy loss for class c,
Figure BDA00029057911900001016
representing the conditional probability of the class, θ, calculated by the discriminator on the commentscRepresenting classifier parameters;
step B34: token vector O of the commentCInput evaluator CcriticThe evaluator consists of a fully connected layer, OCAfter linear transformation and softmax, obtaining target distribution V of actual class probability distributionCExpressed as:
Figure BDA00029057911900001017
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000111
is the evaluator weight matrix of the classifier,
Figure BDA0002905791190000112
is a bias term;
step B35: using mean square error loss
Figure BDA0002905791190000113
Evaluator C for classifiercriticTraining is carried out:
Figure BDA0002905791190000114
in the formula, VC iRepresenting a target category probability distribution of the comment on the ith word for category c.
Further, the step C specifically includes the steps of:
step C1: traversing each training sample in the data set S, and obtaining a comment characterization vector v for each training sample according to the processing steps of B11-B12rAnd a topic characterization vector vtObtaining the main information representation of the subject according to the processing step of B13
Figure BDA0002905791190000115
Step C2: for each training sample in the data set S, the generator is used to randomly distribute PzAnd randomly distributing PcRespectively sampling to obtain random noise z and class c to obtain noise containing class information
Figure BDA0002905791190000116
Expressed as:
Figure BDA0002905791190000117
step C3: according to the processing procedure of B14, the structure vrThe vector sequence of (a) is input into a multi-head attention unit of the fusion topic in turn, and
Figure BDA0002905791190000118
combining, fusing the comments and the topics through a multi-head attention mechanism to obtain a fusion vector of each time step, and fusing the fusion vector of each time step with random noise
Figure BDA0002905791190000119
Splicing to obtain the comment characterization vector of the fusion subject
Figure BDA00029057911900001110
Wherein in
Figure BDA00029057911900001111
A token vector representing the ith word in the comment token vector of the fused topic, wherein the superscript FGRepresenting a multi-headed attention calculation of a fusion topic to the generator input; then generating a comment y according to the processing steps of B15-B17;
step C4: inputting the y and the corresponding training sample in the data set S into a discriminator and a classifier together, classifying the comment classes respectively, and adopting a loss function for the discriminator
Figure BDA00029057911900001112
Updating parameters, and applying a loss function of countermeasure training to the classifier
Figure BDA00029057911900001113
Updating is carried out;
wherein the content of the first and second substances,
Figure BDA00029057911900001114
expressed as:
Figure BDA00029057911900001115
Figure BDA0002905791190000121
Figure BDA0002905791190000122
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000123
is the cross entropy of the classifier' S predicted classification score on the labeled samples of the dataset S;
Figure BDA0002905791190000124
is the loss of the classifier's classification prediction on the comments generated by the generator, where
Figure BDA0002905791190000125
Expressing the Shannon entropy, wherein alpha is a balance parameter used for balancing the influence of the Shannon entropy;
step C5: and training the generator in a reinforcement learning mode.
Further, step C5 specifically includes:
the process of generating comments by the generator is regarded as a sequence decision process, the generator is used as an agent or an actor in reinforcement learning, and the generated term sequence { y is used in the process of generating comments1,y2,...,yi-1The next word y to be generated is regarded as the current state of the agentiActions taken for the agent, the actions taken by the agent being based on policy distribution
Figure BDA0002905791190000126
And selecting, wherein the strategy distribution gives the probability of each behavior by calculating the expected reward of each behavior, the agent selects the corresponding behavior according to the probability, and the generator agent learns to maximize the expected reward, namely:
Figure BDA0002905791190000127
wherein the content of the first and second substances,
Figure BDA0002905791190000128
wherein R (r) represents the reward of the whole comment sample, and is determined and provided by the identifier and the classifier together, D represents the category conditional probability calculated by the identifier on the comment,
Figure BDA0002905791190000129
presentation discriminatorCalculating the category conditional probability obtained by the comment;
to maximize
Figure BDA00029057911900001210
The generator learns and adjusts the parameter theta of the generator step by step through a gradient strategy algorithmgExpressed as:
Figure BDA00029057911900001211
in the formula, Qi-ViIs a merit function, wherein:
Figure BDA0002905791190000131
Figure BDA0002905791190000132
where β is a linearly decreasing parameter, β -N-i, used to update the generator parameter θgThe importance of the initially generated words is improved, so that the generator obtains more diversified generated terms in the initial generation stage.
The present invention provides a false user comment detection system comprising a memory, a processor and computer program instructions stored on the memory and executable by the processor, the method steps as above being implementable when the computer program instructions are executed by the processor.
The present invention also provides a computer readable storage medium having stored thereon computer program instructions executable by a processor, the computer program instructions when executed by the processor being capable of performing the method steps as above.
Compared with the prior art, the invention has the following beneficial effects: the model is not easy to generate the phenomena of overfitting and mode collapse, and has the angle between the comment text and the theme text, the detection performance of the model is not easy to be interfered by outlier noise, and the detection result has higher accuracy.
Drawings
FIG. 1 is a schematic flow chart of a method according to an embodiment of the present invention.
Fig. 2 is a schematic system structure according to an embodiment of the present invention.
Detailed Description
The invention is further explained below with reference to the drawings and the embodiments.
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments according to the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
As shown in fig. 1, the present embodiment provides a method and a system for detecting false user comments, which specifically include the following steps:
step A: collecting product comments of users and subject texts related to the comments, and establishing a user comment data set S-SL∪SUIn which S isLRepresenting a marked user comment data set, SURepresenting an unlabeled user comment dataset;
and B: pre-training a false user comment detection model by using a user comment data set S, wherein the model consists of a text generator G, a discriminator D and a classifier C;
and C: carrying out countermeasure training on the false user comment detection model by using the user comment data set S;
step D: and inputting the user comment and the subject into a classifier of the false user comment detection model, and outputting a detection result of the user comment, namely the user comment is a false comment or a real comment.
In this embodiment, step B specifically includes the following steps:
step B1: pre-training a text generator by using a user comment data set S;
step B2: generating comments by using the text generator obtained in the step B1, and using the comments together with the comments in the user comment data set S to pre-train the identifier and the evaluator thereof;
step B3: the classifier and its evaluator are pre-trained using a user review data set S.
In this embodiment, step B1 specifically includes the following steps:
step B11: traversing the comment training set S, and comparing SLRepresents S as (r, t, c), SUEach unlabeled training sample in (a) is represented as s ═ r, t, where r represents the comment text, t represents the subject text to which the comment relates, and c is a category label of whether the comment is false or not; segmenting the comment r and the subject t in the training sample s and removing stop words, then setting the texts of the comment r and the subject t to be fixed lengths N and M respectively, and if the number of words in the comment r and the subject t after segmentation and removal of the stop words is smaller than the fixed length value, using the supplementary symbols<PAD>Supplementing, and cutting if the length is larger than the fixed length value;
after the comment r is subjected to word segmentation and stop word removal and is set to be a fixed length, the comment r is represented as:
Figure BDA0002905791190000151
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000152
the method comprises the following steps that i is 1,2, RN is the ith word in a text after a comment r is subjected to word segmentation and stop word removal, and the fixed length is set, i is 1,2, and RN is not more than N;
after the topic t is subjected to word segmentation and stop word removal and is set to be a fixed length, the topic t is represented as follows:
Figure BDA0002905791190000153
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000154
the method comprises the following steps that i is 1,2, wherein TM is a subject t, words are segmented, stop words are removed, and the i is the ith word in a text with a fixed length, i is 1,2, TM is less than or equal to M;
step B12: coding the comment text r and the subject text t processed in the step B11 to respectively obtain the representation vectors v of the comment and the subjectrAnd vt
Wherein v isrExpressed as:
Figure BDA0002905791190000155
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000156
as the ith word of comment text
Figure BDA0002905791190000157
Corresponding word vectors are obtained by pre-training a word vector matrix
Figure BDA0002905791190000158
The method includes searching, wherein i is 1,2, N, d represents the dimension of a word vector, and | V | is the number of words in a dictionary;
wherein v istExpressed as:
Figure BDA0002905791190000159
in the formula (I), the compound is shown in the specification,
Figure BDA00029057911900001510
for the ith word w of the subject texti tCorresponding word vectors are obtained by pre-training a word vector matrix
Figure BDA00029057911900001511
Where, i ═ 1, 2., M, d denote the dimension of the word vector, | V | is the number of words in the dictionary;
step B13: characterization vector v for a topictExtracting the characterization vector of the trunk information of the theme by adopting maximum pooling after linear transformation and activation function
Figure BDA00029057911900001512
Figure BDA0002905791190000161
Wherein the content of the first and second substances,
Figure BDA0002905791190000162
is a characterization vector of the stem information of the topic,
Figure BDA0002905791190000163
for the weight matrix, a matrix dot product operation is represented,
Figure BDA0002905791190000164
is a bias term;
step B14: will form vrVector sequence of
Figure BDA0002905791190000165
Sequentially inputting a multi-head attention unit (TMAU) of the fusion subject in the generator, and inputting the ith time step
Figure BDA0002905791190000166
At each time step will
Figure BDA0002905791190000167
And
Figure BDA0002905791190000168
combining the comments with the topic information through a multi-head attention mechanism to obtain a feature vector of the fusion topic of each time step and random noise
Figure BDA0002905791190000169
Splicing to obtain the vector sequence { x1,x2,...,xi,...,xN};
Step B15: the vector sequence { x ] obtained in the step B141,x2,...,xi,...,xNInputting bidirectional GRU, at the ith time step, outputting hidden layer state vector of bidirectional GRU
Figure BDA00029057911900001610
Figure BDA00029057911900001611
1, 2.. N, for the reverse layer of a bidirectional GRU, the output hidden layer state vector is
Figure BDA00029057911900001612
1,2, N, f is an activation function; updating each weight matrix of GRU by adopting spectral normalization at each time step, and using Wi GA certain weight matrix representing GRU at the ith time step is obtained to obtain Wi GMaximum singular value of
Figure BDA00029057911900001613
To Wi GPerforming spectrum normalization to obtain a weight matrix of GRU at the (i + 1) th time step
Figure BDA00029057911900001614
Is represented as follows:
Figure BDA00029057911900001615
repeating the steps to obtain a forward hidden layer state vector sequence
Figure BDA00029057911900001616
And reverse hidden layer state vector sequence
Figure BDA00029057911900001617
Step B16: connecting the forward hidden layer state vector with the reverse hidden layer state vector to obtain a comment characterization vector H of the fusion subject, wherein H is [ H ═ H1,...,hi,...,hN]T
Figure BDA00029057911900001618
hiAs forward hidden layer state vectors
Figure BDA00029057911900001619
And reverse hidden layer state vector
Figure BDA00029057911900001620
The connection of (1);
step B17: linearly transforming the comment characterization vector H of the fusion subject, inputting softmax to obtain a word probability distribution matrix B, randomly sampling according to the word probability distribution matrix B, and generating a word sequence y of the comment text which is y ═ y { (y)1,y2,...,yi,...,yN};
Step B18: the text generator G is trained according to the following objective loss function:
Figure BDA0002905791190000171
wherein the content of the first and second substances,
Figure BDA0002905791190000172
representing the conditional probability, theta, calculated by the generator at the target word positiongTo generate a set of parameters, c is the class label and z is random noise.
In this embodiment, the step B14 specifically includes:
first, with XiInput representing the ith time step
Figure BDA0002905791190000173
To XiIn that
Figure BDA0002905791190000174
Is subjected to orthogonal decomposition operation in the vector direction to obtain XiThe information about the subject part and other information in (1) respectively correspond to the parallel vectors
Figure BDA0002905791190000175
And a vertical vector
Figure BDA0002905791190000176
Expressed as:
Figure BDA0002905791190000177
Figure BDA0002905791190000178
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000179
is a parallel vector, and is a parallel vector,
Figure BDA00029057911900001710
is a vertical vector, and is,
Figure BDA00029057911900001711
representing a vector
Figure BDA00029057911900001712
Transposing;
then, information screening is carried out by using a multi-head attention mechanism: for each attention head, the pair of parallel vectors
Figure BDA00029057911900001713
Is subjected to linear transformation to obtain
Figure BDA00029057911900001714
As Q in a multi-head attention mechanism; to pair
Figure BDA00029057911900001715
Is subjected to linear transformation to obtain
Figure BDA00029057911900001716
And
Figure BDA00029057911900001717
as K and V in the multi-head attention mechanism, respectively, are expressed as:
Figure BDA00029057911900001718
Figure BDA00029057911900001719
Figure BDA00029057911900001720
in the formula (I), the compound is shown in the specification,
Figure BDA00029057911900001721
respectively are weight matrixes to be trained;
then, will
Figure BDA00029057911900001722
Inputting into a multi-head attention unit to perform multi-head attention calculation, and expressing as follows:
Figure BDA00029057911900001723
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000181
the output vector of the multi-head attention mechanism in the parallel direction is shown, M pieces A show the multi-head attention mechanism, H shows the total number of the attention heads,
Figure BDA0002905791190000182
representing the result of the calculation of the ith head of attention,
Figure BDA0002905791190000183
is a weight matrix to be trained;
after that, the function of softmax is used to control the operation of the computer
Figure BDA0002905791190000184
Mapping between 0 and 1 to obtain parallel vector
Figure BDA0002905791190000185
Information gate vector in parallel direction after multi-head attention mechanism
Figure BDA0002905791190000186
Expressed as:
Figure BDA0002905791190000187
for vertical vector
Figure BDA0002905791190000188
Is subjected to linear transformation to obtain
Figure BDA0002905791190000189
As Q in a multi-head attention mechanism, pair
Figure BDA00029057911900001810
Is subjected to linear transformation to obtain
Figure BDA00029057911900001811
And
Figure BDA00029057911900001812
as K and V in the attention mechanism, respectively, will
Figure BDA00029057911900001813
Figure BDA00029057911900001814
Inputting the data into a multi-head attention unit to perform multi-head attention calculation to obtain
Figure BDA00029057911900001815
And obtaining a vertical vector through a softmax function
Figure BDA00029057911900001816
Information gate vector in vertical direction after multi-head attention mechanism
Figure BDA00029057911900001817
By using
Figure BDA00029057911900001818
And
Figure BDA00029057911900001819
two gate vector pairs XiScreening information to obtain the characterization vector of the fusion subject of the ith time step
Figure BDA00029057911900001820
Expressed as:
Figure BDA00029057911900001821
in the formula (I), the compound is shown in the specification,
Figure BDA00029057911900001822
representing the weight matrices in the parallel and vertical directions respectively,
Figure BDA00029057911900001823
individual watchIndicating input bias terms in the parallel and vertical directions,. indicating a matrix dot product operation;
then will be
Figure BDA00029057911900001824
And random noise
Figure BDA00029057911900001830
Splicing to obtain the output vector x of the ith time stepiExpressed as:
Figure BDA00029057911900001825
in the formula (I), the compound is shown in the specification,
Figure BDA00029057911900001826
(ii) a It is shown that the connection operation is performed,
Figure BDA00029057911900001827
random noise, expressed as:
Figure BDA00029057911900001828
in the formula (I), the compound is shown in the specification,
Figure BDA00029057911900001829
random distribution P from a standard-Gauss distributionzObtained by intermediate sampling, PzRandom distribution P conforming to a standard Gaussian distribution and class labels c from conforming to a standard Bernoulli distributioncAnd c is obtained, wherein the normal comment is represented when c is 1, and the false comment is represented when c is 0.
In this embodiment, step B2 specifically includes the following steps:
step B21: after the pre-training of the generator G is completed, the generator G is utilized to generate a comment data set SGFrom SGAnd randomly extracting marked comments and unmarked comments from the S to form a pre-training set S of the discriminator DD,SDEach training sample in (1)This expression is s ═ r, cD) Where r denotes comment text, cDWhether the comment text is a category label generated by the generator or not is shown, SDInputting the training sample in (1) into a Transformer-based discriminator D for pre-training;
step B22: to SDAccording to the step B11, obtaining an initial characterization vector v of the comment text r for each training sample in the comment text rrAdding position vector to obtain position sensing characterization vector
Figure BDA0002905791190000191
Expressed as:
Figure BDA0002905791190000192
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000193
for the position vector, by consulting the position vector matrix Ep∈Rd×NObtained, expressed as:
Figure BDA0002905791190000194
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000195
representing a position coding vector corresponding to the ith word, d representing the dimension of the position vector, wherein the dimension of the position vector is the same as the dimension of the word vector, and N is the fixed maximum length of the comment text;
step B23: will be provided with
Figure BDA0002905791190000196
Inputting the feature vector of the comment into a Transformer network of a discriminator D
Figure BDA0002905791190000197
Step B24: to ODAfter linear transformation is carried out, softmax is input,calculating a class probability distribution Q of discriminator D over all words of the commentD
QD=softmax(ODWD+bD);
In the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000198
representing the actual class probability distribution of comments over all terms, QDThe ith row in the figure represents the actual class probability distribution of the discriminator at the ith word,
Figure BDA0002905791190000199
as a weight matrix, the weight matrix is,
Figure BDA00029057911900001910
is a bias term;
from a review of the class probability distribution Q over all termsDGet the entire sentence about category cDAverage class probability distribution of discriminator:
Figure BDA0002905791190000201
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000202
representing the conditional probability of the class, θ, calculated by the discriminator on the commentsdParameter set, Q, representing discriminator DD iRepresenting the actual class probability distribution of the discriminator on the ith term;
step B25: token vector O of the commentDInput evaluator DcriticThe evaluator consists of a fully connected layer, ODAfter linear transformation and softmax, obtaining the category probability distribution V of the commentsD
Figure BDA0002905791190000203
In the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000204
expressing the probability distribution of the target category of the comments on all the terms, and evaluating the probability distribution Q of the actual category by taking the probability distribution as a standardD,VDRow i in the figure shows the target class probability distribution of the discriminator on the ith term,
Figure BDA0002905791190000205
is an evaluator weight matrix for the discriminator,
Figure BDA0002905791190000206
is a bias term;
step B26: using cross entropy losses
Figure BDA0002905791190000207
Training the discriminator by using the loss of mean square error
Figure BDA0002905791190000208
To evaluator DcriticTraining is carried out;
wherein the content of the first and second substances,
Figure BDA0002905791190000209
expressed as:
Figure BDA00029057911900002010
Figure BDA00029057911900002011
Figure BDA00029057911900002012
in the formula (I), the compound is shown in the specification,
Figure BDA00029057911900002013
represents a pair SDIn a sample extracted from SThe loss of the classification is made,
Figure BDA00029057911900002014
represents a pair SDIs extracted from SGIs lost in the classification of the sample(s),
Figure BDA00029057911900002015
indicating that a desired calculation of the comments upsampled on the dataset S resulted in a category cDThe expected value of the cross-entropy loss of (c),
Figure BDA00029057911900002016
indicating that a desired calculation of a generator-generated comment resulted with respect to category cD(ii) a cross entropy loss expectation;
wherein the content of the first and second substances,
Figure BDA00029057911900002017
expressed as:
Figure BDA0002905791190000211
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000212
expected value of mean square error loss, V, representing the target class probability distribution and actual class probability distribution of the evaluatorD iRepresenting the target class probability distribution of the discriminator on the ith term.
In this embodiment, step B3 specifically includes the following steps:
step B31: using annotated data sets SLPre-training the classifier, and performing SLS ═ r, t, c), the process steps of B11-B12 are followed to obtain a comment characterization vector vrAnd a topic characterization vector vtObtaining the main information representation of the subject according to the processing step of B13
Figure BDA0002905791190000213
Step B32: according to the processing procedure of B14, the structure vrThe vector sequence of (a) is input into a multi-head attention unit of the fusion topic in turn, and
Figure BDA0002905791190000214
combining, fusing the comments and the topics through a multi-head attention mechanism to obtain a fusion vector of each time step, and fusing the fusion vector of each time step with random noise
Figure BDA0002905791190000215
Splicing to obtain the comment characterization vector of the fusion subject
Figure BDA0002905791190000216
Wherein
Figure BDA0002905791190000217
Representing the feature vector of the ith word in the comment feature vector of the fusion subject; query location vector matrix Ep∈Rd×NObtaining a position vector
Figure BDA0002905791190000218
And
Figure BDA0002905791190000219
adding to obtain the comment characterization vector of position perception
Figure BDA00029057911900002110
Inputting the words into a Transformer network to obtain a representation matrix of all the words in the comment
Figure BDA00029057911900002111
Step B33: to OCAfter linear transformation, softmax is input, and the class probability distribution of all the words of the comment by the classifier is calculated
Figure BDA00029057911900002112
QC=softmax(OCWC+bC);
In the formula (I), the compound is shown in the specification,
Figure BDA00029057911900002113
as a weight matrix, the weight matrix is,
Figure BDA00029057911900002114
is a bias term;
according to QCGet the average class probability distribution of the classifier for the whole sentence with respect to class c:
Figure BDA00029057911900002115
in the formula, QC iRepresenting the probability distribution of the actual category of the comment on the ith word,
Figure BDA00029057911900002116
representing the category conditional probability obtained by the evaluator through calculation on the comments;
using cross entropy losses
Figure BDA0002905791190000221
The classifier is pre-trained and the classifier is pre-trained,
Figure BDA0002905791190000222
the calculation formula of (a) is as follows:
Figure BDA0002905791190000223
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000224
representing pairs of slave data sets SLThe expected calculation of the mid-sampled samples yields the expected value of cross-entropy loss for class c,
Figure BDA0002905791190000225
presentation evaluator conducting commentsCalculated conditional probability of class, θcRepresenting classifier parameters;
step B34: token vector O of the commentCInput evaluator CcriticThe evaluator consists of a fully connected layer, OCAfter linear transformation and softmax, obtaining target distribution V of actual class probability distributionCExpressed as:
Figure BDA0002905791190000226
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000227
is the evaluator weight matrix of the classifier,
Figure BDA0002905791190000228
is a bias term;
step B35: using mean square error loss
Figure BDA0002905791190000229
Evaluator C for classifiercriticTraining is carried out:
Figure BDA00029057911900002210
in the formula, VC iRepresenting a target category probability distribution of the comment on the ith word for category c.
In this embodiment, step C specifically includes the following steps:
step C1: traversing each training sample in the data set S, and obtaining a comment characterization vector v for each training sample according to the processing steps of B11-B12rAnd a topic characterization vector vrObtaining the main information representation of the subject according to the processing step of B13
Figure BDA00029057911900002211
Step C2: for dataEach training sample in set S is randomly distributed P by the generatorzAnd randomly distributing PcRespectively sampling to obtain random noise z and class c to obtain noise containing class information
Figure BDA00029057911900002212
Expressed as:
Figure BDA00029057911900002213
step C3: according to the processing procedure of B14, the structure vrThe vector sequence of (a) is input into a multi-head attention unit of the fusion topic in turn, and
Figure BDA00029057911900002214
combining, fusing the comments and the topics through a multi-head attention mechanism to obtain a fusion vector of each time step, and fusing the fusion vector of each time step with random noise
Figure BDA00029057911900002215
Splicing to obtain the comment characterization vector of the fusion subject
Figure BDA0002905791190000231
Wherein in
Figure BDA0002905791190000232
A token vector representing the ith word in the comment token vector of the fused topic, wherein the superscript FGRepresenting a multi-headed attention calculation of a fusion topic to the generator input; then generating a comment y according to the processing steps of B15-B17;
step C4: inputting the y and the corresponding training sample in the data set S into a discriminator and a classifier together, classifying the comment classes respectively, and adopting a loss function for the discriminator
Figure BDA0002905791190000233
Updating parameters, using penalty of antagonistic training for classifiersFunction(s)
Figure BDA0002905791190000234
Updating is carried out;
wherein the content of the first and second substances,
Figure BDA0002905791190000235
expressed as:
Figure BDA0002905791190000236
Figure BDA0002905791190000237
Figure BDA0002905791190000238
in the formula (I), the compound is shown in the specification,
Figure BDA0002905791190000239
is the cross entropy of the classifier' S predicted classification score on the labeled samples of the dataset S;
Figure BDA00029057911900002310
is the loss of the classifier's classification prediction on the comments generated by the generator, where
Figure BDA00029057911900002311
Expressing the Shannon entropy, wherein alpha is a balance parameter used for balancing the influence of the Shannon entropy;
step C5: and training the generator in a reinforcement learning mode.
In this embodiment, step C5 specifically includes:
the process of generating comments by the generator is regarded as a sequence decision process, the generator is used as an agent or an actor in reinforcement learning, and the generated term sequence { y is used in the process of generating comments1,y2,...,yi-1Consider as intelligentThe current state of the agent, the next word yi to be generated is the action taken by the agent, and the action taken by the agent is based on policy distribution
Figure BDA00029057911900002312
And selecting, wherein the strategy distribution gives the probability of each behavior by calculating the expected reward of each behavior, the agent selects the corresponding behavior according to the probability, and the generator agent learns to maximize the expected reward, namely:
Figure BDA00029057911900002313
wherein the content of the first and second substances,
Figure BDA0002905791190000241
wherein R (r) represents the reward of the whole comment sample, and is determined and provided by the identifier and the classifier together, D represents the category conditional probability calculated by the identifier on the comment,
Figure BDA0002905791190000242
representing the category conditional probability obtained by the evaluator through calculation on the comments;
to maximize
Figure BDA0002905791190000243
The generator learns and adjusts the parameter theta of the generator step by step through a gradient strategy algorithmgExpressed as:
Figure BDA0002905791190000244
in the formula, Qi-ViIs a merit function, wherein:
Figure BDA0002905791190000245
Figure BDA0002905791190000246
where β is a linearly decreasing parameter, β -N-i, used to update the generator parameter θgThe importance of the initially generated words is improved, so that the generator obtains more diversified generated terms in the initial generation stage.
The present embodiment also provides a false user comment detection system comprising a memory, a processor, and computer program instructions stored on the memory and executable by the processor, which when executed by the processor, enable the method steps as above.
The present embodiments also provide a computer readable storage medium having stored thereon computer program instructions executable by a processor, the computer program instructions, when executed by the processor, being capable of performing the method steps as above.
Preferably, as shown in fig. 2, the present embodiment correspondingly includes the following functional modules:
the data collection module is used for extracting subject information related to user comments and comments, labeling false category labels of the comments and constructing a training set;
the text preprocessing module is used for preprocessing the training samples in the training set, including unifying case and case, processing word segmentation and removing stop words;
the text coding module is used for searching word vectors of words in the preprocessed user comments and topics in the pre-trained word vector matrix to obtain the characteristic vectors of the user comments and the characteristic vectors of the topics;
and the pre-training module is used for inputting the characterization vectors of the user comments and the characterization vectors of the topics into each component of the deep learning network for pre-training respectively to obtain a pre-trained deep network model.
The countertraining module is used for inputting the characteristic vectors of the comments of the user and the characteristic vectors of the subjects into each module of the deep learning network, each module obtains the comment characteristic vectors of the fusion subjects, the deep learning network is trained through reinforcement learning, the probability that the characteristic vectors belong to a certain class and the marks in a training set are used as losses, the whole deep learning network is trained by taking the minimum loss as a target, and a deep learning network model subjected to countertraining is obtained;
and the false comment analysis module is used for analyzing and processing the input user comments and topics by utilizing the countertraining deep learning network model and outputting false categories of the user comments.
The foregoing is directed to preferred embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow. However, any simple modification, equivalent change and modification of the above embodiments according to the technical essence of the present invention are within the protection scope of the technical solution of the present invention.

Claims (10)

1. A false user comment detection method is characterized by comprising the following steps:
step A: collecting product comments of users and subject texts related to the comments, and establishing a user comment data set S-SLUSUIn which S isLRepresenting a marked user comment data set, SURepresenting an unlabeled user comment dataset;
and B: pre-training a false user comment detection model by using a user comment data set S, wherein the model consists of a text generator G, a discriminator D and a classifier C;
and C: carrying out countermeasure training on the false user comment detection model by using the user comment data set S;
step D: and inputting the user comment and the subject into a classifier of the false user comment detection model, and outputting a detection result of the user comment, namely the user comment is a false comment or a real comment.
2. The method for detecting false user comments as claimed in claim 1, wherein the step B specifically comprises the steps of:
step B1: pre-training a text generator by using a user comment data set S;
step B2: generating comments by using the text generator obtained in the step B1, and using the comments together with the comments in the user comment data set S to pre-train the identifier and the evaluator thereof;
step B3: the classifier and its evaluator are pre-trained using a user review data set S.
3. The method for detecting false user comments as claimed in claim 2, wherein the step B1 specifically comprises the following steps:
step B11: traversing the comment training set S, and comparing SLRepresents S as (r, t, c), SUEach unlabeled training sample in (a) is represented as s ═ r, t, where r represents the comment text, t represents the subject text to which the comment relates, and c is a category label of whether the comment is false or not; segmenting the comment r and the subject t in the training sample s and removing stop words, then setting the texts of the comment r and the subject t to be fixed lengths N and M respectively, and if the number of words in the comment r and the subject t after segmentation and removal of the stop words is smaller than the fixed length value, using the supplementary symbols<PAD>Supplementing, and cutting if the length is larger than the fixed length value;
after the comment r is subjected to word segmentation and stop word removal and is set to be a fixed length, the comment r is represented as:
Figure FDA0002905791180000011
in the formula (I), the compound is shown in the specification,
Figure FDA0002905791180000021
dividing words for the comment r, removing stop words and setting the word as the ith word in the text with fixed length, wherein i is1,2,...,RN,RN≤N;
After the topic t is subjected to word segmentation and stop word removal and is set to be a fixed length, the topic t is represented as follows:
Figure FDA0002905791180000022
in the formula (I), the compound is shown in the specification,
Figure FDA0002905791180000023
dividing words for a subject t, removing stop words, and setting the subject t as the ith word in the text with a fixed length, wherein i is 1,2, TM is less than or equal to M;
step B12: coding the comment text r and the subject text t processed in the step B11 to respectively obtain the representation vectors v of the comment and the subjectrAnd vt
Wherein v isrExpressed as:
Figure FDA0002905791180000024
in the formula (I), the compound is shown in the specification,
Figure FDA0002905791180000025
as the ith word of comment text
Figure FDA0002905791180000026
Corresponding word vectors are obtained by pre-training a word vector matrix
Figure FDA0002905791180000027
The method includes searching, wherein i is 1,2, N, d represents the dimension of a word vector, and | V | is the number of words in a dictionary;
wherein v istExpressed as:
Figure FDA0002905791180000028
in the formula (I), the compound is shown in the specification,
Figure FDA0002905791180000029
as the ith word of the subject text
Figure FDA00029057911800000210
Corresponding word vectors are obtained by pre-training a word vector matrix
Figure FDA00029057911800000211
Where, i ═ 1, 2., M, d denote the dimension of the word vector, | V | is the number of words in the dictionary;
step B13: characterization vector v for a topictExtracting the characterization vector of the trunk information of the theme by adopting maximum pooling after linear transformation and activation function
Figure FDA00029057911800000212
Figure FDA00029057911800000213
Wherein the content of the first and second substances,
Figure FDA00029057911800000214
is a characterization vector of the stem information of the topic,
Figure FDA00029057911800000215
for the weight matrix, a matrix dot product operation is represented,
Figure FDA0002905791180000031
is a bias term;
step B14: will form vrVector sequence of
Figure FDA0002905791180000032
Sequential input generationA multi-head attention unit fusing topics in the device, wherein the input of the ith time step is
Figure FDA0002905791180000033
At each time step will
Figure FDA0002905791180000034
And
Figure FDA0002905791180000035
combining the comments with the topic information through a multi-head attention mechanism to obtain a feature vector of the fusion topic of each time step and random noise
Figure FDA0002905791180000036
Splicing to obtain the vector sequence { x1,x2,...,xi,...,xN};
Step B15: the vector sequence { x ] obtained in the step B141,x2,...,xi,...,xNInputting bidirectional GRU, at the ith time step, outputting hidden layer state vector of bidirectional GRU
Figure FDA0002905791180000037
Figure FDA0002905791180000038
For the reverse layer of a bidirectional GRU, the output hidden layer state vector is
Figure FDA0002905791180000039
f is an activation function; updating each weight matrix of GRU by adopting spectral normalization at each time step, and using Wi GA certain weight matrix representing GRU at the ith time step is obtained to obtain Wi GMaximum singular value of
Figure FDA00029057911800000310
To Wi GPerforming spectrum normalization to obtain a weight matrix of GRU at the (i + 1) th time step
Figure FDA00029057911800000311
Is represented as follows:
Figure FDA00029057911800000312
repeating the steps to obtain a forward hidden layer state vector sequence
Figure FDA00029057911800000313
And reverse hidden layer state vector sequence
Figure FDA00029057911800000314
Step B16: connecting the forward hidden layer state vector with the reverse hidden layer state vector to obtain a comment characterization vector H of the fusion subject, wherein H is [ H ═ H1,...,hi,...,hN]T
Figure FDA00029057911800000315
hiAs forward hidden layer state vectors
Figure FDA00029057911800000316
And reverse hidden layer state vector
Figure FDA00029057911800000317
The connection of (1);
step B17: linearly transforming the comment characterization vector H of the fusion subject, inputting softmax to obtain a word probability distribution matrix B, randomly sampling according to the word probability distribution matrix B, and generating a word sequence y of the comment text which is y ═ y { (y)1,y2,...,yi,...,yN};
Step B18: the text generator G is trained according to the following objective loss function:
Figure FDA0002905791180000041
wherein the content of the first and second substances,
Figure FDA0002905791180000042
representing the conditional probability, theta, calculated by the generator at the target word positiongTo generate a set of parameters, c is the class label and z is random noise.
4. The method for detecting false user comments as claimed in claim 3, wherein the step B14 is specifically as follows:
first, with XiInput representing the ith time step
Figure FDA0002905791180000043
To XiIn that
Figure FDA0002905791180000044
Is subjected to orthogonal decomposition operation in the vector direction to obtain XiThe information about the subject part and other information in (1) respectively correspond to the parallel vectors
Figure FDA0002905791180000045
And a vertical vector
Figure FDA0002905791180000046
Expressed as:
Figure FDA0002905791180000047
Figure FDA0002905791180000048
in the formula (I), the compound is shown in the specification,
Figure FDA0002905791180000049
is a parallel vector, and is a parallel vector,
Figure FDA00029057911800000410
is a vertical vector, and is,
Figure FDA00029057911800000411
representing a vector
Figure FDA00029057911800000412
Transposing;
then, information screening is carried out by using a multi-head attention mechanism: for each attention head, the pair of parallel vectors
Figure FDA00029057911800000413
Is subjected to linear transformation to obtain
Figure FDA00029057911800000414
As Q in a multi-head attention mechanism; to pair
Figure FDA00029057911800000415
Is subjected to linear transformation to obtain
Figure FDA00029057911800000416
And
Figure FDA00029057911800000417
as K and V in the multi-head attention mechanism, respectively, are expressed as:
Figure FDA00029057911800000418
Figure FDA00029057911800000419
Figure FDA00029057911800000420
in the formula (I), the compound is shown in the specification,
Figure FDA00029057911800000421
respectively are weight matrixes to be trained;
then, will
Figure FDA00029057911800000422
Inputting into a multi-head attention unit to perform multi-head attention calculation, and expressing as follows:
Figure FDA00029057911800000423
in the formula (I), the compound is shown in the specification,
Figure FDA00029057911800000424
the output vector of the multi-head attention mechanism in the parallel direction is shown, MHA represents the multi-head attention mechanism, H represents the total number of attention heads,
Figure FDA0002905791180000051
representing the result of the calculation of the ith head of attention,
Figure FDA0002905791180000052
is a weight matrix to be trained;
after that, the function of softmax is used to control the operation of the computer
Figure FDA0002905791180000053
Mapping between 0 and 1 to obtain parallel vector
Figure FDA0002905791180000054
Information gate vector in parallel direction after multi-head attention mechanism
Figure FDA0002905791180000055
Expressed as:
Figure FDA0002905791180000056
for vertical vector
Figure FDA0002905791180000057
Is subjected to linear transformation to obtain
Figure FDA0002905791180000058
As Q in a multi-head attention mechanism, pair
Figure FDA0002905791180000059
Is subjected to linear transformation to obtain
Figure FDA00029057911800000510
And
Figure FDA00029057911800000511
as K and V in the attention mechanism, respectively, will
Figure FDA00029057911800000512
Figure FDA00029057911800000513
Inputting the data into a multi-head attention unit to perform multi-head attention calculation to obtain
Figure FDA00029057911800000514
And obtaining a vertical vector through a softmax function
Figure FDA00029057911800000515
Information gate vector in vertical direction after multi-head attention mechanism
Figure FDA00029057911800000516
By using
Figure FDA00029057911800000517
And
Figure FDA00029057911800000518
two gate vector pairs XiScreening information to obtain the characterization vector of the fusion subject of the ith time step
Figure FDA00029057911800000519
Expressed as:
Figure FDA00029057911800000520
in the formula (I), the compound is shown in the specification,
Figure FDA00029057911800000521
representing the weight matrices in the parallel and vertical directions respectively,
Figure FDA00029057911800000522
representing the input bias terms in the parallel and vertical directions, respectively, representing the matrix dot product operation;
then will be
Figure FDA00029057911800000523
And random noise
Figure FDA00029057911800000524
Splicing to obtain the output vector x of the ith time stepiExpressed as:
Figure FDA00029057911800000525
in the formula (I), the compound is shown in the specification,
Figure FDA00029057911800000526
(ii) a It is shown that the connection operation is performed,
Figure FDA00029057911800000527
random noise, expressed as:
Figure FDA00029057911800000528
in the formula (I), the compound is shown in the specification,
Figure FDA00029057911800000529
random distribution P from a standard-Gauss distributionzObtained by intermediate sampling, PzRandom distribution P conforming to a standard Gaussian distribution and class labels c from conforming to a standard Bernoulli distributioncAnd c is obtained, wherein the normal comment is represented when c is 1, and the false comment is represented when c is 0.
5. The method for detecting false user comments as claimed in claim 2, wherein the step B2 specifically comprises the following steps:
step B21: after the pre-training of the generator G is completed, the generator G is utilized to generate a comment data set SGFrom SGAnd randomly extracting marked comments and unmarked comments from the S to form a pre-training set S of the discriminator DD,SDEach training sample in (a) is denoted as s ═ (r, c)D) Where r denotes comment text, cDWhether the comment text is a category label generated by the generator or not is shown, SDInputting the training sample in (1) into a Transformer-based discriminator D for pre-training;
step B22: to SDAccording to the step B11, obtaining an initial characterization vector v of the comment text r for each training sample in the comment text rrAdding position vector to obtain position sensing characterization vector
Figure FDA0002905791180000061
Expressed as:
Figure FDA0002905791180000062
in the formula (I), the compound is shown in the specification,
Figure FDA0002905791180000063
for the position vector, by consulting the position vector matrix Ep∈Rd×NObtained, expressed as:
Figure FDA0002905791180000064
in the formula (I), the compound is shown in the specification,
Figure FDA0002905791180000065
representing a position coding vector corresponding to the ith word, d representing the dimension of the position vector, wherein the dimension of the position vector is the same as the dimension of the word vector, and N is the fixed maximum length of the comment text;
step B23: will be provided with
Figure FDA0002905791180000066
Inputting the feature vector of the comment into a Transformer network of a discriminator D
Figure FDA0002905791180000067
Step B24: to ODAfter linear transformation, softmax is input, and the class probability distribution Q of the discriminator D on all the words of the comment is calculatedD
QD=Softmax(ODWD+bD);
In the formula (I), the compound is shown in the specification,
Figure FDA0002905791180000068
representing the actual class probability distribution of comments over all terms, QDRow i of (1) indicates authenticationThe actual class probability distribution of the word at the i-th,
Figure FDA0002905791180000069
as a weight matrix, the weight matrix is,
Figure FDA00029057911800000610
is a bias term;
from a review of the class probability distribution Q over all termsDGet the entire sentence about category cDAverage class probability distribution of discriminator:
Figure FDA0002905791180000071
in the formula (I), the compound is shown in the specification,
Figure FDA0002905791180000072
representing the conditional probability of the class, θ, calculated by the discriminator on the commentsdParameter set, Q, representing discriminator DD iRepresenting the actual class probability distribution of the discriminator on the ith term;
step B25: token vector O of the commentDInput evaluator DcriticThe evaluator consists of a fully connected layer, ODAfter linear transformation and softmax, obtaining the category probability distribution V of the commentsD
Figure FDA0002905791180000073
In the formula (I), the compound is shown in the specification,
Figure FDA0002905791180000074
expressing the probability distribution of the target category of the comments on all the terms, and evaluating the probability distribution Q of the actual category by taking the probability distribution as a standardD,VDRow i in the figure shows the target class probability distribution of the discriminator on the ith term,
Figure FDA0002905791180000075
is an evaluator weight matrix for the discriminator,
Figure FDA0002905791180000076
is a bias term;
step B26: using cross entropy losses
Figure FDA00029057911800000717
Training the discriminator by using the loss of mean square error
Figure FDA0002905791180000077
To evaluator DcriticTraining is carried out;
wherein the content of the first and second substances,
Figure FDA0002905791180000078
expressed as:
Figure FDA0002905791180000079
Figure FDA00029057911800000710
Figure FDA00029057911800000711
in the formula (I), the compound is shown in the specification,
Figure FDA00029057911800000712
represents a pair SDThe loss of classification of the sample extracted from S,
Figure FDA00029057911800000713
represents a pair SDIs extracted from SGIs lost in the classification of the sample(s),
Figure FDA00029057911800000714
indicating that a desired calculation of the comments upsampled on the dataset S resulted in a category cDThe expected value of the cross-entropy loss of (c),
Figure FDA00029057911800000715
indicating that a desired calculation of a generator-generated comment resulted with respect to category cD(ii) a cross entropy loss expectation;
wherein the content of the first and second substances,
Figure FDA00029057911800000716
expressed as:
Figure FDA0002905791180000081
in the formula (I), the compound is shown in the specification,
Figure FDA0002905791180000082
expected value of mean square error loss, V, representing the target class probability distribution and actual class probability distribution of the evaluatorD iRepresenting the target class probability distribution of the discriminator on the ith term.
6. The method for detecting false user comments as claimed in claim 3, wherein the step B3 specifically comprises the following steps:
step B31: using annotated data sets SLPre-training the classifier, and performing SLS ═ r, t, c), the process steps of B11-B12 are followed to obtain a comment characterization vector vrAnd a topic characterization vector vtObtaining the main information representation of the subject according to the processing step of B13
Figure FDA0002905791180000083
Step B32: processing steps according to B14Will form vrThe vector sequence of (a) is input into a multi-head attention unit of the fusion topic in turn, and
Figure FDA0002905791180000084
combining, fusing the comments and the topics through a multi-head attention mechanism to obtain a fusion vector of each time step, and fusing the fusion vector of each time step with random noise
Figure FDA0002905791180000085
Splicing to obtain the comment characterization vector of the fusion subject
Figure FDA0002905791180000086
Wherein
Figure FDA0002905791180000087
Representing the feature vector of the ith word in the comment feature vector of the fusion subject; query location vector matrix Ep∈Rd×NObtaining a position vector
Figure FDA0002905791180000088
And
Figure FDA0002905791180000089
adding to obtain the comment characterization vector of position perception
Figure FDA00029057911800000810
Inputting the words into a Transformer network to obtain a representation matrix of all the words in the comment
Figure FDA00029057911800000811
Step B33: to OCAfter linear transformation, softmax is input, and the class probability distribution of all the words of the comment by the classifier is calculated
Figure FDA00029057911800000812
QC=softmax(OCWC+bC);
In the formula (I), the compound is shown in the specification,
Figure FDA00029057911800000813
as a weight matrix, the weight matrix is,
Figure FDA00029057911800000814
is a bias term;
according to QCGet the average class probability distribution of the classifier for the whole sentence with respect to class c:
Figure FDA00029057911800000815
in the formula, QC iRepresenting the probability distribution of the actual category of the comment on the ith word,
Figure FDA00029057911800000816
representing the category conditional probability obtained by the evaluator through calculation on the comments;
using cross entropy losses
Figure FDA0002905791180000091
The classifier is pre-trained and the classifier is pre-trained,
Figure FDA0002905791180000092
the calculation formula of (a) is as follows:
Figure FDA0002905791180000093
in the formula (I), the compound is shown in the specification,
Figure FDA0002905791180000094
representing pairs of slave data sets SLExpected calculation of mid-sampled samples results in a cross-entropy loss period for class cThe value of the obtained signal is obtained,
Figure FDA0002905791180000095
representing the conditional probability of the class, θ, calculated by the discriminator on the commentscRepresenting classifier parameters;
step B34: token vector O of the commentCInput evaluator CcriticThe evaluator consists of a fully connected layer, OCAfter linear transformation and softmax, obtaining target distribution V of actual class probability distributionCExpressed as:
Figure FDA0002905791180000096
in the formula (I), the compound is shown in the specification,
Figure FDA0002905791180000097
is the evaluator weight matrix of the classifier,
Figure FDA0002905791180000098
is a bias term;
step B35: using mean square error loss
Figure FDA0002905791180000099
Evaluator C for classifiercriticTraining is carried out:
Figure FDA00029057911800000910
in the formula, VC iRepresenting a target category probability distribution of the comment on the ith word for category c.
7. The method for detecting false user comments as claimed in claim 3, wherein the step C specifically comprises the steps of:
step C1: traverse each training sample in the data set S, for eachTraining samples, and obtaining a comment characterization vector v according to the processing steps of B11-B12rAnd a topic characterization vector vtObtaining the main information representation of the subject according to the processing step of B13
Figure FDA00029057911800000911
Step C2: for each training sample in the data set S, the generator is used to randomly distribute PzAnd randomly distributing PcRespectively sampling to obtain random noise z and class c to obtain noise containing class information
Figure FDA00029057911800000912
Expressed as:
Figure FDA00029057911800000913
step C3: according to the processing procedure of B14, the structure vrThe vector sequence of (a) is input into a multi-head attention unit of the fusion topic in turn, and
Figure FDA0002905791180000101
combining, fusing the comments and the topics through a multi-head attention mechanism to obtain a fusion vector of each time step, and fusing the fusion vector of each time step with random noise
Figure FDA0002905791180000102
Splicing to obtain the comment characterization vector of the fusion subject
Figure FDA0002905791180000103
Wherein in
Figure FDA0002905791180000104
A token vector representing the ith word in the comment token vector of the fused topic, wherein the superscript FGMulti-headed attention meter representing fused topics to generator inputsCalculating; then generating a comment y according to the processing steps of B15-B17;
step C4: inputting the y and the corresponding training sample in the data set S into a discriminator and a classifier together, classifying the comment classes respectively, and adopting a loss function for the discriminator
Figure FDA0002905791180000105
Updating parameters, and applying a loss function of countermeasure training to the classifier
Figure FDA0002905791180000106
Updating is carried out;
wherein the content of the first and second substances,
Figure FDA0002905791180000107
expressed as:
Figure FDA0002905791180000108
Figure FDA0002905791180000109
Figure FDA00029057911800001010
in the formula (I), the compound is shown in the specification,
Figure FDA00029057911800001011
is the cross entropy of the classifier' S predicted classification score on the labeled samples of the dataset S;
Figure FDA00029057911800001012
is the loss of the classifier's classification prediction on the comments generated by the generator, where
Figure FDA00029057911800001013
Expressing the Shannon entropy, wherein alpha is a balance parameter used for balancing the influence of the Shannon entropy;
step C5: and training the generator in a reinforcement learning mode.
8. The method for detecting false user comments as claimed in claim 7, wherein the step C5 is specifically:
the process of generating comments by the generator is regarded as a sequence decision process, the generator is used as an agent or an actor in reinforcement learning, and the generated term sequence { y is used in the process of generating comments1,y2,...,yi-1The next word y to be generated is regarded as the current state of the agentiActions taken for the agent, the actions taken by the agent being based on policy distribution
Figure FDA00029057911800001014
And selecting, wherein the strategy distribution gives the probability of each behavior by calculating the expected reward of each behavior, the agent selects the corresponding behavior according to the probability, and the generator agent learns to maximize the expected reward, namely:
Figure FDA0002905791180000111
wherein the content of the first and second substances,
Figure FDA0002905791180000112
wherein R (r) represents the reward of the whole comment sample, and is determined and provided by the identifier and the classifier together, D represents the category conditional probability calculated by the identifier on the comment,
Figure FDA0002905791180000113
representing the category conditional probability obtained by the evaluator through calculation on the comments;
to maximize
Figure FDA0002905791180000114
The generator learns and adjusts the parameter theta of the generator step by step through a gradient strategy algorithmgExpressed as:
Figure FDA0002905791180000115
in the formula, Qi-ViIs a merit function, wherein:
Figure FDA0002905791180000116
Figure FDA0002905791180000117
where β is a linearly decreasing parameter, β -N-i, used to update the generator parameter θgThe importance of the initially generated words is improved, so that the generator obtains more diversified generated terms in the initial generation stage.
9. A false user comment detection system comprising a memory, a processor and computer program instructions stored on the memory and executable by the processor, the computer program instructions when executed by the processor being capable of performing the method steps of claims 1-8.
10. A computer-readable storage medium, having stored thereon computer program instructions executable by a processor, the computer program instructions, when executed by the processor, being capable of carrying out the method steps of claims 1-8.
CN202110070347.3A 2021-01-19 2021-01-19 False user comment detection method and system Active CN112732921B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110070347.3A CN112732921B (en) 2021-01-19 2021-01-19 False user comment detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110070347.3A CN112732921B (en) 2021-01-19 2021-01-19 False user comment detection method and system

Publications (2)

Publication Number Publication Date
CN112732921A true CN112732921A (en) 2021-04-30
CN112732921B CN112732921B (en) 2022-06-14

Family

ID=75592450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110070347.3A Active CN112732921B (en) 2021-01-19 2021-01-19 False user comment detection method and system

Country Status (1)

Country Link
CN (1) CN112732921B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113392334A (en) * 2021-06-29 2021-09-14 长沙理工大学 False comment detection method in cold start environment
CN114610877A (en) * 2022-02-23 2022-06-10 苏州大学 Film evaluation emotion analysis preprocessing method and system based on judgment variance criterion
CN115168677A (en) * 2022-06-09 2022-10-11 天翼爱音乐文化科技有限公司 Comment classification method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109670542A (en) * 2018-12-11 2019-04-23 田刚 A kind of false comment detection method based on comment external information
CN109829733A (en) * 2019-01-31 2019-05-31 重庆大学 A kind of false comment detection system and method based on Shopping Behaviors sequence data
KR20190123397A (en) * 2018-04-24 2019-11-01 성균관대학교산학협력단 Classification model selection method for discriminating fake review
CN110580341A (en) * 2019-09-19 2019-12-17 山东科技大学 False comment detection method and system based on semi-supervised learning model
CN111666480A (en) * 2020-06-10 2020-09-15 东北电力大学 False comment identification method based on rolling type collaborative training

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190123397A (en) * 2018-04-24 2019-11-01 성균관대학교산학협력단 Classification model selection method for discriminating fake review
CN109670542A (en) * 2018-12-11 2019-04-23 田刚 A kind of false comment detection method based on comment external information
CN109829733A (en) * 2019-01-31 2019-05-31 重庆大学 A kind of false comment detection system and method based on Shopping Behaviors sequence data
CN110580341A (en) * 2019-09-19 2019-12-17 山东科技大学 False comment detection method and system based on semi-supervised learning model
CN111666480A (en) * 2020-06-10 2020-09-15 东北电力大学 False comment identification method based on rolling type collaborative training

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吕海等: "在线产品虚假评论检测技术研究", 《沈阳理工大学学报》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113392334A (en) * 2021-06-29 2021-09-14 长沙理工大学 False comment detection method in cold start environment
CN113392334B (en) * 2021-06-29 2024-03-08 长沙理工大学 False comment detection method in cold start environment
CN114610877A (en) * 2022-02-23 2022-06-10 苏州大学 Film evaluation emotion analysis preprocessing method and system based on judgment variance criterion
CN114610877B (en) * 2022-02-23 2023-04-25 苏州大学 Criticizing variance criterion-based film evaluation emotion analysis preprocessing method and system
CN115168677A (en) * 2022-06-09 2022-10-11 天翼爱音乐文化科技有限公司 Comment classification method, device, equipment and storage medium
CN115168677B (en) * 2022-06-09 2023-03-28 天翼爱音乐文化科技有限公司 Comment classification method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN112732921B (en) 2022-06-14

Similar Documents

Publication Publication Date Title
CN110298037B (en) Convolutional neural network matching text recognition method based on enhanced attention mechanism
CN110134757B (en) Event argument role extraction method based on multi-head attention mechanism
CN110532900B (en) Facial expression recognition method based on U-Net and LS-CNN
CN112732921B (en) False user comment detection method and system
CN111126386B (en) Sequence domain adaptation method based on countermeasure learning in scene text recognition
CN110321563B (en) Text emotion analysis method based on hybrid supervision model
CN110232395B (en) Power system fault diagnosis method based on fault Chinese text
CN111144448A (en) Video barrage emotion analysis method based on multi-scale attention convolutional coding network
CN110866542B (en) Depth representation learning method based on feature controllable fusion
CN110046356B (en) Label-embedded microblog text emotion multi-label classification method
CN111027595A (en) Double-stage semantic word vector generation method
Islam et al. InceptB: a CNN based classification approach for recognizing traditional bengali games
CN110297888A (en) A kind of domain classification method based on prefix trees and Recognition with Recurrent Neural Network
CN113051914A (en) Enterprise hidden label extraction method and device based on multi-feature dynamic portrait
KR20200010672A (en) Smart merchandise searching method and system using deep learning
CN115952292B (en) Multi-label classification method, apparatus and computer readable medium
CN112733764A (en) Method for recognizing video emotion information based on multiple modes
CN116842194A (en) Electric power semantic knowledge graph system and method
CN111898704A (en) Method and device for clustering content samples
CN109344911B (en) Parallel processing classification method based on multilayer LSTM model
CN107423697A (en) Activity recognition method based on non-linear fusion depth 3D convolution description
CN112347252B (en) Interpretability analysis method based on CNN text classification model
CN111708865B (en) Technology forecasting and patent early warning analysis method based on improved XGboost algorithm
CN113705715B (en) Time sequence classification method based on LSTM and multi-scale FCN
CN115422945A (en) Rumor detection method and system integrating emotion mining

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
GR01 Patent grant
GR01 Patent grant