Model training method and device based on relation network, and representation determination method and device

By training an attention model in a social relationship network, selecting and propagating the representations of neighboring user nodes, the problem of high noise in social relationship networks is solved, and more reliable information propagation and aggregation are achieved.

CN115936057BActive Publication Date: 2026-06-12ALIPAY (HANGZHOU) INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
Filing Date
2022-12-02
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

The presence of significant noise in social networks and the unreliability of social relationships negatively impact the accuracy of information dissemination and aggregation.

Method used

By using a relational network-based attention model training method, neighboring user nodes are selected, and the representations of neighboring nodes are propagated using a graph neural network to construct predicted associations. The model is then updated using predictive loss to gradually improve the credibility of neighboring user nodes.

🎯Benefits of technology

It improves the credibility of social relationships, reduces noise, and enhances the accuracy of information dissemination and aggregation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115936057B_ABST
    Figure CN115936057B_ABST
Patent Text Reader

Abstract

The embodiment of the present specification provides a model training method and device based on a relationship network, and a representation determination method and device. In the method, a neighbor user node of a user node is selected through an attention model, so as to determine a selected adjacency matrix of the relationship network by using the selected neighbor user node. Then, through a graph neural network, the neighbor node representation is propagated to the corresponding user node based on the selected adjacency matrix, to obtain a user aggregation representation; the similarity between the user aggregation representation and the object representation is used to fit the click behavior between the user and the object, so as to construct a prediction loss with the difference between the existing click behavior, and update the attention model. The trained attention model can select more reliable neighbor users. Then, the attention model is used for multi-path representation aggregation of the user and the commodity, and a multi-representation aggregation model is trained by using self-supervision, to obtain the final user representation and commodity representation, and then the similarity between the user representation and the commodity representation is used to fit the click probability of the user on the commodity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and more particularly to a model training method, representation determination method and apparatus based on relational networks. Background Technology

[0002] Graph learning models have achieved remarkable success in fields such as biomedicine, product recommendation, and social relationship mining. Data in these fields is interconnected through the structure of relational networks. Currently, the goal is to extract useful information from these networks. Relational networks can be used for various applications, and the social relationships within them can enrich the representation of users with limited behavior. However, social relationships are not entirely reliable and contain significant noise.

[0003] Therefore, we hope to find an improved solution that can extract more trustworthy social relationships from social networks, and then use these trustworthy social relationships for information dissemination and aggregation. Summary of the Invention

[0004] This specification describes one or more embodiments of a model training method, representation determination method, and apparatus based on a relational network, to extract more credible social relationships from a social relational network, thereby enabling information dissemination and aggregation based on credible social relationships. The specific technical solution is as follows.

[0005] In a first aspect, the embodiment provides a method for training an attention model based on neighboring users in a relational network, wherein the first relational network includes multiple user nodes and multiple object nodes, as well as edges representing the association relationships between different nodes; the method includes:

[0006] Using the attention model, based on the user node representation in the first relational network, the neighboring user nodes of the user node are selected to obtain the selection attention of the user node to its neighboring user nodes, and a selection adjacency matrix containing the information in the selection attention is determined among multiple user nodes.

[0007] Using a graph neural network, based on the selected adjacency matrix, the neighbor node representations in the first relational network are propagated to the corresponding user nodes to obtain the first user aggregate representation of the user nodes.

[0008] Based on the first user aggregation representation and the object representation in the first relationship network, a first predicted association relationship between user nodes and object nodes is determined.

[0009] Based on the difference between the first predicted association and the first existing association, a first predicted loss is determined; wherein, the first existing association is the existing association between user nodes and object nodes in the first relationship network.

[0010] The attention model is updated at least based on the first prediction loss.

[0011] In one implementation, the attention model includes a neural network and a selection unit;

[0012] The steps of selecting neighboring user nodes of a user node and determining the selection adjacency matrix containing information from the selection attention among multiple user nodes include:

[0013] The neural network is used to determine the initial attention of a user node to its neighboring user nodes based on the user node representation in the first relationship network.

[0014] The selection unit selects neighboring user nodes based on the initial attention, obtains the selection attention of user nodes to their neighboring user nodes, and determines a selection adjacency matrix containing information from the selection attention among multiple user nodes.

[0015] In one implementation, the step of selecting the neighboring user nodes based on the initial attention includes:

[0016] Using a differentiable sampling function, neighboring user nodes are sampled based on the initial attention.

[0017] In one implementation, the step of determining a selection adjacency matrix containing information from the selection attention among multiple user nodes includes:

[0018] Determine the first original adjacency matrix among the plurality of user nodes;

[0019] The selected adjacency matrix is ​​determined based on the product of the selected attention matrix and the first original adjacency matrix; wherein the selected attention matrix contains the selected attention of multiple user nodes to their neighboring user nodes.

[0020] In one implementation, the step of propagating the neighbor node representations in the first relationship network to the corresponding user nodes includes:

[0021] Based on the selected adjacency matrix and the adjacency matrix between user nodes and object nodes, the neighbor user node representations and neighbor object node representations in the first relational network are propagated to the corresponding user nodes.

[0022] In one implementation, the step of determining the first predicted association relationship between the user node and the object node includes:

[0023] Based on the adjacency matrix between the object node and its neighboring nodes in the first relational network, the neighboring node representation is propagated to the corresponding object node to obtain the first object aggregation representation of the object node.

[0024] Based on the first user aggregation representation and the first object aggregation representation, a first predicted association relationship between user nodes and object nodes is determined.

[0025] In one implementation, the step of updating at least the attention model based on the first prediction loss includes:

[0026] The attention model and the graph neural network are updated based on the first prediction loss.

[0027] Secondly, an embodiment provides a method for determining node representations in a relational network, wherein the second relational network includes multiple user nodes and multiple object nodes, as well as edges representing the association relationships between different nodes; the method includes:

[0028] The selected adjacency matrix among the plurality of user nodes is determined using the trained attention model; wherein the attention model is trained using the method described in the first aspect.

[0029] Based on the selected adjacency matrix, the neighbor node representations in the second relation network are propagated to the corresponding user nodes to obtain the second user aggregation representation of the user nodes.

[0030] In one implementation, the step of propagating the neighbor node representations in the second relationship network to the corresponding user nodes includes:

[0031] Based on the selected adjacency matrix and the adjacency matrix between user nodes and object nodes, the neighbor user node representations and neighbor object node representations in the second relation network are propagated to the corresponding user nodes.

[0032] Thirdly, the embodiment provides a method for training a representation aggregation model for node representations in an aggregated relation network, wherein the third relation network includes multiple user nodes and multiple object nodes, as well as edges representing the association relationships between different nodes, and the method includes:

[0033] The selected adjacency matrix among the plurality of user nodes is determined using the trained attention model; wherein the attention model is trained using the method described in the first aspect.

[0034] Based on the selected adjacency matrix, according to several types of propagation paths centered on user nodes, the neighbor node representations in the third relation network are aggregated to the corresponding user nodes, respectively obtaining several types of third user aggregation representations of user nodes.

[0035] By using the first representation aggregation model, several types of third-level user aggregation representations of any user node are fused to obtain a user fusion representation.

[0036] Based on the user fusion representation and the object representation in the third relationship network, a second predicted association relationship between user nodes and object nodes is determined.

[0037] Based on the difference between the second predicted association and the second existing association, a second predicted loss is determined; wherein, the second existing association is the existing association between user nodes and object nodes in the third relationship network;

[0038] The first representation aggregation model is updated based on the second prediction loss.

[0039] In one implementation, the step of determining the second predicted association relationship between the user node and the object node includes:

[0040] Based on the adjacency matrix between user nodes and object nodes, and following several types of propagation paths centered on object nodes, the neighbor node representations in the third relation network are aggregated to the corresponding object nodes, resulting in several types of third object aggregation representations of the object nodes.

