A 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 problem of incomplete data in the classification and labeling of social media users, and achieves efficient and accurate user group labeling.

CN120995245BActive Publication Date: 2026-07-31THE FIRST RES INST OF MIN OF PUBLIC SECURITY
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
THE FIRST RES INST OF MIN OF PUBLIC SECURITY
Filing Date
2025-07-30
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies for classifying and labeling social media users suffer from problems such as insufficient classification criteria, inefficient and inaccurate data processing, especially when dealing with large-scale, high-dimensional, and dynamically changing social media data. These technologies involve large computational loads, long processing times, and are difficult to adapt to different types and themes.

Method used

By collecting interaction behavior data from social media accounts, an interaction relationship graph is constructed, weights are calculated and normalized, and classification is performed using regression models and kNN classification algorithms. Weights are dynamically adjusted to distinguish high-influence accounts, and classification thresholds are optimized using time decay factors and network centrality indicators to reduce the false positive rate.

Benefits of technology

It achieves high-precision and high-efficiency classification of social media users, accurately identifies high-influence accounts, reduces computational load, adapts to data changes of different types and themes, and improves the accuracy and timeliness of classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120995245B_ABST
    Figure CN120995245B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for labeling social media user groups. The method includes the following steps: collecting at least one social media account as a base account; collecting interaction behavior data of the base account within a preset time period and analyzing it to obtain an interaction relationship graph of the base account; calculating weights for the base accounts based on the interaction relationship graph; setting a preset weight threshold and performing regression analysis on base accounts that reach the weight threshold to distinguish account types as high-influence accounts or ordinary accounts; for classified ordinary accounts, using their interaction relationship graph, employing the kNN classification algorithm to further classify the account type to obtain high-influence accounts. This invention achieves efficient and accurate classification of a large number of social media accounts through a two-step classification strategy, combining a time decay factor, a network centrality index, and a weighted kNN classification algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for labeling social media user groups, and also to a corresponding social media user group labeling system, belonging to the field of data processing technology. Background Technology

[0002] With the rapid development of social media, its user base has become increasingly large and complex, making the need for user classification and labeling more and more urgent. Early classification methods mainly relied on users' static information, such as real-time location, region, and friend network. These methods have limited basis for classification and cannot fully reflect users' behavioral characteristics and influence, resulting in inaccurate classification results.

[0003] To improve this situation, several classification methods based on user behavior data have emerged. For example, Chinese invention patent ZL 201710106305.4 discloses a social network recommendation method based on collaborative filtering. This method classifies user behavior data and personal attributes in social networks by feature classification, continuously learning users' friendship preferences based on their historical data, and recommending different friends in a personalized way. However, these methods still have significant shortcomings: on the one hand, they only focus on text content and ignore other behavioral features, resulting in an incomplete classification basis; 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, existing methods also have many problems in data processing, such as the lack of an effective reliable data pruning mechanism, making it difficult to select representative sample data, which directly affects classification accuracy. At the same time, social media data is characterized by its large scale, high dimensionality, and dynamic changes. Existing methods often suffer from high computational cost, long processing time, inability to process in batches, and small coverage when processing this type of data.

[0004] In summary, existing technologies face numerous challenges in social media user classification and labeling, including the comprehensiveness of classification criteria, and the efficiency and accuracy of data processing. These shortcomings have prompted us to conduct in-depth research and propose more advanced methods and systems for social media user group labeling to address the problems in existing technologies and meet the practical application requirements for high precision, high efficiency, and high adaptability in social media user classification and labeling. Summary of the Invention

[0005] The primary technical problem to be solved by this invention is to provide a method for labeling social media user groups.

[0006] Another technical problem to be solved by the present invention is to provide a social media user group labeling system.

[0007] To achieve the above-mentioned technical objectives, the present invention adopts the following technical solution:

[0008] According to a first aspect of the present invention, a method for labeling social media user groups is provided, comprising the following steps:

[0009] S1: Collect at least one social media account as the base account;

[0010] S2: Collect interaction behavior data of the basic account within a preset time period and analyze it to obtain the interaction relationship graph of the basic account;

[0011] S3: Calculate the weights for the basic accounts based on the interaction relationship graph;

[0012] S4: Preset weight threshold, apply a regression model to classify the basic accounts that reach the weight threshold, and distinguish the account type as a high-influence account or an ordinary account.

