A microblog water army identification method based on multi-task learning
Through the multi-task learning method, the Weibo water army identification task is split into different user categories, the learning order and weight distribution are optimized, and the SVM model is used for parallel training. This solves the problems of long time consumption and low accuracy in existing technologies and achieves efficient identification of advanced water armies.
Patent Information
- Application Number
- CN202310190085.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-02
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-03-02
AI Technical Summary
Existing methods for identifying Weibo water armies are time-consuming and have low accuracy, and are particularly difficult to identify high-level water armies hidden among authenticated users.
The multi-task learning method is adopted to split the Weibo water army identification task into subtasks for different user categories. Through parallel training of the SVM model, the learning order and weight distribution are optimized, and the SeqMT model is used to identify Weibo water army.
It improves the accuracy and efficiency of Weibo water army identification, can effectively identify high-level water armies hidden among authenticated users, and reduces the time cost of processing large amounts of data.
Smart Images

Figure CN116484087B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of computers and the field of natural public opinion classification, and particularly relates to a microblog water army identification method based on multi-task learning. BACKGROUND
[0002] The development of the Internet has made people's communication no longer limited, and has also promoted the development of social software. The emergence of microblog makes information spread quickly and has strong influence. As one of the most popular social platforms in China, many netizens will share their lives and opinions on microblog and discuss things they are interested in on microblog. According to the latest development report released by microblog, in September 2020, the monthly active users of microblog reached 511 million, and the daily active users also reached 224 million. Among the microblog user groups, the post-90s and post-00s have become the main force, accounting for nearly 80%; the post-80s accounts for 18%; and the post-70s accounts for 3%. Microblog users are showing a trend of youth.
[0003] Early network water army identification research is mainly based on content features. When network water army first appeared, it mainly induced users by sending emails. The email content has high repetition rate and single content form, which is quite different from normal emails and easy to identify and handle. Natural language processing methods such as text classification, text tendency, and text sentiment analysis are used for identification. The emergence of a large number of users and the trend of interests make it more and more difficult to solve the problem of water army. In recent years, due to the high time and high cost of large data, semi-supervised learning has been relatively more studied, and many semi-supervised learning algorithms have appeared, such as co-training algorithm and semi-supervised EM algorithm. A large number of unlabeled samples can be obtained by using advanced data collection technology, but it is difficult to obtain labeled samples. However, through this method, it is relatively easy to identify the water army existing in unauthenticated users and ordinary users, but it is difficult to identify the role of orange V / red V authenticated users as water army when they confuse the vision and interfere with the judgment of the public.
[0004] Therefore, a method is needed that can not only solve the problems of long time consumption and high cost, but also accurately and efficiently identify senior water army existing in authenticated users. SUMMARY
[0005] The purpose of the present application is to provide a microblog water army identification method based on multi-task learning, to solve the defects of long time consumption and low accuracy rate in the current mainstream public opinion processing microblog water army classification problem.
[0006] To achieve the above purpose, the present application provides the following technical solutions:
[0007] A microblog water army identification method based on multi-task learning, specifically comprising the following steps:
[0008] Step S1, data preprocessing is performed on the number of user attentions, the number of fans, gender, microblog level, whether authenticated, authentication category, sunshine credit, member category, member level, and blog content, and tasks are divided into t1, t2,..., t5 according to the authentication category of the user; an order π is in δ5, δ5 is the symmetric group of all permutations of 5 elements, an SVM model is used to train a classifier for each task, and the weight corresponding to each task in the order π is calculated;
[0009] Step S2, the order π is studied by solving the average error er, each π in δ5 is traversed, in the process, it is assumed that the learning algorithm used to solve each individual task t π(i) is the same as that of all tasks and is deterministic, π(i) is determined by minimizing the upper limit of the corresponding item of the task that has not been solved, to determine the optimal order of learning;
[0010] Step S3, according to the optimal learning order of the task returned by step S2, a separate SVM model is trained by parallelization to realize microblog water army identification.
[0011] Further, the step S1 comprises the following sub-steps:
[0012] Step S11, data preprocessing is performed on the number of user attentions, the number of fans, gender, microblog level, whether authenticated, authentication category, sunshine credit, member category, member level, and blog content; according to the authentication category of the user, the tasks are divided into sub-tasks: t1: water army identification of unauthenticated users, t2: water army identification of ordinary users, t3: water army identification of blue V authenticated users, t4: water army identification of red V authenticated users, and t5: water army identification of orange V authenticated users;
[0013] Step S12, a standard linear SVM model is used as a learner of each task, the data trained by the learner is the data obtained after preprocessing in S11; the five sub-tasks are sequentially processed according to the order π, wherein π is in δ5, and δ5 is the symmetric group of the sub-tasks;
[0014] Step S13, for the first task t π(1) in the order π, the weight vector is defined as the algorithm A shown in the following formula, which is used to calculate the weight vector ω π(i) of the current task t π(i) :
[0015]
[0016] Wherein, ω π(i-1) is the weight vector of the previous task, and ξj For the slack variable, in order to tolerate part of the samples not satisfying the constraints, ξ j ≥ 0, y i ω T φ(x i ) ≥ 1 - ξ j , using the feature φ mapping, each data vector x i is projected into a higher even infinite dimensional space feature vector φ(x i ), and 1≤j≤m; C>0.
[0017] Further, the step S2 comprises the following sub-steps:
[0018] Step S21, designing a grid structure, the calculation formula of the network structure is as follows, which is used to calculate the average expected error er according to the ω π(i) obtained in S13:
[0019]
[0020] Where x is the data after preprocessing in step S11, which also obeys the data independent and identically distributed IID; y is the category corresponding to the user, 0 is a normal user, and 1 is a water army user; D i is the underlying data distribution, which exists on x×y through a certain unknown probability distribution D i , is a known parameter; for solving each task, the learner uses a linear predictor f(x) = sign<ω,x>, and the classification performance is measured by 0-1 loss; n is the number of tasks in each π, which is 5;
[0021] The objective of the learner is to find five weight vectors ω1, ω2, ω3, ω4, ω5 to minimize the average expected error er of tasks t1, t2,..., t5;
[0022] Step S22, using the algorithm A defined in step S13 to calculate the weight vector ω π(i) of each task; the theorem defining the upper limit of the average expected error er of the obtained learner is as follows:
[0023]
[0024] Where the left is half of the average expected error of tasks t1, t2, t3, t4, t5, which is the minimum average expected error we want to get; m π(i) is the harmonic mean of the samples, each term in the formula is a value between 0 and 1; and is a monotone decreasing function of the distance between the training sample and the hyperplane defined by ω π(i) ;
[0025] Step S23, sequentially traversing all the orderings pi in delta 5, for each ordering pi, traversing the tasks in it, finding an ordering pi in which the orderings of all the tasks in it can sequentially reduce the right side value of formula (1), so as to find an ordering pi that can reduce the average expected error er, and taking the order of the task numbers in it as the optimal learning order.
[0026] Further, in the step S22, when When it is correctly classified and far away from the distance of the partition hyperplane, its value is close to 0; when When it is classified in the wrong half space far away from the separation hyperplane, its value is close to 1; when When it is on the partition hyperplane, its value is 0.5; erf(z) is the Gaussian error function.
[0027] Further, the step S3 comprises the following sub-steps:
[0028] Step S31, training an independent SVM model by parallelization;
[0029] Step S32, selecting a linear kernel function, mapping the data obtained after the preprocessing of S11 to a high-dimensional space, then using the data set S π(i) to train the SVM model, S π(i) is the corresponding set π(i) of task t An optimal decision boundary is found to separate data points of different categories, cross-validation is used to adjust the hyperparameters of the model, and a trained SVM model is obtained;
[0030] Step S33, preprocessing the data to be tested, then inputting the trained SVM model to complete the prediction of the micro-blog water army.
[0031] The present application focuses on the parameter transfer method of multi-task learning, and has the following technical effects:
[0032] Firstly, the application is based on the idea that the model parameters corresponding to related tasks are similar in terms of parameter representation. The whole micro-blog army identification task is divided into five different user category army identification tasks, which are sequentially learned, and the learner transfers the previously learned simple task to the next task, which can gradually increase the stored knowledge and reuse the accumulated information, and more effectively learn new concepts. This enables the learner to automatically find the most advantageous learning order while obtaining the generalization constraints of the learning order quality, helping to determine the range from the simplest to the most difficult, which makes the change aspect of task and memory efficient learning more flexible.
[0033] Secondly, in the micro-blog army identification task, it is relatively easy to judge hidden in unauthenticated users and ordinary authenticated users, but some authenticated V users are often difficult to identify even if they have the same behavior as the water army in ordinary authenticated users, and at the same time, the trend of guiding network public opinion is usually the V user with more fans. The application optimizes the learner according to the best learning order learned, so that the user hidden in any identity can identify the water army behavior characteristics, and the accuracy of identification is improved.
[0034] Finally, the application focuses on processing multiple task public opinion information data and classifying processing at the same time, which can deal with a large amount of data that cannot be processed manually and high time-consuming situations, and the most relevant effective information is transmitted between multiple tasks, so that the algorithm can obtain good generalization function even from a small amount of training data, avoiding the problem of processing a large amount of training data at the same time. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 The figure is a schematic diagram of the model training process of the application. DETAILED DESCRIPTION
[0036] The application is aimed at analyzing and modeling the content crawler under the micro-blog epidemic topic and star super topic, and the application will be further described in detail below in combination with the drawings, but the application is not limited to the following embodiments.
[0037] In this work, the parameter transfer method of multi-task learning is focused on, which is based on the idea that the model corresponding to related tasks is similar in terms of parameter representation. For example, Figure 1As shown, the method for microblog water army identification based on multi-task learning given by the application mainly has the following idea: automatically finding a most favorable learning order, and simultaneously obtaining the generalization constraint of learning order quality, which makes the change aspect learning between task and memory more flexible, and helps to determine the range from the simplest to the most difficult; then, the SeqMT model is used to identify different tasks of microblog water army, and a higher weight is given to a simple task at the beginning, the weight of a difficult task is gradually increased through the optimization of the learning machine, the optimization of the learning machine is realized, and finally the purpose of microblog water army identification is achieved.
[0038] Referring to Figure 1 The method for microblog water army identification based on multi-task learning of the application optimizes the learning machine by learning the most effective learning order between tasks and establishing a SeqMT model, and specifically includes the following steps:
[0039] Step S1, the user attention quantity, the number of fans, the gender, the microblog level, whether the authentication, the authentication category, the sunshine credit, the member category, the member level, and the blog content are preprocessed, the tasks are divided into t1, t2,..., t5 according to the authentication category of the user, the sorting pi is included in the symmetric group of all permutations of 5 elements, the SVM model is used to train the classifier for each task, and the weight corresponding to each task in the sorting pi is calculated. In order to pass the most relevant effective information between tasks through the weight in the subsequent step S2;
[0040] The following sub-steps are included:
[0041] Step S11, the user attention quantity, the number of fans, the gender, the microblog level, whether the authentication, the authentication category, the sunshine credit, the member category, the member level, and the blog content are preprocessed; according to the authentication category of the user, the tasks are divided into sub-tasks: t1: unauthenticated user water army identification, t2: ordinary user water army identification, t2: blue V authenticated user water army identification, t4: red V authenticated user water army identification, and t5: orange V authenticated user water army identification;
[0042] Step S12, the standard linear SVM model is used as the learning machine of each task, and the data trained by the learning machine is the data obtained after the preprocessing of S11; the five sub-tasks are sequentially processed according to the sorting pi, wherein pi is included in the symmetric group of sub-tasks;
[0043] Step S13, for the first task t π(1) The given weight vector is defined as the algorithm A shown in the following formula, which is used to calculate the weight vector ω π(i) of the current task t π(i) :
[0044]
[0045] where ω π(i-1) is the weight vector of the previous task, ξ j is the slack variable, in order to tolerate some samples that do not satisfy the constraints, ξ j ≥ 0, y i ω T φ(x i ) ≥ 1 - ξ j , we use the feature φ mapping to project each data vector x i into a higher or even infinite dimensional space feature vector φ(x i ), and 1≤j≤m, m is the number of training samples, which is set to 10 according to the data characteristics; the parameter C>0 is used to control the balance, which is set to 5.
[0046] Step S2, study the order π by solving the average error er, traverse each π in δ5, in the process, assume that the learning algorithm used to solve each individual task t π(i) is the same as all tasks and is deterministic, determine the optimal order of learning by minimizing the upper bound on the corresponding item of the task that has not been solved to determine π(i); specifically, the following sub-steps are included:
[0047] Step S21, design a grid structure according to the traditional method of standard linear SVM, the calculation formula of the network structure is as follows, which is used to calculate the average expected error er obtained from ω π(i) obtained in S13 (this parameter is used below to study the advantageous order of the order π):
[0048]
[0049] where x is the data preprocessed in step S11, which also satisfies the data independent and identically distributed IID; y is the category corresponding to the user, 0 is a normal user, and 1 is a water army user; D i is the underlying data distribution, which exists on x×y through a certain unknown probability distribution D i , which is a known parameter; for solving each task, the learner uses a linear predictor f(x) = sign<ω,x>, and measures the classification performance by 0-1 loss; n is the number of tasks in each π, which is 5;
[0050] Define the goal of the learner as finding five weight vectors ω1, ω2, ω3, ω4, ω5 that minimize the average expected error er of tasks t1, t2,..., t5;
[0051] Step S22, assume that the learning algorithm used to solve each individual task t π(i)The learning algorithm and the premise and steps of solving all tasks are the same and determined (i.e. without considering the unique characteristics of each task, the same operation is performed for each task), and the weight vector ω of each task is calculated using the algorithm A defined in step S13 π(i) ;
[0052] The theorem defining the upper limit of the average expected error er of the obtained learner is as follows:
[0053]
[0054] Where the left side is half of the average expected error on tasks t1, t2, t3, t4, t5, and is the minimum average expected error we want to obtain. m π(i) is the harmonic mean of the samples, where each term is a value between 0 and 1; and is a monotonic decreasing function of the distance between the training sample and the hyperplane defined by ω π(i) . In particular, when is correctly classified and far from the distance separating hyperplane, its value is close to 0; when is classified in the wrong half-space far from the separating hyperplane, its value is close to 1; when is on the separating hyperplane, its value is 0.5; erf(z) is the Gaussian error function.
[0055] Step S23, sequentially traverse all orderings π in δ5, for each ordering π, traverse the tasks in it, find an ordering π in which the orderings of all tasks in it can successively reduce the right side value of (1) formula; so as to find an ordering π that can reduce the average expected error er, and take the order of the task serial number in it as the optimal learning order.
[0056] Step S3, according to the optimal learning order π(1), π(2), π(3), π(4), π(5) of the tasks returned by step S2, a separate SVM model is trained by parallelization to realize micro-blog water army identification. Specifically, the following sub-steps are included:
[0057] Step S31, a separate SVM model is trained by parallelization;
[0058] Step S32, select a linear kernel function, map the data obtained after preprocessing in S11 to a high-dimensional space, then according to the optimal learning order and the corresponding weight vectors ω1, ω2, ω3, ω4, ω5 (ω1+ω2+ω3+ω4+ω5=1), use the data set S π() to train the SVM model, S π() is the task t π()Corresponding set An optimal decision boundary (hyperplane) is found to separate data points of different categories, cross-validation is used to adjust the hyperparameters of the model, and a trained SVM model is obtained;
[0059] In step S33, the data to be tested is preprocessed, and then input into the trained SVM model to complete the prediction of micro-blog water army.
[0060] In order to verify the feasibility and effectiveness of the method of the application, the following experiments were carried out in this embodiment:
[0061] The running environment is Ubuntu 18.04 operating system, Inter Core i7-6700K CPU@4.00GHzx8 processor, 64GB memory, 1TB hard disk, and the graphics card is NVIDIA GeForce RTX2080 Ti; the application is completed by pycharm in python3.7 version;
[0062] After determining the experimental environment of the algorithm, the uid of the user under the star super post and the hot topic is crawled, the features required by the obtained user uid crawling are preprocessed to construct a data set, and 2107 users are labeled by manual labeling, including 1089 water army users and 1019 normal users; then the data set is shuffled, all data is divided into 80% training set and 20% validation set according to the segmentation rate of 0.2, the final accuracy reaches 95%, and the time consumption is 47 minutes, while the accuracy of the commonly used public opinion processing micro-blog water army classification method is 70-90%, and the time consumption is generally more than 1 hour. It can be seen that the method of the application effectively solves the defects of long time consumption and low accuracy in the current mainstream public opinion processing micro-blog water army classification problem.
Claims
1. A method for identifying Weibo water army based on multi-task learning, characterized by: The specific steps include: Step S1, pre-process the data of the number of users' followers, number of fans, gender, Weibo level, whether they are authenticated, authentication category, sunshine credit, membership category, membership level, and blog content, and divide the tasks into ; Sort , is the symmetric group of all permutations of 5 elements. A classifier is trained for each task using the SVM model and the ranking is calculated. The weight corresponding to each task in; Step S2, by solving the average error To study the order , traverse Each π in this process is assumed to be used to solve each individual task The learning algorithm is the same as for all tasks and is deterministic, determined by minimizing the upper bound of the corresponding items of the unsolved tasks. , to determine the best order for learning; Step S3: Based on the optimal learning order of the tasks returned in step S2, an independent SVM model is trained in parallel to realize Weibo water army identification; The step S1 includes the following sub-steps: Step S11: pre-process the data of the number of users followed, number of fans, gender, Weibo level, whether they are authenticated, authentication type, sunshine credit, membership type, membership level, and blog content; divide the task into subtasks according to the user's authentication type: :Identification of unauthenticated user water army, : Identification of ordinary user water army, : Identification of Blue V certified user water army, : Identification of Red V certified user water army, : Identification of Orange V certified users’ water army; Step S12: Use the standard linear SVM model as the learner for each task. The data trained by the learner is the data obtained after preprocessing in S11. For these 5 subtasks, sort them according to the order. Sequential processing is performed, where , is the symmetry group of the subtasks; Step S13, for sorting The first task in Given a weight vector , define the algorithm A shown in the following formula, which is used to calculate the current task The weight vector : in, is the weight vector of the previous task, is a slack variable, in order to tolerate some samples that do not meet the constraints, , , using features Map each data vector Projection to a higher or even infinite dimensional space eigenvector In, and ;C>0; The step S2 includes the following sub-steps: Step S21, designing a network structure. The calculation formula of the network structure is as follows: Calculate the average expected error : Where x is the data pre-processed in step S11, and also obeys the independent and identically distributed IID. y is the category corresponding to the user, 0 is a normal user, and 1 is a water army user. For the underlying data distribution, through an unknown probability distribution exists in Above, are known parameters; for each task, the learner uses a linear predictor , and the classification performance is measured by 0-1 loss; n is the number of tasks in each π, which is 5; Define the learner's goal as finding 5 weight vectors Make the task The average expected error be minimized; Step S22: Use the algorithm A defined in step S13 to calculate the weight vector of each task. ; Define the average expected error of the obtained learner The upper limit theorem is as follows: (1) The left one is the task Half of the average expected error on is the minimum average expected error we want to obtain; is the harmonic mean of the sample, where each are all values between 0 and 1; and is the training sample point and A monotonically decreasing function of the distance between defined hyperplanes; Step S23, sequential traversal All sorts in , for each sort , traverse the tasks and find a ranking π of all tasks that can reduce the right side value of formula (1) in turn; thus, it is possible to find a ranking that reduces the average expected error A sorting π of , taking the order of the task numbers inside it as the optimal learning order.
2. The method for identifying Weibo water army based on multi-task learning according to claim 1, characterized in that: In step S22, when When it is correctly classified and far away from the splitting hyperplane, its value is close to 0; when When it is classified in the wrong half space far from the separating hyperplane, its value is close to 1; when When on the splitting hyperplane, its value is 0.5; , is the Gaussian error function.
3. The method for identifying Weibo trolls based on multi-task learning as claimed in claim 2, characterized in that: The step S3 includes the following sub-steps: Step S31, training an independent SVM model through parallelization; Step S32, select the linear kernel function, map the data obtained after S11 preprocessing to a high-dimensional space, and then according to the optimal learning order and the corresponding weight vector , =1, use the dataset To train the SVM model, It's a task The corresponding set ); Find an optimal decision boundary to separate data points of different categories, use cross-validation to adjust the model's hyperparameters, and obtain a trained SVM model; In step S33, the data to be tested is pre-processed and then input into the trained SVM model to complete the prediction of Weibo water army.
Citation Information
Patent Citations
Method for detecting suspected online water armies for microblog
CN106940732A
Internet spammer account identification method and system
CN108197696A