Friend attention measurement ranking method and system based on complex network graph embedding

By using graph embedding and random walk algorithms combined with the attention mechanism in complex networks, the error and efficiency problems in node attention evaluation in the existing technology are solved, and a more accurate and efficient attention ranking is achieved, which is suitable for a variety of networks. type, which improves the performance and robustness of the model.

CN113779385BActive Publication Date: 2024-10-22ZHEJIANG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110972650.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-24
Publication Date
2024-10-22
Estimated Expiration
2041-08-24

AI Technical Summary

Technical Problem

Existing technologies have errors and insufficient generalization capabilities when judging the attention and importance of nodes in complex networks. The computational overhead and time complexity are large. It is especially difficult to accurately evaluate the importance of nodes in social networks and transportation networks.

Method used

The friend attention measurement ranking method based on complex network graph embedding is used to generate user feature vectors through the LBSN2vec algorithm. Combined with the improved OLA-srec model and random walk algorithm, the attention mechanism is used to calculate the attention between users, and through Cross-screening and negative sampling technology optimize the algorithm process, simplify the model and improve computational efficiency.

Benefits of technology

It achieves more accurate and efficient node attention ranking, reduces computing overhead, improves the effect and migration of the model, is suitable for a variety of data sets and network types, and enhances the robustness and scope of application of the recommendation algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113779385B_ABST
    Figure CN113779385B_ABST
Patent Text Reader

Abstract

The method for ranking friends' attention measurement based on complex network graph embedding includes: step S1, obtaining and cleaning a data set; S2, building a social network between users; S3, sampling the hyperedges required by the model based on algorithms such as random walk; S4, generating a feature vector based on graph embedding, and then generating attention between users through an improved OLA-srec model; S5, ranking the user's friends according to the attention, and calculating the user's optimal number of friends; the present invention also includes a friend attention measurement ranking system based on complex network graph embedding, including: a preprocessing module, a network construction module, a graph embedding module, an attention calculation module, an optimal number of friends calculation and an attention ranking module; the present invention can extract the user's effective friends and the user's attention to the corresponding friends from the data set, can combine a variety of social recommendation models and improve the corresponding recommendation effect, and at the same time improve the overall robustness of the model and the adaptability of different data sets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to data mining and network node processing technology, and in particular to a method and a processing system for sorting the attention levels of key nodes in a complex network. Background Art

[0002] In recent years, with the rapid development of information technology and computer technology, network science plays an important role in various fields of life. Nowadays, the scale of these networks is becoming larger and more complex, and the difficulty of analysis and the value of application are also increasing accordingly. Therefore, judging the importance and attention of certain key nodes and other nodes in a network has become a research focus in the field of network science, and plays an important role in various networks such as communication networks, power networks, social networks and transportation networks. For example, in social networks, friend attention plays an important role in recommendation systems, correlations between users and predicting user behavior patterns. Because the importance and attention of user nodes are different, some users are opinion leaders in a certain field, while some users are just ordinary netizens. Therefore, a reasonable and effective attention ranking can help evaluate the importance of the current user node to the entire social network and the subsequent processing of network divisions such as community divisions, and also help improve the performance of the algorithm and the effect of the model. For example, in a traffic network, the importance of different traffic hubs varies. There are some nodes with large traffic volume, such as toll stations, and there are also nodes with less traffic volume, such as suburban intersections. Therefore, distinguishing and ranking the importance of these two types of nodes to other nodes and even to the entire traffic network plays an important role in traffic network analysis. However, using traditional algorithms to estimate and rank the attention and importance between nodes has certain errors in the results, and the generalization ability of such algorithms may not be strong.

[0003] The attention and importance between nodes are a kind of evaluation index to distinguish the importance of different nodes in the network. Reasonable attention ranking can effectively evaluate the importance of different nodes and help with the subsequent processing of network division. In addition, combined with the influence diffusion model, the influence of the user can be further simulated.

[0004] Patent CN202010820264.7 proposes a method for ranking the importance of network nodes using the quantum field. The main core is to use the quantum superposition characteristics to improve computing efficiency, but its computational overhead and time complexity are still very large. Summary of the invention

[0005] The present invention aims to overcome the above-mentioned shortcomings of the prior art and provide a friend attention measurement ranking method and system based on complex network graph embedding.

