Social network link prediction method and system based on time-frequency perception graph convolutional network, terminal and storage medium

By fusing frequency domain, time domain, and spatial domain information through a time-frequency aware graph convolutional network framework, the problem of balancing short-term and long-term time trends with complex spatial structures in social network link prediction is solved, thereby improving link prediction accuracy and user recommendation performance.

CN120915702AActive Publication Date: 2025-11-07GUANGDONG LAB OF ARTIFICIAL INTELLIGENCE & DIGITAL ECONOMY (SZ)
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511442926.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2025-11-07
Estimated Expiration
2045-10-10

AI Technical Summary

Technical Problem

Existing methods for predicting links in social networks only consider single features or local spatial relationships in time series, making it difficult to simultaneously take into account the long-term and short-term time trends and complex spatial structures of social networks, resulting in low accuracy in link prediction.

Method used

We employ a method based on Time-Frequency Aware Graph Convolutional Networks (TFAGCN). Through the TFAGCN framework, we fuse information from the frequency, time, and spatial domains. By utilizing Discrete Fourier Transform and Graph Convolutional Neural Networks, combined with a time-frequency attention module, we adaptively fuse frequency and time domain features to capture periodicity and global trends in social networks. Furthermore, we optimize the prediction results through a sparse penalty loss function.

Benefits of technology

It significantly improves the accuracy of social network link prediction, enhances the personalization of user recommendations, and can more accurately predict potential connections and information dissemination paths between users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120915702A_ABST
    Figure CN120915702A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of network link prediction, and discloses a social network link prediction method and system based on a time-frequency perception graph convolutional network, a terminal and a storage medium, and the method comprises the steps: obtaining historical social network information of a user, carrying out the preprocessing of the historical social network information, obtaining target historical social network information, and storing the target historical social network information in a database; creating a social network link training set according to the target historical social network information; performing training processing on the time-frequency perception graph convolutional network according to the social network link training set to obtain a social network link prediction model; and obtaining to-be-predicted social network information, and inputting the to-be-predicted social network information into the social network link prediction model to obtain a user social link prediction result. The method not only can consider the single feature or local space relationship of the time sequence, but also can consider the long and short term time trend and complex space structure of the social network, thereby remarkably improving the link prediction accuracy of the social network, and improving the personalized effect of user recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of network link prediction, in particular to a social network link prediction method, system, terminal and computer readable storage medium based on a time-frequency perception graph convolution network. BACKGROUND

[0002] In the application scenario of a social network, how to accurately predict the potential connection between users and the information propagation path is a key technical problem for detecting false information propagation and optimizing resource allocation of a social platform. The social network link prediction problem is essentially a graph completion task, that is, predicting potential but not yet formed edges in the current known graph structure. Existing social network link prediction methods mainly include traditional methods based on structural similarity, link prediction methods based on matrix decomposition and deep learning methods based on graph neural networks.

[0003] Traditional methods based on structural similarity evaluate the possibility of forming a link between a pair of nodes by designing a heuristic similarity index. Although this method is computationally efficient, simple to implement and suitable for small-scale static networks, it cannot establish nonlinear associations in network structure and has insufficient prediction ability when facing dynamic evolving networks. Link prediction methods based on matrix decomposition aim to learn the latent node representation from the connection matrix through dimensionality reduction techniques. This method can theoretically learn both structural and temporal features, but its main limitations are: 1. It relies on dense matrix computation and is difficult to extend to large-scale graphs; 2. The feature expression capability is limited and cannot fully capture complex node dependency relationships. Deep learning methods based on graph neural networks automatically extract network structure features and evolution patterns through an end-to-end learning framework. Although this method improves the accuracy of link prediction, most of them only focus on time domain modeling and ignore the potential of frequency domain information. Therefore, existing methods often only consider single features of time series or local spatial relationships, making it difficult to simultaneously consider long-term and short-term time trends and complex spatial structures of social networks, resulting in low accuracy of social network link prediction.

[0004] Therefore, the prior art still needs to be improved and developed. SUMMARY

[0005] The main purpose of the present application is to provide a social network link prediction method, system, terminal and storage medium based on a time-frequency perception graph convolution network, which aims to solve the problem of low accuracy of social network link prediction caused by only considering single features of time series or local spatial relationships, which makes it difficult to simultaneously consider long-term and short-term time trends and complex spatial structures of social networks.

[0006] In order to achieve the above object, the application provides a social network link prediction method based on a time-frequency perception graph convolution network, which comprises the following steps: Obtaining historical social network information of a user, preprocessing the historical social network information to obtain target historical social network information, and creating a social network link training set according to the target historical social network information; Training and processing a time-frequency perception graph convolution network according to the social network link training set to obtain a social network link prediction model; Obtaining to-be-predicted social network information of the user, inputting the to-be-predicted social network information into the social network link prediction model to obtain a user social link prediction result.

[0007] Optionally, the social network link prediction method based on the time-frequency perception graph convolution network, wherein the obtaining historical social network information of a user, preprocessing the historical social network information to obtain target historical social network information, and creating a social network link training set according to the target historical social network information specifically comprises: Obtaining historical social network information of a user, preprocessing the historical social network information to obtain target historical social network information, wherein the preprocessing comprises data cleaning, data conversion and data integration; Obtaining a social network graph snapshot sequence of the target historical social network information, and obtaining a real social network graph snapshot sequence corresponding to the social network graph snapshot sequence; Obtaining a plurality of training samples according to the social network graph snapshot sequence and the real social network graph snapshot sequence, and creating a social network link training set according to all the training samples.