[0013] S5: For the ordinary accounts classified in step S4, the kNN classification algorithm is used to further subdivide the account types of the ordinary accounts using the interaction relationship graph of the ordinary accounts, in order to identify potential high-influence accounts.

[0014] Preferably, the interactive behavior data includes at least active behavior data, time data, network data, and content feature data.

[0015] Preferably, in step S2, an interaction relationship graph centered on the basic account is constructed based on all the collected interaction behavior data.

[0016] Preferably, step S3, which calculates the weight for the basic account, includes the following sub-steps:

[0017] 1) Classify the interactive behaviors of basic accounts and assign different weights to each type of interactive behavior. The weight of each basic account is calculated by weighting and summing all interactive behaviors.

[0018] 2) Dynamically adjust weights using time decay factors and network centrality indices;

[0019] 3) Perform normalization processing to map the weight values ​​of all accounts to the [0,1] interval as the actual weights.

[0020] Preferably, the dynamic adjustment is an unsupervised process that only generates intermediate features and does not directly participate in the final classification decision.

[0021] Preferably, in step S4, the preset weight threshold includes the following sub-steps:

[0022] 1) Obtain the initial threshold;

[0023] 2) Obtain the optimal regression coefficients using a regression model on the initial threshold;

[0024] 3) Dynamically adjust the weight threshold based on the optimal regression coefficient and the initial threshold to obtain the optimized weight threshold.

[0025] Preferably, the input data of the regression model includes at least the weight values ​​of the basic accounts, interaction behavior characteristics, network data characteristics, and label data.

[0026] Preferably, step S5 involves further classifying the ordinary account by account type, including the following sub-steps:

[0027] S51) Construct a feature vector based on the interaction behavior data of ordinary accounts collected in step S2;

[0028] S52) Based on the type labels of each basic account classified in step S4, search for neighboring samples of ordinary accounts;

[0029] S53) Perform weighted voting based on the actual weights obtained by the neighboring samples in step S3.

[0030] Preferably, in step S52, the distance between the sample to be classified and each sample in the training set is first calculated; based on the calculated distance, the k closest samples are selected as the nearest neighbors of the sample to be classified, where K is a positive integer.

[0031] According to a second aspect of the present invention, a social media user group labeling system is provided, including a processor and a memory, the processor and the memory being coupled together; 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 perform the aforementioned social media user group labeling method.

[0032] Compared with existing technologies, this invention significantly improves the accuracy and timeliness of social media user classification. The method constructs an interaction relationship graph by collecting basic information and interaction behavior data of social media accounts, assigns weights to basic accounts based on the graph, and then normalizes the weights after dynamic adjustment. Preset weight thresholds combined with regression analysis are used to distinguish between high-influence accounts and ordinary accounts, and ordinary accounts are further classified using the kNN classification algorithm. This method not only achieves accurate classification and subdivision of large numbers of social media accounts but also reduces computational load and automatically adapts to new classification types. Dynamically calculating account weights through time decay factors and network centrality indicators effectively solves the classification bias caused by equal voting of samples, improving the accuracy of influential account classification. Jointly optimizing classification thresholds reduces the model's misclassification rate, improves the performance of the classification model, and meets the high-precision and high-efficiency requirements for social media user classification and labeling in practical applications. Attached Figure Description

[0033] Figure 1 This is a flowchart illustrating the social media user group labeling method in the first embodiment of the present invention;

[0034] Figure 2 This is a schematic diagram of the structure of the social media user group labeling system in the first embodiment of the present invention. Detailed Implementation

[0035] The technical content of the present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0036] The technical concept in this invention is as follows: User group classification employs a two-step process (first, logistic regression is used to classify all basic accounts into ordinary accounts and high-influence accounts; then, the kNN classification algorithm is used to perform a secondary classification of ordinary accounts, from which high-influence accounts are obtained). Furthermore, account weights are dynamically calculated using a time decay factor and a network centrality index; a weighted kNN classification algorithm is used to address classification bias caused by equal voting among samples, improving the accuracy of influential user classification; and dynamic weights and regression threshold optimization are combined to jointly optimize the classification threshold, thereby reducing the model's false positive rate (FPR).

[0037] First Embodiment

[0038] like Figure 1 As shown, the social media user group labeling method provided in the first embodiment of the present invention includes at least the following steps:

[0039] S1: Collect at least one social media account as the base account.

