Social network water army identification method based on evolution PU algorithm

By applying evolutionary PU algorithms and guided vector optimization technology in social network naval army recognition, the problems of high labor costs and poor accuracy in the existing methods are solved, and more efficient and accurate naval army recognition effects are achieved.

CN119719986AActive Publication Date: 2025-03-28ANHUI UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411847117.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-03-28
Estimated Expiration
2044-12-16

AI Technical Summary

Technical Problem

The existing social network water army identification methods have problems with high labor costs and poor accuracy, especially when identifying water army users lurking in social networks.

Method used

The social network naval army recognition method based on evolutionary PU algorithm is adopted. By collecting positive label sets and label-free user feature samples, the population is optimized using evolutionary optimization algorithm, the guidance vector is dynamically updated, and a more accurate pseudo-label set is generated, thereby training an efficient naval army recognizer.

Benefits of technology

It improves the efficiency and accuracy of the identification of water army on social networks, reduces the probability of normal users being misclassified as water army, and discovers more water army users lurking in social networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719986A_ABST
    Figure CN119719986A_ABST
Patent Text Reader

Abstract

The invention discloses a social network water army identification method based on an evolutionary PU algorithm, and the method comprises the steps: 1, collecting a positive-label social network water army feature sample set and a non-label social network user feature sample set, and taking the sample sets as to-be-trained data sets; 2, initializing a population, and constructing a guide vector; step 3, optimizing the population based on an evolutionary PU algorithm; 4, updating a guide vector; and 5, selecting an optimal individual from the final population as a real social network water army recognizer. According to the method, the social network water army recognition efficiency and accuracy can be improved, the probability that normal users are wrongly classified into water army is reduced, and more water army latent in the social network can be found as much as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of statistical learning classification, and more specifically to a method for identifying water army in social network based on evolutionary PU algorithm. Background Art

[0002] In the era of rapid development of the Internet, social networks are virtual spaces for everyone to communicate with each other. Any user can read, publish and share their favorite content on social networks. Although social networks have some groundbreaking benefits, such as allowing us to understand real-time news more quickly and share our favorite things, they also provide a breeding ground for social network water armies. Take Sina Weibo as an example. There are hundreds of hot events every day, and the number of clicks is hundreds of thousands or even millions. If social network water army users are not detected and cleaned up in time, it will make it difficult for netizens to distinguish whether the hot event is true or a rumor. Therefore, it is necessary to design an efficient and accurate method for identifying social network water armies.

[0003] The current methods for identifying water army in social networks can be divided into the following categories:

[0004] The first category is the supervised learning-based method: For the problem of identifying social network trolls, most scholars directly regard the problem of identifying social network trolls as a binary classification problem. After collecting the required features, the collected sample sets are labeled manually, with network trolls labeled positively and normal users labeled negatively. Finally, the binary classifiers commonly used in machine learning (SVM, NB, LR, etc.) are used for training to obtain the final network troll identification classifier. Since training a binary classifier requires a large amount of labeled data, this method requires a lot of labor costs in the implementation stage and is difficult to update and iterate in specific applications.

[0005] The second category is based on unsupervised learning methods: Considering that supervised learning methods require a lot of labor costs for manual labeling, some scholars start from the perspective of unsupervised learning and cluster the collected unlabeled samples into two categories to achieve classification. However, these unsupervised learning methods ignore the fact that online water armies in the real network will hide their identities. More and more online water armies will learn the relevant characteristics of normal users and are difficult to distinguish, resulting in poor results of the classifiers trained by unsupervised learning methods.

[0006] The third category is based on semi-supervised learning methods: Considering the labor cost problem of supervised learning and the poor classification accuracy of unsupervised learning, more and more scholars use semi-supervised learning methods to identify social network water army. Semi-supervised learning only requires a small number of labeled feature samples, and uses a large number of unlabeled feature samples for training. It can not only greatly reduce the cost of manual labeling, but also increase the number of training set samples through iteration, gradually improving the accuracy of the water army user classifier. However, due to the fact that some hidden water army users in the initial small number of labeled samples imitate the characteristics of normal users, the user labels identified in the subsequent iteration process may not be accurate, so the water army user classifier finally trained reaches a performance bottleneck. Summary of the invention