[0008] Optionally, the social network link prediction method based on the time-frequency perception graph convolution network, wherein the training and processing a time-frequency perception graph convolution network according to the social network link training set to obtain a social network link prediction model specifically comprises: Inputting a group of training samples in the social network link training set into the time-frequency perception graph convolution network, performing matrix matching on a social network graph snapshot of the training sample to obtain an adjacency matrix sequence, and performing dimension reduction conversion processing on the adjacency matrix sequence to obtain a social network time domain signal; Performing domain transformation processing on the social network time domain signal to obtain a social network frequency domain signal, performing complex processing on the social network frequency domain signal to obtain a target social network frequency domain signal, and performing transformation processing on the target social network frequency domain signal to obtain a frequency domain feature; Define the node feature matrix of the historical social network information, perform graph convolution on each adjacency matrix in the adjacency matrix sequence based on the node feature matrix to obtain multiple graph snapshot space feature structures, and perform time evolution on all graph snapshot space feature structures to obtain time domain features; The frequency domain features and the time domain features are linearly processed using a time domain attention neural network to obtain time domain attention information, and the frequency domain features and the time domain features are linearly processed using a frequency domain attention neural network to obtain frequency domain attention information. The time-domain attention information and the frequency-domain attention information are weighted and predicted to obtain the social network link prediction result. The loss value of the social network link prediction result is calculated based on the real social network graph snapshot sequence of the training samples to obtain the target loss value. The parameters of the time-frequency awareness graph convolutional network are corrected based on the target loss value. The next set of training samples is input into the time-frequency sensing graph convolutional network until the training status of the time-frequency sensing graph convolutional network meets the preset conditions, thus obtaining the trained social network link prediction model.

[0009] Optionally, in the aforementioned social network link prediction method based on time-frequency sensing graph convolutional networks, the complex number processing of the frequency domain signal of the social network specifically includes: ; The step of performing graph convolution processing on each adjacency matrix in the adjacency matrix sequence based on the node feature matrix is ​​specifically as follows: ; in, For the target social network frequency domain signal, For activation function, For social network frequency domain signals, The weight matrix is ​​a complex number. For complex bias, For the spatial feature structure of the graph snapshot, Social network graph snapshot The Laplace transform result, for The degree matrix, The node feature matrix, These are learnable weight parameters.

[0010] Optionally, the social network link prediction method based on time-frequency aware graph convolutional network, wherein the time evolution includes update gate processing, reset gate processing, candidate hidden state processing and hidden state determination processing; The step of temporally evolving the spatial feature structure of all graph snapshots specifically involves: ; ; ; ; wherein, is an update gate, is a sigmoid activation function, is a hidden state at the th time step, is a graph snapshot space feature structure, is a reset gate, is a candidate hidden state at the th time step, is a hidden state at the th time step, is an element-wise multiplication, , , , , and are learnable parameters.

[0011] Optionally, the social network link prediction method based on the time-frequency perception graph convolutional network, wherein the time-domain attention information and the frequency-domain attention information are weighted and predicted to obtain a social network link prediction result, specifically comprising: normalizing the time-domain attention information to obtain a first calculation result, and normalizing the frequency-domain attention information to obtain a second calculation result; adding the first calculation result and the second calculation result to obtain a time-frequency feature result, and performing link prediction according to a last hidden state in the time-frequency feature result to obtain a social network link prediction result; the normalizing the time-domain attention information specifically comprises: ; the normalizing the frequency-domain attention information specifically comprises: ; wherein, is the first calculation result, is a query of a time-domain attention neural network in the time-domain attention information, is a key of the time-domain attention neural network in the time-domain attention information, is a value of the time-domain attention neural network in the time-domain attention information, is a normalization function, is a transpose, For dimensional information, This is the second calculation result. For querying frequency domain attention neural networks within frequency domain attention information, For frequency domain attention information, it is the key of the frequency domain attention neural network. This represents the value of the frequency domain attention neural network in the frequency domain attention information.

[0012] Optionally, in the aforementioned social network link prediction method based on time-frequency aware graph convolutional networks, the step of calculating the loss value of the social network link prediction result based on the real social network graph snapshot sequence of the training samples specifically involves: ; in, For the target loss value, For the penalty matrix, For the first Social network link prediction results at each time step For the first The adjacency matrix corresponding to the sequence of real social network graph snapshots at each time step.

[0013] Optionally, the social network link prediction method based on time-frequency aware graph convolutional networks, wherein the social network link prediction system based on time-frequency aware graph convolutional networks includes: The data processing module is used to acquire the user's historical social network information, preprocess the historical social network information to obtain target historical social network information, and create a social network link training set based on the target historical social network information. The model training module is used to train the time-frequency awareness graph convolutional network based on the social network link training set to obtain the social network link prediction model. The link prediction module is used to obtain the user's social network information to be predicted, input the social network information to be predicted into the social network link prediction model, and obtain the user's social link prediction result.

[0014] Furthermore, to achieve the above objectives, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a social network link prediction program based on a time-frequency aware graph convolutional network stored in the memory and executable on the processor. When the time-frequency aware graph convolutional network-based social network link prediction program is executed by the processor, it implements the steps of the social network link prediction method based on a time-frequency aware graph convolutional network as described above.

[0015] In addition, in order to achieve the above object, the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a social network link prediction program based on a time-frequency perception graph convolution network, and the social network link prediction program based on the time-frequency perception graph convolution network realizes the steps of the social network link prediction method based on the time-frequency perception graph convolution network when executed by a processor.

[0016] In the application, historical social network information of a user is acquired, the historical social network information is preprocessed to obtain target historical social network information, and a social network link training set is created according to the target historical social network information; a time-frequency perception graph convolution network is trained and processed according to the social network link training set to obtain a social network link prediction model; predicted social network information of the user is acquired, and the predicted social network information of the user is input into the social network link prediction model to obtain a user social link prediction result. The application can not only consider single features or local spatial relationships of time series, but also take into account long-term and short-term time trends and complex spatial structures of a social network, thereby significantly improving the link prediction accuracy of the social network and improving the personalization effect of user recommendation. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 is a flowchart of a preferred embodiment of the social network link prediction method based on the time-frequency perception graph convolution network of the application; Figure 2 is a schematic diagram of the overall architecture of the social network link prediction method based on the time-frequency perception graph convolution network of the application; Figure 3 is a structural schematic diagram of the time-frequency bidirectional cross-attention network in the preferred embodiment of the application; Figure 4 is a structural diagram of a preferred embodiment of the social network link prediction system based on the time-frequency perception graph convolution network of the application; Figure 5 is a structural diagram of a preferred embodiment of the terminal of the application. DETAILED DESCRIPTION

