User browsing event analysis and prediction method based on graph neural network

By combining graph neural network and FP-growth frequent pattern mining technology in user browsing event analysis prediction, the existing methods fail to fully consider user social relationships and event association relationships, and achieve more accurate user browsing event prediction.

CN119004067APending Publication Date: 2024-11-22UNIV OF ELECTRONICS SCI & TECH OF CHINA

Patent Information

Application Number
CN202410942459.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The existing user browsing event analysis prediction methods fail to fully consider the potential association between browsing events and the impact of user social relationships on predictions, resulting in inaccurate prediction results.

Method used

Using a graph neural network-based method, combined with FP-growth frequent mode mining technology, obtain user browsing historical event feature data, clean and preprocess, input FP-growth algorithm for frequent user browsing event sequence mining, and combine user social features to pass the graph Neural networks perform event analysis and prediction.

Benefits of technology

It improves the accuracy of user browsing event analysis prediction, captures the complexity behind user behavior, and provides users with more accurate browsing trend predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119004067A_ABST
    Figure CN119004067A_ABST
Patent Text Reader

Abstract

The invention relates to the field of graph neural network event analysis and prediction, and provides a user browsing event analysis and prediction method based on a graph neural network. The method aims at solving the problems that in an existing user browsing event analysis and prediction method, data preprocessing is insufficient, frequent pattern mining is difficult, and the influence of the user social relation on browsing data is not considered. According to the method, data quality is improved by cleaning and preprocessing user browsing historical event data including merchant information, user information and user browsing information, removing invalid data and duplicated values, merging data sources and using a time sliding window to segment a time period sequence. Then, a frequent user browsing event sequence is mined through an FP-growth algorithm, and a meaningful browsing mode is extracted; and finally, based on a graph neural network, in combination with event user information and frequent user browsing event sequence information, completing user browsing event analysis and prediction, and improving prediction accuracy by learning a user social network structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of graph neural network event analysis and prediction, and in particular to a method for analyzing and predicting user browsing events. Background Art

[0002] The event association analysis and prediction model of the graph neural network can learn the potential connections between events from historical event data and predict future events based on these connections. First, the historical event data is converted into a graph structure. Each event node is usually described by a series of features. These features are converted into feature vectors and input into the GNN model as node attributes. Finally, the information of its neighbor nodes is collected through neighbor aggregation, including feature vector edge information, etc., and the aggregation function is used to merge the information to obtain the node representation update, that is, the process of continuously learning from neighbor nodes. In order to capture deeper information, multiple aggregation and update layers are usually stacked to capture a wider range of neighbor information.

[0003] In summary, the existing user browsing event analysis and prediction methods have the following shortcomings:

[0004] 1) Failure to further consider the impact of potential correlations between browsing events on user browsing events will interfere with browsing event prediction;

[0005] 2) Users’ social relationships will also affect their browsing data. Different users have different influence factors and different influence on their social networks, which leads to different influences of different users on other users’ browsing data.

[0006] The shortcomings of the above-mentioned prior art will affect the results of user browsing event prediction, making it impossible to more accurately predict the user's browsing trend, which brings great pressure to the user experience. Therefore, the present invention proposes a user browsing event analysis and prediction method based on graph neural network. Summary of the invention

[0007] The technical problem to be solved by the present invention is how to improve the accuracy of user browsing event analysis and prediction by integrating graph neural network and frequent pattern mining technology.

[0008] To achieve the above purpose, the present invention adopts the following technical solutions:

[0009] The present invention provides a method for analyzing and predicting user browsing events based on a graph neural network, comprising the following steps:

[0010] Step 1: Obtain the user's browsing history event feature data, and clean and pre-process the user's browsing history event feature data;

[0011] Step 2: Input the preprocessed user browsing history event feature data into the FP-growth frequent pattern mining algorithm, and input the support and length index information to mine the frequent user browsing event sequence, and obtain the frequent user browsing event sequence information;

[0012] Step 3: Based on the graph neural network, the user browsing event analysis and prediction are completed by combining the event user information and the frequent user browsing event sequence information.

[0013] In the above method, step S1 comprises the following steps:

[0014] Step 1.1, select the core features of user browsing events, including merchant information, user information, and user browsing information;

[0015] Step 1.1.1, determine the merchant information characteristics, including merchant ID, merchant name, geographic location, and category;

[0016] Step 1.1.2, determine the user information characteristics, including user ID, user identifier, user friend list, and user follower number;