[0007] In order to overcome the shortcomings of the prior art, the present invention proposes a social network water army identification method based on the evolutionary PU algorithm, in order to improve the efficiency and accuracy of social network water army identification, not only to reduce the probability of misclassifying normal users as water army, but also to find as many water army users lurking in the social network as possible.

[0008] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme:

[0009] The invention discloses a method for identifying water army in social network based on evolutionary PU algorithm, which comprises the following steps:

[0010] Step 1: Collect m positive label sets A sample set of social network water army characteristics and n unlabeled social network user feature sample sets , where m represents the number of samples of social network water army characteristics, and n represents the number of samples of social network user characteristics; represents the i-th navy feature sample, yes The true category label of ; represents the jth unlabeled user feature sample, , ;

[0011] Step 2: Initialize the population and guide vector;

[0012] Step 2.1: Define the current number of iterations as t, the maximum number of iterations as T, and initialize , define the number of individuals in the population as N, and the number of generations for the bootstrap vector to start updating is ;

[0013] Step 2.2: Define the tth generation population ,in, represents the tth generation population The e-th individual in , and , n is the length of the individual, express The jth gene code in , and ,when ,express Will Recorded as a normal user, when ,express Will Recorded as Internet water army; ;

[0014] Step 2.3: Use the trained t-th generation e-th initial classifier to Make a prediction and get the output of the e-th initial classifier of the t-th generation The prediction score of each unlabeled user feature sample in , and according to the prediction score, we get The predicted label sequence for each unlabeled user feature sample in and as The genetic code in , thereby initializing The eth individual ;

[0015] Step 2.4: According to the output of each initial classifier of the tth generation The prediction score of each unlabeled user feature sample in is calculated, and the average prediction score of each unlabeled user feature sample is calculated and used as the guidance vector of the tth generation ,in, Represents the jth unlabeled user feature sample The average prediction score in generation t;

[0016] Step 3: Use the evolutionary PU algorithm to analyze the tth generation population Optimize and get the t+1 generation population ;

[0017] Step 3.1: Calculate the population of generation t The fitness value of individuals in the population ;in, express The fitness value of

[0018] Step 3.2: According to the fitness value, the t-th generation population Perform mating pool selection to obtain the original parent population of the tth generation ,from Select the parent individuals with odd subscripts, and record any parent individual with an odd subscript as ,in, express The jth gene code in Any remaining parent individual with an even subscript in ,in, express The jth gene in is encoded, ;

[0019] Step 3.3: For the original parent population of the tth generation Evolve to produce a population of offspring of generation t ,in, represents the e-th offspring individual of the t-th generation;

[0020] Step 3.4: Calculate the t-th generation offspring population The fitness value of ;

[0021] Step 3.5: and Perform environmental selection to obtain the t+1 generation population ;

[0022] Step 4: If , then update the t-th generation population guidance vector , and get the t+1 generation population guidance vector , and assign t+1 to t, then return to step 3.2 to execute sequentially; otherwise, execute step 5;

[0023] Step 5: Population at generation T The corresponding fitness value Find the fitness value from The population individual corresponding to the nearest point is taken as the optimal individual , and The gene encoding The pseudo label set , thereby utilizing and its corresponding positive label set and and its corresponding pseudo-label set Training the best individual The corresponding classifier , which is used to ultimately identify water armies in social networks.

[0024] The social network troll identification method based on the evolutionary PU algorithm of the present 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 SVDD algorithm The boundary decision function , and set the discrimination rules:

[0026] like , indicating that any user Sample points that are outside the boundary, ,express Points that belong to the interior of the boundary; express The sample points belong to the boundary;

