Resource recommendation method and device, training method and device, electronic equipment and storage medium

By using a jointly trained resource recommendation model, which utilizes account and resource feature representation networks to determine the graph features of target accounts and resources, the model solves the problems of low training efficiency and accuracy of existing models, and achieves more efficient and accurate resource recommendation.

CN116028714BActive Publication Date: 2026-06-12BEIJING DAJIA INTERNET INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
Filing Date
2023-01-09
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing resource recommendation models based on graph feature representation suffer from poor training timeliness and low recommendation accuracy, mainly due to insufficient timeliness and low recommendation accuracy caused by staged training.

Method used

By obtaining candidate resources and candidate accounts from the account-resource relationship graph, the first target feature representation network and the second target feature representation network, which are jointly trained, are used to determine the features of the account graph and the resource graph. The target recommendation information prediction network is then used to process the information and directly recommend resources.

🎯Benefits of technology

This improves the training timeliness and recommendation accuracy of the resource recommendation model, avoids the inaccuracy problem caused by the sparsity of account and resource relationships, and achieves more efficient and accurate resource recommendation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116028714B_ABST
    Figure CN116028714B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a resource recommendation method, a training method, a device, an electronic device and a storage medium. The resource recommendation method comprises: obtaining at least one candidate resource having an association relationship with a target account in an account-resource relationship graph, and obtaining at least one candidate account having an association relationship with a target resource; determining an account graph feature of the target account according to an account feature of the target account and a resource feature of the at least one candidate resource through a first feature representation network, and determining a resource graph feature of the target resource according to a resource feature of the target resource and an account feature of the at least one candidate account through a second feature representation network; processing the account graph feature and the resource graph feature through a recommendation information prediction network to determine whether to recommend the target resource to the target account; and the first feature representation network, the second feature representation network and the recommendation information prediction network are a resource recommendation model obtained through joint training. The present disclosure improves the accuracy of resource recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of Internet technology, and in particular to a resource recommendation method, training method, apparatus, electronic device, and storage medium. Background Technology

[0002] In related technologies, resource recommendation models based on graph feature representations are generally trained in stages. Specifically, based on a large-scale relationship graph constructed offline, the first stage uses algorithms such as DeepWalk or GraphSage to stream train the model and produce graph feature representations. In the second stage, the produced graph feature representations are used for offline computation and recall, or directly concatenated as fixed features into the ranking model for use as features.

[0003] Because the training is conducted in stages, the second stage must be conducted only after the first stage is completed, resulting in poor timeliness and low recommendation accuracy. Summary of the Invention

[0004] This disclosure provides a resource recommendation method, training method, apparatus, electronic device, and storage medium to at least solve the problems of low training timeliness and low recommendation accuracy in related technologies. The technical solution of this disclosure is as follows:

[0005] According to a first aspect of the present disclosure, a resource recommendation method is provided, comprising:

[0006] In the account resource relationship graph, at least one candidate resource that is associated with the target account is obtained, and at least one candidate account that is associated with the target resource is obtained in the account resource relationship graph, wherein the account resource relationship graph is a heterogeneous graph constructed based on the relationship between accounts and resources;

[0007] The first target feature representation network determines the account graph features of the target account based on the account features of the target account and the resource features of at least one candidate resource, and the second target feature representation network determines the resource graph features of the target resource based on the resource features of the target resource and the account features of at least one candidate account.

[0008] The target recommendation information prediction network processes the account graph features and the resource graph features to determine whether to recommend the target resource to the target account.

[0009] The first target feature representation network, the second target feature representation network, and the target recommendation information prediction network are jointly trained resource recommendation models.

[0010] Optionally, the step of determining the account graph features of the target account through the first target feature representation network based on the account features of the target account and the resource features of at least one of the candidate resources includes:

[0011] The resource features of at least one of the candidate resources are fused through the first target feature representation network to obtain resource fusion features;

[0012] The first target feature representation network concatenates the account features of the target account and the resource fusion features to form the account graph features of the target account.

[0013] Optionally, the step of determining the resource graph features of the target resource through the second target feature representation network based on the resource features of the target resource and the account features of at least one of the candidate accounts includes:

[0014] The second target feature representation network fuses the account features of at least one of the candidate accounts to obtain account fusion features;

[0015] The second target feature representation network concatenates the resource features of the target resource and the account fusion features into the resource graph features of the target resource.

[0016] Optionally, before processing the account graph features and the resource graph features through the target recommendation information prediction network, the method further includes:

[0017] Obtain the account statistical characteristics of the target account and the resource statistical characteristics of the target resource;

[0018] The account statistical features and the resource statistical features are concatenated into a statistical feature;

[0019] The step of processing the account graph features and the resource graph features through a target recommendation information prediction network to determine whether to recommend the target resource's recommendation information to the target account includes:

[0020] The target recommendation information prediction network processes the statistical features, the account graph features, and the resource graph features to determine whether to recommend the target resource to the target account.

[0021] According to a second aspect of the present disclosure, a method for training a resource recommendation model is provided, comprising:

[0022] Obtain the annotation of recommendation information between sample accounts and sample resources;

[0023] In the account resource relationship graph, at least one resource that is associated with the sample account is obtained as a candidate account resource, and at least one account that is associated with the sample resource is obtained as a candidate resource account. The account resource relationship graph is a heterogeneous graph constructed based on the relationship between accounts and resources.

[0024] The first feature representation network determines the sample account graph features of the sample account based on the sample account features of the sample account and the resource features of at least one candidate resource of the account, and the second feature representation network determines the sample resource graph features of the sample resource based on the sample resource features of the sample resource and the account features of at least one candidate resource account.

[0025] The sample account graph features and sample resource graph features are processed by a recommendation information prediction network to determine whether to recommend the sample resource prediction information to the sample account.

[0026] Based on the difference between the predicted recommendation information and the labeled recommendation information, the first feature representation network, the second feature representation network, and the recommendation information prediction network are trained to obtain a resource recommendation model.

[0027] Optionally, the step of training the first feature representation network, the second feature representation network, and the recommendation information prediction network based on the difference between the predicted recommendation information and the labeled recommendation information to obtain a resource recommendation model includes:

[0028] The first loss function value is determined based on the difference between the predicted recommendation information and the labeled recommendation information;

[0029] Based on the first loss function value, the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network are adjusted to obtain the first target feature representation network, the second target feature representation network, and the target recommendation information prediction network.

[0030] The resource recommendation model is determined based on the first target feature representation network, the second target feature representation network, and the target recommendation information prediction network.

[0031] Optionally, before adjusting the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network based on the first loss function value, the method further includes:

[0032] Obtain the positive and negative sample resources corresponding to the sample account in the account resource relationship graph, and obtain the positive and negative sample accounts corresponding to the sample resources in the account resource relationship graph;

[0033] The positive sample resource graph features of the positive sample resource are determined by the second feature representation network, the negative sample resource graph features of the negative sample resource are determined by the second feature representation network, the positive sample account graph features of the positive sample account are determined by the first feature representation network, and the negative sample account graph features of the negative sample account are determined by the first feature representation network.

[0034] The second loss function value is determined based on the sample account graph features, sample resource graph features, positive sample resource graph features, negative sample resource graph features, positive sample account graph features, and negative sample account graph features.

[0035] The step of adjusting the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network based on the first loss function value includes:

[0036] Based on the first loss function value and the second loss function value, the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network are adjusted.

[0037] Optionally, obtaining the positive and negative sample resources corresponding to the sample account in the account resource relationship graph includes:

[0038] In the account resource relationship graph, at least one resource that is associated with the sample account is obtained as a positive sample resource corresponding to the sample account, and at least one resource that is not associated with the sample account is obtained as a negative sample resource corresponding to the sample account.

[0039] The step of obtaining the positive and negative sample accounts corresponding to the sample resources in the account resource relationship graph includes:

[0040] At least one account that is associated with the sample resource is obtained from the account resource relationship graph and is used as the positive sample account corresponding to the sample resource. At least one account that is not associated with the sample resource is obtained from the account resource relationship graph and is used as the negative sample account corresponding to the sample resource.

[0041] Optionally, determining the positive sample resource map features of the positive sample resource through the second feature representation network includes:

[0042] At least one account that is associated with the positive sample resource is obtained from the account resource relationship graph and used as a positive resource candidate account.

[0043] The second feature representation network determines the positive sample resource graph features of the positive sample resource based on the positive sample resource features and the account features of at least one positive resource candidate account;

[0044] The step of determining the negative sample resource map features of the negative sample resource through the second feature representation network includes:

[0045] At least one account that is associated with the negative sample resource is obtained from the account resource relationship graph and used as a negative resource candidate account.

[0046] The second feature representation network determines the negative sample resource graph features of the negative sample resource based on the negative sample resource features of the negative sample resource and the account features of at least one of the negative resource candidate accounts.

[0047] Optionally, determining the positive sample account graph features of the positive sample account through the first feature representation network includes:

[0048] At least one resource that is associated with the positive sample account is obtained from the account resource relationship graph and used as a positive account candidate resource.

[0049] The first feature representation network determines the positive sample account graph features of the positive sample account based on the positive sample account features and the resource features of at least one positive account candidate resource.

[0050] The step of determining the negative sample account graph features of the negative sample account through the first feature representation network includes:

[0051] At least one resource that is associated with the negative sample account is obtained from the account resource relationship graph and used as a candidate resource for the negative account.

[0052] The first feature representation network determines the negative sample account graph features of the negative sample account based on the negative sample account features of the negative sample account and the resource features of at least one negative account candidate resource.

