Method and system for predicting post popularity of social platform
Through a modular architecture and multi-level feature fusion social platform post popularity prediction system, a large language model is used to extract post features, which solves the problem of decreased prediction accuracy caused by early data scarcity and realizes high-precision and real-time hot spot discovery and personalized services.
Patent Information
- Application Number
- CN202510805544.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-10-03
AI Technical Summary
Existing social media popularity prediction methods suffer from data scarcity and wild fluctuations when posts are first published, resulting in decreased accuracy in early predictions and a lack of intelligent and personalized prediction services.
A modular architecture design is adopted, combining statistical participation features, semantic sentiment features and topological interaction features, and using a large language model for multi-level feature extraction and deep learning to build a social platform post popularity prediction system, including data acquisition and cleaning, feature extraction, model training and large model interaction interface modules, to achieve high-precision and real-time popularity prediction.
It can still accurately predict the popularity of posts when data is scarce in the early stages, improving the speed of discovering potential hotspots and the timeliness of information push, providing intelligent analysis reports and decision-making recommendations, and enhancing the human-computer interaction experience and the interpretability of prediction results.
Smart Images

Figure CN120744810A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of big models and data mining, and more particularly to a method and system for predicting the popularity of social media posts based on big models. Background Art
[0002] Today, the internet has become the primary channel for people to obtain information. With the rapid rise of various social platforms, information acquisition has become more convenient and dissemination has become increasingly rapid. Online social platforms have brought together vast online communities and established close interpersonal connections. Unlike traditional communication methods such as letters, oral communication, or newspapers, information dissemination on social networks has the following significant characteristics:
[0003] 1. Strong immediacy: With the continuous advancement of Internet technology, information publishers can quickly spread major events they see in a very short time.
[0004] 2. Obvious group nature: Social networks make information release more casual. Various parties may spread inflammatory information and remarks for different purposes. Once these contents are widely disseminated, they are likely to trigger a group effect.
[0005] 3. Shortened update cycle: As a large amount of information is released at the same time, the sources of information become more diverse, and new information quickly replaces old information, the update cycle of the entire communication process is significantly shortened.
[0006] Based on these characteristics of information dissemination on social networks, timely discovering changes in information dissemination and quickly predicting popularity have become key means to achieve real-time information push and monitoring.
[0007] The announcement number is CN104281882A (Method and system for predicting the popularity of social network information based on user characteristics). This patent discloses a method for predicting the popularity of social network information based on user characteristics. The method includes: obtaining user data and information data in the social network; extracting some user attribute characteristics and user behavior characteristics from the user data; classifying the user data according to the user attribute characteristics and user behavior characteristics; obtaining user propagation characteristics corresponding to the information data based on the information data and user categories; obtaining a social network information popularity prediction model based on the user propagation characteristics, and using the prediction model to predict the information popularity.
[0008] Announcement No. CN106503209A (A Topic Heat Prediction Method and System), this patent discloses a topic heat prediction method, which includes: in each post related to a preset topic, obtaining a list of user comment data within N time periods, each list containing multiple comment data, and each post holding a corresponding opinion; processing each comment data through a preset algorithm to obtain the user opinion tendency of each comment data; calculating the topic heat score of each post in each time period based on the user opinion tendency of each data; constructing and training a gamma prediction model function based on the topic heat score of each post in each time period, and using the function to obtain the topic heat prediction value corresponding to any time point.
[0009] In the above-mentioned existing methods, the prediction model is constructed to predict the popularity of the topic by analyzing the explicit features such as user attributes and user behavior in the social network. However, when the post is just published and the data scale is extremely small, these explicit features are often scarce and fluctuate violently, resulting in unrepresentative statistical results, which greatly reduces the prediction accuracy of the model in the early stages. Not only is it difficult to discover potential hot events in a timely manner, but the best time to push information is also missed, and the guidance is often delayed. In addition, traditional social media popularity prediction methods face problems such as insufficient intelligence, poor human-computer interaction experience, and lack of prediction interpretability. The existing technology mainly relies on solidified feature extraction and prediction models, lacks the ability to intelligently communicate with users, and cannot provide personalized prediction services and real-time strategic recommendations. In order to solve these two defects, the present invention innovatively combines large language model technology with multi-level feature extraction methods to construct an intelligent modular prediction system. The system not only has high-precision popularity prediction capabilities, but can also interact with users through natural language to provide intelligent analysis reports and decision-making recommendations. Summary of the Invention
[0010] In view of the shortcomings of the existing technology, the present invention provides a method and system for predicting the popularity of posts on social platforms.
[0011] The present invention adopts a modular architecture design, in which each functional module can operate independently and be flexibly called by a large language model to realize intelligent popularity prediction and analysis services. In this method, the data acquisition and cleaning module first calls the social media platform interface to obtain the original post and comment data. Then, the multi-level feature extraction module is entered. The statistical participation feature submodule calculates numerical indicators such as the number of likes of the post and the credit score of the commenting user. The semantic sentiment feature submodule uses a pre-trained large model to perform sentiment scoring and text similarity analysis on the comment text. The topological interaction feature submodule constructs the comment-reply relationship into a multi-branch tree and extracts interactive indicators such as comment delay, longest comment chain, subtree volume, and node density. Then, in the model training module, the above multi-level feature vectors and labels are integrated into a training dataset. A classification model is then trained on this dataset using a deep learning algorithm and output performance indicators. The large model interaction interface module performs real-time data preprocessing and feature extraction on newly published posts, loads the trained model and generates hot / common prediction labels. Finally, the demonstration and evaluation module demonstrates the model effect through a comparison chart of the accuracy of typical test samples and different feature combinations. Among them, the multi-level and multi-dimensional feature fusion framework from statistical analysis, semantic emotions to topological interactive structures can enable the model to accurately predict the popularity of subsequent posts when the early data of posts is scarce, significantly improving the speed of discovering potential hotspots and the timeliness of pushing them, solving the problem of the decline in predictive ability of traditional explicit features when data is insufficient, and at the same time solving the problems of delayed discovery of hot events, untimely information push and difficult guidance.
[0012] A first aspect of the present invention relates to a method for predicting the popularity of posts on a social platform, comprising the following steps:
[0013] Step 1: Data acquisition and cleaning: By calling the interface provided by the social media platform, batch acquisition of user information and post comment data from social media is carried out in a pipelined manner. The acquired data is then cleaned and aligned to remove missing values and outliers.
[0014] Step 2: Generate statistical participation features: Perform numerical processing on the cleaned and aligned comment data, including extracting indicators such as the number of likes, like rate, and commenter credit score within a short-term window. Calculate the total number of likes, like rate, commenter post credit score, and the average of the comment credit score. Use the processing results to generate an embedding vector for the statistical participation features.
[0015] Step 3: Generate semantic sentiment features: Use the pre-trained large model to perform deep semantic analysis on all comment texts. First, use the large model to perform sentiment classification, calculate the sentiment score of each comment, and calculate the overall average sentiment value. Next, calculate the average length and controversy rate of the comments. Then, based on the sentence vectors generated by the large model, calculate the cosine similarity between the comment and its parent comment. Finally, output the above results as a semantic sentiment feature embedding vector.
[0016] Step 4: Generate topological interaction features: Use graph analysis technology to construct a directed graph of comment interactions. Treat the comment interaction structure as a multi-branch tree structure. Use the difference between the comment time and the post time to calculate the average comment delay, calculate the weighted average longest comment chain of all first-level comment sets, and count the total number of nodes in each subtree to obtain the average volume and weighted average node density. Finally, generate the topological interaction feature embedding vector;
[0017] Step 5: Model training: Merge the statistical participation feature vector, semantic sentiment feature vector, and topological interaction feature vector by field, and generate a binary classification label of "hot / common" based on the total number of comments threshold. Combine the multi-level feature vectors and labels into a training dataset. Then, call the deep learning model for model training, output performance indicators such as accuracy and F1 score in real time, and serialize and save the trained model.
[0018] Step 6: Use the large model interactive interface to perform semantic correlation analysis between the user's current question and historical conversation records. After collecting comment data for newly published posts in real time, the modules of Steps 1 to 4 are automatically combined for FunctionCalling. The generated feature vector is input into the model trained in Step 5, and the "hot / common" label and corresponding probability are returned for use by the front-end system.
[0019] Step 7, Examples and Evaluation: This module selects test posts and conducts batch prediction experiments under different feature configurations. It demonstrates model performance through visualizations such as accuracy comparison charts and analyzes the effect of multi-level feature fusion on improving prediction results based on actual cases.
[0020] Preferably, the batch acquisition of user information and post comment data and cleaned data in social media in step 1 includes the following steps:
[0021] Step 1.1: Continuously obtain user information and post comment data from social media within a predetermined time period (e.g., 8 hours) in a pipelined manner. The pipelined manner refers to continuously obtaining user and comment data for newly posted posts on social media at each moment within the predetermined time period using an application programming interface (API).
[0022] Step 1.2: Perform data cleaning and alignment on the acquired post data. Data cleaning involves deleting posts that are not published within the scheduled time, are blocked by administrators, and so on, to eliminate missing values and outliers. Data alignment involves dividing posts published at different time points into scheduled moments using a unified time window (e.g., a unified division into 8 moments) to ensure uniformity in post publishing time and processability of post data.
[0023] Preferably, in step 2, calculating the statistical convergence of data such as the number of likes, like rate, and user credit score within a short window after the post is published to obtain statistical participation features includes the following steps:
[0024] Step 2.1: Extract comment attribute features from the post comment data, where the comment attribute features include the total number of likes (total_score) and the upvote_ratio of the post;
[0025] Step 2.2: Extract user attribute features from the comment user information, where the user attribute features include the credit score of the post posted by the i-th user post_karma i 、The credit score of the i-th user who posted a comment comment_karma i , average the post credit scores and comment credit scores of all users in the post, and get the average post credit score of all users in the post, post_karma_avg:
[0026]
[0027] The average credit score of all users who posted comments in the post is comment_karma_avg:
[0028]
[0029] Where M is the number of all comments in the post;
[0030] Preferably, in step 3, the sentiment value and text similarity of the comment text are calculated using a pre-trained deep learning model to obtain semantic sentiment features, including the following steps:
[0031] Step 3.1: Determine whether the comment i is controversial. i (1 means controversial, 0 means non-controversial), calculate the controversiality_ratio of the post's comments:
[0032]
[0033] Where M is the number of all comments in the post;
[0034] Step 3.2: Extract text features from the post comment data, where the text features include the length of the i-th comment word comment_length i , calculate the average word length comment_length_avg for all comments in the post:
[0035]
[0036] Where M is the number of all comments in the post;
[0037] Step 3.3: For each comment data in the post, use the twitter-roberta-base-sentiment-latest model to perform sentiment analysis to obtain the sentiment value sentiment_score of the i-th comment i (where sentiment_score i (A decimal between -1 and +1, the closer to -1 the more negative the comment, the closer to +1 the more positive the comment), calculate the average sentiment value sentiment_score_avg for all comments on the post:
[0038]
[0039] Where M is the number of all comments in the post;
[0040] Step 3.4: Use the SentenceTransformer library function to calculate the embedding vector of the current comment and the parent comment, and then calculate the cosine similarity between the two comments, and finally get the textual similarity of the i-th comment textual_similarity i , calculate the average textual similarity of all comments on the post to get textual_similarityi_avg:
[0041]
[0042] Where M is the number of all comments in the post;
[0043] Preferably, in step 4, a directed graph of comment interaction is constructed using graph analysis technology, and the comment interaction structure is regarded as a multi-branch tree structure to obtain topological interaction features, which includes the following steps:
[0044] Step 4.1: Extract user behavior features from comment user information, where user behavior features include post publishing time (in seconds) submission_created_time(sct), comment posting time (in seconds) comment_created_time i(cct i ), the average time difference between all comments and posts (in minutes) comment_slapsed_time_avg(ceta):
[0045]
[0046] Where M is the number of all comments in the post;
[0047] Step 4.2: From the interaction pattern of post comments, we know that all comments on each post form a directed graph structure. Since each comment has only one parent comment, the directed graph structure can be equivalent to a multiway tree structure. That is, each set of first-level comments (first-level comments and their subcomments) can form a multiway tree, and all the first-level comments on each post can form a forest (a collection of multiway trees). Therefore, the deep interaction features mined from the comment interaction structure using directed graph analysis technology include:
[0048] (1) The weighted average of the longest comment chain of all first-level comment sets of a post: top_level_comment_sets_depth_weighted_avg(tlcsdwa):
[0049]
[0050] Where N is the number of first-level comment sets in the post, comment_depth i is the comment level of the i-th comment, max_depth i For the i-th level comment set top_level_comment_set i The longest comment chain:
[0051] max_depth i =max(comment_depth j ),j∈top_level_comment_set i , weight i For the weight of the i-th level review set, give higher weights to polytrees with greater depth, thereby increasing their contribution to the average. The weight can be set based on the depth of the polytree, with greater depth giving higher weights. For example, the weight can be set to the depth.
[0052] (2) The average volume of all first-level comments on a post
[0053] top_level_comment_sets_volume_avg(tlcsva):
[0054]
[0055] Where N is the number of first-level comment sets in the post, and the volume of the i-th first-level comment set is top_level_comment_set_volume i (tlcsv i ):
[0056]
[0057] (3) The weighted average of the node density of all first-level comment sets of the post top_level_comment_sets_node_density_weighted_avg(tlcsndwa):
[0058]
[0059] Where N is the number of first-level comment sets in the post, and the number of comments in the i-th first-level comment set is top_level_comment_set_number i (tlcsn i ):
[0060] tlcsn i =count(top_level_comment_set i ) (11)
[0061] Among them, the node density of the i-th level comment set node_density i (nd i ):
[0062]
[0063] Preferably, in step 5, the samples are labeled as "hot events" and "normal events", and a social media post popularity prediction model is obtained by training based on the extracted multi-level feature vectors and their labels, including the following steps:
[0064] Step 5.1: Label the samples by labeling posts with a total number of comments (total_comments ≥ 200) as popular events (labeled 1), and posts with a total number of comments (total_comments < 200) as normal events (labeled 0).
[0065] Step 5.2: Integrate the multi-level features and their labels obtained from steps 2 to 4 into a CSV file;
[0066] Step 5.3: Build a deep learning model based on multi-level feature vectors and divide the CSV file containing feature vectors and labels into training and test sets.
[0067] Step 5.4: Call the deep learning model for model training, output performance indicators such as accuracy and F1 score in real time, and serialize and save the trained model.
[0068] Preferably, in step 6, the user interacts with the large language model to perform real-time post popularity analysis, including the following steps:
[0069] Step 6.1: Identify user intent through user prompts, then call the large model to perform semantic correlation analysis on the user's current question and historical conversation records, extract user intent features, and map user intent to the corresponding business processing workflow.
[0070] Step 6.2: After collecting comment data for newly published posts in real time, automatically combine the modules of Steps 1 to 4 for Function Calling, input the generated feature vector into the model trained in Step 5, and return the "hot / common" label and corresponding probability for use by the front-end system.
[0071] Preferably, in step 7, analyzing and evaluating the newly published posts and visually displaying them includes the following steps:
[0072] Step 7.1: Select test posts and conduct batch prediction experiments under different feature configurations. Demonstrate model performance through visualizations such as accuracy comparison charts, and analyze the effect of multi-level feature fusion on improving prediction results based on actual cases.
[0073] A second aspect of the present invention relates to a system for predicting the popularity of posts on a social platform, comprising:
[0074] Data acquisition and cleaning module, statistical participation feature module, semantic emotion feature module, topological interaction feature module, model training module, large model interaction interface module, example and evaluation module;
[0075] The data acquisition and cleaning module is used to obtain user information and post comment data from social media within a predetermined time in a pipeline manner; and to perform data cleaning and data alignment on the obtained post data. Data cleaning refers to deleting posts that are less than the predetermined time or have been banned by administrators to eliminate missing values and outliers. Data alignment refers to dividing posts published at different time points each day into predetermined time periods using a unified time window to facilitate subsequent processing of post and comment data.
[0076] The statistical participation feature module is used to calculate the statistical convergence of the comment data within a short window after the post is published and extract the statistical participation feature vector;
[0077] The semantic sentiment feature module uses a pre-trained deep learning model to calculate the sentiment value and text similarity of the comment text to obtain a semantic sentiment feature vector;
[0078] The topological interaction feature module uses graph analysis technology to construct a directed graph of comment interaction, treating the comment interaction structure as a multi-branch tree structure to obtain a topological interaction feature vector;
[0079] The model training module is used to label samples and integrate feature vectors and labels into a CSV file; then a deep learning model based on multi-level features is constructed, and the CSV file containing features and labels is divided into a training set and a test set and trained using the model;
[0080] The large model interaction interface module is used for users to interact with the large language model to perform real-time post popularity analysis;
[0081] The example and evaluation module is used to analyze and evaluate newly published posts and to perform visual presentation.
[0082] The working principle of the present invention is:
[0083] Users communicate with the large language model interaction interface module through natural language prompts. The model first performs semantic association analysis on user intentions, and then calls the data acquisition and cleaning module, statistical participation feature module, semantic sentiment feature module and topological interaction feature module in sequence in the form of FunctionCalling. It extracts numerical indicators such as the number of likes on a post within a short time window and the credit score of the commenting user, respectively. Based on the pre-trained large model, it performs sentiment scoring and vector similarity analysis on the comment text, and models the comment-reply relationship as a multi-branch tree to extract structured interaction indicators such as average delay, longest chain depth, subtree volume and node density. The three types of feature vectors are then fused and input into the model training module, and finally output "hot / common" labels and probabilities. The example and evaluation module generates a visual report. The reason why we can maintain high-precision prediction results when post data is scarce in the early stage is that: (1) the three-dimensional features of statistics, semantic sentiment and topological interaction complement each other, reflecting both basic engagement and capturing deep content emotions and interactive structures; (2) the large language model can identify subtle emotional tendencies and contextual coherence in semantic sentiment analysis; (3) the modular architecture and FunctionCalling make each module independent, scalable and support flexible human-computer dialogue, thus taking into account prediction accuracy, real-time and explainability.
[0084] The innovative features of the present invention are:
[0085] Innovation 1: Multi-level feature fusion framework to achieve high-precision prediction under the condition of early data scarcity. This invention proposes to integrate the features of three dimensions, namely "statistical participation features", "semantic sentiment features" and "topological interaction features", into a multi-level fusion to form a multi-level feature extraction system. When a post is just published and the number of comments is very small, the traditional method that relies solely on explicit behavior or attribute features often leads to unstable predictions due to the scarcity of samples. However, this invention: (1) Statistical participation features: extract numerical indicators such as the number of likes, like rate and average credit score of commenting users in a short-term window to quickly reflect the basic participation; (2) Semantic sentiment features: call the pre-trained large model to perform sentiment classification, dispute rate, average comment length and cosine similarity analysis based on sentence vectors on the comment text, effectively capturing the "emotion" and "similarity" information at the content level; (3) Topological interaction features: construct the comment-reply relationship into a multi-branch tree, extract structured interaction indicators such as average delay, weighted longest comment chain, subtree volume and node density, and characterize the deep-level propagation pattern of user interaction. Through the collaboration of the above three types of features, the model can still capture multi-dimensional information when the number of comments is very small, effectively improving the accuracy of early predictions.
[0086] Innovation point 2: Deep semantic sentiment analysis capability based on a large model. Unlike existing technologies that only perform shallow word frequency or sentiment dictionary analysis, this invention uses the following in the semantic sentiment feature module: (1) It calls a pre-trained large language model to perform deep semantic analysis on each comment, not only calculating the sentiment score, but also generating sentence vectors for context similarity calculation, which can identify subtle emotional tendencies and the coherence between comments; (2) It combines the controversy rate and average sentiment to evaluate the "emotional score" and "topic controversy" of the post. When the controversy is high and the sentiment fluctuates extremely, it often indicates a potential hot spot; (3) The multi-dimensional embedding vector output by this module, after being fused with statistical and topological features, further enhances the model's sensitivity to semantic signals and predictive interpretability. This innovation improves the ability to mine the deep meaning of comment content and overcomes the shortcomings of traditional features, such as strong feature dependence and weak semantic expression ability.
[0087] Innovation point three: Modular architecture and large model interactive interface, realizing intelligent human-computer dialogue and flexible calling. The system of the present invention is designed to be highly modular. Each functional module can run independently and be dynamically called by the large language model through Function Calling: (1) Modular design: Modules such as data acquisition and cleaning, feature extraction at all levels, model training, large model interactive interface and example evaluation have clear division of labor. They can be debugged separately or deployed in parallel, which is convenient for expansion and maintenance; (2) Large model interactive interface: Through natural language prompts, user intentions are analyzed, and the corresponding module pipeline processing is automatically triggered, and finally the "hot / common" label and probability are returned; (3) Intelligent reporting and strategy recommendations: Combined with the example and evaluation modules, the system not only outputs the prediction results, but also generates visual comparison charts and personalized analysis reports, providing operators with data-driven push and guidance strategies in real time. This innovation not only greatly improves the automation and intelligence of the system, but also enhances the human-computer interaction experience and the interpretability of the prediction results, meeting the needs of real-time decision-making and personalization.
[0088] The advantages of the present invention are: integrating large language model technology with multi-level feature extraction methods, building an intelligent modular prediction system, achieving high-precision popularity prediction, and being able to interact naturally with users, providing analysis reports and decision-making suggestions, and effectively solving the problems of delayed discovery of hot events, untimely information push and difficult guidance. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] The accompanying drawings are used to provide an intuitive description of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention.
[0090] Figure 1 It is a schematic flow diagram of the method of the present invention;
[0091] Figure 2 This is a schematic diagram of continuously collecting user information and post comment data from Reddit social media in the form of a pipeline of the present invention, and performing data cleaning and data alignment operations on the acquired post data;
[0092] Figure 3 This is a schematic diagram of the large model of the present invention calling the deep learning model for training;
[0093] Figure 4 This is a comparison chart of the classification accuracy of the deep learning model of the present invention. DETAILED DESCRIPTION
[0094] The following examples are used to illustrate the present invention in more detail, and the technical methods and advantages of the present invention are described together with the examples of the present invention. The specific examples described herein are only used to illustrate the present invention and do not constitute a limitation of the present invention.
[0095] Example 1
[0096] This embodiment relates to a method for predicting the popularity of posts on a social platform.
[0097] With the internet becoming the primary channel for information dissemination, the rapid development of social platforms has not only changed how people access information but also significantly increased the speed and reach of information dissemination. In this context, traditional approaches rely on analyzing explicit features such as user attributes and behavior in social networks to build predictive models to predict topic popularity. However, when posts are newly published and the data size is minimal, these explicit features are often scarce and fluctuate wildly, resulting in unrepresentative statistical results and a significant decrease in the model's predictive accuracy in the early stages. A multi-level feature extraction system, utilizing statistical participation features, semantic sentiment features, and topological interaction features, is used to predict post popularity. This approach leverages the immediacy, community nature, and rapid update characteristics of social networks. This approach is specifically optimized for scenarios with limited data, enabling the model to accurately predict subsequent post popularity even when early data is scarce. By comprehensively analyzing user interactions, comment content, and their hierarchical relationships, it not only proactively captures changes in information dissemination but also efficiently identifies potential hot topics.
[0098] Taking the implementation of the method of the present invention in the worldnews, news, and europe communities of the Reddit platform from July 1, 2024 to February 28, 2025 as an example, the process of implementing data collection, post popularity prediction, and accuracy verification is as follows.
[0099] See also Figure 1 The technical solution provided by the present invention is: a method for predicting the popularity of posts on a social platform comprises the following steps:
[0100] Step 1: Data acquisition and cleaning, used in pipeline form (such as Figure 2 ) Obtain user information and post comment data from Reddit social media within 8 hours. The PRAW API is used to continuously obtain user and comment data for newly posted posts at each moment in the three communities of worldnews, news, and europe on Reddit social media, including a total of 3,881 posts from July 1, 2024 to February 28, 2025. The obtained post data is then cleaned and aligned. Data cleaning refers to deleting posts that are less than 8 hours old and have been banned by administrators to eliminate missing values and outliers. Data alignment refers to dividing posts published at different times of the day into 8 moments using a unified time window to facilitate the processing of subsequent post and comment data.
[0101] Step 2: Generate statistical participation features, which are used to calculate the statistical convergence of comment data within a short window after the post is published, and extract statistical participation features. The statistical participation features include: total number of likes on the post (total_score), upvote_ratio of the post (upvote_ratio), average credit score of all users posting posts in the post (post_karma_avg), and average credit score of all users commenting on the post (comment_karma_avg).
[0102] Step 3: Generate semantic sentiment features. Use the pre-trained deep learning model to calculate the sentiment value and text similarity of the comment text to obtain semantic sentiment features. The semantic sentiment features include: the comment controversy rate (controversiality_ratio), the average word length (comment_length_avg) of all comments on the post, the average sentiment value (sentiment_score_avg) of all comments on the post, and the average textual similarity (textual_similarity_avg) of all comments on the post.
[0103] Step 4. Generate topological interaction features. Use graph analysis technology to construct a directed graph of comment interactions. Treat the comment interaction structure as a multi-branch tree structure to obtain topological interaction features, where the topological interaction features include: the average time difference between all comments and posts (ceta), the weighted average of the longest comment chain of all first-level comment sets of a post (tlcsdwa), the average volume of all first-level comment sets of a post (tlcsva), and the weighted average of the node density of all first-level comment sets of a post (tlcsndwa).
[0104] Step 5: Model training is used to label samples. The method is: posts with a total number of comments greater than or equal to 200 are regarded as popular events (labeled as 1), and posts with a total number of comments less than 200 are regarded as normal events (labeled as 0). Multi-level feature vectors (statistical participation feature vectors, semantic sentiment feature vectors, and topological interaction feature vectors) and labels are integrated into csv files. Then a random forest model based on multi-level features is constructed, and the csv file containing features and labels is divided into training and test sets in a ratio of 7:3 and the model is trained. The random forest model is a machine learning technology. Its core is to integrate multiple different classifiers through decision optimization or coverage optimization to finally generate an optimal solution to improve overall performance. Its operation process is as follows: Figure 3As shown in the figure, in the random forest classification process, each decision tree acts as an independent classifier. For each input sample, all decision trees produce their own classification results, ultimately using a voting mechanism to determine the most frequently occurring category as the model's predicted output. During the model training phase, the random forest algorithm in Python is used to train and classify the data. For binary classification prediction tasks, appropriate strategies are employed to handle the potential discontinuous predictions of random forests, ensuring the model's good generalization ability when dealing with unseen data.
[0105] Step 6: Use the large model interactive interface to perform semantic correlation analysis between the user's current question and historical conversation records. After collecting comment data for newly published posts in real time, the modules of Steps 1 to 4 are automatically combined for FunctionCalling. The generated feature vector is input into the model trained in Step 5, and the "hot / common" label and corresponding probability are returned for use by the front-end system.
[0106] When a user enters "Please help me predict the popularity of a newly published post titled 'The Atlantic is cooling at record speed and nobody knows why' in the eighth hour," the large model interaction interface module first performs semantic parsing on the prompt, extracting the "post title," "predicted time is the eighth hour," and "hot / common" intents. It then generates a call plan consisting of five function calls: The data acquisition and cleaning module pulls and cleans comment data from the post's publication up to the eighth hour, returning the post data; the statistical participation feature module is then called in sequence to calculate metrics such as the cumulative number of likes, like rate, and user credit score, returning a statistical participation feature vector; the semantic sentiment feature module is called to calculate the average sentiment score, comment length, controversy rate, and text similarity, returning a semantic sentiment feature vector; the topological interaction feature module is called to calculate the average latency, weighted maximum depth, subtree volume, and weighted node density, returning a topological interaction feature vector; and finally, the trained random forest model is loaded, the three feature vectors are concatenated, and inference is performed to output a "hot" or "common" label and the corresponding probability. After collecting the results returned by all modules, the large model assembles the "popular / common" judgment results and probability values into a natural language answer and returns it to the front-end page.
[0107] Step 7, Example and Evaluation, uses the trained random forest model to predict the popularity of newly published posts. For example, a post titled "The Atlantic is cooling at record speed and nobody knows why" has a popularity (total number of comments) of 113 two hours after it was published. The model predicts it as a trending event. Eight hours later, the popularity is 1312, so the model's prediction of this as a trending event is correct. After multiple parameter tunings, when using 1000 weak classifiers, the model's accuracy reached 0.9218. The final prediction results are as follows: Figure 4 The first column shows the accuracy of 0.8591 for predictions using only statistical participation features; the second column shows the accuracy of 0.8643 for predictions using only semantic sentiment features; the third column shows the accuracy of 0.8952 for predictions using only topological interaction features; and the fourth column shows the accuracy of 0.9218 for predictions using multi-level features. The prediction results show that using multi-level features to predict post popularity significantly improves accuracy, further demonstrating that multi-level feature-based methods can more comprehensively extract deep features from posts, providing stronger support for improving the accuracy of post popularity predictions.
[0108] Example 2
[0109] This embodiment relates to a system for predicting the popularity of posts on a social platform, including:
[0110] Data acquisition and cleaning module, statistical participation feature module, semantic emotion feature module, topological interaction feature module, model training module, large model interaction interface module, example and evaluation module;
[0111] The data acquisition and cleaning module is used to obtain user information and post comment data from social media within a predetermined time in a pipeline manner; and to perform data cleaning and data alignment on the obtained post data. Data cleaning refers to deleting posts that are less than the predetermined time or have been banned by administrators to eliminate missing values and outliers. Data alignment refers to dividing posts published at different time points each day into predetermined time periods using a unified time window to facilitate subsequent processing of post and comment data.
[0112] The statistical participation feature module is used to calculate the statistical convergence of the comment data within a short window after the post is published and extract the statistical participation feature vector;
[0113] The semantic sentiment feature module uses a pre-trained deep learning model to calculate the sentiment value and text similarity of the comment text to obtain a semantic sentiment feature vector;
[0114] The topological interaction feature module uses graph analysis technology to construct a directed graph of comment interaction, treating the comment interaction structure as a multi-branch tree structure to obtain a topological interaction feature vector;
[0115] The model training module is used to label samples and integrate feature vectors and labels into a CSV file; then a deep learning model based on multi-level features is constructed, and the CSV file containing features and labels is divided into a training set and a test set and trained using the model;
[0116] The large model interaction interface module is used for users to interact with the large language model to perform real-time post popularity analysis;
[0117] The example and evaluation module is used to analyze and evaluate newly published posts and to perform visual presentation.
[0118] The above descriptions are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the ideas and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for predicting the popularity of posts on a social platform, characterized in that: The following steps are involved: Step 1: Data acquisition and cleaning: By calling the interface provided by the social media platform, batch acquisition of user information and post comment data from social media is carried out in a pipelined manner. The acquired data is then cleaned and aligned to remove missing values and outliers. Step 2: Generate statistical participation features: Perform numerical processing on the cleaned and aligned comment data, including extracting indicators such as the number of likes, like rate, and commenter credit score within a short-term window. Calculate the total number of likes, like rate, and the average of the commenter's post credit score and comment credit score. Use the processing results to generate an embedding vector for the statistical participation features. Step 3: Generate semantic sentiment features: Use the pre-trained large model to perform deep semantic analysis on all comment texts. First, use the large model to perform sentiment classification, calculate the sentiment score of each comment, and calculate the overall average sentiment value. Next, calculate the average length and controversy rate of the comments. Then, based on the sentence vectors generated by the large model, calculate the cosine similarity between the comment and its parent comment. Finally, output the above results as a semantic sentiment feature embedding vector. Step 4: Generate topological interaction features: Use graph analysis technology to construct a directed graph of comment interactions. Treat the comment interaction structure as a multi-branch tree structure. Use the difference between the comment time and the post time to calculate the average comment delay, calculate the weighted average longest comment chain of all first-level comment sets, and count the total number of nodes in each subtree to obtain the average volume and weighted average node density. Finally, generate the topological interaction feature embedding vector; Step 5: Model training. The statistical participation feature vector, semantic sentiment feature vector, and topological interaction feature vector are merged by field. A binary "hot / common" label is generated based on the total number of comments threshold. The multi-level feature vectors and labels are integrated into a training dataset. The deep learning model is then used for model training, with performance indicators such as accuracy and F1 score output in real time. The trained model is then serialized and saved. Step 6: The large model interaction interface provides a standardized interaction interface with the large language model. It performs semantic correlation analysis between the user's current question and historical conversation records. It collects comment data from newly published posts in real time, automatically combines steps 1 to 4, and calls the function. The generated feature vector is input into the model trained in step 5, and the "hot / common" label and corresponding probability are returned for use by the front-end method. Step 7: Examples and Evaluation. Select test posts and conduct batch prediction experiments under different feature configurations. Demonstrate model performance through visualizations such as accuracy comparison charts. Analyze the effect of multi-level feature fusion on improving prediction results based on actual cases.
2. A method for predicting the popularity of social platform posts according to claim 1, characterized in that: The batch acquisition of user information and post comment data from social media described in step 1 includes the following steps: Step 1.1: Continuously obtain user information and post comment data from social media within a predetermined timeframe using a pipeline. The pipeline refers to continuously obtaining user and comment data for each newly posted post on social media within a predetermined timeframe using an application programming interface (API). Step 1.2: Perform data cleaning and data alignment on the obtained post data. Data cleaning refers to deleting posts that do not meet the requirements to eliminate missing values and outliers; data alignment refers to dividing posts published at different time points into predetermined moments using a unified time window to ensure the uniformity of post publishing time and the processability of post data.
3. The method for predicting the popularity of social platform posts according to claim 1, characterized in that: The statistical convergence of the number of likes, like rate, and user credit score data in the short-term window after the post is published in step 2 is calculated to obtain the statistical participation characteristics, including the following steps: Step 2.1: Extract comment attribute features from the post comment data, where the comment attribute features include the total number of likes (total_score) and the upvote_ratio of the post; Step 2.2: Extract user attribute features from the comment user information, where the user attribute features include the credit score of the post posted by the i-th user post_karma i 、The credit score of the i-th user who posted a comment comment_karma i , average the post credit scores and comment credit scores of all users in the post, and get the average post credit score of all users in the post, post_karma_avg: The average credit score of all users who posted comments in the post is comment_karma_avg: Where M is the number of all comments in the post.
4. The method for predicting the popularity of social platform posts according to claim 1, characterized in that: The method described in step 3 uses the pre-trained deep learning model to calculate the sentiment value and text similarity of the comment text to obtain the semantic sentiment features, including the following steps: Step 3.1: Determine whether the comment i is controversial. i , 1 means controversial, 0 means non-controversial, and the controversiality_ratio of the post's comments is calculated: Where M is the number of all comments in the post; Step 3.2: Extract text features from the post comment data, where the text features include the length of the i-th comment word comment_length i , calculate the average word length comment_length_avg for all comments in the post: Where M is the number of all comments in the post; Step 3.3: For each comment data in the post, use the twitter-roberta-base-sentiment-latest model to perform sentiment analysis to obtain the sentiment value sentiment_score of the i-th comment i , where sentiment_score i It is a decimal between -1 and +1. The closer it is to -1, the more negative the comment is, and the closer it is to +1, the more positive the comment is. The average sentiment value sentiment_score_avg is calculated for all comments on the post: Where M is the number of all comments in the post; Step 3.4: Use the SentenceTransformer library function to calculate the embedding vector of the current comment and the parent comment, and then calculate the cosine similarity between the two comments, and finally get the textual similarity of the i-th comment textual_similarity i , calculate the average textual similarity of all comments on the post to get textual_similarity_avg: Where M is the number of all comments in the post.
5. The method for predicting the popularity of social platform posts according to claim 1, characterized in that: The method described in step 4 uses graph analysis technology to construct a directed graph of comment interactions, treating the comment interaction structure as a multi-branch tree structure to obtain topological interaction features, including the following steps: Step 4.1: Extract user behavior features from comment user information, where user behavior features include post publishing time sct, i-th comment publishing time cct i , the average time difference between all comments and posts published ceta: Where M is the number of all comments in the post; Step 4.2: From the interaction pattern of post comments, we know that all comments on each post form a directed graph structure. Since each comment has only one parent comment, the directed graph structure can be equivalent to a multiway tree structure. That is, each set of first-level comments forms a multiway tree, and all the first-level comments on each post form a forest. The deep interaction features mined from the comment interaction structure using directed graph analysis technology include: (1) The weighted average of the longest comment chain of all first-level comment sets of a post: Where N is the number of first-level comment sets in the post, comment_depth i is the comment level of the i-th comment, max_depth i For the i-th level comment set top_level_comment_set i The longest comment chain: max_depth i =max(comment_depth j ),j∈top_level_comment_set i , weight i For the weight of the i-th level review set, give higher weights to multi-branch trees with greater depth, so that their contribution to the average value increases; the weight can be set according to the depth of the multi-branch tree, and the deeper the depth, the higher the weight; (2) The average volume of all first-level comments on a post top_level_comment_sets_volume_avg(tlcsva): Where N is the number of first-level comment sets in the post, and the volume of the i-th first-level comment set is tlcsv i : (3) The weighted average of the node density of all first-level comment sets of the post top_level_comment_sets_node_density_weighted_avg(tlcsndwa): Where N is the number of first-level comment sets in the post, and the number of comments in the i-th first-level comment set is tlcsn i : tlcsn i =count(top_level_comment_set i ) The node density of the i-th level review set node_density i (nd i ):
6. The method for predicting the popularity of social platform posts according to claim 1, characterized in that: As described in step 5, the samples are labeled as "hot events" and "normal events". The social media post popularity prediction model is trained based on the extracted multi-level features and their labels. The prediction model is used to predict the popularity of newly published posts, including the following steps: Step 5.1: Label the samples by labeling posts with a total number of comments (total_comments) ≥ 200 as popular events with a label of 1, and posts with a total number of comments < 200 as normal events with a label of 0. Step 5.2: Integrate the multi-level features and their labels obtained from steps 2 to 4 into a CSV file; Step 5.3: Build a machine learning model based on multi-level features, divide the CSV file containing features and labels into training and test sets, and train the model; Step 5.4: Use the trained machine learning model to predict the popularity of newly published posts.
7. The method for predicting the popularity of social platform posts according to claim 1, characterized in that: The user described in step 6 interacts with the large language model to perform real-time post popularity analysis, including the following steps: Step 6.1: Identify user intent through the user prompt. Then, use the large model to perform semantic correlation analysis between the user's current question and historical conversation records, extract user intent features, and map the user intent to the corresponding business processing workflow. Step 6.2: After collecting comment data for newly published posts in real time, automatically combine the modules from Steps 1 to 4 for function calling. Input the generated feature vector into the model trained in Step 5, and return the "hot / common" label and corresponding probability for use by the front-end method.
8. The method for predicting the popularity of social platform posts according to claim 1, characterized in that: The analysis and evaluation of newly published posts and their visualization described in step 7 include the following steps: We selected test posts and conducted batch prediction experiments under different feature configurations. We demonstrated the model performance through visualizations such as accuracy comparison charts, and analyzed the effect of multi-level feature fusion on improving prediction results based on actual cases.
9. A system for predicting the popularity of social platform posts according to any one of claims 1 to 8, characterized in that: include: Data acquisition and cleaning module, statistical participation feature module, semantic emotion feature module, topological interaction feature module, model training module, large model interaction interface module, example and evaluation module; The data acquisition and cleaning module is used to obtain user information and post comment data from social media within a predetermined time in a pipeline manner; and to perform data cleaning and data alignment on the obtained post data. Data cleaning refers to deleting posts that are less than the predetermined time or have been banned by administrators to eliminate missing values and outliers. Data alignment refers to dividing posts published at different time points each day into predetermined time periods using a unified time window to facilitate subsequent processing of post and comment data. The statistical participation feature module is used to calculate the statistical convergence of the comment data within a short window after the post is published and extract the statistical participation feature vector; The semantic sentiment feature module uses a pre-trained deep learning model to calculate the sentiment value and text similarity of the comment text to obtain a semantic sentiment feature vector; The topological interaction feature module uses graph analysis technology to construct a directed graph of comment interaction, treating the comment interaction structure as a multi-branch tree structure to obtain a topological interaction feature vector; The model training module is used to label samples and integrate feature vectors and labels into a CSV file; then a deep learning model based on multi-level features is constructed, and the CSV file containing features and labels is divided into a training set and a test set and trained using the model; The large model interaction interface module is used for users to interact with the large language model to perform real-time post popularity analysis; The example and evaluation module is used to analyze and evaluate newly published posts and to perform visual presentation.
Citation Information
Patent Citations
Method and system for predicting social network information popularity on basis of user characteristics
CN104281882A
Topic hotness prediction method and system
CN106503209A
Cited By
User role analysis method and system in network community
CN121256595A