[0017] Step 1.1.3: Determine the user browsing information characteristics, including browsing identifier, user identifier, and merchant identifier.

[0018] Step 1.2: Clean and preprocess the user browsing data, including removing invalid data and duplicate values, merging data sources, and using a time sliding window to split the time period sequence.

[0019] Step 1.2.1, remove invalid browsing data, handle missing values, check whether the user ID and merchant ID exist, and remove invalid data that does not exist;

[0020] Step 1.2.2, remove duplicate values ​​and keep the user's unique access records to the same merchant;

[0021] Step 1.2.3, merge user information data, merchant information data, and user browsing data;

[0022] Step 1.2.4: Use the time sliding window method to segment different time period sequences to obtain the final user browsing event feature data.

[0023] In the above method, step 2 comprises the following steps:

[0024] Step 2.1, create the FP dictionary tree and initialize the head pointer table, and build the auxiliary data structure Trie;

[0025] Step 1.1, create a root node to mark the starting point of the tree;

[0026] Step 1.2, initialize the head pointer table to store the most frequently occurring instance node of each item;

[0027] Step 1.3, map the node information in the head pointer table for fast positioning when updating the node support;

[0028] Step 1.4: Build the auxiliary data structure dictionary tree Trie to save the prefix information of each node;

[0029] Step 1.5, use map to record the starting position of each node in the FP dictionary tree to achieve fast positioning;

[0030] Step 2.2, extract frequent items from the FP prefix tree, generate conditional pattern bases, and recursively construct conditional trees to mine frequent patterns;

[0031] Step 2.2.1, quickly extract frequent items from the FP prefix tree,

[0032] Step 2.2.2, taking the frequent item as the root node, generate a conditional pattern base, which includes all subsequences of the sequence containing the frequent item;

[0033] Step 2.2.3, add the remaining part of the subsequence to the conditional tree as the child node of the frequent item, and connect each frequent item with its related subsequence to form the structure of the conditional tree;

[0034] Step 2.2.4: Recursively construct a conditional tree to mine all frequent user browsing event sequence patterns.

[0035] Step 2.3, process the newly added database D′, calculate the item support, reorder, match the cache, and construct a new sequence;

[0036] Step 2.3.1, calculate the item support of the new user browsing sequence in D′;

[0037] Step 2.3.2, re-sort the user browsing sequence by support;

[0038] Step 2.3.3, match the first item of each item set in D′ with the prefix sequence in the cache. If there is a result matching the current sequence in the cache, skip the user browsing sequence; otherwise, save it to the temporary database TD;

[0039] Step 2.3.4, count the support of the sequence in the temporary database TD, remove the items less than the threshold, and obtain the processed new sequence newList;

[0040] Step 2.3.5, take out the prefix sequence set curList from the cache, compare it with newList, and find the best matching sequence;

[0041] Step 2.3.6: Use the KMP algorithm matching table idea to improve the efficiency of sequence comparison.

[0042] Step 2.4: After obtaining the most matching prefix sequence, reconstruct it from the nodes where the prefix sequence does not match to obtain a new conditional pattern base, build a conditional pattern tree on the new conditional pattern base, recursively mine it to obtain a new frequent pattern sequence, and obtain frequent user browsing event sequence information.

[0043] In the above method, step 3 comprises the following steps:

[0044] Step 3.1: Based on the user's social feature learning, build a user social network and use graph neural network to obtain user feature representation;

[0045] Step 3.1.1: Build a user social network and determine the initial number of followers f for each user i and initial impact factor The definition is as follows:

[0046]

[0047] Step 3.1.2: Calculate the user's impact factor using the random walk model

[0048] Step 3.1.3: Use graph convolutional neural network to update the feature representation of user nodes, including two stages: information aggregation and feature conversion;

[0049] Step 3.1.4: Calculate the feature representation of user node v at layer l+1 according to the formula The formula is as follows:

[0050]

[0051] Where N(v) represents the set of neighbor nodes of user node v, d u and d v Represents the degree of user nodes u and v, W l is the learnable weight matrix of layer l, represents the feature representation of node u in the lth layer, σ(.) is a nonlinear activation function;

[0052] After the graph convolutional neural network model is trained, the feature representation of the nodes in the output layer of the graph convolutional neural network is That is, the user feature representation obtained based on the user's social feature learning, where k is the number of output layers in the graph convolutional network, which will be used to form the final enhanced user browsing event features;