[0006] The present invention combines the current mainstream machine learning algorithms such as graph embedding and random walk, as well as related models of social networks such as limited attention mechanism, by changing the calculation method of some parameters of the original algorithm, that is, using the user feature vector generated by the machine learning algorithm and the user correlation coefficient obtained by combining the attention mechanism model, and sorting the friends of the user node in the current network according to the coefficient.

[0007] The technical solutions adopted by the present invention to achieve the above-mentioned invention object are as follows:

[0008] The friend attention measurement ranking method based on complex network graph embedding includes the following steps:

[0009] S1: Obtain a dataset with a scoring mechanism and clean the dataset;

[0010] S2: Through the social relationships between users and their own historical records, a hypergraph network is constructed with users and their evaluation behaviors as nodes and the friendship relationships between users as edges;

[0011] S3: Generate user feature vector and item feature vector based on LBSN2vec algorithm;

[0012] S4: Calculate the attention paid to each friend through the improved OLA-srec model;

[0013] S5: Sort the user's friends according to the degree of attention the user pays to each friend, and calculate the optimal number of friends for the corresponding user based on the positive or negative degree of attention.

[0014] Preferably, in step S1: the obtained data set file is cleaned, and a cross-screening technique is used to delete cold-start users with too few friends and celebrity users with too many friends; the specific operation is: first, delete the current users who do not meet the conditions; then check whether there are users who do not meet the conditions, and then delete the newly appeared users who do not meet the conditions; iterate repeatedly until there are no users who do not meet the conditions; this step helps to avoid the interference of cold-start users and celebrity users on the overall network while reducing subsequent computing overhead; because cold-start users generally have no effect on the overall network analysis, and even because their own characteristics are greatly different from those of general users, the final evaluation effect of the model will be reduced, while celebrity users have a greater impact on most network nodes, but this impact will interfere with the effect of the model when analyzing general users, and the model cannot be effectively evaluated.

[0015] Preferably, in step S2: since the OLA-rec model before improvement uses matrix decomposition and EM algorithm to generate variables required for calculating subsequent attention, its algorithm flow is relatively complex, and there are many variables involved in the middle, which is difficult to control, so its reproducibility and transplantability are relatively poor. Therefore, the present invention improves the vector generation module in the original model, that is, uses complex network graph embedding to generate variables required for subsequent calculations, which can not only simplify the algorithm flow, but also improve the effect of the model to a certain extent.

[0016] First, the user's social network is constructed based on the user's friend relationship as the edge. Each node in the network represents the user. Then, the user's behavior history record node is inserted based on the user node to form a hypergraph edge with the corresponding user node. The user behavior history record node on the hypergraph edge corresponds to a specific behavior of the user in the past. In order to improve the effect of feature extraction in subsequent steps, this step adopts a hypergraph topological network construction method: the friend edge reflects its social characteristics, and the behavior edge as a hyperedge reflects the user's own behavioral characteristics.

[0017] Preferably, in step S3:

[0018] S3.1: Based on a stop-and-go random walk sampling algorithm, a corresponding number of hyperedges are sampled, and a classic random walk algorithm is executed on the user's friend edge. At the same time, behavior history nodes are sampled from the corresponding user behavior hyperedge, where the user's friend edge refers to the edge formed by the user node with which the current user interacts, and the user behavior edge refers to the edge formed by the current user and its corresponding behavior node. In addition, an adjustable parameter α is used to control the proportion of each type of edge, thereby obtaining a hyperedge sample training set.

[0019] E s =2W (1)

[0020] E fr =2Wα (2)

[0021] E fi =2W(1-α) (3)

[0022] Where E s is the number of all edges, E fr is the number of friend edges, E fiis the number of user behavior edges, and W is the length of the sliding window. Compared with the general random walk algorithm, the stop-and-go random walk sampling algorithm in this step can effectively extract the features of the two edges at the same time, and can retain the independence of each edge to the greatest extent while extracting, so it is also convenient to control the ratio of the two edges to adjust the model. In addition, the sliding window-based method can ensure that the features of each user node can be collected fairly, which improves the efficiency of feature extraction.

[0023] S3.2: Use LBSN graph embedding and gradient descent algorithm on the hyperedge training set obtained in step S3.1 to obtain user feature vectors and behavior feature vectors. In the cosine coordinate system, the proximity of n nodes is maintained by minimizing the error between the hypergraph nodes and the best fitting vector. Formula (4) is the optimization objective function.

[0024]

[0025]

[0026] in is the current user node vector, is the best fitting vector, Θ is the current optimization target;

