Social network data mining method and system based on graph neural network

Through time-aware graph segmentation and Transformer time attenuation attention mechanism, combined with the D-GNN model, the limitations and insufficient time dependence of static graph modeling in social network data mining are solved, and the accurate capture of user behavior patterns and long-term influence analysis are achieved, which improves the accuracy and efficiency of data mining.

CN120430880AInactive Publication Date: 2025-08-05JIANGXI IND & TRADE VOCATIONAL & TECH COLLEGE (JIANGXI PROVINCIAL GRAIN CADRE SCHOOL JIANGXI PROVINCIAL GRAIN WORKERS SECONDARY VOCATIONAL SCHOOL)

Patent Information

Application Number
CN202510423639.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-08-05
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing social network data mining methods have problems such as static graph modeling that leads to the loss of time dynamic features, insufficient time-dependent modeling capabilities, information loss during feature aggregation, and how to accurately capture user behavior patterns and conduct long-term social influence analysis.

Method used

Time-aware graph segmentation algorithm is used to divide time slices, build dynamic heterogeneous graph sequences, combine Transformer time attenuation attention mechanism and D-GNN model, calculate the influence weights of different time slices, and weighted aggregation of node features of each time slice to generate time-aware user embedding vectors, and analyze the influence of social networks.

Benefits of technology

Effectively capture the temporal dynamic characteristics of social networks, improve the accuracy and adaptability of data mining, enhance the modeling ability of time series dependence, reduce redundant calculations, improve the accuracy of user behavior prediction, and can identify users with high communication capabilities, and be suitable for large-scale social network data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120430880A_ABST
    Figure CN120430880A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of social network data mining, and discloses a social network data mining method and system based on a graph neural network, and the method comprises the steps: collecting user interaction data in a social network and a timestamp thereof, employing a time perception graph segmentation algorithm, dividing time slices based on a sliding window, and constructing a dynamic heterogeneous graph sequence. A Transform time decay attention mechanism is adopted, influence weights of different time slices are calculated, and weighted aggregation is carried out on node features of all the time slices; and inputting the weighted time slices into the D-GNN model, generating a time-perceived user embedding vector, and analyzing the influence of the social network. According to the method, the model better conforming to the actual dynamic change of the social network is constructed, and the accuracy and adaptability of data mining are improved. Calculation efficiency is improved on large-scale social network data, and availability of the model in industrial application is ensured. And social influence analysis is carried out, and technical support is provided for practical applications such as precision marketing, public opinion monitoring, social recommendation and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of social network data mining, and in particular to a social network data mining method and system based on graph neural network. Background Art

[0002] With the increasing popularity of social networks, the scale of social data has grown exponentially. User interactions on social platforms, such as likes, comments, shares, and follows, form a complex network of social relationships. This data contains rich information and can be used in the field of social influence analysis. Traditional data mining methods mainly rely on graph theory algorithms (such as PageRank and community discovery) and machine learning methods (such as Support Vector Machines (SVMs) and random forests), but these methods have certain limitations when processing dynamic social network data. In recent years, the development of graph neural networks (GNNs) has made deep learning on graph-structured data possible. GNNs can aggregate information through multi-layer adjacency relationships to more accurately learn node and edge representations, demonstrating superiority in tasks such as social network data mining, recommender systems, and influence propagation analysis. However, traditional GNN models are mostly based on static graph modeling, which makes it difficult to effectively capture the temporal dynamics of social networks, limiting their practical application.

[0003] Although the current GNN-based social network data mining methods have made some progress, the following problems still exist: (1) Limitations of static graph modeling: Most existing GNN models assume that the structure of social networks is fixed and cannot effectively cope with the dynamic changes of user behavior in social networks, such as changes in friend relationships and the evolution of user interests. This leads to information loss when modeling user behavior patterns, making it difficult to accurately predict future social behavior. (2) Insufficient time dependency modeling capabilities: Traditional GNN methods usually adopt a simple time window sliding strategy when processing time series data, which fails to fully consider the weight of the impact of historical time slices on current user behavior. In addition, the time decay strategy lacks adaptive capabilities and easily leads to premature forgetting of information or excessive reliance on historical data. (3) Information loss during feature aggregation: Most existing methods use mean aggregation or simple weighting methods, which fail to effectively model the influence of different time slices on current behavior and cannot distinguish which historical behaviors are more representative. (4) Lack of cross-time dependency modeling: In social network data mining, user behavior patterns are usually affected by long-term data. Existing GNN methods lack effective modeling of long-term behavior patterns, resulting in poor performance in social influence propagation analysis tasks. Therefore, there is an urgent need for a social network data mining method that can combine the temporal dynamic characteristics of social networks, accurately capture the influence of different time slices, and model cross-temporal dependencies to improve the accuracy of data analysis and prediction. Summary of the Invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the technical problems solved by the present invention are: the existing social network data mining methods have the problem of static graph modeling leading to the loss of temporal dynamic features, insufficient time-dependency modeling capabilities, information loss during feature aggregation, and how to accurately capture user behavior patterns and conduct long-term social influence analysis.

