Content Item Recommendation Method, Apparatus and Server

By constructing the first directed graph and the second directed graph, combining local and global feature vectors, the problem of inaccurate recommendations of user preference changes in different time and space scenarios is solved, and more accurate content item recommendations are achieved.

CN115309984BActive Publication Date: 2025-07-25厦门三快在线科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210871040.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-22
Publication Date
2025-07-25
Estimated Expiration
2042-07-22

AI Technical Summary

Technical Problem

The prior art fails to effectively capture changes in user preferences in recommendation systems, especially differences in different time and space scenarios, resulting in inaccurate recommendation results.

Method used

The first directed graph and the second directed graph are constructed, which are used to characterize the node relationship in the current behavior sequence and the historical behavior sequence respectively. Through the fusion of local and global feature vectors, users' preferences in the current scenario are determined, and content items are recommended based on space-time factors.

Benefits of technology

It improves the accuracy of content item recommendations, can better meet users' preferences and needs in the current time and space scenarios, and improves the recommendation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115309984B_ABST
    Figure CN115309984B_ABST
Patent Text Reader

Abstract

The present disclosure provides a content item recommendation method, apparatus, and server, belonging to the field of Internet technologies. The method includes: determining local feature vectors of a plurality of target nodes based on the feature vectors of the plurality of target nodes in a first directed graph, where the plurality of target nodes include a plurality of decision factor nodes corresponding to a current behavior sequence, sequence nodes, and a plurality of content nodes corresponding to a plurality of clicked content items; determining global feature vectors of the plurality of target nodes based on the feature vectors of the plurality of nodes in a second directed graph and the types of directed connection edges between the plurality of nodes; determining a sequence feature vector corresponding to the current behavior sequence based on the local feature vectors and the global feature vectors of the plurality of target nodes; and performing content item recommendation based on the sequence feature vector. The present disclosure can simultaneously capture the influence of external decision factors and behavior sequences on user preferences, thereby being able to learn more accurate preference knowledge and improving the accuracy of recommendation results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet technologies, and particularly to a method, an apparatus, and a server for content item recommendation. Background Art

[0002] With the development of Internet technologies, content-focused applications have developed rapidly. To attract more users, a recommendation system needs to discover user preferences. Considering that in real life, there is a strong correlation between a user's click behaviors on different content items. To accurately capture the user's dynamic preferences during the development process and thus predict the user's next click behavior, related technologies mainly rely on sequence models such as recurrent neural networks and Transformers to discover user preferences from multiple clicked content items included in the user's historical behavior sequence, and then recommend the content items preferred by the user to the user.

[0003] However, related technologies only focus on the correlation between each clicked content item and ignore other factors that affect user preferences, resulting in inaccurate recommendation results. For example, in the scenario of local life services (such as the most typical takeaway scenario), the same user may have different consumption behaviors at the company and at home. Even at the same location (such as the company), the user may order completely different takeaway items at lunchtime and afternoon tea time. Summary of the Invention

[0004] Embodiments of the present disclosure provide a method, an apparatus, and a server for content item recommendation, which can improve the accuracy of recommendation results. The technical solutions are as follows:

[0005] In a first aspect, a method for content item recommendation is provided. The method includes:

[0006] Obtain a first directed graph and a second directed graph. The first directed graph is constructed according to a current behavior sequence, and the first directed graph is used to represent the directed connection relationship between multiple target nodes. The multiple target nodes include multiple decision factor nodes, sequence nodes corresponding to the current behavior sequence, and multiple content nodes corresponding to multiple clicked content items. The second directed graph is constructed according to multiple historical behavior sequences, and the second directed graph is used to represent the directed connection relationship between multiple nodes. The multiple nodes include the multiple target nodes and nodes having a directed connection relationship with any target node;

[0007] Based on the feature vectors of the multiple target nodes in the first directed graph, determine the local feature vectors of the multiple target nodes. The local feature vectors incorporate the feature vectors of other target nodes having a directed connection relationship with the target nodes in the first directed graph;

[0008] Determine the global feature vectors of the multiple target nodes based on the feature vectors of the multiple nodes in the second directed graph and the types of the directed connection edges between the multiple nodes. The global feature vectors incorporate the feature vectors of other nodes in the second directed graph that have a directed connection relationship with the target nodes.

[0009] Determine the sequence feature vector corresponding to the current behavior sequence based on the local feature vectors and the global feature vectors of the multiple target nodes. The sequence feature vector is used to characterize the features of the content items preferred in the current scenario.

[0010] Perform content item recommendation based on the sequence feature vector.

[0011] In another embodiment of the present disclosure, the determining the local feature vectors of the multiple target nodes based on the feature vectors of the multiple target nodes in the first directed graph includes:

[0012] Determine the local feature vectors of the multiple content nodes based on the feature vectors of the multiple content nodes and the transition relationships between the respective content items in the current behavior sequence.

[0013] Determine the local feature vectors of the multiple decision factor nodes based on the feature vectors of the multiple decision factor nodes and the local feature vectors of the multiple content nodes.

[0014] Determine the local feature vectors of the sequence nodes based on the feature vectors of the sequence nodes and the local feature vectors of the multiple decision factor nodes.

[0015] In another embodiment of the present disclosure, the determining the local feature vectors of the multiple content nodes based on the feature vectors of the multiple content nodes and the transition relationships between the respective content items in the current behavior sequence includes:

[0016] Calculate the average value of the feature vectors of the multiple content nodes to obtain the mean feature vector.

[0017] For any content node, calculate the weight value of the directed connection edge between each starting content node and the content node according to the feature vector of the content node, the mean feature vector, and the feature vectors of each starting content node. The starting content node is the content node with the content item transfer end point being the content node.

[0018] Perform normalization processing on the weight values corresponding to each starting content node to obtain the normalized weight values corresponding to each starting content node.

[0019] Based on the normalized weight values corresponding to each starting content node, the feature vectors of each starting content node are weighted and summed to obtain the local feature vector of the content node.

[0020] In another embodiment of the present disclosure, determining the local feature vectors of the multiple decision factor nodes based on the feature vectors of the multiple decision factor nodes and the local feature vectors of the multiple content nodes includes:

[0021] For any decision factor node, according to the feature vector of the decision factor node and the local feature vector of each content node, calculate the normalized weight value of the directed connection edge between the decision factor node and each content node;

[0022] Based on the normalized weight values corresponding to each content node, the feature vectors of the multiple content nodes are weighted and summed to obtain a weighted content feature vector;

[0023] Add the feature vector of the decision factor node and the weighted content feature vector to obtain the local feature vector of the decision factor node.

[0024] In another embodiment of the present disclosure, determining the local feature vector of the sequence node based on the feature vector of the sequence node and the local feature vectors of the multiple decision factor nodes includes:

[0025] According to the feature vector of the sequence node and the local feature vector of each decision factor node, calculate the normalized weight value of the directed connection edge between the sequence node and each decision factor node;

[0026] Based on the normalized weight values corresponding to each decision factor node, the feature vectors of the multiple decision factor nodes are weighted and summed to obtain a weighted decision feature vector;

[0027] Add the feature vector of the decision factor node and the weighted decision feature vector to obtain the local feature vector of the sequence node.

[0028] In another embodiment of the present disclosure, determining the global feature vectors of the multiple target nodes based on the feature vectors of the multiple nodes in the second directed graph and the types of the directed connection edges between the multiple nodes includes:

[0029] For any target node, according to the feature vector of the previous layer of the target node, the feature vectors of the current layer of each starting node having a directed connection relationship with the target node, and the types of the directed connection edges between the target node and each starting node, determine the relationship inner feature vector of the current layer of the target node under each type of connection edge, where the starting node is a node with the target node as the transfer end point;

[0030] Aggregate the feature vectors of the target node in the relationships of the current layer under each type of connection edge to obtain the global feature vector of the target node in the current layer;

[0031] Calculate the average value of the global feature vectors of all layers of the target node to obtain the global feature vector of the target node.

[0032] In another embodiment of the present disclosure, the determining the feature vectors of the target node in the relationships of the current layer under each type of connection edge according to the feature vectors of the previous layer of the target node, the feature vectors of the current layer of each starting node having a directed connection relationship with the target node, and the types of the directed connection edges between the target node and each starting node includes:

[0033] For any type of directed connection edge, determine the normalized weight values corresponding to each starting node whose type of the directed connection edge with the target node is this type according to the feature vector of the previous layer of the target node and the feature vectors of the current layer of each starting node whose type of the directed connection edge with the target node is this type;

[0034] Based on the normalized weight values corresponding to each starting node whose type of the directed connection edge is this type, perform weighted summation on the feature vectors of the current layer of each starting node whose type of the directed connection edge is this type to obtain the feature vectors of the target node in the relationships of the current layer under this type of connection edge.

[0035] In another embodiment of the present disclosure, the aggregating the feature vectors of the target node in the relationships of the current layer under each type of connection edge to obtain the global feature vector of the target node in the current layer includes:

[0036] According to the feature vectors of the target node in the relationships of the current layer under each type of connection edge, calculate the normalized weight values of the target node in the current layer under each type of connection edge;