[0027] Step 2.3.2: From Select any two unlabeled user feature samples without replacement. If the two unlabeled user feature samples are both sample points inside the boundary or sample points on the boundary, then Reselect from ; if only one unlabeled user feature sample is a sample point outside the boundary, it is regarded as a normal user; if two unlabeled user feature samples are sample points outside the boundary, the two unlabeled user feature samples are calculated to be respectively The sample center point The Euclidean distance is calculated, and the user feature sample with a larger distance is selected as a normal user;

[0028] Step 2.3.3: Follow the process of step 2.3.2 to obtain the e-th normal user feature sample set consisting of m normal users. ,in, represents the kth normal user feature sample in the eth normal user feature sample set, The corresponding pseudo label set is recorded as ,and , express , and ; ;

[0029] Step 2.3.4: Exploitation and its positive label set and and its pseudo-label set Train the e-th initial classifier of the t-th generation to obtain the trained e-th initial classifier of the t-th generation.

[0030] Furthermore, the step 3.1 includes:

[0031] Step 3.1.1: Exploitation and its positive label set and and its predicted label sequence Train the e-th individual of the t-th generation The corresponding individual classifier ;

[0032] Step 3.1.2: Use equations (1) and (2) to construct The first objective function And the second objective function :

[0033] (1)

[0034] (2)

[0035] In formula (1) and formula (2), is an indicator function. If the conditions in the brackets are met, then , otherwise, let ;

[0036] Step 3.1.3: Calculate using formula (3) The fitness value of :

[0037] (3).

[0038] Furthermore, the parent population in step 3.3 Evolution produces offspring populations include:

[0039] Step 3.3.1: Find and Satisfied and The number of genes encoded by , using the t-th generation guidance vector The predicted score pairs in Sort the gene codes in ascending order and Gene codes are crossed to obtain the rth individual after crossover with an odd subscript. and the individual after the r+1th crossover with an even subscript And constitute the t-th generation crossover population ,in, express The j-th gene code in express The j-th gene code in Indicates a less than A random positive integer;

[0040] Step 3.3.2: The prediction scores greater than zero in are normalized to [0,1], The prediction scores less than zero in are normalized to [-1,0], thus obtaining the normalized t-th generation guidance vector ,in, Represents the jth unlabeled user feature sample Normalized prediction score at generation t;

[0041] Step 3.3.3: Calculate using formula (4) The probability of mutation of the jth gene encoding of all individuals after crossover , thus obtaining the intermediate population of the tth generation The set of mutation probabilities of all gene coding bits in ;

[0042] (4)

[0043] In formula (4), A is a hyperparameter, and , ;

[0044] Step 3.3.4: Generate The corresponding random decimal set of size n and value 0-1 ,in, express The random number corresponding to the jth gene coding bit, and ;

[0045] like and , then The jth gene in Mutation is -1, otherwise, no mutation, thus obtaining the rth individual after mutation ;

[0046] generate The corresponding random decimal set of size n and value 0-1 ,in, express The random number corresponding to the jth gene code, and ;

[0047] like and , then The jth gene in The mutation is 1, otherwise, no mutation, and the r+1th individual after mutation is obtained .

[0048] Furthermore, the updating of the t-th generation population guide vector in step 4 is include:

[0049] Step 4.1.1: If , then let , assign t+1 to t, and return to step 3.2 to execute sequentially; otherwise, calculate The fitness value of each individual in the target space is related to the fitness value The distance between them, and the fitness value corresponding to the minimum distance is recorded as , and the individual corresponding to the smallest distance is recorded as ;in, express The first objective function value of the optimal individual in , express The second objective function value of the best individual in ;

[0050] Step 4.1.2: Construct a set of all 1s of length n ,in, represents the guide vector right The pseudo label of the jth unlabeled user feature sample in , and ,like , then Assign a value of -1 to get the updated set and as exist On the pseudo-label set; using and its corresponding positive label set and and its corresponding pseudo-label Train the tth generation classifier , and use equations (1) and (2) to calculate The fitness value is ;in, represents the guide vector The corresponding first objective function value is, represents the guide 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 The gene encoding The pseudo label set , thereby utilizing and and and Train the t+1th generation classifier , and use right Make a prediction and get The prediction score of each unlabeled user feature sample in , and order Otherwise, let .