[0053] Step 3.2: User browsing sequence analysis and prediction based on graph neural network, including graph neural network module and event analysis and prediction based on vector embedding;

[0054] Step 3.2.1: Use the graph neural network module to process the user browsing event sequence, build and update the user browsing event session graph G = (V, E), and obtain the updated node state represents the state at time step t;

[0055] Step 3.2.1.1: Each user browsing event in the session i Convert to graph nodes and construct a session graph G = (V, E), where V is a node set and E is an edge set;

[0056] Step 3.2.1.2: Initialize the state of each node where x V is the initial eigenvector of node v, the superscript T represents the transpose, Represents the initial state of node v in the first round of iteration;

[0057] Step 3.2.1.3: Update node status through the gating mechanism, including aggregating neighbor node information Compute update gate Reset Gate Candidate status Final status update:

[0058]

[0059] is the neighbor information aggregated at time t; A v is the vth row of the adjacency matrix A; represents the state of node i at time t-1; b is the deviation vector; Represented as an update gate, it controls the update amount from the current state to the new state; To reset the gate, determine the forgotten information; is the candidate state at time t; ⊙ represents the element product, V in |V| represents the node set, |V| represents the number of nodes, and W z ,W,U,U z , W r , U r is the weight matrix, σ(·) is the activation function, tanh(.) is the activation function, It means the state of node v at time t-1.

[0060] Step 3.2.2: Combine frequent pattern mining and user social feature vectors to perform event analysis and prediction to obtain enhanced user browsing event feature representation As input, the model is trained, and the model outputs the subsequent events that may occur to the current entity and their probabilities;

[0061] Step 3.2.2.1, use frequent pattern mining technology to extract frequent browsing event patterns and construct a global event association graph;

[0062] Step 3.2.2.2: Extract frequent event feature vectors through GCN

[0063] Step 3.2.2.3: Integrate user feature vector Get the user social relationship feature vector

[0064] Step 3.2.2.4: Calculate the enhanced user browsing event feature representation Where β1 and β2 are variable parameters, β1+β2=1, β1>0, β2>0;

[0065] Step 3.2.3: Combine the fused enhanced user browsing event features As input, the model is trained. Specifically, for each event entity u, the model will output the subsequent events that may occur to the current entity and their probabilities, and select the k events with the highest scores as the final result.

[0066] Because the present invention adopts the above technical means, it has the following beneficial effects:

[0067] 1. Data preprocessing: By cleaning and preprocessing user browsing history event data, including merchant information, user information, user browsing information, and removing invalid data and duplicate values, merging data sources, and using a time sliding window to split time period sequences, the problems of low quality of original data, data duplication and missing data are solved, and the accuracy of subsequent analysis is improved.

[0068] 2. Frequent pattern mining: Use the FP-growth algorithm to mine frequent user browsing event sequences, create an FP dictionary tree and initialize the head pointer table, build an auxiliary data structure Trie, extract frequent items from the FP prefix tree, generate a conditional pattern base, and recursively build a conditional tree to mine frequent patterns. This solves the problem of event pattern recognition in user browsing data and extracts meaningful browsing patterns.

[0069] 3. Graph neural network analysis and prediction: Based on the user's social feature learning, the user social network is constructed and the user feature representation is obtained using the graph neural network. The graph neural network is used to process the user browsing event sequence, and the conversation graph of the user browsing event is constructed and updated. The event analysis and prediction are combined with frequent pattern mining and user social feature vectors. This solves the problem that traditional methods do not consider the impact of user social relationships on browsing data, and improves the accuracy of prediction by learning the user social network structure.

[0070] The advantage of the present invention is that it not only considers the direct characteristics of the user's browsing history events, but also deeply explores the correlation between events and learns the user's social relationship through graph neural network, thereby improving the accuracy of user browsing event analysis and prediction. Compared with the existing technology, this method can more comprehensively capture the complexity behind user behavior and provide users with more accurate browsing trend prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 : A schematic diagram of the structure of a user browsing analysis and prediction method based on a graph neural network provided for the implementation of the present invention;

[0072] Figure 2 : A structural diagram of a user browsing analysis and prediction method based on a graph neural network provided for the implementation of the present invention;

[0073] Figure 3 : It is a dictionary tree structure diagram;

[0074] Figure 4 : Description of the Yelp dataset and user browsing sequence collection;