[0018] In order to make the object, technical scheme and advantages of the application more clear and explicit, the application is further described in detail below with reference to the drawings and examples. It should be understood that the specific examples described herein are only used to explain the application and do not limit the application.

[0019] It should be noted that if the embodiments of the application involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement condition, etc. between components in a certain posture (as shown in the drawings), and if the certain posture changes, the directional indications also change accordingly.

[0020] In addition, if the description of "first", "second" and the like is involved in the embodiments of the present application, the description of "first", "second" and the like is only for the purpose of description, and cannot be understood as indicating or implying the relative importance of the indicated technical features or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can be explicitly or implicitly included at least one of the features. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the realization of the ordinary skilled in the art, when the combination of technical solutions appears contradictory or cannot be realized, it should be considered that the combination of technical solutions does not exist, nor within the protection scope required by the present application.

[0021] The social network link prediction method based on time-frequency perception graph convolution network described in the preferred embodiment of the present application, as shown in Figure 1 The social network link prediction method based on time-frequency perception graph convolution network includes the following steps: Step S10, obtaining the historical social network information of the user, preprocessing the historical social network information to obtain the target historical social network information, and creating a social network link training set according to the target historical social network information.

[0022] Specifically, in the social network application scenario, how to accurately predict the potential connection between users and the information propagation path is a key technical problem to improve the performance of the recommendation system, detect false information propagation and optimize the resource allocation of the social platform; However, the traditional method often only considers a single feature or local spatial relationship of the time series, and it is difficult to simultaneously consider the long and short term time trends and complex spatial structures of the social network, resulting in low prediction accuracy of the links of the social network. In order to solve the above problems, the present application proposes a social network link prediction method based on time-frequency perception graph convolutional network, which can fully integrate frequency domain, time domain and spatial domain information in the node prediction and link prediction tasks of the social network through TFAGCN (Time-Frequency Aware Graphical Convolutional Networks, Time-Frequency Aware Graphical Convolutional Networks). The framework corresponding to this method includes a frequency domain module, a time-space domain module and a time-frequency attention module, wherein the frequency module maps the user interaction time series to the frequency domain through DFT (Discrete Fourier Transform), learns the global time dependence relationship in the frequency domain using MLP (Multilayer Perceptron), and then restores it to the time domain through IDFT (Inverse Discrete Fourier Transform), thereby capturing the periodicity and global trend in the social network; The time-space module combines GCN (Graph Neural Network) and GRU (Gated Recurrent Unit) to model the structural relationship between user nodes and short-term dynamic interaction, thereby extracting local space-time dependent features; The time-frequency attention module designs a TF-att (Time-Frequency Bidirectional Cross-Attention Network), which weights and fuses the frequency domain features and the time domain features, highlights the time-frequency information that contributes most to the node representation and prediction, and the corresponding overall framework diagram is as shown in Figure 2 First, the DFT is used to convert the social network time domain signal into a social network frequency domain signal, and the DFT is used to convert the social network frequency domain signal back to the time domain signal; Then, GCN is used to capture the local topological features of each social network graph snapshot sequence, and the comprehensive representation learned by the GCN is input into the GRU to capture the local time dependence of the dynamic graph. In addition, the designed time-frequency bidirectional cross-attention network adaptively fuses features from different domains at each time step; Finally, a sparse penalty loss is used to achieve more accurate and reliable link prediction.

[0023] The specific processing involves acquiring data for training the time-frequency awareness graph convolutional network, namely, a social network link training set. This training set is created by obtaining the user's historical social network information. A social network is a network structure composed of nodes and relationships between them (usually represented as edges or links), and it is dynamically changing. Formally, it is represented as a sequence of social network graph snapshots. ,in, This is a snapshot of the social network graph at the first time step. This is a snapshot of the social network graph at the second time step. For the first The social network graph snapshot at time step n, where all social network graph snapshots share the same set of nodes, and each social network graph snapshot is an undirected, unweighted network, while the nth time step n... Social network graph snapshot at a time step Contains a set of nodes and a set of edges ,use express, Using an adjacency matrix (also known as a symmetric matrix). describe The corresponding static topology, where, Let be the set of real numbers. Let be the number of nodes in the set. Specifically, when the ... The first time step The node and the first There is an edge between each node, that is ,but ;otherwise ,in, For the first The first time step The node and the first The relationship between edges between nodes For the first The first time step The node and the first The relationship between edges between nodes. The prediction of social network links is defined as follows: given a previously observed sequence of social network graph snapshots... Predicting the first Social network graph snapshot at a time step The corresponding expression is: ; in, for The predicted value, For the first A snapshot of the social network graph at a specific time step. The application discloses a prediction method for social network links. After obtaining historical social network information, the historical social network information is preprocessed to obtain target historical social network information, wherein the preprocessing includes data cleaning, data conversion and data integration; the purpose of preprocessing is to remove noise and outliers to improve data quality; then, a social network graph snapshot sequence of the target historical social network information is obtained, for example, a social network graph snapshot sequence with a length of . A real social network graph snapshot sequence corresponding to the social network graph snapshot sequence is obtained; a plurality of groups of training samples are obtained according to the social network graph snapshot sequence and the real social network graph snapshot sequence, and a social network link training set is created according to all the training samples.

[0024] Step S20: training a time-frequency-aware graph convolution network according to the social network link training set to obtain a social network link prediction model.