[0037] Based on the normalized weight values of the target node in the current layer under each type of connection edge, perform weighted summation on the feature vectors of the target node in the relationships of the current layer under each type of connection edge to obtain the global feature vector of the target node in the current layer.

[0038] In another embodiment of the present disclosure, before determining the global feature vectors of the multiple target nodes based on the feature vectors of the multiple nodes in the second directed graph and the types of the directed connection edges between the multiple nodes, it further includes:

[0039] Perform a linear transformation on the feature vectors of each layer of the multiple nodes to obtain the transformed feature vectors of each layer of the multiple nodes;

[0040] Based on the feature vectors after transformation of each layer of the multiple nodes and the types of the directed connection edges between the multiple nodes, perform an operation of determining the global feature vectors of the multiple target nodes.

[0041] In another embodiment of the present disclosure, the determining the sequence feature vector corresponding to the current behavior sequence based on the local feature vectors and the global feature vectors of the multiple target nodes includes:

[0042] Perform weighted addition on the eigenvalues of the same dimension in the local feature vectors and the global feature vectors of each target node to obtain the fused feature vector of the target node;

[0043] Based on the fused feature vector of the target node, determine the sequence feature vector corresponding to the current behavior sequence.

[0044] In another embodiment of the present disclosure, the performing content item recommendation based on the sequence feature vector includes:

[0045] Calculate the similarity between the feature vectors of multiple candidate content items and the sequence feature vector;

[0046] Recommend the multiple candidate content items in descending order of similarity.

[0047] In a second aspect, there is provided a content item recommendation device, where the device includes:

[0048] An acquisition module, configured to acquire a first directed graph and a second directed graph, where the first directed graph is constructed according to the current behavior sequence, and the first directed graph is used to represent the directed connection relationship between multiple target nodes, and the multiple target nodes include multiple decision factor nodes, sequence nodes corresponding to the current behavior sequence, and multiple content nodes corresponding to multiple content items that have been clicked, and the second directed graph is constructed according to multiple historical behavior sequences, and the second directed graph is used to represent the directed connection relationship between multiple nodes, and the multiple nodes include the multiple target nodes and nodes having a directed connection relationship with any target node;

[0049] A first determination module, configured to determine the local feature vectors of the multiple target nodes based on the feature vectors of the multiple target nodes in the first directed graph, where the local feature vectors fuse the feature vectors of other target nodes having a directed connection relationship with the target node in the first directed graph;

[0050] A second determination module, configured to determine a global feature vector of the multiple target nodes based on the feature vectors of the multiple nodes in the second directed graph and the types of the directed connection edges between the multiple nodes, where the global feature vector incorporates the feature vectors of other nodes in the second directed graph that have a directed connection relationship with the target nodes;

[0051] A third determination module, configured to determine a sequence feature vector corresponding to the current behavior sequence based on the local feature vectors and the global feature vector of the multiple target nodes, where the sequence feature vector is used to characterize the features of the content items preferred in the current scenario;

[0052] A recommendation module, configured to perform content item recommendation based on the sequence feature vector.

[0053] In another embodiment of the present disclosure, the first determination module is configured to determine the local feature vectors of the multiple content nodes based on the feature vectors of the multiple content nodes and the transfer relationships between the respective content items in the current behavior sequence; determine the local feature vectors of the multiple decision factor nodes based on the feature vectors of the multiple decision factor nodes and the local feature vectors of the multiple content nodes; and determine the local feature vector of the sequence node based on the feature vector of the sequence node and the local feature vectors of the multiple decision factor nodes.

[0054] In another embodiment of the present disclosure, the first determination module is configured to calculate the average value of the feature vectors of the multiple content nodes to obtain a mean feature vector; for any content node, calculate the weight value of the directed connection edge between each starting content node and the content node according to the feature vector of the content node, the mean feature vector, and the feature vectors of each starting content node, where the starting content node is a content node that takes the content node as the end point of content item transfer; perform normalization processing on the weight values corresponding to each starting content node to obtain the normalized weight values corresponding to each starting content node;

[0055] Based on the normalized weight values corresponding to each starting content node, perform weighted summation on the feature vectors of each starting content node to obtain the local feature vector of the content node.

[0056] In another embodiment of the present disclosure, the first determination module is configured to, for any decision factor node, calculate the normalized weight value of the directed connection edge between the decision factor node and each content node according to the feature vector of the decision factor node and the local feature vectors of each content node; based on the normalized weight values corresponding to each content node, perform weighted summation on the feature vectors of the multiple content nodes to obtain a weighted content feature vector; add the feature vector of the decision factor node and the weighted content feature vector to obtain the local feature vector of the decision factor node.

[0057] In another embodiment of the present disclosure, the first determination module is configured to calculate the normalized weight value of the directed connection edge between the sequence node and each decision factor node according to the feature vector of the sequence node and the local feature vectors of each decision factor node; based on the normalized weight values corresponding to each decision factor node, perform weighted summation on the feature vectors of the multiple decision factor nodes to obtain a weighted decision feature vector; add the feature vector of the decision factor node and the weighted decision feature vector to obtain the local feature vector of the sequence node.

[0058] In another embodiment of the present disclosure, the second determination module is configured to, for any target node, determine the relationship inner feature vector of the target node at the current layer under each type of connection edge according to the feature vector of the previous layer of the target node, the feature vectors of the current layers of each starting node having a directed connection relationship with the target node, and the type of the directed connection edge between the target node and each starting node, where the starting node is a node with the target node as the transfer end point; aggregate the relationship inner feature vectors of the target node at the current layer under each type of connection edge to obtain the global feature vector of the target node at the current layer; calculate the average value of the global feature vectors of all layers of the target node to obtain the global feature vector of the target node.

[0059] In another embodiment of the present disclosure, the second determination module is configured to, for any type of directed connection edge, determine the normalized weight value corresponding to each starting node whose type of the directed connection edge with the target node is this type according to the feature vector of the previous layer of the target node and the feature vectors of the current layers of each starting node whose type of the directed connection edge with the target node is this type; based on the normalized weight values corresponding to each starting node whose type of the directed connection edge with the target node is this type, perform weighted summation on the feature vectors of the current layers of each starting node whose type of the directed connection edge with the target node is this type to obtain the relationship inner feature vector of the target node at the current layer under the type of connection edge.

[0060] In another embodiment of the present disclosure, the second determination module is configured to calculate the normalized weight value of the target node at the current layer under each type of connection edge according to the eigenvector within the relationship at the current layer of the target node under each type of connection edge; based on the normalized weight value of the target node at the current layer under each type of connection edge, perform weighted summation on the eigenvector within the relationship at the current layer of the target node under each type of connection edge to obtain the global eigenvector of the target node at the current layer.

[0061] In another embodiment of the present disclosure, the apparatus further includes:

[0062] A transformation module, configured to perform a linear transformation on the eigenvectors of each layer of the multiple nodes to obtain the transformed eigenvectors of each layer of the multiple nodes;

[0063] The second determination module is further configured to perform an operation of determining the global eigenvectors of the multiple target nodes based on the transformed eigenvectors of each layer of the multiple nodes and the types of directed connection edges between the multiple nodes.

[0064] In another embodiment of the present disclosure, the third determination module is configured to perform weighted summation on the eigenvalues of the same dimension in the local eigenvector and the global eigenvector of each target node to obtain the fused eigenvector of the target node; based on the fused eigenvector of the target node, determine the sequence eigenvector corresponding to the current behavior sequence.

[0065] In another embodiment of the present disclosure, the recommendation module is configured to calculate the similarity between the eigenvectors of multiple candidate content items and the sequence eigenvector; recommend the multiple candidate content items in descending order of similarity.

[0066] In a third aspect, a server is provided, the server includes a processor and a memory, and at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the content item recommendation method as described in the first aspect.

[0067] In a fourth aspect, a computer-readable storage medium is provided, and at least one program code is stored in the storage medium, and the at least one program code is loaded and executed by a processor to implement the content item recommendation method as described in the first aspect.

[0068] In a fifth aspect, a computer program product is provided. The computer program product includes computer program code stored in a computer-readable storage medium. A processor of a server reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code so that the server executes the content item recommendation method described in the first aspect.

[0069] The beneficial effects brought by the technical solution provided by the embodiments of the present disclosure are as follows:

[0070] Based on the first directed graph and the second directed graph, local feature vectors and global feature vectors of multiple target nodes are respectively determined. Since the local feature vectors incorporate the feature vectors of other target nodes that have a directed connection relationship with the target node in the first directed graph, they can capture the user's preferences in the current spatio-temporal scenario from a local perspective. The global feature vectors incorporate the feature vectors of other nodes that have a directed connection relationship with the target node in the second directed graph, and can capture the user's preferences in different spatio-temporal scenarios from a global perspective. Therefore, the sequence feature vector of the current sequence determined based on the local feature vector and the global feature vector of the target node can combine spatio-temporal factors with the user's internal preference factors. Content item recommendation based on this sequence feature vector can better conform to the user's preferences and needs in the current spatio-temporal scenario, and the recommendation effect is better. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present disclosure. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0072] Figure 1 It is a schematic diagram of the implementation environment involved in a content item recommendation method provided by an embodiment of the present disclosure;

