Method and apparatus for detecting comments

Through the graph neural network based on relationship network detection, the historical association relationship and attribute information of the comment object are used to solve the problem of difficult detection of false comments in the existing technology, and improve the detection accuracy.

CN113779276BActive Publication Date: 2025-01-17BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110040853.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-13
Publication Date
2025-01-17
Estimated Expiration
2041-01-13

AI Technical Summary

Technical Problem

The existing false comment detection methods are difficult to distinguish between real comments and imitation comments, resulting in a decrease in the accuracy of false comment detection, affecting the order of e-commerce platforms and consumer trust.

Method used

A graph neural network based on relationship network training is used to extract the feature vectors of the associated object to be detected, and the detection results are generated through the historical comment relationship and attribute information of the associated object, and the feature vectors of the comment publisher and the comment object are fused for detection.

Benefits of technology

It improves the accuracy of false comment detection, can more comprehensively consider the relationship between comments and comment publishers or comment objects, and enhances the ability to identify abnormal comments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113779276B_ABST
    Figure CN113779276B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a method and device for detecting comments. A specific implementation of the method includes: extracting feature vectors of associated objects of the comments to be detected using a graph neural network obtained through training based on a relational network, wherein nodes in the relational network represent objects, edges in the relational network represent that the historical comments of the two objects connected have a preset association, and the associated objects of the comments to be detected include the object that posted the comments to be detected and / or the object commented on by the comments to be detected; based on the feature vectors of the associated objects of the comments to be detected, generating a detection result indicating whether the comments to be detected are abnormal comments. This implementation helps to improve the accuracy of the detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method and device for detecting comments. Background Art

[0002] With the continuous development of mobile terminals and payment technology, e-commerce has also developed steadily. More and more users are beginning to consume on e-commerce platforms to obtain various daily necessities or services. Under the current e-commerce model, users cannot personally experience the goods or services. Generally, they judge whether the goods or services meet their needs by browsing other consumers' comments on the goods or services.

[0003] Due to the importance of consumers' comments on goods or services, e-commerce platforms or users publish some false comments for profit. For example, merchants attract consumers to post false comments by giving cash back for favorable comments or giving away free gifts, thereby increasing the favorable comments rate of goods or services and promoting the sales volume of goods or services. In addition, some merchants, in order to suppress their competitors, hire individuals or groups to post a large number of low-rated comments on the goods or services of their competitors in order to reduce the favorable comments rate of their goods or services. False comments will seriously affect the order of e-commerce platforms, mislead consumers, and have a negative impact on some normal merchants.

[0004] At present, commonly used methods for detecting fake comments include detection based on text features. Specifically, detection based on text features generally trains word vectors based on the comment text, and then uses methods such as deep learning to detect the comment text. However, many publishers of fake comments deliberately imitate the comments of real users to publish fake comments, making it increasingly difficult to distinguish between real and fake comments based on text features. Summary of the invention

[0005] The embodiments of the present disclosure provide a method and apparatus for detecting comments.

[0006] In a first aspect, an embodiment of the present disclosure provides a method for detecting comments, the method comprising: extracting feature vectors of associated objects of the comments to be detected using a graph neural network obtained through training based on a relational network, wherein nodes in the relational network represent objects, edges in the relational network represent that the historical comments of two connected objects have a preset association, and the associated objects of the comments to be detected include the object that posted the comments to be detected and / or the object commented on by the comments to be detected; based on the feature vectors of the associated objects of the comments to be detected, generating a detection result indicating whether the comments to be detected are abnormal comments.

[0007] In some embodiments, the training data of the graph neural network is obtained through the following steps: splitting the node object set corresponding to the relationship network into a labeled object set and an unlabeled object set, wherein the label of the object is used to indicate whether the object is an associated object of an abnormal comment; for objects in the unlabeled object set, determining the label of the object based on the similarity between the comment attribute information of the object and the comment attribute information of each object in the labeled object set; and using the labels corresponding to each object in the node object set as training data.

[0008] In some embodiments, the comment attribute information of an object in the node object set includes association attribute information, wherein the association attribute information of the object indicates whether the historical comments of the object have a preset association with the historical comments of other objects in the node object set.

[0009] In some embodiments, the comment attribute information of objects in the node object set also includes meta-attribute information, wherein the meta-attribute information does not include associated attribute information; and the similarity between the comment attribute information of unlabeled objects in the unlabeled object set and the comment attribute information of tagged objects in the tagged object set is determined by the following steps: determining the similarity between the associated attribute information of the unlabeled objects and the associated attribute information of the tagged objects as the first similarity; determining the similarity between the meta-attribute information of the unlabeled objects and the meta-attribute information of the tagged objects as the second similarity; and determining the similarity between the comment attribute information of the unlabeled objects and the comment attribute information of the tagged objects based on the weighted sum of the first similarity and the second similarity.

[0010] In some embodiments, the above-mentioned determining the label of the object based on the similarities between the comment attribute information of the object and the comment attribute information of each object in the labeled object set includes: determining the maximum similarity among the similarities between the comment attribute information of the object and the comment attribute information of each object in the labeled object set; and determining the label of the object corresponding to the maximum similarity as the label of the object.

[0011] In some embodiments, the above-mentioned method of extracting feature vectors of associated objects of the comments to be detected using a graph neural network obtained through training based on a relational network includes: selecting objects from a target object set according to the similarity between comment attribute information of the associated objects of the comments to be detected and comment attribute information of each object in a target object set, wherein the target object set is composed of objects represented by adjacent nodes of the associated objects of the comments to be detected in the relational network; determining nodes corresponding to the objects selected from the target object set as valid adjacent nodes corresponding to nodes of the associated objects of the comments to be detected; and obtaining feature vectors of the associated objects of the comments to be detected by aggregating feature information of valid adjacent nodes and feature information of nodes corresponding to the associated objects of the comments to be detected.

[0012] In some embodiments, the comment attribute information of the object in the target object set includes association attribute information, wherein the association attribute information of the object indicates whether the historical comments of the object have a preset association with the historical comments of other objects in the node object set corresponding to the relationship network.

[0013] In some embodiments, the comment attribute information of an object in the target object set also includes meta-attribute information, wherein the meta-attribute information does not include associated attribute information; and for an object in the target object set, the similarity between the comment attribute information of the object and the comment attribute information of an associated object of the comment to be detected is determined by the following steps: determining the similarity between the associated attribute information of the object and the associated attribute information of the associated object of the comment to be detected as a first similarity; determining the similarity between the meta-attribute information of the object and the meta-attribute information of the associated object of the comment to be detected as a second similarity; and determining the similarity between the comment attribute information of the object and the comment attribute information of the associated object of the comment to be detected based on the weighted sum of the first similarity and the second similarity.

[0014] In some embodiments, objects are selected from the target object set based on the similarity between the comment attribute information of the associated objects of the comments to be detected and the comment attribute information of each object in the target object set, including: selecting objects from the target object set whose corresponding similarity is greater than a preset threshold.

[0015] In some embodiments, the above-mentioned use of a graph neural network trained based on a relational network to extract feature vectors of objects associated with the comments to be detected includes: using a first graph neural network trained based on a first relational network to extract a first feature vector of the object that posted the comments to be detected, wherein the nodes in the first relational network represent the objects that posted the comments, and the edges in the first relational network represent that the two connected objects have comments on the same object; using a second graph neural network trained based on a second relational network to extract a second feature vector of the object commented on by the comments to be detected, wherein the nodes in the second relational network represent the commented objects, and the edges in the second relational network represent that the two connected objects have comments posted by the same object.

[0016] In some embodiments, the above-mentioned generating a detection result indicating whether the comment to be detected is an abnormal comment based on the feature vector of the associated object includes: obtaining the feature vector of the comment to be detected; generating a detection result indicating whether the comment to be detected is an abnormal comment based on the first feature vector, the second feature vector and the feature vector of the comment to be detected.