[0025] Specifically, after the social network link training set is created, the time-frequency-aware graph convolution network needs to be trained according to the social network link training set, specifically, a group of training samples in the social network link training set is input into the time-frequency-aware graph convolution network, matrix matching is performed on a social network graph snapshot of the training sample to obtain an adjacency matrix sequence Since directly using the adjacency matrix sequence as a feature input will cause the sample to become sparse in space due to extremely high dimension, which is not conducive to learning effective rules by the model. Therefore, before domain transformation, a nonlinear transformation is used to perform dimension reduction processing on the adjacency matrix sequence to compress the feature space, so as to improve the data density and represent each node in the social network with a lower dimension; that is, the adjacency matrix sequence is subjected to dimension reduction conversion processing to obtain a social network time domain signal, and a corresponding dimension reduction conversion formula is as follows: ; Wherein, is the social network time domain signal, and are learnable parameters, is a reduced dimension, and specifically, dimension rearrangement is performed on so that .

[0026] In the past link prediction research, many works learn the time sequence characteristics of dynamic networks in the time domain, and model the time dependence through recurrent neural networks or attention networks. However, these methods learn the time characteristics at each time step in the time domain, can only see a limited window, are limited by the local receptive field, and are difficult to model long-term time dependence. After the social network time domain signal is converted into the social network frequency domain signal by the spectrum, the social network frequency domain signal reflects the comprehensive information of all time steps of any user in the social network, so that the global time variation pattern of the social network is learned more easily. In the embodiment of the application, by learning the structure of the frequency domain multilayer perception model, the social network time domain signal is converted into the real part and the imaginary part of the spectrum to learn the specific patterns of the real part and the imaginary part of the spectrum respectively, so as to capture the long-term time dependence of the social network. Specifically, the process includes two stages, namely domain transformation and frequency learning.

[0027] For domain transformation, the social network time domain signal is processed by domain transformation through discrete Fourier transform to obtain a social network frequency domain signal, wherein the discrete Fourier transform is to convert a discrete time domain signal into a discrete frequency domain signal, is commonly used in the field of signal processing and spectrum analysis, and can convert a time domain signal into a frequency domain signal for spectrum analysis, filtering and the like. The corresponding conversion formula is: ; Wherein, is the social network frequency domain signal, is a complex domain.

[0028] For frequency learning, a frequency domain multilayer perception is constructed to process the social network frequency domain signal in a complex number, and a target social network frequency domain signal is obtained. The corresponding expression is: ; Wherein, is the target social network frequency domain signal, is an activation function, is the social network frequency domain signal, is a complex weight matrix, is a complex bias, wherein: ; ; Wherein, is the first complex weight matrix, is the first complex weight matrix, is the first complex weight matrix, is the first complex weight matrix, is the first complex bias, is the first complex bias, is the first complex bias, is the first complex bias, is a complex number, and according to the rule of complex number multiplication, the expression of the target social network frequency domain signal is further expressed as: ; wherein, is the real part of the complex number, is the imaginary part of the complex number, and according to the formula, the frequency domain multilayer perception can be realized by calculating the real part and the imaginary part of the frequency component respectively.

[0029] After completing the frequency learning, the target social network frequency domain signal is converted into a time domain representation by inverse discrete Fourier transform, wherein the inverse discrete Fourier transform is the inverse operation of the discrete Fourier transform, used to return from the frequency domain to the time domain, and the signal expressed in the frequency domain is converted back to the original time domain representation, and the conversion expression is: ; wherein, is the time domain feature representation. In order to improve the training speed and generalization ability of the model, a residual connection is added, and the corresponding frequency domain feature is obtained, and the corresponding expression is: .

[0030] After that, in the embodiment of the present application, in order to capture the local network structure information and the local time information of the social network, the spatial attributes and the temporal attributes of different time steps are simulated by jointly using GCN and GRU, so as to better learn the embedding vector representation of the nodes in the dynamic social network; specifically, the spatial structure of the social network is learned by using GCN for each time step of the social network graph snapshot, and the short-term social network evolution mode is learned by using GRU for the social network graph snapshot of adjacent time steps. Considering that the attributes of the users in the social network are usually difficult to obtain, the present application uses location encoding as the feature for distinguishing different nodes in the social network; the node feature matrix of the first node is defined as: . ; wherein, is the node feature of the first node when the location encoding is , is the node feature of the first node when the location encoding is , is the dimension of the location embedding, wherein, , , and the node feature matrix of all nodes can be expressed as: .

[0031] According to the node feature matrix, the graph convolution processing is performed on each adjacent matrix in the adjacent matrix sequence, and a plurality of graph snapshot space feature structures are obtained, and the corresponding expression is: ; Among them, is a graph snapshot space feature structure, is a Laplace transform result of the adjacent matrix , is a degree matrix of , is a node feature matrix, is a learnable weight parameter; wherein, , is an identity matrix. In addition, the present application takes each graph snapshot space feature structure as the input information of the GRU to simulate the case that the social network structure evolves with time in reality, including update gate processing, reset gate processing, candidate hidden state processing and determined hidden state processing, and the corresponding expressions are respectively: ; ; ; ; Among them, is an update gate, used to determine the information needed to be transmitted at the previous moment, is a sigmoid activation function, is a hidden state of the th time step, is a graph snapshot space feature structure, is a reset gate, used to determine how much historical information to discard, is a candidate hidden state of the th time step, which controls the forgetting of historical information by using the reset gate, is a hidden state of the th time step, that is, the time domain feature, which determines the "interpolation" between the candidate hidden state and the old hidden state by the update gate, is an element-wise multiplication, , , , , and are all learnable parameters. It is worth noting that all social network graph snapshots share the same GCN unit and GRU unit to reduce the parameter amount of the model.

