A personalized information recommendation method and device
By constructing an optimized spatiotemporal knowledge graph based on a learnable metagraph network, the problems of low training efficiency and strong limitations of existing spatiotemporal knowledge graphs are solved. This enables personalized information recommendation even with incomplete and inaccurate acquisition of user spatiotemporal information, thus improving the applicability of the recommendation.
Patent Information
- Application Number
- CN202410078386.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-18
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-01-18
AI Technical Summary
Existing spatiotemporal knowledge graphs require a large amount of sample data during training, resulting in low efficiency. Furthermore, they can only recommend information when the user's spatiotemporal information is accurately obtained, which has strong limitations and makes them difficult to widely promote.
An optimized spatiotemporal knowledge graph is constructed using a learnable metagraph network. By acquiring time period information with hourly as the smallest time granularity and spatial information on regional functional type division, the spatiotemporal co-occurrence of users and products is modeled using graph convolutional networks and learnable metagraph networks, thereby optimizing the spatiotemporal knowledge graph for personalized information recommendation.
It improves the training efficiency and information recommendation applicability of spatiotemporal knowledge graphs, enabling personalized recommendations even without fully and accurately obtaining users' spatiotemporal information, thus enhancing the broad applicability of recommendations.
Smart Images

Figure CN117874369B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph technology, specifically to a personalized information recommendation method and apparatus. Background Technology
[0002] Personalized information can include products or services that users want to buy based on their preferences, and has become an important part of online lifestyle service platforms, allowing users to easily connect to their favorite local products or services at any time.
[0003] Users have needs for corresponding local products or services in different times and spaces. Existing technologies construct spatiotemporal knowledge graphs, which output the local products or services needed by users in different times and spaces for accurate recommendations. However, the spatiotemporal information in the aforementioned spatiotemporal knowledge graphs requires a large number of spatiotemporal entities, such as the smallest time entity in minutes and the smallest spatial entity in spatial geographic coordinates. This leads to a large amount of sample data required for training the spatiotemporal knowledge graph, thus reducing the efficiency of training. In addition, the existing methods can only be applied to recommend information to users when the user's spatiotemporal information can be accurately obtained, such as the current time being a certain hour and minute and the current three-dimensional geographic coordinates. This has strong limitations and is not conducive to widespread promotion and use. Summary of the Invention
[0004] To address the problems in the prior art, embodiments of the present invention provide a personalized information recommendation method and apparatus, which can at least partially solve the problems existing in the prior art.
[0005] On the one hand, this invention proposes a personalized information recommendation method, including:
[0006] Acquire spatiotemporal information, user identification information, and product identification information required by the user;
[0007] The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional type.
[0008] An optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network processes the spatiotemporal information, the user identification information, and the product identification information to obtain target product identification information recommended to the user corresponding to the user identification information.
[0009] The optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network includes:
[0010] Obtain the target adjacency matrix related to spatiotemporal co-occurrence;
[0011] Based on the target adjacency matrix, the learned temporal entity representation and spatial entity representation determine the meta-path;
[0012] The meta-graph is determined based on the meta-path, and the spatiotemporal co-occurrence is modeled into the user entity representation and the product entity representation based on the meta-graph adjacency matrix corresponding to the meta-graph, thereby obtaining the optimized spatiotemporal knowledge graph.
[0013] The personalized information recommendation method further includes:
[0014] The meta-path is numerically compared with a preset threshold;
[0015] Meta paths exceeding the preset threshold are retained to obtain optimized meta paths;
[0016] The optimization meta-graph is determined based on the optimization meta-path, and the spatiotemporal co-occurrence is modeled into the user entity representation and the product entity representation based on the optimization meta-graph adjacency matrix corresponding to the optimization meta-graph, thereby obtaining the optimization spatiotemporal knowledge graph.
[0017] Prior to the step of obtaining the target adjacency matrix related to spatiotemporal co-occurrence, the personalized information recommendation method further includes:
[0018] Based on the time-related subgraph, the fourth adjacency matrix is determined with the head entity being time and the tail entity being user, and the sixth adjacency matrix is determined with the head entity being time and the tail entity being product.
[0019] Based on the spatial correlation subgraph, the eighth adjacency matrix is determined to have the head entity as space and the tail entity as user, and the tenth adjacency matrix is determined to have the head entity as space and the tail entity as product.
[0020] The fourth adjacency matrix, the sixth adjacency matrix, the eighth adjacency matrix, and the tenth adjacency matrix are used as the target adjacency matrix.
[0021] Prior to the step of using the fourth adjacency matrix, the sixth adjacency matrix, the eighth adjacency matrix, and the tenth adjacency matrix as the target adjacency matrix, the personalized information recommendation method further includes:
[0022] Based on the time-related subgraph, determine the third adjacency matrix where the head entity is user and the tail entity is time, and the fifth adjacency matrix where the head entity is product and the tail entity is time.
[0023] Based on the spatial correlation subgraph, the seventh adjacency matrix is determined where the head entity is the user and the tail entity is the space, and the ninth adjacency matrix is determined where the head entity is the product and the tail entity is the space.
[0024] Based on the third, fifth, seventh, and ninth adjacency matrices, the learned temporal and spatial entity representations are used to obtain the propagation operations of the influence of temporal and spatial entities on user and product entities.
[0025] The personalized information recommendation method further includes, prior to the step of obtaining the propagation operation of the influence of time entities and spatial entities on user entities and product entities based on the learned temporal entity representations and spatial entity representations obtained from the third, fifth, seventh, and ninth adjacency matrices, the personalized information recommendation method further includes:
[0026] Based on the user-product interaction subgraph, determine the first adjacency matrix where the head entity is user and the tail entity is product, and the second adjacency matrix where the head entity is product and the tail entity is user.
[0027] The learned user entity representation and product entity representation are determined based on the first adjacency matrix and the second adjacency matrix.
[0028] Prior to the step of determining the learned user entity representation and product entity representation based on the first adjacency matrix and the second adjacency matrix, the personalized information recommendation method further includes:
[0029] Initialize the representations of user entities, product entities, time entities, and spatial entities.
[0030] On one hand, the present invention proposes a personalized information recommendation device, comprising:
[0031] The acquisition unit is used to acquire spatiotemporal information, user identification information, and product identification information required by the user.
[0032] The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional type.
[0033] The recommendation unit is used to process the spatiotemporal information, the user identification information, and the product identification information based on an optimized spatiotemporal knowledge graph constructed from a learnable metagraph network, to obtain target product identification information recommended to the user corresponding to the user identification information.
[0034] In another aspect, embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the following method:
[0035] Acquire spatiotemporal information, user identification information, and product identification information required by the user;
[0036] The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional type.
[0037] An optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network processes the spatiotemporal information, the user identification information, and the product identification information to obtain target product identification information recommended to the user corresponding to the user identification information.
[0038] This invention provides a computer-readable storage medium, comprising:
[0039] The computer-readable storage medium stores a computer program that, when executed by a processor, implements the following method:
[0040] Acquire spatiotemporal information, user identification information, and product identification information required by the user;
[0041] The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional type.
[0042] An optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network processes the spatiotemporal information, the user identification information, and the product identification information to obtain target product identification information recommended to the user corresponding to the user identification information.
[0043] The personalized information recommendation method and apparatus provided in this invention acquire spatiotemporal information, user identification information, and product identification information required by the user. The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional types. An optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network processes the spatiotemporal information, the user identification information, and the product identification information to obtain target product identification information recommended to the user corresponding to the user identification information. This facilitates the use of the spatiotemporal knowledge graph and enhances the applicability of personalized information recommendation. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0045] Figure 1 This is a flowchart illustrating a personalized information recommendation method provided in an embodiment of the present invention.
[0046] Figure 2This is a schematic diagram illustrating the extraction and binary representation of time entities provided in an embodiment of the present invention.
[0047] Figure 3 This is a schematic diagram illustrating the personalized recommendation method combining spatiotemporal knowledge graphs provided in an embodiment of the present invention.
[0048] Figure 4 This is a schematic diagram illustrating the user representation initialization process provided in an embodiment of the present invention.
[0049] Figure 5 This is a schematic diagram illustrating the product characterization initialization process provided in an embodiment of the present invention.
[0050] Figure 6 This is a schematic diagram illustrating the initialization process of temporal and spatial entity representations provided in an embodiment of the present invention.
[0051] Figure 7 This is a schematic diagram of the structure of a personalized information recommendation device provided in an embodiment of the present invention.
[0052] Figure 8 This is a schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments and descriptions of the present invention are used to explain the present invention, but are not intended to limit the present invention. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other.
[0054] Figure 1 This is a flowchart illustrating a personalized information recommendation method provided in an embodiment of the present invention, as shown below. Figure 1 As shown, the personalized information recommendation method provided in this embodiment of the invention includes:
[0055] Step S1: Obtain spatiotemporal information, user identification information, and product identification information required by the user;
[0056] The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional type.
[0057] Step S2: Based on the optimized spatiotemporal knowledge graph constructed by the learnable metagraph network, the spatiotemporal information, the user identification information, and the product identification information are processed to obtain target product identification information recommended to the user corresponding to the user identification information.
[0058] In step S1 above, the device acquires spatiotemporal information, user identification information, and product identification information required by the user.
[0059] The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional type. The device can be a computer device, such as a server, that executes the method. The acquisition, storage, use, and processing of data in this application's technical solution all comply with relevant regulations. User identification information may include a user's ID number or user ID, etc. Product identification information may include a product-identifying number, etc., without specific limitations, and can be further extended to include service identification information.
[0060] like Figure 2 As shown, the time period information can include time periods corresponding to holidays and weekdays respectively. For example, each day can be divided into 6 time periods with a 4-hour interval. The area function type can include shopping malls, tourist attractions, residences, etc.
[0061] In step S2 above, the device processes the spatiotemporal information, user identification information, and product identification information based on an optimized spatiotemporal knowledge graph constructed using a learnable metagraph network, to obtain target product identification information recommended to the user corresponding to the user identification information. The spatiotemporal information, user identification information, and product identification information can be input into the optimized spatiotemporal knowledge graph. The optimized spatiotemporal knowledge graph outputs target product identification information recommended to the user. For example, if user ID 001 needs to eat, the current time is 7 PM, and the location is a shopping mall in a certain business district, the product identification information corresponding to eating could include home-style dishes 01, barbecue 02, and hot pot 03. The optimized spatiotemporal knowledge graph outputs target product identification information recommended according to priority, including hot pot 03, home-style dishes 01, and barbecue 02.
[0062] like Figure 3 As shown, the overall steps of the personalized recommendation method combining spatiotemporal knowledge graphs are briefly explained below:
[0063] The input data is spatiotemporal scene data, and the output is personalized recommendation results. First, based on the spatiotemporal scene data within the platform, entity information and relationships between entities can be extracted, and a spatiotemporal knowledge graph can be constructed based on these entities and their relationships. The model is then trained using training data from the spatiotemporal knowledge graph, and the trained model is used to predict users' product preferences. Based on these predictions, personalized recommendations can be made to users.
[0064] The optimization of spatiotemporal knowledge graphs is explained as follows:
[0065] Spatiotemporal scenarios typically involve when and where a user clicked or purchased a product, encompassing various complex relationships. Graph structure data, as a natural structure capable of representing complex relationships, is the basis for this invention to construct a spatiotemporal knowledge graph G to represent various entities and their heterogeneous relationships within a spatiotemporal scenario.
[0066] The spatiotemporal context includes the time and space at which a user clicks on or purchases a specific item. Therefore, the spatiotemporal knowledge graph G includes four key entities: user entity (U), product entity (I), time entity (T), and space entity (L). User and product entities are typically represented by IDs in the spatiotemporal context. There is no unified standardized representation scheme for time and space entities; this invention defines a standardized process to accurately extract time and space entities from the spatiotemporal context.
[0067] In spatiotemporal scenarios, user behavior often differs depending on whether it's a weekday, holiday, or different times of day. Therefore, when extracting time entities from spatiotemporal scenarios, it's necessary to ensure that the time entity representation can accurately distinguish these different times. For example... Figure 2 As shown, this invention uses an octet of binary code to represent time entities. The first two binary codes distinguish between holidays and workdays, while the last six binary codes represent different time periods within a day. For example, 10:00 AM on May 16, 2023, is a workday, falling between 8:00 and 12:00, and the corresponding time entity is represented as t = [0,0,1,0,0,0].
[0068] User behavior varies across different spaces within a spatiotemporal context. For example, users might prefer purchasing clothing and food in commercial areas, while booking hotels and buying tickets in tourist attractions. However, location information such as longitude and latitude coordinates is often difficult to obtain or insufficient to accurately represent spatial entities. Therefore, this invention uses spatially relevant tags from product attributes to create representations of spatial entities, such as scenic areas, commercial areas, and entertainment venues. These spatial tags are encoded using binary encoding to represent spatial entities L. The number of temporal and spatial entities extracted through the standardized process described above is significantly less than the number of users or products.
[0069] A spatiotemporal knowledge graph G is a graph structure used to represent spatiotemporal scenarios, containing four types of entities (user, product, time, and space) and the relationships between them. An entity-relationship-entity triple is represented as (h, r, t), where h is the head entity, r is the relation, and t is the tail entity. The entity set consists of the four types of entities (user, product, time, and space). The relation set consists of three types of relations, namely the user-product interaction relation r. UI Time-related relationship r T Spatial relationship r L.
[0070] The characterization initialization is explained as follows:
[0071] The initial representation layer is a key technique commonly used in recommendation models. This layer encodes difficult-to-process discrete data into a continuous latent space, making it easier to model discrete data. This invention also constructs an initial representation layer, transforming discrete entities into vectorized representations. Unlike using a uniform initial representation layer, this invention distinguishes between the numerous user and product entities and the fewer time and space entities, and then sets different initial representation layers for each type of entity.
[0072] like Figure 4 As shown, the user entity ID is input into a commonly used initial representation layer, and the corresponding user entity representation is obtained through random initialization. E U ∈R |U|×D In this context, D represents the dimension of representation.
[0073] like Figure 5 As shown, the product entity ID is input into a common initial representation layer, and the corresponding product entity representation is obtained through random initialization. E I ∈R |I|×D In this context, D represents the dimension of representation.
[0074] Directly inputting binary-encoded temporal and spatial entities into a common representation layer ignores the potential relationships between these entities. For example, there is a clear relationship between temporal entities ts = [1,0,0,0,1,0] and ts = [1,0,0,0,1,1]. To account for these relationships, this invention designs separate initial representation layers for temporal and spatial entities, as shown in the figure below. Figure 6 As shown. For the time entity ts, a parameter matrix is constructed through random initialization. As the initial state, the representation of an entity ts at any time can be obtained through the following operation:
[0075]
[0076] Where e t ∈R D D represents the dimension of the temporal entity representation. All temporal entities T are represented as... The standard for any spatial entity l can be obtained through the same operation, and the calculation formula is as follows:
[0077]
[0078] in A parameter matrix is constructed through random initialization. All spatial entities L are represented as follows: The relationships between different time or space entities can be explicitly modeled through the initialization representation layer of time and space entities.
[0079] The spatiotemporal knowledge graph network is explained as follows:
[0080] After constructing a spatiotemporal knowledge graph G, this invention uses G to model user preferences in spatiotemporal scenarios, thereby achieving personalized recommendations. To achieve this goal, this invention utilizes propagation operations in graph convolutional networks to model the sparse high-order connections in the spatiotemporal knowledge graph G. Through propagation operations in graph convolutional networks, relevant collaborative interaction information and the influence of temporal and spatial entities on user behavior within the spatiotemporal knowledge graph G can be effectively modeled.
[0081] The spatiotemporal knowledge graph network in this invention consists of two modules: collaborative perception propagation operation and knowledge perception propagation operation. The collaborative perception propagation operation models user-product interaction behavior and encodes collaborative signals into user and product representations. Simultaneously, the knowledge perception propagation operation explicitly models the spatiotemporal scene into user and product representations, ensuring that temporal and spatial information is considered in these representations. The details of these two modules will be described below.
[0082] Collaborative sensing propagation operation:
[0083] User and product interaction behavior is a subgraph structure in the spatiotemporal knowledge graph G. The user-product interaction subgraph is defined as follows:
[0084] G UI ={(h,r,t)|(h,r,t)∈G and r is r UI
[0085] Among them, the user-product interaction diagram G UI It includes two types of adjacency matrices:
[0086] A UI ={(h,t)|(h,r,t)∈G UI andh∈U and t∈I}
[0087] A IU ={(h,t)|(h,r,t)∈G UI andh∈I and t∈U}
[0088] A UI The matrix represents the products that the same user has interacted with (corresponding to the first adjacency matrix), A IUThis represents users who interact with the same product (corresponding to the second adjacency matrix). These two adjacency matrices reflect the user-product interaction subgraph G. UI Neighbor types in the context.
[0089] Graph neural networks, as an effective method for modeling graph-structured data, can learn node representations and effectively model graph structure information. For modeling interactive graphs G... UI By using collaborative signals to model user and product representations, this invention employs the propagation operation in graph neural networks, where each node generates a node representation by aggregating information from its neighboring nodes. Specifically, the propagation operation at layer k is represented as (corresponding to the determined learned user entity representation and product entity representation):
[0090]
[0091]
[0092] Among them, D UI It is A UI The degree matrix of a matrix, D IU It is A IU The degree matrix of the matrix. σ is the nonlinear activation function. It is the user entity representation learned at layer k, where the user entity representation at layer 0 is It is the product representation learned at the k-th layer, where the product representation at the 0th layer is The above collaborative perception propagation operation can effectively model the interaction graph G. UI The model establishes mid-to-high-order connectivity relationships and models collaborative information in the user product interaction subgraph.
[0093] Knowledge perception and dissemination operations:
[0094] In addition to modeling collaborative signals in the spatiotemporal knowledge graph G, it is also necessary to model the influence of temporal and spatial entities in the spatiotemporal knowledge graph G on user behavior. The time-related and space-related subgraphs in the spatiotemporal knowledge graph G are defined as follows:
[0095] G T ={(h,r,t)|(h,r,t)∈G and r is r T}
[0096] G L ={(h,r,t)|(h,r,t)∈G and r is r L}
[0097] Among them, the time-related subgraph G T It includes four types of adjacency matrices as follows (corresponding to the third to sixth adjacency matrices respectively):
[0098] A UT ={(h,t)|(h,r,t)∈G T andh∈U and t∈T}
[0099] A TU ={(h,t)|(h,r,t)∈G T andh∈T and t∈U}
[0100] A IT ={(h,t)|(h,r,t)∈G T andh∈I and t∈T}
[0101] A TI ={(h,t)|(h,r,t)∈G T andh∈T and t∈I}
[0102] Spatial related subgraph G L It also includes four types of adjacency matrices as follows (corresponding to the seventh to tenth adjacency matrices respectively):
[0103] A UL ={(h,t)|(h,r,t)∈G L andh∈U and t∈L}
[0104] A LU ={(h,t)|(h,r,t)∈G L andh∈L and t∈U}
[0105] A IL ={(h,t)|(h,r,t)∈G L andh∈I and t∈L}
[0106] A LI ={(h,t)|(h,r,t)∈G L andh∈L and t∈I}
[0107] Despite the time-related subgraph G T And spatially related subgraph G L There are eight adjacency matrices, but only four of them relate to the impact of modeling temporal and spatial entities on user behavior. The four relevant adjacency matrices are A. UT A IT A UL A IL Corresponding to (the third adjacency matrix, the fifth adjacency matrix, the seventh adjacency matrix, and the ninth adjacency matrix).
[0108] Similar to the collaborative perception propagation operation, the knowledge perception propagation operation also employs propagation methods from graph convolutional networks to model temporal and spatial information, thereby modeling the impact of temporal and spatial entities on user and product representations. Specifically, the knowledge perception propagation operation at layer l is represented as (corresponding to the propagation operation that obtains the impact of temporal and spatial entities on user and product entities):
[0109]
[0110]
[0111]
[0112] Where D * It is A * The degree matrix of the adjacency matrix. β L It is a hyperparameter that balances the influence of temporal and spatial information. The temporal entity representation T is obtained from the k-th layer, and the temporal entity T is represented as follows from the 0th layer: Similarly, The spatial entity representation L is obtained from the k-th layer, and the spatial entity L represented in the 0th layer is... Function f propagates the representation of a temporal or spatial entity to the next layer; for example, function f is a linear layer.
[0113] The learnable metagraph network is described below:
[0114] In spatiotemporal scenarios, spatiotemporal co-occurrence is a crucial factor in analyzing spatiotemporal data, explicitly modeling the overlap of user behaviors in time and space. Since the spatiotemporal knowledge graph G contains a limited number of time and space entities—far fewer than the number of user and product entities—almost all time and space entities will exhibit spatiotemporal co-occurrence without distinction.
[0115] To address the aforementioned challenges, this invention proposes a learnable metagraph network for modeling the co-occurrence of temporal and spatial entities. The meta-paths identified by the learnable metagraph network help distinguish important spatiotemporal co-occurrences within the temporal and spatial entity co-occurrence. The spatiotemporal knowledge graph G contains multiple adjacency matrices, of which four adjacency matrices A... TU A TI A LU A LI Related to co-occurrence (corresponding to the fourth, sixth, eighth, and tenth adjacency matrices). Four adjacency matrices A TU A TI A LU A LIIt includes multiple meta-paths, and two meta-paths that can reflect co-occurrence are designed. The two meta-paths P UTI ,P ULI The formal representation is as follows (corresponding to the determination of the meta-path):
[0116]
[0117]
[0118] in and The k-th layer learns the temporal entity representation T and the spatial entity representation L, and calculates two meta-paths based on the learned representations. Therefore, two metapaths It is learnable and dynamically changing. Due to the finite number of temporal and spatial entities, there are two meta-paths. Inevitably, meta-paths that cannot reflect co-occurrence will be introduced. This invention uses a filtering method to retain meta-paths with stronger co-occurrence, specifically as follows (corresponding to the optimized meta-paths):
[0119]
[0120]
[0121] In the above formula, the Top(X,θ) function retains only the meta-paths in X that are greater than a preset threshold θ. Therefore, the retained meta-paths... The meta-path with the strongest co-occurrence of users and products in time or space was modeled.
[0122] Two metapaths Only co-occurrence on temporal or spatial entities is considered. To combine two meta-paths to obtain temporal and spatial co-occurrence, this invention proposes a meta-graph that combines two meta-paths, as shown below (corresponding to a determined meta-graph or an optimized meta-graph):
[0123]
[0124] Among them, metagraph or optimized metagraph Can we model co-occurrence in both time and space simultaneously to gain a comprehensive understanding of user behavior overlap in spatiotemporal scenarios? Based on metagraphs or optimized metagraphs. This invention uses a hierarchical forward propagation method to obtain user and product representations in the l-th layer, as shown below:
[0125]
[0126]
[0127] In the above formula It can be viewed as a metagraph adjacency matrix or an optimized metagraph adjacency matrix. Based on metagraph or optimized metagraph The hierarchical forward propagation method models spatiotemporal co-occurrence into user entity representations. In product entity representation based on metagraphs.
[0128] By jointly training the optimized spatiotemporal knowledge graph, an optimized spatiotemporal knowledge graph that can be used for personalized information recommendation is obtained, including:
[0129] Spatiotemporal knowledge graph networks and learnable metagraph networks model different information in the spatiotemporal knowledge graph G, respectively. Therefore, this invention combines the spatiotemporal knowledge graph network and the learnable metagraph network to obtain the final representation of entities in the graph G. The formal definition of the k-th layer is as follows:
[0130]
[0131]
[0132]
[0133] The parameters β1 and β2 are used to control the degree of influence of spatiotemporal scene information on user preference modeling.
[0134] The proposed model comprises K layers, where the output of each layer models the different information between entities in the spatiotemporal knowledge graph. To fuse the information from the multi-layer network, this invention uses a layer aggregation operation to merge the representations of all layers into a single representation, as detailed below:
[0135]
[0136]
[0137]
[0138]
[0139] The function g is used to fuse shallow and deep representations, such as the average pooling operation.
[0140] In obtaining the final user representation and product characterization Subsequently, this invention uses inner product operations to predict user preference for a product. Given the representation of any user u... and the characterization of any product i User u's preference for product i is calculated as follows:
[0141]
[0142] To optimize model parameters, this invention employs the widely used Bayesian Personalized Ranking (BPR) loss function. This loss function minimizes the following inequality:
[0143]
[0144] In the loss function above, product i is the product for which user u has an interaction record, and product j is the product for which user u has no interaction record. To prevent overfitting, an L2 regularization term is used. Θ represents the model parameters.
[0145] By optimizing the loss function L mentioned above to train the model parameters, after the model training converges, the testing phase is similar to other personalized recommendation tasks. Specifically, the user and product IDs are input into the converged model to obtain user representations. and product characterization The predicted score was then calculated. Based on the predicted scores, a candidate product set is retrieved, and finally, products with higher predicted scores from the candidate product set are recommended to the user.
[0146] The personalized information recommendation method provided in this invention obtains spatiotemporal information, user identification information, and product identification information required by the user. The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional types. An optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network processes the spatiotemporal information, user identification information, and product identification information to obtain target product identification information recommended to the user corresponding to the user identification information. This facilitates the use of the spatiotemporal knowledge graph and enhances the applicability of personalized information recommendation.
[0147] The optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network includes:
[0148] Obtain the target adjacency matrix related to spatiotemporal co-occurrence; refer to the above explanation, which will not be repeated here.
[0149] Based on the target adjacency matrix, the learned temporal entity representation and spatial entity representation determine the meta-path; this can be referred to the above description and will not be repeated here.
[0150] The meta-graph is determined based on the meta-path, and the spatiotemporal co-occurrence is modeled into the user entity representation and the product entity representation based on the meta-graph adjacency matrix corresponding to the meta-graph, thus obtaining the optimized spatiotemporal knowledge graph. This can be referred to the above description and will not be repeated here.
[0151] The personalized information recommendation method also includes:
[0152] The metapath is compared numerically with a preset threshold; this can be referred to the above description and will not be repeated here.
[0153] Metapaths exceeding the preset threshold are retained to obtain optimized metapaths; this can be referred to the above description and will not be repeated here.
[0154] An optimized meta-graph is determined based on the optimized meta-path, and spatiotemporal co-occurrence is modeled into user entity representations and product entity representations based on the optimized meta-graph adjacency matrix corresponding to the optimized meta-graph, thus obtaining the optimized spatiotemporal knowledge graph. This can be referred to the above description and will not be repeated here.
[0155] Prior to the step of obtaining the target adjacency matrix related to spatiotemporal co-occurrence, the personalized information recommendation method further includes:
[0156] Based on the time-related subgraph, the fourth adjacency matrix is determined with the head entity being time and the tail entity being users, and the sixth adjacency matrix is determined with the head entity being time and the tail entity being products; please refer to the above explanation, which will not be repeated here.
[0157] Based on the spatial correlation subgraph, determine the eighth adjacency matrix where the head entity is space and the tail entity is user, and the tenth adjacency matrix where the head entity is space and the tail entity is product; refer to the above explanation, and will not be repeated here.
[0158] The fourth, sixth, eighth, and tenth adjacency matrices are used as the target adjacency matrix. This can be referred to the above description and will not be repeated here.
[0159] Before the step of using the fourth adjacency matrix, the sixth adjacency matrix, the eighth adjacency matrix, and the tenth adjacency matrix as the target adjacency matrix, the personalized information recommendation method further includes:
[0160] The third adjacency matrix is determined based on the time-related subgraph, where the head entity is the user and the tail entity is time, and the fifth adjacency matrix is determined based on the product and the tail entity is time. Please refer to the above explanation, which will not be repeated here.
[0161] Based on the spatially related subgraph, determine the seventh adjacency matrix where the head entity is the user and the tail entity is the space, and the ninth adjacency matrix where the head entity is the product and the tail entity is the space; refer to the above explanation, which will not be repeated here.
[0162] Based on the third, fifth, seventh, and ninth adjacency matrices, the learned temporal and spatial entity representations are used to obtain the propagation operations of the influence of temporal and spatial entities on user and product entities. This can be referred to the above explanation and will not be repeated here.
[0163] Before the step of obtaining the propagation operation of the influence of time entities and spatial entities on user entities and product entities based on the learned temporal entity representations and spatial entity representations according to the third adjacency matrix, the fifth adjacency matrix, the seventh adjacency matrix, and the ninth adjacency matrix, the personalized information recommendation method further includes:
[0164] The first adjacency matrix, where the head entity is the user and the tail entity is the product, and the second adjacency matrix, where the head entity is the product and the tail entity is the user, are determined based on the user-product interaction subgraph; the above explanation is provided and will not be repeated here.
[0165] The learned user entity representation and product entity representation are determined based on the first adjacency matrix and the second adjacency matrix. This can be referred to the above explanation and will not be repeated here.
[0166] Before the step of determining the learned user entity representation and product entity representation based on the first adjacency matrix and the second adjacency matrix, the personalized information recommendation method further includes:
[0167] Initialize the representations of user entities, product entities, time entities, and spatial entities. Refer to the above explanation; further details are omitted here.
[0168] Figure 7 This is a schematic diagram of the structure of a personalized information recommendation device provided in an embodiment of the present invention, as shown below. Figure 7 As shown, the personalized information recommendation device provided in this embodiment of the invention includes an acquisition unit 701 and a recommendation unit 702, wherein:
[0169] The acquisition unit 701 is used to acquire spatiotemporal information, user identification information, and product identification information required by the user; wherein, the spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional type; the recommendation unit 702 is used to process the spatiotemporal information, the user identification information, and the product identification information based on an optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network, to obtain target product identification information recommended to the user corresponding to the user identification information.
[0170] Specifically, the acquisition unit 701 in the device is used to acquire spatiotemporal information, user identification information, and product identification information required by the user; wherein, the spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional type; the recommendation unit 702 is used to process the spatiotemporal information, the user identification information, and the product identification information based on an optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network, to obtain target product identification information recommended to the user corresponding to the user identification information.
[0171] The personalized information recommendation device provided in this invention acquires spatiotemporal information, user identification information, and product identification information required by the user. The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional types. An optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network processes the spatiotemporal information, user identification information, and product identification information to obtain target product identification information recommended to the user corresponding to the user identification information. This facilitates the use of the spatiotemporal knowledge graph and enhances the applicability of personalized information recommendation.
[0172] The embodiments of the personalized information recommendation device provided in this invention can be used to execute the processing flow of the above-described method embodiments. Its functions will not be repeated here, but can be referred to the detailed description of the above-described method embodiments.
[0173] Figure 8 This is a schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention, such as... Figure 8 As shown, the computer device includes: a memory 801, a processor 802, and a computer program stored in the memory 801 and executable on the processor 802. When the processor 802 executes the computer program, it implements the following method:
[0174] Acquire spatiotemporal information, user identification information, and product identification information required by the user;
[0175] The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional type.
[0176] An optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network processes the spatiotemporal information, the user identification information, and the product identification information to obtain target product identification information recommended to the user corresponding to the user identification information.
[0177] This embodiment discloses a computer program product, which includes a computer program that, when executed by a processor, implements the following method:
[0178] Acquire spatiotemporal information, user identification information, and product identification information required by the user;
[0179] The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional type.
[0180] An optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network processes the spatiotemporal information, the user identification information, and the product identification information to obtain target product identification information recommended to the user corresponding to the user identification information.
[0181] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the following method:
[0182] Acquire spatiotemporal information, user identification information, and product identification information required by the user;
[0183] The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional type.
[0184] An optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network processes the spatiotemporal information, the user identification information, and the product identification information to obtain target product identification information recommended to the user corresponding to the user identification information.
[0185] Compared with existing technical solutions, the personalized information recommendation method provided in this invention obtains spatiotemporal information, user identification information, and product identification information required by the user. The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional types. An optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network processes the spatiotemporal information, user identification information, and product identification information to obtain target product identification information recommended to users corresponding to the user identification information. This facilitates the use of the spatiotemporal knowledge graph and enhances the applicability of personalized information recommendation.
[0186] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0187] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.
[0188] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0189] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0190] In the description of this specification, the references to terms such as "an embodiment," "a specific embodiment," "some embodiments," "for example," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0191] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A personalized information recommendation method, characterized in that, include: Acquire spatiotemporal information, user identification information, and product identification information required by the user; The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional type. An optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network processes the spatiotemporal information, the user identification information, and the product identification information to obtain target product identification information recommended to the user corresponding to the user identification information. The optimized spatiotemporal knowledge graph constructed based on a learnable metagraph network includes: Obtain the target adjacency matrix related to spatiotemporal co-occurrence; Based on the target adjacency matrix, the learned temporal entity representation and spatial entity representation are used to determine the meta-path; The meta-graph is determined based on the meta-path, and the spatiotemporal co-occurrence is modeled into the user entity representation and the product entity representation based on the meta-graph adjacency matrix corresponding to the meta-graph, thereby obtaining the optimized spatiotemporal knowledge graph.
2. The personalized information recommendation method according to claim 1, characterized in that, The personalized information recommendation method also includes: The meta-path is numerically compared with a preset threshold; Meta paths exceeding the preset threshold are retained to obtain optimized meta paths; The optimization meta-graph is determined based on the optimization meta-path, and the spatiotemporal co-occurrence is modeled into the user entity representation and the product entity representation based on the optimization meta-graph adjacency matrix corresponding to the optimization meta-graph, thereby obtaining the optimization spatiotemporal knowledge graph.
3. The personalized information recommendation method according to claim 1 or 2, characterized in that, Prior to the step of obtaining the target adjacency matrix related to spatiotemporal co-occurrence, the personalized information recommendation method further includes: Based on the time-related subgraph, the fourth adjacency matrix is determined with the head entity being time and the tail entity being user, and the sixth adjacency matrix is determined with the head entity being time and the tail entity being product. Based on the spatial correlation subgraph, the eighth adjacency matrix is determined to have the head entity as space and the tail entity as user, and the tenth adjacency matrix is determined to have the head entity as space and the tail entity as product. The fourth adjacency matrix, the sixth adjacency matrix, the eighth adjacency matrix, and the tenth adjacency matrix are used as the target adjacency matrix.
4. The personalized information recommendation method according to claim 3, characterized in that, Before the step of using the fourth adjacency matrix, the sixth adjacency matrix, the eighth adjacency matrix, and the tenth adjacency matrix as the target adjacency matrix, the personalized information recommendation method further includes: Based on the time-related subgraph, determine the third adjacency matrix where the head entity is user and the tail entity is time, and the fifth adjacency matrix where the head entity is product and the tail entity is time. Based on the spatial correlation subgraph, the seventh adjacency matrix is determined where the head entity is the user and the tail entity is the space, and the ninth adjacency matrix is determined where the head entity is the product and the tail entity is the space. Based on the third, fifth, seventh, and ninth adjacency matrices, the learned temporal and spatial entity representations are used to obtain the propagation operations of the influence of temporal and spatial entities on user and product entities.
5. The personalized information recommendation method according to claim 4, characterized in that, Before the step of obtaining the propagation operation of the influence of time entities and spatial entities on user entities and product entities based on the learned temporal entity representations and spatial entity representations according to the third adjacency matrix, the fifth adjacency matrix, the seventh adjacency matrix, and the ninth adjacency matrix, the personalized information recommendation method further includes: Based on the user-product interaction subgraph, determine the first adjacency matrix where the head entity is user and the tail entity is product, and the second adjacency matrix where the head entity is product and the tail entity is user. The learned user entity representation and product entity representation are determined based on the first adjacency matrix and the second adjacency matrix.
6. The personalized information recommendation method according to claim 5, characterized in that, Before the step of determining the learned user entity representation and product entity representation based on the first adjacency matrix and the second adjacency matrix, the personalized information recommendation method further includes: Initialize the representations of user entities, product entities, time entities, and spatial entities.
7. A personalized information recommendation device, characterized in that, include: The acquisition unit is used to acquire spatiotemporal information, user identification information, and product identification information required by the user. The spatiotemporal information includes time period information with hours as the smallest time granularity, and spatial information divided by regional functional type. The recommendation unit is used to process the spatiotemporal information, the user identification information and the product identification information based on an optimized spatiotemporal knowledge graph constructed from a learnable metagraph network, to obtain target product identification information recommended to the user corresponding to the user identification information. The recommendation unit is based on an optimized spatiotemporal knowledge graph constructed from a learnable metagraph network, specifically used for: Obtain the target adjacency matrix related to spatiotemporal co-occurrence; Based on the target adjacency matrix, the learned temporal entity representation and spatial entity representation are used to determine the meta-path; The meta-graph is determined based on the meta-path, and the spatiotemporal co-occurrence is modeled into the user entity representation and the product entity representation based on the meta-graph adjacency matrix corresponding to the meta-graph, thereby obtaining the optimized spatiotemporal knowledge graph.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Knowledge graph and time sequence feature fused interpretable interest point recommendation method
CN113656709A
Method and device for vehicle recommendation based on user information
CN114708051A