[0017] In some embodiments, the above-mentioned generation of a detection result indicating whether the comment to be detected is an abnormal comment based on the first feature vector, the second feature vector and the feature vector of the comment to be detected includes: fusing the first feature vector, the second feature vector and the feature vector of the comment to be detected to obtain a fused feature vector; inputting the fused feature vector into a pre-trained comment detection model to obtain a detection result of the comment to be detected.

[0018] In a second aspect, an embodiment of the present disclosure provides a device for detecting comments, the device comprising: an extraction unit, configured to extract feature vectors of associated objects of the comments to be detected using a graph neural network trained based on a relational network, wherein nodes in the relational network represent objects, edges in the relational network represent that the historical comments of the two connected objects have a preset association, and the associated objects of the comments to be detected include the objects that posted the comments to be detected and / or the objects commented on by the comments to be detected; a generation unit, configured to generate a detection result indicating whether the comment to be detected is an abnormal comment based on the feature vectors of the associated objects of the comments to be detected.

[0019] In some embodiments, the training data of the graph neural network is obtained through the following steps: splitting the node object set corresponding to the relationship network into a labeled object set and an unlabeled object set, wherein the label of the object is used to indicate whether the object is an associated object of an abnormal comment; for objects in the unlabeled object set, determining the label of the object based on the similarity between the comment attribute information of the object and the comment attribute information of each object in the labeled object set; and using the labels corresponding to each object in the node object set as training data.

[0020] In some embodiments, the comment attribute information of an object in the node object set includes association attribute information, wherein the association attribute information of the object indicates whether the historical comments of the object have a preset association with the historical comments of other objects in the node object set.

[0021] In some embodiments, the comment attribute information of objects in the node object set also includes meta-attribute information, wherein the meta-attribute information does not include associated attribute information; and the similarity between the comment attribute information of unlabeled objects in the unlabeled object set and the comment attribute information of tagged objects in the tagged object set is determined by the following steps: determining the similarity between the associated attribute information of the unlabeled objects and the associated attribute information of the tagged objects as the first similarity; determining the similarity between the meta-attribute information of the unlabeled objects and the meta-attribute information of the tagged objects as the second similarity; and determining the similarity between the comment attribute information of the unlabeled objects and the comment attribute information of the tagged objects based on the weighted sum of the first similarity and the second similarity.

[0022] In some embodiments, the above-mentioned determining the label of the object based on the similarities between the comment attribute information of the object and the comment attribute information of each object in the labeled object set includes: determining the maximum similarity among the similarities between the comment attribute information of the object and the comment attribute information of each object in the labeled object set; and determining the label of the object corresponding to the maximum similarity as the label of the object.

[0023] In some embodiments, the extraction unit is further configured to: select objects from the target object set according to the similarity between the comment attribute information of the associated objects of the comment to be detected and the comment attribute information of each object in the target object set, wherein the target object set is composed of objects represented by adjacent nodes of the associated objects of the comment to be detected in the relationship network; determine the nodes corresponding to the objects selected from the target object set as valid adjacent nodes of the nodes corresponding to the associated objects of the comment to be detected; obtain the feature vector of the associated objects of the comment to be detected by aggregating the feature information of the valid adjacent nodes and the feature information of the nodes corresponding to the associated objects of the comment to be detected.

[0024] In some embodiments, the comment attribute information of the object in the target object set includes association attribute information, wherein the association attribute information of the object indicates whether the historical comments of the object have a preset association with the historical comments of other objects in the node object set corresponding to the relationship network.

[0025] In some embodiments, the comment attribute information of an object in the target object set also includes meta-attribute information, wherein the meta-attribute information does not include associated attribute information; and for an object in the target object set, the similarity between the comment attribute information of the object and the comment attribute information of an associated object of the comment to be detected is determined by the following steps: determining the similarity between the associated attribute information of the object and the associated attribute information of the associated object of the comment to be detected as a first similarity; determining the similarity between the meta-attribute information of the object and the meta-attribute information of the associated object of the comment to be detected as a second similarity; and determining the similarity between the comment attribute information of the object and the comment attribute information of the associated object of the comment to be detected based on the weighted sum of the first similarity and the second similarity.

[0026] In some embodiments, objects are selected from the target object set based on the similarity between the comment attribute information of the associated objects of the comments to be detected and the comment attribute information of each object in the target object set, including: selecting objects from the target object set whose corresponding similarity is greater than a preset threshold.

[0027] In some embodiments, the extraction unit is further configured to: extract a first feature vector of the object that posted the comment to be detected by using a first graph neural network trained based on a first relationship network, wherein the nodes in the first relationship network represent the objects that posted the comments, and the edges in the first relationship network represent that the two connected objects have comments on the same object; and extract a second feature vector of the object commented on by the comment to be detected by using a second graph neural network trained based on a second relationship network, wherein the nodes in the second relationship network represent the commented objects, and the edges in the second relationship network represent that the two connected objects have comments posted by the same object.

[0028] In some embodiments, the generation unit is further configured to: obtain a feature vector of the comment to be detected; and generate a detection result indicating whether the comment to be detected is an abnormal comment based on the first feature vector, the second feature vector and the feature vector of the comment to be detected.

[0029] In some embodiments, the generation unit is further configured to: fuse the first feature vector, the second feature vector and the feature vector of the comment to be detected to obtain a fused feature vector; input the fused feature vector into a pre-trained comment detection model to obtain a detection result of the comment to be detected.

[0030] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.

[0031] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.

[0032] The method and device for detecting comments provided by the embodiments of the present disclosure extract the feature vector of the object commented on by the to-be-detected comment or the object that published the to-be-detected comment through a graph neural network pre-trained based on a relational network, and then detect the to-be-detected comment based on the obtained feature vector of the associated object. Since the relational network can characterize the preset association between historical comments of different objects, the feature extraction method based on the graph neural network can more comprehensively consider the association between the comment and the publisher of the comment or the object commented on by the comment, and combine some characteristics of abnormal comments such as false comments, such as the concentrated comment time, the commented object has a large number of abnormal comments, and the publishers of many abnormal comments may be the same, so that the feature vector extracted by the feature extraction based on the graph neural network can better distinguish normal comments from abnormal comments, thereby improving the accuracy of the detection results. BRIEF DESCRIPTION OF THE DRAWINGS

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

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

[0035] Figure 2 is a flow chart of an embodiment of a method for detecting comments according to the present disclosure;

[0036] Figure 3 is a schematic diagram of an embodiment of a method for acquiring training data of a graph neural network according to an embodiment of the present disclosure;

[0037] Figure 4 is a schematic diagram of an embodiment of a method for extracting a feature vector of an associated object of a comment to be detected by using a graph neural network in an embodiment of the present disclosure;

[0038] Figure 5 is a flow chart of yet another embodiment of a method for detecting comments according to the present disclosure;

[0039] Figure 6 is a schematic diagram of an application scenario of the method for detecting comments according to the present disclosure;

[0040] Figure 7 is a structural schematic diagram of an embodiment of an apparatus for detecting comments according to the present disclosure;

[0041] Figure 8 It is a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION

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

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

[0044] Figure 1 An exemplary architecture 100 is shown to which an embodiment of a method for detecting comments or an apparatus for detecting comments of the present disclosure can be applied.

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

[0046] The terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages, etc. Various client applications may be installed on the terminal devices 101, 102, 103, such as browser applications, shopping applications, social applications, instant messaging tools, etc.

[0047] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers and desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0048] The server 105 may be a server that provides various services, such as a backend server that provides support for the terminal devices 101, 102, and 103. The server 105 may receive the comments to be detected sent by the terminal devices 101, 102, and 103, and then detect the comments to be detected to obtain the detection results. Afterwards, the server 105 may feed back the detection results to the terminal devices 101, 102, and 103.

[0049] It should be noted that the above-mentioned comments to be detected can also be directly stored locally on the server 105, and the server 105 can directly extract the locally stored comments to be detected and process them. At this time, the terminal devices 101, 102, 103 and the network 104 may not exist.

[0050] It should be noted that the method for detecting comments provided by the embodiments of the present disclosure is generally executed by the server 105 , and accordingly, the device for detecting comments is generally disposed in the server 105 .