[0027] In addition, negative sampling technology is used, that is, the maximum cosine value between the negative sample node and the fitting line is added. Since negative sampling is a probability-based acceleration technology, it is necessary to optimize the expectation.

[0028] Therefore, among the n nodes collected The optimization function is corrected as follows:

[0029]

[0030] Where γ represents the number of negative samples, for expectations, is the node vector obtained by negative sampling. Then, the objective function of formula (6) is optimized and solved using the stochastic gradient descent algorithm.

[0031]

[0032]

[0033] Formula (7) and Formula (8) are the corresponding vector gradients in the stochastic gradient descent algorithm;

[0034] In this step, the reason why cosine similarity is used to maintain the similarity between the node and the fitting line is that cosine similarity is not affected by the norm dimension of the vector, which can avoid the influence of the vector norm in subsequent calculations; and the negative sampling technology can effectively reduce the amount of calculation and improve the calculation efficiency.

[0035] Preferably, in step S4: the user's attention to each friend is calculated by using the improved OLA-srec model, and the calculation steps of the algorithm are:

[0036] β iu =L / C·d(U u , U i ) (9)

[0037]

[0038]

[0039] where β iu is the intermediate variable, L is the Lipston constant, U u , U i is the feature vector of user u and i, C is the empirical parameter, k is the total number of friends of the user, α iu is the attention of user i to friend u, d(U u , U i ) is the Euclidean distance between user i and user u, λ is also an intermediate variable. In addition, the ratio of L / C can be defined as the LC rate, which is used to calculate the intermediate variable β iu ;

[0040] First, the Euclidean distance between the user and his friends is calculated based on the user's feature vector obtained in step S3.2, and then the intermediate parameter β is calculated according to formula (9). iu , and 80-120 is used as the optional range of L / C. In the experiment, λ and α are initialized to 1 / |F(i)|, where |F(i)| is the actual number of friends of the user, and then λ and α are updated iteratively according to equations (10) and (11), where the loop condition is λ k >β i,k+1 and k≤|F(i)|; finally, when the loop is finished, the obtained α is the correlation coefficient matrix between users.

[0041] Preferably, in step S5: according to the user's attention result calculated in S4, the importance of the user's friends is sorted in descending order according to the size of the attention, and the number of people with attention greater than or equal to 0 is used as the optimal number of friends of the current user.

[0042] The friend attention measurement ranking system based on complex network graph embedding of the present invention comprises: a preprocessing module, a network construction module, a graph embedding module, an attention calculation module, and an optimal friend number calculation ranking and attention ranking module;

[0043] The preprocessing module performs a cleaning operation on the acquired data set file, that is, uses a cross-screening technique to delete two extreme users in the data set who have too many or too few friends;

[0044] The network construction module first forms a social network of the user using the friend relationship of the user node as an edge, and then connects the user node with the user's behavior node as a hypergraph edge representing the user's behavior;

[0045] The graph embedding module uses random walk and other algorithms to sample the hyperedges required by the model, that is, a random walk stop method is used to sample a corresponding number of hyperedges, and a classic random walk algorithm and a negative sampling extraction algorithm are distributed on the user's friend edge and the corresponding user's behavior hyperedge to obtain a hyperedge set, and then the LBSN graph embedding and gradient descent algorithm are used on the obtained hyperedge set to obtain the user feature vector and the item feature vector;

[0046] The attention calculation module uses the improved OLA-srec model to generate the feature vector generated by the graph embedding module to obtain the attention between users;

[0047] The optimal number of friends calculation and attention ranking module sorts the user's friends in descending order according to the user's friend attention generated by the attention calculation module, and then calculates the user's optimal number of friends by adding positive and negative attention.

[0048] The preprocessing module, network construction module, graph embedding module, attention calculation module, optimal friend number calculation and attention ranking module are connected in sequence.

[0049] The beneficial effects of the present invention are:

[0050] (1) Compared with other attention models, the present invention proposes a new attention measurement method; on the one hand, because the attention of individuals is limited, it is impossible to have attention or the same attention to every other object. To be precise, most people tend to only receive information from their friends and ignore other information. The previous model algorithm ignored this point. While the amount of calculation increased, it could not improve or even reduced the accuracy of the model; on the other hand, in some models that take effective attention into account, their extraction of the feature of attention is not accurate enough, and the effect of the model needs to be improved; therefore, the present invention divides the optimal number of friends of the user by combining LBSN hypergraph embedding and the calculation and sorting of effective attention, and takes the overall attention of the optimal number of friends as the final attention of the user; at the same time, LBSN hypergraph embedding considers some characteristics of user behavior while learning user similarity features, which can more effectively extract relevant features and improve the effect of the model. In addition, the algorithm flow of the variables required for calculating the subsequent attention of the OLA-rec model before the improvement is relatively complex, and more variables need to be adjusted when training specific different models for different data sets, so its reproducibility and migration are relatively poor. To this end, the present invention uses complex network graph embedding as the vector generation module in the original model. As an end-to-end model component, it can adapt to a variety of different models and data sets by changing only a few parameters; this not only simplifies the algorithm process but also reduces its reproduction difficulty and improves the portability of the model algorithm.

[0051] (2) In today's commercial information age, recommending content that users are interested in can enable users to obtain better personalized services and reduce their search time. Merchants can also increase user stickiness to gain profits. Therefore, a large number of recommendation algorithms have emerged in academia and industry. However, most recommendation algorithms can only be applied to a certain type or a few types of data. The present invention can directly calculate the friends' attention by improving the process of extracting required data from the friend list, thereby assigning different weights to each friend. Therefore, only part of the algorithm process needs to be changed to obtain better results. Since most of today's recommendation algorithms are based on friend relationships and friend information, the present invention has a wide range of applications and can be well applied to various algorithms. While improving the effects of various algorithms, it also increases their robustness.

[0052] (3) By ranking the attention of user nodes in a complex network, we can easily distinguish the real opinion leaders in a social network, which is easy to analyze and compare. We can then further study the impact of these opinion leaders on the entire user network, which has great scientific research and commercial value.

[0053] (4) The present invention can also be applied to transportation networks and large-scale project collaboration networks. For example, in a transportation network, by sorting by "attention", it is relatively easy to distinguish the transportation nodes and hubs that have a great impact on the entire transportation network. Furthermore, it is possible to increase the construction of some small nodes with higher potential benefits, or to build some new transportation nodes to improve the efficiency of the network. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is a flow chart of the method of the present invention;

[0055] Figure 2 is a schematic diagram of executing a random walk stop;

[0056] Figure 3 It is a schematic diagram of the system structure of the present invention;

[0057] Figure 4 This is a comparison chart of model effects. DETAILED DESCRIPTION

[0058] In order to improve the efficiency of such algorithms, the present invention combines the current mainstream machine learning algorithms such as graph embedding and random walk, as well as related models of social networks such as limited attention mechanism, by changing the calculation method of some parameters of the original algorithm, that is, using the user feature vector generated by the machine learning algorithm and the user correlation coefficient obtained by combining the attention mechanism model, and sorting the friends of the user node in the current network according to the coefficient.

[0059] The technical solutions adopted by the present invention to achieve the above-mentioned invention object are as follows:

[0060] The friend attention measurement ranking method based on complex network graph embedding includes the following steps:

[0061] S1: Obtain a dataset with a scoring mechanism and clean the dataset;

[0062] S2: Through the social relationships between users and their own historical records, a hypergraph network is constructed with users and their evaluation behaviors as nodes and the friendship relationships between users as edges;

[0063] S3: Generate user feature vector and item feature vector based on LBSN2vec algorithm;

[0064] S4: Calculate the attention paid to each friend through the improved OLA-srec model;

[0065] S5: Sort the user's friends according to the degree of attention the user pays to each friend, and calculate the optimal number of friends for the corresponding user based on the positive or negative degree of attention.

[0066] In step S1: the obtained data set file is cleaned, and the cross-screening technology is used to delete cold-start users with too few friends and celebrity users with too many friends. The specific operation is: first delete the current users who do not meet the conditions; then check whether there are users who do not meet the conditions, and then delete the newly appeared users who do not meet the conditions; repeat the iteration until there are no more users who do not meet the conditions.

[0067] In step S2: first, the user's social network is constructed based on the user's friend relationship as an edge, and each node in the network represents a user. Then, the user's behavior history record node is inserted based on the user node to form a hypergraph edge with the corresponding user node. The user behavior history record node on the hypergraph edge corresponds to a specific behavior of the user.

[0068] Step S3 specifically includes:

[0069] S3.1: Based on a stop-and-go random walk sampling algorithm, a corresponding number of hyperedges are sampled, and a classic random walk algorithm is executed on the user's friend edge. At the same time, behavior history nodes are sampled from the corresponding user behavior hyperedge, where the user's friend edge refers to the edge formed by the user node with which the current user interacts, and the user behavior edge refers to the edge formed by the current user and its corresponding behavior node. In addition, an adjustable parameter α is used to control the proportion of each type of edge, thereby obtaining a hyperedge sample training set.

[0070] E s =2W (1)

[0071] E fr =2Wα (2)

[0072] E fi =2W(1-α) (3) where E s is the number of all edges, E fr is the number of friend edges, E fi is the number of user behavior edges, W is the length of the sliding window;

[0073] S3.2: Use LBSN graph embedding and gradient descent algorithm on the hyperedge training set obtained in step S3.1 to obtain user feature vectors and behavior feature vectors. In the cosine coordinate system, the proximity of n nodes is maintained by minimizing the error between the hypergraph nodes and the best fitting vector. Formula (4) is the optimization objective function.

[0074]

[0075]

[0076] in is the current user node vector, is the best fitting vector, Θ is the current optimization target;

[0077] In addition, negative sampling technology is used, that is, the maximum cosine value between the negative sample node and the fitting line is added. Since negative sampling is a probability-based acceleration technology, it is necessary to optimize the expectation.

[0078] Therefore, among the n nodes collected The optimization function is corrected as follows:

[0079]

[0080] Where γ represents the number of negative samples, for expectations, is the node vector obtained by negative sampling. Then, the objective function of formula (6) is optimized and solved using the stochastic gradient descent algorithm.

[0081]

[0082]

[0083] Formula (7) and Formula (8) are the corresponding vector gradients in the stochastic gradient descent algorithm;

[0084] In step S4: the user's attention to each friend is calculated by the improved OLA-srec model. The calculation steps of the algorithm are:

[0085] β iu =L / C·d(U u , U i ) (9)

[0086]

[0087]

[0088] where β iu is the intermediate variable, L is the Lipston constant, U u , U i is the feature vector of user u and i, C is the empirical parameter, k is the total number of friends of the user, α iu is the attention of user i to friend u, d(U u , U i ) is the Euclidean distance between user i and user u, λ is also an intermediate variable. In addition, the ratio of L / C can be defined as the LC rate, which is used to calculate the intermediate variable β iu ;

[0089] First, the Euclidean distance between the user and his friends is calculated based on the user's feature vector obtained in step S3.2, and then the intermediate parameter β is calculated according to formula (9). iu , and 80-120 is used as the optional range of L / C. In the experiment, λ and α are initialized to 1 / |F(i)|, where |F(i)| is the actual number of friends of the user, and then λ and α are updated iteratively according to equations (10) and (11), where the loop condition is λ k >β i,k+1 and k≤|F(i)|; finally, when the loop is finished, the obtained α is the correlation coefficient matrix between users.

[0090] In step S5: according to the user's attention result calculated in S4, the importance of the user's friends is sorted in descending order according to the size of the attention, and the number of people with attention greater than or equal to 0 is taken as the optimal number of friends of the current user.

[0091] The friend attention measurement ranking system based on complex network graph embedding of the present invention comprises: a preprocessing module, a network construction module, a graph embedding module, an attention calculation module, an optimal friend number calculation and attention ranking module.

[0092] The preprocessing module performs a cleaning operation on the acquired data set file, that is, uses a cross-screening technique to delete two extreme users in the data set with too many or too few friends, specifically including:

[0093] The obtained data set files are cleaned and cross-screening technology is used to delete cold-start users with too few friends and celebrity users with too many friends. The specific operation is: first delete the current users who do not meet the conditions; then check whether there are users who do not meet the conditions, and then delete the newly appeared users who do not meet the conditions; repeat the iteration until there are no more users who do not meet the conditions.

[0094] The network construction module first uses the friend relationship of the user node as an edge to form the user's social network, and then connects the user node with the user's behavior node as a hypergraph edge representing the user's behavior, specifically including:

[0095] First, the user's social network is constructed based on the user's friend relationship as the edge. Each node in the network represents a user. Then, the user's behavior history node is inserted based on the user node to form a hypergraph edge with the corresponding user node. The user behavior history node on the hypergraph edge corresponds to a specific behavior of the user.