[0032] Subsequently, to effectively integrate frequency domain features and time domain features, i.e., long-term evolution trends and short-term evolution trends, this invention proposes a time-frequency bidirectional cross-attention network for learning the dynamic representation of nodes in a social network. The structure of the time-frequency bidirectional cross-attention network is as follows: Figure 3 As shown, by Figure 3 It can be seen that TF-att first uses frequency domain features as queries in the temporal attention neural network, extracting useful temporal information from the temporal features through a cross-attention mechanism. Similarly, TF-att uses temporal features as queries in the frequency domain attention neural network, extracting useful frequency domain information from the frequency domain features. Finally, the extracted information is summed and passed to the next GRU unit as the final hidden state of the current time step, until the last hidden state is obtained. Specifically, the frequency domain features and the temporal features are linearly processed according to the temporal attention neural network to obtain temporal attention information, wherein the temporal attention information includes the query of the temporal attention neural network, the key of the temporal attention neural network, and the value of the temporal attention neural network. The query of the temporal attention neural network is obtained by linearly processing the frequency domain features according to the temporal attention neural network. The corresponding expression is: ; in, For the first Social frequency domain characteristics at each time step These are learnable weight parameters. The dimensional information is used; the temporal features are linearly processed according to the temporal attention neural network to obtain the key of the temporal attention neural network. And the values ​​of the temporal attention neural network The corresponding expression is: ; in, For the first The hidden state at each time step, i.e., the time-domain features. and All are learnable weight parameters; similarly, frequency domain features and time domain features are linearly processed using a frequency domain attention neural network to obtain frequency domain attention information, wherein the frequency domain attention information includes the query of the frequency domain attention neural network, the key of the frequency domain attention neural network, and the value of the frequency domain attention neural network, wherein the query of the time domain attention neural network is obtained by linearly processing the time domain features using the frequency domain attention neural network. The corresponding expression is: ; in, The weight parameters are learnable; the frequency domain features are linearly processed according to the frequency domain attention neural network to obtain the key of the frequency domain attention neural network. The values ​​of the frequency domain attention neural network The corresponding expression is: ; in, and All of these are learnable weight parameters.

[0033] Subsequently, the context representations of the temporal attention information and the frequency domain attention information are calculated separately using a cross-attention mechanism. Specifically, the temporal attention information is normalized to obtain a first calculation result, and the frequency domain attention information is normalized to obtain a second calculation result. The expression for normalizing the temporal attention information is as follows: ; The expression for normalizing the frequency domain attention information is as follows: ; in, The first calculation result, For normalization function, For transpose, For dimensional information, The first calculation result is then added to the second calculation result to obtain the time-frequency feature result, which is then used as the final hidden state at the current time step. The corresponding expression is: ; in, The process involves element-wise addition; finally, the last hidden state in the time-frequency feature result is... As the final node representation of the social network, it is input into the fully connected layer to generate the social network link prediction results. The corresponding expression is: ; in, For the first The prediction results of social network links at the nth time step, i.e., the prediction of the nth time step. The adjacency matrix corresponding to the social network graph snapshots at each time step, where MLP is a multilayer perceptron. Specifically, in... In this model, except for the last layer which uses the sigmoid activation function, all other layers use the ReLU activation function.

[0034] Finally, since the social network is sparse, the connections between nodes in the social network are less than the total possible connections, resulting in a low connection density of the network; and the sparsity of the social network can lead to the model being dominated by a large number of negative samples, resulting in insufficient learning of positive samples (real links), so that the model tends to judge all prediction results as no links; therefore, when designing the loss function, the sparsity of the social network needs to be considered. In order to solve the problem of sparsity of the social network, more attention is given to the existing links in back propagation, and a loss function with sparse penalty is used in the present application, the loss value between the real social network graph snapshot sequence of the training sample and the social network link prediction result is calculated according to the loss function with sparse penalty, and the target loss value is obtained, and the corresponding expression is: ; Wherein, is the target loss value, is the penalty matrix, is the social network link prediction result of the th time step, is the adjacency matrix corresponding to the real social network graph snapshot sequence of the th time step; the expression of the penalty matrix is: ; Wherein, is the penalty coefficient, is the th element and the th element of the adjacency matrix corresponding to the real social network graph snapshot sequence of the th time step; the problem of sparsity of the social network is solved by imposing more penalties on non-zero elements.

[0035] According to the target loss value, the parameters of the time-frequency aware graph convolution network are corrected, the next group of training samples is input into the time-frequency aware graph convolution network, and the above process is repeated, which will not be repeated here; until the training condition of the time-frequency aware graph convolution network meets the preset condition, the preset condition includes that the training times reach the preset times, and the preset requirement can be determined according to the time-frequency aware graph convolution network, which will not be described in detail, and finally a trained social network link prediction model is obtained.

[0036] Further, after obtaining the trained social network link prediction model, in the embodiment of the present application, the model is verified on four public datasets, including Haggle, LH10, InVS13 and Email, wherein Haggle records the contact between people through wireless devices, the node represents a person, and the link between nodes represents the contact between people; LH10 uses RFID (Radio Frequency Identification) technology to identify the contact between people, and the data is collected in a hospital; InVS13 mainly involves the coexistence and interaction between people in the real world; Email is email data; these datasets are divided into training set, validation set and test set according to the ratio of 7:1:2, and the statistical information of the datasets is shown in Table 1.

[0037] Table 1: Statistical information of the datasets

[0038] The present application uses three common performance indicators to compare the link prediction model, which are AUC (Area Under the Curve), MR (Mean Rank) and Recall (recall rate or recall rate), wherein AUC reflects the prediction accuracy of the model; Recall reflects the identification ability of the model to positive samples, both of which are the larger the index value, the better the effect; and MR reflects the proportion of prediction errors of the model, the smaller the index value, the better the effect.

[0039] To make a systematic comparison, three types of prediction methods are selected, namely similarity index-based methods, matrix decomposition-based methods and deep learning-based methods, and several representative methods are selected from the three types of prediction methods; for similarity index-based methods: PR-CzN (hybrid similarity index) and NC-LGBM (Node Centrality-Light Gradient Boosting Machine, based on node centrality Light Gradient Boosting Machine); for matrix decomposition-based methods: LPANMF (Link Prediction by Adversarial Non-negative Matrix Factorization, link prediction based on adversarial non-negative matrix factorization) and MljFE (Joint Multi-label learning and feature extraction, joint multi-label learning and feature extraction model); for deep learning-based methods: GC-LSTM (Graph Convolution embedded LSTM, graph convolution embedded LSTM), and GCN_MA (GCN with Memory Attention, graph convolution network with memory attention mechanism) and SRG (Spatial Recursive Group, deep learning model of image super-resolution).