[0006] To solve the above technical problems, the present invention provides the following technical solutions: a social network data mining method based on graph neural network, comprising: collecting user interaction data and their timestamps in social networks, using a time-aware graph segmentation algorithm, dividing time slices based on a sliding window, and constructing a dynamic heterogeneous graph sequence.

[0007] The Transformer time-decayed attention mechanism is used to calculate the influence weights of different time slices and perform weighted aggregation on the node features of each time slice.

[0008] The weighted time slices are input into the D-GNN model to generate time-aware user embedding vectors and analyze social network influence.

[0009] As a preferred solution of the social network data mining method based on graph neural network of the present invention, the collecting of user interaction data and its timestamp in the social network includes: Collect user node sets, interaction edge sets and timestamps. The interaction edge sets include likes, comments, reposts, and follows.

[0010] Calculate each user node The interaction feature vector at time t is normalized.

[0011] As a preferred solution of the social network data mining method based on graph neural network described in the present invention, wherein: the time-aware graph segmentation algorithm is used to divide time slices based on sliding windows to construct a dynamic heterogeneous graph sequence, including: Using the sliding window strategy, the user interaction data is divided into dynamic subgraphs by time, which can be expressed as: in, represents the social network subgraph at time t, representing the social interaction relationships within that time window. N represents the total number of users within that time window. M represents the number of interaction behavior types for each user within that time window. Represents a user The eigenvalue corresponding to the interaction behavior j during time t.

[0012] Represents the time attenuation factor, which controls the weight of data farther away in time. represents the time decay coefficient. Represents the Beta distribution function, which is used to model the probability of user behavior. Represents the Beta function normalization constant. and Represents the parameters that control the shape of the behavioral distribution. Represents the normalized term of all user interaction features within the time window. and Respectively represent the maximum time range and minimum time range of the current sliding window.

[0013] Each time slice Corresponding to a social network subgraph within a window range, a social network subgraph within a window range contains user interaction information within the time range. A time dependency relationship is established between them, and attenuation weights are assigned to different time slices to form the final dynamic heterogeneous graph sequence.

[0014] As a preferred solution of the social network data mining method based on graph neural network described in the present invention, wherein: the Transformer time decay attention mechanism is used to calculate the influence weights of different time slices, including: Calculate each time slice The time decay factor is expressed as: in, Represents the time decay factor of time slice t, which determines the contribution of this time slice in the weighted aggregation. represents the time decay coefficient. Indicates the latest time slice. t represents the index value of the time slice, indicating the time slice of the current calculation.

[0015] The Transformer attention mechanism is used to calculate the weight of each time slice, which is expressed as: in, Represents the attention weight of time slice t, which measures the influence of this time slice on the final embedding vector. represents the query vector for time slice t. A key vector representing time slice t. Represents the query vector for time slice s. A key vector representing the time slice s. Indicates the dimension normalization factor of the query key vector. represents a normalization term that ensures that the sum of the attention weights of all time slices is 1.

[0016] The Beta distribution function is introduced to model the importance of time slices and enhance the time sensitivity of the model, which is expressed as: in, The Beta distribution weighting factor for time slice t, indicating the potential influence of this time slice. Represents the Beta function normalization constant. and Represents the parameters that control the shape of the behavioral distribution.

[0017] As a preferred solution of the social network data mining method based on graph neural network described in the present invention, wherein: the weighted aggregation of node features of each time slice includes: Combining the time decay factor, attention weight, and Beta distribution weight, the feature vectors of each time slice are weighted summed to form the final time-aware embedding vector, which is expressed as: in, represents the final time-weighted node embedding vector, representing the user Dynamic characteristics at all time slices. Represents a user The feature vector at time t. Represents the time decay factor. Controls the influence of more distant time slices. Represents the Transformer attention weight, which measures the contribution of the time slice. Represents the Beta distribution weight, enhancing time sensitivity. represents the time decay normalization term, ensuring that the weighted sum of features across all time slices remains stable. represents the time decay factor of time slice p.

[0018] As a preferred solution of the social network data mining method based on graph neural network of the present invention, the step of inputting the weighted time slices into the D-GNN model includes: D-GNN considers neighborhood information aggregation and calculates neighborhood feature aggregation for each time slice, which is expressed as: in, Represents a user The neighborhood feature vector at time t represents the comprehensive features of the user after being influenced by its neighbors. Represents a user The set of adjacent users. represents the user at time t With users The connection weight between . represents the normalized adjacency weight, ensuring that the sum of the weights of all adjacent features is 1. Represents a user Time-weighted features at time t.