[0075] Figure 5 : It is the test result of P@20 index;

[0076] Figure 6 : MRR@20 indicator test results. DETAILED DESCRIPTION

[0077] The following is a detailed description of the embodiments of the present invention. Although the present invention will be described and illustrated in conjunction with some specific embodiments, it should be noted that the present invention is not limited to these embodiments. On the contrary, modifications or equivalent substitutions made to the present invention should all be included in the scope of the claims of the present invention.

[0078] In addition, in order to better illustrate the present invention, numerous specific details are given in the following specific embodiments. It will be understood by those skilled in the art that the present invention can also be implemented without these specific details.

[0079] The present invention provides a method for analyzing and predicting user browsing events based on a graph neural network, comprising:

[0080] S1: Obtain the user's browsing history event feature data, and clean and preprocess the user's browsing history event feature data;

[0081] S2: Input the preprocessed user browsing history event feature data into the FP-growth frequent pattern mining algorithm, and input the support and length index information to mine the frequent user browsing event sequence, and obtain the frequent user browsing event sequence information;

[0082] S3: Based on the graph neural network, the user browsing event analysis and prediction are completed by combining the event user information and the frequent user browsing event sequence information.

[0083] 2. According to a user browsing event analysis and prediction method based on graph neural network according to claim 1, it is characterized in that in S1, the detailed description of data cleaning and preprocessing is as follows.

[0084] S11: User browsing events contain multiple features, including browsing time, dwell time, type, etc. User browsing events are mainly represented by selecting several core features of user browsing events. These features include merchant information such as name, geographic location, category; user information such as user identifier, user friend list, number of user fans; user browsing information such as browsing identifier, user identifier, merchant identifier.

[0085] S12: Clean and pre-process the user browsing data. First, remove some invalid browsing data, remove incomplete or irrelevant records, such as processing missing values, checking whether the user ID and merchant ID exist, and removing invalid data that does not exist; remove duplicate values, and retain unique values ​​if the user has multiple visits to the same merchant at the same time. The user's browsing behavior data is usually scattered in multiple data sources. Merge user information data, merchant information data, and user browsing data. Finally, use the time sliding window method to segment different time period sequences to obtain the final user browsing event feature data.

[0086] In the above method, in S2, the incremental FP-growth frequent pattern mining algorithm is described in detail as follows.

[0087] S21: The input data of the incremental FP-growth frequent pattern mining algorithm is the cleaned and preprocessed user historical browsing data obtained in S1.

[0088] S22: The FP dictionary tree is introduced into the incremental FP-growth frequent pattern mining algorithm. In the process of constructing the FP tree, a root node is first created to mark the starting point of the tree. At the same time, a head pointer table is initialized to store the most frequently occurring instance nodes of each item. The node information in the head pointer table is mapped so that it can be quickly located during the process of updating the support of the node. While constructing the FP tree, an auxiliary data structure dictionary tree Trie is introduced to save the prefix information of each node. The FP dictionary tree is a compressed prefix tree that reduces the storage space requirement by sharing nodes. The map data structure is used to record the starting position of each node in the FP dictionary tree, where the key is the node name and the value is the index information of the node in the FP prefix tree. Through this Map collection, the node information can be quickly located and its conditional pattern base can be efficiently obtained. The dictionary tree structure is as follows Figure 1 shown.

[0089] The core steps of the frequent pattern mining method include quickly extracting frequent items (i.e., FP conditional bases) from the constructed prefix tree and using them as the root nodes of the conditional tree. Subsequently, for each frequent item, its conditional pattern base is generated, which includes all subsequences of the sequence containing the frequent item. Further, the remaining parts of these subsequences are added to the conditional tree as child nodes of the current frequent item. In this way, by recursively constructing the conditional tree, all frequent user browsing event sequence patterns are effectively mined.

[0090] For the newly added database D′, the support of the items in the new user browsing sequence will be calculated, and the user browsing sequence will be reordered according to the size of the support. In the previous frequent pattern mining process, the prefix sequence of each item is obtained through the FP dictionary tree. This prefix sequence is cached and retained. The first item in each item set in D′ will first go to the cache to find the item node that matches it. If the cache has the same result as the current sequence, the current user browsing sequence will be skipped. Otherwise, the user browsing sequence will be saved in a temporary database TD. In the temporary database TD, different item sets are separated according to the first item, so that the first items with the same first item are grouped together. Repeat this matching until the sequence in the new database is scanned once.

