Activity recommendation method, system and device based on dynamic graph neural network
The user social relationship diagram is constructed through dynamic graph neural network and learns its evolutionary laws, and calculates user relationship weights in combination with attention mechanisms, solving the problem of difficulty in capturing the timing changes of user social networks and differences in relationships in the existing technology, achieving higher accuracy activity recommendations.
Patent Information
- Application Number
- CN202510384846.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-28
AI Technical Summary
The prior art is difficult to accurately capture the timing changes of user social networks and the differences in relationships between users, affecting the accuracy of activity recommendations.
Using a method based on dynamic graph neural network, activity data is crawled from social networking websites, activity and user characteristics are extracted, user social relationship diagrams are dynamically constructed, and the evolutionary laws of social relationship diagrams are learned through long-term memory networks, and user relationship weights are calculated using attention mechanisms to build an activity recommendation model.
It improves the accuracy of activity recommendations, can better capture the timing changes of user social networks and the differences in user relationships, and improves the participation of recommendations.
Smart Images

Figure CN119884497A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of social network technology, and in particular to an activity recommendation method, system, and apparatus based on dynamic graph neural networks. Background Technology
[0002] Currently, graph neural networks are increasingly being used to mine connections between users in recommendation systems based on Event Based Social Networks (EBSNs). Unlike traditional social media, EBSNs focus on user behavior within specific events. Events in EBSNs have short lifecycles, social relationships between users are constantly changing, and the strength of these relationships varies. Existing recommendation methods cannot accurately capture the temporal changes in user social networks and the differences in the closeness of relationships between users, thus affecting the accuracy of event-based recommendations. Summary of the Invention
[0003] The purpose of this invention is to provide an activity recommendation method, system, and apparatus based on dynamic graph neural networks to solve at least one of the aforementioned technical problems in the prior art.
[0004] In a first aspect, to solve the above-mentioned technical problems, the present invention provides an activity recommendation method based on a dynamic graph neural network, comprising the following steps: Step 1: Crawl activity datasets from social networking sites.
[0005] In one feasible implementation, the activity dataset includes activity information data, activity member data, and user joining interest groups data.
[0006] Step 2: Extract activity features from the activity dataset; incorporate the activity features that users have participated in into 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.
[0007] In one feasible implementation, 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.
[0008] In one feasible implementation, 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.
[0009] In one feasible implementation, 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; the continuous text is segmented and stop word removed to obtain a hash text; using an 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.
[0010] In one feasible implementation, the event timing characteristics include weekly and daily characteristics, which helps to reflect the periodicity of events occurring frequently on weekends or after get off work on weekdays.
[0011] In one feasible implementation, 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.
[0012] In one feasible implementation, the daily feature is used to statistically determine the start time of an event; defined... Indicates the first Activities The characteristics of the day.
[0013] In one feasible implementation, 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.
[0014] In one feasible implementation, the activity feature, specifically in vector form, can be represented as: ; in, This indicates feature splicing.
[0015] In one feasible implementation, the method for dynamically constructing social relationship graphs includes: 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; 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 This represents a social relationship graph between users; the nodes in this 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 The number of activities that users have 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. This reflects the evolutionary characteristics of user interests over time; Step a4: Learn the social features of users in the time-series static graph through an attention mechanism and a graph convolutional neural network (GCN): The attention mechanism is used to aggregate neighborhood nodes to reflect the degree to which user features are influenced by social relationships (the nodes associated with them, i.e., the neighborhood); multiple graph convolutional neural networks (GCNs) and multiple time-series static graphs... Figure 1 One-to-one correspondence, dynamically constructing a social network sequence divided by the user according to the time order.
[0016] In one feasible implementation, 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 The 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.
[0017] In one feasible implementation, specific methods for learning the evolutionary patterns of social relationship graphs include: The graph convolutional neural network from step a4 is embedded into an LSTM (Long Short-Term Memory) model to learn the temporal dependencies between social relationship graphs, thereby better understanding user behavior and social relationships in social networks. 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; 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.
[0018] Step 3: Based on the feature similarity between each user's user characteristics and the activity characteristics of each target activity, calculate each user's preference value for the target activity using a multilayer perceptron, construct an activity recommendation model (DERGCN), predict the user's preference value for the target activity, sort all users' predicted values for all target activities, and recommend several target activities that the target user prefers (is most likely to participate in).
[0019] In one feasible implementation, the feature similarity The specific calculation formula is as follows: ; in, This represents a similarity function used to calculate the similarity between features.
[0020] In one feasible implementation, 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 in 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.
[0021] In one feasible implementation, the loss function of the activity recommendation model is the BCE loss function, and the BCE loss function value is smaller as the predicted value is closer to the actual value. 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.
[0022] In one feasible implementation, the activity recommendation model updates its parameters during training using gradient descent.
[0023] Secondly, based on the same inventive concept, this application also provides an activity recommendation system based on dynamic graph neural networks, including 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 through 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 several target activities that the user prefers (most likely to participate in). The result generation module is used to recommend several target activities that the target user prefers (is most likely to participate in) to the external system.
[0024] Thirdly, based on the same inventive concept, this application also provides an activity recommendation device based on a dynamic graph neural network, including a processor, a memory, and a bus. The memory stores instructions and data read by the processor, and the processor is used 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. The bus connects the various functional components for transmitting information.
[0025] By adopting the above technical solution, the present invention has the following beneficial effects: This invention provides an activity recommendation method, system, and apparatus based on dynamic graph neural networks. It can construct a dynamic social network based on users' dynamic behavior, capture the temporal changes of users' social networks using long short-term memory networks, and calculate the relationship weights between different users by introducing an attention mechanism, making the calculation of social relationships between users more evidence-based, thereby achieving higher activity recommendation accuracy. Attached Figure Description
[0026] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0027] Figure 1 A flowchart of an activity recommendation method based on a dynamic graph neural network is provided in this embodiment of the invention; Figure 2 This is an illustration of the DERGCN model architecture provided in an embodiment of the present invention; Figure 3 A diagram of an activity recommendation system based on a dynamic graph neural network is provided in this embodiment of the invention; Figure 4 A comparison chart of recall rates for ablation experiments using the DERGCN model provided in this embodiment of the invention; Figure 5 This is a comparison chart of normalized loss cumulative gain in the DERGCN model ablation experiment provided in this embodiment of the invention; Figure 6 This is a comparison chart of the recall rate of the DERGCN model in a cold start experiment provided in an embodiment of the present invention. Figure 7 This is a comparison chart of normalized loss and cumulative gain in the cold start experiment of the DERGCN model provided in this embodiment of the invention. Detailed Implementation
[0028] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0030] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0031] The present invention will be further explained below with reference to specific embodiments.
[0032] It should also be noted that the specific embodiments or implementation methods described below are a series of optimized settings listed by the present invention to further explain the specific content of the invention, and these settings can be combined or used in conjunction with each other.
[0033] Example 1: like Figure 1-2 As shown in the figure, this embodiment provides an activity recommendation method based on a dynamic graph neural network, which includes the following steps: Step 1: Crawl activity datasets from social networking sites (such as Douban City).
[0034] Furthermore, the activity dataset includes activity information data, activity member data, and user joining interest groups data.
[0035] Step 2: Extract activity features from the activity dataset; incorporate the activity features that users have participated in into 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.
[0036] Furthermore, 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.
[0037] Furthermore, 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 (e.g., a 13-dimensional 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.
[0038] Furthermore, 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 a conventional LDA topic model algorithm, 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.
[0039] Furthermore, the time characteristics of the activities include weekly and daily characteristics, which helps to reflect the periodicity of the activities occurring frequently on weekends or after get off work on weekdays.
[0040] 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.
[0041] 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.
[0042] 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.
[0043] Furthermore, the activity feature, specifically in vector form, can be represented as follows: ; in, This indicates feature splicing.
[0044] Furthermore, methods for dynamically constructing social relationship graphs include: 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). 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 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 A collection of interest groups that all users have joined, specifically expressed as: ; Step a2, redefine This represents a social relationship graph (social network) between users; the nodes in this 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 users have 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. This reflects the evolutionary characteristics of user interests over time; Step a4: Using an attention mechanism and a two-layer graph convolutional neural network (GCN), learn the user's social features in the time-series static graph: the attention mechanism is used to aggregate neighborhood nodes to reflect the degree to which user features are influenced by social relationships (the nodes associated with them, i.e., the neighborhood); multiple GCNs and multiple time-series static graphs... Figure 1 One-to-one correspondence, dynamically constructing a social network sequence divided by the user according to the time order.
[0045] Furthermore, 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 The 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.
[0046] Furthermore, specific methods for learning the evolutionary patterns of social relationship graphs include: The graph convolutional neural network from step a4 is embedded into an LSTM model to learn the temporal dependencies between social relationship graphs, thereby better understanding user behavior and social relationships in social networks. 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; 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.
[0047] 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.
[0048] Furthermore, the feature similarity The specific calculation formula is as follows: ; in, This represents a similarity function used to calculate the similarity between features.
[0049] Furthermore, 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 in 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.
[0050] 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: ; 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.
[0051] Furthermore, during training, the activity recommendation model updates its parameters using gradient descent.
[0052] Example 2: like Figure 3 As shown, this embodiment provides an activity recommendation system based on dynamic graph neural networks, including 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 through 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 several target activities that the user prefers (most likely to participate in). The result generation module is used to recommend several target activities that the target user prefers (is most likely to participate in) to the external system.
[0053] Example 3: This embodiment provides an activity recommendation device based on a dynamic graph neural network, including a processor, a memory, and a bus. The memory stores instructions and data read by the processor, and the processor is used 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. The bus connects the various functional components for information transmission.
[0054] In another embodiment, this solution can also be implemented using an integrated device, which may include corresponding modules that perform one or more steps in the various embodiments described above. A module may be one or more hardware modules specifically configured to perform the corresponding step, or implemented by a processor configured to perform the corresponding step, or stored in a computer-readable medium for implementation by a processor, or implemented through some combination thereof.
[0055] The processor executes the various methods and processes described above. For example, the method implementations in this scheme can be implemented as software programs tangibly contained in a machine-readable medium, such as memory. In some implementations, part or all of the software program can be loaded and / or installed via memory and / or a communication interface. When the software program is loaded into memory and executed by the processor, one or more steps of the methods described above can be performed. Alternatively, in other implementations, the processor can be configured to execute one of the methods described above by any other suitable means (e.g., by means of firmware).
[0056] This device can be implemented using a bus architecture. A bus architecture can include any number of interconnect buses and bridges, depending on the specific application of the hardware and overall design constraints. The bus connects various circuits, including one or more processors, memory, and / or hardware modules. The bus can also connect various other circuits such as peripherals, voltage regulators, power management circuitry, external antennas, etc.
[0057] Buses can be Industry Standard Architecture (ISA) buses, Peripheral Component Interconnect (PCI) buses, or Extended Industry Standard Component (EISA) buses, etc. Buses can be divided into address buses, data buses, control buses, etc.
[0058] Example 4: A comparative experiment was conducted between the DERGCN model in Example 1 and existing models: Activity Dataset: Data for City 1 (July 2020 - July 2021) and City 2 (February 2022 - February 2023) were obtained from social networking sites (such as Douban City) using Python web scraping technology. Details are shown in Table 1.
[0059] The records of user and activity interactions are labeled as 1. Negative sampling is performed on the data, randomly sampling 50 non-interactive negative samples for each positive sample. User and activity interaction data from the first ten months of the activity's duration are selected as the training set, and user and activity interaction data from the last two months of the activity's duration are selected as the test set.
[0060] Evaluation criteria: Recall and Normalized Discounted Cumulative Gain (NDCG). Recall rate This is used to calculate the proportion of the list of activities recommended by the model to users in the set of activities actually participated in by the user. The specific calculation formula is as follows: ; in, This represents the list of activities that the model recommends that the user most prefers (is most likely to participate in); This indicates the number of users in the test set; This represents a list of activities the user actually participated in; Normalized loss cumulative gain is used to evaluate the ranking quality of an information retrieval system by weighting the relevance and ranking of search results. The specific calculation formula includes: ; ; in, Indicates the cumulative gain due to loss; This represents the maximum DCG value under ideal conditions, which can make The value of is between 0 and 1; This indicates the length of the list of activities that the model recommends that the user most prefers (is most likely to participate in); Indicates the first The position number of each activity in the list of activities that the model recommends that users prefer (are most likely to participate in).
[0061] Comparison models: TrustSVD model, DiffNet model, and ERGCN model; 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. 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. 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.
[0062] Comparison results: 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.
[0063] 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.
[0064] Furthermore, ablation experiments were conducted on the DERGCN model using a single model and cold start experiments using multiple models. 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.
[0065] 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 Figure 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.
[0066] 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 network, characterized in that: include: Step 1: Crawl activity datasets from social networking sites; Step 2: Extract activity features from the activity dataset; Incorporate the features of activities that users have participated in into user features; dynamically build the user's social relationship graph based on user features; learn the evolution law of the social relationship graph through the long short-term memory network to obtain the user features of social aggregation; Step 3: Based on the feature similarity between each user's user features and the activity features of each target activity, the multi-layer perceptron is used to calculate each user's preference value for the target activity, and an activity recommendation model is constructed to predict the user's preference value for the target activity. After sorting the predicted values of all users for all target activities, the most preferred target activities are recommended to the target user.
2. The method according to claim 1, characterized in that: The activity data set includes activity information data, activity member data and user joining interest group data.
3. The method according to claim 2, characterized in that 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 holding time features and activity holding location features.
4. The method according to claim 3, characterized in that: The specific method of extracting activity type features is as follows: encode the activity type through one-hot encoding, and represent 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 set to 1, and the rest of the index positions are set to 0; define Indicates Events Characteristics of activity types; The specific method for extracting activity title features, activity tag features and activity description features is as follows: combine the activity title, activity tag and activity description in the activity information data into a continuous text; perform word segmentation and remove stop words on the continuous text to obtain a hash text; extract activity topic features from the hash text through the LDA topic model, calculate the distribution of each activity on the topic, and obtain activity text features; define Indicates Events Active text features; The activity time characteristics include weekly characteristics and daily characteristics; The weekly feature includes weekdays and weekends, and is 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; definition Indicates Events Weekly characteristics; The daily feature is used to count the start time of the event; definition Indicates Events daily characteristics; The activity location feature, i.e., the spatial feature, is used to count the longitude and latitude of the activity location; Definition Indicates Events spatial characteristics; The activity features are specifically expressed in vector form as follows: ; in, Represents feature concatenation.
5. The method according to claim 4, characterized in that The dynamic construction method of the social relationship graph includes: Step a1: Filter the users who are in the same interest group and have participated in the same activity from the user interest group joining data and activity member data: Sort the activities a user has participated in by the time they were held, and get a set of activity sequences with time. , Indicates the total number of activities; definition Indicates The collection of activities that the user has participated in. Indicates The collection of activities that the user has participated in. Indicates Users and The set of activities that users have participated in together. The specific expression is: ; definition Indicates The collection of interest groups that the user has joined. Indicates The collection of interest groups that the user has joined. Indicates Users and The set of interest groups that users join together. The specific expression is: ; Step a2: Redefine Represents a social relationship graph between users; nodes in the graph Represents a user; the edges in the graph represent the social relationships between users, and the specific expression is: ; in, Indicates User and The social relationships between users Indicates Users and The number of interest groups that users have joined together. Indicates Users and The number of events that users have participated in together; Step a3: Add timestamps to the social relationship graphs of 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 time series static graphs through attention mechanism and graph convolutional neural network: the attention mechanism is used to aggregate neighborhood nodes; multiple graph convolutional neural networks correspond to multiple time series static graphs one by one, and dynamically construct a social network sequence of users divided according to time order.
6. The method according to claim 5, characterized in that The specific calculation formula of the attention mechanism in step a4 includes: The weight calculation formula between nodes is: ; in, Representation Node and nodes The weight between Representation Node Feature representation in the figure; Representation Node Feature representation in the figure; represents the exponential function; Represents the similarity function, which is used to calculate the similarity between nodes; Representation Node The neighbor node set of , and contains the node Point to your side ; The calculation formula of node aggregation neighborhood characteristics is: ; in, Representation Node Feature representation of the aggregated neighborhood.
7. The method according to claim 6, characterized in that Specific methods for learning the evolution laws of social relationship graphs include: The graph convolutional neural network in step a4 is embedded into the long short-term memory model to learn the temporal dependency between social relationship graphs. The specific expressions include: ; in, express The door of forgetfulness of the moment; express The adjacency matrix of the social relationship graph at each moment; Represents the output of the graph convolutional neural network The adjacency matrix of the social relationship graph at each moment; Represents the computational process of graph convolutional neural network; express The input gate of the moment; express The value of the candidate memory cell at time; express The memory value after the moment of forgetting; express The output gate at the moment, that is, the output feature; Represents the long short-term memory model in The hidden state of the moment; Represents the long short-term memory model in The hidden state of the moment; Represents the weight matrix, which is the parameter that needs to be learned; Represents the deviation parameter, which is also a parameter that needs to be learned; Represents the Sigmoid activation function; represents the tangent function; Represents matrix multiplication.
8. The method according to claim 7, characterized in that The feature similarity The specific calculation formula is: ; in, Represents the similarity function, which is used to calculate the similarity between features; The specific calculation formula of the preference value is: ; in, Indicates User to The preference value of the target activity; Represents the weight matrix of the hidden layer of the multilayer perceptron; Represents the bias term of the hidden layer of the multi-layer perceptron; ReLU activation function representing the hidden layer of a multi-layer perceptron; Represents the Sigmoid activation function of the output layer of the multi-layer perceptron; The loss function of the activity recommendation model is the BCE loss function, and when the predicted value is closer to the actual value, the BCE loss function value is smaller. The specific formula is: ; in, Indicates 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 recorded as 1; when the user did not actually participate in the activity, the label is recorded as 0; Indicates The actual value of whether a user participates in an activity; Represents the activity recommendation model predicting The probability of whether a user will participate in the activity; represents the regularization coefficient; represents the regularization term.
9. An activity recommendation system based on dynamic graph neural network, characterized in that: Including data crawling module, data processing module and result generation module; The data crawling module is used to crawl activity data sets 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 data set; 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 the long short-term memory network to obtain the user features of social aggregation; The prediction unit is used to calculate the preference value of each user for the target activity through a multi-layer perceptron based on the feature similarity between the user features of each user and the activity features of each target activity, build an activity recommendation model, predict the user's preference value for the target activity, and after sorting the predicted values of all users for all target activities, recommend several target activities that are most preferred to the target user; The result generation module is used to recommend several target activities that are most preferred by the target user.
10. An activity recommendation device based on dynamic graph neural network, characterized in that: It includes a processor, a memory and a bus, wherein 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 any method as claimed in claim 1-8, and 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
Dynamic network representation learning method for social network platform
CN111461907A
Group travel route recommendation method based on attention mechanism
CN112149010A
Recommendation method and system based on graph contrast learning and social network enhancement
CN114036406A
Label-based short video recommendation method, system, equipment and medium
CN114265953A