[0019] As a preferred solution of the social network data mining method based on graph neural network of the present invention, wherein: the step of inputting the weighted time slice into the D-GNN model further includes: D-GNN also considers dynamic updates of time series and uses the gated recurrent unit GRU to model the user's time evolution state, which can be expressed as: in, Represents a user The hidden state at time t represents the user's historical behavior memory. Represents a user The hidden state of the previous time slice represents the memory information of the previous time slice. Represents a user Neighborhood features at time t. 、 、 Represents the reset gate parameter of GRU, which controls the degree of forgetting historical information. 、 、 Represents the update gate parameter of GRU, which controls how new information is added. Represents element-wise multiplication. Represents the Sigmoid activation function, ensuring that the value is between 0 and 1. Represents the hyperbolic tangent activation function, ensuring that the output value is between -1 and 1.

[0020] As a preferred solution of the social network data mining method based on graph neural network of the present invention, the generating of time-aware user embedding vectors includes: After time series modeling, the final embedding representation of the user is linearly transformed and expressed as: in, represents the final time-aware user embedding vector, representing the user Dynamic features within the entire time window. 、 Represents the linear transformation parameters, adjusting the dimension and range of the embedding vector. Represents a user The hidden state at the last time slice T.

[0021] As a preferred solution of the social network data mining method based on graph neural network described in the present invention, the analysis of social network influence includes: based on The user social network influence is analyzed from two dimensions, including personal influence and group communication influence.

[0022] Personal influence analysis includes, for a single user , if the user's embedding vector The Euclidean norm of When the threshold θ1 is exceeded, the user is judged to be a high-influence individual. <θ2, the user is judged to be a low-influence individual. <θ1, the user is judged to be a medium-influence individual.

[0023] Group communication influence analysis includes: In its adjacent network If the average influence of the group exceeds the set threshold θ3, the group is judged to have high communication influence. If it is lower than θ4, the group is judged to have low influence.

[0024] A social network data mining system based on graph neural network, including: The data collection and dynamic heterogeneous graph construction module collects user interaction data and their timestamps in social networks, adopts a time-aware graph segmentation algorithm, divides time slices based on sliding windows, and constructs a dynamic heterogeneous graph sequence.

[0025] The time-decayed attention calculation module adopts the Transformer time-decayed attention mechanism to calculate the influence weights of different time slices and perform weighted aggregation on the node features of each time slice.

[0026] The time-aware GNN training and user behavior prediction module inputs weighted time slices into the D-GNN model to generate time-aware user embedding vectors and analyze social network influence.

[0027] Beneficial effects of the present invention: Dynamic heterogeneous graph sequence construction effectively segments social network data by employing a sliding window strategy, enabling the system to not only focus on static social structures but also identify social relationships that evolve over time. This feature overcomes the limitations of traditional GNN methods in static graph modeling, enabling the model to adapt to the dynamic changes in user interests and interaction relationships. In traditional methods, data is typically viewed as independent samples without time correlation. However, this step, by constructing a dynamic heterogeneous graph, allows social data to be organized by time slices, ensuring that temporal information is not lost during data preprocessing, thereby enhancing the model's ability to model time series dependencies. Time-aware graph segmentation allows data to be sliced according to the natural flow of time while retaining the complete social relationships and behavioral characteristics within each time window. This approach improves the effectiveness of feature extraction, enabling subsequent steps to calculate social behavioral characteristics such as user influence and interest changes based on complete information.

[0028] Time-decayed attention calculation and feature aggregation: Through the time-decay mechanism, the influence of older social interaction data gradually decreases, while more recent data is given a higher weight. This approach addresses the shortcomings of traditional time window methods, ensuring that the model does not overly rely on older data while also not completely ignoring the long-term impact of historical data, thereby improving the accuracy of user behavior prediction. In social network data mining, directly using data from all time windows can result in excessive computational overhead. However, this step employs the Transformer attention mechanism to focus only on important time slices, reducing redundant computation and improving the system's computational efficiency, making the method suitable for processing large-scale social network data. Through this time-weighted aggregation, the resulting user embedding vector captures the dynamic changes in user interests and social behavior. For example, if a user's recent interest in a certain type of content increases, this interest trend will be given a higher weight in the embedding vector, while the characteristics of long-term interest decay will also be naturally modeled. This modeling capability is valuable in application scenarios such as recommendation systems, user behavior prediction, and social influence analysis.

[0029] D-GNN training and user influence analysis calculates the time-weighted distribution of user embedding vectors, which can identify which users have stronger communication capabilities in the current social network. Because the D-GNN model can learn users' long-term and short-term behavior patterns, it can be used for more accurate social influence analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort. Among them: Figure 1 This is an overall flow chart of a social network data mining method based on graph neural network provided by the first embodiment of the present invention. DETAILED DESCRIPTION

[0031] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the following detailed description of the specific embodiments of the present invention is given in conjunction with the accompanying drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in this field without creative work should fall within the scope of protection of the present invention.