[0053] Optionally, determining the second loss function value based on the sample account graph features, sample resource graph features, positive sample resource graph features, negative sample resource graph features, positive sample account graph features, and the negative sample account graph features includes:

[0054] The similarity between the sample account graph features and the positive sample resource graph features is determined as the positive account similarity, and the similarity between the sample account graph features and the negative sample resource graph features is determined as the negative account similarity.

[0055] The similarity between the sample resource graph features and the positive sample account graph features is determined as the positive resource similarity, and the similarity between the sample resource graph features and the negative sample account graph features is determined as the negative resource similarity.

[0056] The second loss function value is determined based on the positive account similarity, the negative account similarity, the positive resource similarity, and the negative resource similarity.

[0057] Optionally, determining the second loss function value based on the positive account similarity, the negative account similarity, the positive resource similarity, and the negative resource similarity includes:

[0058] The difference between the positive account similarity and the negative account similarity is determined as the first difference, and the negative logarithm of the first difference is determined to obtain the first negative logarithm.

[0059] The difference between the positive resource similarity and the negative resource similarity is determined as the second difference, and the negative logarithm of the second difference is determined to obtain the second negative logarithm.

[0060] The sum of the first negative logarithm and the second negative logarithm is determined as the second loss function value.

[0061] Optionally, before processing the sample account graph features and the sample resource graph features through the recommendation information prediction network, the method further includes:

[0062] Obtain the account statistical characteristics of the sample accounts and the resource statistical characteristics of the sample resources;

[0063] The account statistical features and the resource statistical features are concatenated into a statistical feature;

[0064] The step of processing the sample account graph features and the sample resource graph features through a recommendation information prediction network to determine whether to recommend the predicted recommendation information of the sample resource to the sample account includes:

[0065] The recommendation information prediction network processes the account statistical features, sample account graph features, and sample resource graph features to determine whether to recommend the predicted recommendation information of the sample resource to the sample account.

[0066] According to a third aspect of the present disclosure, a resource recommendation apparatus is provided, comprising:

[0067] The graph relationship acquisition module is configured to acquire at least one candidate resource that is associated with the target account in the account resource relationship graph, and acquire at least one candidate account that is associated with the target resource in the account resource relationship graph, wherein the account resource relationship graph is a heterogeneous graph constructed based on the relationship between accounts and resources;

[0068] The graph feature determination module is configured to perform the following: determining the account graph features of the target account based on the account features of the target account and the resource features of at least one candidate resource through a first target feature representation network; and determining the resource graph features of the target resource based on the resource features of the target resource and the account features of at least one candidate account through a second target feature representation network.

[0069] The recommendation information determination module is configured to process the account graph features and the resource graph features through a target recommendation information prediction network to determine whether to recommend the target resource's recommendation information to the target account;

[0070] The first target feature representation network, the second target feature representation network, and the target recommendation information prediction network are jointly trained resource recommendation models.

[0071] Optionally, the graph feature determination module includes:

[0072] The first feature fusion unit is configured to perform resource feature fusion on at least one of the candidate resources through the first target feature representation network to obtain resource fusion features;

[0073] The account graph feature determination unit is configured to perform the operation of concatenating the account features of the target account and the resource fusion features into the account graph features of the target account through the first target feature representation network.

[0074] Optionally, the graph feature determination module includes:

[0075] The second feature fusion unit is configured to perform account feature fusion on at least one of the candidate accounts through the second target feature representation network to obtain account fusion features;

[0076] The resource graph feature determination unit is configured to perform the concatenation of the resource features of the target resource and the account fusion features into the resource graph features of the target resource through the second target feature representation network.

[0077] Optionally, the device further includes:

[0078] The feature acquisition module is configured to acquire the account statistical features of the target account and the resource statistical features of the target resource;

[0079] The statistical feature determination module is configured to concatenate the account statistical features and the resource statistical features into a statistical feature.

[0080] The recommendation information determination module is configured to execute:

[0081] The target recommendation information prediction network processes the statistical features, the account graph features, and the resource graph features to determine whether to recommend the target resource to the target account.

[0082] According to a fourth aspect of the present disclosure, a training apparatus for a resource recommendation model is provided, comprising:

[0083] The annotation acquisition module is configured to acquire and annotate the recommendation information between sample accounts and sample resources.

[0084] The sample graph relationship acquisition module is configured to acquire at least one resource that is associated with the sample account in the account resource relationship graph as a candidate account resource, and acquire at least one account that is associated with the sample resource in the account resource relationship graph as a candidate resource account, wherein the account resource relationship graph is a heterogeneous graph constructed based on the relationship between accounts and resources;

[0085] The sample graph feature determination module is configured to perform the following: determining the sample account graph features of the sample account based on the sample account features of the sample account and the resource features of at least one candidate resource of the account through a first feature representation network; and determining the sample resource graph features of the sample resource based on the sample resource features of the sample resource and the account features of at least one candidate resource account through a second feature representation network.

[0086] The prediction result acquisition module is configured to process the sample account graph features and the sample resource graph features through a recommendation information prediction network to determine whether to recommend the sample resource prediction information to the sample account.

[0087] The model training module is configured to train the first feature representation network, the second feature representation network, and the recommendation information prediction network based on the difference between the predicted recommendation information and the recommendation information annotation, thereby obtaining a resource recommendation model.

[0088] Optionally, the model training module includes:

[0089] The first loss value determination unit is configured to determine a first loss function value based on the difference between the predicted recommendation information and the recommendation information annotation;

[0090] The network parameter adjustment unit is configured to adjust the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network according to the first loss function value, so as to obtain the first target feature representation network, the second target feature representation network, and the target recommendation information prediction network;

[0091] The resource recommendation model is determined based on the first target feature representation network, the second target feature representation network, and the target recommendation information prediction network.

[0092] Optionally, the model training module further includes:

[0093] The positive and negative sample acquisition unit is configured to acquire the positive and negative sample resources corresponding to the sample account in the account resource relationship graph, and acquire the positive and negative sample accounts corresponding to the sample resources in the account resource relationship graph.

[0094] The positive and negative sample graph feature determination unit is configured to perform the following operations: determine the positive sample resource graph features of the positive sample resource through the second feature representation network; determine the negative sample resource graph features of the negative sample resource through the second feature representation network; determine the positive sample account graph features of the positive sample account through the first feature representation network; and determine the negative sample account graph features of the negative sample account through the first feature representation network.

[0095] The second loss value determination unit is configured to determine a second loss function value based on the sample account graph features, sample resource graph features, positive sample resource graph features, negative sample resource graph features, positive sample account graph features, and the negative sample account graph features.

[0096] The network parameter adjustment unit is configured to perform:

[0097] Based on the first loss function value and the second loss function value, the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network are adjusted.

[0098] Optionally, the positive and negative sample acquisition unit includes:

[0099] The positive and negative sample resource acquisition subunit is configured to acquire at least one resource that is associated with the sample account in the account resource relationship graph, as the positive sample resource corresponding to the sample account, and acquire at least one resource that is not associated with the sample account in the account resource relationship graph, as the negative sample resource corresponding to the sample account.

[0100] The positive and negative sample account acquisition subunit is configured to acquire at least one account that is associated with the sample resource in the account resource relationship graph as the positive sample account corresponding to the sample resource, and acquire at least one account that is not associated with the sample resource in the account resource relationship graph as the negative sample account corresponding to the sample resource.

[0101] Optionally, the positive and negative sample image feature determination unit includes:

[0102] The positive sample resource graph feature determination subunit is configured to perform the following: obtain at least one account that is associated with the positive sample resource in the account resource relationship graph as a positive resource candidate account; and determine the positive sample resource graph feature of the positive sample resource by the second feature representation network based on the positive sample resource feature of the positive sample resource and the account feature of at least one of the positive resource candidate accounts.

[0103] The negative sample resource graph feature determination subunit is configured to perform the following operations: obtain at least one account associated with the negative sample resource in the account resource relationship graph as a negative resource candidate account; and determine the negative sample resource graph features of the negative sample resource by the second feature representation network based on the negative sample resource features of the negative sample resource and the account features of at least one of the negative resource candidate accounts.

[0104] Optionally, the positive and negative sample image feature determination unit includes:

[0105] The positive sample account graph feature determination subunit is configured to perform the following operations: obtain at least one resource associated with the positive sample account in the account resource relationship graph as a positive account candidate resource; and determine the positive sample account graph features of the positive sample account by the first feature representation network based on the positive sample account features of the positive sample account and the resource features of at least one of the positive account candidate resources.

[0106] The negative sample account graph feature determination subunit is configured to perform the following operations: obtain at least one resource associated with the negative sample account in the account resource relationship graph as a negative account candidate resource; and determine the negative sample account graph features of the negative sample account by the first feature representation network based on the negative sample account features of the negative sample account and the resource features of at least one of the negative account candidate resources.

[0107] Optionally, the second loss value determination unit includes:

[0108] The account similarity determination subunit is configured to determine the similarity between the sample account graph features and the positive sample resource graph features as positive account similarity, and to determine the similarity between the sample account graph features and the negative sample resource graph features as negative account similarity.

[0109] The resource similarity determination subunit is configured to determine the similarity between the sample resource graph features and the positive sample account graph features as positive resource similarity, and to determine the similarity between the sample resource graph features and the negative sample account graph features as negative resource similarity.

[0110] The second loss value determination subunit is configured to determine the second loss function value based on the positive account similarity, the negative account similarity, the positive resource similarity, and the negative resource similarity.