[0096] The graph embedding module uses random walk and other algorithms to sample the hyperedges required by the model, that is, a random walk stop method is used to sample a corresponding number of hyperedges, and a classic random walk algorithm and a negative sampling extraction algorithm are distributed on the user's friend edge and the corresponding user's behavior hyperedge to obtain a hyperedge set, and then the LBSN graph embedding and gradient descent algorithm are used on the obtained hyperedge set to obtain the user feature vector and the item feature vector, specifically including:

[0097] S3.1: Based on a stop-and-go random walk sampling algorithm, a corresponding number of hyperedges are sampled, and a classic random walk algorithm is executed on the user's friend edge. At the same time, behavior history nodes are sampled from the corresponding user behavior hyperedge, where the user's friend edge refers to the edge formed by the user node with which the current user interacts, and the user behavior edge refers to the edge formed by the current user and its corresponding behavior node. In addition, an adjustable parameter α is used to control the proportion of each type of edge, thereby obtaining a hyperedge sample training set.

[0098] E s =2W (1)

[0099] E fr =2Wα (2)

[0100] E fi =2W(1-α) (3)

[0101] Where E s is the number of all edges, E fr is the number of friend edges, E fi is the number of user behavior edges, W is the length of the sliding window;

[0102] S3.2: Use LBSN graph embedding and gradient descent algorithm on the hyperedge training set obtained in step S3.1 to obtain user feature vectors and behavior feature vectors. In the cosine coordinate system, the proximity of n nodes is maintained by minimizing the error between the hypergraph nodes and the best fitting vector. Formula (4) is the optimization objective function.

[0103]

[0104]

[0105] in is the current user node vector, is the best fitting vector, Θ is the current optimization target;

[0106] In addition, negative sampling technology is used, that is, the maximum cosine value between the negative sample node and the fitting line is added. Since negative sampling is a probability-based acceleration technology, it is necessary to optimize the expectation.

[0107] Therefore, among the n nodes collected The optimization function is corrected as follows:

[0108]

[0109] Where γ represents the number of negative samples, for expectations, is the node vector obtained by negative sampling. Then, the objective function of formula (6) is optimized and solved using the stochastic gradient descent algorithm.

[0110]

[0111]

[0112] Formula (7) and Formula (8) are the corresponding vector gradients in the stochastic gradient descent algorithm;

[0113] The attention calculation module uses the improved OLA-srec model to generate the feature vector generated by the graph embedding module to obtain the attention between users, specifically including:

[0114] The improved OLA-srec model is used to calculate the user's attention to each friend. The calculation steps of the algorithm are:

[0115] β iu =L / C·d(U u , U i ) (9)

[0116]

[0117]

[0118] where β iu is the intermediate variable, L is the Lipston constant, U u , U i is the feature vector of user u and i, C is the empirical parameter, k is the total number of friends of the user, α iu is the attention of user i to friend u, d(U u , U i ) is the Euclidean distance between user i and user u, λ is also an intermediate variable. In addition, the ratio of L / C can be defined as the LC rate, which is used to calculate the intermediate variable β iu ;

[0119] First, the Euclidean distance between the user and his friends is calculated based on the user's feature vector obtained in step S3.2, and then the intermediate parameter β is calculated according to formula (9). iu, and 80-120 is used as the optional range of t / C. In the experiment, λ and α are initialized to 1 / |F(i)|, where |F(i)| is the actual number of friends of the user, and then λ and α are updated iteratively according to equations (10) and (11), where the loop condition is λ k >β i,k+1 and k≤|F(i)|; finally, when the loop is finished, the obtained α is the correlation coefficient matrix between users.

[0120] The optimal number of friends calculation and attention ranking module sorts the user's friends in descending order according to the user's friend attention generated by the attention calculation module, and then calculates the user's optimal number of friends based on the positive and negative attention. Specifically, it includes:

[0121] According to the user's attention result calculated by S4, the importance of the user's friends is sorted in descending order according to the size of the attention, and the number of people with attention greater than or equal to 0 is taken as the optimal number of friends of the current user.

[0122] The preprocessing module, network construction module, graph embedding module, attention calculation module, optimal friend number calculation and attention ranking module are connected in sequence.

[0123] As described above, the present invention takes the Yelp dataset as an example. This dataset is people's ratings of corresponding restaurants in their cities, and has friend attribute features. Therefore, after preprocessing, the attention between users is calculated based on the deep random walk, LBSN algorithm, graph embedding model and social network model, and the ranking is performed accordingly to obtain the ranking between people. And based on this ranking result, combined with the social-rec model, the user's recommendation is given. Figure 4 As shown, after comparing the other two recommendation models, it can be seen that the improved method has improved results.