[0040] In one embodiment of the present invention, the basic account includes account name (unique identifier), registration time (account creation date), last login time (last active timestamp), geolocation information (registration location / frequent login location), device information (frequent login device type), account authentication status (whether officially authenticated), etc.

[0041] S2: Collect interaction behavior data of the basic account within a preset time period and analyze it to obtain the interaction relationship graph of the basic account.

[0042] In one embodiment of the present invention, the interactive behavior data includes active behavior data, passive behavior data, time data, network data, and content feature data.

[0043] 1) Example of proactive behavioral data:

[0044] • Number of followers (actively following others)

[0045] • Number of likes (content actively liked)

[0046] • Number of comments (actively posting comments)

[0047] • Number of reposts (content actively reposted)

[0048] 2) Examples of passive behavior data:

[0049] • Number of followers (number of fans)

[0050] • Number of likes received (number of times the content has been liked)

[0051] • Number of comments (the number of times the content received comments)

[0052] • Number of reposts (number of times the content has been reposted)

[0053] 3) Example of time data (for calculating dynamic weights)

[0054] The first occurrence time of various behaviors

[0055] Recent occurrence time of various behaviors

[0056] Behavioral time distribution (statistics by time period)

[0057] 4) Examples of network data

[0058] Attention graph (attention / follower relationships)

[0059] Fan quality metrics (fan influence distribution)

[0060] Social network centrality indicators (PageRank value, etc.)

[0061] 5) Example of content feature data

[0062] Content publishing frequency

[0063] Content type distribution (text / image / video)

[0064] Content topic distribution (topic tag statistics)

[0065] Among them, proactive behavior data, time data, network data, and content feature data all directly participate in the classification process and affect the final user group labeling results at different stages.

[0066] Specifically:

[0067] 1. Time data is the cornerstone of dynamic weight calculation. By combining preset time periods and decay mechanisms, it is ensured that the classification results can reflect the user's current state, rather than the entire historical data.

[0068] 2. Network data is used to solve structural problems. For example, the PageRank algorithm and fan quality indicators can be used to correct the bias of simple behavioral statistics at the network topology level, thereby filtering out inaccurate classifications such as "fake influencers".

[0069] 3. Content feature data (such as posting frequency and topic distribution) serve as the core basis for segmenting a massive number of ordinary users when using the kNN classification algorithm to classify ordinary accounts, supporting long-tail classification.

[0070] In practice, social media user interactions (such as following, being followed, liking, being liked, commenting, being commented on, forwarding, being forwarded, etc.) are categorized into k behavior categories, where k is a positive integer. These behavior categories and their related data types play a crucial role in the classification process, ensuring the accuracy and timeliness of user group labeling results.

[0071] The interaction relationship graph is constructed based on all collected interaction behavior data. In this graph, the base account occupies a central position, existing as a core node. Other accounts that have had any interaction with the base account, whether active or passive, are included as nodes in the graph. Each interaction behavior is represented as an edge, connecting the base account to other accounts. Each edge has three key attributes: type, direction, and frequency. Type distinguishes specific interaction behaviors, such as following, liking, commenting, and sharing; direction indicates the active and passive party in the interaction. For the base account, active interaction refers to actions directed from the base account to other accounts, while passive interaction is actions from other accounts to the base account; frequency records the specific frequency of that particular type of interaction within a preset time period (e.g., 30 days), used for subsequent weight calculations.

[0072] For example, if account B follows base account A, an edge will be created in the interaction graph from B to A, with the type "following," the direction being passive (because for A, this is the act of being followed), and the count being 1. Similarly, if base account A likes a post by account C, an edge will be created from A to C, with the type "like," the direction being active, and the count being 1. Furthermore, if account D comments on a post by base account A three times, an edge will be formed from D to A, with the type "comment," the direction being passive, and the count being 3. In this way, the originally discrete interaction behavior data is integrated into a structured network, namely the interaction graph, which intuitively shows all direct connections between base accounts and other accounts, as well as their properties and strengths.

[0073] If multiple base accounts need to be analyzed, an independent interaction graph will be built for each base account. This ensures that the interaction characteristics and relationship network of each account can be displayed separately and clearly, providing an accurate data foundation for subsequent weight calculation and classification processes.

[0074] S3: Calculates weights for basic accounts based on the interaction relationship graph.

