A social robot classification method and system
Through the social robot classification method based on transfer learning, using twin networks and text classification models to identify social robots, the problem of insufficient adaptability and interpretability of social robot classification methods in the prior art is solved, and efficient classification and accurate identification of social robots are achieved.
Patent Information
- Application Number
- CN202211039150.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-29
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-08-29
AI Technical Summary
The existing social robot classification methods cannot adapt to the changes in social robots, and lack universality and interpretability, making it difficult to identify different categories of social robots.
A social robot classification model is constructed based on transfer learning. By obtaining the blog content of the target social robot, the twin network and text classification model are used to identify content polluters, knowledge disseminators and news commentators, and combining topic relevance and opinion sentence recognition model to improve the universality and interpretability of classification.
It realizes efficient classification of social robots, improves the adaptability and recognition accuracy of the model, alleviates the problem of insufficient data, and enhances the recognition ability of social robots.
Smart Images

Figure CN115329085B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of social robot detection, and in particular to a social robot classification method and system. Background Art
[0002] With the rise of social networks like Twitter, Weibo, WeChat, and live streaming, people can now communicate and share information on a wide range of topics at any time. At the same time, the rapid development of artificial intelligence technology has given rise to social robots.
[0003] Given the diverse nature of social robots, distinguishing true from false is difficult. Therefore, research on detecting and classifying them is essential. This can help regulators identify their causes and, at the same time, allow them to adopt differentiated regulatory measures for different types of social robots. Social robots with positive impacts should be allowed to operate normally within certain limits. Those with negative impacts should be subject to focused regulation to limit their proliferation and development. This will foster a healthy and secure online environment for real users and promote social harmony and stability.
[0004] Currently, there are few studies on the classification of social robots in social networks. Existing studies mainly select the account features of social robots and then use classifiers to classify them. The main types are as follows:
[0005] First, some literature classifies abnormal users into publishers of product marketing advertisements, content polluters whose published content does not match the topic tag information, and publishers of offensive and abusive remarks. This paper extracts user content, behavior, attributes, and relationship features from social network datasets and selects the extreme gradient boosting (XGBoost) algorithm, which can effectively utilize multidimensional features and remains effective even when the sample set is severely imbalanced, to build a classification model.
[0006] Second, some literature divides social accounts into active harassment spam users, excessive attention spam users, repeated sending spam users, marketing advertising spam users and normal users. First, a one-to-many support vector machine (SVM) is selected to construct a multi-class classifier, and then fuzzy clustering is used for fuzzy processing to solve the problem of missed classification in the one-to-many SVM.
[0007] Third, a paper proposes a classification method that considers both benign and malicious bots. It categorizes social bots into three categories: broadcast bots, consumer bots, and spam bots. Broadcast bots are managed by specific organizations and primarily serve the purpose of information dissemination. Consumer bots aggregate content from diverse sources and provide update services, while spam bots, primarily targeting malicious bots, deliver malicious content. The paper first plots the cumulative distribution functions (CDFs) of several key attributes to understand the activity patterns of bots and human accounts. It then proposes corresponding classification features, and finally employs naive Bayesian, random forest, support vector machine, and logistic regression models for classification.
[0008] Fourth, some literature categorizes social media accounts into normal users, verified users, promoters, and trend hijackers. Promoters include accounts that post information containing malicious URLs. Trend hijackers include accounts that post tweets unrelated to the topic or event in order to promote specific products or services, and accounts that post tweets related to the topic or event for the purpose of opinion manipulation and political propaganda. This literature links similar accounts based on their shared applications and constructs a Markov random field model on the resulting similarity graph for classification.
[0009] All of the aforementioned literature extracts various account features through research, then performs feature selection or plots CDF curves to verify the effectiveness of the selected features. Finally, machine learning methods are used for multi-classification. However, these papers lack clear criteria for classifying different categories, nor do they propose targeted features to distinguish different types of social bots, resulting in poor interpretability.
[0010] Fifth, some literature has proposed more targeted detection features by analyzing the characteristics of tweets posted by each type of social bot. Social bots are categorized into bots, cyborgs, and human spammers. Bots' tweets use a very limited vocabulary and follow a highly structured pattern. Cyborgs tend to copy content from other sources and have a much larger vocabulary than typical bots. Spammers abuse algorithms to post a series of nearly indistinguishable tweets in order to deceive Twitter's spam detection protocols. Compared to methods that select features from general accounts, this type of method deeply analyzes the differences between different types of bots, summarizes patterns, and extracts features, further advancing research on social bot classification methods.
[0011] In summary, existing research has consistently extracted features based on social bot behavior and blog content for classification. However, the behavior and speech of bot accounts may adapt to changes in detection mechanisms and generation techniques. Consequently, existing classification schemes cannot effectively identify social bots that differ from their model paradigms. They can only learn from the characteristics of existing bot types and are unable to evolve over time. Therefore, it is crucial to design a classification method for social bots that can adapt to the ever-changing nature of social bots. Summary of the Invention
[0012] Based on this, an embodiment of the present invention provides a social robot classification method and system to improve the versatility and explainability of the classification method.
[0013] To achieve the above object, the present invention provides the following solutions:
[0014] A social robot classification method, comprising:
[0015] Obtain blog content about the target topic from the target social robot;
[0016] Inputting the blog content of the target social robot on the target topic into the social robot classification model to obtain the category of the target social robot; the categories include content polluters, knowledge disseminators, and news commentators; the social robot classification model includes a topic relevance target model and an opinion sentence recognition target model;
[0017] The content polluter indicates that the content of the blog post published by the target social robot is irrelevant to the target topic; the knowledge disseminator indicates that the content of the blog post published by the target social robot is relevant to the target topic and expresses opinions and views; the news commentator indicates that the content of the blog post published by the target social robot is relevant to the target topic and disseminates information and explains objective events;
[0018] The social robot classification model is determined as follows:
[0019] A source domain dataset is constructed based on a transfer learning method; the source domain dataset includes a first type of dataset and a second type of dataset; the first type of dataset includes original blog posts crawled from the Weibo platform and posted by accounts under set topics, original blog posts posted by accounts under topics related to the set topics, and corresponding classification labels; the classification labels include whether the account is a content polluter or a data knowledge disseminator; the second type of dataset includes opinion-based blog posts posted by accounts labeled as news commentators, generated by a social robot sample data generation model;
[0020] Determine a target domain dataset based on a social robot recognition model; the target domain dataset includes real blog posts of social robots with labeled categories;
[0021] Expanding the set topics in the source domain dataset and compressing the topic content to obtain a topic expansion sequence;
[0022] Determining the topic relevance target model based on the source domain dataset, the target domain dataset, the topic expansion sequence, and the twin network; the topic relevance target model is used to identify content polluters;
[0023] The opinion sentence recognition target model is determined based on the source domain dataset, the target domain dataset, the rule-based opinion sentence recognition method and the text classification model; the opinion sentence recognition target model is used for knowledge disseminators and news commentators.
[0024] Optionally, determining the topic relevance target model according to the source domain dataset, the target domain dataset, the topic expansion sequence, and the Siamese network specifically includes:
[0025] Inputting the source domain dataset and the topic expansion sequence into the twin network, performing preliminary training on the twin network with the goal of minimizing the mean square error function, and determining a similarity threshold of the twin network; when the account in the source domain dataset is a content polluter, the similarity between the original blog post content and the topic expansion sequence is less than the similarity threshold;
[0026] The twin network with the similarity threshold determined by preliminary training is used as the topic relevance source model;
[0027] Using the target domain dataset and the corresponding target domain topic filling sequence, fine-tuning the similarity threshold of the topic relevance source model;
[0028] The topic relevance source model after fine-tuning the similarity threshold is determined as the topic relevance target model.
[0029] Optionally, determining the opinion sentence recognition target model according to the source domain dataset, the target domain dataset, the rule-based opinion sentence recognition method, and the text classification model specifically includes:
[0030] Extracting sentence features of the source domain dataset; the sentence features include keyword features, position features, semantic features, and length features;
[0031] Normalizing and weighting the sentence features to obtain the opinion sentence score of each sentence;
[0032] determining an opinion sentence threshold of a rule-based opinion sentence recognition model according to the opinion sentence score;
[0033] Using data in the target domain dataset whose opinion sentence scores are less than the opinion sentence threshold to train a convolutional neural network, and determining the trained convolutional neural network as a text classification model;
[0034] The rule-based opinion sentence recognition model determined by the opinion sentence threshold and the text classification model constitute an opinion sentence recognition source model;
[0035] Using the target domain dataset to fine-tune the opinion sentence threshold and convolutional neural network parameters in the opinion sentence recognition source model;
[0036] The fine-tuned opinion sentence recognition source model is determined as the opinion sentence recognition target model.
[0037] Optionally, the expanding the set topics in the source domain dataset and compressing the topic content to obtain a topic expansion sequence specifically includes:
[0038] Crawling the lead content of topics related to the set topic, and generating an expanded document for the lead content of all related topics;
[0039] A graph-based sorting algorithm for text is used to extract keywords from the expanded document to obtain a topic expansion sequence.
[0040] Optionally, determining the target domain dataset based on the social robot recognition model specifically includes:
[0041] The social robot identification model is used to test and obtain real data on social robot types;
[0042] After manually labeling the real data and removing duplicate blog posts, valid social robot data is obtained;
[0043] The valid social robot data is determined as a target domain dataset.
[0044] Optionally, the twin network is a pre-trained Transformer-based bidirectional encoder.
[0045] Optionally, inputting the blog post content of the target social robot on the target topic into a social robot classification model to obtain the category of the target social robot specifically includes:
[0046] Inputting the blog content of the target social robot on the target topic into a topic relevance target model to identify whether the target social robot is a content polluter;
[0047] If the target social robot is not a content polluter, the blog post content of the target social robot on the target topic is input into the opinion sentence recognition target model to identify whether the target social robot is a knowledge disseminator or a news commentator.
[0048] The present invention also provides a social robot classification system for implementing the above method, comprising:
[0049] The blog content acquisition module is used to obtain the blog content of the target social robot on the target topic;
[0050] A classification and recognition module is configured to input the target social robot's blog post content on the target topic into a social robot classification model to obtain a category of the target social robot; the categories include content polluters, knowledge disseminators, and news commentators; the social robot classification model includes a topic relevance target model and an opinion sentence recognition target model;
[0051] The content polluter indicates that the content of the blog post published by the target social robot is irrelevant to the target topic; the knowledge disseminator indicates that the content of the blog post published by the target social robot is relevant to the target topic and expresses opinions and views; the news commentator indicates that the content of the blog post published by the target social robot is relevant to the target topic and disseminates information and explains objective events;
[0052] A classification model determination module, configured to determine the social robot classification model;
[0053] The classification model determination module specifically includes:
[0054] A source domain dataset construction unit is configured to construct a source domain dataset based on a transfer learning method; the source domain dataset includes a first type of dataset and a second type of dataset; the first type of dataset includes original blog posts crawled from a Weibo platform and posted by accounts under set topics, original blog posts posted by accounts under topics related to the set topics, and corresponding classification labels; the classification labels include whether the account is a content polluter or a data knowledge disseminator; the second type of dataset includes opinion-based blog posts posted by accounts labeled as news commentators, generated by a social robot sample data generation model;
[0055] A target domain dataset construction unit is used to determine a target domain dataset based on a social robot recognition model; the target domain dataset includes real blog posts of social robots with labeled categories;
[0056] A topic expansion and compression module, configured to expand the set topics in the source domain dataset and compress the topic content to obtain a topic expansion sequence;
[0057] a topic relevance target model determination module, configured to determine the topic relevance target model based on the source domain dataset, the target domain dataset, the topic expansion sequence, and the twin network; the topic relevance target model is used to identify content polluters;
[0058] The opinion sentence recognition target model determination module is used to determine the opinion sentence recognition target model based on the source domain dataset, the target domain dataset, the rule-based opinion sentence recognition method and the text classification model; the opinion sentence recognition target model is used for knowledge disseminators and news commentators.
[0059] Compared with the prior art, the present invention has the following beneficial effects:
[0060] An embodiment of the present invention proposes a social robot classification method and system, the method comprising: obtaining the content of a target social robot's blog post on a target topic; inputting the blog post content into a social robot classification model to obtain the category of the target social robot; the social robot classification model includes a topic relevance target model and an opinion sentence recognition target model; a method for determining the social robot classification model comprises: constructing a source domain dataset based on transfer learning; determining a target domain dataset based on a social robot recognition model; expanding and compressing the set topics in the source domain dataset; determining a topic relevance target model based on the source domain dataset, the target domain dataset, the compressed topic expansion sequence, and a twin network; and determining an opinion sentence recognition target model based on the source domain dataset, the target domain dataset, a rule-based opinion sentence recognition method, and a text classification model. The present invention implements social robot classification based on transfer learning, performs text mining on the blog post content published by the social robot, and improves the versatility and interpretability of the classification method. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0062] Figure 1 A flowchart of a social robot classification method provided by an embodiment of the present invention;
[0063] Figure 2 A flowchart of a method for determining a social robot classification model provided by an embodiment of the present invention;
[0064] Figure 3 An overall process diagram of the social robot classification method provided by an embodiment of the present invention;
[0065] Figure 4 A framework diagram of a topic relevance model provided by an embodiment of the present invention;
[0066] Figure 5 This is a diagram of the SBERT model architecture provided by an embodiment of the present invention;
[0067] Figure 6 A flowchart for identifying knowledge communicators and news commentators provided by an embodiment of the present invention;
[0068] Figure 7 A network-based deep transfer learning model framework diagram provided by an embodiment of the present invention;
[0069] Figure 8 A structural diagram of a social robot classification system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0070] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0071] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0072] Explanation of terms:
[0073] Social robot: A social robot is a virtual robot that is currently active on social networks. It is actually an automated program that can use social accounts, artificial intelligence and other related technologies to imitate human behavior and operate on social networks.
[0074] Content polluters: Content polluters are social robot accounts that publish blog posts that are irrelevant to the topic.
[0075] News Commentator: A news commentator is a social robot account that publishes content related to the topic and expresses opinions and views.
[0076] Knowledge disseminator: A knowledge disseminator refers to a social robot account that publishes content related to the topic and disseminates information and explains the objective circumstances of the event.
[0077] SBERT (Sentence Embeddings using Siamese BERT-Networks): A twin network model based on the pre-trained BERT. Both subnetworks of the SBERT model use the BERT model, and the two BERT models share parameters. When comparing the similarity between two sentences, A and B, they are input into the BERT network separately. The output is two sets of vectors representing the sentences, and the similarity between them is then calculated.
[0078] TextCNN: A text classification model that uses convolutional neural networks (CNN) to handle text classification problems.
[0079] TextRank algorithm: A graph-based ranking algorithm for text. Its basic idea is to view a document as a network of words, where links in the network represent semantic relationships between words. The TextRank algorithm mainly includes: keyword extraction, key phrase extraction, and key sentence extraction.
[0080] BERT (Bidirectional Encoder Representations from Transformer): Bidirectional encoder representation based on Transformer, is a pre-trained language representation model.
[0081] Pooling operation: Pooling operation is a very common operation in CNN. Pooling operation is also commonly called subsampling or downsampling. When building a convolutional neural network, it is often used after the convolution layer to reduce the feature dimension of the convolution layer output through pooling, effectively reducing network parameters while preventing overfitting.
[0082] MEAN strategy: mean-pooling is a type of pooling strategy.
[0083] Word2Vec word vector model: Word2Vec is a neural network-based language model and a vocabulary representation method. Word2Vec includes two structures: skip-gram and CBOW, but both are essentially word dimensionality reduction operations.
[0084] Because each social robot has a single, unchanging purpose, all its actions are geared toward achieving that ultimate goal. Therefore, directly studying the purpose of a social robot is more effective than analyzing its behavior to extract formal features. Different types of social robots will take different actions and express different opinions on the same event to achieve their goals, contributing differently to the event's development.
[0085] Therefore, in response to the above-mentioned deficiencies in the prior art, the present invention provides a social robot classification method based on transfer learning, which performs text mining on blog posts published by social robots, and determines the role played by social robots in specific events through the text mining results, thereby completing the classification of social robots.
[0086] To address the problem that existing literature classification methods are not suitable for the task of classifying new social robots, this paper considers the purpose of social robots and proposes a more universal and interpretable social robot classification method. Furthermore, existing social robot classification research is generally plagued by a serious lack of sample data. Therefore, this paper also explores how to design a more effective social robot classification method with limited sample data.
[0087] To address the problems of sparse semantics of topic texts and a large difference in length between topic texts and Weibo texts in the task of judging the relevance of blog posts under specific topics on the Sina Weibo platform, the present invention proposes a more effective relevance judgment method based on the existing text relevance judgment model, thereby enriching the semantic information of topic texts and more accurately identifying content polluters.
[0088] In order to solve the problem that opinion sentences generated according to the opinion sentence generation principle of social robots lack human writing skills and do not have good opinion sentence characteristics, and are difficult to detect using existing opinion sentence recognition methods, the present invention will formulate appropriate opinion sentence recognition rules, construct an opinion sentence recognition model, and perform recognition from the perspective of focusing on corpus keywords, thereby making up for the shortcomings of being difficult to recognize using existing methods due to the unfluent generation of opinion sentences and incomplete information, thereby improving the accuracy of opinion sentence recognition.
[0089] Figure 1 Flowchart of the social robot classification method provided by the embodiment of the present invention. Figure 1 The social robot classification method of this embodiment includes:
[0090] Step 101: Obtain blog content of a target social robot on a target topic.
[0091] Step 102: Input the blog post content of the target social robot on the target topic into the social robot classification model to obtain the category of the target social robot; the categories include content polluters, knowledge disseminators and news commentators; the social robot classification model includes a topic relevance target model and an opinion sentence recognition target model.
[0092] The content polluter indicates that the content of the blog post published by the target social robot is irrelevant to the target topic; the knowledge disseminator indicates that the content of the blog post published by the target social robot is related to the target topic, and expresses opinions and views; the news commentator indicates that the content of the blog post published by the target social robot is related to the target topic, and disseminates information and explains objective events.
[0093] The step 102 specifically includes:
[0094] The blog post content of the target social robot on the target topic is input into a topic relevance target model to identify whether the target social robot is a content polluter.
[0095] If the target social robot is not a content polluter, the blog post content of the target social robot on the target topic is input into the opinion sentence recognition target model to identify whether the target social robot is a knowledge disseminator or a news commentator.
[0096] Figure 2 Flowchart of the method for determining the social robot classification model provided by the embodiment of the present invention. Figure 2 , the method for determining the social robot classification model is:
[0097] Step 201: Construct a source domain dataset based on a transfer learning method; the source domain dataset includes a first category dataset and a second category dataset. The first category dataset includes original blog posts crawled from Weibo platforms, posted by accounts under a set topic, original blog posts posted by accounts under topics related to the set topic, and corresponding classification labels; the classification labels include whether the account is a content polluter or a data knowledge disseminator; the second category dataset includes opinion-based blog posts posted by accounts labeled as news commentators, generated by a social robot sample data generation model.
[0098] Step 202: Determine a target domain dataset based on the social robot recognition model; the target domain dataset includes real blog content of social robots with labeled categories.
[0099] Step 202 specifically includes:
[0100] The social robot identification model is used to verify the real data of social robot types.
[0101] After manually labeling the real data and removing duplicate blog posts, effective social robot data is obtained.
[0102] The valid social robot data is determined as a target domain dataset.
[0103] Step 203: Expand the set topics in the source domain dataset and compress the topic content to obtain a topic expansion sequence.
[0104] Step 203 specifically includes:
[0105] Crawl the introduction contents of topics related to the set topic, and generate extended documents for the introduction contents of all related topics.
[0106] A graph-based ranking (TextRank) algorithm for text is used to extract keywords from the expanded document to obtain a topic expansion sequence.
[0107] Step 204: Determine the topic relevance target model based on the source domain dataset, the target domain dataset, the topic expansion sequence, and the twin network; the topic relevance target model is used to identify content polluters.
[0108] Step 204 specifically includes:
[0109] Construct a twin network; the twin network is a pre-trained Transformer-based bidirectional encoder (SBERT).
[0110] The source domain dataset and the topic expansion sequence are input into the twin network, the twin network is preliminarily trained with the goal of minimizing the mean square error function, and the similarity threshold of the twin network is determined; when the account in the source domain dataset is a content polluter, the similarity between the original blog post content and the topic expansion sequence is less than the similarity threshold.
[0111] The twin network with the similarity threshold determined by preliminary training is used as the topic relevance source model.
[0112] The target domain dataset and the corresponding target domain topic filling sequence are used to fine-tune the similarity threshold of the topic relevance source model.
[0113] The topic relevance source model after fine-tuning the similarity threshold is determined as the topic relevance target model.
[0114] Step 205: Determine the opinion sentence recognition target model based on the source domain dataset, the target domain dataset, the rule-based opinion sentence recognition method, and the text classification model (TextCNN); the opinion sentence recognition target model is used for knowledge disseminators and news commentators.
[0115] Step 205 specifically includes:
[0116] Extract sentence features from the source domain dataset; the sentence features include keyword features, position features, semantic features, and length features.
[0117] The sentence features are normalized and weighted summed to obtain the opinion sentence score of each sentence.
[0118] An opinion sentence threshold of a rule-based opinion sentence recognition model is determined according to the opinion sentence score.
[0119] The convolutional neural network is trained using data in the target domain dataset whose opinion sentence scores are less than the opinion sentence threshold, and the trained convolutional neural network is determined as a text classification model.
[0120] The rule-based opinion sentence recognition model determined by the opinion sentence threshold and the text classification model constitute an opinion sentence recognition source model.
[0121] The target domain dataset is used to fine-tune the opinion sentence threshold and convolutional neural network parameters in the opinion sentence recognition source model.
[0122] The fine-tuned opinion sentence recognition source model is determined as the opinion sentence recognition target model.
[0123] In practical applications, a more specific implementation process of the above social robot classification method is as follows:
[0124] This specific example proposes a social robot classification method based on the previous social robot identification. First, topic-related introductions are used to expand topics, and on this basis, the SBERT (Sentence-BERT) model is used to judge the relevance of blog posts and expanded topics to identify content polluters. Then, a method for identifying opinion sentences that combines the social robot opinion sentence generation rules with the deep learning model TextCNN is proposed to further distinguish between news commentators and knowledge communicators. Finally, in order to improve the classification effect of the model, the transfer learning method is used to train the model with the help of a large amount of blog post data from ordinary Weibo accounts, thereby better improving the classification effect of social robots. The comparative experimental results show that the classification results of the SBERT model on the relevance of blog post topics can be effectively improved by expanding topics; by analyzing the social robot opinion blog generation rules and focusing on the keywords that express opinions, the problem of difficulty in identifying opinion sentences due to the low quality of opinion sentences generated by social robots is better solved; by introducing transfer learning, the problem of insufficient data for social robots is effectively alleviated, and the classification effect of social robots is greatly improved. The overall process of the social robot classification method is as follows Figure 3 shown.
[0125] The specific implementation steps of the social robot classification method in this example are:
[0126] Step 1: Construct the dataset.
[0127] The source domain dataset consists of two parts. The first part involves data collection via crawler code. This crawler crawls the original blog posts from all accounts under the "#XXXX#" and related topics on the Weibo platform. 400 posts with irrelevant content and 400 news-related posts are manually labeled as source data for content polluters and knowledge disseminators, respectively. Second, 1,200 opinion-based posts are generated using a social bot sample data generation model to serve as source data for news commentators. This completes the construction of the source domain dataset for transfer learning.
[0128] The target domain dataset consists of 188 real-world bot types, obtained through validation of a social bot identification model. After manual annotation and deduplication of blog posts, it includes 139 valid social bot data, including 59 content polluters, 63 news commentators, and 17 knowledge disseminators.
[0129] Step 2: Identify content polluters. Use the SBERT model to determine the relevance of the extended topic and text of the blog post, and mark the account that publishes blog posts irrelevant to the topic as a content polluter, thereby completing the identification of content polluters, such as Figure 4 As shown, the overall process is as follows:
[0130] Step 21: The topic expansion module consists of two parts: topic expansion and text compression. First, it collects and expands relevant content to make the topic's semantic information more complete. Then, it compresses the expanded topic and extracts important key phrases to avoid data sparsity. Finally, the SBERT model is used to calculate the relevance between the expanded topic and the blog post.
[0131] Step 22: In the topic expansion section, the present invention uses topic content related to the topic and topic introductions to expand the content. For example, the "XXXX" event, which became a hot topic in the early stages, is used. First, a search is performed on Weibo for topics containing "XXXX," and all the introductions for #XX# on the homepage are crawled. These introductions are then organized into a single document. Because these texts are introductions to each topic and have been verified by Weibo, they are all sentences related to the XXXX theme.
[0132] Step 23: In the text compression phase, the present invention uses the TextRank algorithm to extract keywords from the expanded topic content. The basic concept of the TextRank algorithm is derived from Google's PageRank algorithm. It builds a graph model by segmenting microblog text into several components (words, sentences). Important components in the microblog text are ranked using a voting mechanism, enabling keyword extraction using only the information from a single microblog text.
[0133] The process of extracting lead keywords using the TextRank algorithm is as follows:
[0134] 1) Divide the topic content expanded by the introduction into complete sentences.
[0135] 2) For each sentence, perform operations such as word segmentation, part-of-speech tagging, and remove stop words.
[0136] 3) Construct a topic candidate keyword graph G = (V, E), where V is a node set consisting of the topic candidate keywords generated in step 2. Then, edges are constructed between any two nodes using co-occurrence relationships. An edge exists between two nodes only if their corresponding words co-occur in a window of length K, where K represents the window size, meaning a maximum of K co-occurring words. The TextRank algorithm is designed to link adjacent words and calculate a word's score using the scores of adjacent words. Therefore, edges are constructed to establish adjacency between words. In subsequent steps, each word updates its score based on the scores of other words in its edge.
[0137] 4) According to the TextRank formula, iteratively propagate the score of each node until convergence.
[0138]
[0139] Among them, V i 、V j Indicates different nodes; WS(V i ) represents node V i The importance of d is the damping coefficient, ranging from 0 to 1, representing the probability of pointing from a specific point in the graph to any other point, and is generally set to 0.85; In(V i ) is the point V i Point set (in-link set), Out (V j ) is point V j The set of points pointed to (out-link set). |Out(V j )| is the number of outbound links, and each word should divide its own score equally among all outbound links. Meaning V j Contribute to V i The fraction of V i The sum of all the points contributed to him by all the in-chain is V i The score itself.
[0140] 5) Sort the node scores obtained in step 4) and use the most important k words as the keywords of the introduction, thereby completing the construction of the topic expansion sequence.
[0141] Step 24: Use the SBERT model to judge the topic relevance, such as Figure 5 As shown, the process is as follows:
[0142] 1) Input the blog post text and the extended topic, and after BERT encoding, obtain two feature vectors u and v representing the sentence.
[0143] 2) Use the MEAN strategy to perform pooling operation, obtain all output vectors of the last layer of the sequence, and calculate their average value as the sentence vector.
[0144] 3) Using the mean squared error function as the optimization objective, we calculated the cosine similarity between the resulting sentence vectors u and v to measure the similarity between the topic and the blog post. When the similarity exceeds the similarity threshold, the topic and blog post are considered related. Because different thresholds ultimately produce different results, the threshold with the highest accuracy is used as the final threshold.
[0145] Step 3: Identify news commentators and knowledge communicators. Extract the features of opinion sentences from the blog post to perform the first opinion sentence recognition, and then use the TextCNN model to complete the further opinion sentence recognition. The classification of news commentators and knowledge communicators is completed based on whether the blog post is relevant to the topic and whether it has opinions. Figure 6 As shown, the overall process is as follows:
[0146] Step 31, identification of opinion sentences based on generation rules. From the perspective of social robot text generation, in order to enable news commentators to express specific opinions, the generator usually uses a corpus containing specific keywords. Specifically, it is possible to input opinion sentence examples from a specific event corpus, and then generate new opinion sentences by using synonym deformation. It is also possible to input opinion sentence examples from a general corpus, extract sentence features, and then generate opinion sentences about specific events according to given keywords and given emotions. Therefore, the present invention identifies opinion sentences from four perspectives: keyword features, position features, semantic features, and length features, in accordance with the social robot opinion sentence generation rules. The process is as follows:
[0147] 1. Split each social robot blog post into n sentences, d = {s1, s2, ..., s n Then each sentence is divided into l words, s i ={w i1 ,w i2 ,...,w il Thus, by weighting and summing the four features of each sentence, we can obtain the sentence opinion score, as shown in formula (2). Where λ1, λ2, λ3, and λ4 represent the weights of the four features, and the sum of the four is 1. The values of λ1, λ2, λ3, and λ4 can be adjusted appropriately according to the situation.
[0148] f(si )=λ1f keyword (s i )+λ2f position (s i )+λ3f semantics (s i )+λ4f length (s i ) (2)
[0149] 2. Extract keyword features, position features, semantic features and length features.
[0150] Keyword features: We use the TextRank algorithm to extract noun and verb keywords from all blog posts published by social bots. When selecting key sentences, if a sentence contains a keyword, it is highly likely to be an opinion sentence. Therefore, the scoring function for the keyword feature is as follows:
[0151]
[0152] Position feature: In a blog post expressing an opinion, the central idea is usually at the beginning or end. Therefore, the first or last sentence of the blog post is more likely to be the opinion sentence. The scoring function of the position feature is as follows:
[0153]
[0154] Where n is the number of sentences in the text, i is the position of the sentence in the text, and a, b, and c are coefficients. As can be seen from the function expression, sentences in the middle of the text have low scores, while sentences at the beginning and end of the text have high scores.
[0155] Semantic Features: Opinion sentences often contain words that express opinions, as well as words that are subjective, summary, and transitional. Typical words that express opinions include "support, oppose, resist, agree, believe, and strongly support." Subjective words include "I, think, estimate, should, perhaps, and probably." Summary words include "therefore, in short, so, in summary, in summary, and thus it can be seen." Transitional words include "but, although, though, and however." Therefore, the scoring function for semantic features is as follows:
[0156]
[0157] Length feature: Considering the fact that news blog posts published by knowledge communicators are mostly objective factual descriptions of events, and therefore tend to be long, while opinion sentences generated by news commentators based on rules are relatively short. Therefore, this paper uses length as a feature for identifying opinion sentences. The scoring function for the length feature is as follows:
[0158]
[0159] 3. By normalizing the four features of the sentence and taking weighted sum, we can get the opinion score f(s) of each sentence in the social robot blog. i ). Set the opinion sentence threshold θ∈(0,1), when the sentence score f(s i )>θ, it is identified as an opinion sentence. If multiple sentences with a score greater than θ appear in a blog post, the sentence with the highest score is selected as the opinion sentence, thus completing rule-based opinion sentence recognition. Furthermore, accounts containing opinion sentences in blog posts are identified as news commentators.
[0160] Step 32: Identify opinion sentences based on TextCNN. To more comprehensively identify opinion sentences, the present invention inputs blog posts that are determined to contain no opinion sentences into the TextCNN model for further opinion sentence identification. The specific identification process is as follows:
[0161] 1) Use the Word2Vec word vector model to represent the blog post and use the obtained word vector as the input of the embedding layer.
[0162] 2) Extract the vectorized representation of the blog post features through different filters.
[0163] 3) The most significant feature vectors are selected through pooling operation.
[0164] 4) Transform the problem into a classification problem through a fully connected layer, thereby completing opinion sentence recognition.
[0165] The above four recognition steps correspond to the embedding layer, convolution layer, pooling layer, fully connected layer + softmax layer of the opinion sentence recognition model (Word2Vec model), which are the four levels of the recognition model structure.
[0166] Step 4: Classify social robots based on transfer learning. Because deep learning models require a high volume of data, and the amount of social robot data available is relatively limited, we migrate human Weibo data to train the social robot classification model and achieve social robot classification. The overall process is as follows:
[0167] First, a large amount of human data from the source domain is used to pre-train the deep neural network, and then the network structure and network parameters are transferred to the target domain. Since the target data of the present invention is relatively small, and the social robot blog posts are generated by imitating human blog posts, the similarity with human blog posts is very high, so the shallow network features and deep network features of the two are relatively similar. Therefore, the present invention freezes the parameters of all networks except the output layer, uses the social robot training data to fine-tune the output layer, and finally uses the test data to test the classification effect of the model. Figure 7The specific process is as follows:
[0168] Step 41: randomly divide the source domain dataset into a source domain training set and a source domain test set in a ratio of 8:2, and similarly divide the target domain dataset into a target domain training set and a target domain test set;
[0169] Step 42: Use the source domain dataset to train and test the topic relevance model and the opinion sentence recognition model, and save the model parameters with the best test results to obtain the topic relevance source model and the opinion sentence recognition source model;
[0170] Step 43: Use the target domain dataset to fine-tune the topic relevance source model and the opinion sentence recognition source model, thereby obtaining a topic relevance target model and an opinion sentence recognition target model;
[0171] Step 44: Combine the topic relevance target model and the opinion sentence recognition target model to obtain a multi-classification model of the social robot. According to the four combined classification results obtained by the two classification models, relevant opinion sentences, relevant non-opinion sentences, irrelevant opinion sentences, and irrelevant non-opinion sentences, the social robot is divided into content polluters, news commentators, and knowledge communicators.
[0172] The social robot classification method of the above embodiment has the following advantages:
[0173] (1) To address the data sparsity problem caused by the large difference between the length of microblog text and topic, we proposed a topic expansion module and established a topic-blog post relevance identification model based on the topic expansion module. First, we used the introduction text of the relevant topic to expand the topic; then, we used TextRank to extract keywords to obtain the topic expansion sequence, so that the topic can more richly and effectively express the event content; finally, we used the SBERT model to calculate the text relevance between the topic expansion sequence and the blog post sequence to identify content polluters. The comparative experimental results show that the topic expansion module can more richly and effectively express the event content and improve the effect of judging the relevance of topic-blog posts.
[0174] (2) Combining generation rules and deep learning to achieve opinion sentence recognition. First, starting from the opinion sentence generation principle of news commentary social robots, keyword features, position features, semantic features and length features are extracted from blog posts. The opinion sentence score of the sentence is calculated based on the weighted sum of the feature values and compared with the threshold. If it is greater than the threshold, the opinion sentence with obvious keywords is identified in advance. If it is less than the threshold, the TextCNN model is established to perform opinion sentence recognition (the rule-based method is used to identify the opinion sentences with obvious opinion keywords in advance, and then the TextCNN model is established to perform opinion sentence recognition on the remaining sentences). The experimental results show that the combination-based method can give full play to the respective advantages of the two methods. The keywords can accurately identify some opinion sentences that may not be fluent and conform to the social robot blog generation rules; the TextCNN model can further identify as many remaining opinion sentences as possible, greatly improving the accuracy of social robot opinion sentence recognition.
[0175] (3) A strategy for classifying social robots based on their purpose was designed. By conducting text mining on social robot blogs, social robots were further divided into three categories: content polluters, news commentators, and knowledge disseminators, based on their different roles in a certain topic. Based on this strategy, a social robot classification method based on transfer learning was designed to address the problems of scarce social robot data and low detection accuracy. With the help of transfer learning technology, the training results of blog post data from a large number of ordinary accounts can be transferred to the classification model of social robots, which improves the versatility and interpretability of the classification method. Comparative experimental results show that a more accurate social robot classification model is obtained by training with the help of transfer learning technology.
[0176] (4) When the behavioral characteristics of the social robot set by the attacker change, the method of this embodiment is still applicable to classifying the changed social robot. Moreover, precisely because the proposed social robot classification strategy relies on text mining technology, the source data for transfer learning can use normal user blog data that is easy to collect and abundant, thus avoiding the problem of difficulty in obtaining similar sample accounts of social robots, which makes it impossible to conduct normal learning.
[0177] In addition, in addition to the specific implementation methods of the above embodiments, other models can be used to judge the relevance of blog topics to identify content polluters, and other models can be used to judge opinion sentences to identify news commentators and knowledge communicators, thereby classifying social robots.
[0178] The present invention also provides a social robot classification system for implementing the above method, see Figure 8 , the system comprising:
[0179] The blog content acquisition module 801 is used to obtain the blog content of the target social robot on the target topic.
[0180] The classification model determination module 802 is used to determine the classification model of the social robot.
[0181] The classification recognition module 803 is used to input the blog post content of the target social robot on the target topic into the social robot classification model to obtain the category of the target social robot; the categories include content polluters, knowledge disseminators and news commentators; the social robot classification model includes a topic relevance target model and an opinion sentence recognition target model.
[0182] The content polluter indicates that the content of the blog post published by the target social robot is irrelevant to the target topic; the knowledge disseminator indicates that the content of the blog post published by the target social robot is related to the target topic, and expresses opinions and views; the news commentator indicates that the content of the blog post published by the target social robot is related to the target topic, and disseminates information and explains objective events.
[0183] The classification model determination module 802 specifically includes:
[0184] A source domain dataset construction unit is used to construct a source domain dataset based on a transfer learning method; the source domain dataset includes a first type of dataset and a second type of dataset; the first type of dataset includes original blog content published by accounts under set topics crawled on the Weibo platform, original blog content published by accounts under topics related to the set topics, and corresponding classification labels; the classification labels include whether the account belongs to a content polluter or a data knowledge disseminator of the account; the second type of dataset includes opinion-type blog posts published by accounts marked as news commentators generated by a social robot sample data generation model.
[0185] The target domain dataset construction unit is used to determine the target domain dataset based on the social robot recognition model; the target domain dataset includes the real blog content of the social robot with marked categories.
[0186] The topic expansion and compression module is used to expand the set topics in the source domain data set and compress the topic content to obtain a topic expansion sequence.
[0187] A topic relevance target model determination module is used to determine the topic relevance target model based on the source domain dataset, the target domain dataset, the topic expansion sequence and the twin network; the topic relevance target model is used to identify content polluters.
[0188] The opinion sentence recognition target model determination module is used to determine the opinion sentence recognition target model based on the source domain dataset, the target domain dataset, the rule-based opinion sentence recognition method and the text classification model; the opinion sentence recognition target model is used for knowledge disseminators and news commentators.
[0189] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0190] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only intended to help understand the method and core concept of the present invention. At the same time, those skilled in the art will find that the specific implementation methods and application scopes may vary based on the concept of the present invention. In summary, the contents of this specification should not be construed as limiting the present invention.
Claims
1. A social robot classification method, characterized in that: include: Obtain blog content about the target topic from the target social robot; Inputting the blog content of the target social robot on the target topic into the social robot classification model to obtain the category of the target social robot; the categories include content polluters, knowledge disseminators, and news commentators; the social robot classification model includes a topic relevance target model and an opinion sentence recognition target model; The content polluter indicates that the content of the blog post published by the target social robot is irrelevant to the target topic; the knowledge disseminator indicates that the content of the blog post published by the target social robot is relevant to the target topic and expresses opinions and views; the news commentator indicates that the content of the blog post published by the target social robot is relevant to the target topic and disseminates information and explains objective events; The method for determining the social robot classification model is as follows: A source domain dataset is constructed based on a transfer learning method; the source domain dataset includes a first type of dataset and a second type of dataset; the first type of dataset includes original blog posts crawled from the Weibo platform and posted by accounts under set topics, original blog posts posted by accounts under topics related to the set topics, and corresponding classification labels; the classification labels include whether the account is a content polluter or a data knowledge disseminator; the second type of dataset includes opinion-based blog posts posted by accounts labeled as news commentators, generated by a social robot sample data generation model; Determine a target domain dataset based on a social robot recognition model; the target domain dataset includes real blog posts of social robots with labeled categories; Expanding the set topics in the source domain dataset and compressing the topic content to obtain a topic expansion sequence; Determining the topic relevance target model based on the source domain dataset, the target domain dataset, the topic expansion sequence, and the twin network; the topic relevance target model is used to identify content polluters; The opinion sentence recognition target model is determined based on the source domain dataset, the target domain dataset, the rule-based opinion sentence recognition method and the text classification model; the opinion sentence recognition target model is used to identify knowledge disseminators and news commentators.
2. A social robot classification method according to claim 1, characterized in that: Determining the topic relevance target model based on the source domain dataset, the target domain dataset, the topic expansion sequence, and the Siamese network specifically includes: Inputting the source domain dataset and the topic expansion sequence into the twin network, performing preliminary training on the twin network with the goal of minimizing the mean square error function, and determining a similarity threshold of the twin network; when the account in the source domain dataset is a content polluter, the similarity between the original blog post content and the topic expansion sequence is less than the similarity threshold; The twin network with the similarity threshold determined by preliminary training is used as the topic relevance source model; Using the target domain dataset and the corresponding target domain topic filling sequence, fine-tuning the similarity threshold of the topic relevance source model; The topic relevance source model after fine-tuning the similarity threshold is determined as the topic relevance target model.
3. A social robot classification method according to claim 1, characterized in that: The determining of the opinion sentence recognition target model according to the source domain dataset, the target domain dataset, the rule-based opinion sentence recognition method, and the text classification model specifically includes: Extracting sentence features of the source domain dataset; the sentence features include keyword features, position features, semantic features, and length features; Normalizing and weighting the sentence features to obtain the opinion sentence score of each sentence; determining an opinion sentence threshold of a rule-based opinion sentence recognition model according to the opinion sentence score; Using data in the target domain dataset whose opinion sentence scores are less than the opinion sentence threshold to train a convolutional neural network, and determining the trained convolutional neural network as a text classification model; The rule-based opinion sentence recognition model determined by the opinion sentence threshold and the text classification model constitute an opinion sentence recognition source model; Using the target domain dataset to fine-tune the opinion sentence threshold and convolutional neural network parameters in the opinion sentence recognition source model; The fine-tuned opinion sentence recognition source model is determined as the opinion sentence recognition target model.
4. A social robot classification method according to claim 1, characterized in that: The step of expanding the set topics in the source domain dataset and compressing the topic contents to obtain a topic expansion sequence specifically includes: Crawling the lead content of topics related to the set topic, and generating an expanded document for the lead content of all related topics; A graph-based sorting algorithm for text is used to extract keywords from the expanded document to obtain a topic expansion sequence.
5. A social robot classification method according to claim 1, characterized in that: The determining of the target domain dataset based on the social robot recognition model specifically includes: The social robot identification model is used to test and obtain real data on social robot types; After manually labeling the real data and removing duplicate blog posts, effective social robot data is obtained; The valid social robot data is determined as a target domain dataset.
6. A social robot classification method according to claim 2, characterized in that: The Siamese network is a pre-trained Transformer-based bidirectional encoder.
7. A social robot classification method according to claim 1, characterized in that: Inputting the target social robot's blog post content on the target topic into a social robot classification model to obtain the category of the target social robot specifically includes: Inputting the blog content of the target social robot on the target topic into a topic relevance target model to identify whether the target social robot is a content polluter; If the target social robot is not a content polluter, the blog post content of the target social robot on the target topic is input into the opinion sentence recognition target model to identify whether the target social robot is a knowledge disseminator or a news commentator.
8. A social robot classification system for implementing the method according to any one of claims 1 to 7, characterized in that: include: The blog content acquisition module is used to obtain the blog content of the target social robot on the target topic; A classification and recognition module is configured to input the target social robot's blog post content on the target topic into a social robot classification model to obtain a category of the target social robot; the categories include content polluters, knowledge disseminators, and news commentators; the social robot classification model includes a topic relevance target model and an opinion sentence recognition target model; The content polluter indicates that the content of the blog post published by the target social robot is irrelevant to the target topic; the knowledge disseminator indicates that the content of the blog post published by the target social robot is relevant to the target topic and expresses opinions and views; the news commentator indicates that the content of the blog post published by the target social robot is relevant to the target topic and disseminates information and explains objective events; A classification model determination module, configured to determine the social robot classification model; The classification model determination module specifically includes: A source domain dataset construction unit is configured to construct a source domain dataset based on a transfer learning method; the source domain dataset includes a first type of dataset and a second type of dataset; the first type of dataset includes original blog posts crawled from a Weibo platform and posted by accounts under set topics, original blog posts posted by accounts under topics related to the set topics, and corresponding classification labels; the classification labels include whether the account is a content polluter or a data knowledge disseminator; the second type of dataset includes opinion-based blog posts posted by accounts labeled as news commentators, generated by a social robot sample data generation model; A target domain dataset construction unit is used to determine a target domain dataset based on a social robot recognition model; the target domain dataset includes real blog posts of social robots with labeled categories; A topic expansion and compression module, configured to expand the set topics in the source domain dataset and compress the topic content to obtain a topic expansion sequence; a topic relevance target model determination module, configured to determine the topic relevance target model based on the source domain dataset, the target domain dataset, the topic expansion sequence, and the twin network; the topic relevance target model is used to identify content polluters; The opinion sentence recognition target model determination module is used to determine the opinion sentence recognition target model based on the source domain dataset, the target domain dataset, the rule-based opinion sentence recognition method and the text classification model; the opinion sentence recognition target model is used to identify knowledge disseminators and news commentators.
Citation Information
Patent Citations
A social robot detection system and method based on blog article similarity
CN109472027A
Microblog social robot detection method based on deep neural network
CN111428116A