[0053] An electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the social network water army identification method, and the processor is configured to execute the program stored in the memory.

[0054] The present invention provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, which is characterized in that when the computer program is run by a processor, the steps of the social network water army identification method are executed.

[0055] Compared with the prior art, the present invention has the following beneficial effects:

[0056] 1. The present 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 sample training and can make full use of unlabeled user feature samples and a small number of labeled troll feature samples. Combined with the hidden characteristics of network trolls, the model classification performance is further optimized, and finally a better network troll identifier is obtained.

[0057] 2. In the process of training the network water army identifier, the present invention directly performs the first objective function And the second objective function Optimizing these two objectives can well measure the overall performance of label uncertainty and category imbalance data processing, overcome the excessive reliance of traditional machine learning methods on labels, break through the bottleneck of traditional semi-supervised learning, and make the final trained network water army identifier better than the traditional identifier in identifying water army. While trying not to misclassify normal users as network water army, it can also discover more water army hidden in social networks.

[0058] 3. The present invention further improves the evolution operator on the basis of the NSGA-II algorithm framework, and introduces a guide vector to roughly depict the distribution of network water army feature samples and normal user feature samples in the sample space. The guide vector is dynamically updated in the late stage of population evolution to improve the accuracy of the overall sample distribution. Due to the large number of unlabeled user feature samples, the problem of individual gene codes being too long and making it difficult to generate new network water army identifiers by crossover occurs. Therefore, a crossover operator based on a guide vector is proposed, and considering that the concealment of network water armies may lead to a high classification error rate of user samples around the classification surface, a mutation operator based on a guide vector is proposed, which increases the probability of pseudo-label mutation of user feature samples in potential water army areas. The crossover mutation operator based on the guide vector can generate more excellent network water army identifiers, increase the probability of discovering potential water armies, and improve the recognition performance of the final network water army identifier. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 is a flow chart of the present invention;

[0060] Figure 2 It is a cross schematic diagram of the present invention;

[0061] Figure 3 Schematic diagram of the variation of the present invention. DETAILED DESCRIPTION

[0062] In this embodiment, from the perspective of the concealment of water army and the fact that traditional network water army identification requires a large number of manual labels, a social network water army identification method based on evolutionary PU is proposed. The social network water army identification problem is regarded as a PU learning problem, and the network water army classifier is further optimized in combination with the evolutionary optimization algorithm, thereby improving the accuracy of social network water army identification, overcoming the problem of excessive reliance on a large number of labeled samples in traditional supervised learning water army identification and low prediction accuracy of water army identification in unsupervised learning. Specifically, Figure 1 As shown, the method comprises the following steps:

[0063] Step 1: Collect m positive label sets A sample set of social network water army characteristics and n unlabeled social network user feature sample sets , where m represents the number of samples of social network water army characteristics, and n represents the number of samples of social network user characteristics; represents the i-th navy feature sample, yes The true category label of ; represents the jth unlabeled user feature sample, , .

[0064] Step 2: Initialize the population and guide vector;

[0065] Step 2.1: Define the current number of iterations as t, the maximum number of iterations as T, and initialize , define the number of individuals in the population as N, and the number of generations for the bootstrap vector to start updating is ;

[0066] Step 2.2: Define the tth generation population ,in, represents the tth generation population The e-th individual in , and , n is the length of the individual, express The jth gene code in , and ,when ,express Will Recorded as a normal user, when ,express Will Recorded as Internet water army; .

[0067] Step 2.3: Initialize individuals ;

[0068] Step 2.3.1: Calculate using SVDD algorithm The boundary decision function , and set the discrimination rules:

[0069] like , indicating that any user Sample points that are outside the boundary, ,express Points that belong to the interior of the boundary; express The sample points belong to the boundary;

[0070] Step 2.3.2: From Select any two unlabeled user feature samples without replacement. If the two unlabeled user feature samples are both sample points inside the boundary or sample points on the boundary, then Reselect from ; if only one unlabeled user feature sample is a sample point outside the boundary, it is regarded as a normal user; if two unlabeled user feature samples are sample points outside the boundary, the two unlabeled user feature samples are calculated to be respectively The sample center point The Euclidean distance is calculated and the user feature sample with a larger distance is selected as a normal user.

[0071] Step 2.3.3: Follow the process of step 2.3.2 to obtain the e-th normal user feature sample set consisting of m normal users. ,in, represents the kth normal user feature sample in the eth normal user feature sample set, The corresponding pseudo label set is recorded as ,and , express , and ; ;

[0072] Step 2.3.4: Exploitation and its positive label set and and its pseudo-label set Train the t-th generation e-th initial classifier to obtain the trained t-th generation e-th initial classifier; use the trained t-th generation e-th initial classifier to Make a prediction and get the output of the e-th initial classifier of the t-th generation The prediction score of each unlabeled user feature sample in , and according to the prediction score, we get The predicted label sequence for each unlabeled user feature sample in and as The genetic code in , thereby initializing The eth individual .

[0073] Step 2.4: According to the output of each initial classifier of the tth generation The prediction score of each unlabeled user feature sample in is calculated, and the average prediction score of each unlabeled user feature sample is calculated and used as the guidance vector of the tth generation ,in, Represents the jth unlabeled user feature sample The average prediction score at generation t.

[0074] Step 3: Use the evolutionary PU algorithm to analyze the tth generation population Optimize and get the t+1 generation population ;

[0075] Step 3.1: Calculate the population of generation t The fitness value of individuals in the population ;in, express The fitness value of

[0076] Step 3.1.1: Exploitation and its positive label set and and its predicted label sequence Train the e-th individual of the t-th generation The corresponding individual classifier .

[0077] Step 3.1.2: Use equations (1) and (2) to construct The first objective function And the second objective function :

[0078] (1)

[0079] (2)

[0080] In formula (1) and formula (2), is an indicator function. If the conditions in the brackets are met, then , otherwise, let .

[0081] Step 3.1.3: Calculate using formula (3) The fitness value of :

[0082] (3)

[0083] Step 3.2: According to the fitness value, the t-th generation population Perform mating pool selection to obtain the original parent population of the tth generation ,from Select the parent individuals with odd subscripts, and record any parent individual with an odd subscript as ,in, express The jth gene code in Any remaining parent individual with an even subscript in ,in, express The jth gene in is encoded, .

[0084] Step 3.3: For the original parent population of the tth generation Evolve to produce a population of offspring of generation t ,in, Represents the e-th offspring individual of 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 guidance vector, which includes steps 3.3.1 and 3.3.2. The main purpose is to avoid the difficulty in producing offspring individuals that are very different from the parent generation due to the long individual gene code, thereby improving the diversity of network water army identifiers; the second stage is the individual mutation stage based on the guidance vector, which includes steps 3.3.3 and 3.3.4. The main purpose is to increase the mutation probability of the potential area of ​​the network water army, which can improve the mutation efficiency and the accuracy of the individual gene code.

[0085] Step 3.3.1: Find and Satisfied and The number of genes encoded by , using the t-th generation guidance vector The predicted score pairs in Sort the gene codes in ascending order and Gene coding for crossover, such as Figure 2 As shown, and The subscripts that meet the above conditions are {5, 7, 8}. Finally, subscript {7} is selected for crossover to obtain the individual after crossover and , parent population After the crossover, the rth individual with an odd subscript is obtained. and the individual after the r+1th crossover with an even subscript And constitute the t-th generation crossover population ,in, express The j-th gene code in express The j-th gene code in Indicates a less than A random positive integer.