[0075] Calculating weights involves assigning different weight values ​​to each type of interaction. For example, proactive behaviors have a lower weight than passive behaviors. This is because proactive behaviors primarily reflect the activity level of the underlying account, while passive behaviors reflect the influence of the underlying account more.

[0076] In one embodiment of the present invention, calculating the weights includes the following sub-steps:

[0077] 1) Categorize the interactive behaviors of basic social media accounts (such as following, being followed, liking, being liked, commenting, being commented on, sharing, being shared, etc.) and assign different weights to each type of interactive behavior. The weight of each basic account is obtained by calculating the weighted sum of all interactive behaviors. The formula for calculating the weight W is:

[0078]

[0079] Cj: The preset coefficient for the j-th type of interaction behavior (e.g., being followed = 3, being forwarded = 2, commenting = 1); the initial value of the preset coefficient is based on experience, but can be optimized through data-driven approaches.

[0080] Fj: The number of times the j-th type of interaction occurs, where j is a positive integer.

[0081] 2) Dynamically adjust weights using time decay factor and network centrality index.

[0082] It should be noted that the time decay factor is weighted differently based on the time of the behavior, and recent interactions are given higher weight. For example, the time decay factor for interactions within the last 30 days is 1.2, the time decay factor for interactions more than 90 days ago is 0.8, and the time decay factor for interactions in between is 1.0.

[0083] Network centrality reflects the centrality of an account within a social network and is typically calculated using algorithms such as PageRank. Higher centrality results in a larger network centrality value. In weight calculations, this metric is introduced as a multiplier factor (e.g., β), where β represents the normalized value of the network centrality metric.

[0084] This invention employs a two-step hierarchical processing architecture. First, unsupervised weight calculation is performed, followed by supervised classification. Specifically, the dynamic adjustment process in step S3 is unsupervised; it does not rely on labels and only generates intermediate features, which do not directly participate in the final classification decision. In contrast, the regression analysis in step S4 uses labels for training. Because steps S3 and S4 employ different processing methods, there is no information leakage issue. Temporal data features and network data features are used in both steps, but they are used for unsupervised weight calculation in step S3, while in step S4 they serve as input features for the regression model. This is essentially 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 weight W is calculated within the regression model in step S4, the model would need to simultaneously perform feature construction and classification, significantly increasing model complexity. Therefore, placing the weight calculation in step S3 avoids this increase in complexity, thereby improving the overall model efficiency and performance. Through this hierarchical processing method, this invention can reduce model complexity and improve computational efficiency while ensuring classification accuracy.

[0086] 3) Perform normalization processing to map the weight values ​​of all accounts to the [0,1] interval as the actual weights, so as to facilitate subsequent threshold determination.

[0087] In one embodiment of the present invention, assume the interaction behavior data of a basic account is as follows:

[0088] Number of times viewed: 50 times (coefficient = 3);

[0089] Number of likes: 200 (coefficient = 2);

[0090] Number of proactive comments: 30 (coefficient = 1);

[0091] Time decay factor (last 30 days, excluding historical behavior outside the preset time period): 1.2.

[0092] Network centrality metric: 1.0 (ideal value)

[0093] The dynamically adjusted weight W is:

[0094] W=(50×3+200×2+30×1)×1.2×1.0=696 (2)

[0095] After normalization, assuming the maximum weight value among all dynamically adjusted weights obtained through the aforementioned steps is 1000, the actual weight of the basic account is calculated as 696 / 1000 = 0.696. It is important to emphasize that the time decay factor only applies to behaviors within a preset time period; behavior data outside this period is not included in the statistics. This design allows the model to balance timeliness and computational efficiency, effectively avoiding the processing of invalid historical data. Furthermore, a network centrality index of 1.0 is an idealized case, representing an account as a central node in the network, for example, with a PageRank value close to the highest in the entire network. However, in practical applications, the value of the network centrality index needs to be normalized, as shown in the formula β = PageRank / PR_max. The range of the network centrality index depends on the specific network structure; 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 entire network. Although theoretically this maximum value has no upper limit, constraints are needed in practice to prevent weight distortion.

[0096] S4: Set a preset weight threshold, apply a regression model to classify the basic accounts that reach the weight threshold, and distinguish the account type as "high-influence user" or "ordinary account".

[0097] In one embodiment of the present invention, the preset weight threshold is determined by big data analysis (such as quantile method, but not limited to this) combined with the validation and optimization of the regression model, rather than simply relying on experience or industry standards.