[0040] Then, 10 historical time step windows are used as the length of the social network graph snapshot sequence, and the average value of 5 random experiments is taken as the experimental result; for the static graph link prediction model, the last social network graph snapshot is used as the input of the model; for the TFAGCN of the application, the dimension of the reduction is set to 32, the dimension of the position embedding is set to 16, the dimension of the GCN output feature and the dimension of the GRU output hidden state are both set to 32, and the output dimension of the time-frequency bidirectional cross attention network is set to 32; during prediction, a two-layer structure is used, the last layer is set to the number of nodes, the remaining hidden layer dimensions are all set to 64, the loss function penalty coefficient is set to 2, the learning rate of the Adam optimizer is 0.0005, and the corresponding comparison experimental results are shown in Table 2.

[0041] Table 2: Comparison experimental results

[0042] As can be seen from Table 2, the TFAGCN of the application obtains the optimal performance on all data sets, in particular, although the MR performance of the TFAGCN is slightly weaker than the baseline GC-LSTM on the LH10 data set, the TFAGCN is superior to the GC-LSTM in terms of average performance. For example, compared with the matrix decomposition-based method, the TFAGCN achieves an average performance improvement of 12.7%, 7.1% and 18.6% in AUC, MR and Recall. LPANMF only considers the sparsity and spatial structure of the social network, however, the social network has obvious time dependence, resulting in relatively poor prediction performance. In addition, although MljFE considers the dynamics and topology of the network and updates the feature matrix and parameter matrix by gradient descent to complete link prediction, this simple matrix decomposition is difficult to learn complex nonlinear relationships, resulting in general prediction performance. The TFAGCN learns the node representation of the social network in a data-driven manner, so it can capture the complex spatio-temporal relationship of the social network. On the four data sets, the prediction effect of the TFAGCN is superior to that of this kind of method, especially in the performance of AUC.

[0043] In step S30, the to-be-predicted social network information of the user is obtained, and the to-be-predicted social network information is input into the social network link prediction model to obtain a user social link prediction result.

[0044] Specifically, after obtaining the social network link prediction model, the to-be-predicted social network information of the user is obtained, and the to-be-predicted social network information is input into the social network link prediction model to obtain a user social link prediction result. The application fully mines the complex structure information contained in the social network by proposing the TFAGCN framework that uniformly fuses the frequency domain, time domain and spatial domain information of the social network, improves the link prediction accuracy of the social network, and designs the time-frequency bidirectional cross-attention network, so as to adaptively fuse the frequency domain features and the time domain features, fully utilizes the advantages of frequency domain analysis and time domain analysis, and achieves the purpose of effectively expressing the node information in the social network.

[0045] Further, as shown in the social network link prediction method based on the time-frequency perception graph convolution network, Figure 4 the social network link prediction system based on the time-frequency perception graph convolution network comprises: a data processing module 51 configured to obtain historical social network information of a user, pre-process the historical social network information to obtain target historical social network information, and create a social network link training set according to the target historical social network information; Model training module 52 is used to train the time-frequency awareness graph convolutional network based on the social network link training set to obtain a social network link prediction model. Link prediction module 53 is used to obtain the user's social network information to be predicted, input the social network information to be predicted into the social network link prediction model, and obtain the user's social link prediction result.

[0046] Furthermore, such as Figure 5 As shown, based on the above-mentioned social network link prediction method based on time-frequency sensing graph convolutional network, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 5 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0047] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as program code installed on the terminal. The memory 20 may also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a social network link prediction program 40 based on a time-frequency aware graph convolutional network, which can be executed by the processor 10 to implement the social network link prediction method based on a time-frequency aware graph convolutional network in this application.

[0048] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the social network link prediction method based on time-frequency sensing graph convolutional networks.

[0049] The display 30 can be, in some embodiments, an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, etc. The display 30 is used to display information at the terminal and to display a visualized user interface.

[0050] In an embodiment, the following steps are implemented when the processor 10 executes the social network link prediction program 40 based on the time-frequency-aware graph convolution network in the memory 20: Obtaining historical social network information of a user, preprocessing the historical social network information to obtain target historical social network information, and creating a social network link training set according to the target historical social network information; Training and processing the time-frequency-aware graph convolution network according to the social network link training set to obtain a social network link prediction model; Obtaining to-be-predicted social network information of the user, inputting the to-be-predicted social network information into the social network link prediction model, and obtaining a user social link prediction result.

[0051] The obtaining historical social network information of a user, preprocessing the historical social network information to obtain target historical social network information, and creating a social network link training set according to the target historical social network information specifically includes: Obtaining historical social network information of a user, preprocessing the historical social network information to obtain target historical social network information, wherein the preprocessing includes data cleaning, data conversion, and data integration; Obtaining a social network graph snapshot sequence of the target historical social network information, and obtaining a real social network graph snapshot sequence corresponding to the social network graph snapshot sequence; Obtaining a plurality of training samples according to the social network graph snapshot sequence and the real social network graph snapshot sequence, and creating a social network link training set according to all the training samples.