[0073] Figure 2 It is a system framework diagram of a content item recommendation method provided by an embodiment of the present disclosure;

[0074] Figure 3 It is a flowchart of a content item recommendation method provided by an embodiment of the present disclosure;

[0075] Figure 4 It is a flowchart of another content item recommendation method provided by an embodiment of the present disclosure;

[0076] Figure 5 It is the process of another content item recommendation method provided by an embodiment of the present disclosure;

[0077] Figure 6 is a structural diagram of a content item recommendation device provided by an embodiment of the present disclosure;

[0078] Figure 7 A server for content item recommendation is shown according to an exemplary embodiment. DETAILED DESCRIPTION

[0079] In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.

[0080] It can be understood that the terms "each", "multiple", and "any" used in the embodiments of the present disclosure include two or more, each refers to each of the corresponding multiple, and any refers to any one of the corresponding multiple. For example, the multiple words include 10 words, and each word refers to each word of the 10 words, and any word refers to any one of the 10 words.

[0081] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0082] Please refer to Figure 1 , which shows an implementation environment involved in the content item recommendation method provided by the embodiment of the present disclosure, and the implementation environment includes: a terminal 101 and a server 102. The terminal 101 communicates with the server 102 via a network 103, and the network 103 can be a wired network or a wireless network.

[0083] The terminal 101 may be a device with a display screen, such as a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., and a content application, such as a shopping application, a food delivery application, a video application, etc., is installed in the terminal 101. The terminal 101 can display various content items recommended by the server 102. When a click operation on any content item is detected, the terminal 101 sends a display request for the content item to the server 102, and then displays the content item when receiving the relevant data of the content item sent by the server 102.

[0084] The server 102 may be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers. The embodiment of the present disclosure does not specifically limit the server 102. The server 102 is a background server of the content application installed in the terminal 101. The server 102 can generate a current behavior sequence based on the user's click behavior on multiple content items, and combine the current time and space factors to mine the user's preferences in the current scene, so as to recommend content items that meet the user's preferences in the current scene to the user.

[0085] In order to more accurately capture the decision-making differences in users' click behaviors in different spatio-temporal scenarios, and at the same time capture the influence of external spatio-temporal factors and internal decision-making factors on users' preferences, the embodiments of the present disclosure propose a system framework for content item recommendation based on a graph neural network. Refer to Figure 2 , the recommendation process based on this system includes three stages, namely, a directed graph construction stage, an information propagation and aggregation stage (information propagation refers to the process of propagating information from one node to another node, and information aggregation refers to the process of aggregating the information of neighbor nodes to this node), and a result prediction and recommendation stage. In the directed graph construction stage, based on the historical behavior sequences of multiple users and the spatio-temporal information corresponding to each historical behavior sequence, a global information graph (i.e., the second directed graph) is constructed, and a user decision graph (i.e., the first directed graph) is constructed based on the current behavior sequence of the user. In the information propagation and aggregation stage, graph convolution operations are performed from two perspectives of cross-sequence (Inter-session) and intra-sequence (Intra-session) based on the global information graph and the user decision graph, so as to achieve the propagation and aggregation of information. In the result prediction and recommendation stage, local feature vectors and global feature vectors of each node in the current behavior sequence are learned from two perspectives of cross-sequence and intra-sequence, and based on the learned local feature vectors and global feature vectors of each node in the current behavior sequence, a sequence feature vector corresponding to the current behavior sequence is determined. Furthermore, based on this sequence feature vector, the similarity between the feature vector of the candidate content item and this sequence feature vector is calculated, and a list of candidate content items with higher similarity is returned.

[0086] The embodiments of the present disclosure provide a content item recommendation method. Taking Figure 1 the server 102 executing the embodiments of the present disclosure as an example, refer to Figure 3 , the method flow provided by the embodiments of the present disclosure includes:

[0087] 301. Obtain the first directed graph and the second directed graph.

[0088] Among them, the first directed graph is constructed according to the current behavior sequence, and the first directed graph is used to represent the directed connection relationship between multiple target nodes. The multiple target nodes include multiple decision factor nodes, sequence nodes corresponding to the current behavior sequence, and multiple content nodes corresponding to the multiple content items that have been clicked. The second directed graph is constructed according to multiple historical behavior sequences, and the second directed graph is used to represent the directed connection relationship between multiple nodes. The multiple nodes include multiple target nodes and nodes having a directed connection relationship with any target node.

[0089] 302. Determine the local feature vectors of multiple target nodes based on the feature vectors of multiple target nodes in the first directed graph.

[0090] Among them, the feature vectors of other target nodes that have a directed connection relationship with the target node in the first directed graph are fused in the local feature vector.

[0091] 303. Determine the global feature vectors of multiple target nodes based on the feature vectors of multiple nodes in the second directed graph and the types of directed connection edges between the multiple nodes.

[0092] Among them, the feature vectors of other nodes that have a directed connection relationship with the target node in the second directed graph are fused in the global feature vector.

[0093] 304. Determine the sequence feature vector corresponding to the current behavior sequence based on the local feature vectors and global feature vectors of multiple target nodes.

[0094] Among them, the sequence feature vector is used to characterize the features of the content items preferred in the current scenario.

[0095] 305. Perform content item recommendation based on the sequence feature vector.

[0096] The method provided by the embodiments of the present disclosure determines the local feature vectors and global feature vectors of multiple target nodes based on the first directed graph and the second directed graph respectively. Since the feature vectors of other target nodes that have a directed connection relationship with the target node in the first directed graph are fused in the local feature vector, the preferences of the user in the current spatio-temporal scenario can be captured from a local perspective. The feature vectors of other nodes that have a directed connection relationship with the target node in the second directed graph are fused in the global feature vector, and the preferences of the user in different spatio-temporal scenarios can be captured from a global perspective. Therefore, the sequence feature vector of the current sequence determined based on the local feature vector and global feature vector of the target node can combine spatio-temporal factors with the user's inherent preference factors. Performing content item recommendation based on this sequence feature vector can better fit the preferences and needs of the user in the current spatio-temporal scenario, and the recommendation effect is better.

[0097] In another embodiment of the present disclosure, determining the local feature vectors of multiple target nodes based on the feature vectors of multiple target nodes in the first directed graph includes:

[0098] Determine the local feature vectors of multiple content nodes based on the feature vectors of multiple content nodes and the transfer relationships between the content items in the current behavior sequence;

[0099] Determine the local feature vectors of multiple decision factor nodes based on the feature vectors of multiple decision factor nodes and the local feature vectors of multiple content nodes;

[0100] Determine the local feature vector of the sequence node based on the feature vector of the sequence node and the local feature vectors of multiple decision factor nodes.

[0101] In another embodiment of the present disclosure, based on the feature vectors of multiple content nodes and the transition relationships between the respective content items in the current behavior sequence, local feature vectors of the multiple content nodes are determined, including:

[0102] Calculate the average value of the feature vectors of the multiple content nodes to obtain an average feature vector;

[0103] For any content node, according to the feature vector of the content node, the average feature vector, and the feature vectors of each starting content node, calculate the weight value of the directed connection edge between each starting content node and the content node, where the starting content node is a content node with the content node as the transfer end point of the content item;

[0104] Perform normalization processing on the weight values corresponding to each starting content node to obtain the normalized weight values corresponding to each starting content node;

[0105] Based on the normalized weight values corresponding to each starting content node, perform weighted summation on the feature vectors of the respective starting content nodes to obtain the local feature vector of the content node.

[0106] In another embodiment of the present disclosure, based on the feature vectors of multiple decision factor nodes and the local feature vectors of the multiple content nodes, local feature vectors of the multiple decision factor nodes are determined, including:

[0107] For any decision factor node, according to the feature vector of the decision factor node and the local feature vector of each content node, calculate the normalized weight value of the directed connection edge between the decision factor node and each content node;

[0108] Based on the normalized weight values corresponding to each content node, perform weighted summation on the feature vectors of the multiple content nodes to obtain a weighted content feature vector;

[0109] Add the feature vector of the decision factor node and the weighted content feature vector to obtain the local feature vector of the decision factor node.

[0110] In another embodiment of the present disclosure, based on the feature vector of the sequence node and the local feature vectors of the multiple decision factor nodes, the local feature vector of the sequence node is determined, including:

[0111] According to the feature vector of the sequence node and the local feature vector of each decision factor node, calculate the normalized weight value of the directed connection edge between the sequence node and each decision factor node;

[0112] Based on the normalized weight values corresponding to each decision factor node, perform weighted summation on the feature vectors of the multiple decision factor nodes to obtain a weighted decision feature vector;

[0113] Add the feature vector of the decision factor node and the weighted decision feature vector to obtain the local feature vector of the sequence node.

[0114] In another embodiment of the present disclosure, based on the feature vectors of multiple nodes in the second directed graph and the types of directed connection edges between the multiple nodes, determining the global feature vectors of multiple target nodes includes:

[0115] For any target node, according to the feature vector of the previous layer of the target node, the feature vectors of the current layers of each starting node having a directed connection relationship with the target node, and the types of directed connection edges between the target node and each starting node, determine the relationship inner feature vector of the target node in the current layer under each type of connection edge, where the starting node is a node with the target node as the transfer end point;

[0116] Aggregate the relationship inner feature vectors of the target node in the current layer under each type of connection edge to obtain the global feature vector of the target node in the current layer;

[0117] Calculate the average value of the global feature vectors of all layers of the target node to obtain the global feature vector of the target node.

[0118] In another embodiment of the present disclosure, according to the feature vector of the previous layer of the target node, the feature vectors of the current layers of each starting node having a directed connection relationship with the target node, and the types of directed connection edges between the target node and each starting node, determining the relationship inner feature vector of the target node in the current layer under each type of connection edge includes:

[0119] For any type of directed connection edge, according to the feature vector of the previous layer of the target node and the feature vectors of the current layers of each starting node whose type of directed connection edge with the target node is the type, determine the normalized weight values corresponding to each starting node whose type of directed connection edge is the type;

[0120] Based on the normalized weight values corresponding to each starting node whose type of directed connection edge is the type, perform weighted addition on the feature vectors of the current layers of each starting node whose type of directed connection edge is the type to obtain the relationship inner feature vector of the target node in the current layer under the type of connection edge.

[0121] In another embodiment of the present disclosure, aggregating the relationship inner feature vectors of the target node in the current layer under each type of connection edge to obtain the global feature vector of the target node in the current layer includes:

[0122] According to the relationship inner feature vectors of the target node in the current layer under each type of connection edge, calculate the normalized weight values of the target node in the current layer under each type of connection edge;

[0123] Based on the normalized weight values of the target node in the current layer under each type of connection edge, the feature vectors within the relationship of the target node in the current layer under each type of connection edge are weighted and summed to obtain the global feature vector of the target node in the current layer.

[0124] In another embodiment of the present disclosure, before determining the global feature vectors of multiple target nodes based on the feature vectors of multiple nodes in the second directed graph and the types of directed connection edges between the multiple nodes, it further includes:

[0125] Perform a linear transformation on the feature vectors of each layer of the multiple nodes to obtain the transformed feature vectors of each layer of the multiple nodes;

[0126] Based on the transformed feature vectors of each layer of the multiple nodes and the types of directed connection edges between the multiple nodes, perform the operation of determining the global feature vectors of the multiple target nodes.

[0127] In another embodiment of the present disclosure, determining the sequence feature vector corresponding to the current behavior sequence based on the local feature vectors and global feature vectors of multiple target nodes includes:

[0128] Weight and sum the eigenvalues of the same dimension in the local feature vectors and global feature vectors of each target node to obtain the fused feature vector of the target node;

[0129] Based on the fused feature vectors of the target nodes, determine the sequence feature vector corresponding to the current behavior sequence.

[0130] In another embodiment of the present disclosure, content item recommendation based on the sequence feature vector includes:

[0131] Calculate the similarity between the feature vectors of multiple candidate content items and the sequence feature vector;

[0132] Recommend the multiple candidate content items in descending order of similarity.

[0133] All the above optional technical solutions can be combined arbitrarily to form alternative embodiments of the present disclosure, which will not be elaborated herein one by one.

[0134] The embodiments of the present disclosure provide a content item recommendation method. Taking the server 102 executing the embodiments of the present disclosure as an example, referring to Figure 1 ., the method flow provided by the embodiments of the present disclosure includes: Figure 4

[0135] 401. The server constructs a first directed graph and a second directed graph.

[0136] ​Among them, the first directed graph is used to represent the correlation between the current spatio-temporal information and multiple content items that have been clicked in the current behavior sequence. The content item refers to various information of the user's browsing object, which means the content that can be digitized (or electronicized) through any electronic processing method such as scanning, as well as the content that has been electronicized. The content items include documents formed by characters and (static) images, images, audio, and videos of moving images, etc. The content of the content items is very rich, which can be music, information, items, merchants, and so on. The construction process of the first directed graph is as follows:

[0137] In the first step, the server determines multiple target nodes based on the current behavior sequence and the corresponding spatio-temporal information.

[0138] Considering that each click behavior of the user on the content item will be affected by both external spatio-temporal factors and internal user intentions, the user's decision-making process conforms to the paradigm of "user decision-making factors (including time, space, and intention, etc.) - content item click". In order to accurately capture the decision-making process of the user's current behavior sequence and facilitate the accurate prediction of the user's next click behavior, the server regards each factor that affects the user's click behavior as multiple target nodes.

[0139] Among them, the multiple target nodes include multiple decision factor nodes corresponding to the current behavior sequence, sequence nodes, and multiple content nodes corresponding to the multiple content items that have been clicked. The multiple decision factor nodes include the time node corresponding to the current time, the space node corresponding to the current location, and multiple intention nodes corresponding to the current behavior sequence. The intention node represents the intention of the user to perform a click operation on the multiple content items that have been clicked in the current behavior sequence. The intention node is actually a virtual node without real data support, mainly to enhance the graph modeling ability. The feature vector of the intention node can be determined through learning. For example, multiple intentions are preset in advance, each intention corresponds to an intention node, and then the feature vector of the intention node is randomly initialized. Then, multiple historical behavior sequences are used to learn the feature vector of each intention node, and the feature vector of each intention node is continuously updated during the learning process, and finally the feature vector of the intention node is obtained.

[0140] When determining the intent nodes included in multiple target nodes in this step, the feature vectors of multiple content nodes corresponding to multiple content items can be obtained according to the multiple content items that have been clicked in the current behavior sequence. Then, based on the feature vectors of each content node and each intent node, the similarity between each content node and each intent node can be calculated. Based on the similarity calculation results, the intent nodes included in multiple target nodes are selected. For example, based on the similarity between each content node and each intent node, the average similarity between multiple content nodes and each intent node is calculated. Then, according to the order of the average similarity from high to low, a preset number (such as 2) of intent nodes are selected, or the intent nodes with an average similarity greater than the preset threshold are used as the intent nodes included in multiple target nodes.

[0141] In the second step, the server connects multiple target nodes with directed edges to obtain a first directed graph.

[0142] The server connects the content nodes corresponding to multiple content items with directed edges according to the transfer relationship of the multiple content items that have been clicked in the current behavior sequence, connects each content node and each decision node with directed edges according to the co-occurrence relationship between the multiple content items and multiple decision factors, and connects each decision node and the sequence node with directed edges according to the binding relationship between the multiple decision factors and the current behavior sequence. Finally, a first directed graph is generated, and this first directed graph is used to represent the directed connection relationship between multiple target nodes. By constructing the first directed graph, the modeling of the "user - decision factors (such as time, space, and intent, etc.) - content item click" paradigm is realized.

[0143] Among them, the second directed graph is used to represent the correlation between historical spatio-temporal information and multiple content items that have been clicked in the historical behavior sequence. The construction process of the second directed graph is as follows:

[0144] In the first step, the server obtains multiple historical behavior sequences and corresponding spatio-temporal information.

[0145] Considering that the historical behavior sequence of a certain user is limited, in order to capture the user's preferences in different spatio-temporal scenarios from a global perspective, the embodiments of the present disclosure obtain the spatio-temporal information corresponding to multiple historical behavior sequences including the current behavior sequence.

[0146] In the second step, the server determines multiple nodes based on multiple historical behavior sequences and corresponding spatio-temporal information.

[0147] The server pre-divides time into multiple time slices and sets different time nodes for different time slices based on the divided time slices. The server takes each clicked content item in each historical behavior sequence as a content node, takes the time information corresponding to each historical behavior sequence as a time node, and takes the spatial information corresponding to each historical behavior sequence as a spatial node, and finally obtains multiple nodes.

[0148] In the third step, the server connects multiple nodes with directed edges to obtain a second directed graph.

[0149] When the server connects multiple nodes with directed edges, it can be carried out from two perspectives: the sequence level and the content item level. From the perspective of the sequence level, each historical behavior sequence is regarded as a virtual node, and directed edges are used to connect the sequence node corresponding to each historical behavior sequence with the time node and spatial node corresponding to this historical behavior sequence, and directed edges are used to connect the time node and the spatial node. The directed graph constructed at the sequence level can model the relationship between the sequence node, the time node, and the spatial node, so as to capture the preference patterns of users in different spatio-temporal scenarios. From the perspective of the content item level, based on the transfer relationship between the clicked content items in each historical behavior sequence, directed edges are used to connect the content nodes corresponding to each content item, and based on the co-occurrence relationship between the clicked content items in each historical behavior sequence and the spatio-temporal information, directed edges are used to connect each content node with the time node and the spatial node. The directed graph constructed at the content item level can model the co-occurrence relationship between the content node, the time node, and the spatial node, so as to reflect the spatio-temporal attributes of the content item. Through the connection of the two perspectives, a second directed graph is finally generated, and this second directed graph is used to represent the directed connection relationship between multiple nodes. In the embodiments of the present disclosure, the second directed graph may include all target nodes among multiple target nodes, and nodes having a directed connection relationship with any one of the multiple target nodes; the second directed graph may also include some target nodes of the multiple target nodes and nodes having a directed connection relationship with any one of the partial target nodes, and the partial target nodes include multiple content nodes, time nodes, spatial nodes, sequence nodes, etc.