[0098] Presetting the weight threshold includes the following sub-steps:

[0099] 1) Obtain the initial threshold using big data analytics methods;

[0100] 2) Obtain the optimal regression coefficients using a regression model on the initial threshold;

[0101] 3) Dynamically adjust the weight threshold based on the optimal regression coefficient and the initial threshold to obtain the optimized weight threshold.

[0102] In one embodiment of the present invention, 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 this embodiment of the invention is a regression model suitable for binary or multi-class classification problems, such as the Logistic Regression model. An initial threshold is input into the logistic regression model, and the preset weight threshold of 0.6 is determined by maximizing the F1-s core of the validation set.

[0104] The input data for the logistic regression model includes:

[0105] The weight value of the basic account (from the weight calculation result of step S3, the normalized actual weight).

[0106] Interactive behavior characteristics: such as the number of likes, comment frequency, repost rate, number of followers, etc.

[0107] Time data characteristics: recent active time, time decay factor of each interaction behavior (e.g., behavior in the last 30 days has a higher weight).

[0108] Network data characteristics: attention / being-attended ratio, social network centrality index (i.e., PageRank value).

[0109] Tag data: Predefined or generated account type tags, in this example "high-influence users" and "ordinary users". Tag data can also be "ordinary users" and "specific interest groups (e.g., beauty, fitness)".

[0110] The calculation formula for the logistic regression model is as follows (taking binary classification as an example):

[0111]

[0112] Y=1: This indicates that the account belongs to the target type (e.g., "high-influence user").

[0113] Independent variable:

[0114] W: Normalized weight values ​​(core features).

[0115] F: Interaction frequency (e.g., average daily likes).

[0116] T: Time decay factor (e.g., activity over the last 30 days).

[0117] ...: indicates other features (such as social network centrality indicators in network data, and content posting frequency in content feature data).

[0118] βk : The regression coefficients are estimated using the training data.

[0119] Then, parameter estimation methods, such as maximum likelihood estimation (MLE), are used to train the regression model. MLE maximizes the likelihood function of the observed data, thus solving for the optimal regression coefficients. During training, the regression model iteratively optimizes the loss function (e.g., log loss) to continuously adjust the regression coefficients, thereby improving the model's accuracy and performance.

[0120] It should be explained that the active behavior data, passive behavior data, time data, network data, and content feature data mentioned in step S2 are all reflected in the model input in step S4 in an explicit or implicit manner. Specifically:

[0121] Active behavior data is explicitly incorporated into the model through interaction frequency (F), such as the average number of likes per day. Simultaneously, the raw information from 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 the time decay factor (T), the time data is also used for the dynamic adjustment of weights in step S3, that is, the time decay effect of the behavior is considered when calculating the weights.

[0123] Passive behavior data is indirectly reflected in the model input by influencing the weight values ​​(W) in step S3.

[0124] Network data explicitly participates in model training by directly inputting relevant metrics (such as PageRank values).

[0125] Content feature data also participates in model training through direct explicit inputs (such as publication frequency).

[0126] In other words, in step S4, the model input explicitly or implicitly includes all five types of data: active behavior data is reused through interaction frequency (F) and weights (W), time data is reused through time decay factor (T) and weights (W), and passive behavior data, network data, and content feature data also participate in the model input in different ways. This design ensures that the regression model can comprehensively consider various data features, thereby improving the accuracy and reliability of classification.

[0127] In one embodiment of the present invention, the training process is as follows:

[0128] The dataset was divided into a training set (80%) and a validation set (20%).

[0129] Standardize the features of the training set (e.g., Z-score normalization);

[0130] Fit a logistic regression model and calculate the regression coefficients;

[0131] Evaluate model performance (e.g., accuracy, AUC-ROC) on the validation set.

[0132] In the step of dynamically adjusting the weighted threshold based on the optimal regression coefficient and the initial threshold, the initial threshold is assumed to be 0.5 (if P(Y=1|X)≥0.5, it is determined to be "target type"). Using ROC curve analysis, a threshold that balances the true positive rate (TPR) and the false positive rate (FPR) is selected to dynamically adjust the initial threshold and obtain the optimized weighted threshold.