[0041] By using the second representation aggregation model, several types of third-level object aggregation representations of any object node are fused to obtain the object fusion representation;

[0042] Based on the user fusion representation and the object fusion representation, a second predicted association relationship between user nodes and object nodes is determined.

[0043] In one implementation, the step of updating the first representation aggregation model based on the second prediction loss includes:

[0044] The first representation aggregation model and the second representation aggregation model are updated based on the second prediction loss.

[0045] In one implementation, the step of determining the second prediction loss includes:

[0046] Determine the neighboring user nodes selected by the attention model from among the neighboring user nodes of the user node;

[0047] Determine a first similarity between the user node and the selected neighboring user nodes, and determine a second similarity between the user node and user nodes other than the selected neighboring user nodes;

[0048] Based on the first similarity and the second similarity, a first sub-loss is determined;

[0049] Based on the difference between the second predicted association and the second existing association, a second sub-loss is determined;

[0050] The second prediction loss is determined based on the first sub-loss and the second sub-loss.

[0051] In one implementation, the association between user nodes and object nodes in the third relationship network is updated relative to the association between user nodes and object nodes in the first relationship network.

[0052] Fourthly, an embodiment provides a training device for an attention model based on neighboring users in a relational network, wherein the first relational network includes multiple user nodes and multiple object nodes, as well as edges representing the association relationships between different nodes; the device includes:

[0053] The first attention module is configured to select neighboring user nodes of a user node based on the user node representation in the first relationship network through the attention model, obtain the selection attention of the user node to its neighboring user nodes, and determine a selection adjacency matrix containing information in the selection attention among multiple user nodes.

[0054] The first propagation module is configured to propagate the neighbor node representations in the first relation network to the corresponding user nodes through a graph neural network based on the selected adjacency matrix, thereby obtaining the first user aggregate representation of the user nodes.

[0055] The first association module is configured to determine a first predicted association relationship between user nodes and object nodes based on the first user aggregation representation and the object representation in the first relationship network.

[0056] The first loss module is configured to determine a first predicted loss based on the difference between the first predicted association and the first existing association; wherein the first existing association is the existing association between user nodes and object nodes in the first relationship network;

[0057] The first update module is configured to update at least the attention model based on the first prediction loss.

[0058] Fifthly, an embodiment provides a node representation determination device in a relational network, wherein the second relational network includes multiple user nodes and multiple object nodes, as well as edges representing the association relationships between different nodes; the device includes:

[0059] The first determining module is configured to determine the selection adjacency matrix among the plurality of user nodes using a trained attention model; wherein the attention model is trained using the method described in the first aspect.

[0060] The second propagation module is configured to propagate the neighbor node representations in the second relationship network to the corresponding user nodes based on the selected adjacency matrix, thereby obtaining the second user aggregation representation of the user nodes.

[0061] Sixthly, an embodiment provides a training apparatus for a representation aggregation model for node representation in an aggregation relationship network, wherein the third relationship network includes multiple user nodes and multiple object nodes, and edges representing the association relationships between different nodes, the apparatus comprising:

[0062] The second determining module is configured to determine the selection adjacency matrix among the plurality of user nodes using a trained attention model; wherein the attention model is trained using the method described in the first aspect.

[0063] The third propagation module is configured to propagate the neighbor node representations in the third relation network to the corresponding user nodes based on the selected adjacency matrix and according to several types of propagation paths centered on the user nodes, thereby obtaining several types of third user aggregation representations of the user nodes.

[0064] The first fusion module is configured to fuse several types of third-user aggregate representations of any user node through a first representation aggregation model to obtain a user fusion representation.

[0065] The second association module is configured to determine a second predicted association relationship between user nodes and object nodes based on the user fusion representation and the object representation in the third relationship network.

[0066] The second loss module is configured to determine a second predicted loss based on the difference between the second predicted association and the second existing association; wherein the second existing association is the existing association between user nodes and object nodes in the third relationship network;

[0067] The second update module is configured to update the first representation aggregation model based on the second prediction loss.

[0068] In a seventh aspect, an embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method described in any one of the first to third aspects.

[0069] Eighthly, an embodiment provides a computing device including a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method described in any one of the first to third aspects.

[0070] In the methods and apparatus provided in the embodiments of this specification, an attention model is used to select neighboring user nodes, and a selection adjacency matrix is ​​obtained based on the selected neighboring user nodes. Then, through a graph neural network, the neighbor node representations in the relationship network are propagated to the user nodes based on the selection adjacency matrix to obtain user aggregate representations. The user aggregate representations are used to fit the user's association behavior with objects, thereby constructing a prediction loss. The higher the credibility of the neighboring users selected by the attention model, the more accurate the user's association behavior with objects fitted by the user aggregate representations, and the smaller the prediction loss. Therefore, through this continuous training process, the embodiments of this specification enable the attention model to select neighboring user nodes with higher credibility, thereby extracting more credible social relationships from the social relationship network, and performing information propagation and aggregation based on credible social relationships. Attached Figure Description

[0071] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0072] Figure 1 This is a schematic diagram illustrating an implementation scenario of one embodiment disclosed in this specification;

[0073] Figure 2 A flowchart illustrating an attention model training method provided for an embodiment;

[0074] Figure 3 A flowchart illustrating a method for determining node representations in a relational network, provided as an embodiment;

[0075] Figure 4 A flowchart illustrating a characterization aggregation model training method provided for an embodiment;

[0076] Figure 5 A schematic block diagram of an attention model training device provided in an embodiment;

[0077] Figure 6 A schematic block diagram of a node representation determination device in a relational network provided in an embodiment;

[0078] Figure 7 This is a schematic block diagram of a training device for characterizing an aggregation model, provided as an embodiment. Detailed Implementation

[0079] The solution provided in this specification will now be described with reference to the accompanying drawings.

[0080] Figure 1This is a schematic diagram illustrating an implementation scenario of one embodiment disclosed in this specification. The relationship network includes multiple user nodes and multiple product nodes, as well as edges representing the relationships between different nodes, such as user nodes u1, u2, u3, and u4, and product nodes such as i1, i2, and i3. Social relationships exist between user nodes, and user nodes are associated with product nodes through actions such as clicks or purchases. Neighboring user nodes in the relationship network are input into an attention model. The attention model selects neighboring user nodes, and based on the selected neighboring user nodes, a graph neural network is used to propagate the features of the user nodes, obtaining a user aggregate representation. Next, based on the user aggregate representation and the object representation of the object nodes, the predicted association relationship between user nodes and object nodes is determined, and a prediction loss is constructed with the existing association relationships in the relationship network. The attention model is updated in the direction of reducing the prediction loss. When the attention model training is complete, the attention model can select more reliable neighboring user nodes.

[0081] A relationship network consists of multiple nodes and multiple edges. User nodes represent users, and product nodes represent products. Product nodes are a type of object node representing things; things include a combination of goods and services intended for use, such as products and commodities. Edges in the relationship network include edges representing relationships between multiple user nodes, and edges representing relationships between user nodes and object nodes. Relationships between user nodes can include friendship, likes, transfers, and loans. Relationships between user nodes and object nodes can include clicks, purchases, allocations, and dependencies.

[0082] The social relationships between user nodes are relatively stable, while the relationships between user nodes and object nodes may change rapidly over time. In real-time online business, the relationships between user nodes and object nodes can change in real time.

[0083] Data in relationship networks can be generated based on the service platform's business data. To provide better services, the service platform aims to extract deeper information from these relationship networks. For example, by aggregating the representations of neighboring nodes around a user node through the relationship network, the user node's representation can be enriched, enhancing its ability to express itself to the user. However, the strength and reliability of social relationships between users vary, thus introducing significant noise.