[0091] The support of each sequence in TD is counted. For the sequence set whose first item is A, the items with support less than the predefined threshold are removed from each sequence to obtain the processed new sequence newList. Then the prefix sequence set curList of item A is taken out from the cache, and newList and curList are used for matching and comparison. Each user browsing sequence in newList will go to the most matching one in curList, that is, the first item in curList and newList are compared in sequence to find the best matching sequence. In the sequence comparison process, the matching table idea in the KMP algorithm is used to implement it. A matching table is generated for the first compared sequence. Subsequent comparisons will be compared from the end of the matching table. For the matching sequence, the matching is performed backwards and forwards in sequence. If the matching length becomes longer, the matching table is updated to quickly skip some unmatched sequences to improve efficiency.

[0092] After obtaining the most matching prefix sequence, it is reconstructed from the nodes where the prefix sequence does not match to obtain a new conditional pattern base, and a conditional pattern tree is constructed for the new conditional pattern base to recursively mine and obtain a new frequent pattern sequence.

[0093] According to a method for analyzing and predicting user browsing events based on a graph neural network according to claim 1, it is characterized in that, in S3, the analysis and prediction of user browsing events based on a graph neural network is described in detail as follows.

[0094] S31: Feature learning based on user sociality. A user social network is constructed based on the user's social relationship, and a graph neural network is used to obtain the user feature representation of the user's social relationship under reasonable time factors. Each user has an initial number of followers f i , initial impact factor The definition is as follows:

[0095]

[0096] In order to more accurately express the influence of users, the random walk model is used to calculate the influence factor of each user. The transfer probability of random walk on each user node is inversely proportional to the number of outgoing edges of the user node. At the same time, a damping coefficient is introduced to indicate that there is a certain probability of random propagation to any user node in the graph. By performing multiple rounds of random walk simulations, the influence factor of each user node can be obtained based on the frequency of final visits to each user node. A graph convolutional neural network is used to update the feature representation of user nodes. The process of updating the feature representation of user nodes is mainly divided into two steps: information aggregation and feature conversion. In the information aggregation stage, each user node collects the feature information of its adjacent user nodes; in the feature conversion stage, a learnable transformation matrix is ​​used to update the stage feature representation. The feature representation of user node v at the l+1 layer Calculated by the following formula.

[0097]

[0098] Where N(v) represents the set of neighbor nodes of user node v. u and d v Represents the degree of user nodes u and v respectively. l is the learnable weight matrix of layer l. Represents the feature representation of node u in the lth layer. σ(.) is a nonlinear activation function.

[0099] S32: User browsing sequence analysis and prediction based on graph neural network. The specific analysis and prediction process is as follows:

[0100] S321: Graph neural network module. The user's continuous browsing sequence can be constructed into a session graph. Each user has such a browsing event sequence u = {s1, s2, ..., s n}, where s i Indicates browsing event vector information, each event s i Defined as a graph node, two adjacent events in the browsing sequence are connected in series as edges, and a user browsing event conversation graph G = (V, E) can be obtained. The user's event browsing is orderly and dynamic. The gated graph neural network further enhances the ability of the graph neural network by introducing a gating mechanism, enabling the network to control information retention and forgetting, and more effectively manage and control the flow of information.

[0101] After the graph convolutional neural network model is trained, the feature representation of the nodes in the output layer of the graph convolutional neural network is That is, the user feature representation obtained based on the user's social feature learning, where k is the number of output layers in the graph convolutional network, which will be used to form the final enhanced user browsing event features;

[0102] Each browsing event i There is a corresponding hidden state represents the state at time step t. The purpose of node information propagation is to use the structure of the graph and the interaction between nodes to update these states. In the stage of aggregating neighbor information, for each stage, the current state information of all neighbor nodes is collected. In the stage of updating the new state, the node state is updated through the gating mechanism by combining the initial information of the node itself and the collected neighbor information. When learning node representation by iteratively updating the node state, in each iteration t, for each node v i , its status The update is as follows:

[0103]

[0104] in, represents the initial state of node v in the first iteration; x v is the initial eigenvector of node V; is the neighbor information aggregated at time t; A v is the vth row of the adjacency matrix A; represents the state of node i at time t-1; b is the deviation vector; Represented as an update gate, controlling the update amount from the current state to the new state; W z ,W,U,U z is the weight matrix; σ(.) and tanh(.) are activation functions; To reset the gate, determine the forgotten information; is a candidate state at time t; ⊙ represents the element-wise product.