[0133] Optionally, the step of dynamically adjusting the initial threshold can also be driven by business needs: after obtaining the optimized weight threshold using the ROC curve, if it is necessary to reduce false positives, the threshold can be increased; if it is necessary to cover more potential users, the threshold can be decreased.

[0134] Finally, the optimized weight thresholds obtained through dynamic adjustment are used to classify account types.

[0135] If it is a binary classification, the classification rules are as follows:

[0136]

[0137] In this model, Type A represents "high-influence users" and Type B represents "ordinary users". Because "high-influence users" are usually scarce in social media, the regression model can improve the recall rate of the minority class by using probability output combined with threshold adjustment.

[0138] For multi-class classification, the basic account needs to be divided into multiple types, such as "beauty influencer," "tech enthusiast," and "regular user." Multivariate logistic regression can be used to directly output the probabilities of each class. Alternatively, a One-vs-Res strategy can be employed to train multiple binary classification models, each targeting only one class.

[0139] The basic accounts are categorized through the steps described above. For example, each basic account can be tagged as either a "high-influence user" or a "regular user".

[0140] In one embodiment of the present invention, assume that the input characteristics of a basic account are as follows:

[0141] Weight value W = 0.8

[0142] Average daily likes F = 50

[0143] Time decay factor T = 1.2

[0144] The regression coefficients are β0 = -2.5, β1 = 3.0, β2 = 0.02, and β3 = 1.5.

[0145] The probability that it belongs to "high-influence user" is 0.937. If the optimized weight threshold is 0.7, then the basic account is determined to be a "high-influence user".

[0146] S5: For the ordinary accounts classified in step S4, the kNN classification algorithm is used to further subdivide the ordinary accounts by account type using the interaction relationship graph of ordinary accounts, in order to identify potential high-influence accounts.

[0147] Specifically, after the aforementioned steps S1 to S4, the types of each basic account have been labeled (such as "high-influence user" and "ordinary user"), which are used as labels for the kNN algorithm training set to classify ordinary accounts.

[0148] In one embodiment of the present invention, classifying a regular account includes the following sub-steps.

[0149] S51) Construct a feature vector based on the interaction behavior data of ordinary accounts collected in step S2.

[0150] Assuming interaction data from a regular account:

[0151] Number of views: 100

[0152] Number of voluntary likes: 50

[0153] Forwarding rate: 0.3 (30 forwards / 100 posts)

[0154] Time decay factor: 1.2 (recently active)