[0032] Example 1, with reference to Figure 1, as one embodiment of the present invention, provides a social network data mining method based on graph neural network, comprising: S1: Collect user interaction data and their timestamps in social networks, use a time-aware graph segmentation algorithm to divide time slices based on a sliding window, and construct a dynamic heterogeneous graph sequence.

[0033] It should be noted that by collecting user interaction data and its timestamps from social networks and applying a time-aware graph segmentation algorithm, this step can divide continuous social behavior into a series of time slices, thereby forming a dynamic heterogeneous graph sequence. This dynamic heterogeneous graph can more accurately capture the temporal patterns of user behavior in social networks, providing basic data for subsequent feature extraction and relationship modeling.

[0034] Collect user node set U, interaction edge set E and timestamp. The interaction edge set includes likes, comments, reposts and follows.

[0035] Calculate each user node The interaction feature vector at time t , and perform normalization.

[0036] It should be noted that the calculation of each user node The interaction feature vector at time t , the calculation process is as follows: For each user Interaction data within time t, defining the social behavior matrix , where the elements Represents a user The number of interactions on behavior type j.

[0037] Using nonlinear transformation functions Processing social behaviors to prevent excessive or unbalanced values from affecting calculations: This function ensures that When it is less than 1, the value is close to .when When it increases, the function output value is limited to avoid the impact of extreme user behavior on the overall model.

[0038] Since newer social behaviors have a greater impact on user characteristics and older behaviors have a smaller impact, an exponential decay factor is introduced. , represents the time when behavior j occurs, Controls the decay speed (larger value causes faster decay).

[0039] Assign weights to different types of social behavior For example, retweets may be a better indicator of user interest changes than likes: in, Represents the preset importance parameter of behavior type j.

[0040] Calculate the total social behavior contribution of all users at time t to ensure a balanced distribution of eigenvalues: After normalization, each user The interaction feature vector of It is limited to a reasonable range to prevent abnormal behavior of a single user from affecting the overall feature distribution.

[0041] Integrate the calculation process, Expressed as: in, Represents a user The last interaction time on behavior type j. is the time decay factor, indicating that the influence of earlier behaviors gradually decreases.

[0042] Furthermore, the Z-score method is used for normalization.

[0043] Using the sliding window strategy, the user interaction data is divided into dynamic subgraphs by time, which can be expressed as: in, represents the social network subgraph at time t, representing the social interaction relationships within that time window. N represents the total number of users within that time window. M represents the number of interaction behavior types for each user within that time window. Represents a user The eigenvalue corresponding to the interaction behavior j during time t.

[0044] Represents the time attenuation factor, which controls the weight of data farther away in time. represents the time decay coefficient. Represents the Beta distribution function, which is used to model the probability of user behavior. Represents the normalization constant of the Beta function, ensuring the normalization of the distribution. and Represents the parameters that control the shape of the behavioral distribution. Represents the normalized term of all user interaction features within the time window. and Respectively represent the maximum time range and minimum time range of the current sliding window.

[0045] Each time slice Corresponding to a social network subgraph within a window range, a social network subgraph within a window range contains user interaction information within the time range. A time dependency relationship is established between them, and attenuation weights are assigned to different time slices to form the final dynamic heterogeneous graph sequence.

[0046] It should be noted that this step combines a time-decaying exponential function with a Beta distribution probability model to effectively model the temporal dependence of user behavior in social networks. A normalized denominator ensures that the calculated dynamic heterogeneous graph weights are globally consistent and unaffected by outliers in specific user behavior. Expressing the cumulative weights of a time sliding window using a higher-order integral form enhances the time sensitivity of social network data. This formula ensures that the data is collectable, computable, and applicable, enabling the construction of dynamic graphs of social networks and supporting subsequent user behavior prediction tasks.

[0047] S2: The Transformer time-decayed attention mechanism is used to calculate the influence weights of different time slices and perform weighted aggregation on the node features of each time slice.

[0048] It should be noted that in social network data mining, different time slices have an uneven impact on the current user status. Recent time slices often have a greater impact than more distant ones, but distant data can still contain long-term behavioral patterns. Therefore, this step designs a Transformer-based Time-Decay Transformer Attention (TDTA) mechanism to dynamically calculate the influence of different time slices and perform weighted aggregation of node features across each time slice. This ensures that the model captures temporal dynamics while preventing distant data from interfering with the current prediction task.

[0049] In order to control the influence of different time slices on the current moment, a time decay factor is introduced to ensure that the influence of the recent time slices is greater, while the influence of the distant time slices gradually weakens. This factor uses an exponential decay function with a value between (0,1]. It can be expressed as: in, Represents the time decay factor of time slice t, which determines the contribution of this time slice in the weighted aggregation. represents the time decay coefficient. Indicates the latest time slice. t represents the index value of the time slice, indicating the time slice of the current calculation.