[0084] To extract more credible social relationships from social relationship networks and reduce the impact of noise, this specification provides a method for training an attention model based on neighboring users in a relationship network in one embodiment. The method includes the following steps: Step S210, using the attention model, based on the user node representation in a first relationship network, selecting neighboring user nodes of a user node to obtain the user node's selected attention to its neighboring user nodes, and determining a selection adjacency matrix containing information from the selected attention among multiple user nodes; Step S220, using a graph neural network, based on the selection adjacency matrix, propagating the neighboring node representations in the first relationship network to the corresponding user nodes to obtain a first user aggregate representation of the user node; Step S230, based on the first user aggregate representation and the object representation in the first relationship network, determining a first predicted association relationship between the user node and the object node; Step S240, based on the difference between the first predicted association relationship and the first existing association relationship, determining a first prediction loss; Step S250, updating the attention model at least based on the first prediction loss. The above training process continuously adjusts the neighboring user nodes selected by the attention model based on the existing relationships between user nodes and object nodes. This makes the selected neighboring user nodes increasingly reliable, resulting in a more reliable adjacency matrix with less noise. The following section will combine... Figure 2 The flowchart shown below provides a detailed explanation of this embodiment.

[0085] Figure 2 This is a flowchart illustrating an attention model training method provided in an embodiment. The first relational network G1 includes multiple user nodes representing users and multiple object nodes representing objects, as well as edges representing the relationships between different nodes, including edges between user nodes and edges between user nodes and object nodes. The first relational network G1 can be any relational network, for example, a relational network built based on business data from a service platform. This method can be executed by a computing device, which can be any device, equipment, platform, or device cluster with computing and processing capabilities. The method includes the following steps.

[0086] In step S210, using the attention model N1 and based on the user node representation in the first relation network G1, neighboring user nodes of a user node are selected to obtain the selection attention of the user node towards its neighboring user nodes, and a selection adjacency matrix A containing information from the selection attention is determined among multiple user nodes. s ′.

[0087] The attention model N1 is used to determine the selective adjacency matrix among multiple user nodes in a relational network, incorporating selective attention. The input to the attention model N1 is the features of the user nodes in the relational network and the relationships between them; the output is the selective adjacency matrix. The attention model N1 can be implemented using a neural network. A user node can have multiple neighboring user nodes. The attention of a user node to its neighboring user nodes can be understood as the weight or importance of that neighboring user node relative to the current user node. For example, in... Figure 1 In the diagram, user node u1's neighboring user nodes include u2, u3, and u4. Attention values ​​can be assigned to the relationships between u1 and u2, u1 and u3, and u1 and u4, respectively. Attention can be between a user node and its neighboring user nodes, or it can be expressed as the attention between the edges between a user node and its neighboring user nodes. That is, attention values ​​can be assigned to the relationships between u1 and u2, u1 and u3, and u1 and u4, respectively. The attention model can select a first number a1 neighbors from the user node's neighboring user nodes as the more important and reliable neighbors, and assign different attention values ​​to the selected neighbors, thus obtaining the user node's selective attention to its neighboring user nodes. In one implementation, the attention model N1 can also reduce the attention between the user node and its non-selected neighboring user nodes.

[0088] Attention model N1 can be used to determine the selective attention of any user node u to its neighboring user nodes, and this operation can be performed on all user nodes in the relational network.

[0089] In one implementation, the attention model N1 includes a neural network and a selection unit. The neural network determines the initial attention of a user node to its neighboring user nodes based on the user node representations in the relational network. The selection unit selects neighboring user nodes based on the initial attention, obtaining the selected attention of each user node to its neighboring user nodes, and determines a selection adjacency matrix containing information from the selected attention among multiple user nodes.

[0090] Step S210 may include the following steps: the computing device determines the initial attention of a user node to its neighboring user nodes through a neural network based on the user node representation in the first relational network G1; selects neighboring user nodes based on the initial attention through a selection unit to obtain the selection attention of the user node to its neighboring user nodes; and determines a selection adjacency matrix containing information in the selection attention among multiple user nodes.

[0091] The neural network takes user node representations from the first relational network G1 and the relationships between user nodes as input, and outputs the initial attention. The selection unit takes the initial attention as input and outputs the selection adjacency matrix. The neural network contains parameters to be trained. The neural network can determine the initial attention based on the parameters to be trained and the similarity between the user node representation and its neighboring user node representations.

[0092] For example, in a neural network, for a user u, the initial attention α of the neighboring user v of user u can be calculated based on the following formula. uv :

[0093]

[0094] Among them, W a These are the parameters to be trained, softmax and LeakyReLU are non-linear activation functions, N(u) is the set of neighboring users of user u, and X is the set of neighboring users of user u. u and X v Let be the representations of user u and neighbor user v, respectively, and let || be the connection function, which can be represented by a vector.