[0155] Standardized feature vector: [1.5, 0.8, 0.3, 1.2] (assuming the standardized 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 neighboring samples of ordinary accounts:

[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. To do this, the Euclidean distance between the ordinary account and all base accounts is calculated from the labeled base accounts. Based on the interaction data collected in step S2, the Euclidean distance is calculated for each feature value of the ordinary account:

[0158]

[0159] Where x and y represent the feature vectors of two different accounts; xi represents the i-th feature value of account x (e.g., the number of times it is followed); yi represents the i-th feature value of account y (e.g., the number of times it is followed).

[0160] Then, based on the calculated distance, the k nearest samples are selected as the nearest neighbors of the sample to be classified, where k is a positive integer. Here, we assume the five nearest basic accounts (k=5) have the following type labels: 3 "high-influence users" and 2 "ordinary users". The value of k is set through cross-validation or empirically (e.g., K=5). The value of K is related to the size of the basic accounts and can be preset to select the top 5% of neighboring samples.

[0161] S53) Perform weighted voting based on the actual weights obtained from the neighboring samples in step S3.

[0162] Here, "actual weight" refers to the normalized weight of neighboring samples (the weight of the non-account to be classified).

[0163] This step, through a weighted voting mechanism of neighboring samples, effectively improves the recall rate of high-influence accounts and forms a closed loop with the output of step S3, avoiding the problem of redundant calculation. Specifically, according to the kNN classification algorithm, after determining the nearest neighbors, the traditional approach is to determine the category of ordinary accounts (i.e., the samples to be classified) through majority voting, that is, to count the number of each category among the k nearest neighbors and classify the sample to be classified into the category with the most numbers.

[0164] For example, suppose the actual weights of the five neighboring basic accounts are 0.9, 0.8, 0.7, 0.6, and 0.5, respectively. During the voting phase, a weighted voting method is used, meaning samples with higher weights have a greater impact on the classification results. The weighted voting results are as follows: the total weight of the three basic accounts labeled "high-influence user" is 0.9 + 0.8 + 0.7 = 2.4; the total weight of the two basic accounts labeled "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 ultimately labeled as a "high-influence user."

[0165] The kNN classification algorithm is widely used in classification tasks due to its simplicity, ease of implementation, and excellent performance in numerous practical problems. However, its performance largely depends on the chosen distance metric and the value of k. This invention effectively mitigates the problem caused by excessively large k values ​​by introducing weighted voting. When k is too large, many distant and less representative neighbors receive the same voting power as nearest neighbors, potentially negatively impacting the classification results. Weighted voting, by assigning higher weights to closer points, significantly reduces the relative influence of distant points. Thus, even if k is set slightly larger than the optimal value, weighted voting can enhance the robustness of classification by automatically mitigating the negative impact of distant points, thereby improving the reliability of the classification results.

[0166] In one embodiment of the invention, a two-step classification method is employed to achieve accurate labeling of social media user groups. First, a logistic regression model is used to initially classify all basic accounts, filtering out high-influence accounts. Then, for the portion of accounts initially labeled as ordinary, the kNN classification algorithm is used for secondary classification to further identify the high-influence accounts within. This two-step classification strategy takes into account the classification needs of different account types: for high-influence accounts (such as influential figures, institutional accounts, etc.) that are relatively few in number (approximately 5-10%), have complex behavioral patterns, and high data quality, accuracy is prioritized during classification to reduce the significant impact of potential misclassifications; while for ordinary accounts (such as low-frequency interacting users, inactive followers, etc.) that are numerous (90-95%), have sparse data, and exhibit significant behavioral noise, the focus is on rapid generalization classification, prioritizing efficiency and robustness. Specifically, the kNN classification algorithm can quickly cover long-tail users (e.g., 97% of the data), while the logistic regression model focuses on processing approximately 3% of high-value accounts.

[0167] Logistic regression models offer unique advantages in classification. They output continuous confidence scores rather than direct hard classification results (like decision trees that directly output categories), enabling dynamic threshold optimization. For example, by using the ROC curve to select a threshold that keeps the false positive rate (FPR) below 5%, the risk of misclassification can be effectively controlled. Furthermore, logistic regression models dynamically adjust weights based on factors such as behavior frequency, time decay, and network metrics, ensuring that salient features (strong signals) of high-influence accounts are prioritized for identification. The model also quantifies the impact of each feature on the classification result through regression coefficients. This not only helps in identifying key features but also facilitates manual verification of the coefficients' rationality, thereby enhancing the model's interpretability.

[0168] The kNN classification algorithm is suitable for the second-step classification because it does not require pre-training a model and can directly reuse the labels of basic accounts, making it well-suited for massive datasets of ordinary accounts. In practical applications, the kNN algorithm utilizes a weighted voting mechanism, reusing account weights to suppress noise interference and prevent low-influence neighbors (such as inactive followers) from unduly affecting classification decisions, thereby improving classification robustness. Furthermore, the algorithm possesses excellent dynamic scalability, flexibly adapting to changes in data scale and the emergence of new account types.

[0169] Compared with existing technologies, the social media user group labeling method provided in this invention achieves efficient and accurate user group labeling through a two-step classification strategy. The first step employs logistic regression classification, which effectively handles the complex behavioral patterns of high-influence accounts, ensuring classification accuracy. The second step utilizes the kNN classification algorithm, suitable for the rapid classification of ordinary accounts, balancing efficiency and robustness. Introducing a time decay factor makes the classification model focus more on recent interactions, thus better reflecting the user's current activity and influence. The network centrality index corrects the bias of simple behavioral statistics at the network topology level, avoiding inaccurate classifications such as "fake influencers." The weighted kNN classification algorithm assigns higher weights to closer points, reducing the relative influence of distant points and improving classification accuracy. Furthermore, the joint optimization of dynamic weights and regression thresholds further reduces the model's misclassification rate and improves the overall classification effect. In summary, this invention can achieve efficient and accurate classification of a large number of social media accounts, meeting the high-precision and high-efficiency requirements for social media user classification and labeling in practical applications.

[0170] Second Embodiment

[0171] like Figure 2 As shown, based on the aforementioned social media user group labeling method, the second embodiment of the present invention further provides a social media user group labeling system. The system includes one or more processors and a memory. The memory is coupled to the processor and is used to store one or more programs. When the programs are executed by the processor, the processor implements the social media user group labeling method described in the above embodiment.

[0172] The processor controls the overall operation of the system to complete all or part of the steps in the aforementioned social media user group tagging method. This processor can be a central processing unit (CPU), graphics processing unit (GPU), field-programmable gate array (FPGA), application-specific integrated circuit (ASIC), digital signal processing (DSP) chip, etc. The memory stores various types of data to support the operation of the system. This data may include, for example, instructions for any application or method operating on the system, as well as application-related data. The memory can be implemented using any type of volatile or non-volatile storage device or a combination thereof, 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 storage, flash memory, etc.

[0173] In another exemplary embodiment, the present invention also provides a computer-readable storage medium including program instructions that, when executed by a processor, implement the steps of the social media user group labeling method in any of the above embodiments. For example, the computer-readable storage medium may be the aforementioned memory including program instructions, which can be executed by a system processor to complete the aforementioned social media user group labeling method and achieve the same technical effects as the aforementioned method.

[0174] It should be noted that the above embodiments are merely illustrative examples, 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 this invention.

[0175] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0176] The social media user group tagging method and system provided by this invention have been described in detail above. Any obvious modifications made by those skilled in the art without departing from the essence of this invention will constitute an infringement of the patent rights of this invention and will incur corresponding legal liability.