[0111] Optionally, the second loss value determination subunit is configured to execute:

[0112] The difference between the positive account similarity and the negative account similarity is determined as the first difference, and the negative logarithm of the first difference is determined to obtain the first negative logarithm.

[0113] The difference between the positive resource similarity and the negative resource similarity is determined as the second difference, and the negative logarithm of the second difference is determined to obtain the second negative logarithm.

[0114] The sum of the first negative logarithm and the second negative logarithm is determined as the second loss function value.

[0115] Optionally, the device further includes:

[0116] The feature acquisition module is configured to acquire the account statistical features of the sample account and the resource statistical features of the sample resource;

[0117] The statistical feature determination module is configured to concatenate the account statistical features and the resource statistical features into a statistical feature.

[0118] The prediction result acquisition module is configured to execute:

[0119] The recommendation information prediction network processes the account statistical features, sample account graph features, and sample resource graph features to determine whether to recommend the predicted recommendation information of the sample resource to the sample account.

[0120] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising:

[0121] processor;

[0122] Memory used to store the processor's executable instructions;

[0123] The processor is configured to execute the instructions to implement the resource recommendation method as described in the first aspect or the training method for the resource recommendation model as described in the second aspect.

[0124] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, wherein when instructions in the computer storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the resource recommendation method as described in the first aspect or to implement the training method for the resource recommendation model as described in the second aspect.

[0125] According to a seventh aspect of the present disclosure, a computer program product is provided, including a computer program or computer instructions, which, when executed by a processor, implement the resource recommendation method as described in the first aspect or the training method for the resource recommendation model as described in the second aspect.

[0126] The technical solutions provided by the embodiments of this disclosure bring at least the following beneficial effects:

[0127] This embodiment of the disclosure obtains at least one candidate resource associated with the target account in the account resource relationship graph, and at least one candidate account associated with the target resource in the account resource relationship graph. A first target feature representation network determines the account graph features of the target account based on the account features of the target account and the resource features of at least one candidate resource. A second target feature representation network determines the resource graph features of the target resource based on the resource features of the target resource and the account features of at least one candidate account. Then, a target recommendation information prediction network processes the account graph features and resource graph features to determine whether to recommend target resource information to the target account. Since the first target feature representation network, the second target feature representation network, and the target recommendation information prediction network are jointly trained, the resource recommendation model only needs to be jointly trained once and can be directly used for resource recommendation, improving the timeliness of model training. Moreover, based on the account graph features and resource graph features, the relationship between the target account and the target resource can be accurately determined, avoiding the problem of inaccurate recommendations caused by the sparsity of the relationship between accounts and resources, thereby improving the accuracy of recommendation information determination and thus improving the accuracy of resource recommendation.

[0128] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0129] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0130] Figure 1 This is a flowchart illustrating a resource recommendation method according to an exemplary embodiment;

[0131] Figure 2a This is a schematic diagram of the structure of the first target feature representation network in this embodiment of the present disclosure;

[0132] Figure 2b This is a schematic diagram of the structure of the second target feature representation network in an embodiment of this disclosure;

[0133] Figure 3 This is a schematic diagram of the structure of the resource recommendation model in this embodiment of the disclosure;

[0134] Figure 4 This is a flowchart illustrating a training method for a resource recommendation model according to an exemplary embodiment;

[0135] Figure 5 This is a flowchart illustrating a training method for a resource recommendation model according to an exemplary embodiment;

[0136] Figure 6 This is a block diagram illustrating a resource recommendation apparatus according to an exemplary embodiment;

[0137] Figure 7 This is a block diagram illustrating a training apparatus for a resource recommendation model according to an exemplary embodiment;

[0138] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation

[0139] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0140] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0141] Figure 1 This is a flowchart illustrating a resource recommendation method according to an exemplary embodiment, such as... Figure 1 As shown, this resource recommendation method is used in electronic devices such as servers and includes the following steps.

[0142] In step S11, at least one candidate resource that is associated with the target account is obtained in the account resource relationship graph, and at least one candidate account that is associated with the target resource is obtained in the account resource relationship graph, wherein the account resource relationship graph is a heterogeneous graph constructed based on the relationship between accounts and resources.

[0143] The resources mentioned may be resources such as videos, images, or information.

[0144] In many resource recommendation scenarios, the relationship between accounts and resources, and other data objects, presents an irregular and complex graph. For example, in video recommendation, when a user clicks on a video, the client's download sequence generates a massive graph of account-resource relationships. This disclosure aims to uncover deeper object connections within the constantly changing account-resource relationship graph to provide better resource recommendation results.

[0145] In offline mode, all relationships between accounts and resources are obtained, and a heterogeneous graph of accounts and resources is constructed based on these relationships. This involves establishing graph connections between related accounts and resources to obtain the heterogeneous graph. Relationships can include, for example, clicks or activations.

[0146] After obtaining the target resource based on the target account's resource recommendation request, it is determined whether to recommend the target resource's recommendation information to the target account, and then, based on the recommendation information, it is determined whether the target resource needs to be recommended to the target account. The recommendation information may include information such as predicted click-through rate or predicted conversion rate.

[0147] When determining whether to recommend target resources to a target account, the recommendation information between the target account and the target resource can be determined based on the account-resource relationship graph. This involves obtaining all resources associated with the target account from the account-resource relationship graph, sampling a certain number of these resources to obtain at least one candidate resource, and then obtaining all accounts associated with the target resource from the same graph, sampling a certain number of these accounts to obtain at least one candidate account. The number of candidate resources is the same as the number of candidate accounts. At least one candidate resource can be represented as {I_0,I_1,…,I_n}, and at least one candidate account can be represented as {U_0,U_1,…,U_n}, where n represents the number of candidate resources or candidate accounts.

[0148] In step S12, the first target feature representation network determines the account graph feature of the target account based on the account feature of the target account and the resource feature of at least one candidate resource, and the second target feature representation network determines the resource graph feature of the target resource based on the resource feature of the target resource and the account feature of at least one candidate account.

[0149] The first target feature representation network and the second target feature representation network are both parts of the resource recommendation model. The first target feature representation network is used to determine the graph features of accounts, and the second target feature representation network is used to determine the graph features of resources. The resource recommendation model is an end-to-end deep learning model. Account features are inherent features of an account, such as account identification information; resource features are inherent features of a resource, such as resource identification information and resource type.

[0150] The account features of the target account and the resource features of at least one candidate resource are input into a first target feature representation network. This network represents the account features of the target account and the resource features of at least one candidate resource, resulting in the account graph features of the target account. Similarly, the resource features of the target resource and the account features of at least one candidate account are input into a second target feature representation network. This network represents the resource graph features of the target resource and the account features of at least one candidate account, resulting in the resource graph features of the target resource. By using the graph features determined through the account-resource relationship graph, account interest exploration and the discovery of implicit account interest signals can be achieved. This strengthens the account-side representation and resource-side learning of the resource recommendation model, alleviating the problem of sparse relationships between individual accounts and individual resources, thereby improving resource recommendation performance.

[0151] In an exemplary embodiment, determining the account graph features of the target account based on the account features of the target account and the resource features of at least one of the candidate resources through the first target feature representation network includes: fusing the resource features of at least one of the candidate resources through the first target feature representation network to obtain resource fusion features; and concatenating the account features of the target account and the resource fusion features through the first target feature representation network to form the account graph features of the target account.

[0152] The account features of the target account and the resource features of at least one candidate resource are input into a first target feature representation network. This network first fuses the resource features of the at least one candidate resource, which can be done using averaging, attention mechanisms, or least long-range algorithms. TOperations such as M are used to perform feature fusion to obtain resource fusion features. Then, the first target feature representation network concatenates the account features of the target account and the resource fusion features to obtain the account graph features of the target account. By fusing the resource features of at least one candidate resource and then concatenating them with the account features of the target account, the account graph features of the target account are obtained. This can more accurately reflect the graph relationship between the target account and the candidate resources, thus obtaining more accurate account graph features.

[0153] Figure 2a This is a schematic diagram of the structure of the first target feature representation network in this embodiment of the present disclosure, as shown below. Figure 2a As shown, the first target feature representation network includes a first feature fusion module 1 and a first concatenation module 2. The first feature fusion module 1 is used to perform feature fusion on the resource features of at least one candidate resource to obtain resource fusion features. The feature fusion can be achieved by operations such as averaging, attention mechanism, and LSTM. The first concatenation module 2 is used to concatenate the resource fusion features with the account features of the target account to obtain the account graph features of the target account.

[0154] In an exemplary embodiment, determining the resource graph features of the target resource based on the resource features of the target resource and the account features of at least one candidate account through the second target feature representation network includes: fusing the account features of at least one candidate account through the second target feature representation network to obtain account fusion features; and concatenating the resource features of the target resource and the account fusion features through the second target feature representation network to form the resource graph features of the target resource.

[0155] The resource features of the target resource and the account features of at least one candidate account are input into a second target feature representation network. This network first fuses the account features of the at least one candidate account using methods such as averaging, attention mechanisms, or LSTM (Long Short-Term Memory) to obtain fused account features. Then, the second target feature representation network concatenates the resource features of the target resource and the fused account features to obtain the resource graph features of the target resource. By fusing the account features of at least one candidate account and then concatenating them with the resource features of the target resource, the resource graph features of the target resource are obtained. This approach more accurately reflects the graph relationship between the target resource and candidate accounts, resulting in more accurate resource graph features.