[0051] It should also be noted that comment detection tools may also be installed in the terminal devices 101, 102, and 103. In this case, the method for detecting comments may also be executed by the terminal devices 101, 102, and 103, and accordingly, the device for detecting comments may also be set in the terminal devices 101, 102, and 103. In this case, the exemplary system architecture 100 may not have the server 105 and the network 104.

[0052] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

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

[0054] Continue to refer Figure 2 , which shows a process 200 of an embodiment of a method for detecting comments according to the present disclosure. The method for detecting comments comprises the following steps:

[0055] Step 201, using a graph neural network trained based on a relational network to extract feature vectors of associated objects of the review to be detected.

[0056] In this embodiment, the nodes in the relationship network can represent objects, and the edges in the relationship network can represent that the historical comments of the two connected objects have a preset association. The relationship network can be pre-built by technical personnel according to actual needs. For example, the relationship network can be built based on historical comments collected from one or more e-commerce platforms, or from some public data sets.

[0057] The objects represented by different nodes in the relationship network may be associated objects of different comments. The associated objects of each comment may include the object that published the comment and / or the object commented on by the comment. For example, for a comment on an item, the associated objects of the comment may include the publisher of the comment and / or the item commented on by the comment.

[0058] In different application scenarios, the granularity of the objects associated with comments can be different. For example, the objects that publish comments can include but are not limited to: users, units, third-party platforms, etc. The objects commented on by comments can include but are not limited to: items, services, merchants, stores, etc.

[0059] It should be noted that the nodes in the relationship network are usually nodes of the same type. In other words, the nodes in the relationship network can all represent the objects that post comments, or can all represent the objects commented on by the comments.

[0060] The preset association may be any association between comments that is preset according to actual application requirements or application scenarios. For example, the preset association may refer to the time difference between the release times of two comments being less than a preset threshold.

[0061] Optionally, the preset association may refer to that the two comments have the same associated object. Specifically, the object that publishes the two comments may be the same, or the object commented on by the two comments may be the same.

[0062] Since many abnormal comments (such as false comments, etc.) may be posted by the same publisher, and different publishers may post a large number of abnormal comments on the same object, therefore, by recording that two comments have the same associated objects through the relationship network, the graph neural network can be better trained to extract the association between the comments, so that the extraction results of the graph neural network can more accurately distinguish normal comments from abnormal comments.

[0063] Graph Neural Networks (GNN) is a method based on deep learning to process graph domain information. Graph neural networks can act directly on the graph structure, convert the entire graph, each node, and each edge in the graph into a vector representation, and then combine deep learning to complete various tasks. For example, graph neural networks can be used for node classification. Specifically, graph neural networks can learn the vector representation of each node to determine the associated label or category corresponding to each node.

[0064] In this embodiment, the review to be detected may be any review determined according to application requirements. The associated object of the review to be detected may include the object that published the review to be detected and / or the object commented on by the review to be detected. The feature vector (embedding) of the review to be detected may be a feature used to characterize the review to be detected.

[0065] The pre-trained graph neural network can process the relationship network including the node indicating the comment to be detected, so as to extract the feature vector of the node indicating the comment to be detected, which is the feature vector of the comment to be detected.

[0066] It should be noted that when the associated objects of the comments to be detected only include the objects that published the comments to be detected, the first graph neural network trained based on the first relationship network can be used to extract the first feature vector used to characterize the features of the object that published the comments to be detected. Different nodes in the first relationship network can represent publishers of different comments, and the edges in the first relationship network can represent that the two connected publishers have comments on the same object, that is, the two publishers have published comments on the same object. For example, the existence of an edge between two nodes can indicate that the publishers indicated by the two nodes have published comments on the same item or service.

[0067] When the associated objects of the review to be detected only include the objects commented on by the review to be detected, the second graph neural network trained based on the second relationship network can be used to extract the second feature vector used to characterize the features of the objects commented on by the review to be detected. Different nodes in the second relationship network can represent objects commented on by different comments, and the edges in the second relationship network can represent that the two connected objects have comments posted by the same object, that is, the two objects have been commented on by the same publisher. For example, the existence of an edge between two nodes can indicate that the items or services indicated by the two nodes have been commented on by the same user.

[0068] When the associated objects of the comments to be detected include the object that posted the comments to be detected and the objects commented on by the comments to be detected, the first graph neural network and the second graph neural network mentioned above can be used to respectively extract the feature vectors of the object that posted the comments to be detected and the feature vectors of the objects commented on by the comments to be detected.

[0069] It should also be noted that the above-mentioned first relationship network, second relationship network, first graph neural network, second graph neural network, first feature vector, and second feature vector are only used to distinguish different relationship networks, graph neural networks, feature vectors, etc., and do not constitute special limitations on relationship networks, graph neural networks, and feature vectors.

[0070] In this embodiment, the graph neural network can be trained using a machine learning method based on pre-acquired training data. For example, the training data may include the category label of the object represented by each node in the graph neural network, and then the graph neural network is trained to learn the feature vector of the node, and the node is classified according to the feature vector of the node, and the category indicated by the category label of each node in the training data is used as the expected output to train the graph neural network.

[0071] Among them, the category labels in the training data can be obtained in advance from a third-party data platform or by manual annotation. Taking the above-mentioned first graph neural network as an example, the category labels in the corresponding training data can be used to indicate whether the object of the comment represented by each node in the first relationship network has posted an abnormal comment. Taking the above-mentioned second graph neural network as an example, the category labels in the corresponding training data can be used to indicate whether the object of the comment represented by each node in the second relationship network has an abnormal comment.

[0072] The type and structure of the graph neural network used for training can be preset by the technician according to the actual application requirements. For example, the initial graph neural network can be an untrained or existing untrained graph convolutional network.

[0073] Step 202: Generate a detection result indicating whether the comment to be detected is an abnormal comment according to the feature vector of the associated object of the comment to be detected.

[0074] In this embodiment, the type of abnormal comments can be flexibly set in advance according to the application requirements or application scenarios of the time. For example, abnormal comments include but are not limited to: false comments, comments with strong personal bias, irrelevant comments posted to increase the total number of comments, etc.

[0075] After obtaining the feature vector of the associated object of the comment to be detected, various methods can be flexibly adopted to generate the detection result of the comment to be detected.

[0076] For example, the feature vectors of the associated objects of several abnormal comments can be collected in advance, and then the similarities between the feature vectors of the associated objects of the comments to be detected and the feature vectors of the associated objects of each abnormal comment collected in advance can be determined, and the average value of each similarity can be determined. If the average value obtained is greater than a preset threshold, the comment to be detected can be considered to be an abnormal comment. Correspondingly, if the average value obtained is not greater than the preset threshold, the comment to be detected can be considered to be a normal comment.

[0077] Optionally, a pre-trained comment detection model can be used to process the feature vector of the associated object of the comment to be detected to obtain the detection result of the comment to be detected. The comment detection model can be used to characterize the correspondence between the feature vector of the associated object of the comment and the detection result of the comment.

[0078] The comment detection model can be trained using machine learning methods based on pre-acquired training data. For example, the training data can include feature vectors of several abnormal comments and feature vectors of several normal comments. The initial comment detection model can be a classification model built by technicians or some existing classification models, etc., and then the feature vectors in the training data are used as the input of the initial comment detection model, and the comment category (such as normal or abnormal) corresponding to the input feature vector is used as the expected output, and the comment detection model is obtained by training based on algorithms such as gradient descent and back propagation.

[0079] Optionally, a feature vector for characterizing the features of the comment to be detected may be obtained, and then a detection result of the comment to be detected may be generated based on the obtained feature vector of the associated object of the comment to be detected and the feature vector of the comment to be detected. For example, a pre-trained comment detection model may be used to process the feature vector of the comment to be detected and the feature vector of the associated object of the comment to be detected to obtain the detection result of the comment to be detected.

[0080] For another example, the feature vector of the comment to be detected and the feature vector of the associated object of the comment to be detected can be fused first, and then the detection result of the comment to be detected can be obtained based on the fusion result. Among them, the feature vector of the comment to be detected and the feature vector of the associated object of the comment to be detected can be fused by various existing feature fusion methods. For example, the feature vector of the comment to be detected and the feature vector of the associated object of the comment to be detected can be directly spliced ​​to obtain the fusion result. After obtaining the fusion result, the fusion result can be processed using a pre-trained comment detection model to obtain the detection result of the comment to be detected.