[0150] It should be noted that the first directed graph and the second directed graph constructed by the server are not fixed, but change dynamically with the user's click behavior.

[0151] 402. The server obtains the first directed graph and the second directed graph.

[0152] Based on the current behavior sequence, before the user performs the next click operation, the server will obtain the first directed graph and the second directed graph, and then mine the preferences of the user in the current scenario based on the first directed graph and the second directed graph, so that the content items recommended before the next click are more in line with the user's preferences.

[0153] 403. The server determines the local feature vectors of multiple target nodes based on the feature vectors of the multiple target nodes in the first directed graph.

[0154] The local feature vector is the feature vector determined for a target node in the first directed graph. The feature vectors of other target nodes that have a directed connection relationship with the target node in the first directed graph are fused in the local feature vector, which can capture the user's preferences in the current spatio-temporal scenario from a local perspective. The content items recommended based on the local feature vectors of each target node are more in line with the user's needs.

[0155] In order to better learn the relevance before and after the user's click behavior, it is necessary to perform in-sequence propagation of the feature vector of each target node on the first directed graph, and then determine the local feature vector of each target node based on the propagation result. In the embodiments of the present disclosure, the in-sequence propagation on the first directed graph is mainly divided into a content item transfer propagation process and a decision process propagation. Through the content item propagation process, the local feature vectors of multiple content nodes among the multiple target nodes can be determined, and through the decision process propagation, the local feature vectors of multiple decision factor nodes and the local feature vectors of sequence nodes can be determined. For multiple content nodes, multiple decision factor nodes, and sequence nodes, the methods for determining the corresponding local feature vectors when performing content item propagation and decision process propagation based on the first directed graph are different, and will be introduced separately below.

[0156] The first case, for multiple content nodes

[0157] Considering that during the process of the user browsing content items, there may be mis-click behaviors. Although these mis-click behaviors may be recorded, the content item is actually not the content item preferred by the user, but additional noise data. The content item transfer propagation mainly models the transfer relationship between content items in the current behavior sequence, and then determines the local feature vectors of multiple content nodes based on the feature vectors of the content nodes corresponding to multiple content items and the transfer relationship between each content item in the current behavior sequence, so as to adaptively remove the noise influence in the current behavior sequence through the attention mechanism and extract the user's true interests.

[0158] Specifically, when the server determines the local feature vectors of multiple content nodes based on the feature vectors of multiple content nodes and the transfer relationship between each content item in the current behavior sequence, the following method can be adopted:

[0159] The first step, the server calculates the average value of the feature vectors of multiple content nodes to obtain the mean feature vector.

[0160] The server obtains the feature vectors of the content nodes corresponding to each content item in the current behavior sequence, and calculates the average value of the feature vectors of multiple content nodes to obtain the mean feature vector.

[0161] Step 2: For any content node, the server calculates the weight value of the directed connection edge between each starting content node and the content node according to the feature vector of the content node, the mean feature vector, and the feature vector of each starting content node.

[0162] For any content node, the server traverses the first directed graph to obtain multiple starting content nodes with the content node as the end point of the content item transfer. Then, according to the feature vector of the content node, the mean feature vector, and each starting content node, the server calculates the weight value of the directed connection edge between each starting content node and the content node. When specifically implementing this process, the following formula can be used:

[0163]

[0164] where, e jk represents the weight value of the directed connection edge between the content node corresponding to content item j and the starting content node corresponding to content item k, that is, the transfer score from content item k to content item j; σ represents the activation function; represents a learnable parameter matrix, and the learning method of this parameter matrix is to randomly initialize the element values of this parameter matrix and update the element values of this parameter matrix using the gradient descent method of the element values; represents the mean feature vector; represents the feature vector of content item j; represents the feature vector of content item k; ⊙ represents element-wise multiplication, that is, multiplying the values of the two vectors on the corresponding dimensions; represents calculating the similarity between the feature vector of content item j and the mean feature vector; represents calculating the similarity between the feature vector of content item k and the mean feature vector; represents calculating the similarity between the feature vector of content item j and the feature vector of content item k.

[0165] Step 3: The server normalizes the weight value corresponding to each starting content node to obtain the normalized weight value corresponding to each starting content node.

[0166] Based on the weight value corresponding to each starting content node, the server normalizes the weight value corresponding to each starting content node so that the sum of the weight values corresponding to each starting content node is 1. When the server normalizes the weight value corresponding to each starting content node, the following formula can be used:

[0167]

[0168] Among them, α jk represents the normalized weight value of the weight value e jk ; e jk′ represents the weight value corresponding to any starting content node of content item j; i k′ represents any starting content node of content item j; represents the set composed of all starting content nodes of content item j.

[0169] Fourth step, based on the normalized weight value corresponding to each starting content node, the server performs weighted addition on the feature vectors of each starting content node to obtain the local feature vector of the content node.

[0170] Based on the normalized weight value corresponding to each starting content node, the server multiplies the feature vector of each content node by the corresponding normalized weight value, and then adds the products of the feature vectors of each starting content node and the normalized weight value to obtain the local feature vector of this content node.

[0171] Second case, for multiple decision factor nodes

[0172] After capturing the core interests of the user, the decision-making process is simulated through the decision-making process propagation, so as to determine the local feature vectors of multiple decision factor nodes based on the feature vectors of multiple decision factor nodes and the local feature vectors of multiple content nodes. Specifically, the following method can be adopted:

[0173] First step, for any decision factor node, the server calculates the normalized weight value of the directed connection edge between this decision factor node and each content node according to the feature vector of this decision factor node and the local feature vector of each content node.

[0174] Based on the feature vector of this decision factor node and the local feature vector of each content node, the server calculates the normalized weight value of the directed connection edge between this decision factor node and each content node. When this process is specifically implemented, the following formula can be adopted:

[0175]

[0176] Among them, α vi represents the normalized weight value of the directed connection edge between decision factor node v and the content node of any content item i; represents a learnable parameter matrix; h v represents the feature vector of decision factor node v; represents a learnable parameter matrix; represents the local feature vector of content item i; represents the local feature vector of any content item i' in the current behavior sequence s; τ s represents the set composed of each content item in the current behavior sequence s.

[0177] Second, based on the normalized weight values corresponding to each content node, the server performs weighted multiplication on the feature vectors of multiple content nodes to obtain a weighted content feature vector.

[0178] Third, the server adds the feature vector of the decision factor node and the weighted content feature vector to obtain the local feature vector of the decision factor node.

[0179] After the above second and third steps, the local feature vector determined by the server for the decision factor node can be expressed as:

[0180]

[0181] Among them, represents the local feature vector of the decision factor node v; represents a learnable parameter matrix; represents the local feature vector of the content item i; h v represents the feature vector of the decision factor node v.

[0182] It should be noted that the above only gives the method for determining the local feature vector of the decision factor node. Since multiple decision factor nodes include time nodes, space nodes, and intention nodes, in actual applications, for each specific type of node, the above formula needs to be used for calculation respectively.

[0183] The third case, for sequence nodes

[0184] Based on the local feature vectors of multiple decision factor nodes obtained in the above steps, when the server determines the local feature vector of the sequence node based on the feature vector of the sequence node and the local feature vectors of multiple decision factor nodes, the following method can be used:

[0185] First, the server calculates the normalized weight value of the directed connection edge between the sequence node and each decision factor node according to the feature vector of the sequence node and the local feature vector of each decision factor node.

[0186] Based on the feature vector of the sequence node and the local feature vector of each decision factor node, the server can apply the following formula to calculate the normalized weight value of the directed connection edge between the sequence node and each decision factor node.

[0187]

[0188] Among them, α svRepresents the normalized weight value of the directed connection edge between the sequence node corresponding to the current behavior sequence s and the decision factor node v; Represents a learnable parameter matrix; h s Represents the feature vector of the sequence node; W s Represents a learnable parameter matrix; Represents the local feature vector of the decision factor node v; Represents the local feature vector of any decision factor node v′; F represents the set of decision factor nodes in the first directed graph.

[0189] In the second step, the server performs weighted summation on the feature vectors of multiple decision factor nodes based on the normalized weight value corresponding to each decision factor node to obtain a weighted decision feature vector.

[0190] In the third step, the server adds the feature vector of the decision factor node and the weighted decision feature vector to obtain the local feature vector of the sequence node.

[0191] After the above second and third steps, the local feature vector determined by the server for the sequence node can be expressed as:

[0192]

[0193] Wherein, Represents the local feature vector of the sequence node; h s Represents the feature vector of the sequence node.

[0194] 404. The server determines the global feature vectors of multiple target nodes based on the feature vectors of multiple nodes in the second directed graph and the types of directed connection edges between the multiple nodes.

[0195] The second directed graph constructed in the embodiments of the present disclosure models the influence of spatio-temporal factors from the sequence level and the content item level. For information aggregation on the second directed graph, the embodiments of the present disclosure first perform information propagation within the relationship under each type of connection edge, and then perform aggregation between relationships based on the attention mechanism. Specifically, when the server determines the global feature vectors of multiple target nodes based on the feature vectors of multiple nodes in the second directed graph and the types of directed connection edges between the multiple nodes, the following method can be adopted:

[0196] 4041. For any target node, the server determines the in-relationship feature vector of the target node at the current layer under each type of connection edge according to the feature vector of the previous layer of the target node, the feature vectors of the current layers of each starting node having a directed connection relationship with the target node, and the type of the directed connection edge between the target node and each starting node.

[0197] Among them, the starting node is the node with the target node as the transfer end point. There are various types of directed connection edges between the target node and the starting node. When the target node is a content node, the types of directed connection edges between the target node and the starting node include content item-content item type, content item-time type, content item-space type, etc.; when the target node is a time node, the types of directed connection edges between the target node and the starting node include time-content item type, time-space type, time-sequence type; when the target node is a space node, the types of directed connection edges between the target node and the starting node include space-content item type, space-time type, space-sequence type, etc.; when the target node is a sequence node, the types of directed connection edges between the target node and the starting node include sequence-time type, sequence-location type, etc.

[0198] In the embodiments of the present disclosure, a graph neural network is used for content item recommendation. Since the graph neural network includes multiple layers, and the feature vectors of the same node in each layer of the graph neural network are different, usually the feature vector input by the node in the current layer is the feature vector output by the previous layer. In order to more accurately determine the global feature vectors of each target node, the server will calculate the global feature vectors of each target node in each layer of the graph neural network respectively, and then determine the global feature vectors of each target node based on the global feature vectors of each target node in each layer of the graph neural network.

[0199] In addition, since each node in the second directed graph is connected by multiple types of edges, and different edges represent different semantics and relationships, it is necessary to first transform different information sources so that the information sources are all in the same feature space. The specific information transformation process is as follows: The server performs a linear transformation on the feature vectors of each layer of multiple nodes to obtain the transformed feature vectors of each layer of multiple nodes.

[0200] When this process is specifically implemented, the following formula can be used:

[0201]

[0202] Among them, represents the feature vector of node a after transformation in layer l; W ψ(e) represents a learnable parameter matrix; represents the feature vector of node a after transformation in layer l-1; represents the set composed of each neighbor node of node b (the node with node b as the transfer end point) under the directed connection relationship e, and ψ(e) represents that the directed connection relationship is e, ψ(e) ∈ R (R is the set composed of all directed connection relationships).

[0203] When the server determines the intra-relationship feature vector of the target node at the current layer under each type of connection edge based on the feature vector of the previous layer of the target node, the feature vectors of each starting node at the current layer that has a directed connection relationship with the target node, and the types of directed connection edges between the target node and each starting node, the following method can be adopted:

[0204] In the first step, for any type of directed connection edge, the server determines the normalized weight values corresponding to each starting node whose type of directed connection edge is of type e based on the feature vector of the previous layer of the target node and the feature vectors of each starting node at the current layer whose type of directed connection edge with the target node is of type e.

[0205] When specifically implementing this step, the following formula can be adopted:

[0206]

[0207] Among them, represents the normalized weight value corresponding to the starting node a in the case where the type of directed connection edge is e; represents a learnable parameter matrix; represents the feature vector of the termination node b after transformation at layer l - 1; represents the feature vector of the starting node a after transformation at layer l; represents the feature vector of any starting node of node b after transformation at layer l.

[0208] In the second step, the server performs weighted summation on the feature vectors of each starting node at the current layer whose type of directed connection edge is of type e based on the normalized weight values corresponding to each starting node whose type of directed connection edge is of type e, to obtain the intra-relationship feature vector of the target node at the current layer under the connection edge of type e.

[0209] When specifically implementing this step, the following formula can be adopted:

[0210]

[0211] Among them, represents the intra-relationship feature vector of the target node b at the current layer under the connection edge of type e.

[0212] 4042. The server aggregates the intra-relationship feature vectors of the target node at the current layer under each type of connection edge to obtain the global feature vector of the target node at the current layer.

[0213] Through the propagation within the relationships, the model can capture the semantic information under each relationship. After the propagation at the content item and sequence levels, the server further aggregates the semantic representations under each relationship by introducing an attention mechanism. When the server aggregates the relationship-internal feature vectors of the target node at the current layer under each type of connection edge to obtain the global feature vector of the target node at the current layer, the following method can be adopted:

[0214] First, the server calculates the normalized weight values of the target node at the current layer under each type of connection edge based on the relationship-internal feature vectors of the target node at the current layer under each type of connection edge.

[0215] When specifically implementing this step, the following formula can be adopted:

[0216]

[0217] Among them, represents the normalized weight value of the target node v at the l-th layer under the connection edge of type e; represents a learnable parameter matrix; W φ(v) represents a learnable parameter matrix; represents the relationship-internal feature vector of the target node v at the l-th layer under the connection edge of type e; represents a learnable bias matrix; represents the relationship-internal feature vector of the target node v at the l-th layer under any type of connection edge; represents the type of any connection edge of the target node v; represents the set composed of the types of all connection edges of the target node v.

[0218] Second, the server performs weighted summation on the relationship-internal feature vectors of the target node at the current layer under each type of connection edge based on the normalized weight values of the target node at the current layer under each type of connection edge to obtain the global feature vector of the target node at the current layer.

[0219] When specifically implementing this step, the following formula can be adopted:

[0220]

[0221] Among them, represents the global feature vector of the target node at the l-th layer.

[0222] 4043. The server calculates the average value of the global feature vectors of all layers of the target node to obtain the global feature vector of the target node.

[0223] Through the above propagation, the server can obtain the global feature vectors of each layer of the target node. Based on the global feature vectors of all layers of the target node, the server calculates the average value of the global feature vectors of all layers of the target node to obtain the global feature vector of the target node.

[0224] Considering that the types of target nodes include content nodes, time nodes, and space nodes, accordingly,

[0225] The global feature vector of the content node is expressed as: Among them, represents the global feature vector of the content node, L represents the total number of layers of the graph neural network, represents the global feature vector of the content node at layer l.

[0226] The global feature vector of the time node is expressed as: Among them, represents the global feature vector of the time node, represents the global feature vector of the time node at layer l.

[0227] The global feature vector of the space node is expressed as: Among them, represents the global feature vector of the space node, represents the global feature vector of the space node at layer l.

[0228] 405. The server determines the sequence feature vector corresponding to the current behavior sequence based on the local feature vectors and global feature vectors of multiple target nodes.

[0229] The server weights and adds the eigenvalues of the same dimension in the local feature vector and global feature vector of each target node to obtain the fusion feature vector of the target node. Then, based on the fusion feature vector of the target node, a weighted calculation is performed using the soft-attention mechanism to obtain the sequence feature vector corresponding to the current behavior sequence.

[0230] 406. The server performs content item recommendation based on the sequence feature vector.

[0231] Based on the obtained sequence feature vector, for multiple candidate content items to be recommended, the server calculates the similarity between the feature vectors of the multiple candidate content items and the sequence feature vector, and then recommends the multiple candidate content items in descending order of similarity.

[0232] Embodiments of the present disclosure combine the characteristics of the local business scenario, combine spatio-temporal scenario factors with the user's inherent preferences, study the characteristics of user behavior patterns in different spatio-temporal scenarios, so as to achieve better recommendation performance. In addition, from the perspectives of the global and local, the influence of the spatio-temporal scenario on the user's consumption behavior is modeled. The constructed global information graph has strong universality and can be migrated to any recommendation model, improving the recommendation performance in the spatio-temporal scenario.

[0233] The method provided by the embodiments of the present disclosure can be applied to recommendation scenarios with different preferences in different spatio-temporal scenarios. Typically, it can be applied to the takeaway scenario. When implemented in the takeaway scenario, the takeaway platform collects the user's historical takeaway orders and the corresponding spatio-temporal information. For the current behavior sequence and the current spatio-temporal information, it can predict the takeaway dishes or stores that the user may be interested in, so as to achieve personalized recommendation for the user, and at the same time, it can optimize platform resource scheduling problems such as order allocation on the entire takeaway platform and the path planning of takeaway riders.

[0234] Figure 5 The recommendation process of the content item recommendation method provided by the embodiments of the present disclosure in the takeaway scenario is shown. Refer to Figure 5 The server preprocesses the user data in advance. For the time data, it performs discretization processing (selecting the discretization method according to the specific application scenario). For example, a day is divided into 48 time slices at half-hour intervals; for the geographical area information, it also needs to be discretized (such as dividing the area according to longitude and latitude). Then, a global information graph and a user decision graph are respectively constructed according to the takeaway dish sequence ordered by the user and the corresponding spatio-temporal information.

[0235] For the location, time, and takeaway dish nodes in the constructed graph, the input features are encoded using one-hot encoding, and then the sparse features are transformed into dense real-valued vectors. It should be noted that the embodiments of the present disclosure use the input features of space, time, and commodity as the feature input of the 0th layer of the graph neural network. For the cross-sequence propagation on the global information graph, first perform the propagation within the relationship, and then use the attention mechanism to adaptively aggregate the embedded features under each relationship to obtain the node features of each layer. Finally, the global node features are obtained by combining the features output of the L layers. For the in-sequence propagation on the user decision graph, first filter the noise through commodity transfer propagation to extract the user's interest, and then generate the local feature vectors of the decision factor nodes (time, space, and intention) and the local feature vectors of the sequence nodes according to the user's decision-making process.