[0156] Figure 2b This is a schematic diagram of the structure of the second target feature representation network in an embodiment of this disclosure, as shown below. Figure 2bAs shown, the second target feature representation network includes a second feature fusion module 3 and a second concatenation module 4. The second feature fusion module 3 is used to perform feature fusion on the account features of at least one candidate account to obtain account fusion features. The feature fusion can be achieved by averaging, attention mechanism, LSTM, or other operations. The second concatenation module 4 is used to concatenate the account fusion features with the resource features of the target resource to obtain the resource graph features of the target resource.

[0157] In step S13, the account graph features and the resource graph features are processed by the target recommendation information prediction network to determine whether to recommend the target resource recommendation information to the target account.

[0158] The first target feature representation network, the second target feature representation network, and the target recommendation information prediction network are jointly trained to form a resource recommendation model. This target resource recommendation model is an end-to-end model that can directly obtain recommendation information on whether to recommend a target resource to a target account based on input data. The input data includes the target account's account features, the resource features of at least one candidate resource, the resource features of the target resource, and the account features of at least one candidate account.

[0159] Account graph features and resource graph features are input into the target recommendation information prediction network. The network processes these features to determine whether to recommend target resources to the target account. The recommendation information can be information such as predicted click-through rate or predicted conversion rate.

[0160] The resource recommendation method provided in this exemplary embodiment obtains at least one candidate resource associated with a target account in the account resource relationship graph, and at least one candidate account associated with the target resource in the account resource relationship graph. A first target feature representation network determines the account graph features of the target account based on the account features of the target account and the resource features of at least one candidate resource. A second target feature representation network determines the resource graph features of the target resource based on the resource features of the target resource and the account features of at least one candidate account. Then, a target recommendation information prediction network processes the account graph features and resource graph features to determine whether to recommend target resource information to the target account. Since the first target feature representation network, the second target feature representation network, and the target recommendation information prediction network are jointly trained, the resource recommendation model only needs to be jointly trained once and can be directly used for resource recommendation, improving the timeliness of model training. Moreover, based on the account graph features and resource graph features, the relationship between the target account and the target resource can be accurately determined, avoiding the problem of inaccurate recommendations caused by the sparsity of the relationship between accounts and resources, thereby improving the accuracy of recommendation information determination and thus improving the accuracy of resource recommendation.

[0161] Based on the above technical solution, before processing the account graph features and the resource graph features through the target recommendation information prediction network, the method further includes: obtaining the account statistical features of the target account and obtaining the resource statistical features of the target resource; and concatenating the account statistical features and the resource statistical features into statistical features.

[0162] The step of processing the account graph features and the resource graph features through the target recommendation information prediction network to determine whether to recommend the target resource information to the target account includes: processing the statistical features, the account graph features, and the resource graph features through the target recommendation information prediction network to determine whether to recommend the target resource information to the target account.

[0163] The target account's statistical features include its original sequence features or statistical features, attribute features, and features related to the target account (such as resources viewed by the target account). The target resource's statistical features include its resource information, resource provider information, and other resources provided by the resource provider.

[0164] The system acquires the target account's attribute characteristics and historical behavior data (including resource information associated with the target account). Based on the historical behavior data, it determines the characteristics of resources associated with the target account. Then, based on the attribute characteristics and resource characteristics associated with the target account, it obtains the target account's statistical characteristics. Next, it acquires the target resource's resource information, resource provider information, and other resources provided by the resource provider, obtaining the target resource's resource statistical characteristics. Finally, it uses a feature concatenation network to concatenate the account statistical characteristics and resource statistical characteristics to obtain the statistical characteristics.

[0165] Statistical features, account graph features, and resource graph features are input into the target recommendation information prediction network. The target recommendation information prediction network processes the statistical features, account graph features, and resource graph features to determine whether to recommend target resource information to the target account.

[0166] When determining whether to recommend target resources to a target account, combining statistical and graph features can better identify the relationship between the target account and the target resource, thereby further improving the accuracy of recommendation information determination.

[0167] Figure 3 This is a schematic diagram of the resource recommendation model in an embodiment of this disclosure. For example... Figure 3 As shown, the resource recommendation model may include a feature concatenation network 5, a first target feature representation network 6, a second target feature representation network 7, and a target recommendation information prediction network 8. The feature concatenation network 5 concatenates account statistical features and resource statistical features to obtain statistical features, which serve as an input feature to the target recommendation information prediction network 8. The first target feature representation network 6 represents account graph features, resulting in account graph features. The second target feature representation network 7 represents resource graph features, resulting in resource graph features. The account graph features and resource graph features each serve as an input feature to the target recommendation information prediction network. The target recommendation information prediction network 8 determines whether to recommend target resources to the target account based on the statistical features, account graph features, and resource graph features. The feature concatenation network 5, the first target feature representation network 6, the second target feature representation network 7, and the target recommendation information prediction network 8 are obtained through joint training.

[0168] Figure 4 This is a flowchart illustrating a training method for a resource recommendation model according to an exemplary embodiment, such as... Figure 4 As shown, the training method of this resource recommendation model is used in electronic devices such as servers, and includes the following steps.

[0169] In step S41, the recommendation information annotation between sample accounts and sample resources is obtained.

[0170] Sample accounts and sample resources are acquired, forming sample pairs. Based on the historical behavior data of the sample accounts, it is determined whether there is a relationship between the sample accounts and sample resources. Based on the relationship determination result, recommendation information annotations are determined between the sample accounts and sample resources. For example, if a sample account has clicked on a sample resource, the recommendation information annotation can be 1; if the sample account has no historical behavior related to the sample resource, the recommendation information annotation can be 0.

[0171] In step S42, at least one resource that is associated with the sample account is obtained from the account resource relationship graph as a candidate account resource, and at least one account that is associated with the sample resource is obtained from the account resource relationship graph as a candidate resource account. The account resource relationship graph is a heterogeneous graph constructed based on the relationship between accounts and resources.

[0172] In offline mode, all relationships between accounts and resources are acquired. Based on these relationships, a heterogeneous graph of accounts and resources is constructed. This involves establishing graph connections between related accounts and resources, thus creating the heterogeneous graph. When establishing graph connections, bidirectional connections can be created; for example, if account U clicks resource I, two edges, UI and IU, will be added to the heterogeneous graph. Alternatively, a single, undirected connection edge can be created, representing the relationship between the account and the resource. These relationships can include, for example, clicks or activations.

[0173] All resources associated with the sample account can be obtained from the account resource relationship graph. A certain number of resources can be sampled from these to obtain at least one candidate account resource. Similarly, all accounts associated with the sample resource can be obtained from the account resource relationship graph. A certain number of accounts can be sampled from these to obtain at least one candidate resource account. The number of candidate account resources and the number of candidate resource accounts are the same.

[0174] In step S43, the first feature representation network determines the sample account graph features of the sample account based on the sample account features of the sample account and the resource features of at least one candidate resource of the account, and the second feature representation network determines the sample resource graph features of the sample resource based on the sample resource features of the sample resource and the account features of at least one candidate resource account.

[0175] The first feature representation network and the second feature representation network are both parts of the resource recommendation model. The first feature representation network is used to determine the graph features of the account, and the second feature representation network is used to determine the graph features of the resource. The resource recommendation model is an end-to-end deep learning model. Sample account features are inherent features of the sample account, such as account identification information; sample resource features are inherent features of the sample resource, such as resource identification information and resource type.

[0176] The account features of the sample account and the resource features of at least one candidate account are input into a first feature representation network. This network represents the account features and resource features of the candidate account to obtain the sample account graph features. Similarly, the resource features of the sample resource and the account features of at least one candidate resource account are input into a second feature representation network. This network represents the resource features and resource graph features of the sample resource to obtain the resource graph features. By using the graph features determined through the account-resource relationship graph, account interest exploration and the discovery of implicit account interest signals can be achieved. This strengthens the account-side representation and resource-side learning of the resource recommendation model, alleviating the problem of sparse relationships between individual accounts and individual resources, thereby improving resource recommendation performance.

[0177] The implementation method for determining the sample account graph features of the sample account through the first feature representation network is the same as the implementation method for determining the account graph features of the target account through the first feature representation network. The implementation method for determining the sample resource graph features of the sample resource through the second feature representation network is the same as the implementation method for determining the resource graph features of the target resource through the first feature representation network. Therefore, it will not be described again here.

[0178] In step S44, the sample account graph features and the sample resource graph features are processed by the recommendation information prediction network to determine whether to recommend the predicted recommendation information of the sample resource to the sample account.

[0179] The sample account graph features and sample resource graph features are input into the recommendation information prediction network. The network processes these features to determine whether to recommend predicted information about sample resources to the sample account. This predicted recommendation information can include information such as predicted click-through rate or predicted conversion rate.

[0180] In step S45, based on the difference between the predicted recommendation information and the recommendation information annotation, the first feature representation network, the second feature representation network, and the recommendation information prediction network are trained to obtain a resource recommendation model.

[0181] Based on the difference between the predicted recommendation information and the labeled recommendation information, the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network are adjusted. The training process is iteratively executed based on sample accounts and sample resources until the training termination condition is met, resulting in the resource recommendation model. The training termination condition can be reaching a preset number of training epochs, the network parameters converging, or the loss function value converging, etc.

[0182] The training method for the resource recommendation model provided in this exemplary embodiment achieves joint training of the recommendation information prediction network and the feature representation network by jointly modeling the recommendation information prediction and the graph feature representation. This not only utilizes the graph relationships but also allows the learned features to be directly reflected in the prediction of recommendation information, achieving a better joint modeling effect. This improves the accuracy of the recommendation information obtained by the model and eliminates the need for phased training, thus improving the timeliness of graph-based training.