[0052] The training and processing the time-frequency-aware graph convolution network according to the social network link training set to obtain a social network link prediction model specifically includes: Inputting a group of training samples in the social network link training set into the time-frequency-aware graph convolution network, performing matrix matching on a social network graph snapshot of the training sample, obtaining an adjacency matrix sequence, and performing dimension reduction conversion processing on the adjacency matrix sequence to obtain a social network time-domain signal; The time-domain signal of the social network is subjected to domain transformation processing to obtain the frequency-domain signal of the social network. The frequency-domain signal of the social network is subjected to complex number processing to obtain the frequency-domain signal of the target social network. The frequency-domain signal of the target social network is then transformed to obtain the frequency-domain features. Define the node feature matrix of the historical social network information, perform graph convolution on each adjacency matrix in the adjacency matrix sequence based on the node feature matrix to obtain multiple graph snapshot space feature structures, and perform time evolution on all graph snapshot space feature structures to obtain time domain features; The frequency domain features and the time domain features are linearly processed using a time domain attention neural network to obtain time domain attention information, and the frequency domain features and the time domain features are linearly processed using a frequency domain attention neural network to obtain frequency domain attention information. The time-domain attention information and the frequency-domain attention information are weighted and predicted to obtain the social network link prediction result. The loss value of the social network link prediction result is calculated based on the real social network graph snapshot sequence of the training samples to obtain the target loss value. The parameters of the time-frequency awareness graph convolutional network are corrected based on the target loss value. The next set of training samples is input into the time-frequency sensing graph convolutional network until the training status of the time-frequency sensing graph convolutional network meets the preset conditions, thus obtaining the trained social network link prediction model.

[0053] Specifically, the complex number processing of the frequency domain signal of the social network includes: ; The step of performing graph convolution processing on each adjacency matrix in the adjacency matrix sequence based on the node feature matrix is ​​specifically as follows: ; in, For the target social network frequency domain signal, For activation function, For social network frequency domain signals, The weight matrix is ​​a complex number. For complex bias, For the spatial feature structure of the graph snapshot, Social network graph snapshot The Laplace transform result, for The degree matrix, The node feature matrix, These are learnable weight parameters.

[0054] The time evolution includes update gate processing, reset gate processing, candidate hidden state processing, and hidden state determination processing. The time evolution of all graph snapshot space features is as follows: ; ; ; ; wherein, is an update gate, is a sigmoid activation function, is the hidden state of the th time step, is the graph snapshot space feature, is a reset gate, is the candidate hidden state of the th time step, is the hidden state of the th time step, is an element-wise multiplication, , , , , and are all learnable parameters.

[0055] The time-domain attention information and the frequency-domain attention information are weighted and predicted to obtain a social network link prediction result, and the method specifically comprises the following steps: The time-domain attention information is normalized to obtain a first calculation result, and the frequency-domain attention information is normalized to obtain a second calculation result; The first calculation result and the second calculation result are added to obtain a time-frequency feature result, and a last hidden state in the time-frequency feature result is used for link prediction to obtain a social network link prediction result; The normalization calculation of the time-domain attention information is specifically as follows: ; The normalization calculation of the frequency-domain attention information is specifically as follows: ; wherein, is the first calculation result, is a query of a time-domain attention neural network in the time-domain attention information, is a key of the time-domain attention neural network in the time-domain attention information, is a value of the time-domain attention neural network in the time-domain attention information, is a normalization function, For transpose, For dimensional information, This is the second calculation result. For querying frequency domain attention neural networks within frequency domain attention information, For frequency domain attention information, it is the key of the frequency domain attention neural network. This represents the value of the frequency domain attention neural network in the frequency domain attention information.

[0056] Specifically, the step of calculating the loss value of the social network link prediction result based on the real social network graph snapshot sequence of the training samples includes: ; in, For the target loss value, For the penalty matrix, For the first Social network link prediction results at each time step For the first The adjacency matrix corresponding to the sequence of real social network graph snapshots at each time step.

[0057] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a social network link prediction program based on a time-frequency-aware graph convolutional network, and the social network link prediction program based on a time-frequency-aware graph convolutional network, when executed by a processor, implements the steps of the social network link prediction method based on a time-frequency-aware graph convolutional network as described above.

[0058] In summary, this invention provides a method, system, terminal, and storage medium for predicting social network links based on a time-frequency aware graph convolutional network. The method includes: acquiring a user's historical social network information; preprocessing the historical social network information to obtain target historical social network information; and creating a social network link training set based on the target historical social network information; training a time-frequency aware graph convolutional network based on the social network link training set to obtain a social network link prediction model; acquiring the user's social network information to be predicted; inputting the social network information to be predicted into the social network link prediction model to obtain the user's social network link prediction result. This invention not only considers single features or local spatial relationships of time series but also takes into account the long-term and short-term time trends and complex spatial structures of social networks, thereby significantly improving the accuracy of social network link prediction and enhancing the personalization effect of user recommendations.

[0059] It should be noted that, in the present document, the terms "comprising", "comprising" or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, method, article, or apparatus that comprises a list of elements not only includes those elements, but also includes other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0060] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing relevant hardware (such as a processor, a controller, etc.) through a computer program. The program can be stored in a computer-readable computer-readable storage medium, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a magnetic disc, an optical disc, etc.

[0061] It should be understood that the application is not limited to the above examples, and those skilled in the art can make improvements or changes according to the above description, and all these improvements and changes shall fall within the protection scope of the appended claims of the present application.

Claims

