Multi-scale space-time perception recommendation method and system based on hypergraph convolution
By adopting a multi-scale spatiotemporal perception method based on hypergraph convolution in the recommendation system, the shortcomings of the existing technology in processing multi-scale spatiotemporal data and group interaction are solved, and the accuracy and personalization of recommendations are significantly improved.
Patent Information
- Application Number
- CN202411988192.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-12-30
AI Technical Summary
The existing deep learning and graph neural network methods have shortcomings in processing multi-scale spatiotemporal data and group interactions, resulting in low accuracy of recommendation results.
A multi-scale spatiotemporal perception recommendation method based on hypergraph convolution is adopted. By obtaining user check-in data, time-scale segmentation is performed, hypergraph is constructed, and using hypergraph convolution and attention mechanisms, node features and hyper-edge features are updated, multi-scale spatiotemporal information is integrated, and prediction recommendation results are obtained.
It significantly improves the accuracy and personalization of recommendations, and can more effectively deal with complex spatial and temporal relationships and group interaction effects.
Smart Images

Figure CN119903237A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of recommendation of social network applications, and in particular to a multi-scale spatiotemporal perception recommendation method and system based on hypergraph convolution. Background Art
[0002] Recommendation systems play a vital role in modern Internet and information technology, and are widely used in e-commerce, social networks, travel planning, advertising, travel planning and other fields. Its core goal is to provide users with personalized content or services by analyzing their historical behaviors and preferences, thereby improving user experience, increasing user stickiness, and ultimately maximizing commercial value. In the tourism industry, recommendation systems can help travelers plan their itineraries, recommend popular attractions, accommodation, transportation, etc. Based on social network application platforms, personalized travel suggestions are provided by analyzing users' travel history, evaluations and preferences to enhance users' travel experience.
[0003] In order to overcome the limitations of a single recommendation method, hybrid recommendation systems combine collaborative filtering and content-based recommendations, while leveraging multiple data sources (such as user behavior, item features, social relationships, etc.) to provide more diverse recommendation results. However, traditional hybrid recommendation methods still have difficulty in handling complex spatiotemporal relationships and group interaction effects. In recent years, with the development of deep learning and graph neural networks, recommendation systems have entered a new stage of intelligence. Deep learning models (such as neural collaborative filtering, convolutional neural networks, recurrent neural networks, etc.) can automatically learn complex nonlinear relationships, significantly improving the accuracy and personalization of recommendations. Graph neural networks model the complex relationships between users and items. However, existing deep learning and graph neural network methods still have deficiencies in handling multi-scale spatiotemporal data and group interactions, and the accuracy of recommendation results is low. Summary of the invention
[0004] The purpose of this application is to provide a multi-scale spatiotemporal perception recommendation method and system based on hypergraph convolution, which can improve the accuracy and personalization of recommendations.
[0005] To achieve the above objectives, this application provides the following solutions:
[0006] In a first aspect, the present application provides a multi-scale spatiotemporal perception recommendation method based on hypergraph convolution, comprising:
[0007] Acquire sample user sign-in data; the sample user sign-in data includes user information and spatiotemporal information of the sign-in points visited by the user; the spatiotemporal information includes geographic information of the sign-in points and sign-in time information;
[0008] Performing time scale segmentation on the sample user check-in data to obtain sample multi-scale check-in sequence data; the sample multi-scale check-in sequence data includes sub-sequences at different scales; each sub-sequence includes the spatiotemporal information of several check-in points;
[0009] Taking the user's check-in point as a node and the time scale as a hyperedge, a hypergraph at each time scale is constructed according to the sample multi-scale check-in sequence data; the node features of the nodes in the hypergraph include user information and spatiotemporal information of the check-in point; the hyperedge features of the hyperedge are composed of node features of several connected nodes;
[0010] The node features and hyperedge features of the hypergraph are used to train the recommendation model to obtain a trained recommendation model; the recommendation model uses hypergraph convolution and attention mechanism, takes joint constraints as loss, updates the node features and hyperedge features, and obtains updated node features and updated hyperedge features; based on the updated node features and updated hyperedge features, multi-scale spatiotemporal information interactive fusion is performed to obtain a predicted recommendation result; the joint constraints are composed of a node constraint loss function and a hyperedge loss function; the predicted recommendation result includes the location information of the predicted recommendation point;
[0011] The trained recommendation model is used to predict the information to be predicted, and the target prediction recommendation result of the time to be predicted is obtained; the information to be predicted includes user information, geographical information of the check-in point visited by the user, and time information of the time to be predicted.
[0012] Optionally, the node features and the hyperedge features of the hypergraph are used to train the recommendation model to obtain a trained recommendation model, specifically including:
[0013] For each time scale, based on the feature vector of each node, the operation of aggregating similar semantic information of nodes is adopted to update the hyperedge feature to obtain the aggregated feature information of the hyperedge; the aggregated feature information of the hyperedge is used as the hyperedge feature of the hyperedge;
[0014] Based on the aggregated feature information of hyperedges, the semantic similarity of nodes and corresponding hyperedges is constrained, and the node constraint loss function and hyperedge loss function are constructed;
[0015] Using hypergraph convolution and attention mechanism, the node features and hyperedge features are updated with joint constraints as loss to obtain updated node features and updated hyperedge features.
[0016] Based on the updated node features and the updated hyperedge features, multi-scale spatiotemporal information is interactively fused to obtain the prediction and recommendation results;
[0017] Calculate the loss function value based on the predicted recommendation results of each batch;
[0018] The recommendation model is trained using the loss function value to obtain a trained recommendation model.
[0019] Optionally, the loss function value is calculated by a cross entropy loss function.
[0020] Optionally, the node constraint loss function is expressed as follows:
[0021]
[0022] in, represents the node constraint loss function, N s represents the number of nodes at time scale s, Represents the semantic similarity difference of the j-th node at time scale s.
[0023] Optionally, the hyperedge loss function is expressed as follows:
[0024]
[0025] in, represents the hyperedge loss function, M s represents the number of hyperedges at time scale s, α ij represents the relative weights of the ith hyperedge and the jth hyperedge at time scale s, D ij Represents the distance between the i-th hyperedge and the j-th hyperedge at time scale s.
[0026] Optionally, the hypergraph convolution is expressed as follows:
[0027]
[0028] Among them, (V s ) (K+1) represents the encoding result of the K+1th hypergraph convolutional network layer, (V s ) (K) represents the encoding result of the Kth hypergraph convolutional network layer, D v is the diagonal matrix of node degrees of the hypergraph, H s represents the hypergraph at time scale s, D e is the diagonal matrix of the hyperedge degrees of the hypergraph.
[0029] Optionally, a trained recommendation model is used to predict the information to be predicted, and a target prediction recommendation result at the time to be predicted is obtained, specifically including:
[0030] Acquire information to be predicted; the information to be predicted includes user information, geographic information of the check-in point visited by the user, and time information of the time to be predicted;
[0031] Inputting the information to be predicted into the trained recommendation model to obtain prediction scores of several predicted recommendation points;
[0032] The preference scores of all the prediction recommendation points are sorted from large to small, and the prediction recommendation points that are ranked first by a set number are determined as the target prediction recommendation results for the time to be predicted.
[0033] In the second aspect, the present application provides a multi-scale spatiotemporal perception recommendation system based on hypergraph convolution, comprising:
[0034] A user check-in data acquisition module is used to: acquire sample user check-in data; the sample user check-in data includes user information and spatiotemporal information of the check-in points visited by the user; the spatiotemporal information includes geographic information of the check-in points and check-in time information;
[0035] A time scale segmentation module is used to: perform time scale segmentation on the sample user check-in data to obtain sample multi-scale check-in sequence data; the sample multi-scale check-in sequence data includes sub-sequences at different scales; each sub-sequence includes the spatiotemporal information of several check-in points;
[0036] A hypergraph construction module is used to: use the user's check-in point as a node and the time scale as a hyperedge, and construct a hypergraph at each time scale according to the sample multi-scale check-in sequence data; the node features of the nodes in the hypergraph include user information and the spatiotemporal information of the check-in point; the hyperedge features of the hyperedge are composed of the node features of the connected nodes;
[0037] The model training module is used to: train the recommendation model using the node features and hyperedge features of the hypergraph to obtain a trained recommendation model; the recommendation model uses hypergraph convolution and attention mechanism, takes joint constraints as loss, updates the node features and hyperedge features, and obtains updated node features and updated hyperedge features; based on the updated node features and updated hyperedge features, multi-scale spatiotemporal information interactive fusion is performed to obtain a predicted recommendation result; the joint constraints are composed of a node constraint loss function and a hyperedge loss function; the predicted recommendation result includes the location information of the predicted recommendation point;
[0038] The prediction and recommendation module is used to: use the trained recommendation model to predict the information to be predicted and obtain the target prediction recommendation result at the time to be predicted; the information to be predicted includes user information, geographical information of the check-in point visited by the user and time information of the time to be predicted.
[0039] Optionally, the model training module is used to:
[0040] For each time scale, based on the feature vector of each node, the operation of aggregating similar semantic information of nodes is adopted to update the hyperedge feature to obtain the aggregated feature information of the hyperedge; the aggregated feature information of the hyperedge is used as the hyperedge feature of the hyperedge;
[0041] Based on the aggregated feature information of hyperedges, the semantic similarity of nodes and corresponding hyperedges is constrained, and the node constraint loss function and hyperedge loss function are constructed;
[0042] Using hypergraph convolution and attention mechanism, the node features and hyperedge features are updated with joint constraints as loss to obtain updated node features and updated hyperedge features.
[0043] Based on the updated node features and the updated hyperedge features, multi-scale spatiotemporal information is interactively fused to obtain the prediction and recommendation results;
[0044] Calculate the loss function value based on the predicted recommendation results of each batch;
[0045] The recommendation model is trained using the loss function value to obtain a trained recommendation model.
[0046] Optionally, the prediction and recommendation module is used to:
[0047] Acquire information to be predicted; the information to be predicted includes user information, geographic information of the check-in point visited by the user, and time information of the time to be predicted;
[0048] Inputting the information to be predicted into the trained recommendation model to obtain prediction scores of several predicted recommendation points;
[0049] The preference scores of all the prediction recommendation points are sorted from large to small, and the prediction recommendation points that are ranked first by a set number are determined as the target prediction recommendation results for the time to be predicted.
[0050] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0051] The present application provides a multi-scale spatiotemporal awareness recommendation method and system based on hypergraph convolution. Through hypergraph convolution and attention mechanism, node features and hyperedge features are updated with joint constraints as loss to obtain updated node features and updated hyperedge features. Based on the updated node features and updated hyperedge features, multi-scale spatiotemporal information is interactively fused to obtain predicted recommendation results. By introducing hypergraph convolution attention mechanism and multi-scale spatiotemporal perception, multi-scale information problems of complex spatiotemporal relationships are comprehensively considered, providing a more intelligent and accurate recommendation method, which significantly improves the accuracy and personalization of recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 This is an application environment diagram of a multi-scale spatiotemporal perception recommendation method based on hypergraph convolution in one embodiment of the present application;
[0054] Figure 2 A schematic diagram of a process flow of a multi-scale spatiotemporal perception recommendation method based on hypergraph convolution provided in one embodiment of the present application;
[0055] Figure 3 A schematic diagram of a specific process of a multi-scale spatiotemporal perception recommendation method based on hypergraph convolution provided in one embodiment of the present application;
[0056] Figure 4 A schematic diagram of edge features formed by operations between hypergraph nodes provided in an embodiment of the present application;
[0057] Figure 5 A schematic diagram of multi-scale interaction of hypergraph convolution provided in one embodiment of the present application;
[0058] Figure 6 A schematic diagram of the functional modules of a multi-scale spatiotemporal-aware recommendation system based on hypergraph convolution provided in one embodiment of the present application. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0060] Although recommendation systems have made significant progress, they still face many challenges in practical applications. Traditional recommendation systems usually only consider users' historical behavior data, but ignore the regularity of user behavior at different time and space scales. In particular, in some special scenarios, users' interests and needs may change over time, or they may show different preferences in different geographical locations. This recommendation method that lacks time and space awareness is difficult to provide highly personalized suggestions, resulting in inaccurate recommendation results.
[0061] To address the above issues, this application proposes a multi-scale spatiotemporal perception recommendation method and system based on hypergraph convolution.
[0062] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0063] The multi-scale spatiotemporal perception recommendation method based on hypergraph convolution provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the sample user check-in data to the server 104. After the server 104 receives the sample user check-in data, for the sample user check-in data, the server 104 performs time scale segmentation on the sample user check-in data to obtain sample multi-scale check-in sequence data, and uses the user's check-in point as a node and the time scale as a hyperedge to construct a hypergraph at each time scale. The node features and hyperedge features of the hypergraph are used to train the recommendation model; the recommendation model uses the hypergraph convolution and attention mechanism, and updates the node features and hyperedge features with node loss and hyperedge loss as constraints. Based on the updated node features and hyperedge features, multi-scale spatiotemporal information interactive fusion is performed to obtain the predicted recommendation result, and the trained recommendation model is used to predict the information to be predicted to obtain the target predicted recommendation result at the time to be predicted. The server 104 may feed back the obtained target prediction recommendation result to the terminal 102. In addition, in some embodiments, the multi-scale spatiotemporal perception recommendation method based on hypergraph convolution may also be implemented by the server 104 or the terminal 102 alone, such as the terminal 102 may directly recommend items based on the sample user check-in data, or the server 104 may obtain the sample user check-in data from the data storage system and recommend items based on the sample user check-in data.
[0064] The terminal 102 may be, but is not limited to, various desktop computers and laptop computers. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.
[0065] In an exemplary embodiment, Figure 2 and Figure 3 As shown, a multi-scale spatiotemporal perception recommendation method based on hypergraph convolution is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate, including the following steps 201 to 205. Among them:
[0066] Step 201: Acquire sample user check-in data; the sample user check-in data includes user information and spatiotemporal information of the check-in points visited by the user; the spatiotemporal information includes geographic information of the check-in points and check-in time information.
[0067] Step 202: performing time scale segmentation on the sample user check-in data to obtain sample multi-scale check-in sequence data; the sample multi-scale check-in sequence data includes sub-sequences at different scales; each sub-sequence includes the spatiotemporal information of a number of check-in points.
[0068] Step 203: Taking the user's check-in point as a node and the time scale as a hyperedge, a hypergraph at each time scale is constructed according to the sample multi-scale check-in sequence data; the node features of the nodes in the hypergraph include user information and spatiotemporal information of the check-in point; the hyperedge features of the hyperedge are composed of node features of several connected nodes;
[0069] Step 204: using the node features and hyperedge features of the hypergraph to train the recommendation model to obtain a trained recommendation model; the recommendation model uses hypergraph convolution and attention mechanism, takes joint constraints as loss, updates the node features and hyperedge features to obtain updated node features and updated hyperedge features; based on the updated node features and updated hyperedge features, multi-scale spatiotemporal information interactive fusion is performed to obtain a predicted recommendation result; the joint constraints are composed of a node constraint loss function and a hyperedge loss function; the predicted recommendation result includes the location information of the predicted recommendation point;
[0070] Step 205: Use the trained recommendation model to predict the information to be predicted and obtain the target prediction recommendation result for the time to be predicted; the information to be predicted includes user information, geographic information of the check-in point visited by the user, and time information of the time to be predicted.
[0071] By implementing the above steps 201 to 205, by introducing the hypergraph convolutional attention mechanism and multi-scale spatiotemporal perception, the multi-scale information problem of complex spatiotemporal relationships is comprehensively considered, and a more intelligent and accurate recommendation method is provided. The performance of the recommendation model is further enhanced by using multi-scale spatiotemporal perception information, which significantly improves the accuracy and personalization of the recommendation.
[0072] Input user check-in data, including user information (user ID), check-in point location information (i.e., geographic coordinates of the check-in location), and user check-in timestamp. Based on the input data, divide the user's historical check-in behavior into different time and space scales, such as modeling rich node information at time scales such as hours, days, and weeks to capture the user's short-term and long-term behavior patterns. After the user check-in sequence is arranged in chronological order, it is divided into time by hours, days, and weeks. The multi-scale check-in sequence data division is expressed as follows:
[0073]
[0074] in, represents the i-th subsequence divided by time scale s, k represents the size of the subsequence, each of which contains the geographic information of the check-in points visited by the user. and check-in time information The geographic information of the check-in point is the location information of the check-in point, and the check-in time information is the user's check-in timestamp.
[0075] A hypergraph is constructed with the user's check-in points as nodes and the divided time scales as hyperedges. The hypergraph is used to represent more complex many-to-many relationships in the form of an association matrix: a graph structure representation of user-check-in point nodes and hyperedges is constructed, as shown in the following formula.
[0076]
[0077] Among them, H s (v s ,e s ) represents the hypergraph at time scale s, v s is the set of nodes in the user check-in point interaction graph, e s is the set of hyperedges in the hypergraph. The relationship between nodes is represented by an adjacency matrix of size M×N. Each element of the adjacency matrix represents the relationship category between the corresponding node and the hyperedge; if e s connect v s It means that if a node at time scale s is connected to a hyperedge at time scale s, then the element in the adjacency matrix is 1, otherwise it is 0.
[0078] In another exemplary embodiment of the present application, the above step 204 specifically includes the following steps 301 to 306.
[0079] Step 301: for each time scale, based on the feature vector of each node, the operation of aggregating similar semantic information of nodes is adopted to update the hyperedge feature to obtain aggregated feature information of the hyperedge; and the aggregated feature information of the hyperedge is used as the hyperedge feature of the hyperedge.
[0080] Step 302: Based on the aggregated feature information of the hyperedge, the semantic similarity of the node and the corresponding hyperedge is constrained, and a node constraint loss function and a hyperedge loss function are constructed.
[0081] Step 303: Utilize hypergraph convolution and attention mechanism, take joint constraint as loss, update node features and hyperedge features, and obtain updated node features and updated hyperedge features.
[0082] Step 304: Based on the updated node features and the updated hyperedge features, multi-scale spatiotemporal information interactive fusion is performed to obtain a predicted recommendation result.
[0083] Step 305: Calculate the loss function value based on the predicted recommendation results of each batch. The loss function value is calculated by the cross entropy loss function.
[0084] Step 306: Use the loss function value to train the recommendation model to obtain a trained recommendation model.
[0085] like Figure 4 As shown, the node features of the N nodes connected by each hyperedge are calculated based on the hypergraph convolution, and the aggregated feature information of the hyperedge is obtained by clustering the nodes with high semantic similarity. Step 301 includes the following steps 401 to 402.
[0086] Step 401: Use an embedding method to map the features of each node in the hypergraph to the Euclidean space.
[0087] Assume that the number of users and geographic points, i.e. the number of nodes in the hypergraph, is n, the feature dimension is d, and the feature vector group V of the nodes in the hypergraph is s It is expressed as shown below.
[0088] V s = {v s 1 ,…v s i …,v s n} (3).
[0089] Among them, v s i represents the i-th node v of time scale s in Euclidean space i The feature vector of .
[0090] Step 402: Based on the feature vector of each node, the operation of aggregating similar semantic information of nodes is adopted to update the hyperedge feature. The aggregated feature information of the hyperedge is expressed in the form shown in the following formula.
[0091]
[0092] in, represents the hyperedge feature of the ith hyperedge, avg(·) is the average aggregation operation, Indicated by Connected adjacent nodes, E s Represents the set of adjacent nodes connected by the i-th hyperedge at time scale s.
[0093] Based on the aggregated feature information of the hyperedge obtained after the interactive aggregation of each node, the semantic similarity of the nodes and the corresponding hyperedges is constrained by reducing the interference of irrelevant noise, thereby enhancing the robustness of the recommendation model and the accuracy of the recommendation.
[0094] By using node constraints to reduce the interference of irrelevant noise, the semantic similarity difference of the j-th node at time scale s is expressed as shown in the following formula.
[0095]
[0096] in, represents the semantic similarity difference of the jth node at time scale s, represents the i-th hyperedge of time scale s The set of connected nodes.
[0097] The similarity difference is calculated by the aggregated feature information of the hyperedge and the node features. Based on the semantic similarity difference of the nodes, the node constraint loss function is expressed as shown in the following formula.
[0098]
[0099] in, represents the node constraint loss function, N s represents the number of nodes at time scale s.
[0100] The hyperedge constraint of distance similarity is used to deal with the time transformation entanglement problem, and the correlation between two hyperedges is reflected based on cosine similarity, as shown in the following formula.
[0101]
[0102] Among them, α ij represents the relative weights of the ith and jth hyperedges at time scale s; They represent the i-th and j-th hyperedges at time scale s respectively. Then, the Euclidean distance is used to measure the difference between the hyperedges, which is expressed as shown in the following formula.
[0103]
[0104] Where D ij Represents the distance between the i-th hyperedge and the j-th hyperedge at time scale s.
[0105] The hyperedge loss function is calculated based on similarity and Euclidean distance, and the hyperedge loss function is expressed as shown in the following formula.
[0106]
[0107] in, represents the hyperedge loss function, M s represents the number of hyperedges at time scale s.
[0108] The joint constraint loss function based on node constraints and hyperedge constraints is expressed as shown in the following formula.
[0109]
[0110] Among them, L const represents the joint constraint loss, θ is the hyperparameter that controls the node loss and hyperedge loss, hyperedges are the dependencies of aggregation, s is the time scale of the split, and S is the number of all time scales of the split.
[0111] like Figure 5 As shown in the figure, based on multi-scale information fusion, the attention mechanism is used between multiple scales to capture the interaction strength and change interaction, and the recommendation model is trained.
[0112] To capture the grouped interactions between nodes with similar semantic information within each scale, the intra-scale module uses a hypergraph convolutional attention mechanism. Specifically, given a hypergraph H at a time scale s, s , first use the attention mechanism to measure each node and the interaction strength of its related hyperedges at that time scale. Through the intra-scale module, the recommendation model is able to identify and emphasize the nodes and hyperedge interactions that contribute most to the prediction at a specific spatiotemporal scale, which is formulated as:
[0113]
[0114] Among them, ReLU is the activation function, f is a trainable multi-layer perceptron, Represents the nodes under time scale s The associated k-th hyperedge, Represents the nodes under time scale s The set of associated hyperedges.
[0115] The hypergraph convolution is represented as follows:
[0116]
[0117] Among them, (V s ) (K+1) represents the encoding result of the K+1th hypergraph convolutional network layer, (V s ) (K) represents the encoding result of the Kth hypergraph convolutional network layer, D v is the diagonal matrix of node degrees of the hypergraph, H s represents the hypergraph at time scale s, D e is the diagonal matrix of the hyperedge degrees of the hypergraph.
[0118] The hyperedge attention formula is as follows:
[0119]
[0120] in, is the updated hyperedge feature, Q, K, and V represent the query vector (Query), key vector (Key), and value vector (Value), respectively. The query vector, key vector, and value vector are obtained according to the updated node information and the updated hyperedge feature. T represents transposition, and D is the dimension of the key vector.
[0121] After obtaining the updated node features and updated hyperedge feature representations, they are concatenated and propagated to the linear layer for prediction, using the cross entropy loss as the loss function for mini-batch training.
[0122]
[0123] in, represents the cross entropy loss; is the true label value of user u, which is 1 if true and 0 if false. Indicates that the check-in point j visited by user u is in subsequence i, Indicates that the check-in point j visited by user u is not in the subsequence i; It represents the predicted preference score of user u visiting check-in point j in subsequence i. The predicted preference score is a value less than 1 and greater than 0. U represents the number of users, n is the number of all check-in points, u traverses the number of all users, i traverses the number of visit points (trajectories) of user u, and j traverses the number of all possible visit points.
[0124] In another exemplary embodiment of the present application, the above step 205 specifically includes the following steps 501 to 503.
[0125] Step 501: Acquire information to be predicted; the information to be predicted includes user information, geographic information of the check-in point visited by the user, and time information of the time to be predicted.
[0126] Step 502: Input the information to be predicted into the trained recommendation model to obtain prediction scores of several predicted recommendation points. The recommendation model is a multi-scale spatiotemporal perception recommendation model based on hypergraph convolution.
[0127] Step 503: sort the preference scores of all the predicted recommendation points from large to small, and determine the predicted recommendation points that are ranked in the front by a set number as the target predicted recommendation results for the time to be predicted.
[0128] Input the information to be predicted, including user information, check-in point location information, and user check-in timestamp, and perform multi-scale feature extraction on the information to be predicted and map it into subsequences of different spatiotemporal scales; use user check-in points as nodes, and form hyperedges within a certain spatiotemporal range to form a hypergraph; model node features and hyperedge features of different spatiotemporal scales based on the hypergraph; interactively aggregate node features based on semantic similarity, and use hyperedge constraints to distinguish different spatiotemporal intervals; based on the updated node features and updated hyperedge features, perform multi-scale spatiotemporal information interactive fusion, use the Softmax function to calculate the user's preference score for the next predicted recommendation point, and recommend the Top-K items to the user, that is, recommend K items based on the trained recommendation model, set the number to K, determine the top K predicted recommendation points as the target predicted recommendation results for the time to be predicted, and recommend them to the user.
[0129] The user information to be recommended and the sequence of checked-in locations are input into the trained recommendation model to make predictions and recommendations at the next moment. The checked-in location sequence includes the check-in point location information (geographic coordinates) and the user check-in timestamp.
[0130] The present application also provides an application scenario, which applies the above-mentioned multi-scale spatiotemporal perception recommendation method based on hypergraph convolution. Specifically: the multi-scale spatiotemporal perception recommendation method based on hypergraph convolution provided in this embodiment can be applied in tourism planning recommendation scenarios. The tourism planning recommendation scenario includes an information acquisition link and a recommendation point prediction link; the information to be predicted enters the recommendation point prediction link from the information acquisition link, and the corresponding target prediction recommendation result is obtained through human-computer collaboration. The multi-scale spatiotemporal perception recommendation method based on hypergraph convolution provided in this embodiment belongs to the recommendation point prediction link. Specifically, in the process of recommendation point prediction link for users, a trained recommendation model can be used to predict the information to be predicted to obtain the target prediction recommendation result at the time to be predicted.
[0131] Based on the same inventive concept, the embodiment of the present application also provides a multi-scale spatiotemporal perception recommendation system based on hypergraph convolution for implementing the multi-scale spatiotemporal perception recommendation method based on hypergraph convolution mentioned above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations of one or more embodiments of the multi-scale spatiotemporal perception recommendation system based on hypergraph convolution provided below can refer to the limitations of the multi-scale spatiotemporal perception recommendation method based on hypergraph convolution above, and will not be repeated here.
[0132] In an exemplary embodiment, Figure 6 As shown, a multi-scale spatiotemporal perception recommendation system based on hypergraph convolution is provided, including the following modules.
[0133] The user check-in data acquisition module T1 is used to: obtain sample user check-in data; the sample user check-in data includes user information and spatiotemporal information of the check-in points visited by the user; the spatiotemporal information includes geographic information of the check-in points and check-in time information.
[0134] The time scale segmentation module T2 is used to: perform time scale segmentation on the sample user check-in data to obtain sample multi-scale check-in sequence data; the sample multi-scale check-in sequence data includes sub-sequences at different scales; each sub-sequence includes the spatiotemporal information of several check-in points.
[0135] The hypergraph construction module T3 is used to: use the user's check-in points as nodes and the time scale as the hyperedge, and construct a hypergraph at each time scale according to the sample multi-scale check-in sequence data; the node features of the nodes in the hypergraph include user information and the spatiotemporal information of the check-in points; the hyperedge features of the hyperedge are composed of the node features of several connected nodes.
[0136] The model training module T4 is used to: use the node features and hyperedge features of the hypergraph to train the recommendation model to obtain a trained recommendation model; the recommendation model uses hypergraph convolution and attention mechanism, takes joint constraints as loss, updates the node features and hyperedge features to obtain updated node features and updated hyperedge features; based on the updated node features and updated hyperedge features, multi-scale spatiotemporal information interactive fusion is performed to obtain a predicted recommendation result; the joint constraints are composed of a node constraint loss function and a hyperedge loss function; the predicted recommendation result includes the location information of the predicted recommendation point.
[0137] The prediction and recommendation module T5 is used to: use the trained recommendation model to predict the information to be predicted and obtain the target prediction recommendation result for the time to be predicted; the information to be predicted includes user information, geographical information of the check-in point visited by the user and time information of the time to be predicted.
[0138] Wherein, the model training module T4 is used to:
[0139] For each time scale, based on the feature vector of each node, the operation of aggregating similar semantic information of nodes is adopted to update the hyperedge feature to obtain the aggregated feature information of the hyperedge; the aggregated feature information of the hyperedge is used as the hyperedge feature of the hyperedge;
[0140] Based on the aggregated feature information of hyperedges, the semantic similarity of nodes and corresponding hyperedges is constrained, and the node constraint loss function and hyperedge loss function are constructed;
[0141] Using hypergraph convolution and attention mechanism, the node features and hyperedge features are updated with joint constraints as loss to obtain updated node features and updated hyperedge features.
[0142] Based on the updated node features and the updated hyperedge features, multi-scale spatiotemporal information is interactively fused to obtain the prediction and recommendation results;
[0143] Calculate the loss function value based on the predicted recommendation results of each batch;
[0144] The recommendation model is trained using the loss function value to obtain a trained recommendation model.
[0145] The prediction and recommendation module T5 is used to:
[0146] Acquire information to be predicted; the information to be predicted includes user information, geographic information of the check-in point visited by the user, and time information of the time to be predicted;
[0147] Inputting the information to be predicted into the trained recommendation model to obtain prediction scores of several predicted recommendation points;
[0148] The preference scores of all the prediction recommendation points are sorted from large to small, and the prediction recommendation points that are ranked first by a set number are determined as the target prediction recommendation results for the time to be predicted.
[0149] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0150] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A multi-scale spatiotemporal perception recommendation method based on hypergraph convolution, characterized in that: The multi-scale spatiotemporal perception recommendation method based on hypergraph convolution includes: Acquire sample user sign-in data; the sample user sign-in data includes user information and spatiotemporal information of the sign-in points visited by the user; the spatiotemporal information includes geographic information of the sign-in points and sign-in time information; Performing time scale segmentation on the sample user check-in data to obtain sample multi-scale check-in sequence data; the sample multi-scale check-in sequence data includes sub-sequences at different scales; each sub-sequence includes the spatiotemporal information of several check-in points; Taking the user's check-in point as a node and the time scale as a hyperedge, a hypergraph at each time scale is constructed according to the sample multi-scale check-in sequence data; the node features of the nodes in the hypergraph include user information and spatiotemporal information of the check-in point; the hyperedge features of the hyperedge are composed of node features of several connected nodes; The node features and hyperedge features of the hypergraph are used to train the recommendation model to obtain a trained recommendation model; the recommendation model uses hypergraph convolution and attention mechanism, takes joint constraints as loss, updates the node features and hyperedge features, and obtains updated node features and updated hyperedge features; based on the updated node features and updated hyperedge features, multi-scale spatiotemporal information interactive fusion is performed to obtain a predicted recommendation result; the joint constraints are composed of a node constraint loss function and a hyperedge loss function; the predicted recommendation result includes the location information of the predicted recommendation point; The trained recommendation model is used to predict the information to be predicted, and the target prediction recommendation result of the time to be predicted is obtained; the information to be predicted includes user information, geographical information of the check-in point visited by the user, and time information of the time to be predicted.
2. The multi-scale spatiotemporal perception recommendation method based on hypergraph convolution according to claim 1, characterized in that: The node features and the hyperedge features of the hypergraph are used to train the recommendation model to obtain a trained recommendation model, which specifically includes: For each time scale, based on the feature vector of each node, the operation of aggregating similar semantic information of nodes is adopted to update the hyperedge feature to obtain the aggregated feature information of the hyperedge; the aggregated feature information of the hyperedge is used as the hyperedge feature of the hyperedge; Based on the aggregated feature information of hyperedges, the semantic similarity of nodes and corresponding hyperedges is constrained, and the node constraint loss function and hyperedge loss function are constructed; Using hypergraph convolution and attention mechanism, the node features and hyperedge features are updated with joint constraints as loss to obtain updated node features and updated hyperedge features. Based on the updated node features and the updated hyperedge features, multi-scale spatiotemporal information is interactively fused to obtain the prediction and recommendation results; Calculate the loss function value based on the predicted recommendation results of each batch; The recommendation model is trained using the loss function value to obtain a trained recommendation model.
3. The multi-scale spatiotemporal perception recommendation method based on hypergraph convolution according to claim 2, characterized in that: The loss function value is calculated by the cross entropy loss function.
4. The multi-scale spatiotemporal perception recommendation method based on hypergraph convolution according to claim 1, characterized in that: The node constraint loss function is expressed as follows: in, represents the node constraint loss function, N s represents the number of nodes at time scale s, Represents the semantic similarity difference of the j-th node at time scale s.
5. The multi-scale spatiotemporal perception recommendation method based on hypergraph convolution according to claim 1, characterized in that: The hyperedge loss function is expressed as follows: in, represents the hyperedge loss function, M s represents the number of hyperedges at time scale s, α ij represents the relative weights of the ith hyperedge and the jth hyperedge at time scale s, D ij Represents the distance between the i-th hyperedge and the j-th hyperedge at time scale s.
6. The multi-scale spatiotemporal perception recommendation method based on hypergraph convolution according to claim 1, characterized in that: The hypergraph convolution is represented as follows: Among them, (V s ) (K+1) represents the encoding result of the K+1th hypergraph convolutional network layer, (V s ) (K) represents the encoding result of the Kth hypergraph convolutional network layer, D v is the diagonal matrix of node degrees of the hypergraph, H s represents the hypergraph at time scale s, D e is the diagonal matrix of the hyperedge degrees of the hypergraph.
7. The multi-scale spatiotemporal perception recommendation method based on hypergraph convolution according to claim 1, characterized in that: Use the trained recommendation model to predict the information to be predicted and obtain the target prediction recommendation results at the time to be predicted, including: Acquire information to be predicted; the information to be predicted includes user information, geographic information of the check-in point visited by the user, and time information of the time to be predicted; Inputting the information to be predicted into the trained recommendation model to obtain prediction scores of several predicted recommendation points; The preference scores of all the prediction recommendation points are sorted from large to small, and the prediction recommendation points that are ranked first by a set number are determined as the target prediction recommendation results for the time to be predicted.
8. A multi-scale spatiotemporal awareness recommendation system based on hypergraph convolution based on the multi-scale spatiotemporal awareness recommendation method based on hypergraph convolution according to any one of claims 1 to 7, characterized in that: The multi-scale spatiotemporal perception recommendation system based on hypergraph convolution includes: A user check-in data acquisition module is used to: acquire sample user check-in data; the sample user check-in data includes user information and spatiotemporal information of the check-in points visited by the user; the spatiotemporal information includes geographic information of the check-in points and check-in time information; A time scale segmentation module is used to: perform time scale segmentation on the sample user check-in data to obtain sample multi-scale check-in sequence data; the sample multi-scale check-in sequence data includes sub-sequences at different scales; each sub-sequence includes the spatiotemporal information of several check-in points; A hypergraph construction module is used to: use the user's check-in point as a node and the time scale as a hyperedge, and construct a hypergraph at each time scale according to the sample multi-scale check-in sequence data; the node features of the nodes in the hypergraph include user information and the spatiotemporal information of the check-in point; the hyperedge features of the hyperedge are composed of the node features of the connected nodes; The model training module is used to: train the recommendation model using the node features and hyperedge features of the hypergraph to obtain a trained recommendation model; the recommendation model uses hypergraph convolution and attention mechanism, takes joint constraints as loss, updates the node features and hyperedge features to obtain updated node features and updated hyperedge features; based on the updated node features and updated hyperedge features, multi-scale spatiotemporal information interactive fusion is performed to obtain a predicted recommendation result; the joint constraints are composed of a node constraint loss function and a hyperedge loss function; the predicted recommendation result includes the location information of the predicted recommendation point; The prediction and recommendation module is used to: use the trained recommendation model to predict the information to be predicted and obtain the target prediction recommendation result at the time to be predicted; the information to be predicted includes user information, geographical information of the check-in point visited by the user and time information of the time to be predicted.
9. The multi-scale spatiotemporal perception recommendation system based on hypergraph convolution according to claim 8, characterized in that: The model training module is used to: For each time scale, based on the feature vector of each node, the operation of aggregating similar semantic information of nodes is adopted to update the hyperedge feature to obtain the aggregated feature information of the hyperedge; the aggregated feature information of the hyperedge is used as the hyperedge feature of the hyperedge; Based on the aggregated feature information of hyperedges, the semantic similarity of nodes and corresponding hyperedges is constrained, and the node constraint loss function and hyperedge loss function are constructed; Using hypergraph convolution and attention mechanism, the node features and hyperedge features are updated with joint constraints as loss to obtain updated node features and updated hyperedge features. Based on the updated node features and the updated hyperedge features, multi-scale spatiotemporal information is interactively fused to obtain the prediction and recommendation results; Calculate the loss function value based on the predicted recommendation results of each batch; The recommendation model is trained using the loss function value to obtain a trained recommendation model.
10. The multi-scale spatiotemporal perception recommendation system based on hypergraph convolution according to claim 8, characterized in that: The prediction and recommendation module is used to: Acquire information to be predicted; the information to be predicted includes user information, geographic information of the check-in point visited by the user, and time information of the time to be predicted; Inputting the information to be predicted into the trained recommendation model to obtain prediction scores of several predicted recommendation points; The preference scores of all the prediction recommendation points are sorted from large to small, and the prediction recommendation points that are ranked first by a set number are determined as the target prediction recommendation results for the time to be predicted.
Citation Information
Patent Citations
Space-time dynamic perception interest point recommendation method and system and storage medium
CN117435819A
Location recommendation method based on semantic enhancement
CN118760800A
Tag-aware recommendation method based on attention mechanism and hypergraph convolution
WO2023098098A1
Cited By
User management method and system based on big data
CN120821910A
Diagnostic scheme generation method and system based on multi-scale hypergraph and constraint optimization
CN121365744A
Interest point recommendation method and system based on multistage denoising
CN122489852A