[0183] Based on the above technical solution, the step of training the first feature representation network, the second feature representation network, and the recommendation information prediction network according to the difference between the predicted recommendation information and the recommendation information annotation to obtain a resource recommendation model includes: determining a first loss function value based on the difference between the predicted recommendation information and the recommendation information annotation; adjusting the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network according to the first loss function value to obtain a first target feature representation network, a second target feature representation network, and a target recommendation information prediction network; and determining the resource recommendation model based on the first target feature representation network, the second target feature representation network, and the recommendation information prediction network.

[0184] The first loss function can be, for example, the cross-entropy loss function, or any other loss function used in recommendation models.

[0185] Based on the difference between the predicted recommendation information and the labeled recommendation information, the first loss function value is determined. Based on the first loss function value, backpropagation is performed to adjust the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network. After training, the first target feature representation network, the second target feature representation network, and the target recommendation information prediction network are obtained. The first target feature representation network, the second target feature representation network, and the target recommendation information prediction network are determined as the resource recommendation model.

[0186] The training of the first feature representation network, the second feature representation network, and the recommendation information prediction network is constrained by the first loss function, so that the predicted recommendation information is as close as possible to the labeled recommendation information, thereby improving the recommendation accuracy of the trained resource recommendation model.

[0187] Figure 5 This is a flowchart illustrating a training method for a resource recommendation model according to an exemplary embodiment, such as... Figure 5 As shown, the training method of this resource recommendation model is used in electronic devices such as servers, and includes the following steps.

[0188] In step S51, the recommendation information annotation between sample accounts and sample resources is obtained.

[0189] In step S52, at least one resource that is associated with the sample account is obtained from the account resource relationship graph as a candidate account resource, and at least one account that is associated with the sample resource is obtained from the account resource relationship graph as a candidate resource account. The account resource relationship graph is a heterogeneous graph constructed based on the relationship between accounts and resources.

[0190] In step S53, the first feature representation network determines the sample account graph features of the sample account based on the sample account features of the sample account and the resource features of at least one candidate resource of the account, and the second feature representation network determines the sample resource graph features of the sample resource based on the sample resource features of the sample resource and the account features of at least one candidate resource account.

[0191] In step S54, the sample account graph features and the sample resource graph features are processed by the recommendation information prediction network to determine whether to recommend the predicted recommendation information of the sample resource to the sample account.

[0192] In step S55, the positive sample resources and negative sample resources corresponding to the sample account are obtained in the account resource relationship graph, and the positive sample accounts and negative sample accounts corresponding to the sample resources are obtained in the account resource relationship graph.

[0193] Positive sample resources are resources that are associated with sample accounts. In the account resource relationship diagram, positive sample resources are the nearest neighbors of sample accounts. Negative sample resources are resources that are not associated with sample accounts. Positive sample accounts are accounts that are associated with sample resources. In the account resource relationship diagram, positive sample accounts are the nearest neighbors of sample resources. Negative sample accounts are accounts that are not associated with sample resources.

[0194] In an exemplary embodiment, obtaining the positive sample resources and negative sample resources corresponding to the sample account in the account resource relationship graph includes: obtaining at least one resource that has an association with the sample account in the account resource relationship graph as the positive sample resource corresponding to the sample account, and obtaining at least one resource that has no association with the sample account in the account resource relationship graph as the negative sample resource corresponding to the sample account;

[0195] The step of obtaining the positive and negative sample accounts corresponding to the sample resource in the account resource relationship graph includes: obtaining at least one account that has an association with the sample resource in the account resource relationship graph as the positive sample account corresponding to the sample resource, and obtaining at least one account that has no association with the sample resource in the account resource relationship graph as the negative sample account corresponding to the sample resource.

[0196] In the account resource relationship diagram, identify all resources that are associated with the sample account, sample a certain number of resources from these resources to obtain at least one positive sample resource corresponding to the sample account; exclude resources that are associated with the sample account, sample a certain number of resources from the other resources to obtain at least one negative sample resource corresponding to the sample account.

[0197] In the account resource relationship diagram, identify all accounts that are related to the sample resource, sample a certain number of accounts from these accounts to obtain at least one positive sample account corresponding to the sample resource; exclude accounts that are related to the sample resource, sample a certain number of accounts from the other accounts to obtain at least one negative sample account corresponding to the sample resource.

[0198] By obtaining the positive and negative sample resources corresponding to the sample accounts from the account resource relationship graph, and by obtaining the positive and negative sample accounts corresponding to the sample resources from the account resource relationship graph, relatively accurate positive and negative samples can be obtained. This can constrain the training of the feature representation network and the recommendation information prediction network, thereby improving the recommendation effect of the resource recommendation model.

[0199] In step S56, the positive sample resource graph features of the positive sample resource are determined by the second feature representation network, the negative sample resource graph features of the negative sample resource are determined by the second feature representation network, the positive sample account graph features of the positive sample account are determined by the first feature representation network, and the negative sample account graph features of the negative sample account are determined by the first feature representation network.

[0200] The nearest neighbors of positive sample resources are obtained from the account resource relationship graph. The positive sample resource features and the features of the nearest neighbors are input into the feature representation network. The feature representation network fuses the positive sample resource features and the features of the nearest neighbors to obtain the positive sample resource graph features of the positive sample resources. The nearest neighbors of negative sample resources are obtained from the account resource relationship graph. The negative sample resource features and the features of the nearest neighbors are input into the feature representation network. The feature representation network fuses the negative sample resource features and the features of the nearest neighbors to obtain the negative sample resource graph features of the negative sample resources. The nearest neighbors of positive sample accounts are obtained from the account resource relationship graph. The positive sample account features and the features of the nearest neighbors are input into the feature representation network. The feature representation network fuses the positive sample account features and the features of the nearest neighbors to obtain the positive sample account graph features of the positive sample accounts. The nearest neighbors of negative sample accounts are obtained from the account resource relationship graph. The negative sample account features and the features of the nearest neighbors are input into the feature representation network. The feature representation network fuses the negative sample account features and the features of the nearest neighbors to obtain the negative sample account graph features of the negative sample accounts.

[0201] The training of the feature representation network and the recommendation information prediction network is supervised by graph learning using positive sample resource graph features, negative sample resource graph features, positive sample account graph features, and negative sample account graph features, so as to improve the performance of the trained resource recommendation model.

[0202] In an exemplary embodiment, determining the positive sample resource graph features of the positive sample resource through the second feature representation network includes: obtaining at least one account that has an association with the positive sample resource in the account resource relationship graph as a positive resource candidate account; and determining the positive sample resource graph features of the positive sample resource through the second feature representation network based on the positive sample resource features of the positive sample resource and the account features of at least one of the positive resource candidate accounts.

[0203] The step of determining the negative sample resource graph features of the negative sample resource through the second feature representation network includes: obtaining at least one account that is associated with the negative sample resource in the account resource relationship graph as a negative resource candidate account; and determining the negative sample resource graph features of the negative sample resource through the second feature representation network based on the negative sample resource features of the negative sample resource and the account features of at least one of the negative resource candidate accounts.

[0204] When determining the positive sample resource graph features, all accounts that are associated with the positive sample resources are obtained from the account resource relationship graph, and a certain number of accounts are sampled from these accounts to obtain at least one positive resource candidate account. The positive sample resource features of the positive sample resources and the account features of at least one positive resource candidate account are input into the second feature representation network. The positive sample resource features and the account features of at least one positive resource candidate account are fused through the second feature representation network to obtain the positive sample resource graph features of the positive sample resources.

[0205] When determining the negative sample resource graph features, all accounts that are associated with the negative sample resources are obtained from the account resource relationship graph, and a certain number of accounts are sampled from these accounts to obtain at least one negative resource candidate account. The negative sample resource features of the negative sample resources and the account features of at least one negative resource candidate account are input into the second feature representation network. The negative sample resource features and the account features of at least one negative resource candidate account are fused through the second feature representation network to obtain the negative sample resource graph features of the negative sample resources.

[0206] When determining the features of positive and negative sample resource graphs, we use features based on their own characteristics and nearest neighbor characteristics. This method accurately reflects the relationship between the two features, thereby improving the accuracy of the graph features and ultimately enhancing the recommendation performance of the resource recommendation model.

[0207] In an exemplary embodiment, determining the positive sample account graph features of the positive sample account through the first feature representation network includes: obtaining at least one resource that has an association with the positive sample account in the account resource relationship graph as a positive account candidate resource; and determining the positive sample account graph features of the positive sample account through the first feature representation network based on the positive sample account features of the positive sample account and the resource features of at least one of the positive account candidate resources.

[0208] The step of determining the negative sample account graph features of the negative sample account through the first feature representation network includes: obtaining at least one resource that is associated with the negative sample account in the account resource relationship graph as a negative account candidate resource; and determining the negative sample account graph features of the negative sample account through the first feature representation network based on the negative sample account features of the negative sample account and the resource features of at least one of the negative account candidate resources.

[0209] When determining the positive sample account graph features, all resources that are associated with the positive sample account are obtained from the account resource relationship graph, and a certain number of resources are sampled from these resources to obtain at least one positive account candidate resource. The positive sample account features of the positive sample account and the resource features of at least one positive account candidate resource are input into the first feature representation network. The positive sample account features and the resource features of at least one positive account candidate resource are fused through the first feature representation network to obtain the positive sample account graph features of the positive sample account.