Claims

1. A method for labeling social media user groups, characterized in that... Includes the following steps: S1: Collect at least one social media account as the base account; S2: Collect interaction behavior data of the basic account within a preset time period and analyze it to obtain the interaction relationship graph of the basic account; S3: Calculate the weights for the basic accounts based on the interaction relationship graph; S4: Preset weight threshold, apply a regression model to classify the basic accounts that reach the weight threshold, and distinguish the account type as a high-influence account or an ordinary account. S5: For the ordinary accounts classified in step S4, the kNN classification algorithm is used to further subdivide the account types of the ordinary accounts using the interaction relationship graph of the ordinary accounts, in order to identify potentially high-influence accounts. In this interaction graph, the base account occupies a central position, existing as a core node. Other accounts that have had any interaction records with it are included as nodes in this interaction graph. Each interaction behavior is represented as an edge, connecting the base account with other accounts. In step S3, calculating the weight for the basic account includes the following sub-steps: 1) Classify the interactive behaviors of basic accounts and assign different weights to each type of interactive behavior. The weight of each basic account is calculated by weighting and summing all interactive behaviors. 2) Dynamically adjust weights using time decay factors and network centrality indices; 3) Perform normalization processing, mapping the weight values ​​of all accounts to the [0,1] interval, as the actual weights. In step S5, the ordinary account is further classified into account types, including the following sub-steps: S51) Construct a feature vector based on the interaction behavior data of ordinary accounts collected in step S2; S52) Based on the type labels of each basic account classified in step S4, search for neighboring samples of ordinary accounts; S53) Perform weighted voting based on the actual weights obtained by the neighboring samples in step S3.

2. The social media user group labeling method as described in claim 1, characterized in that: The interactive behavior data includes at least proactive behavior data, time data, network data, and content feature data.

3. The social media user group labeling method as described in claim 1, characterized in that: In step S2, an interaction relationship graph centered on the basic account is constructed based on all collected interaction behavior data.

4. The social media user group labeling method as described in claim 3, characterized in that: The dynamic adjustment is an unsupervised process that only generates intermediate features and does not directly participate in the final classification decision.

5. The social media user group labeling method of claim 1, wherein In step S4, the preset weight threshold includes the following sub-steps: 1) Obtain the initial threshold; 2) Obtain the optimal regression coefficients using a regression model on the initial threshold; 3) Dynamically adjust the weight threshold based on the optimal regression coefficient and the initial threshold to obtain the optimized weight threshold.

6. The social media user group labeling method as described in claim 5, characterized in that: The input data for the regression model includes at least the weight values ​​of the basic accounts, interaction behavior characteristics, network data characteristics, and label data.

7. The social media user group labeling method as described in claim 1, characterized in that: In step S52, the distance between the sample to be classified and each sample in the training set is first calculated; based on the calculated distance, the k closest samples are selected as the nearest neighbors of the sample to be classified, where K is a positive integer.

8. A social media user group labeling system, comprising: The device includes a processor and a memory, the processor and the memory being coupled together; 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 perform the social media user group labeling method according to any one of claims 1 to 7.