[0236] After cross-sequence and intra-sequence propagation on the global information graph and the user decision graph, two sets of node embedding features are output. Then, combined with sequence encoding, the weight value of each commodity in the sequence is calculated. Furthermore, based on the soft-attention mechanism, the sequence feature vector of the sequence is obtained after weighting. Based on the generated sequence feature vector, the preference score on the candidate commodities is calculated. After the takeaway platform obtains the prediction scores of all exposed takeaway dishes by the user at a specific spatial location and specific moment, the top several takeaway dishes with the highest ranking are used as the dishes that the user may be interested in. Then, the takeaway platform calculates the optimal store based on the offline stores where different dishes are located and the user's current location and pushes it to the user. At the same time, the takeaway platform can coordinate the preferred dishes of all users at the current moment and optimize the dispatching of takeaway riders, so as to achieve efficient distribution.

[0237] The method provided by the embodiments of the present disclosure determines the local feature vectors and global feature vectors of multiple target nodes based on the first directed graph and the second directed graph respectively. Since the local feature vectors incorporate the feature vectors of other target nodes that have a directed connection relationship with the target node in the first directed graph, the preferences of the user in the current spatio-temporal scenario can be captured from a local perspective. The global feature vectors incorporate the feature vectors of other nodes that have a directed connection relationship with the target node in the second directed graph, and the preferences of the user in different spatio-temporal scenarios can be captured from a global perspective. Therefore, the sequence feature vector of the current sequence determined based on the local feature vectors and global feature vectors of the target nodes can combine spatio-temporal factors with the user's inherent preference factors. Based on this sequence feature vector for content item recommendation, it can better fit the preferences and needs of the user in the current spatio-temporal scenario, and the recommendation effect is better.

[0238] See Figure 6 , the embodiments of the present disclosure provide a content item recommendation device, and the device includes:

[0239] An acquisition module 601, configured to acquire a first directed graph and a second directed graph. The first directed graph is constructed according to the current behavior sequence, and the first directed graph is used to represent the directed connection relationship between multiple target nodes. The multiple target nodes include multiple decision factor nodes, sequence nodes corresponding to the current behavior sequence, and multiple content nodes corresponding to the multiple clicked content items. The second directed graph is constructed according to multiple historical behavior sequences, and the second directed graph is used to represent the directed connection relationship between multiple nodes. The multiple nodes include multiple target nodes and nodes that have a directed connection relationship with any target node;

[0240] A first determination module 602, configured to determine the local feature vectors of multiple target nodes based on the feature vectors of multiple target nodes in the first directed graph. The local feature vectors incorporate the feature vectors of other target nodes that have a directed connection relationship with the target node in the first directed graph;

[0241] A second determination module 603, configured to determine a global feature vector of a plurality of target nodes based on feature vectors of a plurality of nodes in a second directed graph and types of directed connection edges between the plurality of nodes, where the global feature vector integrates feature vectors of other nodes in the second directed graph that have a directed connection relationship with the target nodes;

[0242] A third determination module 604, configured to determine a sequence feature vector corresponding to the current behavior sequence based on local feature vectors and global feature vectors of the plurality of target nodes, where the sequence feature vector is used to characterize features of content items preferred in the current scenario;

[0243] A recommendation module 605, configured to perform content item recommendation based on the sequence feature vector.

[0244] In another embodiment of the present disclosure, a first determination module 602 is configured to determine local feature vectors of a plurality of content nodes based on feature vectors of the plurality of content nodes and transfer relationships between each content item in the current behavior sequence; determine local feature vectors of a plurality of decision factor nodes based on feature vectors of the plurality of decision factor nodes and local feature vectors of the plurality of content nodes; and determine a local feature vector of a sequence node based on a feature vector of the sequence node and local feature vectors of the plurality of decision factor nodes.

[0245] In another embodiment of the present disclosure, a first determination module 602 is configured to calculate an average value of feature vectors of a plurality of content nodes to obtain an average feature vector; for any content node, calculate a weight value of a directed connection edge between each starting content node and the content node according to the feature vector of the content node, the average feature vector, and feature vectors of each starting content node, where the starting content node is a content node with the content node as the transfer end point of the content item; perform normalization processing on the weight value corresponding to each starting content node to obtain a normalized weight value corresponding to each starting content node; and perform weighted summation on feature vectors of each starting content node based on the normalized weight value corresponding to each starting content node to obtain a local feature vector of the content node.

[0246] In another embodiment of the present disclosure, a first determination module 602 is configured to, for any decision factor node, calculate a normalized weight value of a directed connection edge between the decision factor node and each content node according to the feature vector of the decision factor node and local feature vectors of each content node; perform weighted summation on feature vectors of the plurality of content nodes based on the normalized weight value corresponding to each content node to obtain a weighted content feature vector; and add the feature vector of the decision factor node and the weighted content feature vector to obtain a local feature vector of the decision factor node.

[0247] In another embodiment of the present disclosure, the first determination module 602 is configured to calculate the normalized weight value of the directed connection edge between the sequence node and each decision factor node according to the feature vector of the sequence node and the local feature vector of each decision factor node; based on the normalized weight value corresponding to each decision factor node, perform weighted addition on the feature vectors of multiple decision factor nodes to obtain a weighted decision feature vector; add the feature vector of the decision factor node and the weighted decision feature vector to obtain the local feature vector of the sequence node.

[0248] In another embodiment of the present disclosure, the second determination module 603 is configured to, for any target node, determine the relationship inner feature vector of the target node at the current layer under each type of connection edge according to the feature vector of the previous layer of the target node, the feature vectors of the current layers of each starting node having a directed connection relationship with the target node, and the type of the directed connection edge between the target node and each starting node, where the starting node is a node with the target node as the transfer end point; aggregate the relationship inner feature vectors of the target node at the current layer under each type of connection edge to obtain the global feature vector of the target node at the current layer; calculate the average value of the global feature vectors of all layers of the target node to obtain the global feature vector of the target node.

[0249] In another embodiment of the present disclosure, the second determination module 603 is configured to, for any type of directed connection edge, determine the normalized weight value corresponding to each starting node whose type of the directed connection edge with the target node is the type according to the feature vector of the previous layer of the target node and the feature vectors of the current layers of each starting node whose type of the directed connection edge with the target node is the type; based on the normalized weight value corresponding to each starting node whose type of the directed connection edge with the target node is the type, perform weighted addition on the feature vectors of the current layers of each starting node whose type of the directed connection edge with the target node is the type to obtain the relationship inner feature vector of the target node at the current layer under the type of connection edge.

[0250] In another embodiment of the present disclosure, the second determination module 603 is configured to calculate the normalized weight value of the target node at the current layer under each type of connection edge according to the relationship inner feature vector of the target node at the current layer under each type of connection edge; based on the normalized weight value of the target node at the current layer under each type of connection edge, perform weighted addition on the relationship inner feature vectors of the target node at the current layer under each type of connection edge to obtain the global feature vector of the target node at the current layer.

[0251] In another embodiment of the present disclosure, the apparatus further includes:

[0252] A transformation module, configured to perform a linear transformation on the feature vectors of each layer of multiple nodes to obtain the transformed feature vectors of each layer of multiple nodes;

[0253] The second determination module 603 is further configured to perform an operation of determining the global feature vectors of multiple target nodes based on the feature vectors after transformation of each layer of multiple nodes and the types of directed connection edges between the multiple nodes.

[0254] In another embodiment of the present disclosure, the third determination module 604 is configured to perform weighted addition on the eigenvalues of the same dimension in the local feature vector and the global feature vector of each target node to obtain the fused feature vector of the target node; and determine the sequence feature vector corresponding to the current behavior sequence based on the fused feature vector of the target node.

[0255] In another embodiment of the present disclosure, the recommendation module 605 is configured to calculate the similarity between the feature vectors of multiple candidate content items and the sequence feature vector; and recommend the multiple candidate content items in descending order of the similarity.

[0256] In summary, the device provided in the embodiments of the present disclosure determines the local feature vectors and global feature vectors of multiple target nodes based on the first directed graph and the second directed graph respectively. Since the local feature vectors incorporate the feature vectors of other target nodes that have a directed connection relationship with the target node in the first directed graph, the user's preferences in the current spatio-temporal scenario can be captured from a local perspective. The global feature vectors incorporate the feature vectors of other nodes that have a directed connection relationship with the target node in the second directed graph, and the user's preferences in different spatio-temporal scenarios can be captured from a global perspective. Therefore, the sequence feature vector of the current sequence determined based on the local feature vectors and global feature vectors of the target nodes can combine spatio-temporal factors with the user's inherent preference factors. Recommending content items based on this sequence feature vector can better conform to the user's preferences and needs in the current spatio-temporal scenario, and the recommendation effect is better.