[0081] In this way, the features of the review to be detected and the features of the objects associated with the review to be detected can be combined to more comprehensively detect and analyze the review to be detected, thereby helping to improve the accuracy of the detection results.

[0082] It should be noted that when the associated objects of the comments to be detected include the object that posted the comments to be detected and the object commented on by the comments to be detected, a first feature vector for characterizing the features of the object that posted the comments to be detected and a second feature vector for characterizing the features of the object commented on by the comments to be detected can be obtained. At this time, the first feature vector and the second feature vector can be combined to generate the detection result of the comments to be detected.

[0083] The method provided by the above-mentioned embodiments of the present disclosure uses a graph neural network pre-trained based on a relational network to learn the association between comments and the publishers of comments or the objects commented on by the comments, based on some characteristics of abnormal comments, such as concentrated comment time, a large number of abnormal comments on the commented objects, and the publishers of many abnormal comments may be the same, so as to improve the accuracy of the detection results for abnormal comments.

[0084] Continue to see Figure 3 , Figure 3 300 is a schematic diagram of an embodiment of a method for acquiring training data of a graph neural network in an embodiment of the present disclosure. The training data of the graph neural network can be obtained by the following steps:

[0085] Step 301: split the node object set corresponding to the relationship network into a labeled object set and an unlabeled object set.

[0086] In this embodiment, the node object set corresponding to the relationship network may be composed of objects represented by each node in the relationship network. The label of the object may be used to indicate whether the object is an associated object of an abnormal comment. In some cases, such as some e-commerce platforms have a large amount of comment data, but only a small amount of comment data can be determined to be abnormal comments or not, and most of the comment data cannot be determined to be abnormal comments.

[0087] When the associated objects of the abnormal comments include the objects that posted the comments to be detected, each object in the labeled object set may have a corresponding label, that is, it can be determined whether each object in the labeled object set has posted abnormal comments in the past or not. Each object in the unlabeled object set does not have a corresponding label, that is, it is still impossible to determine whether each object in the unlabeled object set has posted abnormal comments.

[0088] When the associated object of the abnormal comment includes the object commented on by the to-be-detected comment, each object in the labeled object set may have a corresponding label, that is, it can be determined whether the historical comments of each object in the labeled object set include abnormal comments or not. Each object in the unlabeled object set does not have a corresponding label, that is, it is still impossible to determine whether the historical comments of each object in the unlabeled object set include abnormal comments.

[0089] In step 302, for an object in the unlabeled object set, a label of the object is determined according to the similarity between the comment attribute information of the object and the comment attribute information of each object in the labeled object set.

[0090] In this embodiment, the comment attribute information of the object in the node object set can be used to represent various attributes of the object. The comment attribute information of the object can be different according to different objects or different application scenarios and application requirements. Generally, the comment attribute information of the object can be set according to the characteristics of the abnormal comments.

[0091] For example, generally speaking, those who post abnormal comments tend to post a large number of comments in a certain period of time. Therefore, the comments posted by these subjects usually have the characteristics of a small total number of comments, a high rate of positive comments, a low rate of negative comments, and a short time difference between the most recent comment and the first comment.

[0092] Based on this, when the object is an object that publishes comments, the object's comment attribute information may include but is not limited to: the total number of comments published by the object, the positive review rate (that is, the quotient of the total number of comments published by the object indicating positive reviews and the total number of comments published) and negative review rate (that is, the quotient of the total number of comments published by the object indicating negative reviews and the total number of comments published), the publication time difference between the object's most recent comment and the object's first comment, etc.

[0093] For another example, in general, the objects commented on by abnormal comments usually have a higher rate of positive comments and a lower rate of negative comments, and the time difference between the latest comment received and the first comment received is short, and the number of transactions for the object in the historical time period is small.

[0094] Based on this, when the object is the object of a comment, the comment attribute information of the object may include but is not limited to: the difference in publishing time between the latest comment received by the object and the first comment received, the positive and negative review rates of the received comments, the number of transactions for the object in the historical time period, etc.

[0095] It should be noted that the specific comment attribute information used can be set according to the actual application scenario. For example, abnormal comments on different e-commerce platforms may have different characteristics, and abnormal comments on the same e-commerce platform in different time periods may also have different characteristics. Therefore, the comment attribute information used can be flexibly set.

[0096] Optionally, the comment attribute information of the objects in the node object set may include association attribute information, wherein the association attribute information of each object in the node object set may indicate whether the historical comments of the object have a preset association with the historical comments of other objects in the node object set.

[0097] The preset association may refer to any association between comments that is preset according to actual application requirements or application scenarios. Alternatively, the preset association may refer to a preset relationship corresponding to an edge in a relationship network.

[0098] When each node in the relationship network represents an object that posts comments, the historical comments of the object may include the comments that the object has posted in the past. In this case, the preset association may mean that the objects (such as items or services) commented on by the two comments are the same. For each object in the node object set, the association attribute information of the object may indicate whether the object has posted comments on the same object (such as an item or service) as other objects in the node object set.

[0099] For example, the node object set includes objects A, B, C, and D. For object A, objects A and B have both published comments on item X, so there is a preset association between objects A and B. Objects A and C have both published comments on item Y, so there is a preset association between objects A and C. Objects A and D have not published comments on the same item, so there is no preset association between objects A and D.

[0100] When each node in the relationship network represents an object commented on by a comment, the historical comments of the object may include the historical comments of the object. In this case, the preset association may refer to the publisher of the two comments being the same. For each object in the node object set, the association attribute information of the object may indicate whether the object and other objects in the node object set have comments published by the same publisher.

[0101] For example, the node object set includes objects E, F, G, and H. For object E, objects E and F both have comments published by publisher M, so there is a preset association between objects E and F. Objects E and G both have comments published by publisher N, so there is a preset association between objects E and G. Objects E and H do not have comments published by the same publisher, so there is no preset association between objects E and H.

[0102] Optionally, the comment attribute information of the object in the node object set may include meta attribute information in addition to the above-mentioned associated attribute information. It should be noted that the meta attribute information does not include the associated attribute information.

[0103] Among them, meta-attribute information may refer to some basic attributes of historical comments published by the object. For example, when the object is the object that publishes comments, the meta-attribute information includes but is not limited to: the total number of comments published by the object, the rate of positive and negative comments corresponding to the comments published by the object, the time difference between the last comment published by the object and the first comment published by the object, etc. When the object is the object commented on by the comment, the meta-attribute information of the object may include but is not limited to: the time difference between the latest comment received by the object and the first comment received, the rate of positive and negative comments received, the number of transactions for the object in the historical time period, etc.

[0104] For each object in the unlabeled object set, various existing similarity calculation methods (such as cosine similarity, Euclidean distance, etc.) can be used to calculate the similarity between the comment attribute information of the object and each object in the labeled object set to obtain a similarity set.

[0105] Optionally, when the comment attribute information of the object in the node object set includes associated attribute information and meta attribute information, for each unlabeled object in the unlabeled object set, the similarity between the comment attribute information of the unlabeled object and the comment attribute information of each labeled object in the labeled object set can be determined by the following steps:

[0106] Step 1: Determine the similarity between the associated attribute information of the unlabeled object and the associated attribute information of the labeled object as the first similarity.

[0107] In this step, various existing similarity calculation methods can be used to calculate the similarity between the associated attribute information of the unlabeled object and the associated attribute information of the labeled object. For example, a similarity calculation method based on Euclidean distance can be used to calculate the similarity between the associated attribute information of the unlabeled object and the associated attribute information of the labeled object.

[0108] Step 2: Determine the similarity between the meta-attribute information of the unlabeled object and the meta-attribute information of the labeled object as a second similarity.