[0050] Furthermore, through a time decay mechanism, the influence of older social interaction data gradually decreases, while more recent data is given a higher weight. This approach addresses the shortcomings of traditional time window methods, ensuring that the model does not overly rely on older data while not completely ignoring the long-term impact of historical data, thereby improving the accuracy of user behavior prediction.

[0051] Different time slices are not only affected by time decay, but also need to calculate their importance to the current prediction task. The Transformer attention mechanism is used to calculate the weight of each time slice to ensure that more relevant time slices have higher contributions. It can be expressed as: in, Represents the attention weight of time slice t, which measures the influence of this time slice on the final embedding vector. represents the query vector for time slice t. A key vector representing time slice t. Represents the query vector for time slice s. A key vector representing the time slice s. Indicates the dimension normalization factor of the query key vector. represents a normalization term that ensures that the sum of the attention weights of all time slices is 1.

[0052] Preferably, the query vector measures the current time slice's interest in information from other time slices. The key vector measures the matching degree of the historical time slices in the query. Both the query vector and the key vector are derived from the embedded features of the time slices through a linear transformation to ensure that they can be used for similarity calculations in the same feature space.

[0053] Furthermore, in social network data mining, directly using data from all time windows may result in excessive computational complexity. This step adopts the Transformer attention mechanism, focusing only on important time slices, thereby reducing redundant computations and improving the computational efficiency of the system, making the method applicable to large-scale social network data processing.

[0054] Since the contribution of different time slices may be affected by specific time periods (such as short-term shocks or long-term trends), the Beta distribution function is introduced to model the importance of time slices and enhance the time sensitivity of the model. It can be expressed as: in, The Beta distribution weighting factor for time slice t, indicating the potential influence of this time slice. Represents the Beta function normalization constant. and Represents the parameters that control the shape of the behavioral distribution.

[0055] Combining the time decay factor, attention weight, and Beta distribution weight, the feature vectors of each time slice are weighted summed to form the final time-aware embedding vector, which is expressed as: in, represents the final time-weighted node embedding vector, representing the user Dynamic characteristics at all time slices. Represents a user The feature vector at time t. Represents the time decay factor. Controls the influence of more distant time slices. Represents the Transformer attention weight, which measures the contribution of the time slice. Represents the Beta distribution weight, enhancing time sensitivity. represents the time decay normalization term, ensuring that the weighted sum of features across all time slices remains stable. represents the time decay factor of time slice p.

[0056] S3: Input the weighted time slices into the D-GNN model to generate time-aware user embedding vectors and analyze social network influence.

[0057] It should be noted that this step feeds the weighted time slices into a D-GNN (dynamic graph neural network) model. By combining neighborhood information aggregation and temporal dynamic modeling, it learns the evolution of user behavior and ultimately generates a time-aware user embedding vector. This embedding vector can be used for a variety of social network analysis tasks, including social influence assessment in this example.

[0058] D-GNN considers neighborhood information aggregation and calculates neighborhood feature aggregation for each time slice, which is expressed as: in, Represents a user The neighborhood feature vector at time t represents the comprehensive features of the user after being influenced by its neighbors. Represents a user The set of adjacent users. represents the user at time t With users The connection weight between . represents the normalized adjacency weight, ensuring that the sum of the weights of all adjacent features is 1. Represents a user Time-weighted features at time t.

[0059] D-GNN also considers dynamic updates of time series and uses the gated recurrent unit GRU to model the user's time evolution state, which can be expressed as: in, Represents a user The hidden state at time t represents the user's historical behavior memory. Represents a user The hidden state of the previous time slice represents the memory information of the previous time slice. Represents a user Neighborhood features at time t. 、 、 Represents the reset gate parameter of GRU, which controls the degree of forgetting historical information. 、 、 Represents the update gate parameter of GRU, which controls how new information is added. Represents element-wise multiplication. Represents the Sigmoid activation function, ensuring that the value is between 0 and 1. Represents the hyperbolic tangent activation function, ensuring that the output value is between -1 and 1.

[0060] After time series modeling, the final embedding representation of the user is linearly transformed and expressed as: in, represents the final time-aware user embedding vector, representing the user Dynamic features within the entire time window. 、 Represents the linear transformation parameters, adjusting the dimension and range of the embedding vector. Represents a user The hidden state at the last time slice T.

[0061] It should be noted that traditional GNN methods often ignore the time dimension when processing time series data, resulting in the model's inability to accurately predict future user behavior. However, this step combines D-GNN with GRU (Gated Recurrent Unit) to model time dependencies, allowing user embedding vectors to change dynamically, thereby better adapting to the evolving characteristics of actual social network data.

[0062] based on The user social network influence is analyzed from two dimensions, including personal influence and group communication influence.