[0210] When determining the negative sample account graph features, all resources that are associated with the negative sample account are obtained from the account resource relationship graph, and a certain number of resources are sampled from these resources to obtain at least one negative account candidate resource. The negative sample account features of the negative sample account and the resource features of at least one negative account candidate resource are input into the first feature representation network. The negative sample account features and the resource features of at least one negative account candidate resource are fused through the first feature representation network to obtain the negative sample account graph features of the negative sample account.

[0211] When determining the graph features of positive and negative sample accounts, we use features based on the user's own features and the features of their nearest neighbors. This method accurately reflects the relationship between the two features, thereby improving the accuracy of the graph features and ultimately enhancing the recommendation performance of the resource recommendation model.

[0212] In step S57, a first loss function value is determined based on the difference between the predicted recommendation information and the labeled recommendation information, and a second loss function value is determined based on the sample account graph features, sample resource graph features, positive sample resource graph features, negative sample resource graph features, positive sample account graph features, and the negative sample account graph features.

[0213] The second loss function is a graph loss function used for supervised graph feature learning, and can employ the Bayesian Personalized Ranking (BPR) loss function. This second loss function constrains the distance between sample account graph features and positive sample resource graph features in the feature representation space to be small, and the distance between sample account graph features and negative sample resource graph features to be large.

[0214] In an exemplary embodiment, determining the second loss function value based on the sample account graph features, sample resource graph features, positive sample resource graph features, negative sample resource graph features, positive sample account graph features, and negative sample account graph features includes: determining the similarity between the sample account graph features and the positive sample resource graph features as positive account similarity, and determining the similarity between the sample account graph features and the negative sample resource graph features as negative account similarity; determining the similarity between the sample resource graph features and the positive sample account graph features as positive resource similarity, and determining the similarity between the sample resource graph features and the negative sample account graph features as negative resource similarity; and determining the second loss function value based on the positive account similarity, the negative account similarity, the positive resource similarity, and the negative resource similarity.

[0215] The similarity between sample account graph features and positive sample resource graph features is determined to obtain the positive account similarity. Similarly, the similarity between sample account graph features and negative sample resource graph features is determined to obtain the negative account similarity. Based on these similarities, a second loss function value is determined. This second loss function maximizes positive account similarity, minimizes negative account similarity, maximizes positive resource similarity, and minimizes negative resource similarity. This allows the resource recommendation model to accurately distinguish the relationship between sample accounts and positive and negative sample resources, and vice versa, thus improving model training performance.

[0216] In an exemplary embodiment, determining the second loss function value based on the positive account similarity, the negative account similarity, the positive resource similarity, and the negative resource similarity includes: determining the difference between the positive account similarity and the negative account similarity as a first difference, and determining the negative logarithm of the first difference to obtain a first negative logarithm value; determining the difference between the positive resource similarity and the negative resource similarity as a second difference, and determining the negative logarithm of the second difference to obtain a second negative logarithm value; and determining the sum of the first negative logarithm value and the second negative logarithm value as the second loss function value.

[0217] Based on the positive account similarity, the negative account similarity, the positive resource similarity, and the negative resource similarity, the value of the second loss function is determined according to the following formula:

[0218]

[0219] Among them, L ωs represents the value of the second loss function. i s represents the similarity of the positive accounts. j S1 represents the sample resource pair space composed of the positive sample resources and the negative sample resources, where S1 represents the similarity of the negative accounts. s represents the first negative logarithm. m The positive resource similarity is represented by s. n S1 represents the negative resource similarity, and S2 represents the sample account pair space composed of the positive sample accounts and the negative sample accounts. This represents the second negative logarithm.

[0220] The greater the difference between positive and negative account similarity, the closer the sigmoid value is to 1, resulting in a smaller second loss function value; otherwise, the second loss function value is larger. Similarly, the greater the difference between positive and negative account similarity, the closer the sigmoid value is to 1, resulting in a smaller second loss function value; otherwise, the second loss function value is larger.

[0221] During model training, the second loss function can constrain the difference between positive and negative account similarities to increase, and at the same time, it can constrain the difference between positive and negative resource similarities to increase. This allows the resource recommendation model to accurately distinguish the relationship between sample accounts and positive and negative sample resources, and also to accurately distinguish the relationship between sample resources and positive and negative sample accounts, thereby improving the model training effect.

[0222] In step S58, the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network are adjusted according to the first loss function value and the second loss function value to obtain the first target feature representation network, the second target feature representation network, and the target recommendation information prediction network.

[0223] The sum of the first loss function value and the second loss function value is determined as the target loss function value. Based on the target loss function value, the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network are adjusted according to backpropagation. The above training process is iteratively executed until the training termination condition is met, and the training is completed, resulting in the first target feature representation network, the second target feature representation network, and the target recommendation information prediction network.

[0224] In step S59, the resource recommendation model is determined based on the first target feature representation network, the second target feature representation network, and the target recommendation information prediction network.

[0225] The first target feature representation network, the second target feature representation network, and the target recommendation information prediction network are identified as the resource recommendation model.

[0226] The training method for the resource recommendation model provided in this exemplary embodiment achieves joint training of the recommendation information prediction network and the feature representation network by jointly modeling the recommendation information prediction and the graph feature representation. This utilizes the relationships in the graph and allows the learned features to be directly reflected in the prediction of recommendation information, achieving a better joint modeling effect. This improves the accuracy of the recommendation information obtained by the model and eliminates the need for phased training, thus improving the timeliness of graph-based training. By using a second loss function to constrain the graph learning training process, the recommendation effect of the trained resource recommendation model can be further improved.

[0227] Based on the above technical solution, before processing the sample account graph features and the sample resource graph features through the recommendation information prediction network, the method further includes: obtaining the account statistical features of the sample account and obtaining the resource statistical features of the sample resource; and concatenating the account statistical features and the resource statistical features into statistical features.

[0228] The step of processing the sample account graph features and the sample resource graph features through the recommendation information prediction network to determine whether to recommend the sample resource prediction information to the sample account includes: processing the account statistical features, sample account graph features and sample resource graph features through the recommendation information prediction network to determine whether to recommend the sample resource prediction information to the sample account.

[0229] The statistical features of the sample accounts include the original sequence features or statistical features of the sample accounts, the attribute features of the sample accounts, and the features of resources associated with the sample accounts (such as resources viewed by the target account). The statistical features of the sample resources include the resource information of the sample resources, the information of the resource provider, and other resources provided by the resource provider.

[0230] The system acquires the attribute features and historical behavior data of sample accounts (including resource information associated with the sample accounts), and determines the resource features associated with the sample accounts based on the historical behavior data. Based on these attribute features and resource features associated with the sample accounts, the system obtains the account statistical features. It also acquires resource information, resource provider information, and other resources provided by the resource providers to obtain the resource statistical features of the sample resources. Finally, a feature concatenation network concatenates the account statistical features and resource statistical features to obtain the statistical features. The feature concatenation network, feature representation network, and recommendation information prediction network together form the resource recommendation model, which is jointly trained during training, resulting in an end-to-end resource recommendation model.

[0231] The statistical features, sample account graph features, and sample resource graph features are input into the recommendation information prediction network. The recommendation information prediction network processes the statistical features, sample account graph features, and sample resource graph features to obtain the predicted recommendation information of whether to recommend sample resources to the sample account.

[0232] By combining statistical and graph features when determining the recommendation information between sample accounts and sample resources, the relationship between sample accounts and sample resources can be better identified, thereby further improving the accuracy of recommendation information determination.

[0233] Figure 6 This is a block diagram illustrating a resource recommendation apparatus according to an exemplary embodiment. (Refer to...) Figure 6 The device includes a graph relationship acquisition module 61, a graph feature determination module 62, and a recommendation information determination module 63.

[0234] The graph relationship acquisition module 61 is configured to acquire at least one candidate resource that is associated with the target account in the account resource relationship graph, and acquire at least one candidate account that is associated with the target resource in the account resource relationship graph, wherein the account resource relationship graph is a heterogeneous graph constructed based on the relationship between accounts and resources;

[0235] The graph feature determination module 62 is configured to perform the following: determining the account graph features of the target account based on the account features of the target account and the resource features of at least one candidate resource through a first target feature representation network; and determining the resource graph features of the target resource based on the resource features of the target resource and the account features of at least one candidate account through a second target feature representation network.

[0236] The recommendation information determination module 63 is configured to process the account graph features and the resource graph features through a target recommendation information prediction network to determine whether to recommend the target resource to the target account.

[0237] The first target feature representation network, the second target feature representation network, and the target recommendation information prediction network are jointly trained resource recommendation models.

[0238] Optionally, the graph feature determination module includes:

[0239] The first feature fusion unit is configured to perform resource feature fusion on at least one of the candidate resources through the first target feature representation network to obtain resource fusion features;

[0240] The account graph feature determination unit is configured to perform the operation of concatenating the account features of the target account and the resource fusion features into the account graph features of the target account through the first target feature representation network.

[0241] Optionally, the graph feature determination module includes:

[0242] The second feature fusion unit is configured to perform account feature fusion on at least one of the candidate accounts through the second target feature representation network to obtain account fusion features;

[0243] The resource graph feature determination unit is configured to perform the concatenation of the resource features of the target resource and the account fusion features into the resource graph features of the target resource through the second target feature representation network.

[0244] Optionally, the device further includes:

[0245] The feature acquisition module is configured to acquire the account statistical features of the target account and the resource statistical features of the target resource;

[0246] The statistical feature determination module is configured to concatenate the account statistical features and the resource statistical features into a statistical feature.

