Social media data mining method based on user behavior analysis
Through the dynamic modeling method based on BERT data conversion and BiGRU-Attention network, the problem of multimodal data modeling in social media data mining is solved, and efficient understanding of user behavior and accurate recommendations are achieved.
Patent Information
- Application Number
- CN202510699944.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-05-28
AI Technical Summary
Existing social media data mining methods find it difficult to capture the semantic motivations behind user behavior and are unable to effectively unify multimodal data modeling, resulting in biased interest understanding and delayed recommendations.
Data conversion is performed through BERT-based natural language processing technology, combined with context completion and dependency structure graph mining to construct temporal and content feature representations of user behavior. The BiGRU-Attention network is used for intent recognition and dynamic modeling of user behavior.
It improves the data adaptation efficiency and the sensitivity of user behavior prediction, can respond to short-term interest fluctuations in a timely manner, and improves the accuracy of recommendations and analysis.
Smart Images

Figure CN120632201A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data mining, and in particular relates to a social media data mining method based on user behavior analysis. Background Art
[0002] With the prevalence of social media, users generate a large amount of behavioral data on the platforms, such as browsing, liking, commenting, and forwarding. These behaviors contain potential interest tendencies and social relationship information, and are an important foundation for recommendation systems and public opinion analysis. Existing mining methods often rely on content keywords or historical tags for modeling, which makes it difficult to capture the semantic motivations behind behaviors, resulting in biased understanding of interests. In addition, social behavior data is highly heterogeneous and has inconsistent modal distributions, making it difficult for traditional methods to uniformly model and integrate analysis. More importantly, user interests have obvious dynamic evolution characteristics. Existing methods are mostly static modeling, which is difficult to adapt to short-term behavioral fluctuations and relationship mutations, resulting in recommendation lags and analysis failures. Therefore, a user behavior analysis method that supports multimodal fusion and dynamic modeling is urgently needed to improve the accuracy of social media data mining. Summary of the Invention
[0003] In response to the technical problems existing in the above background technologies, the present invention proposes a social media data mining method based on user behavior analysis.
[0004] In order to achieve the above object, the technical solution adopted by the present invention includes the following steps:
[0005] S1. User data collection: Acquire multi-source behavioral data generated by user behavior from social media platforms in real time;
[0006] S2. Data conversion: Parse unstructured data, extract keyword phrases from multi-source behavioral data through natural language processing, and map the extracted keyword phrases to pre-set structured fields.
[0007] S3. Data preprocessing: Clean the data after data conversion to remove abnormal data;
[0008] S4. Constructing a temporal representation of behavior: Taking users as units, we construct behaviors into a behavior sequence in chronological order within a set time window, introduce a time-aware embedding vector, and form a temporal feature representation of user dynamic behavior changes;
[0009] S5. Content feature extraction and encoding: Extract perceptual features of behaviors by content within a set time window, taking users as units. Convert the behavioral content features into content representation vectors with unified dimensions.
[0010] S6. User intent recognition: Input the time series feature representation vector and content representation vector into the behavior intention recognition model to predict the user's future behavior probability value and drive personalized recommendations.
[0011] Preferably, the multi-source behavior data in step S1 includes text comments, like records, forwarding tracks, and browsing dwell time.
[0012] Preferably, the data conversion in step S2 is implemented as follows:
[0013] Conduct contextual completion modeling on collected user behavior data and use pre-trained language models to expand the contextual information of text fragments;
[0014] Extract keyword phrase candidate sets based on the contextual attention mechanism, integrate multiple feature factors such as word frequency, part of speech, dependency, and contextual semantic density, perform multi-dimensional scoring on candidate phrases, and screen out keyword phrases with user intent expression characteristics;
[0015] Perform syntactic analysis and dependency structure annotation on candidate keyword groups, and identify keyword group boundaries through graph structure traversal;
[0016] A matching confidence score is generated for the semantic mapping relationship between the keyword group and the structured field, and a confidence threshold is set. If the confidence threshold is exceeded, it means that the mapping structure is successful.
[0017] Preferably, the step S3 performs data cleaning on the data after the data conversion operation to remove abnormal data as follows:
[0018] First, BERT is used to calculate the semantic cosine similarity between the behavior and the user's historical behavior to obtain the semantic consistency measure S c ;
[0019] Based on the time point of the behavior, calculate whether the time interval falls within a reasonable fluctuation range and obtain the time series rationalization index T. c , where t i Indicates the timestamp of the current behavior, w is the preset time fluctuation window;
[0020] The behavior confidence score is obtained by weighted fusion of semantic consistency measurement and time series rationalization index. If the behavior confidence score is less than the preset threshold, the behavior is judged as an abnormal sample behavior and is deleted.
[0021] Preferably, the specific implementation of forming the temporal feature representation of the user's dynamic behavior changes in step S4 is as follows:
[0022] In the time window [tw,t], the behavior set B={b1,b2...bn}, where each line b i Extract behavior type, behavior intensity and behavior interval features; wherein the behavior type xl i Converted to vector e after hot encoding xl , behavior intensity xq i By normalization, we can get xq i ′, behavior interval Δt i =t i -t i-1 ;
[0023] Computational behavior b i Relative position within the time window where p i Represents the relative position, t i For behavior b i The event stamp of the occurrence of t is the end point of the time window, that is, the current time point; the time perception vector is generated by the sine cosine function Where d is the embedding dimension index and D is the total dimension;
[0024] e xl 、xq i ′、Δt i With TPE(p i ) are concatenated into a composite feature vector X i And through the recurrent neural network, the sequence X=[X1,X2,...,X n ] to model and output the hidden state sequence H;
[0025] Perform mean pooling on the hidden state sequence H to obtain the user time series feature representation vector S time .
[0026] Preferably, the specific implementation of the unified dimensional content representation vector in step S5 is as follows:
[0027] Within the time window [tw,t], BERT is used to extract text semantic vectors for the behavior content of each behavior
[0028] The behavior type vector e xl and behavioral intensity xq i ′, combined with text semantic vector Splice into multiple feature vectors
[0029] Generate interactive features through linear changes and activation functions Where W int Expressed as a weight matrix, b int Represented as a bias vector;
[0030] Project the interaction features of each behavior to a unified dimension Among them, W proj Expressed as projection matrix, b proj is the bias vector;
[0031] Finally, for all actions in the window Perform aggregation to generate user-level content representation vectors:
[0032] Preferably, the intention recognition model in step S6 is implemented using a BiGRU-Attention network structure.
[0033] Preferably, the intention recognition model outputs the behavior probability value in the following specific implementation:
[0034] First, the temporal feature representation vector and the content representation vector are input into the dual-channel encoder structure to extract the corresponding deep semantic features;
[0035] The output features of the two channels are spliced in a high-dimensional space and input into a fully connected fusion layer to generate a unified behavior state representation vector through feature compression and reconstruction;
[0036] The behavioral state representation vector is then input into the intention discrimination module containing the attention gating mechanism. This module adaptively adjusts the response intensity to different behavioral factors based on the feature weights.
[0037] Finally, the Softmax activation function is used to output the probability values of each behavior of the user within the predefined time window in the future.
[0038] Compared with the prior art, the advantages and positive effects of the present invention are:
[0039] During the data conversion phase, this paper introduces the BERT language model to implement contextual completion modeling, combines it with a dependency graph to mine keyword phrase boundaries, and designs a confidence scoring mechanism to automatically map unstructured data to structured fields. This solution is more robust and transferable than traditional manual rule extraction or static mapping based on TF-IDF, improving data adaptation efficiency.
[0040] 2. We propose concatenating the dual-channel encoded user behavior information into a fusion layer and then feeding it into a BiGRU-Attention structure for behavioral intent identification. Compared to a single RNN structure, this method possesses bidirectional memory capabilities. Combined with the attention mechanism, it dynamically adjusts the perceived weights of different behaviors, enhancing the model's responsiveness to key behavioral segments. This structure effectively improves the sensitivity and accuracy of user behavior prediction, addressing the issue of traditional models' inability to respond promptly to short-term interests.
[0041] 3. A bidirectional modeling approach, combining temporal representation of behavior and semantic representation of content, decouples the temporal trends of user behavior from the semantic drivers behind them, integrating them into a unified vector input intent recognition model. This architecture differs from traditional modeling approaches that rely solely on content or behavior labels. It simultaneously captures the dual correlations of behavior occurrences, improving the ability to model both short-term fluctuations in user interest and long-term behavioral inertia. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0043] Figure 1 This is an overall structural flow chart of a social media data mining method based on user behavior analysis. DETAILED DESCRIPTION
[0044] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.
[0045] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways than those described herein. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0046] Embodiment: With the widespread use of social media, users generate massive amounts of behavioral data, including browsing, liking, commenting, forwarding, etc. These data contain interest tendencies and social relationships, and are an important basis for recommendation systems and public opinion analysis. However, existing mining methods mostly rely on content keywords or historical tags for modeling, which makes it difficult to grasp the semantic motivations of behavior, resulting in deviations in understanding interests. At the same time, social behavior data is highly heterogeneous and has different modal distributions, making it difficult for traditional methods to unify modeling and fusion analysis. Moreover, the dynamic evolution of user interests is significant, and existing methods are mostly static modeling, which makes it difficult to adapt to short-term behavioral fluctuations and relationship mutations, resulting in delayed recommendations and ineffective analysis. Therefore, the present invention proposes a social media data mining method based on user behavior analysis, and the specific implementation steps are as follows: Figure 1 shown.
[0047] To achieve comprehensive awareness of multi-source user behavior, the method first acquires multi-source behavioral data generated by users on social media platforms in real time. This multi-source behavioral data includes text comments, likes, forwarding trajectories, and browsing time. To ensure data timeliness, behavioral events are streamed in real time, and behaviors are initially cached and marked based on event timestamps, providing time synchronization support for subsequent behavioral sequence modeling.
[0048] To transform the unstructured data from user behavior into processable structured semantic representations, a natural language processing technique based on pre-trained language models, such as BERT, is used to extract keyword phrases from the raw text and map them to structured fields. Specifically, context completion modeling is first performed on the collected user text behavior data. A pre-trained language model is used to predict the semantic context of the raw text fragments, filling in the implicit information within the text and generating a complete semantic path. This completed contextual representation allows for a more accurate understanding of the user's true intent within a limited word count. Secondly, a contextual attention mechanism is constructed based on the contextual representation. Each word in the sentence is used as the center of attention, and its attention weights relative to other words in the context are calculated to capture important semantic connections within the sentence. Combined with the contextual attention scores, a candidate set of keyword phrases is extracted. Each candidate phrase is then scored using a fusion of multiple feature factors. This includes: word frequency counting to identify high-frequency concepts; part-of-speech identification to prioritize nouns and verb phrases; syntactic dependency analysis to identify core relationships such as subject-verb and verb-object; and contextual semantic density calculation, which uses the word embedding space to measure the semantic concentration of the candidate word within the context. All features are weighted to construct a comprehensive scoring function, which sorts and screens candidate keyword phrases. Subsequently, syntactic analysis and dependency structure annotation are performed on the screened keyword phrases. Based on the syntactic dependency graph, a graph structure traversal operation is performed to identify the semantic boundaries of the phrases and prevent the keywords from being fragmented or mis-segmented. Finally, a semantic matching model is established between the keyword phrases and the preset structured fields. The cosine similarity between the word embedding representation and the structured field template is calculated to generate a matching confidence score. By setting a confidence threshold, if the score exceeds the threshold, it is determined that the keyword phrase has been successfully mapped to the structured field.
[0049] Then, in order to eliminate fake, abnormal and noisy behaviors in the behavior data and improve the modeling accuracy, the data is cleaned in the next step to remove abnormal data. Specifically, BERT is first used to calculate the semantic cosine similarity between the behavior and the user's historical behavior to obtain the semantic consistency measure S c, that is, input each text into the encoding layer of the BERT model, extract its output vector at the [CLS] position as the global representation of the semantics of the entire sentence. Then, calculate the cosine similarity between the semantic vector of the current behavior and the semantic vector of each behavior in the historical behavior, and take the mean or weighted mean of the similarity as the final semantic consistency measure; calculate whether the time interval of occurrence falls within a reasonable fluctuation range based on the time point of the behavior, and obtain the time series rationalization index T. c , where t i The timestamp of the current behavior is represented by w, and the preset time fluctuation window is w. A weighted fusion of the semantic consistency measure and the time series rationalization index is used to obtain the behavior confidence score. If the behavior confidence score is less than the preset threshold, the behavior is considered an abnormal sample behavior, invalidated, and removed. This mechanism ensures the semantic continuity and behavioral rationality of the input sequence, effectively improving the robustness and generalization capabilities of subsequent modeling.
[0050] In order to fully express the dynamic evolution characteristics of user behavior, this paper takes users as units and constructs behaviors into behavior sequences in chronological order within a set time window. It introduces time-aware embedding vectors to form a temporal feature representation of user dynamic behavior changes. Specifically, within the time window [tw, t], the behavior set B = {b1, b2...b n}, where each line b i Extract behavior type, behavior intensity and behavior interval features; wherein the behavior type xl i Converted to vector e after hot encoding xl , behavior intensity xq i By normalization, we can get xq i ′, behavior interval Δt i =t i -t i-1 ; Calculate behavior b i Relative position within the time window where p i Represents the relative position, t i For behavior b i The event stamp of the occurrence of t is the end point of the time window, that is, the current time point; the time perception vector is generated by the sine cosine function Where d is the embedding dimension index and D is the total dimension; xl 、xq i ′、Δt i With TPE(p i ) are concatenated into a composite feature vector X i And through the recurrent neural network, the sequence X=[X1,X2,...,X n] to model and output the hidden state sequence H; finally, the hidden state sequence H is mean pooled to obtain the user time series feature representation vector S time . The core function of this step is to perform temporal modeling on the user's behavior sequence and extract the evolutionary patterns of the user's behavior within the set time window. User behavior on social media has significant time dependence. For example, high-frequency interactions in a short period of time may indicate an interest burst, while intermittent browsing may represent a potential change in interest. Therefore, constructing behavioral events into behavioral sequences in chronological order and introducing time-aware embedding vectors can model the temporal structure of behavior, capture the rhythm, inertia and evolutionary trends of user behavior, and provide dynamic context support for subsequent user intention prediction and content recommendation.
[0051] Then, in order to extract semantic features directly related to user interests from the behavior content, the present invention extracts perceptual features of the behavior content within a set time window, taking the user as the unit, and converts the behavior content features into a content representation vector of uniform dimension. Specifically, within the time window [tw,t], BERT is used to extract the text semantic vector for the behavior content of each behavior. The behavior type vector e xl and behavioral intensity xq i ′, combined with text semantic vector Splice into multiple feature vectors Generate interactive features through linear changes and activation functions Where W int Expressed as a weight matrix, b int Represented as a bias vector; the interaction features of each behavior are projected into a unified dimension Among them, W proj Expressed as projection matrix, b proj is the bias vector; finally, for all behaviors in the window Perform aggregation to generate user-level content representation vectors: The core function of this step is to semantically understand and model the content associated with user behavior. The objects of user behavior on social platforms are typically high-dimensional content, which inherently carries the user's interests and emotional tendencies. Therefore, extracting the semantic features of behavioral content and encoding them into a uniformly dimensional content representation vector is crucial for constructing user interest profiles and understanding the motivations behind their behavior. This step, through a modality-aware encoding mechanism, transforms different types of behavioral content into structured, numerical representations, which serve as key input for subsequent behavior fusion and intent recognition.
[0052] Finally, to accurately identify the user's potential behavioral intentions and drive real-time recommendation optimization, the final step involves inputting the temporal feature representation vector and the content representation vector into a behavioral intention recognition model to predict the probability of the user's future behavior. This intention recognition model is implemented using a BiGRU-Attention network architecture. First, the temporal feature representation vector and the content representation vector are fed into a dual-channel encoder structure to extract corresponding deep semantic features. The output features of the two channels are then concatenated in a high-dimensional space and fed into a fully connected fusion layer, where feature compression and reconstruction are used to generate a unified behavioral state representation vector. The behavioral state representation vector is then fed into an intention discrimination module that incorporates an attention gating mechanism. This module adaptively adjusts its response to different behavioral factors based on feature weights. Finally, a softmax activation function is used to output the probability of each future behavior within a predefined time window. Specifically, the temporal feature representation vector and the content representation vector are fed into two parallel encoder channels. In each channel, a bidirectional gated recurrent unit (BiGRU) is used for feature extraction. The BiGRU architecture simultaneously models sequential information in both forward and backward directions, effectively capturing the long-term temporal dependencies and contextual semantics of user behavior, enhancing the expressive power of behavioral sequences. It also models content representation vectors, helping to understand the semantic motivations and preference patterns behind behavior. Subsequently, the feature representations output by the two channels are concatenated in a high-dimensional manner to construct a joint feature vector that incorporates both temporal evolution information and content semantics. To control feature dimensionality and prevent redundant interference, the concatenated vector is input to a fully connected fusion layer, which compresses and reconstructs features to generate a unified dimensional behavioral state representation vector. This fusion layer unifies the structure of multimodal information while preserving the key behavioral semantics, ensuring more stable reception of the fused feature representation by the downstream discriminant module. Next, the behavioral state representation vector is fed into an intent discrimination module that incorporates an attention gating mechanism. This module automatically identifies key behavioral feature dimensions in the current state through a self-attention structure and assigns different response weights. The attention gating mechanism dynamically adjusts the degree of influence of the user's recent behavior based on its intensity, suddenness and time location, improves the model's perception of short-term changes in interest and key content, and significantly improves the sensitivity and accuracy of user intention prediction. Finally, based on the feature representation output by the intention discrimination module, the model connects a layer of Softmax activation function to map the high-dimensional vector to a normalized probability value, which represents the probability value of various behaviors that the user may take within a predefined time window in the future. The present invention can connect the prediction output results with the platform recommendation engine to realize the real-time distribution of personalized content. The system dynamically adjusts the recommendation list according to the user's current behavior status, potential interest intentions and platform recommendation strategy to improve user click-through rate and platform stickiness.
[0053] The above description is merely a preferred embodiment of the present invention and does not constitute any other form of limitation to the present invention. Any person skilled in the art may utilize the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes for application in other fields. However, any simple modification, equivalent change, and modification of the above embodiments made in accordance with the technical essence of the present invention without departing from the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.
Claims
1. A social media data mining method based on user behavior analysis, characterized in that: The following steps are involved: S1. User data collection: Acquire multi-source behavioral data generated by user behavior from social media platforms in real time; S2. Data conversion: Parse unstructured data, extract keyword phrases from multi-source behavioral data through natural language processing, and map the extracted keyword phrases to pre-set structured fields. S3. Data preprocessing: Clean the data after data conversion and remove abnormal data; S4. Constructing a temporal representation of behavior: Taking users as units, we construct behaviors into a behavior sequence in chronological order within a set time window, introduce a time-aware embedding vector, and form a temporal feature representation of user dynamic behavior changes; S5. Content feature extraction and encoding: Extract perceptual features of behaviors by content within a set time window, taking users as units. Convert the behavioral content features into content representation vectors with unified dimensions. S6. User intent recognition: Input the time series feature representation vector and content representation vector into the behavior intention recognition model to predict the user's future behavior probability value and drive personalized recommendations.
2. The social media data mining method based on user behavior analysis according to claim 1, characterized in that: The multi-source behavior data in step S1 includes text comments, like records, forwarding tracks, and browsing dwell time.
3. The social media data mining method based on user behavior analysis according to claim 1, characterized in that: The implementation of data conversion in step S2 is: Conduct contextual completion modeling on collected user behavior data and use pre-trained language models to expand the contextual information of text fragments; Extract keyword phrase candidate sets based on the contextual attention mechanism, integrate multiple feature factors such as word frequency, part of speech, dependency, and contextual semantic density, perform multi-dimensional scoring on candidate phrases, and screen out keyword phrases with user intent expression characteristics; Perform syntactic analysis and dependency structure annotation on candidate keyword groups, and identify keyword group boundaries through graph structure traversal; A matching confidence score is generated for the semantic mapping relationship between the keyword group and the structured field, and a confidence threshold is set. If the confidence threshold is exceeded, it means that the mapping structure is successful.
4. The social media data mining method based on user behavior analysis according to claim 1, characterized in that: The specific implementation of step S3 of cleaning the data after the data conversion operation and removing abnormal data is as follows: First, BERT is used to calculate the semantic cosine similarity between the behavior and the user's historical behavior to obtain the semantic consistency measure S c ; Based on the time point of the behavior, calculate whether the time interval falls within a reasonable fluctuation range and obtain the time series rationalization index T. c , where t i Indicates the timestamp of the current behavior, w is the preset time fluctuation window; The behavior confidence score is obtained by weighted fusion of semantic consistency measurement and time series rationalization index. If the behavior confidence score is less than the preset threshold, the behavior is judged as an abnormal sample behavior and is deleted.
5. The social media data mining method based on user behavior analysis according to claim 1, characterized in that: The specific implementation of forming the temporal feature representation of the user's dynamic behavior changes in step S4 is as follows: In the time window [tw,t], the behavior set B={b1,b2...b n }, where each line b i Extract behavior type, behavior intensity and behavior interval features; wherein the behavior type xl i Converted to vector e after hot encoding xl , behavior intensity xq i By normalizing, we get xq i ′, behavior interval Δt i =t i -t i-1 ; Computational behavior b i Relative position within the time window where p i Represents the relative position, t i For behavior b i The event stamp of the occurrence, t is the end point of the time window, that is, the current time point; the time perception vector is generated by the sine cosine function Where d is the embedding dimension index and D is the total dimension; e xl 、xq i ′、Δt i With TPE(p i ) are concatenated into a composite feature vector X i And through the recurrent neural network, the sequence X=[X1,X2,...,X n ] to model and output the hidden state sequence H; Perform mean pooling on the hidden state sequence H to obtain the user time series feature representation vector S time .
6. The social media data mining method based on user behavior analysis according to claim 1, characterized in that: The specific implementation of the unified dimensional content representation vector in step S5 is as follows: Within the time window [tw,t], BERT is used to extract text semantic vectors for the behavior content of each behavior The behavior type vector e xl and behavioral intensity xq i ′, combined with text semantic vector Splice into multiple feature vectors Generate interactive features through linear changes and activation functions Where W int Expressed as a weight matrix, b int Represented as a bias vector; Project the interaction features of each behavior to a unified dimension Among them, W proj Expressed as projection matrix, b proj is the bias vector; Finally, for all actions in the window Perform aggregation to generate user-level content representation vectors:
7. The social media data mining method based on user behavior analysis according to claim 1, characterized in that: In step S6, the intention recognition model is implemented using the BiGRU-Attention network structure.
8. The social media data mining method based on user behavior analysis according to claim 7, characterized in that: The specific implementation of the intention recognition model to output the behavior probability value is as follows: First, the temporal feature representation vector and the content representation vector are input into the dual-channel encoder structure to extract the corresponding deep semantic features; The output features of the two channels are spliced in a high-dimensional space and input into a fully connected fusion layer to generate a unified behavior state representation vector through feature compression and reconstruction; The behavioral state representation vector is then input into the intention discrimination module containing the attention gating mechanism. This module adaptively adjusts the response intensity to different behavioral factors based on the feature weights. Finally, the Softmax activation function is used to output the probability values of each behavior of the user within the predefined time window in the future.
Citation Information
Patent Citations
Attack speech detection method fusing post attributes
CN117056514A
Network platform text flow topic popularity prediction method
CN117454006A
Project recommendation method based on multi-task training project attribute graph
CN117951375A
Method and System for Intent Classification
US20200065384A1
Cited By
Interactive data processing method and system based on artificial intelligence
CN121980525A