[0086] Step 3.3.2: The prediction scores greater than zero in are normalized to [0,1], The prediction scores less than zero in are normalized to [-1,0], thus obtaining the normalized t-th generation guidance vector ,in, Represents the jth unlabeled user feature sample Normalized prediction score at generation t;

[0087] Step 3.3.3: Calculate using formula (4) The probability of mutation of the jth gene encoding of all individuals after crossover , thus obtaining the intermediate population of the tth generation The set of mutation probabilities of all gene coding bits in ;

[0088] (4)

[0089] In formula (4), A is a hyperparameter, and , .

[0090] Step 3.3.4: Generate The corresponding random decimal set of size n and value 0-1 ,in, express The random number corresponding to the jth gene coding bit, and ;

[0091] like and , then The jth gene in Mutation is -1, otherwise, no mutation, thus obtaining the rth individual after mutation ;like Figure 3 As shown, Find the subscripts {1, 2, 3, 4, 5, 8}, and finally the subscripts of the individual mutation gene code are {4, 8}. Change the gene code from 1 to -1 to get the mutated offspring individual .

[0092] generate The corresponding random decimal set of size n and value 0-1 ,in, express The random number corresponding to the jth gene code, and ;

[0093] like and , then The jth gene in The mutation is 1, otherwise, no mutation, and the r+1th individual after mutation is obtained ;like Figure 3 As shown, Find the subscripts {5, 8, 9, 10, 11, 12}, and finally the subscript of the individual mutation gene code is {8}. Change the gene code from -1 to 1 to get the mutated offspring individual .

[0094] Step 3.4: Calculate the t-th generation offspring population The fitness value of ;

[0095] Step 3.5: and Perform environmental selection to obtain the t+1 generation population ;

[0096] Step 4: If , then update the t-th generation population guidance vector , and get the t+1 generation population guidance vector , and assign t+1 to t, then return to step 3.2 and execute sequentially; in the later stage of population evolution, an individual classifier with better performance can be obtained, and the distribution description of user feature samples may be more accurate. The update of the guidance vector can help the offspring population evolve in a more accurate direction; otherwise, execute step 5.

[0097] Step 4.1.1: If , then let , assign t+1 to t, and return to step 3.2 to execute sequentially; otherwise, calculate The fitness value of each individual in the target space is different from the ideal optimal point distance, and the fitness value corresponding to the minimum distance is recorded as , and the individual corresponding to the smallest distance is recorded as ;in, express The first objective function value of the optimal individual in , express The second objective function value of the best individual in ;

[0098] Step 4.1.2: Construct a set of all 1s of length n ,in, represents the guide vector right The pseudo label of the jth unlabeled user feature sample in , and ,like , then Assign a value of -1 to get the updated set and as exist The pseudo-label set on ;

[0099] use and its corresponding positive label set and and its corresponding pseudo-label Train the tth generation classifier , and use equations (1) and (2) to calculate The fitness value is ;in, represents the guide vector The corresponding first objective function value is, represents the guide vector The corresponding second objective function value.

[0100] Step 4.1.3: Comparison and Respectively Distance between:

[0101] like and If the distance between The gene encoding The pseudo label set , thereby utilizing and and and Train the t+1th generation classifier , and use right Make a prediction and get The prediction score of each unlabeled user feature sample in , and order Otherwise, let .

[0102] Step 5: Population at generation T The corresponding fitness value Find the fitness value from The population individual corresponding to the nearest point is taken as the optimal individual , Able to consider the first objective function more comprehensively And the second objective function , as the final network water army identifier, can better meet the actual needs in identifying the effect of network water army. The gene encoding The pseudo label set , thereby utilizing and its corresponding positive label set and and its corresponding pseudo-label set Training the best individual The corresponding classifier , used to identify water armies in social networks.

[0103] In this embodiment, an electronic device includes a memory and a processor. The memory is used to store a program that supports the processor to execute a method for identifying a social network water army. 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 on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned social network water army identification method are executed.

