A social network water army identification method based on evolutionary PU algorithm
By optimizing the identification of online trolls on social networks using the evolutionary PU algorithm and employing guiding vectors and crossover mutation operators, the high cost and low accuracy of manual labeling in online troll identification are solved, achieving efficient and accurate identification of online trolls.
Patent Information
- Application Number
- CN202411847117.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2044-12-16
AI Technical Summary
Existing methods for identifying online trolls on social networks require significant manual labeling costs, and unsupervised and semi-supervised learning methods suffer from limitations in accuracy, making it difficult to effectively distinguish between trolls and legitimate users.
We employ an evolutionary PU algorithm-based method for identifying online trolls on social networks. By collecting positively labeled and unlabeled samples, we optimize the classifier using an evolutionary algorithm, and combine guiding vectors and crossover mutation operators to optimize sample distribution and pseudo-label training, thereby reducing dependence on labels and improving identification efficiency and accuracy.
It achieves efficient identification of online trolls in social networks with a small number of tags, reduces false positives from normal users, improves the performance of the online troll detector, overcomes the bottleneck of traditional methods, and discovers more potential online trolls.
Smart Images

Figure CN119719986B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of statistical learning classification technology, and more specifically to a method for identifying online trolls on social networks based on the evolutionary PU algorithm. Background Technology
[0002] In the era of rapid internet development, social networks are virtual spaces where everyone can interact, and any user can read, post, and share content they like. While social networks offer groundbreaking benefits, such as enabling us to quickly access real-time news and share our favorite things, they also provide fertile ground for online trolls and paid commenters. Taking Sina Weibo as an example, hundreds or even thousands of trending topics emerge daily, each garnering hundreds of thousands or even millions of views. If these paid commenters aren't detected and removed promptly, netizens will find it difficult to distinguish between genuine and fabricated stories. Therefore, it is necessary to design efficient and accurate methods for identifying online trolls and paid commenters.
[0003] Current methods for identifying online trolls on social networks can be mainly categorized as follows:
[0004] The first category is supervised learning-based methods: For the problem of identifying online trolls on social networks, most scholars directly treat it as a binary classification problem. After collecting the required features, the collected sample set is manually labeled, with online trolls assigned positive labels and normal users assigned negative labels. Finally, a binary classifier commonly used in machine learning (SVM, NB, LR, etc.) is used for training to obtain the final online troll identification classifier. Since training the binary classifier requires a large amount of labeled data, this method incurs significant manual costs in implementation and is difficult to update and iterate in practical applications.
[0005] The second category is based on unsupervised learning methods: Considering that supervised learning methods require significant manual labeling, some researchers have adopted an unsupervised learning approach, using clustering to group unlabeled samples into two classes for classification. However, these unsupervised learning methods ignore the fact that online trolls often conceal their identities in real-world networks. Increasingly, these trolls learn the characteristics of legitimate users, making them difficult to distinguish, resulting in poor classifier performance from unsupervised learning methods.
[0006] The third category is based on semi-supervised learning methods: Recognizing the labor costs of supervised learning and the poor classification accuracy of unsupervised learning, more and more scholars are adopting semi-supervised learning methods to identify online trolls on social networks. Semi-supervised learning requires only a small number of labeled feature samples and is trained using a large number of unlabeled feature samples. This not only significantly reduces the cost of manual labeling but also allows for iterative increases in the training set, gradually improving the accuracy of the online troll classifier. However, because some hidden online trolls in the initial small number of labeled samples mimic the characteristics of normal users, the user labels identified in subsequent iterations may be inaccurate, thus ultimately causing the trained online troll classifier to reach a performance bottleneck. Summary of the Invention
[0007] To overcome the shortcomings of existing technologies, this invention proposes a social network troll identification method based on the evolutionary PU algorithm, aiming to improve the efficiency and accuracy of social network troll identification, not only reducing the probability of misclassifying normal users as trolls, but also finding as many troll users lurking in social networks as possible.
[0008] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0009] The present invention provides a method for identifying online trolls on social networks based on the evolutionary PU algorithm, characterized by the following steps:
[0010] Step 1: Collect m sets of positive labels Social network troll feature sample set and n unlabeled social network user feature sample sets Where m represents the number of samples of characteristics of online trolls on social networks, and n represents the number of samples of characteristics of users on social networks; This represents the i-th water army feature sample. yes The true category label, and ; Let j represent the j-th unlabeled user feature sample. , ;
[0011] Step 2: Initialize the population and guiding vector;
[0012] Step 2.1: Define the current iteration number as t, the maximum iteration number as T, and initialize... Let N be the number of individuals in the population, and let N be the generation in which the guiding vector begins to be updated. ;
[0013] Step 2.2: Define the population of generation t ,in, Describes the population of generation t. The e-th individual in, and where n is the length of the individual. express The j-th gene in the matrix encodes, representing the effect of... The pseudo-tags, and ,when ,express Will Recorded as a normal user, when ,express Will Recorded as online trolls; ;
[0014] Step 2.3: Use the trained t-th generation e-th initial classifier to... Perform predictions to obtain the output of the e-th initial classifier in the t-th generation. The predicted score for each unlabeled user feature sample is obtained, and based on the predicted score, the following is derived: Predicted label sequence for each unlabeled user feature sample And as Gene encoding in, thereby initializing The e-th individual ;
[0015] Step 2.4: Based on the output of each initial classifier in generation t... The predicted score for each unlabeled user feature sample is calculated, and the average predicted score for each unlabeled user feature sample is used as the guiding vector for the t-th generation. ,in, This represents the j-th unlabeled user feature sample. The average prediction score in generation t;
[0016] Step 3: Use the evolutionary PU algorithm to analyze the t-th generation population. After optimization, the population of generation t+1 is obtained. ;
[0017] Step 3.1: Calculate the population of generation t Population individual fitness value ;in, express fitness value;
[0018] Step 3.2: Based on the fitness values, perform the following steps on the t-th generation population. Mating pool selection is performed to obtain the original parent population of generation t. ,from Select the parent individual with an odd index, and denote any parent individual with an odd index as... ,in, express The j-th gene encodes, and simultaneously... Any parent individual with an even remaining subscript is denoted as ,in, express The j-th gene encodes, ;
[0019] Step 3.3: For the original parent population of generation t Evolution to produce the t-th generation offspring population ,in, This represents the e-th child individual in the t-th generation;
[0020] Step 3.4: Calculate the offspring population of generation t. fitness value ;
[0021] Step 3.5: [Regarding...] and Environmental selection is performed to obtain the (t+1)th generation population. ;
[0022] Step 4: If Then update the guiding vector of the t-th generation population. The guiding vector of the (t+1)th generation population is obtained. After assigning t+1 to t, return to step 3.2 and execute sequentially; otherwise, execute step 5.
[0023] Step 5: In the Tth generation population Corresponding fitness value Find the fitness value The individual in the population corresponding to the nearest point is taken as the optimal individual. and will Gene encoding as pseudo-tag set Thus utilizing and its corresponding positive label set and and its corresponding pseudo-tag set Training the optimal individual Corresponding classifier This is used to ultimately identify online trolls on social networks.
[0024] The social network troll identification method based on the evolutionary PU algorithm described in this invention is also characterized in that the t-th generation e-th initial classifier in step 2.3 is trained according to the following steps:
[0025] Step 2.3.1: Calculate using the SVDD algorithm Boundary decision function And set the discrimination rules:
[0026] like , indicating any user Sample points located outside the boundary. ,express Points that are inside the boundary; express Sample points belonging to the boundary;
[0027] Step 2.3.2: From Select any two unlabeled user feature samples without replacement. If both unlabeled user feature samples are either sample points inside the boundary or sample points on the boundary, then... Reselect; if only one unlabeled user feature sample is outside the boundary, then treat it as a normal user; if both unlabeled user feature samples are outside the boundary, then calculate the difference between the two unlabeled user feature samples and the boundary. Sample center point The Euclidean distance is used to select user feature samples with larger distances as normal users;
[0028] Step 2.3.3: Following the process in Step 2.3.2, obtain the feature sample set of the e-th normal user, which consists of m normal users. ,in, This represents the k-th normal user feature sample in the set of e-th normal user feature samples. The corresponding pseudo-tag set is denoted as ,and , express The pseudo-tags, and ; ;
[0029] Step 2.3.4: Utilize and its positive label set and and its pseudo-tag set Train the e-th initial classifier of the t-th generation to obtain the e-th initial classifier of the t-th generation after training.
[0030] Furthermore, step 3.1 includes:
[0031] Step 3.1.1: Utilize and its positive label set and and its predicted label sequence Training the e-th individual in generation t The corresponding individual classifier ;
[0032] Step 3.1.2: Construct using equations (1) and (2) First objective function Second objective function :
[0033] (1)
[0034] (2)
[0035] In equations (1) and (2), It's an indicator function; if the condition within the parentheses is met, then let... Otherwise, let ;
[0036] Step 3.1.3: Calculate using equation (3) fitness value :
[0037] (3).
[0038] Furthermore, in step 3.3, the parent population... Evolution produces offspring populations include:
[0039] Step 3.3.1: Find and China satisfies and The number of genes encoded Using the t-th generation guiding vector The predicted score in the search The gene codes are sorted in ascending order, and the first... The genes are cross-crossed to obtain the r-th cross-generated individual with an odd index. The individual after the (r+1)th crossover with an even index And constitute the t-th generation crossover population ,in, express The j-th gene in the sequence encodes, express The j-th gene in the sequence encodes, Indicates a value less than A random positive integer;
[0040] Step 3.3.2: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] Prediction scores greater than zero are normalized to the range [0,1]. Prediction scores less than zero are normalized to the range [-1, 0], thus obtaining the normalized generation t-th guiding vector. ,in, This represents the j-th unlabeled user feature sample. The normalized prediction score in generation t;
[0041] Step 3.3.3: Calculate using equation (4) The probability of mutation encoded by the j-th gene in all individuals after crossover. Thus, the intermediate population of generation t is obtained. The set of mutation probabilities for all gene coding sites in ;
[0042] (4)
[0043] In equation (4), A is a hyperparameter, and , ;
[0044] Step 3.3.4: Generate The corresponding set of random decimals of size n and values between 0 and 1 ,in, express The random number corresponding to the j-th gene coding position, and ;
[0045] like and Then The j-th gene encodes The mutation result is -1; otherwise, no mutation occurs, thus obtaining the r-th individual after mutation. ;
[0046] generate The corresponding set of random decimals of size n and values between 0 and 1 ,in, express The random number encoded by the j-th gene, and ;
[0047] like and Then The j-th gene encodes The mutation is 1; otherwise, there is no mutation. This process is repeated to obtain the (r+1)th individual after mutation. .
[0048] Furthermore, in step 4, the population guidance vector of generation t is updated. include:
[0049] Step 4.1.1: If Then let After assigning t+1 to t, return to step 3.2 and execute sequentially; otherwise, calculate... The fitness value of each individual in the target space is related to the fitness value. The distance between them is defined as the fitness value corresponding to the minimum distance. And the individual corresponding to the smallest distance is denoted as ;in, express The first objective function value of the optimal individual. express The second objective function value of the optimal individual;
[0050] Step 4.1.2: Construct a set of all 1s of length n. ,in, Represents the guiding vector right The pseudo-label of the j-th unlabeled user feature sample, and ,like Then The value is assigned to -1, thus obtaining the updated set. And as exist The pseudo-tag set on; utilizing and its corresponding positive label set and and its corresponding pseudo-tags Train the t-th generation classifier And calculate using equations (1) and (2). fitness value ;in, Represents the guiding vector The corresponding first objective function value, Represents the guiding vector The corresponding second objective function value;
[0051] Step 4.1.3: Comparison and respectively with fitness value Distance between:
[0052] like and If the distance between them is smaller, then... Gene encoding as pseudo-tag set Thus utilizing and and and Training the (t+1)th generation classifier and utilize right Make a prediction and obtain Predicted score for each unlabeled user feature sample and order Otherwise, let .
[0053] The present invention provides an electronic device, including a memory and a processor, wherein the memory is used to store a program that supports the processor in executing the social network troll identification method, and the processor is configured to execute the program stored in the memory.
[0054] The present invention discloses a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, performs the steps of the social network troll identification method.
[0055] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0056] 1. This invention proposes a social network troll identification method based on the evolutionary PU algorithm. Compared with traditional supervised learning, unsupervised learning and semi-supervised learning methods, it no longer requires a large number of labeled samples for training and can make full use of unlabeled user feature samples and a small number of labeled troll feature samples. Combined with the covert characteristics of network trolls, the model classification performance is further optimized, and finally a network troll identifier with better performance is obtained.
[0057] 2. In the process of training the network troll detector, this invention directly targets the first objective function. Second objective function Optimizing these two objectives effectively measures the overall performance of data processing with label uncertainty and class imbalance, overcomes the over-reliance on labels in traditional machine learning methods, breaks through the bottleneck of traditional semi-supervised learning, and makes the final trained network troll detector perform better than traditional detectors in identifying trolls. While minimizing the misclassification of normal users as network trolls, it also discovers more trolls hidden in social networks.
[0058] 3. This invention further improves the evolutionary operator based on the NSGA-II algorithm framework. By introducing a guiding vector, it roughly depicts the distribution of network troll feature samples and normal user feature samples in the sample space. The guiding vector is dynamically updated in the later stages of population evolution to improve the accuracy of the overall sample distribution. Due to the large number of unlabeled user feature samples, the individual gene encoding becomes too long, making it difficult to generate new network troll identifiers through crossover. Therefore, a guiding vector-based crossover operator is proposed. Furthermore, considering the potential for high classification error rates for user samples around the classification surface due to the stealth of network trolls, a guiding vector-based mutation operator is proposed, increasing the pseudo-label mutation probability of user feature samples in potential troll regions. Adopting a guiding vector-based crossover and mutation operator can generate more excellent network troll identifiers and increase the probability of detecting potential trolls, thus improving the recognition performance of the final network troll identifier. Attached Figure Description
[0059] Figure 1 This is a flowchart of the present invention;
[0060] Figure 2 This is a schematic diagram of the intersection of the two parts of the present invention;
[0061] Figure 3 This is a schematic diagram illustrating a variation of the present invention. Detailed Implementation
[0062] In this embodiment, considering the stealth of online trolls and the need for a large number of manual labels in traditional online troll identification, a social network troll identification method based on evolutionary PU is proposed. This method treats the social network troll identification problem as a PU learning problem and further optimizes the online troll classifier using an evolutionary optimization algorithm, thereby improving the accuracy of social network troll identification. This overcomes the problems of excessive reliance on a large number of labeled samples in traditional supervised learning troll identification and low prediction accuracy in unsupervised learning troll identification. Specifically, as follows... Figure 1 As shown, the method includes the following steps:
[0063] Step 1: Collect m sets of positive labels Social network troll feature sample set and n unlabeled social network user feature sample sets Where m represents the number of samples of characteristics of online trolls on social networks, and n represents the number of samples of characteristics of users on social networks; This represents the i-th water army feature sample. yes The true category label, and ; Let j represent the j-th unlabeled user feature sample. , .
[0064] Step 2: Initialize the population and guiding vector;
[0065] Step 2.1: Define the current iteration number as t, the maximum iteration number as T, and initialize... Let N be the number of individuals in the population, and let N be the generation in which the guiding vector begins to be updated. ;
[0066] Step 2.2: Define the population of generation t ,in, Describes the population of generation t. The e-th individual in, and where n is the length of the individual. express The j-th gene in the matrix encodes, representing the effect of... The pseudo-tags, and ,when ,express Will Recorded as a normal user, when ,express Will Recorded as online trolls; .
[0067] Step 2.3: Initialize the individual ;
[0068] Step 2.3.1: Calculate using the SVDD algorithm Boundary decision function And set the discrimination rules:
[0069] like , indicating any user Sample points located outside the boundary. ,express Points that are inside the boundary; express Sample points belonging to the boundary;
[0070] Step 2.3.2: From Select any two unlabeled user feature samples without replacement. If both unlabeled user feature samples are either sample points inside the boundary or sample points on the boundary, then... Reselect; if only one unlabeled user feature sample is outside the boundary, then treat it as a normal user; if both unlabeled user feature samples are outside the boundary, then calculate the difference between the two unlabeled user feature samples and the boundary. Sample center point The Euclidean distance is used to select user feature samples with larger distances as normal users.
[0071] Step 2.3.3: Following the process in Step 2.3.2, obtain the feature sample set of the e-th normal user, which consists of m normal users. ,in, This represents the k-th normal user feature sample in the set of e-th normal user feature samples. The corresponding pseudo-tag set is denoted as ,and , express The pseudo-tags, and ; ;
[0072] Step 2.3.4: Utilize and its positive label set and and its pseudo-tag set Train the e-th initial classifier of generation t to obtain the e-th initial classifier of generation t after training; use the e-th initial classifier of generation t to... Perform predictions to obtain the output of the e-th initial classifier in the t-th generation. The predicted score for each unlabeled user feature sample is obtained, and based on the predicted score, the following is derived: Predicted label sequence for each unlabeled user feature sample And as Gene encoding in, thereby initializing The e-th individual .
[0073] Step 2.4: Based on the output of each initial classifier in generation t... The predicted score for each unlabeled user feature sample is calculated, and the average predicted score for each unlabeled user feature sample is used as the guiding vector for the t-th generation. ,in, This represents the j-th unlabeled user feature sample. The average prediction score in generation t.
[0074] Step 3: Use the evolutionary PU algorithm to analyze the t-th generation population. After optimization, the population of generation t+1 is obtained. ;
[0075] Step 3.1: Calculate the population of generation t Population individual fitness value ;in, express fitness value;
[0076] Step 3.1.1: Utilize and its positive label set and and its predicted label sequence Training the e-th individual in generation t The corresponding individual classifier .
[0077] Step 3.1.2: Construct using equations (1) and (2) First objective function Second objective function :
[0078] (1)
[0079] (2)
[0080] In equations (1) and (2), It's an indicator function; if the condition within the parentheses is met, then let... Otherwise, let .
[0081] Step 3.1.3: Calculate using equation (3) fitness value :
[0082] (3)
[0083] Step 3.2: Based on the fitness values, perform the following steps on the t-th generation population. Mating pool selection is performed to obtain the original parent population of generation t. ,from Select the parent individual with an odd index, and denote any parent individual with an odd index as... ,in, express The j-th gene encodes, and simultaneously... Any parent individual with an even remaining subscript is denoted as ,in, express The j-th gene encodes, .
[0084] Step 3.3: For the original parent population of generation t Evolution to produce the t-th generation offspring population ,in, This represents the e-th offspring individual in the t-th generation. The evolution of the parent population is mainly divided into two stages. The first stage is the individual crossover stage based on the guide vector, which includes steps 3.3.1 and 3.3.2. The main purpose is to avoid the individual gene code being too long, making it difficult to produce offspring individuals that are significantly different from the parent, thereby improving the diversity of the network water army identifier. The second stage is the individual mutation stage based on the guide vector, which includes steps 3.3.3 and 3.3.4. The main purpose is to increase the mutation probability of the potential network water army area, thereby improving the mutation efficiency and the accuracy of the individual gene code.
[0085] Step 3.3.1: Find and China satisfies and The number of genes encoded Using the t-th generation guiding vector The predicted score in the search The gene codes are sorted in ascending order, and the first... The coding of each gene is cross-coded, such as Figure 2 As shown, and The indices that satisfy the above conditions are {5, 7, 8}. Finally, the index {7} is selected for crossover to obtain the crossover individuals. and Parental population After crossover, we obtain the r-th crossover individual with an odd index. The individual after the (r+1)th crossover with an even index And constitute the t-th generation crossover population ,in, express The j-th gene in the sequence encodes, express The j-th gene in the sequence encodes, Indicates a value less than A random positive integer.
[0086] Step 3.3.2: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] Prediction scores greater than zero are normalized to the range [0,1]. Prediction scores less than zero are normalized to the range [-1, 0], thus obtaining the normalized generation t-th guiding vector. ,in, This represents the j-th unlabeled user feature sample. The normalized prediction score in generation t;
[0087] Step 3.3.3: Calculate using equation (4) The probability of mutation encoded by the j-th gene in all individuals after crossover. Thus, the intermediate population of generation t is obtained. The set of mutation probabilities for all gene coding sites in ;
[0088] (4)
[0089] In equation (4), A is a hyperparameter, and , .
[0090] Step 3.3.4: Generate The corresponding set of random decimals of size n and values between 0 and 1 ,in, express The random number corresponding to the j-th gene coding position, and ;
[0091] like and Then The j-th gene encodes The mutation result is -1; otherwise, no mutation occurs, thus obtaining the r-th individual after mutation. ;like Figure 3 As shown, Find the index {1, 2, 3, 4, 5, 8}, and the final individual's mutated gene code index is {4, 8}. Mutate the gene code from 1 to -1 to obtain the mutated offspring. .
[0092] generate The corresponding set of random decimals of size n and values between 0 and 1 ,in, express The random number encoded by the j-th gene, and ;
[0093] like and Then The j-th gene encodes The mutation is 1; otherwise, there is no mutation. This process is repeated to obtain the (r+1)th individual after mutation. ;like Figure 3 As shown, Find the indices {5, 8, 9, 10, 11, 12}. The final individual mutation gene code index is {8}. Mutate the gene code from -1 to 1 to obtain the mutated offspring. .
[0094] Step 3.4: Calculate the offspring population of generation t. fitness value ;
[0095] Step 3.5: [Regarding...] and Environmental selection is performed to obtain the (t+1)th generation population. ;
[0096] Step 4: If Then update the guiding vector of the t-th generation population. The guiding vector of the (t+1)th generation population is obtained. After assigning t+1 to t, return to step 3.2 and execute sequentially; in the later stages of population evolution, a better performing individual classifier can be obtained, which may be more accurate in describing the distribution of user feature samples, and the update of the guiding vector can help the offspring population evolve in a more accurate direction; otherwise, execute step 5.
[0097] Step 4.1.1: If Then let After assigning t+1 to t, return to step 3.2 and execute sequentially; otherwise, calculate... The fitness value of each individual in the target space is close to the ideal optimal point. Distance, and record the fitness value corresponding to the minimum distance as And the individual corresponding to the smallest distance is denoted as ;in, express The first objective function value of the optimal individual. express The second objective function value of the optimal individual;
[0098] Step 4.1.2: Construct a set of all 1s of length n. ,in, Represents the guiding vector right The pseudo-label of the j-th unlabeled user feature sample, and ,like Then The value is assigned to -1, thus obtaining the updated set. And as exist The pseudo-tag set on;
[0099] use and its corresponding positive label set and and its corresponding pseudo-tags Train the t-th generation classifier And calculate using equations (1) and (2). fitness value ;in, Represents the guiding vector The corresponding first objective function value, Represents the guiding vector The corresponding value of the second objective function.
[0100] Step 4.1.3: Comparison and respectively with Distance between:
[0101] like and If the distance between them is smaller, then... Gene encoding as pseudo-tag set Thus utilizing and and and Training the (t+1)th generation classifier and utilize right Make a prediction and obtain Predicted score for each unlabeled user feature sample and order Otherwise, let .
[0102] Step 5: In the Tth generation population Corresponding fitness value Find the fitness value The individual in the population corresponding to the nearest point is taken as the optimal individual. , Able to take the first objective function more comprehensively Second objective function As the ultimate online troll detector, it can better meet practical needs in identifying online trolls. And it will... Gene encoding as pseudo-tag set Thus utilizing and its corresponding positive label set and and its corresponding pseudo-tag set Training the optimal individual Corresponding classifier It is used to identify online trolls on social networks.
[0103] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing a social network troll identification method. The processor is configured to execute the program stored in the memory.
[0104] In this embodiment, a computer-readable storage medium stores a computer program, which, when run by a processor, executes the steps of the aforementioned social network troll identification method.
Claims
1. A method for identifying online trolls on social networks based on the evolutionary PU algorithm, characterized in that, Includes the following steps: Step 1: Collect m sets of positive labels Social network troll feature sample set and n unlabeled social network user feature sample sets Where m represents the number of samples of characteristics of online trolls on social networks, and n represents the number of samples of characteristics of users on social networks; This represents the i-th water army feature sample. yes The true category label, and ; Let j represent the j-th unlabeled user feature sample. , ; Step 2: Initialize the population and guiding vector; Step 2.1: Define the current iteration number as t, the maximum iteration number as T, and initialize... Let N be the number of individuals in the population, and let N be the generation in which the guiding vector begins to be updated. ; Step 2.2: Define the population of generation t ,in, Describes the population of generation t. The e-th individual in, and where n is the length of the individual. express The j-th gene in the matrix encodes, representing the effect of... The pseudo-tags, and ,when ,express Will Recorded as a normal user, when ,express Will Recorded as online trolls; ; Step 2.3: Use the trained t-th generation e-th initial classifier to... Perform predictions to obtain the output of the e-th initial classifier in the t-th generation. The predicted score for each unlabeled user feature sample is obtained, and based on the predicted score, the following is derived: Predicted label sequence for each unlabeled user feature sample And as Gene encoding in, thereby initializing The e-th individual ; Step 2.4: Based on the output of each initial classifier in generation t... The predicted score for each unlabeled user feature sample is calculated, and the average predicted score for each unlabeled user feature sample is used as the guiding vector for the t-th generation. ,in, This represents the j-th unlabeled user feature sample. The average prediction score in generation t; Step 3: Use the evolutionary PU algorithm to analyze the t-th generation population. After optimization, the population of generation t+1 is obtained. ; Step 3.1: Calculate the population of generation t Population individual fitness value ;in, express fitness value; Step 3.2: Based on the fitness values, perform the following steps on the t-th generation population. Mating pool selection is performed to obtain the original parent population of generation t. ,from Select the parent individual with an odd index, and denote any parent individual with an odd index as... ,in, express The j-th gene encodes, and simultaneously... Any parent individual with an even remaining subscript is denoted as ,in, express The j-th gene encodes, ; Step 3.3: For the original parent population of generation t Evolution to produce the t-th generation offspring population ,in, This represents the e-th child individual in the t-th generation; Step 3.4: Calculate the offspring population of generation t. fitness value ; Step 3.5: [Regarding...] and Environmental selection is performed to obtain the (t+1)th generation population. ; Step 4: If Then update the guiding vector of the t-th generation population. The guiding vector of the (t+1)th generation population is obtained. After assigning t+1 to t, return to step 3.2 and execute sequentially; otherwise, execute step 5. Step 4.1.1: If Then let After assigning t+1 to t, return to step 3.2 and execute sequentially; otherwise, calculate... The fitness value of each individual in the target space is related to the fitness value. The distance between them is defined as the fitness value corresponding to the minimum distance. And the individual corresponding to the smallest distance is denoted as ;in, express The first objective function value of the optimal individual. express The second objective function value of the optimal individual; Step 4.1.2: Construct a set of all 1s of length n. ,in, Represents the guiding vector right The pseudo-label of the j-th unlabeled user feature sample, and ,like Then The value is assigned to -1, thus obtaining the updated set. And as exist The pseudo-tag set on; utilizing and its corresponding positive label set and and its corresponding pseudo-tags Train the t-th generation classifier And calculate using equations (1) and (2). fitness value ;in, Represents the guiding vector The corresponding first objective function value, Represents the guiding vector The corresponding second objective function value; Step 4.1.3: Comparison and respectively with fitness value Distance between: like and If the distance between them is smaller, then... Gene encoding as pseudo-tag set Thus utilizing and and and Training the (t+1)th generation classifier and utilize right Make a prediction and obtain Predicted score for each unlabeled user feature sample and order Otherwise, let ; Step 5: In the Tth generation population Corresponding fitness value Find the fitness value The individual in the population corresponding to the nearest point is taken as the optimal individual. and will Gene encoding as pseudo-tag set Thus utilizing and its corresponding positive label set and and its corresponding pseudo-tag set Training the optimal individual Corresponding classifier This is used to ultimately identify online trolls on social networks.
2. The social network troll identification method based on the evolutionary PU algorithm according to claim 1, characterized in that, The initial classifier of the t-th generation e-th iteration in step 2.3 is trained according to the following steps: Step 2.3.1: Calculate using the SVDD algorithm Boundary decision function And set the discrimination rules: like , indicating any user Sample points located outside the boundary. ,express Points that are inside the boundary; express Sample points belonging to the boundary; Step 2.3.2: From Select any two unlabeled user feature samples without replacement. If both unlabeled user feature samples are either sample points inside the boundary or sample points on the boundary, then... Reselect; if only one unlabeled user feature sample is outside the boundary, then treat it as a normal user; if both unlabeled user feature samples are outside the boundary, then calculate the difference between the two unlabeled user feature samples and the boundary. Sample center point The Euclidean distance is used to select user feature samples with larger distances as normal users; Step 2.3.3: Following the process in Step 2.3.2, obtain the feature sample set of the e-th normal user, which consists of m normal users. ,in, This represents the k-th normal user feature sample in the set of e-th normal user feature samples. The corresponding pseudo-tag set is denoted as ,and , express The pseudo-tags, and ; ; Step 2.3.4: Utilize and its positive label set and and its pseudo-tag set Train the e-th initial classifier of the t-th generation to obtain the e-th initial classifier of the t-th generation after training.
3. The social network troll identification method based on the evolutionary PU algorithm according to claim 1, characterized in that, Step 3.1 includes: Step 3.1.1: Utilize and its positive label set and and its predicted label sequence Training the e-th individual in generation t The corresponding individual classifier ; Step 3.1.2: Construct using equations (1) and (2) First objective function Second objective function : (1) (2) In equations (1) and (2), It's an indicator function; if the condition within the parentheses is met, then let... Otherwise, let ; Step 3.1.3: Calculate using equation (3) fitness value : (3)。 4. The social network troll identification method based on the evolutionary PU algorithm according to claim 1, characterized in that, Step 3.3 Parent population Evolution produces offspring populations include: Step 3.3.1: Find and China satisfies and The number of genes encoded Using the t-th generation guiding vector The predicted score in the search The gene codes are sorted in ascending order, and the first... The genes are cross-crossed to obtain the r-th cross-generated individual with an odd index. The individual after the (r+1)th crossover with an even index And constitute the t-th generation crossover population ,in, express The j-th gene in the sequence encodes, express The j-th gene in the sequence encodes, Indicates a value less than A random positive integer; Step 3.3.2: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] Prediction scores greater than zero are normalized to the range [0,1]. Prediction scores less than zero are normalized to the range [-1, 0], thus obtaining the normalized generation t-th guiding vector. ,in, This represents the j-th unlabeled user feature sample. The normalized prediction score in generation t; Step 3.3.3: Calculate using equation (4) The probability of mutation encoded by the j-th gene in all individuals after crossover. Thus, the intermediate population of generation t is obtained. The set of mutation probabilities for all gene coding sites in ; (4) In equation (4), A is a hyperparameter, and , ; Step 3.3.4: Generate The corresponding set of random decimals of size n and values between 0 and 1 ,in, express The random number corresponding to the j-th gene coding position, and ; like and Then The j-th gene encodes The mutation result is -1; otherwise, no mutation occurs, thus obtaining the r-th individual after mutation. ; generate The corresponding set of random decimals of size n and values between 0 and 1 ,in, express The random number encoded by the j-th gene, and ; like and Then The j-th gene encodes The mutation is 1; otherwise, there is no mutation. This process is repeated to obtain the (r+1)th individual after mutation. .
5. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store programs that support the processor in executing any of the social network troll identification methods of claims 1-4, and the processor is configured to execute the programs stored in the memory.
6. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is run by the processor, it performs the steps of any of the social network troll identification methods described in claims 1-4.
Citation Information
Patent Citations
C-RAN carrier migration resource demand prediction method based on improved PSO
CN106102079A
Farmland weed intelligent identification method based on evolution PU learning
CN118736423A