[0124] The present invention can extract the user's effective friends and the user's attention to the corresponding friends from the data set, and can combine multiple social recommendation models to improve the corresponding recommendation effect, while improving the overall robustness of the model and the adaptability of different data sets.

[0125] The contents described in the embodiments of this specification are merely an enumeration of the implementation forms of the inventive concept. The protection scope of the present invention should not be regarded as limited to the specific forms described in the embodiments. The protection scope of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.

Claims

1. A friend attention measurement ranking method based on complex network graph embedding, Features: The following steps are involved: S1: Obtain a dataset with a scoring mechanism and clean the dataset; S2: Through the social relationships between users and their own historical records, a hypergraph network is constructed with users and their evaluation behaviors as nodes and the friendship relationships between users as edges; S3: Generate user feature vectors and item feature vectors based on the LBSN2vec algorithm; specifically including: S3.1: Based on a stop-and-go random walk sampling algorithm, a corresponding number of hyperedges are sampled, and a classic random walk algorithm is executed on the user's friend edge. At the same time, behavior history nodes are sampled from the corresponding user behavior hyperedge, where the user's friend edge refers to the edge formed by the user node with which the current user interacts, and the user behavior edge refers to the edge formed by the current user and its corresponding behavior node. In addition, an adjustable parameter α is used to control the proportion of each type of edge, thereby obtaining a hyperedge sample training set. E s =2W (1) AND fr =2Wα (2) E fi =2W(1-α) (3) Where E s is the number of all edges, E fr is the number of friend edges, E fi is the number of user behavior edges, W is the length of the sliding window; S3.2: Use LBSN graph embedding and gradient descent algorithm on the hyperedge training set obtained in step S3.1 to obtain user feature vectors and behavior feature vectors. In the cosine coordinate system, the proximity of n nodes is maintained by minimizing the error between the hypergraph nodes and the best fitting vector. Formula (4) is the optimization objective function. in is the current user node vector, is the best fitting vector, Θ is the current optimization target; In addition, negative sampling technology is used, that is, the maximum cosine value between the negative sample node and the fitting line is added, so that the n nodes collected The optimization function is corrected as follows: Where γ represents the number of negative samples, for expectations, is the node vector obtained by negative sampling. Then, the objective function of formula (6) is optimized and solved using the stochastic gradient descent algorithm. Formula (7) and Formula (8) are the corresponding vector gradients in the stochastic gradient descent algorithm; S4: Calculate the attention to each friend through the improved OLA-srec model; the specific calculation steps are: β iu =L / C·d(U u ,U i ) (9) where β iu is the intermediate variable, L is the Lipston constant, U u , U i is the feature vector of user u and i, C is the empirical parameter, k is the total number of friends of the user, α iu is the attention of user i to friend u, d(U u ,U i ) is the Euclidean distance between user i and user u, λ k It is also an intermediate variable. In addition, the ratio of L / C can be defined as the LC ratio; First, the Euclidean distance between the user and his friends is calculated based on the user's feature vector obtained in step S3.2, and then the intermediate parameter β is calculated according to formula (9). iu , and use 80-120 as the optional range of L / C, and then initialize λ k and α iu = 1 / |F(i)|, where |F(i)| is the actual number of friends of the user. Then, according to equations (10) and (11), λ is updated iteratively. k and α iu , where the loop condition is λ k >β i,k+1 and k≤|F(i)|; finally, when the cycle is over, the α iu is the correlation coefficient matrix between users; S5: Sort the user's friends according to the degree of attention the user pays to each friend, and calculate the optimal number of friends for the corresponding user based on the positive or negative degree of attention.

2. The friend attention measurement ranking method based on complex network graph embedding as claimed in claim 1, Features: The step S1 includes: performing a cleaning operation on the acquired data set file, using a cross-screening technique to delete cold-start users with too few friends and celebrity users with too many friends, and the specific operation is: first deleting the current users who do not meet the conditions; then checking whether there are users who do not meet the conditions, and then deleting the newly appeared users who do not meet the conditions; iterating repeatedly until there are no users who do not meet the conditions.

3. The friend attention measurement ranking method based on complex network graph embedding as claimed in claim 1, Features: The step S2 comprises: First, the user's social network is constructed based on the user's friend relationship as the edge. Each node in the network represents a user. Then, based on the user node, the user's behavior history record node is inserted to form a hypergraph edge with the corresponding user node. The user behavior history record node on the hypergraph edge corresponds to a specific behavior of the user in the past.