[0095] When there are m neighboring users v, the initial attention of user u can be expressed as vector α. u =[α u1 ‖α u2 ‖…‖α um The initial attention vectors can be concatenated into an initial attention matrix. Therefore, the initial attention can be represented by either a vector or a matrix.

[0096] When selecting neighboring user nodes based on initial attention, the process is non-differentiable when selecting from a uniform distribution. To make the neighbor selection process differentiable, a differentiable sampling function can be used to sample neighboring user nodes based on the initial attention. In one implementation, Gumbel sampling can be used to implement the neighboring user node selection process.

[0097] For example, by performing sparsified Gumbel sampling using the following formula, we can obtain the following one-hot code vector, which is the user u's selection attention vector v. u :

[0098]

[0099] Where g follows a Gumbel(0,1) distribution, which can be obtained by transforming a uniform distribution, g = -log(-logu), u ∈ uniform distribution (0,1), τ ∈ (0,+∞) is a hyperparameter used to control the sparse one-hot vector, and αu exp is the initial attention vector of user u, and exp is an exponential function with the natural constant e as the base.

[0100] Based on the selection attention vectors of multiple user nodes in the relational network, a selection attention matrix for all users can be obtained by concatenating them. Each time the one-hot vector obtained by equation (2) is used, a neighbor user matrix is ​​actually selected for user u. In specific implementation, T Gumbel samplings can be performed using equation (2) to obtain T selected neighbor users for user u, thereby further obtaining a selection attention matrix for all users, in which T neighbor users are selected for each user:

[0101]

[0102] In matrix V, each row represents a user's selective attention vector to their neighboring users. This vector can have T elements with large values ​​(e.g., close to 1) and other elements with small values ​​(e.g., close to 0). Different rows in matrix V represent different users.

[0103] The above formulas (1) to (3) are merely examples of one implementation method. By appropriately transforming the formulas based on the principles of these formulas, different forms of calculation formulas can be obtained, and these are all feasible.

[0104] After determining the selection attention vector or selection attention matrix of a user node to its neighboring user nodes, a selection adjacency matrix A containing information from the selection attention can be determined among multiple user nodes. s In practical implementation, the attention matrix can be directly determined as the adjacency matrix, or the original adjacency matrix of the first relation network G1 can be used to determine the adjacency matrix.

[0105] In this implementation, the first original adjacency matrix A among multiple user nodes in the first relational network G1 can be determined. s Based on the selection of attention matrix V and the first original adjacency matrix A s The product of these factors determines the adjacency matrix A. s ′.

[0106] The selection attention matrix V contains the selection attention of multiple user nodes to their respective neighboring user nodes. The first original adjacency matrix A... s This can be an adjacency matrix among all user nodes in the first relational network G1, where each element takes a value of 0 or 1. Each element represents the value indicating whether a relationship exists between two user nodes; a value of 0 indicates no relationship between the two user nodes, while a value of 1 indicates a relationship exists. The first original adjacency matrix A...s The selection adjacency matrix A does not include information from the attention selection process, meaning it does not contain information about the selected neighboring users. The following formula can be used to obtain the selection adjacency matrix A. s ′:

[0107]

[0108] Among them, A s is the first original adjacency matrix, and ⊙ is the dot product symbol. Through the operation of equation (4), the element values ​​of the edges in the attention matrix that have no association with the user node are set to 0, thereby improving the accuracy of the weight matrix.

[0109] Choose adjacency matrix A s A' is a special adjacency matrix. It is identical in form to a regular adjacency matrix, but differs in content. Choosing adjacency matrix A... s The adjacency matrix A contains information about the attention selection process, specifically each user node and its corresponding selected neighboring user nodes. s In this context, for a row vector corresponding to a user node, the element values ​​of the selected neighboring user nodes are completely different from the element values ​​of other user nodes. For example, the element value of the selected neighboring user node is 1 or close to 1, while the element values ​​of other user nodes are 0. In this way, the selected neighboring user node is highlighted.

[0110] In step S220, a graph neural network is used to select the adjacency matrix A. s The neighbor node representations in the first relation network G1 are propagated to the corresponding user nodes to obtain the first user aggregation representation H of the user nodes. U 1 Graph neural networks are used to select adjacency matrix A. s The neighbor node representations in the first relation network G1 are propagated to the corresponding user nodes to obtain the first user aggregation representation H of the user nodes. U 1 The input to the graph neural network is the adjacency selection matrix A. s The output is the first user aggregation representation H of the user nodes and the node representation. U 1 When the first relational network contains multiple user nodes, the first user aggregation representation H of each user node can be obtained separately. U 1 The first user aggregation representation at this point can be represented in matrix form.

[0111] When propagating the neighbor node representation to the corresponding user node, it can be based solely on the neighbor user node representation in the first relation network G1, or it can be based on both the neighbor user node representation and the neighbor object node representation in the first relation network G1.

[0112] In one implementation, it can be based on the selection of the adjacency matrix A. s The adjacency matrix between user nodes and object nodes is used to propagate the neighbor user node representations and neighbor object node representations in the first relational network G1 to the corresponding user nodes. This can be implemented in various ways. For example, the adjacency matrix A is selected. s The adjacency matrices between user nodes and object nodes are used to construct a full adjacency matrix, which contains the association relationships between all user nodes and all object nodes. Then, representation propagation is performed based on this full adjacency matrix. Another implementation is to base it on the selected adjacency matrix A. s A representation propagation process is performed to obtain the first aggregated representation of the user node; a second aggregated representation of the user node is obtained based on the adjacency matrix between the user node and the object node; then, a multilayer perceptron (MLP) can be used to merge the first and second aggregated representations to obtain the final first aggregated user representation H. U 1 .

[0113] Given the adjacency matrix, propagating node representations using a graph neural network can be done using existing methods, such as the following formula:

[0114] T k =A ′ s ·H k (5)

[0115] H k+1 =σ k ·(T k ·W k (6)

[0116] Among them, H k This is the hidden layer representation of a graph neural network, with the initial H... 0 It is equal to the initial node representation, A s ′ is the adjacency matrix selection; W k σ is the weight matrix of layer k, and σ is the parameter to be trained; k It is a non-linear activation function, such as ReLU.

[0117] When propagating node representations, it can be based on a set number of hops, such as propagating representations according to the range of one-hop neighbor nodes. Alternatively, it can be based on a set propagation path. For example, when propagating user node representations, it can follow a "user node—user node" propagation path.

[0118] In step S230, based on the first user aggregation representation and the object representation in the first relationship network, the first predicted association relationship between user nodes and object nodes is determined.

[0119] In step S240, a first predicted loss is determined based on the difference between the first predicted association and the first existing association. The first existing association is the existing association between user nodes and object nodes in the first relationship network G1, which can be used as an existing label between users and objects.

[0120] In this context, the object representation in the first relational network G1 refers to the object representation of the object nodes in the first relational network. This object representation can use the initial object representation or the object representation after aggregating neighboring nodes.

[0121] In one implementation, the neighbor node representation can be propagated to the corresponding object node based on the adjacency matrix between the object node and its neighbor nodes in the first relation network G1 to obtain the first object aggregation representation of the object node. Based on the first user aggregation representation and the first object aggregation representation, the first predicted association relationship between the user node and the object node is determined.

[0122] When determining the first aggregate representation, a graph neural network, such as equations (5) and (6), can be used, based on a set number of hops, for example, setting the representation propagation according to the range of one-hop neighbor nodes. Alternatively, it can be based on a set propagation path. For example, it can follow a propagation path of "object node - user node". For specific implementation details, please refer to existing technologies; they will not be elaborated here.

[0123] When determining the first predicted association, it can be obtained based on the product of the first user aggregate representation and the first item aggregate representation. That is, sampling the similarity between the first user aggregate representation and the first item aggregate representation to fit the association between users and items, such as fitting user click behavior on items. The first predicted loss can be determined using the following formula:

[0124]

[0125] Among them, L GGAN For the first predicted loss, H u H is the first user aggregation representation vector of user u. i H is the first aggregate representation vector of commodity i.u H i T As the first predicted association, Y ui The first existing relationship is "‖*‖ 2 " is the symbol for L2 norm.

[0126] In step S250, the attention model is updated at least based on the first prediction loss, that is, the training parameters in the attention model are updated. In one implementation, the attention model and the graph neural network can be updated simultaneously based on the first prediction loss, which enables the model to converge faster.

[0127] The steps S210 to S250 above can be understood as a model iteration process. During the training process, the attention model can be trained multiple times until the convergence condition is met, such as the number of iterations reaching the threshold, or the first prediction loss being less than the loss threshold, etc.

[0128] Through the model training process described in the above embodiments, a selected adjacency matrix can be obtained through the trained attention model. This selected adjacency matrix contains the trusted neighbor user nodes of the user node. In the propagation of user node features, the selected adjacency matrix enables the trusted neighbor user node representation to propagate to the corresponding user node, thereby obtaining a more accurate node representation.

[0129] Figure 3 This is a flowchart illustrating a method for determining node representations in a relational network, provided as an embodiment. The second relational network G2 includes multiple user nodes and multiple object nodes, as well as edges representing the relationships between different nodes. The second relational network G2 may be the same as or different from the first relational network G1. For example, the relationships between user nodes and object nodes in the second relational network may be updated relative to the first relational network. This method can be executed by a computing device and includes the following steps.

[0130] In step S310, the selected adjacency matrix among multiple user nodes in the second relational network G2 is determined using the trained attention model N1. The attention model employs the following... Figure 2 The method described above is used for training. Specifically, the user node representations and associations in the second relational network can be input into the attention model N1, which then outputs the corresponding selection adjacency matrix.

[0131] When the attention model N1 includes a neural network and a selection unit, the initial attention of a user node to its neighboring user nodes can be determined by the neural network based on the user node representation in the second relation network G2. The selection unit selects neighboring user nodes based on the initial attention to obtain the selected attention of the user node to its neighboring user nodes, and determines the selection adjacency matrix containing the information in the selected attention among multiple user nodes in the second relation network G2.

[0132] In step S320, based on the selected adjacency matrix, the neighbor node representations in the second relation network G2 are propagated to the corresponding user nodes to obtain the second user aggregate representations of the user nodes. When propagating the neighbor node representations to the corresponding user nodes, propagation can be based solely on the neighbor user node representations in the second relation network G2, or it can be based on both the neighbor user node representations and the neighbor object node representations in the second relation network G2.

[0133] In one implementation, neighbor user node representations and neighbor object node representations in the second relation network G2 can be propagated to the corresponding user nodes based on the selected adjacency matrix and the adjacency matrix between user nodes and object nodes. This can involve various implementation methods. For example, the selected adjacency matrix and the adjacency matrix between user nodes and object nodes can be constructed into a full adjacency matrix, i.e., an adjacency matrix containing the associations between all user nodes and all object nodes. Then, representation propagation is performed based on this full adjacency matrix. Another implementation involves propagating representations based on the selected adjacency matrix to obtain a third aggregated representation of the user nodes; propagating representations based on the adjacency matrix between user nodes and object nodes to obtain a fourth aggregated representation of the user nodes; then, the third and fourth aggregated representations can be merged to obtain the final second aggregated representation of the user nodes.

[0134] The above embodiment describes a process for generating user aggregate representations for a second relational network. In practice, node representations can be propagated according to a set number of hops and a set propagation path.

[0135] To better maintain the diversity of node representations, node representations can be propagated along multiple propagation paths. This specification also provides an embodiment that utilizes self-supervised multi-representation fusion along multiple propagation paths to learn a better combination under multiple propagation paths, thereby improving the accuracy and richness of node representations. In this embodiment, based on the selected adjacency matrix obtained from the attention model, multi-path representation aggregation is performed on user node representations and object node representations under multiple propagation paths to obtain the final user fusion representation and object fusion representation. Then, the similarity between the user fusion representation and the object fusion representation is used to fit whether there is an association between the user and the object, and compared with existing labels to learn a better combination of multiple propagation paths. The following is a detailed explanation... Figure 4 The flowchart provides a detailed description of this embodiment.

[0136] Figure 4 This is a flowchart illustrating a method for training a representation aggregation model, provided as an embodiment. The representation aggregation model is used to aggregate node representations in a relational network. The third relational network G3 includes multiple user nodes and multiple object nodes, as well as edges representing the relationships between different nodes. The third relational network G3 can be the same as or different from the first relational network G1. For example, the relationships between user nodes and object nodes in the third relational network G3 are updated relative to the relationships between user nodes and object nodes in the first relational network G1. This method can be executed by a computing device and includes the following steps.

[0137] In step S410, the selected adjacency matrix among multiple user nodes in the third relation network G3 is determined using the trained attention model N1. The attention model employs the following... Figure 2 The method described above is used for training. Specifically, the user node representations and associations in the third relational network G3 can be input into the attention model N1, which then outputs the corresponding selection adjacency matrix.

[0138] When the attention model N1 includes a neural network and a selection unit, the initial attention of a user node to its neighboring user nodes can be determined by the neural network based on the user node representation in the third relation network G3. The selection unit selects neighboring user nodes based on the initial attention to obtain the selected attention of the user node to its neighboring user nodes, and determines the selection adjacency matrix containing the information in the selected attention among multiple user nodes in the third relation network G3.

[0139] In step S420, based on the selected adjacency matrix, the neighbor node representations in the third relation network G3 are aggregated to the corresponding user nodes according to several types of propagation paths centered on user nodes, thereby obtaining several types of third user aggregation representations of user nodes.

[0140] In step S430, based on the adjacency matrix between user nodes and object nodes, the neighbor node representations in the third relation network G3 are aggregated to the corresponding object nodes according to several types of propagation paths centered on object nodes, thereby obtaining several types of third object aggregation representations of object nodes.

[0141] Several types of propagation paths centered on user nodes can include both user nodes and object nodes. These "several types" can include one or more types. For example, these propagation paths can include: user node, user node-object node, user node-user node, and user node-object node-user node, etc., i.e., M. u ={U,UI,UU,UIU}, where U represents user nodes and I represents object nodes. Figure 1 In the diagram, the path from u2, i1 to u4 belongs to the UIU path and contains 2 hop nodes.

[0142] Several types of propagation paths centered on object nodes can include both user nodes and object nodes. For example, these types of propagation paths can include: object node, object node-user node, object node-user node-object node, and object node-user node-user node, etc., i.e., M. I ={I,IU,IUI,IUU}. exist Figure 1 In the diagram, i1, u4 to i3 belong to the IUI path, and i1, u4 to u3 belong to the IUU path.

[0143] When determining the third user aggregation representation, it can be based on the product of the adjacency matrix and the node representation matrix, and representation aggregation can be performed according to several types of propagation paths centered on user nodes. The node representation matrix includes multiple user node representations and multiple object node representations.

[0144] When determining the aggregation representation of a third object, the representation aggregation can be performed according to several propagation paths centered on the object, based on the product of the adjacency matrix between the user node and the object node and the node representation matrix.

[0145] For example, aggregation can be represented according to the following matrix multiplication transformation formula:

[0146]

[0147] Among them, E U E UI E UU and E UIU To be compared with the four types of propagation paths M respectively u The corresponding four types of third-user aggregation representations, E I E IU E IUI and E IUU To be compared with the four types of propagation paths M respectivelyI The corresponding four types of third-party polymer characterization. X U and X I These are the initial user node representation and the initial object node representation, respectively. s ′ is the adjacency selection matrix, A o It is the adjacency matrix between user nodes and object nodes, and T is the matrix transpose symbol.

[0148] For each user node u in the third relation network G3, several user aggregation representations corresponding to user node u are obtained. For each object node i in the third relation network G3, several object aggregation representations corresponding to object node i are obtained.

[0149] When the social relationships of users in the third relation network G3 remain unchanged compared to the social relationships of users in the first relation network G1, that is, when the associations between user nodes remain unchanged, the adjacency matrix can be selected directly. Figure 1 The attention model N1 is obtained after training is complete. Furthermore, step S420 can also be performed in advance before the training process in this embodiment begins.

[0150] In step S440, the first representation aggregation model is used to fuse several classes of third-party user aggregation representations of any user node to obtain a user fusion representation. The first representation aggregation model can be implemented using a neural network. The first representation aggregation model is used to fuse several classes of third-party user aggregation representations of an input user node. Its input is several classes of third-party user aggregation representations corresponding to one or more user nodes, and its output is the user fusion representation corresponding to the one or more user nodes.

[0151] The first representation aggregation model can fuse several classes of third-party user aggregation representations of a user node through its model parameters. For example, the following formula can be used to fuse several classes of third-party user aggregation representations of a user node:

[0152]

[0153] Among them, W p 0 ∈R d*d W p a ∈R d*1 b p 0 ∈R d*1 b p a ∈R d*1 , which belongs to the model parameters of the first representation aggregation model, is the weight matrix to be trained; d is the feature dimension, R is the set of real numbers, H p0 It is a representation of the propagation path p, H U m It is the final user fusion representation, where U represents all users and u represents one user among all users.

[0154] In step S450, the second representation aggregation model is used to fuse several types of third-party object aggregation representations of any object node to obtain an object fusion representation. The second representation aggregation model is implemented using a neural network. The second representation aggregation model is used to fuse several types of third-party object aggregation representations of an input object node. Its input is several types of third-party object aggregation representations corresponding to one or more user nodes, and its output is the object fusion representation corresponding to the one or more user nodes.

[0155] The second representation aggregation model can fuse several types of third-party object aggregation representations of object nodes through its model parameters. In specific implementation, the several types of third-party object aggregation representations of object nodes can be fused according to formulas (10) and (11). The third user aggregation representation in formulas (10) and (11) can be replaced with the third object aggregation representation, and the propagation path can be replaced with the object-centered propagation path. The specific formulas will not be repeated.

[0156] In step S460, a second predicted association relationship between user nodes and object nodes is determined based on the user fusion representation and the object fusion representation. In step S470, a second predicted loss is determined based on the difference between the second predicted association relationship and the second existing association relationship.

[0157] Specifically, the second predicted association relationship is used to fit the association relationship between users and objects. The second existing association relationship is the existing association relationship between user nodes and object nodes in the third relationship network G3, which can be used as the existing label between users and objects.

[0158] The second predicted association can be determined based on the product of the user fusion representation and the object fusion representation. This involves sampling the similarity between the user fusion representation and the object fusion representation to fit the association between users and objects, such as fitting user click behavior on products. The second predicted loss can be determined using the following formula:

[0159]

[0160] Among them, L rec For the second prediction loss, H u m H is the user fusion representation vector of user u. i m H is the fusion representation vector of commodity i. u m Hi mT For the second predicted association, F ui This is the second existing relationship.

[0161] Because user behavior is sparse, in order to further optimize the model, a contrastive learning model can be introduced as a regularization matrix when determining the prediction loss to enrich the user's path representation. Step S470 may include the following steps 1 to 5 during execution.

[0162] Step 1: Determine the neighboring user nodes selected by the attention model from the neighboring user nodes of the user node.

[0163] When determining the neighboring user nodes selected by the attention model, one can use a selection attention matrix or a selection adjacency matrix. Both the selection attention matrix and the selection adjacency matrix contain the neighboring user nodes selected by the attention model for each user node. The specific determination can be based on the values ​​of the elements in the matrix.

[0164] Step 2: Determine the first similarity between the user node and the selected neighboring user nodes, and determine the second similarity between the user node and other user nodes besides the selected neighboring user nodes. The similarity can be determined using the product of the representation vectors.

[0165] For example, the product of a user node's representation and the representation of a selected neighboring user node is determined as the first similarity; the product of a user node's representation and the representations of user nodes other than the selected neighboring user nodes is determined as the second similarity. The user node's representation can be a user fusion representation, an arbitrary third-party user aggregation representation, or a representation of the propagation path.

[0166] Step 3: Determine the first sub-loss based on the first and second similarities. In practice, the first sub-loss is determined with the goal of maximizing the first similarity and minimizing the second similarity. For example, the first sub-loss can be constructed using the following formula:

[0167]

[0168] Among them, L infoNCE It is the first sub-loss, u i and u j The selected set of neighboring users G s A pair of neighbors in the system have a neighbor user relationship; u i and u kc It is the set of neighboring users G s The pair of users other than those in the neighbor user set G are not considered neighbors. sIt includes trusted neighbors selected based on an attention model as positive samples. Here, negative samples u are introduced. i and u kc Among them, user u kc By randomly selecting L users {u kc We obtain kc = 0, 1, ..., L-1.

[0169] Step 4: Based on the difference between the second predicted correlation and the second existing correlation, determine the second sub-loss. This step can be performed with reference to step S470; for example, the second predicted loss obtained in step S470 can be directly used as the second sub-loss. For example, the predicted loss L obtained from equation (12) can be used as the second sub-loss. rec As the second loss.

[0170] Step 5: Determine the second prediction loss based on the first and second sub-losses. When determining the second prediction loss, the sum or weighted sum of the first and second sub-losses can be used.

[0171] For example, the second predictive loss can be constructed by weighted summation of the two component losses:

[0172] L2 = L rec +γL infoNCE (14)

[0173] Where L2 is the second prediction loss, L infoNCE For the first loss, L rec The second sub-loss is represented by γ, which is a coefficient that controls the balance between the two losses.

[0174] Step S480: Update the first representation aggregation model and the second representation aggregation model based on the second prediction loss, that is, update the parameters of the model to be trained in the model.

[0175] Steps S410 to S430 above can be considered as the preparation stage before model training, while steps S440 to S480 are the model training stage. Steps S440 to S480 constitute one iteration of model training. In practical applications, the first and second representation aggregation models can be updated using the second prediction loss, thereby executing the model iterative training process multiple times until the model reaches the convergence condition.

[0176] The above process is a method for jointly training the first representation aggregation model and the second representation aggregation model. In one embodiment, only the first representation aggregation model can be trained, without executing steps S430 and S450. In step S460, object representation is used instead of object fusion representation, and in step S480, the first representation aggregation model is updated only based on the second prediction loss.

[0177] The above embodiments decouple the graph model into two parts: a feature propagation part based on Gumbel sampling (i.e., neighbor user selection) and a self-supervised multi-representation fusion part. The former can be trained offline, while the latter can be trained online, thereby greatly reducing the computation of the online part and lowering the time consumption.

[0178] In the first part, the attention model generates representations of the strength of social relationships, thereby selecting the most useful neighbors for the business, while also denoising the social relationships. In the second part, the implementation integrates representations of multiple propagation paths and supplements information about users with fewer behaviors with neighbor information, solving the problem of poor representation of low-activity users.

[0179] The method provided in the above embodiments can obtain user representations that aggregate trustworthy information from social relationships. By utilizing the similarity between this information-rich user representation and the representation of the product to be pushed, the user's level of interest in the product can be fitted. Based on this fitted level of interest, products can be pushed to the user, making product pushes more accurate and applicable to large-scale online push scenarios. The application of user representations is not limited to product pushes; the product can also be other items or products to be allocated to the user. In specific implementation, after the model is trained, the similarity H between the user representation and the representation of the product to be pushed can be obtained using the trained first representation aggregation model and second representation aggregation model. U m H I m See equations (10) and (11) for the similarity used to push products.

[0180] In this specification, the terms "first," "first user aggregation representation," "first predicted association," "first existing association," "first predicted loss," "first original adjacency matrix," and "first object aggregation representation," as well as the terms "second" or "third" (if any) used in the text, are merely for the convenience of distinction and description and do not have any limiting meaning.

[0181] The foregoing description describes specific embodiments of this specification; other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than those shown in the embodiments, and the desired result may still be achieved. Furthermore, the processes depicted in the drawings do not necessarily need to follow the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0182] Figure 5This is a schematic block diagram of an attention model training device provided in an embodiment. The first relationship network includes multiple user nodes and multiple object nodes, as well as edges representing the relationships between different nodes. This device embodiment is similar to... Figure 2 The method embodiment shown corresponds to this. The device 500 includes:

[0183] The first attention module 510 is configured to select neighboring user nodes of a user node based on the user node representation in the first relationship network through the attention model, obtain the selection attention of the user node to its neighboring user nodes, and determine a selection adjacency matrix containing information in the selection attention among multiple user nodes.

[0184] The first propagation module 520 is configured to propagate the neighbor node representations in the first relation network to the corresponding user nodes through a graph neural network based on the selected adjacency matrix, thereby obtaining the first user aggregate representation of the user nodes.

[0185] The first association module 530 is configured to determine a first predicted association relationship between user nodes and object nodes based on the first user aggregation representation and the object representation in the first relationship network.

[0186] The first loss module 540 is configured to determine a first predicted loss based on the difference between the first predicted association relationship and the first existing association relationship; wherein, the first existing association relationship is the existing association relationship between user nodes and object nodes in the first relationship network;

[0187] The first update module 550 is configured to update at least the attention model based on the first prediction loss.

[0188] In one implementation, the attention model includes a neural network and a selection unit;

[0189] The first attention module 510 includes:

[0190] The first determining submodule (not shown in the figure) is configured to determine the initial attention of a user node to its neighboring user nodes based on the user node representation in the first relationship network through the neural network.

[0191] The first attention submodule (not shown in the figure) is configured to select the neighboring user nodes based on the initial attention through the selection unit, obtain the selection attention of the user node to its neighboring user nodes, and determine the selection adjacency matrix containing the information in the selection attention among multiple user nodes.

[0192] In one implementation, the first attention submodule, when selecting neighboring user nodes based on the initial attention through the selection unit, includes:

[0193] The selection unit uses a differentiable sampling function to sample neighboring user nodes based on the initial attention.

[0194] In one implementation, when the first attention submodule determines the selection adjacency matrix containing information from the selection attention among the plurality of user nodes, it includes:

[0195] Determine the first original adjacency matrix among multiple user nodes;

[0196] The selected adjacency matrix is ​​determined based on the product of the selected attention matrix and the first original adjacency matrix; wherein the selected attention matrix contains the selected attention of multiple user nodes to their neighboring user nodes.

[0197] In one implementation, the first propagation module 520 is specifically configured as follows:

[0198] Based on the selected adjacency matrix and the adjacency matrix between user nodes and object nodes, the neighbor user node representations and neighbor object node representations in the first relational network are propagated to the corresponding user nodes.

[0199] In one implementation, the first association module 530 includes:

[0200] The first propagation submodule (not shown in the figure) is configured to propagate the neighbor node representation to the corresponding object node based on the adjacency matrix between the object node and its neighbor node in the first relational network, so as to obtain the first object aggregation representation of the object node.

[0201] The first association submodule (not shown in the figure) is configured to determine the first predicted association relationship between user nodes and object nodes based on the first user aggregation representation and the first object aggregation representation.

[0202] In one implementation, the first update module 550 is specifically configured as follows:

[0203] The attention model and the graph neural network are updated based on the first prediction loss.

[0204] Figure 6 This is a schematic block diagram of a node representation determination device in a relational network provided for an embodiment. The second relational network includes multiple user nodes and multiple object nodes, as well as edges representing the relationships between different nodes. This device embodiment is similar to... Figure 3 The method embodiment shown corresponds to this. The apparatus 600 includes:

[0205] The first determining module 610 is configured to determine the selection adjacency matrix among the plurality of user nodes using a trained attention model; wherein the attention model employs, for example... Figure 2 The method described above is used for training;

[0206] The second propagation module 620 is configured to propagate the neighbor node representations in the second relationship network to the corresponding user nodes based on the selected adjacency matrix, thereby obtaining the second user aggregation representation of the user nodes.

[0207] In one implementation, the second propagation module 620 is specifically configured as follows:

[0208] Based on the selected adjacency matrix and the adjacency matrix between user nodes and object nodes, the neighbor user node representations and neighbor object node representations in the second relation network are propagated to the corresponding user nodes.

[0209] Figure 7 This is a schematic block diagram of a training apparatus for representing an aggregation model, provided as an embodiment. The aggregation model is used to represent nodes in an aggregation relation network. The third relation network includes multiple user nodes and multiple object nodes, as well as edges representing the relationships between different nodes. This apparatus embodiment is similar to... Figure 4 The method embodiment shown corresponds to this. The device 700 includes:

[0210] The second determining module 710 is configured to determine the selection adjacency matrix among the plurality of user nodes using a trained attention model; wherein the attention model employs, for example... Figure 2 The method described above is used for training;

[0211] The third propagation module 720 is configured to aggregate the neighbor node representations in the third relation network to the corresponding user nodes based on the selected adjacency matrix and according to several types of propagation paths centered on user nodes, thereby obtaining several types of third user aggregation representations of user nodes.

[0212] The first fusion module 730 is configured to fuse several types of third user aggregation representations of any user node through the first representation aggregation model to obtain a user fusion representation.

[0213] The second association module 740 is configured to determine a second predicted association relationship between user nodes and object nodes based on the user fusion representation and the object representation in the third relationship network.

[0214] The second loss module 750 is configured to determine a second predicted loss based on the difference between the second predicted association and the second existing association; wherein the second existing association is the existing association between user nodes and object nodes in the third relationship network;

[0215] The second update module 760 is configured to update the first representation aggregation model based on the second prediction loss.

[0216] In one implementation, the second association module 740 includes:

[0217] The second propagation submodule (not shown in the figure) is configured to aggregate the neighbor node representations in the third relation network to the corresponding object nodes based on the adjacency matrix between user nodes and object nodes, according to several types of propagation paths centered on object nodes, thereby obtaining several types of third object aggregation representations of object nodes.

[0218] The second fusion submodule (not shown in the figure) is configured to fuse several types of third-class object aggregation representations of any object node through the second representation aggregation model to obtain the object fusion representation.

[0219] The second association submodule (not shown in the figure) is configured to determine a second predicted association relationship between user nodes and object nodes based on the user fusion representation and the object fusion representation.

[0220] In one implementation, the second update module 760 is specifically configured as follows:

[0221] The first representation aggregation model and the second representation aggregation model are updated based on the second prediction loss.

[0222] In one implementation, the second loss module 750 includes:

[0223] The first determining submodule (not shown in the figure) is configured to determine the neighboring user nodes selected by the attention model from the neighboring user nodes of the user node;

[0224] The second determining submodule (not shown in the figure) is configured to determine the first similarity between the user node and the selected neighboring user node, and to determine the second similarity between the user node and user nodes other than the selected neighboring user node;

[0225] The first loss submodule (not shown in the figure) is configured to determine the first sub-loss based on the first similarity and the second similarity;

[0226] The second loss submodule (not shown in the figure) is configured to determine the second sub-loss based on the difference between the second predicted association and the second existing association;

[0227] The third determining submodule (not shown in the figure) is configured to determine the second predicted loss based on the first sub-loss and the second sub-loss.

[0228] In one implementation, the several types of propagation paths centered on user nodes include object nodes.

[0229] In one implementation, the association between user nodes and object nodes in the third relationship network is updated relative to the association between user nodes and object nodes in the first relationship network.

[0230] The above-described apparatus embodiments correspond to the method embodiments, and detailed descriptions can be found in the description of the method embodiments section, which will not be repeated here. The apparatus embodiments are derived based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments; detailed descriptions can be found in the corresponding method embodiments.

[0231] This specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform... Figures 1 to 4 Any one of the methods described.

[0232] This specification also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement... Figures 1 to 4 Any one of the methods described.

[0233] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for storage media and computing devices are basically similar to the method embodiments, so they are described more simply; relevant parts can be referred to the descriptions of the method embodiments.

[0234] Those skilled in the art will recognize that the functions described in the embodiments of the present invention in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.

[0235] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, or improvements made based on the technical solutions of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for training an attention model based on neighbor users in a relationship network, wherein, The first relational network includes multiple user nodes and multiple product nodes, as well as edges representing the relationships between different nodes; the method includes: Using the attention model, based on the user node representation in the first relational network, the neighboring user nodes of the user node are selected to obtain the selection attention of the user node to its neighboring user nodes, and a selection adjacency matrix containing the information in the selection attention is determined among multiple user nodes. Using a graph neural network, based on the selected adjacency matrix, the neighbor node representations in the first relational network are propagated to the corresponding user nodes to obtain the first user aggregate representation of the user nodes. Based on the first user aggregation representation and the product representation in the first relationship network, a first predicted association relationship between user nodes and product nodes is determined; wherein, the first predicted association relationship represents the user's click behavior on the product, and the first predicted association relationship is used as the basis for pushing products to the user. Based on the difference between the first predicted association and the first existing association, a first predicted loss is determined; wherein, the first existing association is the existing association between user nodes and product nodes in the first relationship network. The attention model is updated at least based on the first prediction loss.

2. The method according to claim 1, wherein the attention model comprises a neural network and a selection unit; The steps of selecting neighboring user nodes of a user node and determining the selection adjacency matrix containing information from the selection attention among multiple user nodes include: The neural network is used to determine the initial attention of a user node to its neighboring user nodes based on the user node representation in the first relationship network. The selection unit selects neighboring user nodes based on the initial attention, obtains the selection attention of user nodes to their neighboring user nodes, and determines a selection adjacency matrix containing information from the selection attention among multiple user nodes.

3. The method according to claim 2, wherein the step of selecting the neighboring user node based on the initial attention includes: Using a differentiable sampling function, neighboring user nodes are sampled based on the initial attention.

4. The method according to claim 2, wherein the step of determining the selection adjacency matrix containing information in the selection attention among multiple user nodes includes: Determine the first original adjacency matrix among the plurality of user nodes; The selected adjacency matrix is ​​determined based on the product of the selected attention matrix and the first original adjacency matrix; wherein the selected attention matrix contains the selected attention of multiple user nodes to their neighboring user nodes.

5. The method according to claim 1, wherein the step of propagating the neighbor node representations in the first relational network to the corresponding user nodes comprises: Based on the selected adjacency matrix and the adjacency matrix between user nodes and product nodes, the neighbor user node representations and neighbor product node representations in the first relationship network are propagated to the corresponding user nodes.

6. The method according to claim 1, wherein the step of determining the first predicted association relationship between the user node and the product node includes: Based on the adjacency matrix between the product node and its neighbor nodes in the first relational network, the neighbor node representation is propagated to the corresponding product node to obtain the first aggregate representation of the product node. Based on the first user aggregation representation and the first item aggregation representation, a first predicted association relationship between user nodes and item nodes is determined.

7. The method of claim 1, wherein the step of updating at least the attention model based on the first prediction loss comprises: The attention model and the graph neural network are updated based on the first prediction loss.

8. A method for determining node representations in a relational network, wherein, The second relationship network includes multiple user nodes and multiple product nodes, as well as edges representing the relationships between different nodes; the method includes: The selected adjacency matrix among the plurality of user nodes is determined using the trained attention model; wherein the attention model is trained using the method described in claim 1. Based on the selected adjacency matrix, the neighbor node representations in the second relationship network are propagated to the corresponding user nodes to obtain the second user aggregation representation of the user nodes; wherein, the second user aggregation representation is used to determine the association relationship between the user and the product, the association relationship represents the user's click behavior on the product, and is used as the basis for pushing products to the user.

9. The method according to claim 8, wherein the step of propagating the neighbor node representations in the second relationship network to the corresponding user nodes comprises: Based on the selected adjacency matrix and the adjacency matrix between user nodes and product nodes, the neighbor user node representations and neighbor product node representations in the second relationship network are propagated to the corresponding user nodes.

10. A method for training a representation aggregation model for node representations in an aggregation relation network, wherein, The third relationship network includes multiple user nodes and multiple product nodes, as well as edges representing the relationships between different nodes. The method includes: The selected adjacency matrix among the plurality of user nodes is determined using the trained attention model; wherein the attention model is trained using the method described in claim 1. Based on the selected adjacency matrix, according to several types of propagation paths centered on user nodes, the neighbor node representations in the third relation network are aggregated to the corresponding user nodes, respectively obtaining several types of third user aggregation representations of user nodes. By using the first representation aggregation model, several types of third-level user aggregation representations of any user node are fused to obtain a user fusion representation. Based on the user fusion representation and the product representation in the third relationship network, a second predicted association relationship between user nodes and product nodes is determined; wherein, the second predicted association relationship represents the user's click behavior on the product, and the second predicted association relationship is used as the basis for pushing products to the user; Based on the difference between the second predicted association and the second existing association, a second predicted loss is determined; wherein, the second existing association is the existing association between user nodes and product nodes in the third relationship network; The first representation aggregation model is updated based on the second prediction loss.

11. The method according to claim 10, wherein the step of determining the second predicted association relationship between the user node and the product node comprises: Based on the adjacency matrix between user nodes and product nodes, and following several types of propagation paths centered on product nodes, the neighbor node representations in the third relation network are aggregated to the corresponding product nodes, resulting in several types of third-party aggregation representations of product nodes. By using the second representation aggregation model, several types of third-order aggregated representations of any commodity node are fused to obtain the fused representation of the commodity. Based on the user fusion representation and the item fusion representation, a second predicted association relationship between user nodes and item nodes is determined.

12. The method of claim 11, wherein the step of updating the first representation aggregation model based on the second prediction loss comprises: The first representation aggregation model and the second representation aggregation model are updated based on the second prediction loss.

13. The method of claim 10, wherein the step of determining the second prediction loss comprises: Determine the neighboring user nodes selected by the attention model from among the neighboring user nodes of the user node; Determine a first similarity between the user node and the selected neighboring user nodes, and determine a second similarity between the user node and user nodes other than the selected neighboring user nodes; Based on the first similarity and the second similarity, a first sub-loss is determined; Based on the difference between the second predicted association and the second existing association, a second sub-loss is determined; The second prediction loss is determined based on the first sub-loss and the second sub-loss.

14. The method according to claim 10, wherein the association between user nodes and product nodes in the third relationship network is updated relative to the association between user nodes and product nodes in the first relationship network.

15. A training device for an attention model based on neighboring users in a relational network, wherein, The first relational network includes multiple user nodes and multiple product nodes, as well as edges representing the relationships between different nodes; the device includes: The first attention module is configured to select neighboring user nodes of a user node based on the user node representation in the first relationship network through the attention model, obtain the selection attention of the user node to its neighboring user nodes, and determine a selection adjacency matrix containing information in the selection attention among multiple user nodes. The first propagation module is configured to propagate the neighbor node representations in the first relation network to the corresponding user nodes through a graph neural network based on the selected adjacency matrix, thereby obtaining the first user aggregate representation of the user nodes. The first association module is configured to determine a first predicted association relationship between user nodes and product nodes based on the first user aggregation representation and the product representation in the first relationship network; wherein, the first predicted association relationship represents the user's click behavior on the product, and the first predicted association relationship is used as the basis for pushing products to the user. The first loss module is configured to determine a first predicted loss based on the difference between the first predicted association and the first existing association; wherein, the first existing association is the existing association between user nodes and product nodes in the first relationship network; The first update module is configured to update at least the attention model based on the first prediction loss.

16. A device for determining node representations in a relational network, wherein, The second relationship network includes multiple user nodes and multiple product nodes, as well as edges representing the relationships between different nodes; the device includes: The first determining module is configured to determine the selection adjacency matrix among the plurality of user nodes using a trained attention model; wherein the attention model is trained using the method described in claim 1. The second propagation module is configured to propagate the neighbor node representations in the second relationship network to the corresponding user nodes based on the selected adjacency matrix, thereby obtaining the second user aggregation representation of the user nodes; wherein, the second user aggregation representation is used to determine the association relationship between the user and the product, the association relationship represents the user's click behavior on the product, and is used as the basis for pushing products to the user.

17. A training device for a representation aggregation model for node representation in an aggregation relation network, wherein, The third relationship network includes multiple user nodes and multiple product nodes, as well as edges representing the relationships between different nodes. The device includes: The second determining module is configured to determine the selection adjacency matrix among the plurality of user nodes using a trained attention model; wherein the attention model is trained using the method described in claim 1. The third propagation module is configured to propagate the neighbor node representations in the third relation network to the corresponding user nodes based on the selected adjacency matrix and according to several types of propagation paths centered on the user nodes, thereby obtaining several types of third user aggregation representations of the user nodes. The first fusion module is configured to fuse several types of third-user aggregate representations of any user node through a first representation aggregation model to obtain a user fusion representation. The second association module is configured to determine a second predicted association relationship between user nodes and product nodes based on the user fusion representation and the product representation in the third relationship network; wherein, the second predicted association relationship represents the user's click behavior on the product, and the second predicted association relationship is used as the basis for pushing products to the user; The second loss module is configured to determine a second predicted loss based on the difference between the second predicted association and the second existing association; wherein the second existing association is the existing association between user nodes and product nodes in the third relationship network; The second update module is configured to update the first representation aggregation model based on the second prediction loss.

18. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of any one of claims 1-14.

19. A computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-14.