[0257] Figure 7 A server for content item recommendation shown according to an exemplary embodiment. Referring to Figure 7 , the server 700 includes a processing component 722, which further includes one or more processors, and memory resources represented by a memory 732 for storing instructions executable by the processing component 722, such as application programs. The application programs stored in the memory 732 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 722 is configured to execute instructions to perform the functions performed by the server in the above content item recommendation method.

[0258] The server 700 may also include a power supply component 726 configured to perform power management of the server 700, a wired or wireless network interface 750 configured to connect the server 700 to a network, and an input / output (I / O) interface 758. The server 700 may operate based on an operating system stored in the memory 732, such as Windows Server TM , Mac OSX TM , Unix TM , Linux TM , FreeBSD TM or the like.

[0259] Embodiments of the present disclosure provide a computer-readable storage medium storing at least one program code, which is loaded and executed by a processor to implement a content item recommendation method.

[0260] Embodiments of the present disclosure provide a computer program product including computer program code stored in a computer-readable storage medium. A processor of a server reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code so that the server performs a content item recommendation method.

[0261] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware or by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disc, or the like.

[0262] The above are only optional embodiments of the present disclosure and are not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure shall be included within the protection scope of the present disclosure.

Claims

1. A content item recommendation method, characterized in that, The method includes: Obtaining a first directed graph and a second directed graph, where the first directed graph is constructed according to a current behavior sequence, and the first directed graph is used to represent the directed connection relationships among multiple target nodes. The multiple target nodes include multiple decision factor nodes, sequence nodes corresponding to the current behavior sequence, and multiple content nodes corresponding to multiple clicked content items. The second directed graph is constructed according to multiple historical behavior sequences, and the second directed graph is used to represent the directed connection relationships among multiple nodes. The multiple nodes include the multiple target nodes and nodes having directed connection relationships with any target node. The multiple decision factor nodes include a time node corresponding to the current time, a space node corresponding to the current location, and multiple intention nodes corresponding to the current behavior sequence; Based on the feature vectors of the multiple target nodes in the first directed graph, determining the local feature vectors of the multiple target nodes, where the local feature vectors incorporate the feature vectors of other target nodes having directed connection relationships with the target nodes in the first directed graph; Based on the feature vectors of the multiple nodes in the second directed graph and the types of directed connection edges among the multiple nodes, determining the global feature vectors of the multiple target nodes, where the global feature vectors incorporate the feature vectors of other nodes having directed connection relationships with the target nodes in the second directed graph; Based on the local feature vectors and the global feature vectors of the multiple target nodes, determining the sequence feature vector corresponding to the current behavior sequence, where the sequence feature vector is used to represent the features of the content items preferred in the current scenario; Performing content item recommendation based on the sequence feature vector.

2. The method according to claim 1, characterized in that, The determining the local feature vectors of the multiple target nodes based on the feature vectors of the multiple target nodes in the first directed graph includes: Based on the feature vectors of the multiple content nodes and the transfer relationships among the content items in the current behavior sequence, determining the local feature vectors of the multiple content nodes; Based on the feature vectors of the multiple decision factor nodes and the local feature vectors of the multiple content nodes, determining the local feature vectors of the multiple decision factor nodes; Based on the feature vector of the sequence node and the local feature vectors of the multiple decision factor nodes, determining the local feature vector of the sequence node.

3. The method according to claim 2, characterized in that The determining the local feature vectors of the multiple content nodes based on the feature vectors of the multiple content nodes and the transfer relationships among the content items in the current behavior sequence includes: Calculating the average value of the feature vectors of the multiple content nodes to obtain a mean feature vector; For any content node, calculating the weight value of the directed connection edge between each starting content node and the content node according to the feature vector of the content node, the mean feature vector, and the feature vectors of each starting content node, where the starting content node is a content node with the content node as the end point of content item transfer; Performing normalization processing on the weight values corresponding to each starting content node to obtain the normalized weight values corresponding to each starting content node; Based on the normalized weight values corresponding to each starting content node, the feature vectors of each starting content node are weighted and summed to obtain the local feature vector of the content node.

4. The method according to claim 2, characterized in that, The determining of the local feature vectors of the multiple decision factor nodes based on the feature vectors of the multiple decision factor nodes and the local feature vectors of the multiple content nodes includes: For any decision factor node, according to the feature vector of the decision factor node and the local feature vector of each content node, calculate the normalized weight value of the directed connection edge between the decision factor node and each content node; Based on the normalized weight values corresponding to each content node, the feature vectors of the multiple content nodes are weighted and summed to obtain a weighted content feature vector; The feature vector of the decision factor node and the weighted content feature vector are added together to obtain the local feature vector of the decision factor node.

5. The method according to claim 2, wherein The determining of the local feature vector of the sequence node based on the feature vector of the sequence node and the local feature vectors of the multiple decision factor nodes includes: According to the feature vector of the sequence node and the local feature vector of each decision factor node, calculate the normalized weight value of the directed connection edge between the sequence node and each decision factor node; Based on the normalized weight values corresponding to each decision factor node, the feature vectors of the multiple decision factor nodes are weighted and summed to obtain a weighted decision feature vector; The feature vector of the decision factor node and the weighted decision feature vector are added together to obtain the local feature vector of the sequence node.

6. The method according to claim 1, wherein The determining of the global feature vectors of the multiple target nodes based on the feature vectors of the multiple nodes in the second directed graph and the types of the directed connection edges between the multiple nodes includes: For any target node, according to the feature vector of the previous layer of the target node, the feature vectors of the current layer of each starting node having a directed connection relationship with the target node, and the types of the directed connection edges between the target node and each starting node, determine the relationship inner feature vector of the current layer of the target node under each type of connection edge, where the starting node is a node with the target node as the transfer end point; Aggregate the relationship inner feature vectors of the current layer of the target node under each type of connection edge to obtain the global feature vector of the current layer of the target node; Calculate the average value of the global feature vectors of all layers of the target node to obtain the global feature vector of the target node.

7. The method according to claim 6, wherein The determining of the relationship inner feature vector of the current layer of the target node under each type of connection edge according to the feature vector of the previous layer of the target node, the feature vectors of the current layer of each starting node having a directed connection relationship with the target node, and the types of the directed connection edges between the target node and each starting node includes: For any type of directed connection edge, according to the feature vector of the previous layer of the target node and the feature vectors of the current layer of each starting node whose type of the directed connection edge with the target node is this type, determine the normalized weight values corresponding to each starting node whose type of the directed connection edge is this type; Based on the normalized weight values corresponding to each starting node of the type for the directed connection edges of the type, perform weighted summation on the feature vectors of the current layer of each starting node of the type for the directed connection edges of the type, to obtain the relational inner feature vector of the current layer of the target node under the connection edges of the type.

8. The method according to claim 6, characterized in that, The aggregating the relational inner feature vectors of the current layer of the target node under connection edges of each type to obtain the global feature vector of the current layer of the target node includes: According to the relational inner feature vectors of the current layer of the target node under connection edges of each type, calculate the normalized weight values of the current layer of the target node under connection edges of each type; Based on the normalized weight values of the current layer of the target node under connection edges of each type, perform weighted summation on the relational inner feature vectors of the current layer of the target node under connection edges of each type, to obtain the global feature vector of the current layer of the target node.

9. A content item recommendation device, characterized in that, The apparatus includes: An acquisition module, configured to acquire a first directed graph and a second directed graph, where the first directed graph is constructed according to a current behavior sequence, and the first directed graph is used to represent the directed connection relationships among multiple target nodes, the multiple target nodes include multiple decision factor nodes, sequence nodes corresponding to the current behavior sequence, and multiple content nodes corresponding to multiple content items that have been clicked, the second directed graph is constructed according to multiple historical behavior sequences, and the second directed graph is used to represent the directed connection relationships among multiple nodes, the multiple nodes include the multiple target nodes and nodes having directed connection relationships with any target node, and the multiple decision factor nodes include a time node corresponding to the current time, a space node corresponding to the current location, and multiple intention nodes corresponding to the current behavior sequence; A first determination module, configured to determine the local feature vectors of the multiple target nodes based on the feature vectors of the multiple target nodes in the first directed graph, where the local feature vectors incorporate the feature vectors of other target nodes having directed connection relationships with the target node in the first directed graph; A second determination module, configured to determine the global feature vectors of the multiple target nodes based on the feature vectors of the multiple nodes in the second directed graph and the types of the directed connection edges among the multiple nodes, where the global feature vectors incorporate the feature vectors of other nodes having directed connection relationships with the target node in the second directed graph; A third determination module, configured to determine the sequence feature vector corresponding to the current behavior sequence based on the local feature vectors and the global feature vectors of the multiple target nodes, where the sequence feature vector is used to represent the features of the content items preferred in the current scenario; A recommendation module, configured to perform content item recommendation based on the sequence feature vector.

10. A server, characterized in that, The server includes a processor and a memory, and at least one program code is stored in the memory and is loaded and executed by the processor to implement the content item recommendation method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • A session sequence recommendation method and system based on a graph convolutional neural network

    CN109816101A

  • Recommendation method and device based on graph neural network, and computer equipment

    CN111667067A