[0105] S322: Vector embedded event analysis and prediction. When analyzing and predicting user browsing events, the event association network constructed by frequent pattern mining and the user social feature vector are combined for effective analysis and prediction. First, the frequent pattern mining technology extracts the frequently occurring browsing event patterns to reveal the intrinsic connection between user browsing events; secondly, there will be mutual influence between users, and the relationship between users should be reasonably considered, and the feature vectors designed by users can be further integrated. The characteristics of each browsing event of the user are enhanced through two sources: frequent event browsing association rules and user social relationships. The characteristics of user browsing events at each layer are expressed as:

[0106]

[0107] Among them, β1 and β2 are variable parameters, β1+β2=1, β1>0, β2>0, Represents the feature vector of frequently browsed events. After obtaining the frequent event sequence by frequent pattern mining, a global event association graph is constructed for the frequent event set, and its event feature vector is extracted using the GCN method. Represents the user social relationship feature vector.

[0108] Example 1

[0109] This patent proposes a user browsing event analysis and prediction method based on graph neural network, including the following steps:

[0110] Step 1: Obtain the user's historical browsing information data and clean it to obtain input data;

[0111] Step 2: Input the input data into FP-growth to complete the frequent browsing event mining, and generate feature vectors for the frequent sequences obtained by mining;

[0112] Step 3: Combine the browsing sequences of different users, the users’ social information, and the feature vectors obtained from the frequent sequences to predict the users’ browsing events.

[0113] 1. Get the frequently viewed event sequence

[0114] The Yelp dataset is used for testing. By merging the review dataset, user dataset, and business dataset in the Yelp dataset, the browsing data information of all users within a period of time is obtained.

[0115] The FP-growth algorithm is used to perform frequent pattern mining to obtain the frequently browsed event sequence.

[0116] 2. Input user browsing data into the graph neural model

[0117] For the user's social network, a graph neural network is used to obtain the user feature representation of the user's social relationship. First, the review, user, and business in the Yelp data need to be preprocessed. There are 5,261,669 review data in Yelp 2018, 8,021,122 review data in Yelp 2020, and 8,635,403 review data in Yelp 2021. The json files of review, user, and business in the Yelp datasets of the three years are merged and processed to finally obtain the user browsing event sequence of the corresponding year.

[0118] A FP-GCN based on the PyTorch framework was constructed to effectively learn user browsing sequences through graph neural networks. During the model training process, the Adam optimization algorithm was used, which is an optimization method with adaptive learning rate, which can dynamically adjust the learning rate of each parameter during the training process. In order to ensure the stability and efficiency of the model training, the epoch parameter was set to 40, which represents the number of iterations of the model on the entire training dataset. The batch size setting is adjusted according to the available video memory size to achieve optimal utilization of memory resources. A smaller batch size may lead to slow training speed. In addition, the learning rate is set to 0.001, which determines the magnitude of the weight update of the model during the training process. In each iteration, the learning rate affects the step size of the gradient descent of the loss function. In order to further stabilize the training process, L2 regularization is introduced, and its coefficient is set to 0.00001. L2 regularization, also known as weight decay, is a technique to prevent overfitting, which is achieved by adding a penalty term proportional to the sum of squared weights to the loss function. This helps the model learn a smoother weight distribution, thereby improving the generalization ability of the model.

[0119] 3. Test summary

[0120] In graph neural networks, P@20 is an evaluation metric that refers to the proportion of the top 20% of nodes predicted correctly during the prediction process, thus providing an intuitive understanding of the model performance. Its calculation formula is as follows:

[0121]

[0122] Where M represents the number of types of result events in the test sample, P@20 i The prediction evaluation index of the i-th event, n represents the number of samples whose prediction results are the i-th event, TP represents the number of samples whose prediction results are the correct predictions of the model in the i-th event, and FP represents the number of samples whose prediction results are the wrong predictions of the model in the i-th event. MRR@20 is one of the commonly used evaluation indicators in the field of information retrieval, representing the average reciprocal ranking when ranking in the top 20 positions. It is usually used to measure the effectiveness of the retrieval system and to evaluate the quality of search results. Its calculation formula is as follows:

[0123]

[0124] Where N represents the number of test samples, rank i Indicates the ranking of the real event of the sample in the predicted result event sequence. The test results are as follows Figure 5 and Figure 6 shown.

