A method and device for cross-domain recommendation and model training
By establishing a target graph network and collaboratively training deep neural network models, the problem of poor label update and recommendation in cross-domain recommendations is solved, and more efficient user penetration is achieved.
Patent Information
- Application Number
- CN202011176572.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-28
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2040-12-17
AI Technical Summary
The prior art is difficult to achieve real-time update and recommendation of live content tags in cross-domain recommendations, especially due to the low overlap and poor generalization of tags, resulting in low user penetration.
By obtaining consumer account interaction behavior data in different content scenarios, establishing a target graph network, sampling and generating sample data sets, collaborating in training deep neural network models, used to vectorize nodes, and computing the matching degree of vector representations, thereby achieving cross-domain recommendations .
It improves the generalization ability and stability of the model, enhances the effect of cross-domain recommendations, and improves the penetration rate of users in different scenario domains.
Smart Images

Figure CN112307256B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to automated recommendation technology, and more particularly to a method and device for cross-domain recommendation and model training. Background Art
[0002] With the development of Internet technology, more and more users use live broadcast and short video applications to watch live broadcasts or short videos. Although live broadcast scenes and short video scenes belong to different domains and their consumption behavior habits are quite different, they have some common users, called bridge users. If cross-domain recommendations are implemented through the behavioral data of bridge users and users in the two domains of live broadcast and short video, for example, relevant live broadcasts in the live broadcast domain are recommended to some potential users in the short video domain, the penetration of live broadcast users can be improved.
[0003] In the related technology, one method of cross-domain recommendation is to recommend anchors with the same preference tags to potential users in the short video domain through user preference tags. However, since the live broadcast content changes frequently, the corresponding preference tags need to be updated in real time. At present, it is technically difficult to realize the real-time update of live broadcast room tags by machines. On the other hand, the overlap of tags in the two domains is relatively low, the generalization is relatively poor, and the recommendation effect is average. Summary of the invention
[0004] The present application provides a method and device for cross-domain recommendation and model training to improve the recommendation effect of cross-domain recommendation.
[0005] In a first aspect, an embodiment of the present application provides a method for model training, the method comprising:
[0006] Acquire interaction behavior data of each consumer account in at least two content scenarios, and establish a target graph network according to the interaction behavior data;
[0007] Sampling based on the target graph network to generate a sample data set, wherein each sample data in the sample data set includes a source node in the target graph network and a target node generated based on sampling of the source node;
[0008] Based on the sample data set, multiple deep neural network models are collaboratively trained, wherein the deep neural network models include a first deep neural network model for vectorizing source nodes and a second deep neural network model for vectorizing target nodes.
[0009] In a second aspect, an embodiment of the present application further provides a method for cross-domain recommendation, the method comprising:
[0010] Determining vector representations of each consumer account and each provider account in at least two content scenarios, and storing the vector representations;
[0011] When receiving a request sent by a target consumer account in a certain content scenario, searching for a vector representation of the target consumer account from the stored vector representations;
[0012] Calculating the matching degree between the vector representation of the target consumer account and the vector representation of each provider account in other content scenarios;
[0013] According to the matching degree, a target provider account is determined from the provider accounts in the other content scenarios, and the target provider account is recommended to the target consumer account.
[0014] In a third aspect, an embodiment of the present application further provides a model training device, the device comprising:
[0015] A graph network building module, used to obtain interaction behavior data of each consumer account in at least two content scenarios, and to build a target graph network according to the interaction behavior data;
[0016] A sample data generation module, used for performing sampling based on the target graph network to generate a sample data set, wherein each sample data in the sample data set includes a source node in the target graph network and a target node generated based on sampling of the source node;
[0017] A model training module is used to collaboratively train multiple deep neural network models based on the sample data set, wherein the deep neural network models include a first deep neural network model for vectorizing source nodes and a second deep neural network model for vectorizing target nodes.
[0018] In a fourth aspect, an embodiment of the present application further provides a cross-domain recommendation device, the device comprising:
[0019] A vector determination module, configured to determine vector representations of each consumer account and each provider account in at least two content scenarios, and store the vector representations;
[0020] A vector search module, configured to search for a vector representation of a target consumer account from stored vector representations when receiving a request sent by a target consumer account in a certain content scenario;
[0021] A matching degree calculation module, used to calculate the matching degree between the vector representation of the target consumer account and the vector representation of each provider account in other content scenarios;
[0022] A recommendation module is used to determine a target provider account from the provider accounts in the other content scenarios according to the matching degree, and recommend the target provider account to the target consumer account.
[0023] In a fifth aspect, an embodiment of the present application further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the program.
[0024] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and the program implements the above method when executed by a processor.
[0025] This application has the following beneficial effects:
[0026] In this embodiment, a target graph network is established by combining the interactive behavior data of each consumer account in at least two content scenarios, and sampling is performed based on the target graph network to generate a sample data set, each sample data in the sample data set includes a source node in the target graph network, and a target node generated based on the sampling of the source node, thereby enriching the number of samples. Then, multiple deep neural network models are collaboratively trained based on the sample data set, and the deep neural network model includes a first deep neural network model for vectorizing the source node and a second deep neural network model for vectorizing the target node. Through the graph representation algorithm and the multiple deep neural networks trained in collaboration, the hidden high-order relationships between nodes can be mined, and the generalization ability and stability of the model can be improved.
[0027] Furthermore, after determining the vector representations of each consumer account and each provider account in at least two content scenarios through a deep neural network model, when a request sent by a target consumer account in a certain content scenario is received, the vector representation of the target consumer account can be quickly found, and based on the vector representations of each provider account in other content scenarios, the degree of match with the vector representation of the target consumer account is calculated, so as to recall target provider accounts with similar preferences and provide them to the target consumer account, thereby realizing cross-domain recommendations and improving user penetration in different scenario domains. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a flow chart of a method embodiment of a model training provided in Embodiment 1 of the present application;
[0029] Figure 2 It is a flow chart of a method embodiment of model training provided in Embodiment 2 of the present application;
[0030] Figure 3 This is a target graph network diagram provided in Example 2 of the present application;
[0031] Figure 4 This is a schematic diagram of the model training process provided in Example 2 of the present application;
[0032] Figure 5It is a flow chart of a method embodiment of model training provided in Embodiment 3 of the present application;
[0033] Figure 6 This is a flow chart of a method embodiment of a cross-domain recommendation provided in Embodiment 4 of the present application;
[0034] Figure 7 It is a structural block diagram of an embodiment of a model training device provided in Embodiment 5 of the present application;
[0035] Figure 8 This is a structural block diagram of an embodiment of a cross-domain recommendation device provided in Embodiment 6 of the present application;
[0036] Fig. 9 It is a structural diagram of a computer device provided in Example 7 of the present application. DETAILED DESCRIPTION
[0037] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.
[0038] Embodiment 1
[0039] Figure 1 The flowchart of a method embodiment of a model training provided in the first embodiment of the present application may specifically include the following steps:
[0040] Step 101: Obtain interaction behavior data of each consumer account in at least two content scenarios, and establish a target graph network according to the interaction behavior data.
[0041] In one example, the at least two content scenarios may be at least two types of content or at least two functional modules in the same application APP. For example, in a video application, the at least two content scenarios may include a short video scenario for providing short videos, and a live broadcast scenario for providing live broadcasts. This embodiment may be executed by a service process corresponding to the application.
[0042] Interactive behavior data may be behavioral data of interactions of a consumer account in a certain content scenario. For example, in a short video scenario, the interactive behavior data of a consumer account may be behaviors such as users playing, liking, sharing, commenting, and following short videos posted by short video shooters; in a live broadcast scenario, the interactive behavior data of a consumer account may be behaviors such as users watching, paying, and following videos posted by anchors.
[0043] In this embodiment, the interactive behavior data of each consumer account in at least two content scenarios can be combined to establish a target graph network, which may include multiple node types and multiple edge types for representing at least two content scenarios. For example, in the target graph network for two different domains of live broadcasting and short video scenarios, node types such as user, anchor, and photographer can be included, as well as edge types such as watch, pay, follow, like, and share.
[0044] In one implementation, a bridge account belonging to the at least two content scenarios may be found from each account under the at least two content scenarios, and a target graph network may be established based on the bridge account.
[0045] Step 102: Sampling is performed based on the target graph network to generate a sample data set, wherein each sample data in the sample data set includes a source node in the target graph network and a target node generated based on sampling of the source node.
[0046] In this step, after the target graph network is obtained, sample data for model training can be generated according to each node in the target graph network. In order to enrich the amount of sample data, improve the adequacy of model training and improve the accuracy of the model, the target graph network can be sampled, and multiple target nodes can be generated for each source node in the target graph network, wherein the target nodes can include positive sample nodes and negative sample nodes.
[0047] In one embodiment, a deep random walk (such as deep walk) technique can be used to generate the target node. For the positive sample nodes and negative sample nodes in the target node, the following two principles can be satisfied: The first principle is the consistency principle, that is, the negative sample nodes and the positive sample nodes have a consistent distribution, because if the positive sample nodes and the negative sample nodes have different distributions, the model will be "lazy" and tend to remember what the positive sample nodes and the negative sample nodes are, rather than learning the relationship between the nodes. The second principle is the correlation principle, that is, there is a weak correlation between the negative sample nodes and the source nodes, because if the negative sample nodes and the source nodes are completely unrelated, it will cause the model to distinguish positive and negative samples too easily, and the correlation between the source node and the positive sample node is much greater than the correlation between the source node and the negative sample node.
[0048] Step 103: Co-train multiple deep neural network models based on the sample data set, wherein the deep neural network models include a first deep neural network model for vectorizing source nodes and a second deep neural network model for vectorizing target nodes.
[0049] In this step, after obtaining a sample data set consisting of sample data, multiple deep neural network DNN models can be learned according to the sample data in a collaborative training manner. In this embodiment, the DNN model can include a first DNN model for vectorizing source nodes and a second DNN model for vectorizing target nodes.
[0050] In one embodiment, multiple first DNN models can be generated based on combinations of different node types and different edge types, and each first DNN model can be identified by a corresponding node type identifier and edge type identifier. Also, multiple second DNN models can be generated based on different node types, and each second DNN model can be identified by a corresponding node type identifier.
[0051] In this embodiment, a target graph network is established by combining the interactive behavior data of each consumer account in at least two content scenarios, and sampling is performed based on the target graph network to generate a sample data set, each sample data in the sample data set includes a source node in the target graph network, and a target node generated based on the sampling of the source node, thereby enriching the number of samples. Then, multiple deep neural network models are collaboratively trained based on the sample data set, and the deep neural network model includes a first deep neural network model for vectorizing the source node and a second deep neural network model for vectorizing the target node. Through the graph representation algorithm and the multiple deep neural networks trained in collaboration, the hidden high-order relationships between nodes can be mined, and the generalization ability and stability of the model can be improved.
[0052] Embodiment 2
[0053] Figure 2 This is a flow chart of a method embodiment of a model training provided in Embodiment 2 of the present application. This embodiment is described in more detail based on Embodiment 1, and includes the following steps:
[0054] Step 201 : acquiring interaction behavior data of each consumer account in at least two content scenarios, and establishing a target graph network according to the interaction behavior data.
[0055] In one embodiment, the target graph network is a heterogeneous graph. This embodiment can use the interactive behavior data of each consumer account in at least two content scenarios to construct a large-scale target graph network, wherein the target graph network can include multiple node types and multiple edge types.
[0056] In one implementation, assuming that the content scene includes a first content scene and a second content scene located in different scene domains, in one example, the first content scene and the second content scene may be different functional modules or different types of content in the same APP; then step 201 may include the following steps:
[0057] Step 201 - 1 : Acquire first interaction behavior data of each first consumer account in a first content scenario, where the first interaction behavior data includes one or more first interaction behavior types and a first provider account with which the first consumer account interacts.
[0058] For example, Figure 3 As shown in the target graph network diagram, assuming that the first content scenario is a live broadcast scenario, the first provider account interacted with by each first consumer account in the first content scenario can be an anchor account, and one or more first interaction behavior types may include users watching, paying, and following the anchor account.
[0059] In one implementation, the first interaction behavior data of each first consumer account in the first content scenario can be extracted from the log record for the first content scenario or a pre-created behavior database. Of course, other methods can also be used to obtain the behavior data in the scenario, and this embodiment does not limit this.
[0060] Step 201 - 2 : constructing a first heterogeneous graph with the first consumer account and the first provider account as nodes and the one or more first interaction behavior types as edges.
[0061] In this step, the first consumer account and the first provider account may be used as nodes, and various first interaction behavior types may be used as edges to construct a first heterogeneous graph using a graph construction method. Figure 3 The heterogeneous graph of the live broadcast domain shown in Figure 1 is based on user accounts (such as Figure 3 The "U" node shown) and the anchor account (such as Figure 3 The "I" node shown in the figure is used as a node, and the user's viewing, payment, and attention behavior types of the anchor are used as edges to construct a heterogeneous graph of the live broadcast domain, that is, the first heterogeneous graph.
[0062] Step 201 - 3 , obtaining second interaction behavior data of each second consumer account in a second content scenario, wherein the second interaction behavior data includes one or more second interaction behavior types and a second provider account with which the second consumer account interacts.
[0063] In one example, assuming that the second content scenario is a short video scenario, the second provider account that each second consumer account interacts with in the second content scenario may be a photographer account, and one or more second interaction behavior types may include users playing, liking, following, sharing, and commenting on the short video provided by the photographer.
[0064] In one implementation, the second interaction behavior data of each second consumer account in the second content scenario can be extracted from the log record for the second content scenario or a pre-created behavior database. Of course, other methods can also be used to obtain the behavior data in the scenario, and this embodiment does not limit this.
[0065] Step 201 - 4 , constructing a second heterogeneous graph with the second consumer account and the second provider account as nodes and the one or more second interaction behavior types as edges.
[0066] In one implementation, the second heterogeneous graph may be constructed by using each second consumer account and second provider account as nodes and each second interaction behavior type as edges in a graph construction manner. Figure 3 The heterogeneous graph of the short video domain shown in Figure 1 is based on user accounts (such as Figure 3 The "U" node shown in the figure) and the photographer account (such as Figure 3 The "I" node shown in the figure is used as a node, and the user's behavior types such as playing, liking, following, sharing, and commenting on the short videos provided by the photographer are used as edges to construct a heterogeneous graph in the short video domain, that is, the second heterogeneous graph.
[0067] Step 201-5, determining a bridge account from the first heterogeneous graph and the second heterogeneous graph, and connecting the first heterogeneous graph and the second heterogeneous graph into a target graph network according to the bridge account.
[0068] In one example, in the two scene domains of live broadcast scene and short video scene, if the shooter account of the short video scene starts broadcasting, it may become the anchor account in the live broadcast scene, and the anchor in the live broadcast scene can also shoot short videos and upload them to the short video scene. Similarly, a user is a consumer user in the short video scene, and may be an anchor account in the live broadcast scene, and so on. In other words, there may be some common accounts in the scenes of these two different domains. In this embodiment, the common accounts existing in the two scene domains are called bridge accounts.
[0069] By extracting the bridge accounts in the two scenario domains, the first heterogeneous graph can be associated with the second heterogeneous graph, e.g. Figure 3 As shown in the figure, by extracting bridge accounts from the live broadcast domain and the short video domain, the bridge account nodes are connected to other nodes in the live broadcast domain and the short video domain through one or more types of edges, thereby forming a complex target graph network. The target graph network models complex connection relationships and can better learn high-order similarity relationships between various accounts through user behavior data.
[0070] Step 202: Sampling is performed based on the target graph network to generate a sample data set, wherein each sample data in the sample data set includes a source node in the target graph network and a target node generated based on sampling of the source node.
[0071] In this embodiment, after the target graph network is determined, a sample data set for model training can be generated based on the target graph network. The sample data set includes a number of sample data. Each sample data may include a source node in the target graph network and a target node generated by sampling based on the source node. In addition, the sample data may also include attribute information corresponding to the source node and the target node.
[0072] In one implementation, the target node may include a positive sample node and a negative sample node, and step 202 may include the following steps:
[0073] Step 202-1, using a random walk algorithm to walk in the target graph network to obtain a plurality of walk sequences of specified lengths.
[0074] Exemplarily, the random walk algorithm may include a biased random walk algorithm Node2vec Walk. In one example, for the target graph network G=(V P ,E Q ), including nodes of types P and edges of types Q, from each node v∈V P Start walking, for each edge E q , use Node2vec Walk to perform K walks, and each walk can get a walk sequence v of length k 1 →v 2 →...→v k Among them, K and k can be set according to actual needs, and this embodiment does not limit this.
[0075] Step 202-2, sampling in each walk sequence through a sliding window to generate a set of positive example pairs, wherein each positive example pair in the set of positive example pairs includes a source node in the target graph network and a positive sample node corresponding to the source node, wherein the source node and the positive sample node have corresponding attribute information.
[0076] In this step, for each walking sequence, a sliding window of a fixed size can be used to sample each walking sequence, and the nodes in the window are respectively proposed as positive pairs, and the nodes in the window are considered to be highly correlated. In each positive pair, the central node or the first node can be used as the source node, and the other nodes can be used as the positive sample nodes corresponding to the source node.
[0077] For example, assuming that the size of the sliding window is set to 2, the sliding window is used to sample in each walk sequence, and the nodes in the sliding window can form a positive example pair, where each positive example pair can include a source node in the target graph network and a positive sample node corresponding to the source node. For example, the first node in the positive example pair can be regarded as a source node, and the second node can be regarded as a positive sample node of the source node. The positive example pair can be represented as (src_node, pos_node), where src_node represents the source node and pos_node represents the positive sample node. For example, if there are two nodes A and B in the sliding window (window size is 2), A is the source node src_node, and B is the positive sample node.
[0078] Step 202-3, for each positive example pair, a plurality of negative sample nodes are generated using a weighted negative sampling method, wherein the negative sample nodes have a consistent distribution with the corresponding positive sample nodes, and the negative sample nodes are weakly correlated with the corresponding source nodes; and the negative sample nodes have corresponding attribute information.
[0079] In this step, for each positive example pair obtained in step 202-2, a negative sampling algorithm may be used to generate M negative sample nodes. In this embodiment, since the distance of the vector is sensitive, there are two principles for weighted negative sampling:
[0080] One is the consistency principle, that is, the negative sample nodes obtained by negative sampling have the same distribution as the corresponding positive sample nodes. Because if the positive and negative nodes have different distributions, the model will be "lazy" and tend to remember what the positive and negative nodes are, rather than learning the relationship between the nodes. In one embodiment, the Alias Method can be used for weighted negative sampling to ensure the consistency of the negative sample nodes and the positive sample nodes.
[0081] Another correlation principle is that the negative sample node is weakly correlated with the corresponding source node. If the negative sample node is completely unrelated to the source node, the model will easily distinguish between positive and negative samples. In one embodiment, auxiliary information or attribute information (side information) can be used to ensure that there is a weak correlation between the negative sample node and the source node. For example, the negative sample node and the source node can be set to the same attributes such as country or language, so that the two have a weak correlation.
[0082] Step 202 - 4 , organizing the source node, the positive sample node, the multiple negative sample nodes and the corresponding attribute information in the current positive example pair into sample data.
[0083] In this embodiment, a source node has a positive sample node and M negative sample nodes, with a total of (M+1) target nodes. Then a sample data can be represented as: (src_node, pos_node, {neg_node}M), where neg_node is a negative sample node. Or,
[0084] A piece of sample data can be expressed as (src_node,{dst_node}M+1). In addition to the node identifier, each node can also include attribute information used to describe the node, such as the country, gender, age, etc. of the anchor or photographer. Compared with the node identifier, these attribute information have good generalization ability and can help improve the stability of the model.
[0085] For example, Figure 4 As shown in Figure 1, for each source node of the target graph network, a random walk can be used to generate a positive sample node pos, and then a negative sampling method is used to obtain multiple negative sample nodes neg. Each node uses a node ID and corresponding attribute information (attr 1 ,attr 2 , ..., attr n ) to describe.
[0086] Step 203 : according to the node type and edge type corresponding to each sample data, the sample data with the same node type and edge type are aggregated to obtain a plurality of first subsets.
[0087] According to the above steps 202-1 to 202-2, since the positive example pairs are generated by sliding windows in the walking sequence, there is an associated edge between the source node and the target node in the positive example pair. The edge type of the edge connecting the source node and the target node is the edge type corresponding to the sample data. Moreover, since there is a strong correlation between the source node and the positive sample node, the node type of the source node can be used as the node type of the sample data.
[0088] In this embodiment, after obtaining the sample data set, the sample data in the sample data set can be aggregated according to the node type and edge type, that is, the sample data with the same node type and edge type can be aggregated into a first subset, and finally multiple first subsets can be obtained.
[0089] Step 204: For each first subset, according to the source nodes of each sample data in the current first subset and the corresponding first attribute information, train the corresponding first deep neural network model, wherein the first deep neural network model is identified by the node type identifier and the edge type identifier of the current first subset.
[0090] In this step, for each first subset, the corresponding first DNN model can be trained according to the source nodes of each sample data in the current first subset and the corresponding first attribute information, and the first DNN model is identified by the node type identifier and edge type identifier of the current first subset. The first DNN model is used to embed source nodes of the same node type and edge type.
[0091] For example, assuming that the node type of the first subset is p and the edge type is q, the source nodes and the corresponding first attribute information (such as Figure 4 The first DNN model is trained by Among them, src represents the source node, p represents the node type is p, q represents the edge type is q, Used to vectorize source nodes in sample data with node type p and edge type q.
[0092] Assume that the target graph network is G = (V P ,E Q ), including a number of node types of P and a number of edge types of Q. By performing different combinations of node types and edge types in steps 203 and 204, P*Q first subsets and P*Q first DNN models can be obtained.
[0093] Step 205 : according to the node type corresponding to each sample data, the sample data with the same node type are aggregated to obtain a plurality of second subsets.
[0094] In this embodiment, in order to ensure that the vectors obtained by the same node through different types of edge embedding can be mapped to the same low-dimensional space, all target nodes (i.e., positive nodes and negative nodes) can share the same DNN network in all types of edge relationships. Therefore, after obtaining the sample data set, the sample data in the sample data set can be aggregated according to the node type, that is, the sample data with the same node type can be aggregated into a second subset, and finally multiple second subsets can be obtained.
[0095] Step 206: For each second subset, according to the target node of each sample data in the current second subset and the corresponding second attribute information, train the corresponding second deep neural network model, wherein the second deep neural network model is identified by the node type identifier of the current second subset.
[0096] In this step, for each second subset, the corresponding second DNN model can be trained according to the target nodes (including positive sample nodes and multiple negative sample nodes) of each sample data in the current second subset and the corresponding second attribute information (including the attribute information of the positive sample nodes and the attribute information of each negative sample node), and the second DNN model is identified by the node type identifier of the current second subset, and the second DNN model is used for embedding target nodes of the same node type.
[0097] For example, assuming that the node type of the second subset is p, the target node in all sample data of the second subset and the corresponding second attribute information (such as Figure 4 The "pos" and "neg 1 、neg 2 、…neg k ”) to train the second DNN model Among them, dst represents the target node, p represents the node type p, Used to vectorize the target node in the sample data of node type p.
[0098] Assume that the target graph network is G = (V P ,E Q ), including a number of node types of P, by dividing the node types in steps 205 and 206, P second subsets and P second DNN models can be obtained.
[0099] Step 207: For each sample data, determine the source node vector representation of the sample data through the first deep neural network model that matches the current sample data, and determine the target node vector representation of the sample data through the second deep neural network model that matches the current sample data.
[0100] After obtaining P*Q+P DNN models through the above steps, for each sample data, the source node vector representation of the current sample data can be determined by the matching first DNN model, and the target node vector representation of the current sample data can be determined by the matching second DNN model.
[0101] In one implementation, step 207 may include the following steps:
[0102] Step 207-1, for each sample data, search for a matching first deep neural network model according to the node type and edge type corresponding to the current sample data, and search for a matching second deep neural network model according to the node type corresponding to the current sample data.
[0103] In this step, after the first DNN model and the second DNN model are initially generated, the corresponding first DNN model and the second DNN model can be verified using sample data. Specifically, for each sample data, a first DNN model with the same node type and edge type can be searched according to the node type and edge type corresponding to the current sample data as the matching first DNN model; and a second DNN model with the same node type can be searched according to the node type corresponding to the current sample data as the matching second deep neural network model.
[0104] Step 207-2: Input the source node of the current sample data and the corresponding first attribute information into the matching first deep neural network model to obtain the source node vector representation corresponding to the source node of the current sample data.
[0105] In this step, after determining the first DNN model that matches the current sample data, the source node of the current sample data and the corresponding first attribute information can be input into the matching first DNN model, processed by the first DNN model, and the source node vector representation corresponding to the source node of the current sample data is output.
[0106] Step 207-3: Input the target node of the current sample data and the corresponding second attribute information into the corresponding second deep neural network model to obtain the target node vector representation corresponding to the target node of the current sample data.
[0107] In this step, after determining the second DNN model that matches the current sample data, the target node of the current sample data and the corresponding second attribute information can be input into the matching second DNN model, processed by the second DNN model, and the target node vector representation corresponding to the target node of the current sample data is output.
[0108] Furthermore, since the target node may include a positive sample node and multiple negative sample nodes, the target node vector representation may include a positive vector representation corresponding to the positive sample node, and a negative vector representation corresponding to the negative sample node. That is, by inputting the positive sample node of the current sample data and the corresponding attribute information into the matching second DNN model, the positive vector representation corresponding to the positive sample node output by the second DNN model can be obtained, and by inputting each negative sample node of the current sample data and the corresponding attribute information into the matching second DNN model, the negative vector representation corresponding to each negative sample node output by the second DNN model can be obtained.
[0109] Step 208: Determine the difference between the source node vector representation and the target node vector representation of the current sample data.
[0110] In this step, the difference value may represent the degree of difference between the source node and the target node. In one embodiment, step 208 may include the following steps:
[0111] Step 208-1, calculating a first similarity between the source node vector representation and the forward vector representation.
[0112] In one embodiment, the Cosine distance can be used to characterize the similarity between nodes. For example, the following formula can be used to calculate the first similarity between the source node vector representation and the positive vector representation in each sample data:
[0113]
[0114] Where v∈V p represents the source node, v'∈V p' represents a positive sample node, represents the source node vector representation, represents the positive vector representation, η represents the similarity weight, Indicates the first similarity.
[0115] Step 208-2: Calculate the second similarity between the source node vector representation and each negative vector representation.
[0116] For example, the second similarity between the source node vector representation and each negative vector representation in each sample data may be calculated using the following formula:
[0117]
[0118] Where v∈V p represents the source node, v”∈V p' represents a negative sample node, represents the source node vector representation, represents the negative vector representation, η represents the similarity weight, Indicates the second similarity.
[0119] Step 208 - 3 : Calculate the difference between the source node vector representation and the target node vector representation according to the first similarity and each second similarity.
[0120] For example, based on the first similarity and each second similarity, the following formula can be used to calculate the difference between the source node vector representation and the target node vector representation:
[0121]
[0122] Step 209: Determine the optimization target according to the difference value of each sample data.
[0123] In this step, after the difference value of each sample data in the sample data set is determined, the Softmax cross entropy Loss can be used as the Relevance optimization target according to each difference value.
[0124] For example, the optimization target O of the DNN model can be calculated using the following formula: rel :
[0125]
[0126] Where N represents the number of samples in the sample data set.
[0127] Step 210: Converging each first deep neural network model and each second deep neural network model according to the optimization objective.
[0128] In this step, after the optimization target is determined, the optimization target can be used to perform convergence optimization on each first DNN model and each second DNN model so that the loss of each first DNN model and each second DNN model is minimized.
[0129] In this embodiment, after sampling the target graph network constructed according to the interactive behavior data of each consumer account in at least two content scenarios to obtain a sample data set, the sample data with the same node type and edge type are aggregated according to the node type and edge type corresponding to each sample data to obtain multiple first subsets, and the source node of each sample data of each first subset and the corresponding first attribute information are used to train the corresponding first deep neural network model for vectorizing the source node. At the same time, multiple second subsets are obtained by aggregating according to the node type corresponding to each sample data, and the target node of each sample data of each second subset and the corresponding second attribute information are used to train the corresponding second deep neural network model for vectorizing the target node, and then the first deep neural network model matched by each sample data is used to determine the source node vector representation of the sample data, and the target node vector representation of the sample data is determined by the second deep neural network model matched by the current sample data, and the optimization target is determined by characterizing the difference between the source node vector representation and the target node vector representation, and then the first deep neural network model and the second deep neural network model are converged and optimized according to the optimization target, so as to improve the accuracy of the first deep neural network model and the second deep neural network model.
[0130] Embodiment 3
[0131] Figure 5 This is a flowchart of a method embodiment of a model training provided in Embodiment 3 of the present application. This embodiment is described in more detail based on Embodiment 1, and includes the following steps:
[0132] Step 501: Obtain interaction behavior data of each consumer account in at least two content scenarios, and establish a target graph network according to the interaction behavior data.
[0133] Step 502: Sampling is performed based on the target graph network to generate a sample data set, wherein each sample data in the sample data set includes a source node in the target graph network and a target node generated based on sampling of the source node.
[0134] Step 503: Co-train multiple deep neural network models based on the sample data set, wherein the deep neural network model includes a first deep neural network model for vectorizing source nodes and a second deep neural network model for vectorizing target nodes.
[0135] Step 504: Determine, based on the first deep neural network model, vector representations of each consumer account and each provider account in at least two content scenarios.
[0136] In this step, after the training of each first deep neural network model is completed, the first deep neural network model can be used to vectorize the corresponding sample data in the sample data set to obtain the source node vector representation of each source node as the vector representation of the consumer account or each provider account.
[0137] Step 505 : Send the vector representation of each consumer account and each provider account to an online service for storage.
[0138] In this step, after the vector representation of each consumer account and each provider account is obtained, the vector representation of each consumer account and each provider account may be sent to the online service and stored by the online service.
[0139] In one example, when an online service receives a request sent by a target consumer account in a certain content scenario, it searches for a vector representation of the target consumer account from stored vector representations; calculates the degree of match between the vector representation of the target consumer account and the vector representations of each provider account in other content scenarios, and then determines a target provider account from each provider account in other content scenarios based on the degrees of match, and recommends the target provider account to the target consumer account.
[0140] In this embodiment, the behavioral relationship between at least two scenario domains is directly modeled through a graph network, which realizes the construction of complex association relationships between different accounts in different scenario domains in a heterogeneous graph, and then the different accounts in different scenario domains are mapped to the same vector space through graph sampling and a neural network model. Due to the efficient fusion of the behavioral relationships between different scenario domains, users who are not originally in the domain can also learn the preference information of the domain. Then, by sending the vector representations of each consumer account and each provider account in at least two content scenarios to the online service for storage, the online service can quickly calculate the correlation between different types of accounts, thereby realizing cross-domain recommendations.
[0141] Embodiment 4
[0142] Figure 6 This is a flow chart of a method embodiment of a cross-domain recommendation provided in Embodiment 4 of the present application. This embodiment is described on the online service side and includes the following steps:
[0143] Step 601: determine vector representations of each consumer account and each provider account in at least two content scenarios, and store the vector representations.
[0144] In one implementation, the online service can receive vector representations of each consumer account and each provider account in at least two content scenarios from the APP side. Specifically, after the service process on the APP side learns the first DNN model according to any one of Embodiments 1 to 3, it vectorizes each source node in the target graph network according to the first DNN model, and each source node represents each consumer account and each provider account in at least two content scenarios. After the service process obtains the vector representation of each consumer account and each provider account, it sends it to the online service. The online service then stores the received vector representations locally or in other storage areas.
[0145] In order to be able to quickly find the vector representation of the consumer account later, in one embodiment, the online service may store the vector representation of the consumer account and the vector representation of the provider account separately. For example, the vector representation of the consumer account for the live broadcast scene and the short video scene is stored in one place, and the vector representation of the provider account is stored in another place. For example, the vector representation of the consumer account can be stored locally, and the vector representation of the provider account can be stored in an ANN (Approximate Nearest Neighbor) engine.
[0146] In other implementations, the online service may also store consumer accounts and provider accounts of different scenario domains separately. For example, the consumer accounts of the live broadcast scenario are stored separately from the consumer accounts of the short video scenario, and the provider accounts of the live broadcast scenario are stored separately from the provider accounts of the short video scenario.
[0147] Of course, this embodiment is not limited to the above storage method, and those skilled in the art may adopt other storage methods according to actual needs.
[0148] Step 602: When a request is received from a target consumer account in a certain content scenario, a vector representation of the target consumer account is searched from the stored vector representations.
[0149] In this embodiment, when the online service receives a request sent by a target consumer account in a certain content scenario, the vector representation of the target consumer account can be searched from the vector representations of all stored consumer accounts according to the target consumer account.
[0150] Step 603: Calculate the matching degree between the vector representation of the target consumer account and the vector representation of each provider account in other content scenarios.
[0151] In one embodiment, after the online service determines the vector representation of the target consumer account, the vector representation of the target consumer account and the identifier of the corresponding content scenario can be sent to the ANN engine, and the ANN engine calculates the matching degree between the vector representation of the target consumer account and the vector representations of each provider account in other content scenarios.
[0152] Step 604: Determine a target provider account from the provider accounts in the other content scenarios according to the matching degree, and recommend the target provider account to the target consumer account.
[0153] In one embodiment, after the ANN engine determines the degree of match between the vector representation of the target consumer account and the vector representations of each provider account in other content scenarios, the K (i.e., topK) provider accounts with the greatest matching degrees may be used as target provider accounts, and then the target provider accounts are returned to the online service, which then recommends the target provider account or the content provided by the target provider account to the target consumer account.
[0154] For example, when an online service receives a request from a short video user, it can look up the vector representation corresponding to the short video user and send the vector representation corresponding to the short video user to the ANN engine. The ANN engine then recalls the K preferred anchors, thereby recommending anchors in the live broadcast domain to potential cross-domain users, thereby increasing the live broadcast user penetration rate, user payment rate, user viewing time, the number of anchors followed by users, etc.
[0155] In this embodiment, the online service receives and stores vector representations of each consumer account and each provider account in at least two content scenarios. When receiving a request sent by a target consumer account in a certain content scenario, the online service can quickly find the vector representation of the target consumer account, and calculate the degree of match with the vector representation of the target consumer account based on the vector representations of each provider account in other content scenarios, so as to recall target provider accounts with similar preferences and provide them to the target consumer account, thereby realizing cross-domain recommendations and improving user penetration in different scenario domains.
[0156] Embodiment 5
[0157] Figure 7 This is a structural block diagram of a model training device embodiment provided in Embodiment 5 of the present application. The model training device may be located in an application and may include the following modules:
[0158] A graph network building module 701 is used to obtain interaction behavior data of each consumer account in at least two content scenarios, and to build a target graph network according to the interaction behavior data;
[0159] A sample data generation module 702 is used to perform sampling based on the target graph network to generate a sample data set, wherein each sample data in the sample data set includes a source node in the target graph network and a target node generated based on sampling of the source node;
[0160] The model training module 703 is used to collaboratively train multiple deep neural network models based on the sample data set, wherein the deep neural network models include a first deep neural network model for vectorizing source nodes and a second deep neural network model for vectorizing target nodes.
[0161] In one embodiment, the target graph network includes multiple node types and multiple edge types; the sample data also includes: the node type and edge type corresponding to the current sample data, and the first attribute information of each source node;
[0162] The model training module 703 may include the following submodules:
[0163] A first subset determination submodule, for aggregating sample data with the same node type and edge type according to the node type and edge type corresponding to each sample data, to obtain multiple first subsets;
[0164] The first model training submodule is used to train the corresponding first deep neural network model for each first subset according to the source nodes of each sample data in the current first subset and the corresponding first attribute information, wherein the first deep neural network model is identified by the node type identifier and edge type identifier of the current first subset.
[0165] In one implementation, the sample data further includes: second attribute information of each target node; the model training module 703 may further include the following submodules:
[0166] A second subset determination submodule is used to aggregate sample data with the same node type according to the node type corresponding to each sample data to obtain multiple second subsets;
[0167] The second model training submodule is used to train the corresponding second deep neural network model for each second subset according to the target node of each sample data in the current second subset and the corresponding second attribute information, wherein the second deep neural network model is identified by the node type identifier of the current second subset.
[0168] In one implementation, the model training module 703 may further include the following submodules:
[0169] A vector acquisition submodule is used to determine, for each sample data, a source node vector representation of the sample data through a first deep neural network model matched with the current sample data, and to determine a target node vector representation of the sample data through a second deep neural network model matched with the current sample data;
[0170] A difference value determination submodule, used to determine the difference value between the source node vector representation and the target node vector representation of the current sample data;
[0171] The optimization target determination submodule is used to determine the optimization target according to the difference value of each sample data;
[0172] The model convergence submodule is used to converge each first deep neural network model and each second deep neural network model according to the optimization objective.
[0173] In one implementation, the vector acquisition submodule is specifically used for:
[0174] For each sample data, searching for a matching first deep neural network model according to the node type and edge type corresponding to the current sample data, and searching for a matching second deep neural network model according to the node type corresponding to the current sample data;
[0175] Inputting the source node of the current sample data and the corresponding first attribute information into the matched first deep neural network model to obtain a source node vector representation corresponding to the source node of the current sample data;
[0176] The target node of the current sample data and the corresponding second attribute information are input into the corresponding second deep neural network model to obtain the target node vector representation corresponding to the target node of the current sample data.
[0177] In one embodiment, the target node includes a positive sample node and a plurality of negative sample nodes, and the target node vector representation includes a positive vector representation corresponding to the positive sample node and a negative vector representation corresponding to the negative sample node;
[0178] The difference value determination submodule is specifically used for:
[0179] Calculating a first similarity between the source node vector representation and the forward vector representation;
[0180] Calculating a second similarity between the source node vector representation and each negative vector representation;
[0181] The difference value between the source node vector representation and the target node vector representation is calculated according to the first similarity and each second similarity.
[0182] In one implementation, the sample data generation module 702 includes:
[0183] A walking submodule, used for walking in the target graph network using a random walking algorithm to obtain a plurality of walking sequences of specified lengths;
[0184] A positive example pair generation submodule, used for sampling in each walk sequence through a sliding window to generate a set of positive example pairs, wherein each positive example pair includes a source node in the target graph network and a positive sample node corresponding to the source node, wherein the source node and the positive sample node have corresponding attribute information;
[0185] A negative sampling submodule, for each positive example pair, generates a plurality of negative sample nodes using a weighted negative sampling method, wherein the negative sample nodes have a consistent distribution with the corresponding positive sample nodes, and the negative sample nodes are weakly correlated with the corresponding source nodes; and the negative sample nodes have corresponding attribute information;
[0186] The sample organization submodule is used to organize the source node, positive sample node, multiple negative sample nodes and corresponding attribute information in the current positive example pair into sample data.
[0187] In one embodiment, the content scene includes a first content scene and a second content scene;
[0188] The graph network building module 701 includes:
[0189] A first interaction data acquisition submodule is used to acquire first interaction behavior data of each first consumer account in a first content scenario, wherein the first interaction behavior data includes one or more first interaction behavior types and a first provider account interacted with by the first consumer account;
[0190] A first heterogeneous graph construction submodule, configured to construct a first heterogeneous graph using the first consumer account and the first provider account as nodes and the one or more first interaction behavior types as edges;
[0191] A second interaction data acquisition submodule, configured to acquire second interaction behavior data of each second consumer account in a second content scenario, wherein the second interaction behavior data includes one or more second interaction behavior types and a second provider account interacting with the second consumer account;
[0192] A second heterogeneous graph construction submodule, configured to construct a second heterogeneous graph using the second consumer account and the second provider account as nodes and the one or more second interaction behavior types as edges;
[0193] The heterogeneous graph connection submodule is used to determine a bridge account from the first heterogeneous graph and the second heterogeneous graph, and connect the first heterogeneous graph and the second heterogeneous graph into a target graph network according to the bridge account.
[0194] In one embodiment, the device further comprises:
[0195] An account vector determination module, configured to determine vector representations of each consumer account and each provider account in at least two content scenarios according to the first deep neural network model;
[0196] An account vector sending module is used to send the vector representations of each consumer account and each provider account to an online service for storage. The online service is used to, when receiving a request sent by a target consumer account in a certain content scenario, search for the vector representation of the target consumer account from the stored vector representations; calculate the matching degree between the vector representation of the target consumer account and the vector representations of each provider account in other content scenarios; determine a target provider account from each provider account in the other content scenarios based on the matching degree, and recommend the target provider account to the target consumer account.
[0197] It should be noted that the above-mentioned device provided in the embodiments of the present application can execute the method provided in any one of embodiments 1 to 3 of the present application, and has the corresponding functional modules and beneficial effects of the execution method.
[0198] Embodiment 6
[0199] Figure 8 This is a structural block diagram of an embodiment of a cross-domain recommendation device provided in Embodiment 6 of the present application. The model training device may be located in an online service and may include the following modules:
[0200] A vector determination module 801, configured to determine vector representations of each consumer account and each provider account in at least two content scenarios, and store the vector representations;
[0201] A vector search module 802 is configured to search for a vector representation of a target consumer account from stored vector representations when receiving a request sent by the target consumer account in a certain content scenario;
[0202] A matching degree calculation module 803 is used to calculate the matching degree between the vector representation of the target consumer account and the vector representation of each provider account in other content scenarios;
[0203] The recommendation module 804 is configured to determine a target provider account from among the provider accounts in the other content scenarios according to the matching degree, and recommend the target provider account to the target consumer account.
[0204] It should be noted that the above-mentioned device provided in the embodiment of the present application can execute the method provided in the fourth embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.
[0205] Embodiment 7
[0206] Fig. 9 A schematic diagram of the structure of a computer device provided in Embodiment 7 of the present application is shown in FIG. Fig. 9 As shown, the computer device includes a processor 901, a memory 902, an input device 903 and an output device 904; the number of processors 901 in the computer device can be one or more. Fig. 9 A processor 901 is taken as an example; the processor 901, memory 902, input device 903 and output device 904 in the computer device can be connected by a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.
[0207] The memory 902 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the method embodiments in the embodiments of the present application. The processor 901 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 902, that is, implementing the above method.
[0208] The memory 902 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 902 may further include a memory remotely arranged relative to the processor 901, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0209] The input device 903 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the computer device. The output device 904 may include display devices such as a display screen.
[0210] Embodiment 8
[0211] Embodiment 8 of the present application further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the method in any one of Embodiments 1 to 4 when executed by a processor of a server.
[0212] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present application can be implemented with the help of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0213] It is worth noting that in the embodiment of the above-mentioned device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.
[0214] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A cross-domain recommendation method, characterized in that: The method comprises: Acquire interaction behavior data of each consumer account in at least two content scenarios, and establish a target graph network according to the interaction behavior data; Sampling based on the target graph network to generate a sample data set, wherein each sample data in the sample data set includes a source node in the target graph network and a target node generated based on sampling of the source node; Collaboratively training a plurality of deep neural network models based on the sample data set, wherein the deep neural network models include a first deep neural network model for vectorizing source nodes, and a second deep neural network model for vectorizing target nodes; The obtaining of interaction behavior data of each consumer account in at least two content scenarios and establishing a target graph network according to the interaction behavior data includes: Finding a bridge account belonging to the at least two content scenarios from each account under the at least two content scenarios, and establishing a target graph network according to the bridge account; Wherein, after collaboratively training a plurality of deep neural network models based on the sample data set, the method further includes: Determine, according to the first deep neural network model, vector representations of each consumer account and each provider account in at least two content scenarios; The vector representations of each consumer account and each provider account are sent to an online service for storage. The online service is used to search for the vector representation of the target consumer account from the stored vector representations when receiving a request sent by a target consumer account in a certain content scenario; calculate the matching degree between the vector representation of the target consumer account and the vector representations of each provider account in other content scenarios; determine a target provider account from each provider account in the other content scenarios based on the matching degree, and recommend the target provider account to the target consumer account.
2. The method according to claim 1, characterized in that The target graph network includes multiple node types and multiple edge types; the sample data also includes: the node type and edge type corresponding to the current sample data, and the first attribute information of each source node; The collaborative training of multiple deep neural network models based on the sample data set includes: According to the node type and edge type corresponding to each sample data, the sample data with the same node type and edge type are aggregated to obtain multiple first subsets; For each first subset, according to the source node of each sample data in the current first subset and the corresponding first attribute information, train a corresponding first deep neural network model, wherein the first deep neural network model is identified by the node type identifier and the edge type identifier of the current first subset; The attribute information includes at least one of the country, gender or age of the anchor and / or photographer.
3. The method according to claim 2, characterized in that The sample data further includes: second attribute information of each target node; the collaborative training of multiple deep neural network models based on the sample data set also includes: According to the node type corresponding to each sample data, the sample data with the same node type are aggregated to obtain multiple second subsets; For each second subset, a corresponding second deep neural network model is trained according to the target node of each sample data in the current second subset and the corresponding second attribute information, wherein the second deep neural network model is identified by the node type identifier of the current second subset.
4. The method according to claim 3, characterized in that The collaborative training of multiple deep neural network models based on the sample data set also includes: For each sample data, determine the source node vector representation of the sample data through the first deep neural network model matched with the current sample data, and determine the target node vector representation of the sample data through the second deep neural network model matched with the current sample data; Determine the difference between the source node vector representation and the target node vector representation of the current sample data; Determine the optimization target based on the difference value of each sample data; Converging each first deep neural network model and each second deep neural network model according to the optimization objective; Determining the optimization target according to the difference value of each sample data includes: Softmax cross entropy Loss is used as the optimization target according to each difference value.
5. The method according to claim 4, characterized in that The method of determining, for each sample data, a source node vector representation of the sample data by a first deep neural network model matched with the current sample data, and determining a target node vector representation of the sample data by a second deep neural network model matched with the current sample data, comprises: For each sample data, searching for a matching first deep neural network model according to the node type and edge type corresponding to the current sample data, and searching for a matching second deep neural network model according to the node type corresponding to the current sample data; Inputting the source node of the current sample data and the corresponding first attribute information into the matched first deep neural network model to obtain a source node vector representation corresponding to the source node of the current sample data; The target node of the current sample data and the corresponding second attribute information are input into the corresponding second deep neural network model to obtain the target node vector representation corresponding to the target node of the current sample data.
6. The method according to claim 4 or 5, characterized in that: The target node includes a positive sample node and a plurality of negative sample nodes, and the target node vector representation includes a positive vector representation corresponding to the positive sample node and a negative vector representation corresponding to the negative sample node; The step of determining the difference between the source node vector representation and the target node vector representation of the current sample data includes: Calculating a first similarity between the source node vector representation and the forward vector representation; Calculating a second similarity between the source node vector representation and each negative vector representation; The difference value between the source node vector representation and the target node vector representation is calculated according to the first similarity and each second similarity.
7. The method according to any one of claims 1 to 5, characterized in that: The step of performing sampling based on the target graph network to generate a sample data set includes: A random walk algorithm is used to walk in the target graph network to obtain multiple walk sequences of specified lengths; Sampling in each walk sequence through a sliding window to generate a set of positive example pairs, wherein each positive example pair includes a source node in the target graph network and a positive sample node corresponding to the source node, wherein the source node and the positive sample node have corresponding attribute information; For each positive example pair, a weighted negative sampling method is used to generate multiple negative sample nodes, wherein the negative sample nodes have a consistent distribution with the corresponding positive sample nodes, and the negative sample nodes are weakly correlated with the corresponding source nodes; the negative sample nodes have corresponding attribute information; The source node, positive sample node, multiple negative sample nodes and corresponding attribute information in the current positive example pair are organized into sample data.
8. The method according to any one of claims 1 to 5, characterized in that: The content scene includes a first content scene and a second content scene; The obtaining of interaction behavior data of each consumer account in at least two content scenarios and establishing a target graph network according to the interaction behavior data includes: Acquire first interaction behavior data of each first consumer account in a first content scenario, where the first interaction behavior data includes one or more first interaction behavior types and a first provider account interacted with by the first consumer account; Constructing a first heterogeneous graph by taking the first consumer account and the first provider account as nodes and taking the one or more first interaction behavior types as edges; Acquire second interaction behavior data of each second consumer account in a second content scenario, where the second interaction behavior data includes one or more second interaction behavior types and a second provider account interacted with by the second consumer account; Constructing a second heterogeneous graph by taking the second consumer account and the second provider account as nodes and taking the one or more second interaction behavior types as edges; Determine a bridge account from the first heterogeneous graph and the second heterogeneous graph, and connect the first heterogeneous graph and the second heterogeneous graph into a target graph network according to the bridge account; The determining of the bridge account from the first heterogeneous graph and the second heterogeneous graph includes: The same account existing in the first heterogeneous graph and the second heterogeneous graph is determined as a bridge account.
9. A cross-domain recommendation device, characterized in that: The device comprises: A graph network building module, used to obtain interaction behavior data of each consumer account in at least two content scenarios, and to build a target graph network according to the interaction behavior data; A sample data generation module, used for performing sampling based on the target graph network to generate a sample data set, wherein each sample data in the sample data set includes a source node in the target graph network and a target node generated based on sampling of the source node; A model training module, used for collaboratively training multiple deep neural network models based on the sample data set, wherein the deep neural network models include a first deep neural network model for vectorizing source nodes and a second deep neural network model for vectorizing target nodes; The obtaining of interaction behavior data of each consumer account in at least two content scenarios and establishing a target graph network according to the interaction behavior data includes: Finding a bridge account belonging to the at least two content scenarios from each account under the at least two content scenarios, and establishing a target graph network according to the bridge account; Wherein, the device further comprises: An account vector determination module, configured to determine vector representations of each consumer account and each provider account in at least two content scenarios according to the first deep neural network model; An account vector sending module is used to send the vector representations of each consumer account and each provider account to an online service for storage. The online service is used to, when receiving a request sent by a target consumer account in a certain content scenario, search for the vector representation of the target consumer account from the stored vector representations; calculate the matching degree between the vector representation of the target consumer account and the vector representations of each provider account in other content scenarios; determine a target provider account from each provider account in the other content scenarios based on the matching degree, and recommend the target provider account to the target consumer account.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Method and device for constructing cross-domain migration depth network
CN107609116A
A core user mining method and system based on a deep neural network and a graph network
CN109597844A