[0063] Personal influence analysis includes, for a single user , if the user's embedding vector The Euclidean norm of When the threshold θ1 is exceeded, the user is judged to be a high-influence individual. <θ2, the user is judged to be a low-influence individual. <θ1, the user is judged to be a medium-influence individual.

[0064] Group communication influence analysis includes: In its adjacent network If the average influence of the group exceeds the set threshold θ3, the group is judged to have high communication influence. If it is lower than θ4, the group is judged to have low influence.

[0065] Furthermore, θ1 is the threshold for high-influence individuals, θ2 is the threshold for low-influence individuals, θ3 is the threshold for high-group communication influence, and θ4 is the threshold for low-group communication influence. These four thresholds are derived from experimental calculations. The quantile method is used in the experiment to confirm that high-influence individuals and high-group communication influence are in the upper quartile, that is, the top 25%, and low-influence individuals and low-group communication influence are in the lower quartile, that is, the bottom 25%.

[0066] Furthermore, we select the user's embedding vector The Euclidean norm is used to measure user influence because in social network data mining and graph neural network (GNN) modeling, the user's embedding vector is a compressed representation of multidimensional features, including the user's social behavior information. Since GNN aggregates adjacency information and extracts features through deep learning, different dimensions in the embedding vector often correspond to different user feature components. Therefore, the larger the norm of the embedding vector, the stronger the user's social influence. The smaller the norm of the embedding vector, the weaker the user's social influence. The user's embedding vector is selected. The advantage of using the Euclidean norm to measure user influence is that it provides a holistic metric. Different users have different behavioral patterns in social networks. Some may be more inclined to be content producers (high number of comments, high number of likes), while others may be more inclined to be relationship nodes (high number of followers). Relying solely on a single feature to assess influence, such as the number of likes or followers, can easily lead to a single feature dominating the results, overlooking other important features. The norm calculation method, however, integrates information from multiple dimensions, making influence calculation more comprehensive. Furthermore, because the user base of a social network can grow and shrink over time, using a fixed absolute value (such as setting a certain number of likes or followers as a high influence threshold) may not be applicable to networks of varying sizes. The Euclidean norm, on the other hand, adapts to different data distributions, making the method robust across diverse datasets. Furthermore, during training, GNNs aggregate neighbor information, ensuring that the embedding vector incorporates not only the characteristics of the user but also those of their neighborhood. The magnitude of the Euclidean norm effectively reflects the relative importance of a user within the entire network, rather than simply individual behavioral data.

[0067] It should be noted that all weight coefficients, control parameters and adjustment parameters in the present invention are obtained from historical experimental data and can be dynamically adjusted in actual applications.

[0068] The above embodiments also include a social network data mining system based on a graph neural network, specifically: The data collection and dynamic heterogeneous graph construction module collects user interaction data and their timestamps in social networks, adopts a time-aware graph segmentation algorithm, divides time slices based on sliding windows, and constructs a dynamic heterogeneous graph sequence.

[0069] The time-decayed attention calculation module adopts the Transformer time-decayed attention mechanism to calculate the influence weights of different time slices and perform weighted aggregation on the node features of each time slice.

[0070] The time-aware GNN training and user behavior prediction module inputs weighted time slices into the D-GNN model to generate time-aware user embedding vectors and analyze social network influence.

[0071] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods in Example 1 when executing the computer program.

[0072] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method described in any one of the embodiments 1.

[0073] The computer device may be a server. The computer device includes a processor, memory, an input / output (I / O) interface, and a communication interface. The processor, memory, and I / O interface are connected via a system bus, and the communication interface is connected to the system bus via the I / O interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data cluster data of the power monitoring system. The I / O interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements a social network data mining method based on a graph neural network.