[0109] In this step, various existing similarity calculation methods can be used to calculate the similarity between the meta-attribute information of the unlabeled object and the meta-attribute information of the labeled object. For example, a similarity calculation method based on cosine similarity can be used to calculate the similarity between the associated attribute information of the unlabeled object and the associated attribute information of the labeled object.

[0110] Step three: determining the similarity between the comment attribute information of the unlabeled object and the comment attribute information of the labeled object according to the weighted sum of the first similarity and the second similarity.

[0111] In this step, the weights set for the associated attribute information and the meta-attribute information can be obtained first, and then the weighted sum of the first similarity and the second similarity can be calculated. After the weighted sum of the first similarity and the second similarity is obtained, the similarity between the comment attribute information of the unlabeled object and the comment attribute information of the labeled object can be flexibly determined according to the calculated weighted sum according to the actual application scenario.

[0112] For example, the weighted sum of the obtained first similarity and the second similarity can be directly used as the similarity between the comment attribute information of the unlabeled object and the comment attribute information of the labeled object. For another example, the weighted sum of the obtained first similarity and the second similarity can be further processed (such as multiplied by a preset experience value, etc.), and the further processed result can be used as the similarity between the comment attribute information of the unlabeled object and the comment attribute information of the labeled object.

[0113] After obtaining the similarity set, various methods can be flexibly adopted to determine the label of the object according to the obtained similarity set and actual application requirements.

[0114] For example, the labeled object set may be divided into a first object set and a second object set according to the labels of the objects in the labeled object set, wherein the labels of the objects in the first object set may indicate that the objects are associated objects of abnormal comments, and the labels of the objects in the second object set may indicate that the objects are not associated objects of abnormal comments.

[0115] Then, the similarities corresponding to the objects in the first object set are selected from the obtained similarity set to obtain the first similarity set, and the average value of the similarities in the first similarity set is calculated. At the same time, the similarities corresponding to the objects in the second object set are selected from the obtained similarity set to obtain the second similarity set, and the average value of the similarities in the second similarity set is calculated. Then the maximum value of the two average values ​​is determined. If the average value corresponding to the first similarity set is greater than the average value corresponding to the second similarity set, the label corresponding to the first object set is used as the label of the object in the unlabeled object set. If the average value corresponding to the first similarity set is not greater than the average value corresponding to the second similarity set, the label corresponding to the second object set is used as the label of the object in the unlabeled object set.

[0116] Optionally, the maximum similarity in the obtained similarity set may be determined first, and then the label of the object corresponding to the maximum similarity may be determined as the label of the object.

[0117] Step 303: Use the labels corresponding to the objects in the node object set as training data.

[0118] In this step, after obtaining the labels corresponding to each object in the unlabeled object set, all objects in the labeled object set and the unlabeled object set and the labels of each object can be used as training data to obtain a graph neural network based on relational network training to extract feature vectors of nodes in the relational network.

[0119] The method provided by the above-mentioned embodiment of the present disclosure uses labeled training data to label unlabeled training data, thereby effectively increasing the amount of training data without incurring excessive costs. For a large number of comments that cannot determine the corresponding labels, and only a small number of comments have corresponding labels, this method can be used to quickly expand the amount of training data, thereby improving the training effect of the graph neural network. In addition, when labeling unlabeled data, based on some characteristics of abnormal comments, some comment attribute information of the commented object is selected for similarity calculation, and labels are labeled based on the similarity calculation results, which can improve the accuracy of the labeling results for unlabeled data.

[0120] Further references Figure 4 , Figure 4 400 is a schematic diagram of an embodiment of a method for extracting feature vectors of associated objects of a review to be detected by a graph neural network in an embodiment of the present disclosure. The method for extracting feature vectors of associated objects of a review to be detected by a graph neural network includes the following steps:

[0121] Step 401 : selecting an object from the target object set according to the similarity between the comment attribute information of the associated object of the to-be-detected comment and the comment attribute information of each object in the target object set.

[0122] In this embodiment, the target object set may be composed of objects represented by adjacent nodes of nodes corresponding to the associated objects of the to-be-detected comments in the relationship network. For each node in the relationship network, the adjacent nodes of the node may refer to nodes having edges with the node.

[0123] The comment attribute information of an object can be used to represent various attributes of the object. The attribute information of an object may be different depending on the object or the application scenario or application requirement. Generally, the comment attribute information of an object may be set according to the characteristics of the abnormal comment.

[0124] For example, generally speaking, those who post abnormal comments tend to post a large number of comments in a certain period of time. Therefore, the comments posted by these subjects usually have the characteristics of a small total number of comments, a high rate of positive comments, a low rate of negative comments, and a short time difference between the most recent comment and the first comment.

[0125] Based on this, when the object is an object that publishes comments, the object's comment attribute information may include but is not limited to: the total number of comments published by the object, the positive review rate (that is, the quotient of the total number of comments published by the object indicating positive reviews and the total number of comments published) and negative review rate (that is, the quotient of the total number of comments published by the object indicating negative reviews and the total number of comments published), the publication time difference between the object's most recent comment and the object's first comment, etc.

[0126] For another example, in general, the objects commented on by abnormal comments usually have a higher rate of positive comments and a lower rate of negative comments, and the time difference between the latest comment received and the first comment received is short, and the number of transactions for the object in the historical time period is small.

[0127] Based on this, when the object is the object of a comment, the comment attribute information of the object may include but is not limited to: the difference in publishing time between the latest comment received by the object and the first comment received, the positive and negative review rates of the received comments, the number of transactions for the object in the historical time period, etc.

[0128] Optionally, the comment attribute information of the associated object of the to-be-detected comment and the comment attribute information of the object in the target object set may include associated attribute information. The associated attribute information of each object may indicate whether the historical comments of the object have a preset association with the historical comments of other objects in the node object set corresponding to the relationship network.

[0129] The preset association may refer to any association between comments that is preset according to actual application requirements or application scenarios. Alternatively, the preset association may refer to a preset relationship corresponding to an edge in a relationship network.

[0130] When each node in the relationship network represents an object that has posted a comment, the historical comments of the object may include the comments that the object has posted in the past. At this time, the preset association may mean that the objects (such as items or services) commented on by the two comments are the same. For each object in the associated object or target object set of the comment to be detected, the associated attribute information of the object may indicate whether the object has posted comments on the same object (such as an item or service) as other objects in the node object set.

[0131] When each node in the relationship network represents an object commented on by a comment, the historical comments of the object may include the historical comments of the object. In this case, the preset association may refer to the publisher of the two comments being the same. For each object in the associated object of the comment to be detected or in the target object set, the associated attribute information of the object may indicate whether the object has comments published by the same publisher as other objects in the node object set.

[0132] Optionally, the comment attribute information of the associated object of the to-be-detected comment and the comment attribute information of the object in the target object set may include meta-attribute information in addition to the above-mentioned associated attribute information. It should be noted that the meta-attribute information does not include the associated attribute information.

[0133] Among them, meta-attribute information may refer to some basic attributes of historical comments published by the object. For example, when the object is the object that publishes comments, the meta-attribute information includes but is not limited to: the total number of comments published by the object, the rate of positive and negative comments corresponding to the comments published by the object, the time difference between the last comment published by the object and the first comment published by the object, etc. When the object is the object commented on by the comment, the meta-attribute information of the object may include but is not limited to: the time difference between the latest comment received by the object and the first comment received, the rate of positive and negative comments received, the number of transactions for the object in the historical time period, etc.

[0134] In this embodiment, various existing similarity calculation methods (such as cosine similarity, Euclidean distance, etc.) can be flexibly used to calculate the similarity between the comment attribute information of the associated objects of the to-be-detected comment and the comment attribute information of each object in the target object set to obtain a similarity set.

[0135] Optionally, when the comment attribute information of the associated object of the to-be-detected comment and the comment attribute information of the object in the target object set include associated attribute information and meta-attribute information, for each object in the target object set, the similarity between the comment attribute information of the object and the comment attribute information of the associated object of the to-be-detected comment can be determined by the following steps:

[0136] Step 1: Determine the similarity between the associated attribute information of the object and the associated attribute information of the associated object of the comment to be detected as the first similarity.