[0247] The recommendation information determination module is configured to execute:

[0248] The target recommendation information prediction network processes the statistical features, the account graph features, and the resource graph features to determine whether to recommend the target resource to the target account.

[0249] Figure 7 This is a block diagram illustrating a training apparatus for a resource recommendation model according to an exemplary embodiment. (Refer to...) Figure 7 The device includes a label acquisition module 71, a sample graph relationship acquisition module 72, a sample graph feature determination module 73, a prediction result acquisition module 74, and a model training module 75.

[0250] The annotation acquisition module 71 is configured to perform the annotation of recommendation information between sample accounts and sample resources;

[0251] The sample graph relationship acquisition module 72 is configured to acquire at least one resource that is associated with the sample account in the account resource relationship graph as a candidate account resource, and acquire at least one account that is associated with the sample resource in the account resource relationship graph as a candidate resource account, wherein the account resource relationship graph is a heterogeneous graph constructed based on the relationship between accounts and resources;

[0252] The sample graph feature determination module 73 is configured to perform the following: determining the sample account graph features of the sample account based on the sample account features of the sample account and the resource features of at least one of the account candidate resources through a first feature representation network; and determining the sample resource graph features of the sample resource based on the sample resource features of the sample resource and the account features of at least one of the resource candidate accounts through a second feature representation network.

[0253] The prediction result acquisition module 74 is configured to process the sample account graph features and the sample resource graph features through a recommendation information prediction network to determine whether to recommend the sample resource prediction information to the sample account.

[0254] The model training module 75 is configured to train the first feature representation network, the second feature representation network, and the recommendation information prediction network based on the difference between the predicted recommendation information and the recommendation information annotation, to obtain a resource recommendation model.

[0255] Optionally, the model training module includes:

[0256] The first loss value determination unit is configured to determine a first loss function value based on the difference between the predicted recommendation information and the recommendation information annotation;

[0257] The network parameter adjustment unit is configured to adjust the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network according to the first loss function value, so as to obtain the first target feature representation network, the second target feature representation network, and the target recommendation information prediction network;

[0258] The resource recommendation model is determined based on the first target feature representation network, the second target feature representation network, and the target recommendation information prediction network.

[0259] Optionally, the model training module further includes:

[0260] The positive and negative sample acquisition unit is configured to acquire the positive and negative sample resources corresponding to the sample account in the account resource relationship graph, and acquire the positive and negative sample accounts corresponding to the sample resources in the account resource relationship graph.

[0261] The positive and negative sample graph feature determination unit is configured to perform the following operations: determine the positive sample resource graph features of the positive sample resource through the second feature representation network; determine the negative sample resource graph features of the negative sample resource through the second feature representation network; determine the positive sample account graph features of the positive sample account through the first feature representation network; and determine the negative sample account graph features of the negative sample account through the first feature representation network.

[0262] The second loss value determination unit is configured to determine a second loss function value based on the sample account graph features, sample resource graph features, positive sample resource graph features, negative sample resource graph features, positive sample account graph features, and the negative sample account graph features.

[0263] The network parameter adjustment unit is configured to perform:

[0264] Based on the first loss function value and the second loss function value, the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network are adjusted.

[0265] Optionally, the positive and negative sample acquisition unit includes:

[0266] The positive and negative sample resource acquisition subunit is configured to acquire at least one resource that is associated with the sample account in the account resource relationship graph, as the positive sample resource corresponding to the sample account, and acquire at least one resource that is not associated with the sample account in the account resource relationship graph, as the negative sample resource corresponding to the sample account.

[0267] The positive and negative sample account acquisition subunit is configured to acquire at least one account that is associated with the sample resource in the account resource relationship graph as the positive sample account corresponding to the sample resource, and acquire at least one account that is not associated with the sample resource in the account resource relationship graph as the negative sample account corresponding to the sample resource.

[0268] Optionally, the positive and negative sample image feature determination unit includes:

[0269] The positive sample resource graph feature determination subunit is configured to perform the following: obtain at least one account that is associated with the positive sample resource in the account resource relationship graph as a positive resource candidate account; and determine the positive sample resource graph feature of the positive sample resource by the second feature representation network based on the positive sample resource feature of the positive sample resource and the account feature of at least one of the positive resource candidate accounts.

[0270] The negative sample resource graph feature determination subunit is configured to perform the following operations: obtain at least one account associated with the negative sample resource in the account resource relationship graph as a negative resource candidate account; and determine the negative sample resource graph features of the negative sample resource by the second feature representation network based on the negative sample resource features of the negative sample resource and the account features of at least one of the negative resource candidate accounts.

[0271] Optionally, the positive and negative sample image feature determination unit includes:

[0272] The positive sample account graph feature determination subunit is configured to perform the following operations: obtain at least one resource associated with the positive sample account in the account resource relationship graph as a positive account candidate resource; and determine the positive sample account graph features of the positive sample account by the first feature representation network based on the positive sample account features of the positive sample account and the resource features of at least one of the positive account candidate resources.

[0273] The negative sample account graph feature determination subunit is configured to perform the following operations: obtain at least one resource associated with the negative sample account in the account resource relationship graph as a negative account candidate resource; and determine the negative sample account graph features of the negative sample account by the first feature representation network based on the negative sample account features of the negative sample account and the resource features of at least one of the negative account candidate resources.

[0274] Optionally, the second loss value determination unit includes:

[0275] The account similarity determination subunit is configured to determine the similarity between the sample account graph features and the positive sample resource graph features as positive account similarity, and to determine the similarity between the sample account graph features and the negative sample resource graph features as negative account similarity.

[0276] The resource similarity determination subunit is configured to determine the similarity between the sample resource graph features and the positive sample account graph features as positive resource similarity, and to determine the similarity between the sample resource graph features and the negative sample account graph features as negative resource similarity.

[0277] The second loss value determination subunit is configured to determine the second loss function value based on the positive account similarity, the negative account similarity, the positive resource similarity, and the negative resource similarity.

[0278] Optionally, the second loss value determination subunit is configured to execute:

[0279] The difference between the positive account similarity and the negative account similarity is determined as the first difference, and the negative logarithm of the first difference is determined to obtain the first negative logarithm.

[0280] The difference between the positive resource similarity and the negative resource similarity is determined as the second difference, and the negative logarithm of the second difference is determined to obtain the second negative logarithm.

[0281] The sum of the first negative logarithm and the second negative logarithm is determined as the second loss function value.

[0282] Optionally, the device further includes:

[0283] The feature acquisition module is configured to acquire the account statistical features of the sample account and the resource statistical features of the sample resource;

[0284] The statistical feature determination module is configured to concatenate the account statistical features and the resource statistical features into a statistical feature.

[0285] The prediction result acquisition module is configured to execute:

[0286] The recommendation information prediction network processes the account statistical features, sample account graph features, and sample resource graph features to determine whether to recommend the predicted recommendation information of the sample resource to the sample account.

[0287] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0288] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment. For example, electronic device 800 may be provided as a server. (Refer to...) Figure 8 The electronic device 800 includes a processing component 822, which further includes one or more processors, and memory resources represented by memory 832 for storing instructions executable by the processing component 822, such as application programs. The application programs stored in memory 832 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 822 is configured to execute instructions to perform the resource recommendation method or the training method for the resource recommendation model described above.

[0289] Electronic device 800 may also include a power supply component 826 configured to perform power management of electronic device 800, a wired or wireless network interface 850 configured to connect electronic device 800 to a network, and an input / output (I / O) interface 858. Electronic device 800 may operate on an operating system stored in memory 832, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.

[0290] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 832 including instructions, which can be executed by a processing component 822 of an electronic device 800 to complete the resource recommendation method or the training method for a resource recommendation model. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.

[0291] In an exemplary embodiment, a computer program product is also provided, including a computer program or computer instructions, which, when executed by a processor, implement the resource recommendation method or the training method for the resource recommendation model described above.

[0292] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0293] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A resource recommendation method, characterized in that, include: The system obtains at least one candidate resource associated with the target account from the account resource relationship graph, and at least one candidate account associated with the target resource from the account resource relationship graph. The account resource relationship graph is a heterogeneous graph constructed based on the relationship between accounts and resources. The resource includes at least one video or image. The relationship includes at least one click or activation. The first target feature representation network determines the account graph features of the target account based on the account features of the target account and the resource features of at least one candidate resource, and the second target feature representation network determines the resource graph features of the target resource based on the resource features of the target resource and the account features of at least one candidate account. The target recommendation information prediction network processes the account graph features and the resource graph features to determine whether to recommend the target resource to the target account. The first target feature representation network, the second target feature representation network, and the target recommendation information prediction network are jointly trained resource recommendation models.

2. The method according to claim 1, characterized in that, The step of determining the account graph features of the target account through the first target feature representation network based on the account features of the target account and the resource features of at least one of the candidate resources includes: The resource features of at least one of the candidate resources are fused through the first target feature representation network to obtain resource fusion features; The first target feature representation network concatenates the account features of the target account and the resource fusion features to form the account graph features of the target account.

3. The method according to claim 1 or 2, characterized in that, The step of determining the resource graph features of the target resource through the second target feature representation network based on the resource features of the target resource and the account features of at least one of the candidate accounts includes: The second target feature representation network fuses the account features of at least one of the candidate accounts to obtain account fusion features; The second target feature representation network concatenates the resource features of the target resource and the account fusion features into the resource graph features of the target resource.