4. The friend attention measurement ranking method based on complex network graph embedding as claimed in claim 1, Features: The step S5 comprises: According to the user's attention result calculated in step S4, the importance of the user's friends is sorted in descending order according to the size of the attention, and the number of people with attention greater than or equal to 0 is taken as the optimal number of friends of the current user.

5. A friend attention metric ranking system based on complex network graph embedding, which implements the method as claimed in claim 1, include: Preprocessing module, network construction module, graph embedding module, attention calculation module, optimal number of friends calculation and attention ranking module; The preprocessing module performs a cleaning operation on the acquired data set file, that is, uses a cross-screening technique to delete two extreme users in the data set who have too many or too few friends; The network construction module first forms a social network of the user using the friend relationship of the user node as an edge, and then connects the user node with the user's behavior node as a hypergraph edge representing the user's behavior; The graph embedding module uses the hyperedges required by the random walk algorithm sampling model, that is, the random walk dwell method is used to sample the corresponding number of hyperedges, and the classic random walk algorithm and the negative sampling extraction algorithm are distributed on the user's friend edge and the corresponding user's behavior hyperedge to obtain a hyperedge set, and then the LBSN graph embedding and gradient descent algorithm are used on the obtained hyperedge set to obtain the user feature vector and the item feature vector; specifically, it includes: S3.1: Based on a stop-and-go random walk sampling algorithm, a corresponding number of hyperedges are sampled, and a classic random walk algorithm is executed on the user's friend edge. At the same time, behavior history nodes are sampled from the corresponding user behavior hyperedge, where the user's friend edge refers to the edge formed by the user node with which the current user interacts, and the user behavior edge refers to the edge formed by the current user and its corresponding behavior node. In addition, an adjustable parameter α is used to control the proportion of each type of edge, thereby obtaining a hyperedge sample training set. E s =2W (1) AND fr =2Wα (2) E fi =2W(1-α) (3) Where E s is the number of all edges, E fr is the number of friend edges, E fi is the number of user behavior edges, W is the length of the sliding window; S3.2: Use LBSN graph embedding and gradient descent algorithm on the hyperedge training set obtained in step S3.1 to obtain user feature vectors and behavior feature vectors. In the cosine coordinate system, the proximity of n nodes is maintained by minimizing the error between the hypergraph nodes and the best fitting vector. Formula (4) is the optimization objective function. in is the current user node vector, is the best fitting vector, Θ is the current optimization target; In addition, negative sampling technology is used, that is, the maximum cosine value between the negative sample node and the fitting line is added, so that the n nodes collected The optimization function is corrected as follows: Where γ represents the number of negative samples, for expectations, is the node vector obtained by negative sampling. Then, the objective function of formula (6) is optimized and solved using the stochastic gradient descent algorithm. Formula (7) and Formula (8) are the corresponding vector gradients in the stochastic gradient descent algorithm; The attention calculation module uses the improved OLA-srec model to generate the feature vector generated by the graph embedding module to generate the attention between users; the specific calculation steps are: β iu =L / C·d(U u ,U i ) (9) where β iu is the intermediate variable, L is the Lipston constant, U u , U i is the feature vector of user u and i, C is the empirical parameter, k is the total number of friends of the user, α iu is the attention of user i to friend u, d(U u ,U i ) is the Euclidean distance between user i and user u, λ k It is also an intermediate variable. In addition, the ratio of L / C can be defined as the LC ratio; First, the Euclidean distance between the user and his friends is calculated based on the user's feature vector obtained in step S3.2, and then the intermediate parameter β is calculated according to formula (9). iu , and use 80-120 as the optional range of L / C, and then initialize λ k and α iu = 1 / |F(i)|, where |F(i)| is the actual number of friends of the user. Then, according to equations (10) and (11), λ is updated iteratively. k and α iu , where the loop condition is λ k >β i,k+1 and k≤|F(i)|; finally, when the cycle is over, the α iu is the correlation coefficient matrix between users; The optimal number of friends calculation and attention ranking module sorts the user's friends in descending order according to the user's friend attention generated by the attention calculation module, and then calculates the user's optimal number of friends by adding positive and negative attention. The preprocessing module, network construction module, graph embedding module, attention calculation module, optimal friend number calculation and attention ranking module are connected in sequence.