1. A social network link prediction method based on a time-frequency perception graph convolution network, characterized in that, The social network link prediction method based on the time-frequency perception graph convolutional network comprises: obtaining historical social network information of a user, preprocessing the historical social network information to obtain target historical social network information, and creating a social network link training set according to the target historical social network information; training and processing a time-frequency perception graph convolutional network according to the social network link training set to obtain a social network link prediction model; obtaining to-be-predicted social network information of the user, inputting the to-be-predicted social network information into the social network link prediction model, and obtaining a user social link prediction result. 2.The social network link prediction method based on time-frequency perception graph convolutional network according to claim 1, wherein, The obtaining historical social network information of a user, preprocessing the historical social network information to obtain target historical social network information, and creating a social network link training set according to the target historical social network information specifically comprises: obtaining historical social network information of a user, preprocessing the historical social network information to obtain target historical social network information, wherein the preprocessing comprises data cleaning, data conversion and data integration; obtaining a social network graph snapshot sequence of the target historical social network information, and obtaining a real social network graph snapshot sequence corresponding to the social network graph snapshot sequence; obtaining a plurality of training samples according to the social network graph snapshot sequence and the real social network graph snapshot sequence, and creating a social network link training set according to all the training samples. 3.The social network link prediction method based on time-frequency perception graph convolutional network according to claim 1, characterized in that, The training and processing a time-frequency perception graph convolutional network according to the social network link training set to obtain a social network link prediction model specifically comprises: inputting a group of training samples in the social network link training set into the time-frequency perception graph convolutional network, performing matrix matching on a social network graph snapshot of the training sample, obtaining an adjacency matrix sequence, and performing dimension reduction conversion processing on the adjacency matrix sequence to obtain a social network time domain signal; performing domain transformation processing on the social network time domain signal to obtain a social network frequency domain signal, performing complex processing on the social network frequency domain signal to obtain a target social network frequency domain signal, and performing transformation processing on the target social network frequency domain signal to obtain a frequency domain feature; defining a node feature matrix of the historical social network information, performing graph convolution processing on each adjacency matrix in the adjacency matrix sequence according to the node feature matrix to obtain a plurality of graph snapshot space feature structures, and performing time evolution on all the graph snapshot space feature structures to obtain a time domain feature; performing linear processing on the frequency domain feature and the time domain feature according to a time domain attention neural network to obtain time domain attention information, and performing linear processing on the frequency domain feature and the time domain feature according to a frequency domain attention neural network to obtain frequency domain attention information; performing weighted prediction on the time domain attention information and the frequency domain attention information to obtain a social network link prediction result, performing loss value calculation on the social network link prediction result according to a real social network graph snapshot sequence of the training sample to obtain a target loss value, and correcting parameters of the time-frequency perception graph convolutional network according to the target loss value; Input the next group of training samples into the time-frequency perception graph convolutional network until the training condition of the time-frequency perception graph convolutional network meets a preset condition, and obtain a trained social network link prediction model. 4.The social network link prediction method based on time-frequency perception graph convolutional network according to claim 3, characterized in that, The complex processing on the social network frequency domain signal is specifically: ; The graph convolutional processing on each adjacent matrix in the adjacent matrix sequence according to the node feature matrix is specifically: ; wherein, is a target social network frequency domain signal, is an activation function, is a social network frequency domain signal, is a complex weight matrix, is a complex bias, is a graph snapshot space feature structure, is a social network graph snapshot is a Laplacian transform result of the social network graph snapshot, is is a degree matrix of the social network graph snapshot, is a node feature matrix, is a learnable weight parameter. 5.The social network link prediction method based on time-frequency aware graph convolutional network according to claim 3, characterized in that, The time evolution includes update gate processing, reset gate processing, candidate hidden state processing, and determined hidden state processing; The time evolution of all graph snapshot spatial feature structures is specifically: ; ; ; ; where, is an update gate, is a sigmoid activation function, is a hidden state at the th time step, is a graph snapshot space feature structure, is a reset gate, is a candidate hidden state at the th time step, is a hidden state at the th time step, is an element-wise multiplication, , , , , and are learnable parameters. 6.The social network link prediction method based on time-frequency perception graph convolutional network according to claim 3, characterized in that, The weighting prediction on the time domain attention information and the frequency domain attention information to obtain a social network link prediction result specifically includes: The normalization calculation on the time domain attention information to obtain a first calculation result, and the normalization calculation on the frequency domain attention information to obtain a second calculation result; The addition processing on the first calculation result and the second calculation result to obtain a time-frequency feature result, and the link prediction according to the last hidden state in the time-frequency feature result to obtain a social network link prediction result; The normalization calculation on the time domain attention information is specifically: ; The normalization calculation on the frequency domain attention information is specifically: ; wherein, is a first computation result, is a query of the temporal attention neural network in the temporal attention information, is a key of the temporal attention neural network in the temporal attention information, is a value of the temporal attention neural network in the temporal attention information, is a normalization function, is a transpose, is dimension information, is a second computation result, is a query of the frequency attention neural network in the frequency attention information, is a key of the frequency attention neural network in the frequency attention information, is a value of the frequency attention neural network in the frequency attention information. 7.The social network link prediction method based on time-frequency aware graph convolutional network according to claim 3, characterized in that, The loss value calculation on the social network link prediction result according to the real social network graph snapshot sequence of the training sample is specifically: ; wherein, is a target loss value, is a penalty matrix, is a social network link prediction result at a time step, is a real social network graph snapshot sequence corresponding adjacency matrix at a time step. 8.A social network link prediction system based on a time-frequency-aware graph convolutional network, characterized in that, The social network link prediction system based on the time-frequency perception graph convolutional network includes: The data processing module is configured to obtain historical social network information of a user, pre-process the historical social network information to obtain target historical social network information, and create a social network link training set according to the target historical social network information. The model training module is configured to train a time-frequency perception graph convolutional network according to the social network link training set to obtain a social network link prediction model. The link prediction module is configured to obtain to-be-predicted social network information of the user, input the to-be-predicted social network information into the social network link prediction model, and obtain a user social link prediction result.

9. A terminal, characterized by comprising: The terminal includes a memory, a processor, and a program stored on the memory and executable on the processor, and the program is executed by the processor to implement the steps of the social network link prediction method based on the time-frequency perception graph convolutional network in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium has a computer program stored thereon, and the computer-readable storage medium stores a social network link prediction program based on a time-frequency perception graph convolutional network, and the social network link prediction program based on the time-frequency perception graph convolutional network is executed by a processor to implement the steps of the social network link prediction method based on the time-frequency perception graph convolutional network in any one of claims 1-7.

Citation Information

Patent Citations

  • Social network link prediction method adopting knowledge graph embedding and time convolution network

    CN111784081A

  • Social network link prediction method based on perceptual neural network

    CN112508085A

  • Method for predicting social network link by using spiking neural network

    CN118134017A

  • Risk prediction method and apparatus, and device and storage medium

    WO2023065545A1