4. The method according to claim 1 or 2, characterized in that, Before processing the account graph features and resource graph features through the target recommendation information prediction network, the method further includes: Obtain the account statistical characteristics of the target account and the resource statistical characteristics of the target resource; The account statistical features and the resource statistical features are concatenated into a statistical feature; The step of processing the account graph features and the resource graph features through a target recommendation information prediction network to determine whether to recommend the target resource's recommendation information to the target account includes: The target recommendation information prediction network processes the statistical features, the account graph features, and the resource graph features to determine whether to recommend the target resource to the target account.

5. A training method for a resource recommendation model, characterized in that, include: Obtain the annotation of recommendation information between sample accounts and sample resources; At least one resource associated with the sample account is obtained from the account resource relationship graph as a candidate account resource, and at least one account associated with the sample resource is obtained from the account resource relationship graph as a candidate resource account. The account resource relationship graph is a heterogeneous graph constructed based on the relationship between accounts and resources. The resource includes at least one of videos or images. The relationship includes at least one of clicks or activations. The first feature representation network determines the sample account graph features of the sample account based on the sample account features of the sample account and the resource features of at least one candidate resource of the account, and the second feature representation network determines the sample resource graph features of the sample resource based on the sample resource features of the sample resource and the account features of at least one candidate resource account. The sample account graph features and sample resource graph features are processed by a recommendation information prediction network to determine whether to recommend the sample resource prediction information to the sample account. Based on the difference between the predicted recommendation information and the labeled recommendation information, the first feature representation network, the second feature representation network, and the recommendation information prediction network are trained to obtain a resource recommendation model.

6. The method according to claim 5, characterized in that, The step of training the first feature representation network, the second feature representation network, and the recommendation information prediction network based on the difference between the predicted recommendation information and the labeled recommendation information to obtain a resource recommendation model includes: The first loss function value is determined based on the difference between the predicted recommendation information and the labeled recommendation information; Based on the first loss function value, the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network are adjusted to obtain the first target feature representation network, the second target feature representation network, and the target recommendation information prediction network. The resource recommendation model is determined based on the first target feature representation network, the second target feature representation network, and the target recommendation information prediction network.

7. The method according to claim 6, characterized in that, Before adjusting the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network based on the first loss function value, the method further includes: Obtain the positive and negative sample resources corresponding to the sample account in the account resource relationship graph, and obtain the positive and negative sample accounts corresponding to the sample resources in the account resource relationship graph; The positive sample resource graph features of the positive sample resource are determined by the second feature representation network, the negative sample resource graph features of the negative sample resource are determined by the second feature representation network, the positive sample account graph features of the positive sample account are determined by the first feature representation network, and the negative sample account graph features of the negative sample account are determined by the first feature representation network. The second loss function value is determined based on the sample account graph features, sample resource graph features, positive sample resource graph features, negative sample resource graph features, positive sample account graph features, and negative sample account graph features. The step of adjusting the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network based on the first loss function value includes: Based on the first loss function value and the second loss function value, the network parameters of the first feature representation network, the second feature representation network, and the recommendation information prediction network are adjusted.

8. The method according to claim 7, characterized in that, The step of obtaining the positive and negative sample resources corresponding to the sample account in the account resource relationship graph includes: In the account resource relationship graph, at least one resource that is associated with the sample account is obtained as a positive sample resource corresponding to the sample account, and at least one resource that is not associated with the sample account is obtained as a negative sample resource corresponding to the sample account. The step of obtaining the positive and negative sample accounts corresponding to the sample resources in the account resource relationship graph includes: At least one account that is associated with the sample resource is obtained from the account resource relationship graph and is used as the positive sample account corresponding to the sample resource. At least one account that is not associated with the sample resource is obtained from the account resource relationship graph and is used as the negative sample account corresponding to the sample resource.

9. The method according to claim 7 or 8, characterized in that, The step of determining the positive sample resource map features of the positive sample resource through the second feature representation network includes: At least one account that is associated with the positive sample resource is obtained from the account resource relationship graph and used as a positive resource candidate account. The second feature representation network determines the positive sample resource graph features of the positive sample resource based on the positive sample resource features and the account features of at least one positive resource candidate account; The step of determining the negative sample resource map features of the negative sample resource through the second feature representation network includes: At least one account that is associated with the negative sample resource is obtained from the account resource relationship graph and used as a negative resource candidate account. The second feature representation network determines the negative sample resource graph features of the negative sample resource based on the negative sample resource features of the negative sample resource and the account features of at least one of the negative resource candidate accounts.

10. The method according to claim 7 or 8, characterized in that, The step of determining the positive sample account graph features of the positive sample account through the first feature representation network includes: At least one resource that is associated with the positive sample account is obtained from the account resource relationship graph and used as a positive account candidate resource. The first feature representation network determines the positive sample account graph features of the positive sample account based on the positive sample account features and the resource features of at least one positive account candidate resource. The step of determining the negative sample account graph features of the negative sample account through the first feature representation network includes: At least one resource that is associated with the negative sample account is obtained from the account resource relationship graph and used as a candidate resource for the negative account. The first feature representation network determines the negative sample account graph features of the negative sample account based on the negative sample account features of the negative sample account and the resource features of at least one negative account candidate resource.

11. The method according to claim 7 or 8, characterized in that, The step of determining the second loss function value based on the sample account graph features, sample resource graph features, positive sample resource graph features, negative sample resource graph features, positive sample account graph features, and the negative sample account graph features includes: The similarity between the sample account graph features and the positive sample resource graph features is determined as the positive account similarity, and the similarity between the sample account graph features and the negative sample resource graph features is determined as the negative account similarity. The similarity between the sample resource graph features and the positive sample account graph features is determined as the positive resource similarity, and the similarity between the sample resource graph features and the negative sample account graph features is determined as the negative resource similarity. The second loss function value is determined based on the positive account similarity, the negative account similarity, the positive resource similarity, and the negative resource similarity.

12. The method according to claim 11, characterized in that, Determining the second loss function value based on the positive account similarity, the negative account similarity, the positive resource similarity, and the negative resource similarity includes: The difference between the positive account similarity and the negative account similarity is determined as the first difference, and the negative logarithm of the first difference is determined to obtain the first negative logarithm. The difference between the positive resource similarity and the negative resource similarity is determined as the second difference, and the negative logarithm of the second difference is determined to obtain the second negative logarithm. The sum of the first negative logarithm and the second negative logarithm is determined as the second loss function value.

13. The method according to any one of claims 5-8, characterized in that, Before processing the sample account graph features and the sample resource graph features through the recommendation information prediction network, the method further includes: Obtain the account statistical characteristics of the sample accounts and the resource statistical characteristics of the sample resources; The account statistical features and the resource statistical features are concatenated into a statistical feature; The step of processing the sample account graph features and the sample resource graph features through a recommendation information prediction network to determine whether to recommend the predicted recommendation information of the sample resource to the sample account includes: The recommendation information prediction network processes the account statistical features, sample account graph features, and sample resource graph features to determine whether to recommend the predicted recommendation information of the sample resource to the sample account.

14. A resource recommendation device, characterized in that, include: The graph relationship acquisition module is configured to acquire at least one candidate resource that is associated with the target account in the account resource relationship graph, and acquire at least one candidate account that is associated with the target resource in the account resource relationship graph, wherein the account resource relationship graph is a heterogeneous graph constructed based on the relationship between accounts and resources; the resource includes at least one of videos or images; the relationship includes at least one of clicks or activations; The graph feature determination module is configured to perform the following: determining the account graph features of the target account based on the account features of the target account and the resource features of at least one candidate resource through a first target feature representation network; and determining the resource graph features of the target resource based on the resource features of the target resource and the account features of at least one candidate account through a second target feature representation network. The recommendation information determination module is configured to process the account graph features and the resource graph features through a target recommendation information prediction network to determine whether to recommend the target resource's recommendation information to the target account; The first target feature representation network, the second target feature representation network, and the target recommendation information prediction network are jointly trained resource recommendation models.

15. A training device for a resource recommendation model, characterized in that, include: The annotation acquisition module is configured to acquire and annotate the recommendation information between sample accounts and sample resources. The sample graph relationship acquisition module is configured to acquire at least one resource associated with the sample account in the account resource relationship graph as a candidate account resource, and acquire at least one account associated with the sample resource in the account resource relationship graph as a candidate resource account. The account resource relationship graph is a heterogeneous graph constructed based on the relationships between accounts and resources; the resource includes at least one of videos or images; and the relationship includes at least one of clicks or activations. The sample graph feature determination module is configured to perform the following: determining the sample account graph features of the sample account based on the sample account features of the sample account and the resource features of at least one candidate resource of the account through a first feature representation network; and determining the sample resource graph features of the sample resource based on the sample resource features of the sample resource and the account features of at least one candidate resource account through a second feature representation network. The prediction result acquisition module is configured to process the sample account graph features and the sample resource graph features through a recommendation information prediction network to determine whether to recommend the sample resource prediction information to the sample account. The model training module is configured to train the first feature representation network, the second feature representation network, and the recommendation information prediction network based on the difference between the predicted recommendation information and the recommendation information annotation, thereby obtaining a resource recommendation model.

16. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the resource recommendation method as described in any one of claims 1 to 4 or the training method for the resource recommendation model as described in any one of claims 5 to 13.

17. A computer-readable storage medium, wherein instructions in the computer storage medium, when executed by a processor of an electronic device, enable the electronic device to perform a resource recommendation method as claimed in any one of claims 1 to 4 or to implement a training method for a resource recommendation model as claimed in any one of claims 5 to 13.