Social media user group labeling method and system
By constructing an interaction relationship graph and combining it with a regression model and the kNN classification algorithm, the weights are dynamically adjusted and the classification threshold is optimized. This solves the problems of incomplete data and low efficiency in social media user classification and labeling, and achieves high-precision and efficient user classification.
Patent Information
- Application Number
- CN202511058089.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-07-30
AI Technical Summary
Existing technologies for classifying and labeling social media users suffer from problems such as insufficient classification criteria, low data processing efficiency, and poor accuracy. In particular, when dealing with large-scale, high-dimensional, and dynamically changing social media data, the computational load is large, the time consumption is long, and it is difficult to adapt to different types and topics.
By collecting interaction data from social media accounts, an interaction relationship graph is constructed, weights are calculated and normalized, and a two-step classification is performed using a regression model and the kNN classification algorithm. The weights are dynamically adjusted to identify high-influence accounts, and the classification threshold is optimized to improve accuracy and efficiency.
It achieves high-precision and high-efficiency classification of social media users, reduces computational load, adapts to different types and themes, reduces model misjudgment rate, and meets practical application needs.
Smart Images

Figure CN120995245A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a social media user group labeling method and a corresponding social media user group labeling system, and belongs to the technical field of data processing. BACKGROUND
[0002] With the rapid development of social media, its user group is increasingly large and complex, and the demand for classifying and labeling social media users is increasingly urgent. Early classification methods mainly rely on static information of users, such as real-time location, region and friend relationship network, and these methods have limited classification basis and are difficult to fully reflect the behavior characteristics and influence of users, so the classification results are not accurate enough.
[0003] In order to improve this situation, some classification methods based on user behavior data have appeared subsequently, for example, in the Chinese invention patent with the patent number ZL 201710106305.4, a social network recommendation method based on collaborative filtering is disclosed. This method classifies the features of user behavior data and personal attributes in the social network, and constantly learns the user's friendship preference according to the user's historical data, and individualizes the recommendation of different friends. However, these methods still have obvious deficiencies: on the one hand, they only focus on text content and ignore other behavior characteristics, and the classification basis is not comprehensive enough; on the other hand, they rely on manually labeled data for training, are greatly affected by subjective factors, and are difficult to adapt to different types and themes of social media data. In addition, the existing methods also have many problems in data processing, such as lack of effective data cropping reliability mechanism, difficult to filter out representative sample data, directly affecting the classification accuracy. At the same time, social media data has the characteristics of large scale, high dimension and dynamic change, and the existing methods often have large amount of calculation, long time consumption, cannot batch process and have small coverage when processing such data.
[0004] In summary, the existing technology faces many challenges in classifying and labeling social media users, including the comprehensiveness of the classification basis, the efficiency and accuracy of data processing, etc. These deficiencies prompt us to conduct in-depth research and propose more advanced social media user group labeling methods and systems to solve the problems existing in the prior art and meet the needs of high precision, high efficiency and high adaptability of social media user classification and labeling in actual applications. SUMMARY
[0005] The primary technical problem to be solved by the present application is to provide a social media user group labeling method.
[0006] Another technical problem to be solved by the present application is to provide a social media user group labeling system.
[0007] To achieve the above technical purposes, the technical solutions adopted by the present application are as follows:
[0008] According to a first aspect of the embodiments of the present application, a social media user group labeling method is provided, comprising the following steps:
[0009] S1: Collecting at least one social media account as a basic account;
[0010] S2: Collecting the interaction behavior data of the basic account within a preset time period, and analyzing to obtain an interaction relationship graph of the basic account;
[0011] S3: Calculating the weight of the basic account based on the interaction relationship graph;
[0012] S4: Setting a preset weight threshold, and applying a regression model to classify the basic account reaching the weight threshold, to distinguish the account type as a high-influence account or a common account;
[0013] S5: For the common account classified in step S4, using the interaction relationship graph of the common account, and adopting a kNN classification algorithm to further classify the account type of the common account, to identify potential high-influence accounts therein.
[0014] Preferably, the interaction behavior data at least includes active behavior data, time data, network data and content feature data.
[0015] Preferably, in step S2, based on all the collected interaction behavior data, an interaction relationship graph centered on the basic account is constructed.
[0016] Preferably, in step S3, the weight of the basic account is calculated, comprising the following sub-steps:
[0017] 1) Classifying the interaction behavior of the basic account, and assigning different weights to each type of interaction behavior, and the weight of each basic account is calculated by summing the weights of all interaction behaviors;
[0018] 2) Using a time decay factor and a network centrality index to dynamically adjust the weight;
[0019] 3) Normalizing to map the weight values of all accounts to the interval [0, 1] as the actual weight.
[0020] Preferably, the dynamic adjustment is an unsupervised process, only generating intermediate features, and not directly participating in the final classification decision.
[0021] Preferably, in step S4, the preset weight threshold comprises the following sub-steps:
[0022] 1) Obtaining an initial threshold;
[0023] 2) obtaining optimal regression coefficients for the initial threshold value using a regression model;
[0024] 3) performing dynamic adjustment based on the optimal regression coefficients and the initial threshold value to obtain an optimized weight threshold value.
[0025] Preferably, the input data of the regression model comprises at least the weight value of the basic account, the interaction behavior feature, the network data feature, and the label data.
[0026] Preferably, in the step S5, the re-classification of the ordinary account by account type comprises the following sub-steps:
[0027] S51) constructing a feature vector based on the interaction behavior data of the ordinary account collected in the step S2;
[0028] S52) searching for a neighboring sample of the ordinary account based on the type label of each basic account classified in the step S4;
[0029] S53) performing weighted voting based on the actual weight of the neighboring sample obtained in the step S3.
[0030] Preferably, in the step S52, first, the distance between the sample to be classified and each sample in the training set is calculated; and then, according to the calculated distance, the k samples closest to the sample to be classified are selected as the neighbors of the sample to be classified, wherein K is a positive integer.
[0031] According to a second aspect of the embodiment of the present application, a social media user group labeling system is provided, comprising a processor and a memory, which are coupled; wherein the memory is used to store a computer program; and the processor is used to run the computer program stored in the memory to execute the aforementioned social media user group labeling method.
[0032] Compared with the prior art, the present application can significantly improve the accuracy and timeliness of social media user classification. The method constructs an interaction relationship graph by collecting the basic information and interaction behavior data of social media accounts, and assigns weights to the basic accounts based on the graph, and then normalizes the weights after dynamic adjustment. The method uses a preset weight threshold combined with regression analysis to distinguish high-influence accounts and ordinary accounts, and uses a kNN classification algorithm to further classify the ordinary accounts. This method not only realizes accurate classification and subdivision of a large number of social media accounts, but also reduces the amount of calculation and automatically adapts to new classification types. By dynamically calculating the account weight through the time decay factor and the network centrality index, the classification bias caused by equal voting of samples is effectively solved, and the accuracy of high-influence account classification is improved. Joint optimization of the classification threshold reduces the model misjudgment rate and improves the performance of the classification model, meeting the high-precision and high-efficiency requirements of social media user classification labeling in practical applications. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 Fig. 1 is a flowchart of a social media user group labeling method according to an embodiment of the present application.
[0034] Figure 2 Fig. 2 is a structural diagram of a social media user group labeling system according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] The technical content of the present application will be described in detail below with reference to the drawings and specific embodiments.
[0036] The technical concept of the embodiment of the present application is that the classification of the user group adopts two-step processing (first, the logical regression classification is used for all basic accounts to classify the ordinary accounts and the high-influence accounts; second, the kNN classification algorithm is used for the secondary classification of the ordinary accounts to obtain the high-influence accounts again). Moreover, the dynamic calculation of the account weight is realized through the time decay factor and the network centrality index; the classification deviation caused by the equal voting of the samples is solved by using the weighted kNN classification algorithm, the accuracy of the influence user classification is improved, the classification threshold is jointly optimized by combining the dynamic weight and the regression threshold optimization, and the model false positive rate (FPR) is reduced.
[0037] First embodiment
[0038] As shown in Fig. 1, the social media user group labeling method provided by the first embodiment of the present application at least includes the following steps: Figure 1
[0039] S1: Collect at least one social media account as a basic account.
[0040] In an embodiment of the present application, the basic account includes the account name (unique identifier), the registration time (account creation date), the latest login time (last active timestamp), the geographic location information (registration place / usually used login place), the device information (usually used login device type), the account authentication status (whether official authentication) and the like.
[0041] S2: Collect the interaction behavior data of the basic account in a preset time period, and analyze to obtain the interaction relationship graph of the basic account.
[0042] In an embodiment of the present application, the interaction behavior data includes active behavior data, passive behavior data, time data, network data and content feature data.
[0043] 1) Examples of active behavior data:
[0044] · Number of followings (actively following others)
[0045] · Number of likes (active likes on content)
[0046] · Number of comments (active comments)
[0047] · Number of shares (active shares of content)
[0048] 2) Examples of passive behavior data:
[0049] · Number of followers (number of fans)
[0050] · Number of likes (number of likes on content)
[0051] · Number of comments (number of comments on content)
[0052] · Number of shares (number of shares of content)
[0053] 3) Examples of time data (used for dynamic weight calculation)
[0054] First occurrence time of each type of behavior
[0055] Recent occurrence time of each type of behavior
[0056] Behavior time distribution (statistics by time period)
[0057] 4) Examples of network data
[0058] Attention relationship graph (attention / followed relationship)
[0059] Fan quality indicators (fan influence distribution)
[0060] Social network centrality indicators (PageRank values, etc.)
[0061] 5) Examples of content feature data
[0062] Content publishing frequency
[0063] Content type distribution (text / picture / video)
[0064] Content theme distribution (topic label statistics)
[0065] Among them, active behavior data, time data, network data and content feature data all directly participate in the classification process and have an impact on the final user group labeling result at different links.
[0066] Specifically:
[0067] 1. Time data is the cornerstone of dynamic weight calculation. By combining preset time periods and decay mechanisms, it ensures that the classification results can reflect the current state of the user, rather than historical full data.
[0068] 2. Network data is used to solve structural problems, such as using PageRank algorithm and fan quality index to correct the deviation of pure behavior statistics from the network topology level, thereby filtering out inaccurate classifications such as "fake big V".
[0069] 3. Content feature data (such as publishing frequency, topic distribution) is used as the core basis for classifying ordinary accounts using kNN classification algorithm, supporting long-tail classification.
[0070] In actual operation, the interactive behaviors of social media users (such as following, being followed, liking, being liked, commenting, being commented on, forwarding, being forwarded, etc.) are classified, and these behaviors are divided into k behavior categories, where k is a positive integer. These behavior categories and their related data types play a key role in the classification process, ensuring the accuracy and timeliness of user group labeling results.
[0071] The construction of the interactive relationship graph is based on all the collected interactive behavior data. In this interactive relationship graph, the basic account is in the core position and exists as a core node. Any other account that has had any interaction record with it, whether active or passive, will be included as a node in this interactive relationship graph. Each type of interactive behavior is materialized as an edge connecting the basic account and other accounts. Each edge has three key attributes: type, direction, and frequency. Type is used to distinguish specific interactive behaviors, such as following, liking, commenting, and forwarding; direction indicates the active and passive sides of the interaction, and for the basic account, active interaction refers to behavior from the basic account to other accounts, while passive interaction refers to behavior from other accounts to the basic account; frequency records the specific frequency of a particular type of interaction within a predetermined time period (e.g., 30 days) for subsequent weight calculation.
[0072] For example, if account B follows basic account A, a directed edge from B to A will be created in the interactive relationship graph, with a type of "follow" and a passive direction (because for A, this is a behavior of being followed), and a frequency of 1. Similarly, if the basic account A likes account C's post, a directed edge from A to C will be created, with a type of "like" and an active direction, and a frequency of 1. For example, if account D comments on the basic account A's post 3 times, a directed edge from D to A will be created, with a type of "comment" and a passive direction, and a frequency of 3. In this way, the originally discrete interactive behavior data is integrated into a structured network, i.e., the interactive relationship graph, which intuitively displays all direct connections between the basic account and other accounts and their properties and strengths.
[0073] If there are multiple basic accounts to be analyzed, an independent interaction relationship graph will be constructed for each basic account. This can ensure that the interaction characteristics and relationship network of each account can be displayed separately and clearly, providing accurate data basis for subsequent weight calculation and classification process.
[0074] S3: Calculate the weight of the basic account based on the interaction relationship graph.
[0075] The calculation of the weight involves assigning different weight values to each type of interaction behavior. For example, the weight of active behavior is less than that of passive behavior. This is because active behavior mainly reflects the activity of the basic account, while passive behavior more reflects the influence of the basic account.
[0076] In an embodiment of the present application, the calculation of the weight includes the following sub-steps:
[0077] 1) Classify the interaction behaviors (such as follow, be followed, like, be liked, comment, be commented, forward, be forwarded, etc.) of the social media basic account, and assign different weights to each type of interaction behavior. The weight of each basic account is obtained by calculating the weighted sum of all interaction behaviors, and the weight W is calculated by the formula:
[0078]
[0079] Cj: the preset coefficient of the jth type of interaction behavior (such as be followed = 3, be forwarded = 2, comment = 1); the initial value of the preset coefficient is based on experience, but can be optimized through data-driven.
[0080] Fj: the number of occurrences of the jth type of interaction behavior, where j is a positive integer.
[0081] 2) Dynamic adjustment of the weight using time decay factor and network centrality index
[0082] It should be noted that the time decay factor differentiates the weighting according to the proximity of the behavior occurrence time, and gives higher weight to recent interaction behaviors. For example, the time decay factor of interaction behaviors in the last 30 days is 1.2, the time decay factor of interaction behaviors more than 90 days is 0.8, and the time decay factor of interaction behaviors between the two is 1.0.
[0083] The network centrality index reflects the centrality of the account in the social network, which is usually calculated using PageRank algorithm, etc. The higher the centrality, the larger the value of the network centrality index. In the weight calculation, this index is introduced as a multiplier factor (for example, β), where β represents the value of the normalized network centrality index.
[0084] The embodiment of the application adopts a two-step hierarchical processing architecture, first performs unsupervised weight calculation, and then performs supervised classification. Specifically, the dynamic adjustment process in step S3 is an unsupervised process, which does not depend on labels, and only generates intermediate features that do not directly participate in the final classification decision. The regression analysis in step S4 is trained using labels. Since the processing methods of step S3 and step S4 are different, there is no information leakage problem. Time data features and network data features are applied in both steps, but they are used for unsupervised weight calculation in step S3, and are used as input features of the regression model in step S4, which is actually a hierarchical feature construction method.
[0085] The weight W calculated in step S3 is a core input feature of the regression model in step S4 (one of the independent variables in formula 3). If the calculation of the weight W is performed in the regression model in step S4, the regression model will need to undertake the tasks of feature construction and classification at the same time, which will cause the model complexity to increase significantly. Therefore, performing the weight calculation in step S3 can avoid such an increase in complexity, thereby improving the efficiency and performance of the entire model. Through this hierarchical processing method, the application can reduce the complexity of the model while ensuring the classification accuracy, thereby improving the calculation efficiency.
[0086] 3) Perform normalization processing to map the weight values of all accounts to the [0, 1] interval as actual weights, so as to facilitate subsequent threshold judgment.
[0087] In an embodiment of the application, assume that the interaction behavior data of a certain basic account is as follows:
[0088] Number of times of being followed: 50 times (coefficient = 3);
[0089] Number of times of being liked: 200 times (coefficient = 2);
[0090] Number of times of active comments: 30 times (coefficient = 1);
[0091] Time decay factor (in the last 30 days, without processing historical behaviors outside the preset time period): 1.2.
[0092] Network centrality index: 1.0 (ideal value)
[0093] Then the dynamically adjusted weight W is:
[0094] W = (50 x 3 + 200 x 2 + 30 x 1) x 1.2 x 1.0 = 696 (2)
[0095] After normalization, assuming that the maximum weight value among all the dynamically adjusted weight values obtained through the foregoing steps is 1000, the actual weight of the basic account is calculated as 696 / 1000 = 0.696. It should be emphasized that the role of the time decay factor is limited to behaviors within the preset time period, and behavior data outside the preset time period will not be included in the statistics. Such a design enables the model to balance timeliness and calculation efficiency, effectively avoiding the processing of invalid historical data. In addition, the value of the network centrality index is 1.0, which is an ideal case, indicating that the account is a network center node, for example, its PageRank value is close to the highest in the network. However, in actual application, the value of the network centrality index needs to be normalized, as shown in the formula β = PageRank / PR_max. The value range of the network centrality index depends on the specific network structure, and its minimum value is 0, representing an isolated node (i.e., an account not connected to any other node); its maximum value represents the most core node in the network. Although theoretically, there is no upper limit to this maximum value, in actual operation, it needs to be constrained to prevent weight distortion.
[0096] S4: A preset weight threshold is applied to the basic account reaching the weight threshold to classify and distinguish the account type as a "high-influence user" or a "normal account" by using a regression model.
[0097] In an embodiment of the present application, the preset weight threshold is determined by big data analysis (such as quantile method, but not limited thereto) combined with verification and optimization of the regression model, rather than simply relying on experience or industry standards.
[0098] The preset weight threshold includes the following sub-steps:
[0099] 1) An initial threshold is obtained by using a big data analysis method;
[0100] 2) An optimal regression coefficient is obtained by using a regression model on the initial threshold;
[0101] 3) The optimal regression coefficient and the initial threshold are dynamically adjusted to obtain an optimized weight threshold.
[0102] In an embodiment of the present application, the quantile method is used to obtain the initial threshold. Assuming that the 80th percentile of the weight distribution of all basic accounts is 0.75, the initial threshold is set to 0.75, and the top 20% of high-weight accounts are selected for regression analysis.
[0103] The regression model selected in the embodiment of the present application is a regression model suitable for binary or multi-classification problems, such as a logistic regression model. The initial threshold is input into the logistic regression model, and the preset weight threshold is determined to be 0.6 by maximizing the F1-score of the validation set.
[0104] The input data of the logistic regression model includes:
[0105] Weight value of the basic account (weight calculation result from step S3, actual weight after normalization).
[0106] Interaction behavior features: such as the number of likes, comment frequency, forwarding rate, and the number of followers.
[0107] Time data features: recent active time, time decay factor of each interaction behavior (such as higher weight for behavior in the last 30 days).
[0108] Network data features: attention / followed ratio, social network centrality index (i.e. PageRank value).
[0109] Label data: pre-defined or generated by clustering account type labels, in this embodiment, "high-influence user" and "ordinary user". The label data can also be "ordinary user" and "specific interest (e.g. makeup, fitness, etc.) group".
[0110] The calculation formula of the logistic regression model is as follows (taking binary classification as an example):
[0111]
[0112] Y = 1: indicates that the account belongs to the target type (e.g. "high-influence user").
[0113] Independent variables:
[0114] W: normalized weight value (core feature).
[0115] F: interaction frequency (such as daily average likes).
[0116] T: time decay factor (such as recent 30-day activity).
[0117] ...: represents other features (such as social network centrality index in network data, and content publishing frequency in content feature data, etc.).
[0118] βk : Regression coefficient, estimated by training data.
[0119] Then, a parameter estimation method, such as the maximum likelihood estimation method (MLE), is used to train the regression model. The maximum likelihood estimation method can maximize the likelihood function of the observed data, thereby solving the optimal regression coefficient. In the training process, the regression model continuously adjusts the regression coefficient by iteratively optimizing the loss function (such as the log loss) to improve the accuracy and performance of the model.
[0120] It needs to be explained that the active behavior data, passive behavior data, time data, network data and content feature data mentioned in step S2 are embodied in the model input of step S4 in an explicit or implicit manner. Specifically:
[0121] The active behavior data is explicitly included in the model through the interaction frequency (F), such as the average number of likes per day and other indicators. At the same time, the original information of the active behavior data also participates in the weight calculation (W) in step S3.
[0122] In addition to being directly input into the model as a time decay factor (T), the time data is also used for dynamic adjustment of the weight in step S3, that is, the time decay effect of the behavior occurrence is considered when calculating the weight.
[0123] The passive behavior data is indirectly embodied in the model input by affecting the weight value (W) in step S3.
[0124] The network data is directly input into the relevant indicators (such as PageRank value) to participate in the model training.
[0125] The content feature data also participates in the model training by directly and explicitly inputting (such as the frequency of publishing).
[0126] That is, in step S4, the input of the model has explicitly or implicitly included all five types of data: the active behavior data is multiplexed through the interaction frequency (F) and the weight (W), the time data is multiplexed through the time decay factor (T) and the weight (W), the passive behavior data, the network data and the content feature data are also involved in the input of the model in different ways. This design ensures that the regression model can consider various data characteristics comprehensively, thereby improving the accuracy and reliability of classification.
[0127] In an embodiment of the present application, the training process is as follows:
[0128] Divide the data set into a training set (80%) and a validation set (20%);
[0129] Feature standardization (such as Z-score normalization) is performed on the training set;
[0130] Fit the logistic regression model and calculate the regression coefficient;
[0131] Evaluate the model performance (such as accuracy, AUC-ROC) on the validation set.
[0132] In the step of dynamically adjusting the optimal regression coefficient and the initial threshold to obtain the optimized weight threshold, the initial threshold is assumed to be 0.5 (if P(Y=1|X)≥0.5, it is determined as "target type"). The threshold balanced with the true positive rate (TPR) and the false positive rate (FPR) is selected by using the ROC curve analysis to dynamically adjust the initial threshold to obtain the optimized weight threshold.
[0133] Optionally, in the step of dynamically adjusting the initial threshold, the business demand driven mode can also be used: after obtaining the optimized weight threshold by using the ROC curve, if it is needed to reduce the misjudgment, the threshold is increased; if it is needed to cover more potential users, the threshold is decreased.
[0134] Finally, the account type is classified by using the optimized weight threshold obtained by dynamic adjustment.
[0135] If it is binary classification, the classification rule is as follows:
[0136]
[0137] Among them, type A represents "high-influence user", and type B represents "ordinary user". Because the "high-influence user" in the social media is usually rare, since the regression model outputs by probability, combined with threshold adjustment, the recall rate of the minority class can be improved.
[0138] If it is multi-classification, the basic account needs to be divided into multiple types, such as "makeup expert", "technology enthusiast" and "ordinary user", and the multinomial logistic regression can be used: directly outputting multi-class probability. Or, the One-vs-Res t strategy is used, and multiple binary classification models are trained, each of which is only for one class.
[0139] Through the above steps, each basic account is classified. For example, the type label of each basic account is one of "high-influence user" or "ordinary user".
[0140] In an embodiment of the present application, the input features of a certain basic account are as follows:
[0141] The weight value W=0.8
[0142] The average daily likes F=50
[0143] The time decay factor T=1.2
[0144] The regression coefficient β0=-2.5, β1=3.0, β2=0.02, β3=1.5
[0145] The probability of belonging to "high-influence user" is 0.937, and if the optimized weight threshold is 0.7, the basic account is determined as "high-influence user".
[0146] S5: For the normal accounts classified in step S4, using the interaction graph of the normal accounts, a kNN classification algorithm is used to further classify the normal accounts by account type, to identify potential high-influence accounts among them.
[0147] Specifically, the types of each basic account (such as "high-influence user" and "normal user") have been labeled through the aforementioned steps S1-S4, which are used as labels for the training set of the kNN algorithm to classify normal accounts.
[0148] In one embodiment of the present application, classifying a normal account includes the following sub-steps.
[0149] S51) Based on the interaction behavior data of the normal account collected in step S2, a feature vector is constructed.
[0150] Suppose the interaction behavior data of the normal account is:
[0151] Number of times followed: 100
[0152] Number of times actively liked: 50
[0153] Retweet rate: 0.3 (30 retweets / 100 posts)
[0154] Time decay factor: 1.2 (recently active)
[0155] Normalized feature vector: [1.5, 0.8, 0.3, 1.2] (assuming the mean is 0 and the variance is 1).
[0156] S52) Based on the type labels of each basic account classified in step S4, search for the normal account's neighboring samples:
[0157] According to the kNN classification algorithm, the distance between the sample to be classified and each sample in the training set needs to be calculated first. For this purpose, from the labeled basic accounts, the Euclidean distance between the normal account and all basic accounts is calculated. Based on the interaction behavior data collected in step S2, the Euclidean distance of each feature value of the normal account is calculated:
[0158]
[0159] where x and y represent the feature vectors of two different accounts; xi represents the i-th feature value (such as the number of times followed) of account x; yi represents the i-th feature value (such as the number of times followed) of account y.
[0160] Then, according to the calculated distance, the k nearest samples are selected as the neighbors of the sample to be classified, where k is a positive integer. It is assumed that the types of the 5 nearest basic accounts (k = 5) are: 3 "high-influence users", and 2 "ordinary users". The value of k is set by cross-validation or experience (such as K = 5). The value of k is related to the size of the basic account, and can be preset to select the top 5% of the neighbor samples.
[0161] S53) Weighted voting is performed based on the actual weights of the neighbor samples obtained in step S3.
[0162] Here, the "actual weight" refers to the normalized weight of the neighbor sample (not the weight of the sample to be classified itself).
[0163] This step can effectively improve the recall rate of high-influence accounts through the weighted voting mechanism of neighbor samples, and forms a closed loop with the output of step S3, avoiding the problem of repeated calculation. Specifically, according to the kNN classification algorithm, after determining the nearest neighbor, the traditional method is to determine the category of the ordinary account (i.e. the sample to be classified) by majority voting, that is, to count the number of each category in the k nearest neighbors, and to classify the sample to be classified into the category with the largest number.
[0164] For example, it is assumed that the actual weights of the 5 neighbor basic accounts are 0.9, 0.8, 0.7, 0.6 and 0.5 respectively. In the voting stage, a weighted voting method is adopted, that is, samples with higher weights have greater influence on the classification result. The weighted voting result is as follows: the total weight of the 3 basic accounts with the label "high-influence user" is 0.9+0.8+0.7=2.4; the total weight of the 2 basic accounts with the label "ordinary user" is 0.6+0.5=1.1. Since the total weight of the "high-influence user" basic account (2.4) is greater than the total weight of the "ordinary user" basic account (1.1), the ordinary account is finally marked as "high-influence user".
[0165] The kNN classification algorithm is widely used in classification tasks because of its simplicity and excellent performance in many practical problems. However, its performance is largely dependent on the selected distance measurement method and the size of k. The present application can effectively alleviate the problem caused by too large k by introducing a weighted voting method. When k is too large, many distant neighbors with weak representation will have the same voting rights as the nearest neighbors, which may have a negative impact on the classification result. The weighted voting mechanism assigns higher weights to points with closer distances, significantly reducing the relative influence of distant points. In this way, even if the value of k is slightly larger than the optimal value, the weighted voting can automatically reduce the negative impact of distant points, enhance the robustness of classification, and improve the reliability of the classification result.
[0166] In an embodiment of the present application, a two-step classification method is adopted to achieve accurate labeling of social media user groups. First, a logistic regression model is used to initially classify all basic accounts and filter out high-influence accounts. Then, for part of the accounts marked as ordinary accounts in the initial classification, a kNN classification algorithm is used for secondary classification to further identify high-influence accounts among them. This two-step classification strategy takes into account the classification needs of different account types: for high-influence accounts (such as big V, institutional accounts, etc.) with fewer quantities (about 5-10%), complex behavior patterns, and high data quality, the classification prioritizes accuracy to reduce the impact of false positives; for ordinary accounts (such as low-frequency interaction users, zombie fans, etc.) with large quantities (90-95%), sparse data, and more noise, the classification focuses on fast generalization, prioritizing efficiency and robustness. Specifically, the kNN classification algorithm can quickly cover long-tail users (such as 97% of the data), while the logistic regression model focuses on processing about 3% of high-value accounts.
[0167] The logistic regression model has unique advantages in the classification process. It outputs continuous confidence rather than direct hard classification results (such as decision trees directly outputting categories), which makes dynamic threshold optimization possible. For example, by selecting a threshold with a false positive rate (FPR) less than 5% through the ROC curve, the risk of false positives can be effectively controlled. In addition, the logistic regression model dynamically adjusts weights based on factors such as behavior frequency, time decay, and network indicators, ensuring that the significant features (strong signals) of high-influence accounts are prioritized for identification. The model also quantifies the influence of each feature on the classification result through regression coefficients, which not only helps to locate key features but also facilitates manual verification of the reasonableness of the coefficients, thereby enhancing the interpretability of the model.
[0168] The kNN classification algorithm is suitable for the second step of classification because it does not require pre-training of the model and can directly reuse the labels of basic accounts, making it well suited to the massive scale of ordinary accounts. In practical applications, the kNN algorithm uses a weighted voting mechanism to suppress noise interference by reusing account weights, avoiding the undue influence of low-influence neighbors (such as zombie fans) on classification decisions, thereby improving the robustness of the classification. At the same time, the algorithm also has good dynamic expansion capabilities, allowing it to flexibly adapt to changes in data size and the emergence of new types of accounts.
[0169] Compared with the prior art, the social media user group labeling method provided by the embodiment of the application realizes efficient and accurate user group labeling through a two-step classification strategy. In the first step, a logistic regression classification is adopted, which can effectively process the complex behavior patterns of high-influence accounts and ensure the accuracy of classification. In the second step, a kNN classification algorithm is used, which is suitable for the rapid classification of ordinary accounts and takes into account efficiency and robustness. A time decay factor is introduced, so that the classification model pays more attention to recent interaction behaviors, thereby better reflecting the current activity and influence of the user. The network centrality index corrects the deviation of pure behavior statistics from the network topology level, avoiding inaccurate classification such as “fake big V”. The weighted kNN classification algorithm gives higher weights to points closer to the distance, reduces the relative influence of distant points, and improves the accuracy of classification. In addition, the joint optimization of dynamic weights and regression thresholds further reduces the model misjudgment rate and improves the overall classification effect. In summary, the application can realize efficient and accurate classification of a large number of social media accounts, meeting the high-precision and high-efficiency requirements of social media user classification and labeling in practical applications.
[0170] Second embodiment
[0171] As Figure 2 shown, on the basis of the above-mentioned social media user group labeling method, the second embodiment of the application further provides a social media user group labeling system. The system includes one or more processors and memories. Among them, the memory is coupled with the processor, used to store one or more programs, when the program is executed by the processor, makes the processor implement the social media user group labeling method in the above-mentioned embodiment.
[0172] Among them, the processor is used to control the overall operation of the system, to complete all or part of the steps of the above-mentioned social media user group labeling method. The processor can be a central processing unit (CPU), a graphics processing unit (GPU), a field programmable logic gate array (FPGA), an application specific integrated circuit (ASIC), a digital signal processing (DSP) chip, etc. The memory is used to store various types of data to support the operation of the system, which may, for example, include instructions for operating any application or method on the system, as well as application-related data. The memory can be realized by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, etc.
[0173] In another exemplary embodiment, the present application also provides a computer readable storage medium comprising program instructions, which, when executed by a processor, implement the steps of the social media user group labeling method in any one of the above embodiments. For example, the computer readable storage medium can be the above-mentioned memory comprising program instructions, which can be executed by the processor of the system to complete the above-mentioned social media user group labeling method and achieve the technical effects consistent with the above method.
[0174] It should be noted that the above embodiments are only illustrative, and the technical solutions of each embodiment can be combined, and the order of each step can be changed, all of which are within the protection scope of the present application.
[0175] In addition, the terms "first", "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.
[0176] The social media user group labeling method and system provided by the present application are described in detail above. Any obvious modification made by a person skilled in the art without departing from the essential content of the present application will constitute an infringement of the patent right of the present application and will bear the corresponding legal responsibility.
Claims
1. A method for labeling social media user groups, characterized in that... The method comprises the following steps: S1: Collecting at least one social media account as a basic account; S2: Collecting the interaction behavior data of the basic account within a preset time period, and analyzing to obtain an interaction relationship graph of the basic account; S3: Calculating the weight of the basic account based on the interaction relationship graph; S4: Setting a weight threshold, and applying a regression model to classify the basic accounts reaching the weight threshold to distinguish the account types as high-influence accounts or ordinary accounts; S5: For the ordinary accounts classified in step S4, using the interaction relationship graph of the ordinary accounts, and using a kNN classification algorithm to further classify the account types of the ordinary accounts to identify potential high-influence accounts.
2. The social media user group labeling method of claim 1, wherein: The interaction behavior data at least includes active behavior data, time data, network data, and content feature data.
3. The social media user group labeling method of claim 1, wherein: In step S2, based on all the collected interaction behavior data, an interaction relationship graph centered on the basic account is constructed.
4. The social media user group labeling method of claim 1, wherein In step S3, calculating the weight of the basic account comprises the following sub-steps: 1) Classifying the interaction behaviors of the basic account, giving different weights to each type of interaction behavior, and calculating the weight of each basic account by summing the weights of all interaction behaviors; 2) Using a time decay factor and a network centrality index to dynamically adjust the weight; 3) Normalizing the weight values of all accounts to the interval [0, 1] as the actual weight.
5. The social media user group labeling method of claim 4, wherein: The dynamic adjustment is an unsupervised process that only generates intermediate features and does not directly participate in the final classification decision.
6. The social media user group labeling method of claim 1, wherein In step S4, the preset weight threshold comprises the following sub-steps: 1) Obtain an initial threshold; 2) Obtain the optimal regression coefficient using a regression model on the initial threshold; 3) Based on the optimal regression coefficient and the initial threshold, dynamically adjust to obtain the optimized weight threshold.
7. The social media user group labeling method of claim 6, wherein: The input data of the regression model at least includes the weight value of the basic account, the interaction behavior feature, the network data feature, and the label data.
8. The social media user group labeling method of claim 1, wherein In step S5, the further classification of the account types of the ordinary accounts comprises the following sub-steps: S51) Based on the interaction behavior data of the ordinary accounts collected in step S2, a feature vector is constructed; S52) Based on the type labels of the basic accounts classified in step S4, the adjacent samples of the ordinary accounts are searched; S53) Based on the actual weights of the adjacent samples obtained in step S3, weighted voting is performed.
9. The social media user group labeling method of claim 8, wherein: In step S52, first calculate the distance between the sample to be classified and each sample in the training set; according to the calculated distance, select the k nearest samples as the neighbors of the sample to be classified, where K is a positive integer.
10. A social media user group labeling system, comprising: The application discloses a social media user group labeling method and device, and a computer readable storage medium. The social media user group labeling method comprises a processor and a memory, the processor and the memory are coupled; wherein the memory is used for storing a computer program; the processor is used for running the computer program stored in the memory, and the social media user group labeling method in any one of claims 1-9 is executed.
Citation Information
Patent Citations
Social network recommendation device and method based on collaborative filtering
CN106709076A
Identification method for high-influence user by combining social network with time factor
CN110992195A
Model training method and device, object recognition method, device, medium and electronic equipment
CN111626315A
Social event classification method and device based on local aggregation graph attention network
CN113449204A
Systems and methods for customized filtering and analysis of social media content collected over social networks
US20130297581A1
Cited By
Intelligent dynamic tagging and implementation method for multi-source heterogeneous customer data
CN121614642A