Claims

1. A method for identifying trolls in social networks based on an evolutionary PU algorithm, characterized in that: The steps include: Step 1: Collect m positive label sets A sample set of social network water army characteristics and n unlabeled social network user feature sample sets , where m represents the number of samples of social network water army characteristics, and n represents the number of samples of social network user characteristics; represents the i-th navy feature sample, yes The true category label of ; represents the jth unlabeled user feature sample, , ; Step 2: Initialize the population and guide vector; Step 2.1: Define the current number of iterations as t, the maximum number of iterations as T, and initialize , define the number of individuals in the population as N, and the number of generations for the bootstrap vector to start updating is ; Step 2.2: Define the tth generation population ,in, represents the tth generation population The e-th individual in , and , n is the length of the individual, express The jth gene code in , and ,when ,express Will Recorded as a normal user, when ,express Will Recorded as Internet water army; ; Step 2.3: Use the trained t-th generation e-th initial classifier to Make a prediction and get the output of the e-th initial classifier of the t-th generation The prediction score of each unlabeled user feature sample in , and according to the prediction score, we get The predicted label sequence for each unlabeled user feature sample in and as The genetic code in , thereby initializing The eth individual ; Step 2.4: According to the output of each initial classifier of the tth generation The prediction score of each unlabeled user feature sample in is calculated, and the average prediction score of each unlabeled user feature sample is calculated and used as the guidance vector of the tth generation ,in, Represents the jth unlabeled user feature sample The average prediction score in generation t; Step 3: Use the evolutionary PU algorithm to analyze the tth generation population Optimize and get the t+1 generation population ; Step 3.1: Calculate the population of generation t The fitness value of the individual population ;in, express The fitness value of Step 3.2: According to the fitness value, the t-th generation population Perform mating pool selection to obtain the original parent population of the tth generation ,from Select the parent individuals with odd subscripts, and record any parent individual with an odd subscript as ,in, express The jth gene code in Any remaining parent individual with an even subscript in ,in, express The jth gene in is encoded, ; Step 3.3: For the original parent population of the tth generation Evolve to produce a population of offspring of generation t ,in, represents the e-th offspring individual of the t-th generation; Step 3.4: Calculate the t-th generation offspring population The fitness value of ; Step 3.5: and Perform environmental selection to obtain the t+1 generation population ; Step 4: If , then update the t-th generation population guidance vector , and get the t+1 generation population guidance vector , and assign t+1 to t, then return to step 3.2 to execute sequentially; otherwise, execute step 5; Step 5: Population at generation T The corresponding fitness value Find the fitness value from The population individual corresponding to the nearest point is taken as the optimal individual , and The gene encoding The pseudo label set , thereby utilizing and its corresponding positive label set and and its corresponding pseudo-label set Training the best individual The corresponding classifier , which is used to ultimately identify water armies in social networks.

2. The method for identifying trolls in social networks based on the evolutionary PU algorithm according to claim 1, characterized in that: The t-th generation e-th initial classifier in step 2.3 is trained according to the following steps: Step 2.3.1: Calculate using SVDD algorithm The boundary decision function , and set the discrimination rules: like , indicating that any user Sample points that are outside the boundary, ,express Points that belong to the interior of the boundary; express The sample points belong to the boundary; Step 2.3.2: From Select any two unlabeled user feature samples without replacement. If the two unlabeled user feature samples are both sample points inside the boundary or sample points on the boundary, then Reselect from ; if only one unlabeled user feature sample is a sample point outside the boundary, it is regarded as a normal user; if two unlabeled user feature samples are sample points outside the boundary, the two unlabeled user feature samples are calculated to be respectively The sample center point The Euclidean distance is calculated, and the user feature sample with a larger distance is selected as a normal user; Step 2.3.3: Follow the process of step 2.3.2 to obtain the e-th normal user feature sample set consisting of m normal users. ,in, represents the kth normal user feature sample in the eth normal user feature sample set, The corresponding pseudo label set is recorded as ,and , express , and ; ; Step 2.3.4: Exploitation and its positive label set and and its pseudo-label set Train the e-th initial classifier of the t-th generation to obtain the trained e-th initial classifier of the t-th generation.