[0137] In this step, various existing similarity calculation methods can be used to calculate the similarity between the associated attribute information of the object and the associated attribute information of the associated object of the comment to be detected. For example, a similarity calculation method based on Euclidean distance can be used to calculate the similarity between the associated attribute information of the object and the associated attribute information of the associated object of the comment to be detected.

[0138] Step 2: Determine the similarity between the meta-attribute information of the object and the meta-attribute information of the associated object of the comment to be detected as the second similarity.

[0139] In this step, various existing similarity calculation methods can be used to calculate the similarity between the meta-attribute information of the object and the meta-attribute information of the associated object of the comment to be detected. For example, a similarity calculation method based on cosine similarity can be used to calculate the similarity between the meta-attribute information of the object and the meta-attribute information of the associated object of the comment to be detected.

[0140] Step three: determining the similarity between the comment attribute information of the object and the comment attribute information of the associated object of the to-be-detected comment according to the weighted sum of the first similarity and the second similarity.

[0141] In this step, the weights set for the associated attribute information and the meta-attribute information can be obtained first, and then the weighted sum of the first similarity and the second similarity can be calculated. After the weighted sum of the first similarity and the second similarity is obtained, the similarity between the comment attribute information of the object and the comment attribute information of the associated object of the to-be-detected comment can be determined flexibly according to the calculated weighted sum according to the actual application scenario.

[0142] For example, the weighted sum of the obtained first similarity and the second similarity can be directly used as the similarity between the comment attribute information of the object and the comment attribute information of the associated object of the comment to be detected. For another example, the weighted sum of the obtained first similarity and the second similarity can be further processed (such as multiplied by a preset empirical value, etc.), and the further processed result is used as the similarity between the comment attribute information of the object and the comment attribute information of the associated object of the comment to be detected.

[0143] After calculating the similarity between the comment attribute information of the associated object of the to-be-detected comment and the comment attribute information of each object in the target object set, various methods can be used to select objects from the target object set according to actual application requirements. For example, a preset number of objects can be selected from the target object set in descending order of the corresponding similarity, wherein the preset number can be two-thirds of the total number of objects included in the target object set.

[0144] Optionally, objects with a corresponding similarity greater than a preset threshold value may be selected from the target object set, wherein the preset threshold value may be preset by a technician.

[0145] Step 402 : determining a node corresponding to an object selected from the target object set as a valid adjacent node of a node corresponding to an associated object of the comment to be detected.

[0146] Step 403 , by aggregating the feature information of the valid adjacent nodes and the feature information of the nodes corresponding to the associated objects of the to-be-detected comments, a feature vector of the associated objects of the to-be-detected comments is obtained.

[0147] In this embodiment, when the graph neural network is used for each node in the relational network, it can aggregate the feature information of the node and the feature information of the valid adjacent nodes of the node, and generate a feature vector of the node according to the aggregation result. The feature information of the node can refer to various information used to represent the characteristics of the node. For example, the feature information can be feature vectors in various forms.

[0148] For the node corresponding to the associated object of the comment to be detected in the relationship network, the feature information of the node and the feature information of the valid adjacent nodes of the node can also be aggregated, and the feature vector of the node can be generated according to the aggregation result.

[0149] It should be noted that the graph neural network can perform the aggregation of the above feature information once or multiple times according to needs, and use the final aggregation result as the feature vector of the node.

[0150] In general, the number of abnormal comments is much smaller than the number of normal comments. Therefore, when using the existing method of randomly selecting adjacent nodes or selecting all adjacent nodes, it is easy to aggregate the feature information of the nodes corresponding to the real comments for the nodes corresponding to the abnormal comments, resulting in unstable feature extraction results of the graph neural network. To address this problem, the graph neural network in the method provided in the above embodiment of the present disclosure extracts the feature vector of each node in the relationship network, selects the comment attribute information corresponding to the node and calculates the similarity of the comment attribute information according to the characteristics of the abnormal comments, and then selects the adjacent nodes according to the similarity calculation results, and uses the feature information of the selected adjacent nodes and the feature information of the node to aggregate and generate the feature vector of the node, thereby enabling the nodes corresponding to the abnormal comments to be aggregated to the feature information of the nodes corresponding to the abnormal comments, thereby improving the stability and accuracy of the feature extraction results of the graph neural network.

[0151] Continue to refer Figure 5 , which shows a process 500 of another embodiment of a method for detecting comments. The process 500 for detecting comments includes the following steps:

[0152] Step 501: extract a first feature vector of an object that posts a comment to be detected using a first graph neural network trained based on a first relationship network.

[0153] In this embodiment, different nodes in the first relationship network may represent publishers of different comments, and an edge in the first relationship network may represent that the two connected publishers have comments on the same object, that is, the two publishers have published comments on the same object. For example, the existence of an edge between two nodes may represent that the publishers indicated by the two nodes have published comments on the same item or service.

[0154] Step 502: extract a second feature vector of the object commented on by the review to be detected by using a second graph neural network trained based on the second relational network.

[0155] In this embodiment, different nodes in the second relationship network may represent objects commented on by different comments, and an edge in the second relationship network may represent that two connected objects have comments posted by the same object, that is, the two objects have been commented on by the same publisher. For example, the existence of an edge between two nodes may represent that the items or services indicated by the two nodes have been commented on by the same user.

[0156] Step 503: Obtain the feature vector of the comment to be detected.

[0157] In this embodiment, the feature vector of the review to be detected can be used to characterize the features of the review to be detected. Specifically, the feature vector of the review to be detected can be extracted using various existing natural language processing methods. For example, the feature vector of the review to be detected can be extracted using a pre-trained word vector extraction model.

[0158] According to different application requirements or application scenarios, the feature vector of the review to be detected can represent different features of the review to be detected. For example, the features represented by the feature vector of the review to be detected include but are not limited to: the release time, score, and text features of the review to be detected. Among them, the text features of the review to be detected include but are not limited to: the frequency of use of first-person words in the review to be detected, the proportion of use of preset punctuation marks (such as exclamation marks, question marks, etc.), the proportion of use of objective description words, the length of the review to be detected, etc.

[0159] Step 504: Generate a detection result indicating whether the comment to be detected is an abnormal comment based on the first feature vector, the second feature vector and the feature vector of the comment to be detected.

[0160] In this embodiment, the first feature vector, the second feature vector and the feature vector of the comment to be detected can be comprehensively analyzed to generate a detection result of the comment to be detected.

[0161] For example, the first feature vector, the second feature vector and the feature vector of the comment to be detected can be processed using a pre-trained comment detection model to obtain the detection result of the comment to be detected. At this time, the comment detection model is used to characterize the correspondence between the first feature vector of the publisher of the comment to be detected, the second feature vector of the object commented on by the comment to be detected and the feature vector of the comment to be detected, and the detection result of the comment to be detected.

[0162] Optionally, the first feature vector, the second feature vector and the feature vector of the comment to be detected may be fused to obtain a fused feature vector, and then the fused feature vector may be input into a pre-trained comment detection model to obtain a detection result of the comment to be detected.

[0163] Specifically, various existing feature fusion methods can be used to fuse the first feature vector, the second feature vector and the feature vector of the comment to be detected. For example, the first feature vector, the second feature vector and the feature vector of the comment to be detected can be directly concatenated to obtain a fusion result.

[0164] After obtaining the fusion result, the comment to be detected is detected by a comment detection model based on the correspondence between the first feature vector used to characterize the publisher of the comment to be detected, the second feature vector of the object commented on by the comment to be detected, and the fusion result of the feature vector of the comment to be detected and the detection result of the comment to be detected, so as to obtain the detection result.

[0165] Continue to see Figure 6 , Figure 6 FIG. 6 is an exemplary application scenario 600 of the method for detecting comments according to this embodiment. Figure 6 In the application scenario, the server 602 can obtain the comment C posted by user B on item A from the shopping application in the terminal 601. Then, a first graph neural network 603 trained based on the first relationship network constructed based on the publishers of the comments in the shopping application is used to obtain a feature vector 606 representing the characteristics of user B. At the same time, a second graph neural network 604 trained based on the second relationship network constructed based on the commented items in the shopping application is used to obtain a feature vector 607 representing the characteristics of item A. In addition, a pre-trained text vector extraction model 605 for extracting text vectors is used to extract a feature vector 608 of comment C.