[0074] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processors (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.

[0075] Example 2 is an embodiment of the present invention, which provides a social network data mining method based on graph neural network. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through simulation experiments.

[0076] This experiment aims to verify the effectiveness of graph neural network-based social network data mining methods for user behavior analysis and social influence calculation. By constructing social network data from different time windows and performing time series analysis based on user interactions (likes, comments, and reposts), we assess the changing trends of social influence scores across different time windows and compare the limitations of existing methods.

[0077] The experimental data comes from a simulated social network user behavior dataset. The data includes user ID, time window (days), total number of interactions, number of likes, number of comments, and number of reposts. The data is sliced according to different time windows (7 days, 14 days, 30 days, 60 days, 90 days, and 180 days), and a method based on the time-decayed attention mechanism and a dynamic graph neural network (D-GNN) is used to calculate the user's social influence score.

[0078] In the experimental dataset, users' social interaction data, including likes, comments, and forwarding behaviors, as well as the timestamp information of these behaviors, are collected. After data collection, preprocessing is performed to ensure data integrity and consistency.

[0079] The time-aware graph segmentation algorithm is used to divide the data into sliding windows, and time windows of 7 days, 14 days, 30 days, 60 days, 90 days and 180 days are constructed respectively to evaluate the impact of time window size on social influence.

[0080] The Transformer time-decayed attention mechanism is used to assign different weights to data from different time windows, ensuring that recent data contributes more while the influence of more distant data gradually decreases. This step ensures that the calculated social influence score accurately reflects the importance of a user's recent behavior.

[0081] We use the D-GNN model, combined with historical user behavior patterns, to calculate social influence. Through neighborhood feature aggregation and time series modeling, D-GNN captures the dynamic evolution of users' social relationships, making the calculated influence scores more stable and accurate. We calculate users' social influence scores using the resulting time-aware user embedding vectors. We analyze the changing trends of influence scores over different time windows to examine the impact of both long-term and short-term social behaviors. The experimental results are shown in Table 1.

[0082] Table 1 Experimental data Within a short time window (7 days, 14 days), users' social influence scores are low (0.65-0.72), which indicates that short-term behavior cannot effectively accumulate sufficient influence.

[0083] In the medium time window (30 days, 60 days), the influence score increases significantly (0.85-0.90), indicating that behavioral data over a longer time frame is more important for influence assessment.

[0084] In longer time windows (90 days and 180 days), the influence scores tend to be stable (0.92-0.98), indicating that the time-decayed attention mechanism of the present invention can ensure the validity of long-term behavioral data and effectively model users' long-term social behavior.

[0085] We also found that the growth trend of likes, comments, and reposts is positively correlated with social influence scores. Within the same time window, users with higher likes, comments, and reposts also have higher influence scores. This demonstrates that our method can effectively capture the contribution of different interactive behaviors to user influence and reasonably assign weights to different behaviors.

[0086] This experiment uses a time-aware graph segmentation algorithm to enable social relationships to evolve over time, thereby more accurately modeling users' social behavior patterns. The Transformer's time-decayed attention mechanism adaptively adjusts the weights of social behaviors in different time windows, ensuring that recent behaviors are more influential while not overly neglecting long-term behavioral trends. The introduction of a dynamic graph neural network (D-GNN) allows influence calculation to not only rely on individual user behaviors but also incorporate the behavioral patterns of users' neighborhoods, thereby improving the accuracy of social influence calculation and making influence prediction more stable and reliable.

[0087] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A social network data mining method based on graph neural network, characterized in that: include: Collect user interaction data and their timestamps from social networks, use a time-aware graph segmentation algorithm to divide time slices based on a sliding window, and construct a dynamic heterogeneous graph sequence; The Transformer time-decay attention mechanism is used to calculate the influence weights of different time slices and perform weighted aggregation on the node features of each time slice. The weighted time slices are input into the D-GNN model to generate time-aware user embedding vectors and analyze social network influence.

2. The social network data mining method based on graph neural network according to claim 1, characterized in that: The collecting of user interaction data and timestamps in the social network includes: Collect user node sets, interaction edge sets, and timestamps. Interaction edge sets include likes, comments, reposts, and follows. Calculate each user node The interaction feature vector at time t is normalized.

3. The social network data mining method based on graph neural network according to claim 2, characterized in that: The method of using a time-aware graph segmentation algorithm to divide time slices based on a sliding window and construct a dynamic heterogeneous graph sequence includes: Using the sliding window strategy, the user interaction data is divided into dynamic subgraphs by time, which can be expressed as: in, represents the social network subgraph at time t, which represents the social interaction relationship within the time window; N represents the total number of users in the time window; M represents the number of interaction behavior types of each user in the time window; Represents a user The eigenvalue corresponding to the interaction behavior j during time t; Represents the time attenuation factor, which controls the weight of data farther away in time. represents the time attenuation coefficient; Represents the Beta distribution function, which is used to model the probability of user behavior; represents the normalization constant of the Beta function; and Parameters that represent the shape of the distribution of control behavior; Represents the normalized term of all user interaction features within the time window; and Respectively represent the maximum time range and minimum time range of the current sliding window; Each time slice Corresponding to a social network subgraph within a window range, a social network subgraph within a window range contains user interaction information within the time range; in multiple time slices A time dependency relationship is established between them, and attenuation weights are assigned to different time slices to form the final dynamic heterogeneous graph sequence.

4. The social network data mining method based on graph neural network according to claim 3, characterized in that: The Transformer time-decayed attention mechanism is used to calculate the influence weights of different time slices, including: Calculate each time slice The time decay factor is expressed as: in, The time decay factor of time slice t determines the contribution of this time slice in the weighted aggregation; represents the time attenuation coefficient; Indicates the latest time slice; t represents the index value of the time slice, indicating the time slice of the current calculation; The Transformer attention mechanism is used to calculate the weight of each time slice, which is expressed as: in, represents the attention weight of time slice t, which measures the influence of this time slice on the final embedding vector; represents the query vector for time slice t; The key vector representing time slice t; The query vector representing time slice s; The key vector representing the time slice s; Represents the dimension normalization factor of the query key vector; represents the normalization term, ensuring that the sum of the attention weights of all time slices is 1; The Beta distribution function is introduced to model the importance of time slices and enhance the time sensitivity of the model, which is expressed as: in, The Beta distribution weighting factor of time slice t represents the potential influence of this time slice; represents the normalization constant of the Beta function; and Represents the parameters that control the shape of the behavioral distribution.

5. The social network data mining method based on graph neural network according to claim 4, characterized in that: The weighted aggregation of the node features of each time slice includes: Combining the time decay factor, attention weight, and Beta distribution weight, the feature vectors of each time slice are weighted summed to form the final time-aware embedding vector, which is expressed as: in, represents the final time-weighted node embedding vector, representing the user Dynamic characteristics at all time slices; Represents a user The feature vector at time t; Represents the time decay factor; controls the influence of more distant time slices; Represents the Transformer attention weight, which measures the contribution of the time slice; Represents the Beta distribution weight, enhancing time sensitivity; represents the time decay normalization term, ensuring that the weighted sum of features across all time slices remains stable; represents the time decay factor of time slice p.

6. The social network data mining method based on graph neural network according to claim 5, characterized in that: Inputting the weighted time slices into the D-GNN model includes: D-GNN considers neighborhood information aggregation and calculates neighborhood feature aggregation for each time slice, which is expressed as: in, Represents a user The neighborhood feature vector at time t represents the comprehensive features of the user after being influenced by its neighbors; Represents a user The set of adjacent users of represents the user at time t With users The connection weight between them; represents the normalized adjacency weight, ensuring that the sum of the weights of all adjacent features is 1; Represents a user Time-weighted features at time t.

7. The social network data mining method based on graph neural network according to claim 6, characterized in that: Inputting the weighted time slices into the D-GNN model further includes: D-GNN also considers dynamic updates of time series and uses the gated recurrent unit GRU to model the user's time evolution state, which can be expressed as: in, Represents a user The hidden state at time t represents the user's historical behavior memory; Represents a user The hidden state in the previous time slice represents the memory information of the previous time slice; Represents a user Neighborhood features at time t; 、 、 Represents the reset gate parameter of GRU, which controls the degree of forgetting of historical information; 、 、 Represents the update gate parameter of GRU, which controls how new information is added; represents element-wise multiplication; Represents the Sigmoid activation function, ensuring that the value is between 0 and 1; Represents the hyperbolic tangent activation function, ensuring that the output value is between -1 and 1.

8. The social network data mining method based on graph neural network according to claim 7, characterized in that: Generating a time-aware user embedding vector includes: After time series modeling, the final embedding representation of the user is linearly transformed and expressed as: in, represents the final time-aware user embedding vector, representing the user Dynamic characteristics within the entire time window; 、 Represents the linear transformation parameters, adjusting the dimension and range of the embedding vector; Represents a user The hidden state at the last time slice T.

9. The social network data mining method based on graph neural network according to claim 8, characterized in that: The analysis of social network influence includes: based on Analyze the influence of users' social networks from two dimensions, including personal influence and group communication influence; Personal influence analysis includes, for a single user , if the user's embedding vector The Euclidean norm of When the threshold θ1 is exceeded, the user is judged to be a high-influence individual; if <θ2, the user is judged to be a low-influence individual; if θ2< <θ1, the user is judged to be a medium-influence individual; Group communication influence analysis includes: In its adjacent network If the average influence of the group exceeds the set threshold θ3, the group is judged to have high communication influence; if the group's communication index If it is lower than θ4, the group is judged to have low influence.

10. A social network data mining system based on a graph neural network using the method according to any one of claims 1 to 9, characterized in that: The data collection and dynamic heterogeneous graph construction module collects user interaction data and their timestamps from social networks, uses a time-aware graph segmentation algorithm to divide time slices based on a sliding window, and constructs a dynamic heterogeneous graph sequence; The time-decayed attention calculation module uses the Transformer time-decayed attention mechanism to calculate the influence weights of different time slices and perform weighted aggregation on the node features of each time slice; The time-aware GNN training and user behavior prediction module inputs weighted time slices into the D-GNN model to generate time-aware user embedding vectors and analyze social network influence.

Citation Information

Patent Citations

  • Rumor detection method and system based on dynamic heterogeneous graph and multi-level attention

    CN115659966A

  • Graph neural network recommendation method and system based on social preference

    CN118171738A

  • Heterogeneous graph neural network-based short video recommendation method and system fused with multi-modal data

    CN119089004A

  • Scene perception trust evaluation method based on graph neural network

    CN119254640A

  • Private domain social relation mining method and system based on graph neural network

    CN119415979A

Cited By

  • Creditor right confirmation method and system based on dynamic graph network and multi-source heterogeneous data

    CN121391436A

  • Credit right identification method and system based on dynamic graph network and multi-source heterogeneous data

    CN121391436B