[0125] Through a series of experimental comparisons, the rationality and effectiveness of this user browsing event analysis and prediction method based on graph neural network are verified, which shows that this algorithm can improve the accuracy of user browsing event analysis and prediction and better serve user browsing event analysis and prediction.

Claims

1. A user browsing event analysis and prediction method based on graph neural network, characterized in that: The following steps are involved: Step 1: Obtain the user's browsing history event feature data, and clean and pre-process the user's browsing history event feature data; Step 2: Input the preprocessed user browsing history event feature data into the FP-growth frequent pattern mining algorithm, and input the support and length index information to mine the frequent user browsing event sequence, and obtain the frequent user browsing event sequence information; Step 3: Based on the graph neural network, the user browsing event analysis and prediction are completed by combining the event user information and the frequent user browsing event sequence information.

2. According to claim 1, a method for analyzing and predicting user browsing events based on graph neural network is characterized in that: Step S1 includes the following steps: Step 1.1, select the core features of user browsing events, including merchant information, user information, and user browsing information; Step 1.2: Clean and preprocess the user browsing data, including removing invalid data and duplicate values, merging data sources, and using a time sliding window to split the time period sequence.

3. According to claim 2, a method for analyzing and predicting user browsing events based on graph neural network is characterized in that: Step 1.1 includes: Step 1.1.1, determine the merchant information characteristics, including merchant ID, merchant name, geographic location, and category; Step 1.1.2, determine the user information characteristics, including user ID, user identifier, user friend list, and user follower number; Step 1.1.3: Determine the user browsing information characteristics, including browsing identifier, user identifier, and merchant identifier.

4. According to claim 2, a method for analyzing and predicting user browsing events based on graph neural network is characterized in that: Step 1.2 includes: Step 1.2.1, remove invalid browsing data, handle missing values, check whether the user ID and merchant ID exist, and remove invalid data that does not exist; Step 1.2.2, remove duplicate values ​​and keep the user's unique access records to the same merchant; Step 1.2.3, merge user information data, merchant information data, and user browsing data; Step 1.2.4: Use the time sliding window method to segment different time period sequences to obtain the final user browsing event feature data.

5. The method for analyzing and predicting user browsing events based on graph neural network according to claim 1 is characterized in that: Step 2 includes the following steps: Step 2.1, create the FP dictionary tree and initialize the head pointer table, and build the auxiliary data structure Trie; Step 2.2, extract frequent items from the FP prefix tree, generate conditional pattern bases, and recursively construct conditional trees to mine frequent patterns; Step 2.3, process the newly added database D′, calculate the item support, reorder, match the cache, and construct a new sequence; Step 2.4: After obtaining the most matching prefix sequence, reconstruct it from the nodes where the prefix sequence does not match to obtain a new conditional pattern base, build a conditional pattern tree on the new conditional pattern base, recursively mine it to obtain a new frequent pattern sequence, and obtain frequent user browsing event sequence information.

6. The method for analyzing and predicting user browsing events based on graph neural network according to claim 5 is characterized in that: Step 2.1 includes the following steps: Step 2.1.1, create a root node to mark the starting point of the tree; Step 2.1.2, initialize the head pointer table to store the most frequently occurring instance node of each item; Step 2.1.3, map the node information in the head pointer table for fast positioning when updating the node support; Step 2.1.4, construct the auxiliary data structure dictionary tree Trie to save the prefix information of each node; Step 2.1.5: Use map to record the starting position of each node in the FP dictionary tree to achieve fast positioning.

7. The method for analyzing and predicting user browsing events based on graph neural network according to claim 6 is characterized in that: Step 2.2 includes the following steps: Step 2.2.1: Quickly extract frequent items from the FP prefix tree. Step 2.2.2, taking the frequent item as the root node, generate a conditional pattern base, which includes all subsequences of the sequence containing the frequent item; Step 2.2.3, add the remaining part of the subsequence to the conditional tree as the child node of the frequent item, and connect each frequent item with its related subsequence to form the structure of the conditional tree; Step 2.2.4: Recursively construct a conditional tree to mine all frequent user browsing event sequence patterns.