[0166] Afterwards, the obtained feature vectors 606, 607 and 608 may be subjected to feature fusion to obtain a fusion result 609, and then the fusion result 609 may be input into a pre-trained comment detection model 610 to obtain a detection result 611 for comment C, and then the detection result 611 may be sent to the terminal 601 so that the user corresponding to the terminal 601 can understand whether comment C is a false comment. If comment C is a false comment, the user corresponding to the terminal 601 may delete comment C, and send a corresponding prompt to the merchant corresponding to item A and user B.

[0167] The method provided by the above-mentioned embodiment of the present disclosure utilizes the relationship network training constructed for the publisher of the comment and the object commented on by the comment to obtain the first graph neural network and the second graph neural network, and then utilizes the first graph neural network and the second graph neural network to obtain the feature vector for characterizing the characteristics of the publisher of the comment to be detected and the feature vector for characterizing the characteristics of the object commented on by the comment to be detected, respectively, and then combines the feature vector for characterizing the characteristics of the comment to be detected itself, fuses these three feature vectors, and generates the detection result of the comment to be detected according to the fusion result. Since abnormal comments have some characteristics in the comment itself, as well as the publisher of the comment and the object commented on by the comment, by fusing the above three feature vectors, the characteristics of the comment to be detected can be more comprehensively characterized, and normal comments and abnormal comments can be distinguished, thereby improving the accuracy of the detection result of the comment to be detected.

[0168] Further references Figure 7 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for detecting comments. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0169] like Figure 7 As shown, the apparatus 700 for detecting comments provided in this embodiment includes an extraction unit 701 and a generation unit 702. The extraction unit 701 is configured to extract a feature vector of an associated object of the comment to be detected using a graph neural network obtained through training based on a relational network, wherein a node in the relational network represents an object, an edge in the relational network represents that the historical comments of the two connected objects have a preset association, and the associated object of the comment to be detected includes an object that posted the comment to be detected and / or an object commented on by the comment to be detected; the generation unit 702 is configured to generate a detection result indicating whether the comment to be detected is an abnormal comment according to the feature vector of the associated object of the comment to be detected.

[0170] In the apparatus 700 for detecting comments in this embodiment, the specific processing of the extraction unit 701 and the generation unit 702 and the technical effects thereof can be referred to in Figure 2 The relevant descriptions of step 201 and step 202 in the corresponding embodiment are not repeated here.

[0171] In some optional implementations of the present embodiment, the training data of the graph neural network is obtained through the following steps: splitting the node object set corresponding to the relationship network into a labeled object set and an unlabeled object set, wherein the label of the object is used to indicate whether the object is an associated object of an abnormal comment; for objects in the unlabeled object set, determining the label of the object based on the similarity between the comment attribute information of the object and the comment attribute information of each object in the labeled object set; and using the labels corresponding to each object in the node object set as training data.

[0172] In some optional implementations of this embodiment, the comment attribute information of the object in the node object set includes association attribute information, wherein the association attribute information of the object indicates whether the historical comments of the object have a preset association with the historical comments of other objects in the node object set.

[0173] In some optional implementations of the present embodiment, the comment attribute information of the objects in the node object set also includes meta-attribute information, wherein the meta-attribute information does not include associated attribute information; and the similarity between the comment attribute information of the unlabeled objects in the unlabeled object set and the comment attribute information of the labeled objects in the labeled object set is determined by the following steps: determining the similarity between the associated attribute information of the unlabeled objects and the associated attribute information of the labeled objects as the first similarity; determining the similarity between the meta-attribute information of the unlabeled objects and the meta-attribute information of the labeled objects as the second similarity; and determining the similarity between the comment attribute information of the unlabeled objects and the comment attribute information of the labeled objects based on the weighted sum of the first similarity and the second similarity.

[0174] In some optional implementations of the present embodiment, the above-mentioned determining the label of the object based on the similarities between the comment attribute information of the object and the comment attribute information of each object in the labeled object set includes: determining the maximum similarity among the similarities between the comment attribute information of the object and the comment attribute information of each object in the labeled object set; and determining the label of the object corresponding to the maximum similarity as the label of the object.

[0175] In some optional implementations of the present embodiment, the extraction unit 701 is further configured to: select objects from the target object set according to the similarity between the comment attribute information of the associated objects of the comment to be detected and the comment attribute information of each object in the target object set, wherein the target object set is composed of objects represented by adjacent nodes of the associated objects of the comment to be detected in the relationship network; determine the nodes corresponding to the objects selected from the target object set as valid adjacent nodes of the nodes corresponding to the associated objects of the comment to be detected; obtain the feature vector of the associated objects of the comment to be detected by aggregating the feature information of the valid adjacent nodes and the feature information of the nodes corresponding to the associated objects of the comment to be detected.

[0176] In some optional implementations of the present embodiment, the comment attribute information of the object in the target object set includes association attribute information, wherein the association attribute information of the object indicates whether the historical comments of the object have a preset association with the historical comments of other objects in the node object set corresponding to the relationship network.

[0177] In some optional implementations of the present embodiment, the comment attribute information of the objects in the target object set also includes meta-attribute information, wherein the meta-attribute information does not include associated attribute information; and for the objects in the target object set, the similarity between the comment attribute information of the object and the comment attribute information of the associated objects of the comments to be detected is determined by the following steps: determining the similarity between the associated attribute information of the object and the associated attribute information of the associated objects of the comments to be detected as the first similarity; determining the similarity between the meta-attribute information of the object and the meta-attribute information of the associated objects of the comments to be detected as the second similarity; and determining the similarity between the comment attribute information of the object and the comment attribute information of the associated objects of the comments to be detected based on the weighted sum of the first similarity and the second similarity.

[0178] In some optional implementations of the present embodiment, objects are selected from the target object set based on the similarities between the comment attribute information of the associated objects of the comments to be detected and the comment attribute information of each object in the target object set, including: selecting objects from the target object set whose corresponding similarities are greater than a preset threshold.

[0179] In some optional implementations of the present embodiment, the extraction unit 801 is further configured to: extract a first feature vector of the object that posted the comment to be detected by using a first graph neural network trained based on a first relationship network, wherein the nodes in the first relationship network represent the objects that posted the comments, and the edges in the first relationship network represent that the two connected objects have comments on the same object; and extract a second feature vector of the object commented on by the comment to be detected by using a second graph neural network trained based on a second relationship network, wherein the nodes in the second relationship network represent the commented objects, and the edges in the second relationship network represent that the two connected objects have comments posted by the same object.

[0180] In some optional implementations of this embodiment, the above-mentioned generation unit 702 is further configured to: obtain a feature vector of the comment to be detected; and generate a detection result indicating whether the comment to be detected is an abnormal comment based on the first feature vector, the second feature vector and the feature vector of the comment to be detected.

[0181] In some optional implementations of the present embodiment, the generation unit 702 is further configured to: fuse the first feature vector, the second feature vector and the feature vector of the comment to be detected to obtain a fused feature vector; input the fused feature vector into a pre-trained comment detection model to obtain a detection result of the comment to be detected.

[0182] The device provided by the above-mentioned embodiment of the present disclosure extracts the feature vector of the associated object of the comment to be detected by using the graph neural network obtained by training based on the relational network through the extraction unit, wherein the nodes in the relational network represent objects, the edges in the relational network represent that the historical comments of the two connected objects have a preset association, and the associated objects of the comment to be detected include the object that posted the comment to be detected and / or the object commented on by the comment to be detected; the generation unit generates a detection result indicating whether the comment to be detected is an abnormal comment based on the feature vector of the associated object of the comment to be detected, so that based on some characteristics of abnormal comments such as concentrated comment time, a large number of abnormal comments on the commented object, and the publishers of many abnormal comments may be the same, the graph neural network pre-trained based on the relational network can be used to learn the association relationship between the comment and the publisher of the comment or the object commented on by the comment, thereby improving the accuracy of the detection results for abnormal comments.