3. The method for identifying trolls in social networks based on the evolutionary PU algorithm according to claim 1, characterized in that: The step 3.1 comprises: Step 3.1.1: Exploitation and its positive label set and and its predicted label sequence Train the e-th individual of the t-th generation The corresponding individual classifier ; Step 3.1.2: Use equations (1) and (2) to construct The first objective function And the second objective function : (1) (2) In formula (1) and formula (2), is an indicator function. If the conditions in the brackets are met, then , otherwise, let ; Step 3.1.3: Calculate using formula (3) The fitness value of : (3)。 4. The method for identifying trolls in social networks 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 Satisfied and The number of genes encoded , using the t-th generation guidance vector The predicted score pairs in Sort the gene codes in ascending order and Gene codes are crossed to obtain the rth individual after crossover with an odd subscript. and the individual after the r+1th crossover with an even subscript And constitute the t-th generation crossover population ,in, express The jth gene code in express The j-th gene code in Indicates a less than A random positive integer; Step 3.3.2: The prediction scores greater than zero in are normalized to [0,1], The prediction scores less than zero in are normalized to [-1,0], thus obtaining the normalized t-th generation guidance vector ,in, Represents the jth unlabeled user feature sample Normalized prediction score at generation t; Step 3.3.3: Calculate using formula (4) The probability of mutation of the jth gene encoding of all individuals after crossover , thus obtaining the intermediate population of the tth generation The set of mutation probabilities of all gene coding bits in ; (4) In formula (4), A is a hyperparameter, and , ; Step 3.3.4: Generate The corresponding random decimal set of size n and value 0-1 ,in, express The random number corresponding to the jth gene coding bit, and ; like and , then The jth gene in Mutation is -1, otherwise, no mutation, thus obtaining the rth individual after mutation ; generate The corresponding random decimal set of size n and value 0-1 ,in, express The random number corresponding to the jth gene code, and ; like and , then The jth gene in The mutation is 1, otherwise, no mutation, and the r+1th individual after mutation is obtained .

5. The method for identifying trolls in social networks based on the evolutionary PU algorithm according to claim 1, characterized in that: The updating of the bootstrap vector of the t-th generation population in step 4 include: Step 4.1.1: If , then let , assign t+1 to t, and return to step 3.2 to execute sequentially; otherwise, calculate The fitness value of each individual in the target space is related to the fitness value The distance between them, and the fitness value corresponding to the minimum distance is recorded as , and the individual corresponding to the smallest distance is recorded as ;in, express The first objective function value of the optimal individual in , express The second objective function value of the best individual in ; Step 4.1.2: Construct a set of all 1s of length n ,in, represents the guide vector right The pseudo label of the jth unlabeled user feature sample in , and ,like , then Assign a value of -1 to get the updated set and as exist On the pseudo-label set; using and its corresponding positive label set and and its corresponding pseudo-label Train the tth generation classifier , and use equations (1) and (2) to calculate The fitness value is ;in, represents the guide vector The corresponding first objective function value is, represents the guide 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 The gene encoding The pseudo label set , thereby utilizing and and and Train the t+1th generation classifier , and use right Make a prediction and get The prediction score of each unlabeled user feature sample in , and order Otherwise, let .

6. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the social network water army identification method described in any one of claims 1-5, and the processor is configured to execute the program stored in the memory.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for identifying water army in social network described in any one of claims 1-5 are executed.

Citation Information

Patent Citations

  • C-RAN carrier migration resource demand prediction method based on improved PSO

    CN106102079A

  • Hyperspectral end member extraction method based on evolutionary multi-modal algorithm

    CN117523400A

  • Farmland weed intelligent identification method based on evolution PU learning

    CN118736423A