8. The method for analyzing and predicting user browsing events based on graph neural network according to claim 7 is characterized in that: Step 2.3 includes the following steps: Step 2.3.1, calculate the item support of the new user browsing sequence in D′; Step 2.3.2, re-sort the user browsing sequence by support; Step 2.3.3, match the first item of each item set in D′ with the prefix sequence in the cache. If there is a result matching the current sequence in the cache, skip the user browsing sequence; otherwise, save it to the temporary database TD; Step 2.3.4, count the support of the sequence in the temporary database TD, remove the items less than the threshold, and obtain the processed new sequence newList; Step 2.3.5, take out the prefix sequence set curList from the cache, compare it with newList, and find the best matching sequence; Step 2.3.6: Use the KMP algorithm matching table idea to improve the efficiency of sequence comparison.

9. The method for analyzing and predicting user browsing events based on graph neural network according to claim 8, characterized in that: Step 3 includes the following steps: Step 3.1: Based on the user's social feature learning, build a user social network and use graph neural network to obtain user feature representation; Step 3.1.1: Build a user social network and determine the initial number of followers f for each user i and initial impact factor The definition is as follows: Step 3.1.2: Calculate the user's impact factor using the random walk model Step 3.1.3: Use graph convolutional neural network to update the feature representation of user nodes, including two stages: information aggregation and feature conversion; Step 3.1.4: Calculate the feature representation of user node v at layer l+1 according to the formula The formula is as follows: Where N(v) represents the set of neighbor nodes of user node v, d u and d v Represents the degree of user nodes u and v, W l is the learnable weight matrix of layer l, represents the feature representation of node u in the lth layer, σ(.) is a nonlinear activation function; After the graph convolutional neural network model is trained, the feature representation of the nodes in the output layer of the graph convolutional neural network is That is, the user feature representation obtained based on the user's social feature learning, where k is the number of output layers in the graph convolutional network, which will be used to form the final enhanced user browsing event features; Step 3.2: User browsing sequence analysis and prediction based on graph neural network, including graph neural network module and event analysis and prediction based on vector embedding; Step 3.2.1: Use the graph neural network module to process the user browsing event sequence, build and update the session graph G = (V, E) of the user browsing event, and obtain the updated node state represents the state at time step t; Step 3.2.1.1: Each user browsing event in the session i Convert to graph nodes and construct a session graph G = (V, E), where V is a node set and E is an edge set; Step 3.2.1.2: Initialize the state of each node where x v is the initial eigenvector of node v, the superscript T represents the transpose, Represents the initial state of node v in the first round of iteration; Step 3.2.1.3: Update node status through the gating mechanism, including aggregating neighbor node information Compute update gate Reset Gate Candidate Status Final status update: is the neighbor information aggregated at time t; A v is the vth row of the adjacency matrix A; represents the state of node i at time t-1; b is the deviation vector; Represented as an update gate, it controls the update amount from the current state to the new state; To reset the gate, determine the forgotten information; is the candidate state at time t; ⊙ represents the element product, V in |V| represents the node set, |V| represents the number of nodes, and W z ,W,U,U z , W r , U r is the weight matrix, σ(·) is the activation function, tanh(.) is the activation function, The meaning is the state of node v at time t-1; Step 3.2.2: Combine frequent pattern mining and user social feature vectors to perform event analysis and prediction to obtain enhanced user browsing event feature representation As input, the model is trained and the model outputs the subsequent events that may occur to the current entity and their probabilities.

10. The method for analyzing and predicting user browsing events based on graph neural network according to claim 9, characterized in that: Step 3.2.2 includes the following steps: Step 3.2.2.1: Use frequent pattern mining technology to extract frequent browsing event patterns and construct global event association graph 2 Step 3.2.2.2: Extract frequent event feature vectors through GCN Step 3.2.2.3: Integrate user feature vector Get the user social relationship feature vector Step 3.2.2.4: Calculate the enhanced user browsing event feature representation Where β1 and β2 are variable parameters, β1+β2=1, β1>0, β2>0; Step 3.2.3: Combine the fused enhanced user browsing event features As input, the model is trained. Specifically, for each event entity u, the model will output the subsequent events that may occur to the current entity and their probabilities, and select the k events with the highest scores as the final result.

Citation Information

Patent Citations

  • Abnormity detection method based on log event graph and association relationship mining

    CN113326244A

  • Graph classification-based arbitrage gang identification method

    CN114387005A

  • Event prediction method and device, computer equipment, storage medium and program product

    CN117216381A

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

    CN118171738A

  • Performance optimization of complex industrial systems and processes

    US20230152787A1

Cited By

  • Building information model streaming preloading method based on user browsing behavior prediction

    CN121523761A