[0183] Reference below Figure 8 , which shows an electronic device (eg, Figure 1 A schematic diagram of the structure of a server or terminal device in FIG. 800. Figure 8 The server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

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

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

[0186] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0187] It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0188] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: uses a graph neural network trained based on a relational network to extract feature vectors of associated objects of the comments to be detected, wherein nodes in the relational network represent objects, edges in the relational network represent that the historical comments of the two connected objects have a preset association, and the associated objects of the comments to be detected include the object that posted the comments to be detected and / or the object commented on by the comments to be detected; generates a detection result indicating whether the comments to be detected are abnormal comments based on the feature vectors of the associated objects of the comments to be detected.

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

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

[0191] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The described units may also be arranged in a processor, for example, may be described as: a processor includes an extraction unit and a generation unit. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances. For example, the extraction unit may also be described as "a unit for extracting feature vectors of associated objects of the comments to be detected using a graph neural network obtained by training based on a relational network, wherein the nodes in the relational network represent objects, the edges in the relational network represent that the historical comments of the two connected objects have a preset association, and the associated objects of the comments to be detected include the objects that posted the comments to be detected and / or the objects commented on by the comments to be detected".

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

Claims

1. A method for detecting comments, comprising: The feature vector of the associated object of the comment to be detected is extracted using a graph neural network obtained by training based on a relational network, wherein the nodes in the relational network represent objects, the objects include associated objects of different comments, the edges in the relational network represent that the historical comments of the two connected objects have a preset association, the associated objects of the comment to be detected include the object that posted the comment to be detected and / or the object commented on by the comment to be detected, and the preset association represents that the time difference between the posting times of the two comments is less than a preset threshold, or the objects that posted the two comments are the same; Generating a detection result indicating whether the comment to be detected is an abnormal comment according to a feature vector of an associated object of the comment to be detected; The training data of the graph neural network is obtained through the following steps: Splitting the node object set corresponding to the relationship network into a labeled object set and an unlabeled object set, wherein the label of the object is used to indicate whether the object is an associated object of the abnormal comment, and the comment attribute information of the object in the node object set includes associated attribute information, and the associated attribute information of the object indicates whether the historical comments of the object have a preset association with the historical comments of other objects in the node object set; For an object in the unlabeled object set, determining a label of the object according to the similarity between the comment attribute information of the object and the comment attribute information of each object in the labeled object set; The labels corresponding to the objects in the node object set are used as training data.

2. The method according to claim 1, wherein: The comment attribute information of the object in the node object set also includes meta attribute information, wherein the meta attribute information does not include associated attribute information; and The similarity between the comment attribute information of the unlabeled objects in the unlabeled object set and the comment attribute information of the labeled objects in the labeled object set is determined by the following steps: Determine the similarity between the associated attribute information of the unlabeled object and the associated attribute information of the labeled object as a first similarity; Determine the similarity between the meta-attribute information of the unlabeled object and the meta-attribute information of the labeled object as a second similarity; The similarity between the comment attribute information of the untagged object and the comment attribute information of the tagged object is determined according to the weighted sum of the first similarity and the second similarity.

3. The method according to claim 1, wherein: Determining the label of the object according to the similarity between the comment attribute information of the object and the comment attribute information of each object in the labeled object set includes: Determine the maximum similarity among the similarities between the comment attribute information of the object and the comment attribute information of each object in the labeled object set; The label of the object corresponding to the maximum similarity is determined as the label of the object.

4. The method according to claim 1, wherein: The method of extracting the feature vector of the associated object of the review to be detected by using the graph neural network obtained by training the relational network includes: Selecting objects from the target object set according to the similarity between the comment attribute information of the associated object of the to-be-detected comment and the comment attribute information of each object in the target object set, wherein the target object set is composed of objects represented by adjacent nodes of the associated object of the to-be-detected comment in the relationship network; Determine a node corresponding to an object selected from the target object set as a valid adjacent node of a node corresponding to an associated object of the comment to be detected; The feature vector of the associated object of the comment to be detected is obtained by aggregating the feature information of the valid adjacent nodes and the feature information of the node corresponding to the associated object of the comment to be detected.

5. The method according to claim 4, wherein: The comment attribute information of the object in the target object set includes association attribute information, wherein the association attribute information of the object indicates whether the historical comments of the object have a preset association with the historical comments of other objects in the node object set corresponding to the relationship network.

6. The method according to claim 5, wherein: The comment attribute information of the object in the target object set also includes meta-attribute information, wherein the meta-attribute information does not include associated attribute information; and For an object in the target object set, the similarity between the comment attribute information of the object and the comment attribute information of the associated object of the to-be-detected comment is determined by the following steps: Determine the similarity between the associated attribute information of the object and the associated attribute information of the associated object of the comment to be detected as a first similarity; Determine the similarity between the meta-attribute information of the object and the meta-attribute information of the associated object of the comment to be detected as a second similarity; The similarity between the comment attribute information of the object and the comment attribute information of the associated object of the to-be-detected comment is determined according to the weighted sum of the first similarity and the second similarity.

7. The method according to claim 5, wherein: The selecting an object from the target object set according to the similarity between the comment attribute information of the associated object of the to-be-detected comment and the comment attribute information of each object in the target object set comprises: An object whose corresponding similarity is greater than a preset threshold is selected from the target object set.

8. The method according to claim 1, wherein: The method of extracting the feature vector of the associated object of the review to be detected by using the graph neural network obtained by training the relational network includes: Extracting a first feature vector of the object that posted the comment to be detected by using a first graph neural network trained based on the first relationship network, wherein a node in the first relationship network represents an object that posted a comment, and an edge in the first relationship network represents that two connected objects have comments on the same object; A second graph neural network trained based on a second relationship network is used to extract a second feature vector of the object commented on by the comment to be detected, wherein the nodes in the second relationship network represent the commented objects, and the edges in the second relationship network represent that two connected objects have comments posted by the same object.

9. The method according to claim 8, wherein: The step of generating a detection result indicating whether the comment to be detected is an abnormal comment according to the feature vector of the associated object includes: Obtaining a feature vector of the comment to be detected; A detection result indicating whether the comment to be detected is an abnormal comment is generated according to the first feature vector, the second feature vector and the feature vector of the comment to be detected.

10. The method according to claim 9, wherein: The step of generating a detection result indicating whether the comment to be detected is an abnormal comment according to the first feature vector, the second feature vector and the feature vector of the comment to be detected includes: fusing the first feature vector, the second feature vector, and the feature vector of the comment to be detected to obtain a fused feature vector; The fused feature vector is input into a pre-trained comment detection model to obtain a detection result of the comment to be detected.

11. A device for detecting comments, comprising: The extraction unit is configured to extract feature vectors of associated objects of the comments to be detected by using a graph neural network obtained through training based on a relational network, wherein nodes in the relational network represent objects, and the objects include associated objects of different comments, and edges in the relational network represent that historical comments of two connected objects have a preset association, and the associated objects of the comments to be detected include an object that posted the comments to be detected and / or an object commented on by the comments to be detected, and the preset association represents that the time difference between the posting times of the two comments is less than a preset threshold, or that the objects that posted the two comments are the same; A generating unit configured to generate a detection result indicating whether the comment to be detected is an abnormal comment according to a feature vector of an associated object of the comment to be detected; The training data of the graph neural network is obtained through the following steps: Splitting the node object set corresponding to the relationship network into a labeled object set and an unlabeled object set, wherein the label of the object is used to indicate whether the object is an associated object of the abnormal comment, and the comment attribute information of the object in the node object set includes associated attribute information, and the associated attribute information of the object indicates whether the historical comments of the object have a preset association with the historical comments of other objects in the node object set; For an object in the unlabeled object set, determining a label of the object according to the similarity between the comment attribute information of the object and the comment attribute information of each object in the labeled object set; The labels corresponding to the objects in the node object set are used as training data.

12. A server, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 10.

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

Citation Information

Patent Citations

  • Cheating user detection method, electronic equipment and computer readable storage medium

    CN110009430A