An activity recommendation method, system and device based on a dynamic graph neural network
By constructing a user social relationship graph using a dynamic graph neural network and utilizing long short-term memory networks and attention mechanisms to learn the evolutionary patterns of social relationships, the problem of low recommendation accuracy in active social networks is solved, achieving higher recommendation accuracy.
Patent Information
- Application Number
- CN202510384846.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-03-28
AI Technical Summary
Existing activity recommendation systems based on social networks cannot accurately capture the temporal changes in a user's social network and the closeness of relationships between users, thus affecting the accuracy of activity recommendations.
A user social relationship graph is constructed using a dynamic graph neural network. The evolution of the social relationship graph is learned by using a long short-term memory network. By combining an attention mechanism and a graph convolutional neural network, the social features between users are calculated. An activity recommendation model is built based on a multilayer perceptron to predict users' preferences for target activities.
This improves the accuracy of activity recommendations, better reflecting the dynamic changes in users' social relationships and enhancing the accuracy of recommendations.
Smart Images

Figure CN119884497B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of social networks, in particular to an activity recommendation method, system and device based on a dynamic graph neural network. BACKGROUND
[0002] At present, in the recommendation system of an event-based social network (EBSN), a graph neural network is gradually used to mine the connection between users. Unlike traditional social media, an event-based social network focuses on the behavior between users in a specific event. The event in the EBSN has a relatively short life cycle, the social relationship between users is constantly changing, and the social strength between users is different. The existing recommendation method cannot accurately capture the timing changes of the user social network and the difference in the relationship between users, thereby affecting the accuracy of the prediction of the activity recommendation. SUMMARY
[0003] The present application aims to provide an activity recommendation method, system and device based on a dynamic graph neural network to solve at least one of the above technical problems in the prior art.
[0004] In a first aspect, to solve the above technical problems, the present application provides an activity recommendation method based on a dynamic graph neural network, comprising the following steps:
[0005] Step 1, crawling an activity data set from a social website.
[0006] In a feasible implementation, the activity data set includes activity information data, activity member data and user interest group data.
[0007] Step 2, extracting activity features from the activity data set; including activity features in user features based on user participation in activities; dynamically constructing a social relationship graph of the user based on the user features; learning the evolution law of the social relationship graph through a long short-term memory network to obtain social aggregated user features.
[0008] In a feasible implementation, the activity features include activity content features and activity context features; the activity content features include activity title features, activity label features, activity type features and activity description features; the activity context features include activity holding time features and activity holding location features.
[0009] In an implementable embodiment, the specific method of extracting the activity type feature is: encoding the activity type by one-hot encoding, representing each activity type in the activity information data as a vector; in each activity type feature vector, only the index position of the activity type is valued as 1, and the remaining index positions are valued as 0; define to represent the activity type feature of the i-th activity.
[0010] In an implementable embodiment, the specific method of extracting the activity title feature, the activity label feature and the activity description feature is: combining the activity title, the activity label and the activity description in the activity information data into a continuous text; after performing word segmentation and removing stop words on the continuous text, a hash text is obtained; extracting the activity topic feature from the hash text by the LDA topic model, calculating the distribution of each activity on the topic, and obtaining the activity text feature; define to represent the activity text feature of the i-th activity.
[0011] In an implementable embodiment, the activity holding time feature includes week feature and day feature, which facilitates to reflect the periodic characteristics that activities are intensively held on weekends or after work on weekdays.
[0012] In an implementable embodiment, the week feature includes weekdays (i.e. Monday to Friday) and weekends (i.e. Saturday and Sunday), for counting the number of days that each activity is held on weekdays and / or weekends; the week feature is represented as a binary distribution; define to represent the week feature of the i-th activity.
[0013] In an implementable embodiment, the day feature is used to count the start time of the activity holding; define to represent the day feature of the i-th activity.
[0014] In an implementable embodiment, the activity holding location feature, i.e. the space feature, is used to count the latitude and longitude of the activity holding location; define to represent the space feature of the i-th activity.
[0015] In an implementable embodiment, the activity feature, in a specific vector form, can be represented as:
[0016] ;
[0017] Wherein, indicates the feature splicing.
[0018] In a feasible implementation, the dynamic construction method of the social relationship graph comprises:
[0019] Step a1, in the user joining the interest group data and the active member data, the users in the same interest group and participating in the same activity are screened;
[0020] The activities participated in by a user are sorted according to the holding time to obtain a set of activity sequences with time , indicates the total number of activities; define indicates the activity set participated in by the first user, indicates the activity set participated in by the first user, indicates the activity set participated in by the first user and the first user, and the specific expression is:
[0021] ;
[0022] define indicates the interest group set joined by the first user, indicates the interest group set joined by the first user, indicates the interest group set joined by the first user and the first user, and the specific expression is:
[0023] ;
[0024] Step a2, define indicates the social relationship graph between users; the node in the graph indicates the user; the edge in the graph indicates the social relationship between the users, and the specific expression is:
[0025] ;
[0026] Wherein, indicates the social relationship between the first user and the first user, indicates the number of interest groups joined by the first user and the first user, indicates the number of activities participated in by the first user and the first The number of activities that the user has participated in together with other users;
[0027] Step a3, adding time stamps to the social relationship graph of different time periods in chronological order to obtain a time series static graph and a corresponding adjacency matrix , so as to reflect the evolution characteristics of the change of user interest over time;
[0028] Step a4, learning the social features of the user in the time series static graph through the attention mechanism and the graph convolutional neural network GCN: the attention mechanism is used for neighborhood node aggregation to reflect the degree of influence of the user features by the social relationship (the node associated with it, i.e. the neighborhood); a plurality of graph convolutional neural networks GCN and a plurality of time series static graphs correspond to each other, and the social features of the user in the time series static graph are learned through the graph convolutional neural network GCN. Figure One A corresponding social network sequence of the user is dynamically constructed according to the time sequence.
[0029] In a feasible implementation, the specific calculation formula of the attention mechanism in step a4 includes:
[0030] The weight calculation formula between nodes:
[0031] ;
[0032] Wherein, represents the weight between node and node ; represents the feature representation of node in the graph; represents the feature representation of node in the graph; represents the exponential function; represents the similarity function, which is used to calculate the similarity between nodes; represents the neighbor node set of node , and contains the edge of node pointing to itself ;
[0033] The calculation formula of the aggregated neighborhood feature of the node:
[0034] ;
[0035] Wherein, represents the feature representation of the aggregated neighborhood of node .
[0036] In a feasible implementation, the specific method of learning the evolution law of the social relationship graph includes:
[0037] The graph convolutional neural network in step a4 is embedded into an LSTM (Long Short-Term Memory) model to learn the time dependence between social relationship graphs, so as to better understand the user behavior and social relationship in the social network. The specific expression includes:
[0038] ;
[0039] wherein, represents the forget gate at the time t; represents the adjacency matrix of the social relationship graph at the time t; represents the adjacency matrix of the social relationship graph at the time t; represents the adjacency matrix of the social relationship graph at the time t; represents the adjacency matrix of the social relationship graph at the time t; represents the adjacency matrix of the social relationship graph at the time t; represents the calculation process of the graph convolutional neural network; represents the input gate at the time t; represents the value of the candidate memory cell at the time t; represents the value of the candidate memory cell at the time t; represents the memory value after forgetting at the time t; represents the memory value after forgetting at the time t; represents the output gate at the time t, i.e. the output feature; represents the output gate at the time t, i.e. the output feature; represents the output gate at the time t, i.e. the output feature; represents the hidden state of the LSTM model at the time t; represents the hidden state of the LSTM model at the time t; represents the hidden state of the LSTM model at the time t; represents the hidden state of the LSTM model at the time t; represents the weight matrix, which is a parameter to be learned; represents the bias parameter, which is also a parameter to be learned; represents the Sigmoid activation function; represents the tangent function; represents the matrix multiplication.
[0040] Step 3, based on the feature similarity between the user features of each user and the activity features of each target activity, the preference value of each user for the target activity is calculated through a multi-layer perception, an activity recommendation model (DERGCN for short) is constructed, the preference value of the user for the target activity is predicted, and after sorting all the predicted values of all users for all target activities, several target activities most preferred (most likely to participate) by the target user are recommended.
[0041] In a feasible implementation, the feature similarity is specifically calculated according to the following formula:
[0042] ;
[0043] wherein, represents a similarity function used to calculate the similarity between features.
[0044] In a feasible implementation, the specific calculation formula of the preference value is:
[0045]
[0046] wherein, represents the preference value of the i-th user to the j-th target activity; represents the weight matrix of the hidden layer of the multi-layer perception; represents the bias term of the hidden layer of the multi-layer perception; represents the ReLU activation function of the hidden layer of the multi-layer perception; represents the Sigmoid activation function of the output layer of the multi-layer perception. In a feasible implementation, the loss function of the activity recommendation model is a BCE loss function, and the BCE loss function value is smaller when the predicted value is closer to the actual value, and the specific formula is:
[0047]
[0048]
[0049] wherein, represents the sample size of the training data set, and in the training data set: when the user actually participates in the activity, the label is marked as 1; when the user actually does not participate in the activity, the label is marked as 0;
[0050] represents the true value of whether the i-th user participates in the activity; represents the probability of the activity recommendation model predicting whether the i-th user will participate in the activity; represents a regularization coefficient; represents a regularization term. In a feasible implementation, when training the activity recommendation model, the model parameters are updated by the gradient descent method.
[0051] In a second aspect, based on the same inventive concept, the present application also provides an activity recommendation system based on a dynamic graph neural network, comprising a data crawling module, a data processing module and a result generation module.
[0052] The data crawling module is used to crawl an activity data set from a social website.
[0053] The data processing module comprises an extraction unit and a prediction unit.
[0054] The data processing module comprises an extraction unit and a prediction unit.
[0055] The extraction unit is configured to extract activity features from the activity data set, include activity features that the user has participated in into the user features, and dynamically construct a social relationship graph of the user based on the user features.
[0056] The prediction unit is configured to calculate a preference value of each user for a target activity based on a feature similarity between the user features of each user and the activity features of each target activity, construct an activity recommendation model by using a multi-layer perception machine, predict the preference value of the user for the target activity, sort the predicted values of all users for all target activities, and recommend a plurality of target activities that are most preferred (most likely to participate in) to the target user.
[0057] The result generation module is configured to send out the plurality of target activities that are most preferred (most likely to participate in) to the target user.
[0058] In a third aspect, based on the same inventive concept, the present application also provides an activity recommendation device based on a dynamic graph neural network, which comprises a processor, a memory and a bus, the memory stores instructions and data read by the processor, and the processor is configured to call the instructions and data in the memory to execute the activity recommendation method based on the dynamic graph neural network as described above, and the bus is connected between each functional component for transmitting information.
[0059] By adopting the above technical solution, the present application has the following beneficial effects:
[0060] The activity recommendation method, system and device based on the dynamic graph neural network provided by the present application can construct a dynamic social network according to the dynamic behavior of the user, capture the change of the user social network in time sequence by using a long short-term memory network, calculate the relationship weight between different users by introducing an attention mechanism, make the social relationship calculation between users more reliable, and thus achieve higher activity recommendation accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0061] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the drawings needed in the specific embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0062] Figure 1 A flowchart of an activity recommendation method based on a dynamic graph neural network is provided for the embodiments of the present application.
[0063] Figure 2A DERGCN model architecture diagram provided for an embodiment of the present application;
[0064] Figure 3 A dynamic graph neural network-based activity recommendation system diagram provided for an embodiment of the present application;
[0065] Figure 4 A DERGCN model ablation experiment recall rate comparison diagram provided for an embodiment of the present application;
[0066] Figure 5 A DERGCN model ablation experiment normalized loss cumulative gain comparison diagram provided for an embodiment of the present application;
[0067] Figure 6 A DERGCN model cold start experiment recall rate comparison diagram provided for an embodiment of the present application;
[0068] Figure 7 A DERGCN model cold start experiment normalized loss cumulative gain comparison diagram provided for an embodiment of the present application. DETAILED DESCRIPTION
[0069] The technical solutions of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0070] In the description of the present application, it should be noted that the orientations or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", "third" are only for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0071] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connection" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0072] The application will be further explained in conjunction with specific embodiments.
[0073] It should be further noted that the following specific embodiments or specific embodiments are a series of optimized setting methods listed by the application to further explain the specific invention content, and these setting methods can be used in combination or in association with each other.
[0074] Embodiment one:
[0075] As shown in Figures 1-2 , the activity recommendation method based on dynamic graph neural network provided by the embodiment includes the following steps:
[0076] Step 1, crawling activity data set from social website (such as Douban city).
[0077] Further, the activity data set includes activity information data, activity member data and user joining interest group data.
[0078] Step 2, extracting activity features from the activity data set; including activity features of activities participated by users in user features; based on user features, dynamically constructing social relationship graph of users; learning evolution law of social relationship graph through long short-term memory network to obtain social aggregated user features.
[0079] Further, the activity features include activity content features and activity context features; the activity content features include activity title features, activity label features, activity type features and activity description features; the activity context features include activity holding time features and activity holding place features.
[0080] Further, the specific method for extracting activity type features is: encoding activity type through one-hot encoding, representing each activity type in activity information data as a vector (such as a 13-dimensional vector); in each activity type feature vector, only the index position of the activity type is 1, and the rest of the index positions are 0; define to represent the activity type features of the th activity .
[0081] Further, the specific method for extracting activity title features, activity label features and activity description features is: combining activity title, activity label and activity description in activity information data into a continuous text; after word segmentation and stop word removal processing of the continuous text, a hash text is obtained; through the conventional LDA topic model algorithm, activity topic features are extracted from the hash text, the distribution of each activity on the topic is calculated, and activity text features are obtained; define to represent the activity text features of the th activity The activity text features.
[0082] Furthermore, the time characteristics of the events include weekly and daily characteristics, which helps to reflect the periodicity of events occurring frequently on weekends or after get off work on weekdays.
[0083] Further, the weekly feature includes weekdays (i.e., Monday to Friday) and weekends (i.e., Saturday and Sunday), used to count the number of days each activity is held on weekdays and / or weekends; the weekly feature is represented as a binary distribution; defined Indicates the first Activities Weekly characteristics.
[0084] Furthermore, the daily feature is used to statistically determine the start time of an event; defined... Indicates the first Activities The characteristics of the day.
[0085] Furthermore, the location characteristics of the event, i.e., spatial characteristics, are used to statistically determine the latitude and longitude of the event location; defined... Indicates the first Activities Spatial characteristics.
[0086] Furthermore, the activity feature, specifically in vector form, can be represented as follows:
[0087] ;
[0088] in, This indicates feature splicing.
[0089] Furthermore, methods for dynamically constructing social relationship graphs include:
[0090] Step a1: Filter users who are in the same interest group and have participated in the same activities from the user's data on joining interest groups and activity members (such users often have social relationships).
[0091] Sort the activities a user has participated in by their event dates to obtain a sequence of events with dates. , Represents the total number of activities; Definition Indicates the first A collection of activities that a user has participated in. Indicates the first A collection of activities that a user has participated in. Indicates the first The user and the first The set of activities that users have participated in together, specifically expressed as:
[0092] ;
[0093] Definition represents the set of interest groups that the th user joins, represents the set of interest groups that the th user joins, represents the set of interest groups that the th user and the th user join together, and the specific expression is:
[0094] ;
[0095] Step a2, redefinition represents the social relationship graph (social network) between users; the node in the graph represents a user; the edge in the graph represents the social relationship between users, and the specific expression is:
[0096] ;
[0097] wherein, represents the social relationship between the th user and the th user, represents the number of interest groups that the th user and the th user join together, represents the number of activities that the th user and the th user have participated in together;
[0098] Step a3, add time stamps to the social relationship graphs of different time periods in chronological order to obtain time series static graphs and the corresponding adjacency matrices , so as to reflect the evolution characteristics of the change of user interest over time;
[0099] Step a4, learn the social features of users in the time series static graph through the attention mechanism (Attention) and the graph convolutional neural network (GCN): the attention mechanism is used for neighborhood node aggregation to reflect the degree to which the user features are affected by the social relationship (the node associated with it, i.e., the neighborhood); a plurality of said graph convolutional neural networks GCN correspond to a plurality of said time series static Figure One graphs, and a social network sequence divided by the user according to the time sequence is dynamically constructed.
[0100] Further, the specific calculation formula of the attention mechanism in step a4 includes:
[0101] The weight calculation formula between nodes is:
[0102] ;
[0103] wherein, denotes the weight between nodes and ; denotes the feature representation of node in the graph; denotes the feature representation of node in the graph; denotes the exponential function; denotes the similarity function used to calculate the similarity between nodes; denotes the neighbor node set of node , and contains node pointing to itself edge ;
[0104] The calculation formula of the node aggregated neighborhood feature is:
[0105] ;
[0106] wherein, denotes the feature representation of the aggregated neighborhood of node .
[0107] Further, the specific method for learning the evolution rule of the social relationship graph comprises:
[0108] The graph convolutional neural network in step a4 is embedded into the LSTM model to learn the time dependence between the social relationship graphs, so as to better understand the user behavior and social relationship in the social network, and the specific expression comprises:
[0109] ;
[0110] wherein, denotes the forget gate at time ; denotes the adjacency matrix of the social relationship graph at time ; denotes the adjacency matrix of the social relationship graph at time output by the graph convolutional neural network; denotes the calculation process of the graph convolutional neural network; denotes the input gate at time ; denotes the value of the candidate memory cell at time ; denotes the memory value after forgetting at time ; express The output gate at each time step, i.e., the output feature; Indicates that the LSTM model is in The hidden state at any given moment; Indicates that the LSTM model is in The hidden state at any given moment; The weight matrix represents the parameters that need to be learned. This represents the deviation parameter, which is also a parameter that needs to be learned; This represents the Sigmoid activation function; Represents the tangent function; This represents matrix multiplication.
[0111] Step 3: Based on the feature similarity between the user characteristics of each user and the activity characteristics of each target activity, calculate the preference value of each user for the target activity through a multilayer perceptron (MLP), construct an activity recommendation model (DERGCN) to predict the user's preference value for the target activity, sort the predicted values of all users for all target activities, and recommend the most preferred (most likely to participate) target activities to the target user.
[0112] Furthermore, the feature similarity The specific calculation formula is as follows:
[0113] ;
[0114] in, This represents a similarity function used to calculate the similarity between features.
[0115] Furthermore, the specific formula for calculating the preference value is as follows:
[0116] ;
[0117] in, Indicates the first The user on the first Preference values for each target activity; This represents the weight matrix of the hidden layer of a multilayer perceptron; This represents the bias term of the hidden layer of a multilayer perceptron; This represents the ReLU activation function of the hidden layer of a multilayer perceptron. This represents the Sigmoid activation function of the output layer of a multilayer perceptron.
[0118] Furthermore, the loss function of the activity recommendation model is the BCE loss function, and the closer the predicted value is to the actual value, the smaller the BCE loss function value is. The specific formula is as follows:
[0119] ;
[0120] wherein, denotes the sample size of the training data set, and in the training data set: when the user actually participated in the activity, the label is marked as 1; when the user actually did not participate in the activity, the label is marked as 0;
[0121] denotes the true value of whether the i-th user participates in the activity; denotes the probability that the i-th user participates in the activity predicted by the activity recommendation model; denotes the probability that the i-th user participates in the activity predicted by the activity recommendation model; denotes the regularization coefficient; denotes the regularization term. Further, the activity recommendation model updates the model parameters by gradient descent method during training.
[0122] Embodiment Two:
[0123] As shown in the figure, the embodiment provides an activity recommendation system based on a dynamic graph neural network, comprising a data crawling module, a data processing module and a result generation module;
[0124] Figure 3 The data crawling module is configured to crawl an activity data set from a social website.
[0125] The data processing module comprises an extraction unit and a prediction unit.
[0126] The extraction unit is configured to extract activity features from the activity data set; include activity features that the user has participated in into user features; dynamically construct a social relationship graph of the user based on the user features; learn the evolution law of the social relationship graph through a long short-term memory network to obtain social aggregated user features.
[0127] The prediction unit is configured to calculate a preference value of each user for a target activity based on the feature similarity between the user features of each user and the activity features of each target activity through a multi-layer perception machine, construct an activity recommendation model, predict the preference value of the user for the target activity, sort the predicted values of all users for all target activities, and recommend a number of target activities that the target user prefers most (most likely to participate in) to the target user.
[0128] The result generation module is configured to send out the number of target activities that the target user prefers most (most likely to participate in) to the target user.
[0129] Embodiment Three:
[0130] As shown in the figure, the embodiment provides an activity recommendation system based on a dynamic graph neural network, comprising a data crawling module, a data processing module and a result generation module;
[0131] The embodiment provides an activity recommendation device based on a dynamic graph neural network, which comprises a processor, a memory and a bus, the memory stores instructions and data read by the processor, the processor is used for calling the instructions and data in the memory to execute the activity recommendation method based on the dynamic graph neural network as described above, and the bus is connected between each functional component for transmitting information.
[0132] In yet another implementation form of the solution, the solution can also be implemented by means of an integrated device, which can comprise corresponding modules for performing each or several of the steps of the respective implementation forms described above. The modules can be one or more hardware modules specially configured to perform the respective steps, or they can be implemented by a processor configured to perform the respective steps, or they can be stored in a computer-readable medium for implementation by a processor, or they can be implemented by some combination.
[0133] The processor performs the various methods and processes described above. For example, the method implementation forms in the solution can be implemented as a software program tangibly embodied in a machine-readable medium, such as a memory. In some implementation forms, part or all of the software program can be loaded and / or installed via the memory and / or communication interface. When the software program is loaded into the memory and executed by the processor, one or more steps of the methods described above can be performed. Alternatively, in other implementation forms, the processor can be configured to perform one of the methods described above by any other suitable means, for example, by means of firmware.
[0134] The device can be implemented with a bus architecture. The bus architecture can comprise any number of interconnecting buses and bridges, depending on the specific application of the hardware and overall design constraints. The bus will connect various circuits of the one or more processors, memories, and / or hardware modules together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, power management circuits, external antennas, and the like.
[0135] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like.
[0136] Embodiment four:
[0137] The DERGCN model in embodiment one is compared with existing models for experimental comparison:
[0138] Activity dataset: The city one data (from July 2020 to July 2021) and the city two data (from February 2022 to February 2023) obtained from social websites (such as Douban City) through python crawler technology, details as shown in Table 1;
[0139]
[0140] The label of the record of the user and the activity interaction is marked as 1, the data is negatively sampled, and 50 negative samples of non-interaction are randomly sampled for each positive sample. The interaction data of users and activities in the first ten months of the activity holding time are selected as the training set, and the interaction data of users and activities in the last two months of the activity holding time are selected as the test set.
[0141] Evaluation criteria: recall rate (Recall) and normalized discounted cumulative gain (NDCG);
[0142] Recall rate , used to calculate the proportion of the list of activities recommended by the model for the user to participate in in the set of activities actually participated by the user, the specific calculation formula is:
[0143] ;
[0144] Among them, represents the list of activities most preferred (most likely to participate) by the model recommended for the user; represents the number of users in the test set; represents the list of activities actually participated by the user;
[0145] Normalized discounted cumulative gain, used to calculate the ranking quality of the information retrieval system based on the relevance and ranking of the retrieval results, the specific calculation formula includes:
[0146] ;
[0147] ;
[0148] Among them, represents the discounted cumulative gain; represents the maximum DCG value in the ideal case, which can make the value of range between 0~1; represents the length of the list of activities most preferred (most likely to participate) by the model recommended for the user; represents the position sequence number of the activity in the list of activities most preferred (most likely to participate) by the model recommended for the user.
[0149] Comparison models: TrustSVD model, DiffNet model, and ERGCN model;
[0150] TrustSVD model is a recommendation algorithm based on trust relationships. It models the trust relationship between users as user embedding vectors and learns the embedding vectors of users and items through matrix factorization to make recommendations.
[0151] The DiffNet model uses graph neural networks to extract users' social features and features of items that users interact with, and combines the influence of users' social features and historical behavior to make recommendations.
[0152] The ERGCN model uses user behavior to build a social network, aggregates features between users through a graph neural network, and makes activity recommendations based on the similarity between user features and activity features.
[0153] Comparison results:
[0154] Will Set the value to 10 and calculate the recall rate for each model. and normalized loss cumulative gain The details are shown in Table 2.
[0155]
[0156] As shown in Table 2, the DERGCN model performs best. Specifically, the TrustSVD model only incorporates user trust relationships into the matrix factorization model, failing to accurately describe the impact of social relationships on user participation in decision-making. While the DiffNet model uses a graph convolutional neural network to model user social networks, it does not consider changes in user social relationships. Therefore, both models have relatively poor recommendation performance. Compared to the ERGCN model, the DERGCN model incorporates the dynamic changes in user social relationships and adds an attention mechanism to social network aggregation. In the comparison of these two models, They increased by 16.3% and 11.2% respectively. These figures increased by 25.1% and 15.7% respectively.
[0157] Furthermore, ablation experiments were conducted on the DERGCN model using a single model and cold start experiments using multiple models.
[0158] In the ablation experiments, the DERGCN-D model was an activity recommendation model using a graph convolutional neural network (GCN) with the dynamic graph omitted, while the DERGCN-A model was an activity recommendation model with the attention mechanism omitted; recall rate Comparison results, such as Figure 4 As shown; Normalized loss cumulative gain Comparison results, such as Figure 5 As shown; by Figures 4-5 The comparison results show that the dynamic graph network and attention mechanism have a positive feedback effect on the DERGCN model, and can effectively improve the participation in activity recommendation through the dynamic graph network and attention mechanism.
[0159] In the cold start experiment, users who had participated in fewer than 5 activities were defined as cold start users. The recall rates of TrustSVD, DiffNet, ERGCN, and DERGCN models when recommending the 10 most preferred (most likely to participate) target activities to cold start users were compared. and normalized loss cumulative gain , specifically Figures 6-7 As shown, the results demonstrate that the DERGCN model... Value and The values are all the highest, which is the most effective way to alleviate the cold start problem of the activity recommendation.
[0160] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An activity recommendation method based on dynamic graph neural networks, characterized in that, include: Step 1: Crawl activity datasets from social networking sites; the activity datasets include activity information data, activity member data, and user interest group data; Step 2: Extract activity features from the activity dataset; incorporate the activity features that the user has participated in into the user features; dynamically construct the user's social relationship graph based on the user features; learn the evolution law of the social relationship graph through a long short-term memory network to obtain the user features of social aggregation; the activity features include activity content features and activity context features. The activity content features include activity title features, activity tag features, activity type features, and activity description features; the activity context features include activity time features and activity location features. The specific method for extracting activity type features is as follows: Activity types are encoded using one-hot encoding, representing each activity type in the activity information data as a vector; in each activity type feature vector, only the index position of the activity's type is set to 1, while the remaining index positions are set to 0; (Definition) Indicates the first Activities Activity type characteristics; The specific method for extracting activity title features, activity tag features, and activity description features is as follows: The activity title, activity tag, and activity description from the activity information data are combined into a continuous text; after word segmentation and stop word removal of the continuous text, a hash text is obtained; using the LDA topic model, activity topic features are extracted from the hash text, and the distribution of each activity on the topic is calculated to obtain the activity text features; Define... Indicates the first Activities The activity text features; The timing characteristics of the event include weekly and daily characteristics; The weekly feature includes weekdays and weekends, used to count the number of days each activity is held on weekdays and / or weekends; the weekly feature is represented as a binary distribution; defined... Indicates the first Activities Weekly characteristics; The daily feature is used to count the start time of an event; defined Indicates the first Activities The characteristics of the day; The location characteristics of the event, i.e., spatial characteristics, are used to calculate the latitude and longitude of the event location; [Definition] Indicates the first Activities Spatial characteristics; The activity features are specifically represented in vector form as follows: ; in, Indicates feature splicing; Methods for dynamically constructing social relationship graphs include: Step a1: In the user group joining data and activity member data, filter users who are in the same interest group and have participated in the same activity: Sort the activities a user has participated in by their event dates to obtain a sequence of events with dates. , Represents the total number of activities; Definition Indicates the first A collection of activities that a user has participated in. Indicates the first A collection of activities that a user has participated in. Indicates the first The user and the first The set of activities that users have participated in together, specifically expressed as: ; definition Indicates the first A collection of interest groups joined by a user Indicates the first A collection of interest groups joined by a user Indicates the first The user and the first A collection of interest groups that all users have joined, specifically expressed as: ; Step a2, redefine A graph representing the social relationships between users; nodes in the graph. The graph represents users; the edges in the graph represent the social relationships between users, specifically expressed as: ; in, Indicates the first The user and the first Social relationships between users Indicates the first The user and the first The number of interest groups that each user has joined. Indicates the first The user and the first The number of activities that each user has participated in together; Step a3: Add timestamps to the social relationship graph for different periods in chronological order to obtain a time-series static graph and the corresponding adjacency matrix. ; Step a4: Learn the social features of users in the time series static graph through attention mechanism and graph convolutional neural network: The attention mechanism is used to aggregate neighborhood nodes; multiple graph convolutional neural networks correspond one-to-one with multiple time series static graphs to dynamically construct a social network sequence of users divided according to time order; Step 3: Based on the feature similarity between the user features of each user and the activity features of each target activity, calculate the preference value of each user for the target activity through multilayer perceptron, construct an activity recommendation model, predict the user's preference value for the target activity, sort the predicted values of all users for all target activities, and recommend the most preferred target activities to the target user; The feature similarity The specific calculation formula is as follows: ;in, This represents a similarity function used to calculate the similarity between features; The specific formula for calculating the preference value is as follows: ; in, Indicates the first The user on the first Preference values for each target activity; This represents the weight matrix of the hidden layer of a multilayer perceptron; This represents the bias term of the hidden layer of a multilayer perceptron; This represents the ReLU activation function of the hidden layer of a multilayer perceptron. This represents the Sigmoid activation function of the output layer of a multilayer perceptron. The loss function of the activity recommendation model is the BCE loss function, and the closer the predicted value is to the actual value, the smaller the BCE loss function value is. The specific formula is as follows: ; in, This indicates the sample size of the training dataset. In the training dataset, the label is 1 when a user actually participates in the activity, and 0 when a user does not actually participate in the activity. Indicates the first The true value of whether a user participated in the activity; This indicates that the activity recommendation model predicts the first... The probability of whether an individual user will participate in the activity; Represents the regularization coefficient; This represents the regularization term.
2. The method according to claim 1, characterized in that, The specific calculation formula for the attention mechanism in step a4 includes: Formula for calculating the weight between nodes: ; in, Represents a node and nodes Weights between them; Represents a node Feature representation in the diagram; Represents a node Feature representation in the diagram; Represents an exponential function; This represents a similarity function used to calculate the similarity between nodes; Represents a node The set of neighboring nodes, containing nodes The side pointing to itself ; Formula for calculating the clustered neighborhood features of a node: ; in, Represents a node Feature representation of aggregated neighborhoods.
3. The method according to claim 2, characterized in that, Specific methods for learning the evolutionary patterns of social relationship graphs include: The graph convolutional neural network from step a4 is embedded into the long short-term memory model to learn the temporal dependencies between social relationship graphs. The specific expressions include: ; in, express The Gate of Forgetting Time; express Adjacency matrix of the time-based social relationship graph; This represents the output of the graph convolutional neural network. Adjacency matrix of the time-based social relationship graph; This illustrates the computation process of a graph convolutional neural network. express The time input gate; express The value of the candidate memory unit at time step; express The memory value after being forgotten over time; express The output gate at each time step, i.e., the output feature; This indicates that the long short-term memory model is in The hidden state at any given moment; This indicates that the long short-term memory model is in The hidden state at any given moment; The weight matrix represents the parameters that need to be learned. This represents the deviation parameter, which is also a parameter that needs to be learned; This represents the Sigmoid activation function; Represents the tangent function; This represents matrix multiplication.
4. An activity recommendation system based on a dynamic graph neural network employing the method described in any one of claims 1-3, characterized in that, It includes a data crawling module, a data processing module, and a result generation module; The data crawling module is used to crawl activity datasets from social networking sites; The data processing module includes an extraction unit and a prediction unit; The extraction unit is used to extract activity features from the activity dataset; incorporate the activity features that the user has participated in into the user features; dynamically construct the user's social relationship graph based on the user features; and learn the evolution law of the social relationship graph through a long short-term memory network to obtain the user features of social aggregation. The prediction unit is used to calculate each user's preference value for the target activity based on the feature similarity between the user characteristics of each user and the activity characteristics of each target activity, and to build an activity recommendation model by using a multilayer perceptron. It then predicts the user's preference value for the target activity, sorts the predicted values of all users for all target activities, and recommends the most preferred target activities to the target user. The result generation module is used to outsource the recommendation of several most preferred target activities to the target user.
5. An activity recommendation device based on a dynamic graph neural network, characterized in that, It includes a processor, a memory, and a bus. The memory stores instructions and data read by the processor. The processor is used to call the instructions and data in the memory to execute the method as described in any one of claims 1-3. The bus connects the functional components for transmitting information.
Citation Information
Patent Citations
Activity recommendation system and method based on online and offline double social relation
CN106776959A
Group travel route recommendation method based on attention mechanism
CN112149010A
Personalized recommendation method fusing social relation and time semantics
CN118152444A