CN116611731A - A scoring model training method, user push method and device - Google Patents

A scoring model training method, user push method and device Download PDF

Info

Publication number
CN116611731A
CN116611731A CN202310572391.3A CN202310572391A CN116611731A CN 116611731 A CN116611731 A CN 116611731A CN 202310572391 A CN202310572391 A CN 202310572391A CN 116611731 A CN116611731 A CN 116611731A
Authority
CN
China
Prior art keywords
node
representation
loss
nodes
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310572391.3A
Other languages
Chinese (zh)
Inventor
吴乐
杨永晖
张琨
洪日昌
汪萌
吴郑伟
张志强
周俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei University of Technology
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Hefei University of Technology
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei University of Technology, Alipay Hangzhou Information Technology Co Ltd filed Critical Hefei University of Technology
Priority to CN202310572391.3A priority Critical patent/CN116611731A/en
Publication of CN116611731A publication Critical patent/CN116611731A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Tourism & Hospitality (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Game Theory and Decision Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • General Business, Economics & Management (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本说明书实施例提供了一种评分模型训练方法、用户推送方法及装置。在评分模型的训练方法中,构造用户与推送对象之间交互的关系网络,通过变分图推理网络估计用户和推送对象的节点表征连续分布,并对该节点表征连续分布进行采样,得到作为对比目标的第一采样表征和第二采样表征,基于该对比目标确定节点级别的对比损失函数。同时,利用节点表征连续分布重构用户与推送对象之间的关系网络,从而得到重构损失函数。利用节点表征连续分布对用户和推送对象进行聚类,基于聚类结果计算聚类感知的对比损失函数。联合多个损失函数进行多任务学习,更新模型直至收敛。利用训练后的评分模型计算用户对推送对象的评分,基于该评分进行用户推送。

The embodiment of this specification provides a scoring model training method, a user push method and a device. In the scoring model training method, construct the interactive relationship network between the user and the push object, estimate the node representation continuous distribution of the user and the push object through the variational graph reasoning network, and sample the continuous distribution of the node representation, and obtain as a comparison A first sampled representation and a second sampled representation of an object, and a node-level contrastive loss function is determined based on the contrastive object. At the same time, the continuous distribution of node representations is used to reconstruct the relationship network between users and push objects, so as to obtain the reconstruction loss function. Cluster users and push objects using node representation continuous distribution, and calculate a cluster-aware contrastive loss function based on the clustering results. Combine multiple loss functions for multi-task learning, and update the model until convergence. Use the trained scoring model to calculate the user's score on the push object, and push the user based on the score.

Description

一种评分模型训练方法、用户推送方法及装置A scoring model training method, user push method and device

技术领域technical field

本说明书一个或多个实施例涉及计算机技术领域,尤其涉及一种评分模型训练方法、用户推送方法及装置。One or more embodiments of this specification relate to the field of computer technology, and in particular to a scoring model training method, a user push method and a device.

背景技术Background technique

随着社会的发展和技术的进步,出现了越来越多的服务平台为用户提供各种服务。很多服务平台能够通过服务器和客户端为用户提供便捷的线上服务。例如,电子商务平台能够为用户提供各种商品信息,供用户浏览、选择和购买;内容平台能够为用户提供喜欢的电子书籍、文章、音乐和视频等。为了提供更丰富的服务,服务平台会在得到用户授权之后,在保证用户数据隐私和安全性的前提下,根据用户的历史行为记录为用户推送更丰富的推送对象,供用户选择,这在一定程度上给用户提供了便利。With the development of society and the advancement of technology, more and more service platforms have emerged to provide users with various services. Many service platforms can provide users with convenient online services through servers and clients. For example, e-commerce platforms can provide users with various commodity information for users to browse, select and purchase; content platforms can provide users with favorite e-books, articles, music and videos, etc. In order to provide richer services, the service platform will push richer push objects for users to choose from according to the user's historical behavior records on the premise of ensuring the user's data privacy and security after obtaining the user's authorization. To a certain extent, it provides convenience to users.

目前,希望能有改进的方案,可以更准确、更合理地为用户提供推送。At present, it is hoped that there will be an improved solution that can provide users with push notifications more accurately and reasonably.

发明内容Contents of the invention

本说明书一个或多个实施例描述了一种评分模型训练方法、用户推送方法及装置,可以更准确、更合理地为用户提供推送。具体的技术方案如下。One or more embodiments of this specification describe a scoring model training method, user push method and device, which can provide push to users more accurately and reasonably. Concrete technical scheme is as follows.

第一方面,实施例提供了一种评分模型的训练方法,所述评分模型用于预测若干个用户分别对若干个待推送的推送对象的评分;所述评分模型基于包含多个节点的关系网络进行训练,多个节点包括代表用户的节点和代表推送对象的节点,以及表征节点之间连接关系的边;所述评分模型的待学习参量包括节点表征;所述方法包括:In the first aspect, the embodiment provides a method for training a scoring model, the scoring model is used to predict the scores of several users to push objects to be pushed; the scoring model is based on a relationship network comprising a plurality of nodes For training, a plurality of nodes include nodes representing users and nodes representing push objects, and edges representing connection relationships between nodes; the parameters to be learned of the scoring model include node representations; the method includes:

通过图神经网络,基于多个节点的所述节点表征以及所述关系网络的原始邻接矩阵,确定节点的聚合表征;其中,所述聚合表征聚合了邻居用户特征和/或邻居推送对象特征;Through a graph neural network, based on the node representations of multiple nodes and the original adjacency matrix of the relationship network, determine the aggregation representation of the node; wherein, the aggregation representation aggregates neighbor user features and/or neighbor push object features;

基于节点的所述聚合表征和随机参数,构建节点表征连续分布,并通过确定所述随机参数的取值,对所述节点表征连续分布进行采样,得到作为对比目标的第一采样表征和第二采样表征;其中,所述节点表征连续分布包括:包含用户特征的节点表征连续分布和包含推送对象特征的节点表征连续分布;Based on the aggregate representation and random parameters of nodes, construct a continuous distribution of node representations, and by determining the value of the random parameters, sample the continuous distribution of node representations to obtain the first sampling representation and the second sampling representation as the comparison target. Sampling representation; wherein, the node representation continuous distribution includes: a node representation continuous distribution containing user characteristics and a node representation continuous distribution containing push object characteristics;

基于同一节点的所述第一采样表征与所述第二采样表征之间的差异,以及不同节点的所述第一采样表征与所述第二采样表征之间的差异,确定第一损失,基于所述第一损失确定预测损失;Determining a first loss based on the difference between the first sampled representation and the second sampled representation for the same node, and the difference between the first sampled representation and the second sampled representation for different nodes, based on said first loss determines a predicted loss;

向减小所述预测损失的方向,更新多个节点的所述节点表征。The node representations of a plurality of nodes are updated in the direction of reducing the prediction loss.

在一种实施方式中,所述图神经网络采用图卷积网络实现;所述图卷积网络包括若干个卷积层;所述确定节点的聚合表征的步骤,包括:In one embodiment, the graph neural network is implemented using a graph convolutional network; the graph convolutional network includes several convolutional layers; the step of determining the aggregation representation of a node includes:

任意一个卷积层采用以下方式输出任意一个节点的中间表征:基于上一卷积层输出的该节点的邻居节点的中间表征,确定该节点在该卷积层的中间表征;Any convolutional layer outputs the intermediate representation of any node in the following way: based on the intermediate representation of the node's neighbor nodes output by the previous convolutional layer, determine the intermediate representation of the node in the convolutional layer;

针对任意一个节点,基于若干个所述卷积层输出的该节点的中间表征,确定该节点的聚合表征。For any node, based on the intermediate representations of the node output by several convolutional layers, the aggregated representation of the node is determined.

在一种实施方式中,所述节点表征连续分布符合高斯分布;In one embodiment, the node represents a continuous distribution conforming to a Gaussian distribution;

所述构建节点表征连续分布的步骤,包括:The step of constructing a node to represent a continuous distribution includes:

以所述聚合表征为均值;基于所述均值确定对应的方差;Taking the aggregated representation as a mean value; determining a corresponding variance based on the mean value;

基于所述均值、所述方差和所述随机参数,构建符合高斯分布的节点表征连续分布。Based on the mean value, the variance and the random parameter, a continuous distribution of node representation conforming to the Gaussian distribution is constructed.

在一种实施方式中,所述构建符合高斯分布的节点表征连续分布的步骤,包括:In one embodiment, the step of constructing nodes conforming to Gaussian distribution to represent continuous distribution includes:

以所述方差作为所述随机参数的系数,构建节点表征连续分布的第一项;Using the variance as the coefficient of the random parameter, constructing the first term of the node representing the continuous distribution;

基于所述第一项与所述均值的和,构建所述节点表征连续分布。Based on the sum of the first term and the mean value, the node representation continuous distribution is constructed.

在一种实施方式中,所述随机参数为均值为0、方差为1的随机高斯噪声。In one embodiment, the random parameter is random Gaussian noise with a mean of 0 and a variance of 1.

在一种实施方式中,所述基于所述第一损失确定预测损失的步骤,包括:In one embodiment, the step of determining the predicted loss based on the first loss includes:

基于所述均值和所述方差分别与预设的高斯分布的均值与方差之间的差异,确定第二损失;determining a second loss based on the difference between the mean and the variance and the mean and variance of a preset Gaussian distribution, respectively;

基于所述第一损失和所述第二损失确定预测损失。A predicted loss is determined based on the first loss and the second loss.

在一种实施方式中,在构建节点表征连续分布之后,方法还包括:In one embodiment, after constructing the node representation continuous distribution, the method further includes:

基于所述节点表征连续分布,预测多个节点之间相互连接的概率;Predicting the probability of interconnection between multiple nodes based on the node representation continuous distribution;

基于所述概率,确定所述关系网络的重构邻接矩阵;determining a reconstructed adjacency matrix of the relational network based on the probability;

所述基于所述第一损失确定预测损失的步骤,包括:The step of determining a predicted loss based on the first loss includes:

基于所述重构邻接矩阵与所述原始邻接矩阵之间的差异,确定第三损失;determining a third loss based on the difference between the reconstructed adjacency matrix and the original adjacency matrix;

基于所述第一损失和所述第三损失确定预测损失。A predicted loss is determined based on the first loss and the third loss.

在一种实施方式中,所述预测多个节点之间相互连接的概率的步骤,包括:In one embodiment, the step of predicting the probability of interconnection between multiple nodes includes:

针对任意的第一节点和第二节点,将所述第一节点的节点表征连续分布与所述第二节点的节点表征连续分布之间的相似度,作为激活函数的输入参数,将得到的输出值作为所述第一节点和所述第二节点之间相互连接的概率。For any first node and second node, the similarity between the node representation continuous distribution of the first node and the node representation continuous distribution of the second node is used as the input parameter of the activation function, and the obtained output The value is used as the probability of interconnection between the first node and the second node.

在一种实施方式中,在构建节点表征连续分布之后,方法还包括:In one embodiment, after constructing the node representation continuous distribution, the method further includes:

基于所述节点表征连续分布,对多个节点进行聚类,得到多个节点分别归属的类簇;Based on the continuous distribution of the node representation, clustering the multiple nodes to obtain the clusters to which the multiple nodes belong respectively;

所述基于所述第一损失确定预测损失的步骤,包括:The step of determining a predicted loss based on the first loss includes:

基于同类簇节点的所述第一采样表征与所述第二采样表征之间的差异,以及异类簇节点的所述第一采样表征与所述第二采样表征之间的差异,确定第四损失;Determining a fourth loss based on a difference between the first sampled representation and the second sampled representation of nodes in a homogeneous cluster and a difference between the first sampled representation and the second sampled representation of nodes in a heterogeneous cluster ;

基于所述第一损失和所述第四损失确定预测损失。A predicted loss is determined based on the first loss and the fourth loss.

在一种实施方式中,所述基于所述第一损失确定预测损失的步骤,包括:In one embodiment, the step of determining the predicted loss based on the first loss includes:

基于所述第一损失,采用对比损失函数确定所述预测损失。Based on the first loss, the prediction loss is determined using a contrastive loss function.

第二方面,实施例提供了一种利用评分模型对用户进行推送方法,所述评分模型采用第一方面提供的方法训练得到;所述方法包括:In the second aspect, the embodiment provides a method of using a scoring model to push users, and the scoring model is trained using the method provided in the first aspect; the method includes:

通过所述评分模型,基于用户节点的节点表征连续分布和推送对象节点的节点表征连续分布,确定对应的用户与推送对象之间的相似度;Through the scoring model, based on the continuous distribution of the node representation of the user node and the continuous distribution of the node representation of the push object node, the similarity between the corresponding user and the push object is determined;

通过所述评分模型,将所述相似度作为输入参数输入激活函数,将得到的输出值作为所述用户对所述推送对象的评分;Through the scoring model, the similarity is input into an activation function as an input parameter, and the obtained output value is used as the user's rating of the pushed object;

基于所述用户对若干个推送对象的评分,对所述若干个推送对象进行选择,基于选择结果对所述用户进行推送。Based on the user's ratings on several push objects, select the several push objects, and push the user based on the selection result.

第三方面,实施例提供了一种评分模型的训练装置,所述评分模型用于预测若干个用户分别对若干个待推送的推送对象的评分;所述评分模型基于包含多个节点的关系网络进行训练,多个节点包括代表用户的节点和代表推送对象的节点,以及表征节点之间连接关系的边;所述评分模型的待学习参量包括节点表征;所述装置包括:In a third aspect, the embodiment provides a scoring model training device, the scoring model is used to predict the scores of several users to push objects to be pushed respectively; the scoring model is based on a relationship network comprising a plurality of nodes For training, a plurality of nodes include a node representing a user and a node representing a push object, and an edge representing a connection relationship between nodes; the parameters to be learned of the scoring model include a node representation; the device includes:

聚合模块,配置为通过图神经网络,基于多个节点的所述节点表征以及所述关系网络的原始邻接矩阵,确定节点的聚合表征;其中,所述聚合表征聚合了邻居用户特征和/或邻居推送对象特征;The aggregation module is configured to determine an aggregated representation of a node based on the node representations of multiple nodes and the original adjacency matrix of the relationship network through a graph neural network; wherein the aggregated representation aggregates neighbor user features and/or neighbors push object characteristics;

构建模块,配置为基于节点的所述聚合表征和随机参数,构建节点表征连续分布,并通过确定所述随机参数的取值,对所述节点表征连续分布进行采样,得到作为对比目标的第一采样表征和第二采样表征;其中,所述节点表征连续分布包括:包含用户特征的节点表征连续分布和包含推送对象特征的节点表征连续分布;A building module configured to construct a continuous distribution of node representations based on the aggregate representation and random parameters of nodes, and sample the continuous distribution of node representations by determining the value of the random parameters to obtain the first A sampling representation and a second sampling representation; wherein, the node representation continuous distribution includes: a node representation continuous distribution containing user characteristics and a node representation continuous distribution containing push object characteristics;

损失模块,配置为基于同一节点的所述第一采样表征与所述第二采样表征之间的差异,以及不同节点的所述第一采样表征与所述第二采样表征之间的差异,确定第一损失,基于所述第一损失确定预测损失;a loss module configured to determine based on a difference between the first sampled representation and the second sampled representation of the same node, and a difference between the first sampled representation and the second sampled representation of a different node a first loss, determining a predicted loss based on the first loss;

更新模块,配置为向减小所述预测损失的方向,更新多个节点的所述节点表征。An update module configured to update the node representations of a plurality of nodes in a direction to reduce the prediction loss.

第四方面,实施例提供了一种利用评分模型对用户进行推送的装置,所述评分模型采用第一方面提供的方法训练得到;所述装置包括:In the fourth aspect, the embodiment provides a device for pushing users by using a scoring model, and the scoring model is trained using the method provided in the first aspect; the device includes:

确定模块,配置为通过所述评分模型,基于用户节点的节点表征连续分布和推送对象节点的节点表征连续分布,确定对应的用户与推送对象之间的相似度;The determination module is configured to determine the similarity between the corresponding user and the push object based on the continuous distribution of the node representation of the user node and the continuous distribution of the node representation of the push object node through the scoring model;

评分模块,配置为通过所述评分模型,将所述相似度作为输入参数输入激活函数,将得到的输出值作为所述用户对所述推送对象的评分;The scoring module is configured to input the similarity as an input parameter into an activation function through the scoring model, and use the obtained output value as the user's score on the pushed object;

推送模块,配置为基于所述用户对若干个推送对象的评分,对所述若干个推送对象进行选择,基于选择结果对所述用户进行推送。The push module is configured to select the several push objects based on the user's ratings on the several push objects, and push the user based on the selection result.

第五方面,实施例提供了一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行第一方面至第二方面中任一项所述的方法。In a fifth aspect, the embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed in a computer, the computer is instructed to execute any one of the first aspect to the second aspect. Methods.

第六方面,实施例提供了一种计算设备,包括存储器和处理器,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现第一方面至第二方面中任一项所述的方法。In a sixth aspect, the embodiment provides a computing device, including a memory and a processor, wherein executable code is stored in the memory, and when the processor executes the executable code, the first aspect to the second aspect are implemented. any one of the methods described.

本说明书实施例提供的方法及装置中,利用关系网络训练评分模型。在训练过程中,基于节点的聚合表征和随机参数构建节点表征连续分布,并对节点表征连续分布进行采样,得到作为对比目标的第一采样表征和第二采样表征,基于构建的该对比目标确定预测损失,能够利用关系网络中稀疏的连接关系构建对比目标,实现对用户和推送对象的无监督学习,从而使得评分模型能够提取到用户和推送对象深层的有价值特征,在利用该评分模型进行推送时能够更准确、更合理地为用户提供推送服务。In the method and device provided in the embodiments of this specification, the scoring model is trained using a relational network. During the training process, the continuous distribution of node representations is constructed based on the aggregate representation of nodes and random parameters, and the continuous distribution of node representations is sampled to obtain the first sampling representation and the second sampling representation as the comparison target. Based on the constructed comparison target, determine Prediction loss can use the sparse connection relationship in the network to construct comparison targets, and realize unsupervised learning of users and push objects, so that the scoring model can extract the deep valuable features of users and push objects. When pushing, it can provide users with push services more accurately and reasonably.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单的介绍。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings that need to be used in the description of the embodiments. Apparently, the drawings in the following description are only some embodiments of the present invention, and those skilled in the art can obtain other drawings according to these drawings without creative efforts.

图1为本说明书披露的一个实施例的实施场景示意图;FIG. 1 is a schematic diagram of an implementation scenario of an embodiment disclosed in this specification;

图2为实施例提供的一种评分模型的训练方法的流程示意图;Fig. 2 is a schematic flow chart of a scoring model training method provided by an embodiment;

图3为实施例提供的一种利用评分模型对用户进行推送方法的流程示意图;Fig. 3 is a schematic flowchart of a method for pushing users by using a scoring model provided by an embodiment;

图4为实施例提供的一种评分模型的训练装置的示意性框图;Fig. 4 is a schematic block diagram of a scoring model training device provided by an embodiment;

图5为实施例提供的一种利用评分模型对用户进行推送的装置的示意性框图。Fig. 5 is a schematic block diagram of an apparatus for pushing users by using a scoring model provided by an embodiment.

具体实施方式Detailed ways

下面结合附图,对本说明书提供的方案进行描述。The solutions provided in this specification will be described below in conjunction with the accompanying drawings.

图1为本说明书披露的一个实施例的实施场景示意图。该图1也是评分模型的训练过程示意图。其中,关系网络包含多个节点以及节点之间的边。这多个节点包括代表用户的用户节点和代表推送对象的推送对象节点。在图1所示的关系网络示例中,圆圈代表用户节点,方框代表推送对象节点。将多个节点的节点表征和节点之间的连接关系输入图神经网络,通过图神经网络可以确定多个节点各自的聚合表征。利用聚合表征和随机参数可以构建节点表征连续分布,对该节点表征连续分布进行采样,得到第一采样表征和第二采样表征。基于第一采样表征和第二采样表征,通过对比学习可以得到预测损失,利用该预测损失对节点表征进行更新。模型训练迭代执行,直至收敛。图1中示出的关系网络包含了用户节点与用户节点之间的连接关系,以及用户节点与推送对象节点之间的连接关系。该关系网络示意图仅是一种举例。在实际应用中,关系网络可以仅包含用户节点与推送对象节点之间的连接关系。Fig. 1 is a schematic diagram of an implementation scene of an embodiment disclosed in this specification. Figure 1 is also a schematic diagram of the training process of the scoring model. Among them, the relationship network contains multiple nodes and edges between nodes. The plurality of nodes includes a user node representing a user and a push object node representing a push object. In the example of the relationship network shown in FIG. 1 , circles represent user nodes, and squares represent push object nodes. The node representations of multiple nodes and the connection relationship between nodes are input into the graph neural network, and the aggregate representations of multiple nodes can be determined through the graph neural network. A continuous distribution of node representations can be constructed by using aggregated representations and random parameters, and the continuous distribution of node representations is sampled to obtain the first sampling representation and the second sampling representation. Based on the first sampling representation and the second sampling representation, a prediction loss can be obtained through comparative learning, and the node representation is updated using the prediction loss. Model training is performed iteratively until convergence. The relationship network shown in FIG. 1 includes the connection relationship between user nodes and user nodes, and the connection relationship between user nodes and push object nodes. The schematic diagram of the relationship network is only an example. In practical applications, the relationship network may only include the connection relationship between user nodes and push object nodes.

其中,上述评分模型用于预测若干个用户分别对若干个待推送的推送对象的评分。待推送,是指待向用户推送,推送对象是等待或准备向用户进行推送的对象,可以包括商品、文章、视频或音乐等内容。用户对推送对象的评分,体现了用户对推送对象的感兴趣程度。服务平台可以通过服务器-客户端的方式,向用户提供推送服务。用户一侧则可以通过客户端查看服务平台推送的推送对象。本说明书实施例中涉及的用户,是指用户设备,或者登陆了用户账号的用户设备,即登陆了用户账号的客户端所在的用户设备。Wherein, the above-mentioned scoring model is used to predict the scores of several users on several pushing objects to be pushed respectively. To be pushed means to be pushed to the user, and the object to be pushed is the object waiting or preparing to be pushed to the user, which may include content such as commodities, articles, videos, or music. The user's rating on the push object reflects the user's interest in the push object. The service platform can provide users with push services in a server-client manner. On the user side, users can view the push objects pushed by the service platform through the client. The user involved in the embodiments of this specification refers to a user device, or a user device that has logged in a user account, that is, a user device where a client that has logged in a user account is located.

关系网络包括多个节点和多个边。关系网络中的节点包括用户节点和推送对象节点,以及节点之间的边。节点之间的边体现了节点之间的连接关系,包括用户节点与用户节点之间的边,用户节点与推送对象之间的边等。连接关系体现了不同种类节点之间的关联关系。例如,用户节点与用户节点之间的关联关系可以包括亲友关系、点赞关系和借款关系等。用户节点与推送对象节点之间的关联关系可以包括点击、购买、观看、分配和从属等。例如,当用户a对商品v有过点击行为时,可以在该用户a对应的用户节点与该商品v对应的商品节点之间形成连接边。用户对推送对象之间的点击、购买、观看等与用户相关的数据,均是在获得用户的授权后使用的,在使用过程中也会保护与用户相关数据的隐私性不被泄露。A relational network includes multiple nodes and multiple edges. Nodes in the relational network include user nodes and push object nodes, as well as edges between nodes. The edges between nodes reflect the connection relationship between nodes, including the edges between user nodes and user nodes, the edges between user nodes and push objects, etc. The connection relationship reflects the association relationship between different types of nodes. For example, the association relationship between user nodes may include family and friend relationship, like relationship and loan relationship, etc. The association relationship between the user node and the push object node may include click, purchase, view, distribution, affiliation, and so on. For example, when user a has clicked on commodity v, a connection edge may be formed between the user node corresponding to user a and the commodity node corresponding to commodity v. User-related data such as clicks, purchases, and viewings between push objects are used after obtaining user authorization, and the privacy of user-related data will not be leaked during use.

节点表征也可以称为节点特征,其包含用户特征或推送对象特征。用户节点的节点表征包含用户特征,推送对象的节点表征包含推送对象特征。用户特征可以理解为是从用户相关数据中提炼出的抽象特征。推送对象特征可以理解为是从推送对象特征中提炼出的抽象特征。一个节点表征可以采用向量表示,多个节点表征可以通过多个向量构成的矩阵表示。Node representations can also be called node features, which include user features or push object features. The node representation of the user node includes user features, and the node representation of the push object includes the push object features. User features can be understood as abstract features extracted from user-related data. Push object features can be understood as abstract features extracted from push object features. A node representation can be represented by a vector, and multiple node representations can be represented by a matrix composed of multiple vectors.

关系网络中的用户是服务平台服务的用户,推送对象可以是服务平台提供的推送对象。服务平台的用户和推送对象的数量一般是非常多的。关系网络中包含了部分用户与部分推送对象之间的关联关系。为了预测更多用户对更多推送对象的评分,可以基于关系网络中存在关联关系的节点等信息训练评分模型,利用评分模型可以预测关系网络中所有用户与所有推送对象之间的评分。将节点表征等数据作为评分模型中的待学习参量,通过多轮迭代训练,评分模型可以从关系网络中学习到节点表征。The users in the relationship network are the users of the service platform, and the push object may be the push object provided by the service platform. The number of users and push objects of the service platform is generally very large. The relationship network includes the association relationship between some users and some push objects. In order to predict the ratings of more users on more push objects, a scoring model can be trained based on information such as nodes with associated relationships in the relationship network, and the scoring model can be used to predict the ratings between all users and all push objects in the relationship network. Data such as node representations are used as parameters to be learned in the scoring model, and through multiple rounds of iterative training, the scoring model can learn node representations from the relational network.

为了学习更深层的节点表征,以便预测更合理的评分,本说明书的一个实施例提供了一种评分模型的训练方法,包括以下步骤:步骤S210,通过图神经网络,基于多个节点的节点表征以及关系网络的原始邻接矩阵,确定节点的聚合表征;步骤S220,基于节点的聚合表征和随机参数,构建节点表征连续分布,并通过确定随机参数的取值,对节点表征连续分布进行采样,得到作为对比目标的第一采样表征和第二采样表征;步骤S230,基于同一节点的第一采样表征与第二采样表征之间的差异,以及不同节点的第一采样表征与第二采样表征之间的差异,确定第一损失,基于第一损失确定预测损失;步骤S240,向减小预测损失的方向,更新多个节点的节点表征。In order to learn deeper node representations in order to predict more reasonable ratings, an embodiment of this specification provides a scoring model training method, including the following steps: Step S210, through a graph neural network, based on node representations of multiple nodes and the original adjacency matrix of the relationship network to determine the aggregation representation of nodes; Step S220, based on the aggregation representation of nodes and random parameters, construct a continuous distribution of node representations, and sample the continuous distribution of node representations by determining the value of random parameters, to obtain The first sampling representation and the second sampling representation as the comparison target; step S230, based on the difference between the first sampling representation and the second sampling representation of the same node, and the difference between the first sampling representation and the second sampling representation of different nodes difference, determine the first loss, and determine the prediction loss based on the first loss; step S240, update the node representations of multiple nodes in the direction of reducing the prediction loss.

在本实施例中,评分模型能够构建节点表征连续分布,并通过采样得到对比目标,通过对比学习更新节点表征,从而能够提取到用户和推送对象深层的有价值特征,使得利用该评分模型能够更准确、更合理地为用户提供推送服务。In this embodiment, the scoring model can build a continuous distribution of node representations, obtain comparison targets through sampling, and update node representations through comparison learning, thereby extracting valuable deep-level features of users and push objects, so that the scoring model can be used more Provide users with push services accurately and more reasonably.

下面结合图2对本实施例进行详细说明。The present embodiment will be described in detail below with reference to FIG. 2 .

图2为实施例提供的一种评分模型的训练方法的流程示意图。该方法可以通过服务平台执行。服务平台可以通过任何具有计算、处理能力的装置、设备、平台、设备集群等来实现。上述评分模型基于关系网络进行训练。其中,多个节点包括代表用户的节点和代表推送对象的节点,以及表征节点之间连接关系的边。也就是,节点包括用户节点和推送对象节点。在提及节点时,即包括用户节点和/或推送对象节点。评分模型的待学习参量包括节点表征。Fig. 2 is a schematic flow chart of a scoring model training method provided in an embodiment. The method can be executed through the service platform. The service platform can be realized by any device, device, platform, device cluster, etc. that have computing and processing capabilities. The scoring model described above is trained on a relational network. Wherein, the multiple nodes include a node representing a user and a node representing a push object, and an edge representing a connection relationship between the nodes. That is, the nodes include user nodes and push object nodes. When referring to a node, it includes a user node and/or a pushed object node. The parameters to be learned of the scoring model include node representations.

在一种实施方式中,评分模型可以包括图神经网络和变分编码器。其中,图神经网络用于基于多个节点的节点表征以及关系网络的原始邻接矩阵,确定节点的聚合表征。变分编码器用于基于节点的聚合表征和随机参数,构建节点表征连续分布,并通过确定随机参数的取值,对节点表征连续分布进行采样,得到作为对比目标的第一采样表征和第二采样表征。在这种情况下,评分模型的待学习参量还可以包括图神经网络中的待学习参量和/或变分编码器中的待学习参量。图神经网络和变分编码器可以统称为变分图推理网络。In one embodiment, the scoring model may include a graph neural network and a variational encoder. Among them, the graph neural network is used to determine the aggregate representation of nodes based on the node representations of multiple nodes and the original adjacency matrix of the relational network. The variational encoder is used to construct node representation continuous distribution based on node aggregation representation and random parameters, and sample the node representation continuous distribution by determining the value of random parameters to obtain the first sampling representation and the second sampling as the comparison target characterization. In this case, the parameters to be learned of the scoring model may also include parameters to be learned in the graph neural network and/or parameters to be learned in the variational encoder. Graph neural networks and variational encoders can be collectively referred to as variational graph inference networks.

在一种实施方式中,评分模型可以包括变分编码器,而不包含图神经网络。图神经网络可以与评分模型执行联合训练。In one embodiment, the scoring model may include a variational encoder instead of a graph neural network. Graph neural networks can perform joint training with scoring models.

评分模型可以通过若干次模型迭代过程进行训练,任意一次模型迭代过程可以包括图2所示的步骤S210~S240。The scoring model can be trained through several model iteration processes, and any one model iteration process can include steps S210-S240 shown in FIG. 2 .

在步骤S210中,通过图神经网络,基于多个节点的节点表征以及关系网络G的原始邻接矩阵A,确定节点的聚合表征μ。其中,聚合表征聚合了邻居用户特征和/或邻居推送对象特征。用户节点的聚合表征包含了用户特征,推送对象节点的聚合表征包含了推送对象特征。确定的聚合表征可以理解为确定每个节点的聚合表征向量,或者确定所有节点的聚合表征矩阵。In step S210, the aggregate representation μ of the node is determined based on the node representations of multiple nodes and the original adjacency matrix A of the relational network G through the graph neural network. Wherein, the aggregation representation aggregates features of neighbor users and/or features of objects pushed by neighbors. The aggregation representation of the user node includes user characteristics, and the aggregation representation of the push object node includes the push object characteristics. The determined aggregation representation can be understood as determining the aggregation representation vector of each node, or determining the aggregation representation matrix of all nodes.

下面以推送对象为商品为例进行举例说明。令U表示用户集,且U={u1,…,ua,…,ub,…,uM},ua表示第a个用户,ub表示第b个用户,M表示用户的总数,1≤a,b≤M。令V表示商品集,且V={v1,…,vi,…,vj,…,vN},vi表示第i个商品,vj表示第j个商品,N表示商品的总数,1≤i,j≤N。令rai表示第a个用户ua对第i个商品vi的评分值,则用户对商品的评分矩阵R={rai}M×N。如果第a个用户ua对第i个商品vi有过行为数据,则rai=1,否则rai=0。其中,行为数据包括观看、购买和点击等。The following takes the push object as an example for illustration. Let U represent the user set, and U={u 1 ,…,u a ,…,u b ,…,u M }, u a represents the a-th user, u b represents the b-th user, and M represents the total number of users , 1≤a, b≤M. Let V represent the commodity set, and V={v 1 ,…,v i ,…,v j ,…,v N }, v i represents the i-th commodity, v j represents the j-th commodity, and N represents the total number of commodities , 1≤i, j≤N. Let r ai represent the scoring value of the ath user u a on the ith commodity v i , then the user's scoring matrix R={ra ai } M×N for the commodity. If the a-th user u a has behavior data on the i-th commodity v i , then r ai =1, otherwise r ai =0. Among them, behavioral data includes watching, purchasing and clicking.

根据上述原始数据,按照以下的式(1)可以构造用户对商品的交互图G,也就是关系网络G:According to the above raw data, the user-to-product interaction graph G, that is, the relationship network G, can be constructed according to the following formula (1):

其中,A为关系网络G的原始邻接矩阵,U∪V表示关系网络G的节点集合。Among them, A is the original adjacency matrix of the relational network G, and U∪V represents the node set of the relational network G.

初始时,可以随机确定关系网络G中每个节点的节点表征矩阵E。当关系网络中包含M+N个节点时,E可以采用(M+N)×d维的矩阵表示,即E={e1,…,ea,…,eM,…ei,…,eM+N}。其中,ea表示第a个用户节点的d维节点表征向量。所确定的聚合表征μ也可以采用(M+N)×d维的矩阵表示,即μ={μi},其中μi表示第i个节点的聚合表征向量。这里的第i个节点可以是用户节点或商品节点。Initially, the node representation matrix E of each node in the relational network G can be randomly determined. When the relationship network contains M+N nodes, E can be represented by a (M+N)×d-dimensional matrix, that is, E={e 1 ,…,e a ,…,e M ,…e i ,…, e M+N }. Among them, e a represents the d-dimensional node representation vector of the ath user node. The determined aggregation representation μ can also be represented by a (M+N)×d-dimensional matrix, that is, μ={μ i }, where μ i represents the aggregation representation vector of the i-th node. The i-th node here can be a user node or a product node.

将节点表征和原始邻接矩阵A输入图神经网络,图神经网络可以输出节点的聚合表征μ。图神经网络可以采用多种网络模型实现,例如可以采用图卷积网络、图循环网络或图注意力网络等实现。下面以图卷积网络为例对图神经网络的实现方式进行说明。利用图卷积网络确定节点的聚合表征时可以包含多种实施方式,下面介绍具体实施方式。The node representation and the original adjacency matrix A are input into the graph neural network, and the graph neural network can output the aggregated representation μ of the node. Graph neural networks can be implemented using a variety of network models, such as graph convolutional networks, graph recurrent networks, or graph attention networks. The following uses the graph convolutional network as an example to illustrate the implementation of the graph neural network. When using the graph convolutional network to determine the aggregation representation of nodes, there may be multiple implementations, and the specific implementations are described below.

图卷积网络包括L个卷积层。每个卷积层可以基于上一卷积层的输出以及原始邻接矩阵A确定每个节点的中间表征。基于多个卷积层输出的中间表征,可以确定节点的聚合表征。A graph convolutional network consists of L convolutional layers. Each convolutional layer can determine the intermediate representation of each node based on the output of the previous convolutional layer and the original adjacency matrix A. Based on the intermediate representations output by multiple convolutional layers, an aggregated representation of a node can be determined.

对于任意一个卷积层l+1,可以采用以下方式输出任意一个节点(例如第i个节点)的中间表征:基于上一卷积层l输出的第i个节点的邻居节点的中间表征,确定第i个节点在该卷积层l+1的中间表征。第i个节点的邻居节点可以包括与第i节点存在连接关系的节点。具体的,可以对多个邻居节点的中间表征的加权平均值作为第i个节点的中间表征。例如,可以采用下面的式(2)确定第l+1卷积层输出第i个节点的中间表征μi l+1For any convolutional layer l+1, the intermediate representation of any node (such as the i-th node) can be output in the following way: Based on the intermediate representation of the neighbor node of the i-th node output by the previous convolutional layer l, determine The i-th node is represented in the middle of this convolutional layer l+1. Neighbor nodes of the i-th node may include nodes that have a connection relationship with the i-th node. Specifically, the weighted average of the intermediate representations of multiple neighboring nodes may be used as the intermediate representation of the i-th node. For example, the following formula (2) can be used to determine the intermediate representation μ i l+1 of the i-th node output by the l+1th convolutional layer:

其中,Si表示与第i个节点存在连接关系的节点集合中的节点数量。j在Si中取值,Sj表示与第j个节点存在连接关系的节点集合中的节点数量。Si和Sj可以基于原始邻接矩阵A确定。μj l是第i个节点在第l卷积层输出的中间表征。上述式(2)仅仅是一种实施方式,对该式进行修改,比如去掉加权值或修改加权值都是可行的方式。Among them, S i represents the number of nodes in the node set that has a connection relationship with the i-th node. j takes a value in S i , and S j represents the number of nodes in the node set that has a connection relationship with the jth node. S i and S j can be determined based on the original adjacency matrix A. μ j l is the intermediate representation output by the i-th node in the l-th convolutional layer. The above formula (2) is only an implementation manner, and it is feasible to modify the formula, such as removing or modifying the weighted value.

针对任意一个节点,例如第i个节点,基于若干个卷积层输出的第i个节点的中间表征,确定该节点的聚合表征。具体可以将若干个卷积层输出的第i个节点的中间表征的均值或加权均值,确定为第i个节点的聚合表征。例如,可以采用下式(3)得到第i个节点通过图卷积网络输出的聚合表征:For any node, such as the i-th node, based on the intermediate representations of the i-th node output by several convolutional layers, the aggregated representation of the node is determined. Specifically, the mean or weighted mean of the intermediate representations of the i-th node output by several convolutional layers may be determined as the aggregated representation of the i-th node. For example, the following formula (3) can be used to obtain the aggregation representation output by the i-th node through the graph convolutional network:

其中,μi表示第i个节点的聚合表征,该向量的维度为d维。对于所有节点的聚合表征构成的聚合表征矩阵μ,其矩阵维度为(M+N)×d维。Among them, μ i represents the aggregation representation of the i-th node, and the dimension of the vector is d. For the aggregated representation matrix μ formed by the aggregated representations of all nodes, its matrix dimension is (M+N)×d.

通过步骤S210的执行,基于关系网络中用户与用户之间的关联关系,以及用户与推送对象之间的关联关系,在用户节点的聚合表征中聚合其邻居节点的特征,其中包括邻居用户特征和/或邻居推送对象特征;在推送对象节点的聚合表征中聚合其邻居节点的特征,其中包括邻居用户特征和/或邻居推送对象特征,从而使得聚合表征聚合了关系网络中的有用信息。Through the execution of step S210, based on the association relationship between users in the relationship network and the association relationship between users and push objects, the characteristics of its neighbor nodes are aggregated in the aggregation representation of user nodes, including neighbor user characteristics and and/or neighbor push object features; aggregate features of its neighbor nodes in the aggregate representation of push object nodes, including neighbor user features and/or neighbor push object features, so that the aggregate representation aggregates useful information in the relationship network.

在步骤S220中,基于节点的聚合表征μ和随机参数∈,构建节点表征连续分布,并通过确定随机参数∈的取值,对节点表征连续分布进行采样,得到作为对比目标的第一采样表征Z′和第二采样表征Z″。In step S220, based on the aggregate representation of nodes μ and the random parameter ∈, a continuous distribution of node representations is constructed, and by determining the value of the random parameter ∈, the continuous distribution of node representations is sampled to obtain the first sampling representation Z as the comparison target ' and the second sample characterizes Z".

其中,节点表征连续分布包括:包含用户特征的节点表征连续分布和包含推送对象特征的节点表征连续分布。这里的节点表征连续分布可以是每一个节点的向量,也可以是所有节点的向量构成的矩阵。通过采样得到的第一采样表征Z′和第二采样表征Z″也包括了用户特征和/或推送对象特征。Wherein, the continuous distribution of node representations includes: the continuous distribution of node representations including user features and the continuous distribution of node representations including push object features. The continuous distribution of node representation here can be a vector of each node, or a matrix composed of vectors of all nodes. The first sample representation Z′ and the second sample representation Z″ obtained through sampling also include user features and/or push object features.

步骤S220利用了重参数化技巧来重构节点表征连续分布。这种重参数化能够对输入的聚合表征进行重构,并利用随机参数的随机性生成有意义的数据,为对比学习提供更多样本。连续分布可以采用高斯分布,也可以采用其他分布,例如均匀分布。下面以节点表征连续分布符合高斯分布为例说明步骤S220的实施过程。Step S220 utilizes the reparameterization technique to reconstruct the continuous distribution of node representations. This reparameterization can reconstruct the aggregated representation of the input, and exploit the randomness of random parameters to generate meaningful data, providing more samples for comparative learning. Continuous distributions can be Gaussian or other distributions such as uniform. The implementation process of step S220 will be described below by taking the continuous distribution of node representation conforming to the Gaussian distribution as an example.

在构建节点表征的高斯分布时,可以以聚合表征为均值,基于该均值确定对应的方差;接着,基于均值、方差和随机参数,构建符合高斯分布的节点表征连续分布。在基于均值、方差和随机参数构建节点表征连续分布时,可以包含多种实施方式。例如,可以以方差作为随机参数的系数,构建节点表征连续分布的第一项,基于第一项与均值的和,构建节点表征连续分布。When constructing the Gaussian distribution of node representation, the aggregate representation can be used as the mean value, and the corresponding variance can be determined based on the mean value; then, based on the mean value, variance and random parameters, a continuous distribution of node representation conforming to the Gaussian distribution can be constructed. Various implementations can be included when constructing node representation continuous distributions based on mean, variance, and random parameters. For example, the variance can be used as the coefficient of the random parameter to construct a node representing the first item of the continuous distribution, and based on the sum of the first item and the mean value, the node is constructed to represent the continuous distribution.

在构建高斯分布时,可以针对每个节点的节点表征,构建该节点对应的节点表征连续分布。在下面的描述中,在使用均值、方差和随机参数进行计算时,均是使用某一个节点的均值、方差和随机参数,三者相互对应。一对均值和方差即定义了一个高斯分布。When constructing a Gaussian distribution, for each node's node representation, a node representation continuous distribution corresponding to the node can be constructed. In the following description, when the mean, variance and random parameters are used for calculation, the mean, variance and random parameters of a certain node are used, and the three correspond to each other. A pair of mean and variance defines a Gaussian distribution.

在基于均值确定对应的方差时,可以参照已有的均值和方差之间的转换公式进行确定。例如,可以采用以下的式(4)确定方差:When determining the corresponding variance based on the mean value, it may be determined by referring to an existing conversion formula between the mean value and the variance. For example, the following formula (4) can be used to determine the variance:

σ=exp(μW+b) (4)σ=exp(μW+b) (4)

其中,W和b是待学习参量。exp是以自然常数e为底的指数函数。μ为均值,σ为方差。考虑到高斯分布的密度函数中带有exp,式(4)为了消除计算结果中的exp,故对常用的方差和均值之间的转换公式进行了适当修改。在式(4)中,当μ为某个节点的均值向量时,σ为该节点的方差向量。当μ为所有节点的均值向量构成的均值矩阵时,σ为所有节点的方差向量构成的方差矩阵。Among them, W and b are parameters to be learned. exp is an exponential function with a natural constant e as the base. μ is the mean and σ is the variance. Considering that there is exp in the density function of Gaussian distribution, in order to eliminate the exp in the calculation result of formula (4), the commonly used conversion formula between variance and mean is appropriately modified. In formula (4), when μ is the mean value vector of a certain node, σ is the variance vector of the node. When μ is the mean matrix formed by the mean vectors of all nodes, σ is the variance matrix formed by the variance vectors of all nodes.

在构建节点表征连续分布时,可以按照以下式(5)进行:When constructing a node to represent a continuous distribution, it can be carried out according to the following formula (5):

Z=μ+σ˙∈ (5)Z=μ+σ˙∈ (5)

其中,Z为节点表征连续分布,σ˙∈为第一项。∈为随机参数。当μ为某个节点的均值向量,σ为该节点的方差向量时,Z为该节点的节点表征连续分布向量。当μ为所有节点的均值向量构成的均值矩阵,σ为所有节点的方差向量构成的方差矩阵时,Z为所有节点的节点表征连续分布向量构成的矩阵。Among them, Z represents the continuous distribution of nodes, and σ˙∈ is the first term. ∈ is a random parameter. When μ is the mean value vector of a certain node and σ is the variance vector of the node, Z is the node representation continuous distribution vector of the node. When μ is the mean matrix formed by the mean vectors of all nodes, and σ is the variance matrix formed by the variance vectors of all nodes, Z is the matrix formed by the node representation continuous distribution vectors of all nodes.

为了使得计算简洁,节点表征连续分布可以被假设是均值为0、方差为1的高斯分布。相应的,随机参数∈也可以是均值为0、方差为1的随机高斯噪声。In order to make the calculation simple, the continuous distribution of the node representation can be assumed to be a Gaussian distribution with a mean of 0 and a variance of 1. Correspondingly, the random parameter ∈ can also be random Gaussian noise with a mean of 0 and a variance of 1.

在确定随机参数∈的取值时,可以按照相应的规则生成随机参数∈,当需要生成两个采样表征时,可以获取两个随机参数∈。例如,当生成两个随机参数∈′和∈″时,可以基于上述式(5)得到以下的式(6)中的对比目标Z′和Z″:When determining the value of the random parameter ∈, the random parameter ∈ can be generated according to the corresponding rules. When two sampling representations need to be generated, two random parameters ∈ can be obtained. For example, when two random parameters ∈' and ∈" are generated, the comparison targets Z' and Z" in the following formula (6) can be obtained based on the above formula (5):

Z′=μ+σ˙∈′,Z″=μ+σ˙∈″ (6)Z′=μ+σ˙∈′, Z″=μ+σ˙∈″ (6)

其中,Z′可以是第一采样表征,Z″是第二采样表征。Wherein, Z' may be the first sampling representation, and Z" may be the second sampling representation.

在构建对比目标时,可以但不限于获取两个采样表征,也可以获取更多个采样表征。When constructing a comparison target, two sampling representations may be obtained, but not limited to, or more sampling representations may be obtained.

在节点表征连续分布采用高斯分布时,在步骤S210之前,可以使用高斯分布随机初始化节点表征,这样能够加快评分模型的迭代过程。When the Gaussian distribution is used for the continuous distribution of the node representation, before step S210, the Gaussian distribution may be used to randomly initialize the node representation, which can speed up the iterative process of the scoring model.

以上内容说明了采用重参数化技巧重构节点表征连续分布的实施方式。对这些实施方式进行一些改进,还可以得到更多的实施方式。例如,方差与随机参数的组合方式不限于两者相乘得到第一项,还可以包含很多种方式。The foregoing illustrates an implementation of refactoring node representations to represent continuous distributions using the reparameterization technique. Some improvements can be made to these embodiments, and more embodiments can also be obtained. For example, the combination of the variance and the random parameter is not limited to multiplying the two to obtain the first item, and may also include many ways.

所构建的节点表征连续分布中,随机参数∈是随机产生的,将方差作为随机参数∈的系数,也就放大了这种随机性,并且使得节点表征连续分布的这种随机性变得可控。随机参数∈带来了随机性,而方差则决定了这种随机性的规模,从而使得这种随机性可控。并且,随着模型迭代的进行,方差是在逐渐被学习的,这就使得噪声的幅度也是学到的。并且,不同节点的方差不同,即不同用户节点的节点表征的方差不同,不同推送对象节点的节点表征的方差不同,方差中携带了用户特征和推送对象特征。当方差不同时,对应的节点表征连续分布中的随机参数∈的大小也不同,随机参数∈受到了节点方差的影响,而变得与节点相关了,也就是与用户和推送对象相关了。方差大,对应的随机噪声就大,对该节点计算损失时,节点的差异值也会比较大,对该节点的节点表征的调整也会相应大。这样也就考虑了用户和推送对象特有的性质,生成的节点表征连续分布也考虑了用户和推送对象特有的性质,进而使得构建的对比目标更加高效,更加合理。In the constructed node representation continuous distribution, the random parameter ∈ is randomly generated, and the variance is used as the coefficient of the random parameter ∈, which amplifies this randomness and makes the randomness of the node representation continuous distribution controllable . The random parameter ∈ brings randomness, and the variance determines the scale of this randomness, thus making this randomness controllable. Moreover, as the model iterates, the variance is gradually learned, which makes the magnitude of the noise also learned. Moreover, the variances of different nodes are different, that is, the variances of node representations of different user nodes are different, and the variances of node representations of different push object nodes are different, and the variances carry user characteristics and push object characteristics. When the variance is different, the size of the random parameter ∈ in the corresponding node representation continuous distribution is also different. The random parameter ∈ is affected by the variance of the node and becomes related to the node, that is, related to the user and the push object. When the variance is large, the corresponding random noise is large. When calculating the loss of the node, the difference value of the node will be relatively large, and the adjustment of the node representation of the node will be correspondingly large. In this way, the unique properties of users and push objects are considered, and the continuous distribution of generated node representations also takes into account the unique properties of users and push objects, which makes the comparison target constructed more efficient and reasonable.

在步骤S230中,基于同一节点的第一采样表征与第二采样表征之间的差异,以及不同节点的第一采样表征与第二采样表征之间的差异,确定第一损失,基于第一损失确定预测损失。在步骤S240中,向减小预测损失的方向,更新多个节点的节点表征。In step S230, based on the difference between the first sampling representation and the second sampling representation of the same node, and the difference between the first sampling representation and the second sampling representation of different nodes, the first loss is determined, based on the first loss Determine the prediction loss. In step S240, node representations of multiple nodes are updated in the direction of reducing the prediction loss.

同一节点的第一采样表征Z′和第二采样表征Z″应该尽可能接近,或者说尽可能相似。不同节点的第一采样表征Z′和第二采样表征Z″应该尽可能远离,或者说尽可能不相似。同一节点的第一采样表征Z′和第二采样表征Z″可以作为正样本,不同节点的第一采样表征Z′和第二采样表征Z″可以作为负样本。此处的节点可以采用节点标识表示。判断两个节点是否为同一节点,可以包括判断节点标识是否相同。例如,在第一采样表征矩阵和第二采样表征矩阵中,可以将第i节点对应的两个向量作为正样本,将第i节点的向量和第j节点的向量作为负样本,其中i与j不相同。The first sampling representation Z' and the second sampling representation Z" of the same node should be as close as possible, or as similar as possible. The first sampling representation Z' and the second sampling representation Z" of different nodes should be as far away as possible, or as dissimilar as possible. The first sampled representation Z' and the second sampled representation Z" of the same node can be used as positive samples, and the first sampled representation Z' and the second sampled representation Z" of different nodes can be used as negative samples. The nodes here can be represented by node identifiers. Judging whether the two nodes are the same node may include judging whether the node identifiers are the same. For example, in the first sampled representation matrix and the second sampled representation matrix, the two vectors corresponding to the i-th node can be used as positive samples, and the vector of the i-th node and the vector of the j-th node can be used as negative samples, where i and j Are not the same.

利用步骤S230计算的第一损失时,可以采用对比损失函数确定,并且可以将第一损失作为预测损失中的一部分。在基于第一损失确定预测损失时,可以直接将第一损失作为预测损失进行模型更新,也可以将第一损失作为预测损失的一部分,将第一损失与采用其他方式确定的损失作为预测损失。When using the first loss calculated in step S230, it can be determined by using a contrastive loss function, and the first loss can be used as a part of the prediction loss. When determining the predicted loss based on the first loss, the first loss can be directly used as the predicted loss for model update, or the first loss can be used as a part of the predicted loss, and the first loss and losses determined by other methods can be used as the predicted loss.

步骤S230计算预测损失的方式可以称为节点级别的对比损失。节点包括用户节点和推送对象节点,可以采用以下式(7)和(8)分别计算用户级别的对比学习损失函数LN U和推送对象级别的对比损失函数LN IThe manner of calculating the prediction loss in step S230 may be called node-level contrastive loss. Nodes include user nodes and push object nodes. The following formulas (7) and (8) can be used to calculate the user-level comparative learning loss function L N U and the push object-level comparative loss function L N I :

其中,τ1是对比温度,是预先设置的超参数。Bu是一批(batch)节点中的用户,Bi是一批节点中的推送对象。T为矩阵转置符号。za′为第a个用户的第一采样表征向量,za″为第a个用户的第二采样表征向量。zi′为第i个推送对象的第一采样表征向量,zi″为第i个推送对象的第二采样表征向量。where τ1 is the contrast temperature, which is a pre-set hyperparameter. B u is a user in a batch of nodes, and B i is a push object in a batch of nodes. T is the matrix transpose notation. z a ′ is the first sampling characterization vector of the ath user, z a ″ is the second sampling characterization vector of the ath user. z i ′ is the first sampling characterization vector of the i push object, z i ″ is The second sampling representation vector of the i-th pushed object.

在确定预测损失时,还可以基于上述均值和方差分别与预设的高斯分布的均值与方差之间的差异,确定第二损失,基于第一损失和第二损失确定预测损失。在基于第一损失和第二损失确定预测损失时,可以将第一损失与第二损失的和作为预测损失,也可以将第一损失和第二损失与采用其他方式确定的损失作为预测损失。When determining the prediction loss, the second loss may also be determined based on the difference between the above mean and variance and the mean and variance of the preset Gaussian distribution, and the prediction loss may be determined based on the first loss and the second loss. When determining the predicted loss based on the first loss and the second loss, the sum of the first loss and the second loss may be used as the predicted loss, or the first loss, the second loss and losses determined in other ways may be used as the predicted loss.

下面继续说明确定预测损失的其他方式。在构建节点表征连续分布Z之后,还可以基于节点表征连续分布Z,预测多个节点之间相互连接的概率;基于该概率,确定关系网络的重构邻接矩阵A′。Other ways of determining the prediction loss continue below. After constructing the node representation continuous distribution Z, the probability of interconnection between multiple nodes can also be predicted based on the node representation continuous distribution Z; based on this probability, the reconstructed adjacency matrix A' of the relationship network is determined.

在确定预测损失时,可以基于重构邻接矩阵A′与原始邻接矩阵A之间的差异,确定第三损失,基于第一损失和第三损失等损失确定预测损失。When determining the prediction loss, the third loss can be determined based on the difference between the reconstructed adjacency matrix A' and the original adjacency matrix A, and the prediction loss can be determined based on the first loss and the third loss.

在预测多个节点之间相互连接的概率时,可以针对任意的第一节点和第二节点,将第一节点的节点表征连续分布与第二节点的节点表征连续分布之间的相似度,作为激活函数的输入参数,将得到的输出值作为第一节点和第二节点之间相互连接的概率。When predicting the probability of interconnection between multiple nodes, for any first node and second node, the similarity between the node representation continuous distribution of the first node and the node representation continuous distribution of the second node can be taken as The input parameter of the activation function, and the obtained output value is used as the probability of interconnection between the first node and the second node.

在预测多个节点之间相互连接的概率时,可以通过确定随机参数∈的取值,对节点表征连续分布进行采样,得到第三采样表征Z3。基于多个节点的第三采样表征Z3,预测多个节点之间相互连接的概率。第三采样表征Z3也可以采用第一采用表征Z′和第二采样表征Z″中的任意一个,也可以通过随机生成∈来得到新的第三采样表征Z3When predicting the probability of interconnection among multiple nodes, the third sampling representation Z 3 can be obtained by sampling the continuous distribution of node representations by determining the value of the random parameter ∈. Based on the third sampled representation Z 3 of the plurality of nodes, the probability of interconnection among the plurality of nodes is predicted. The third sampling representation Z 3 may also use any one of the first sampling representation Z′ and the second sampling representation Z″, or a new third sampling representation Z 3 may be obtained by randomly generating ∈.

针对任意的第一节点和第二节点,可以将第一节点的第三采样表征向量与第二节点的第三采样表征向量之间的相似度,作为激活函数的输入参数,将得到的输出值作为第一节点和第二节点之间相互连接的概率。For any first node and second node, the similarity between the third sampling characterization vector of the first node and the third sampling characterization vector of the second node can be used as the input parameter of the activation function, and the output value obtained will be As the probability of interconnection between the first node and the second node.

例如,可以采用以下的式(9)确定任意的第i节点和第j节点相连的概率p:For example, the following formula (9) can be used to determine the probability p that any i-th node is connected to the j-th node:

其中,zi是第i节点的第三采样表征向量,zj是第j节点的第三采样表征向量,sigmoid是激活函数。对于第三采样表征矩阵,zi和zj分别是第三采样表征矩阵中的第i向量和第j向量。p的取值在0到1之间。Among them, z i is the third sampling characterization vector of the i-th node, z j is the third sampling characterization vector of the j-th node, and sigmoid is the activation function. For the third sampling representation matrix, z i and z j are the i-th vector and the j-th vector in the third sampling representation matrix, respectively. The value of p is between 0 and 1.

在一种实施方式中,可以采用以下的式(10)确定基于重构邻接矩阵A′与原始邻接矩阵A之间的差异,以及基于上述均值和方差分别与预设的高斯分布的均值与方差之间的差异,得到的图重构损失函数LELBOIn one embodiment, the following formula (10) can be used to determine the difference between the reconstructed adjacency matrix A' and the original adjacency matrix A, and the mean and variance based on the above mean and variance respectively and the preset Gaussian distribution The difference between the resulting graph reconstruction loss function L ELBO :

其中,δ为激活函数。Da是用户a的训练数据。举例来说,对于用户a,如果用户a与1~5等五个商品中的1、2和3有连接关系,则用户a分别与商品1、2和3构成正样本,用户a分别与商品4和5构成负样本。式(10)等式右侧的第一项是邻接矩阵之间的损失函数,第二项是高斯分布之间的损失函数。Among them, δ is the activation function. D a is the training data of user a. For example, for user a, if user a has a connection relationship with 1, 2 and 3 among the five commodities 1 to 5, then user a and commodity 1, 2 and 3 constitute positive samples respectively, and user a and commodity 4 and 5 constitute negative samples. The first term on the right side of equation (10) is the loss function between adjacency matrices, and the second term is the loss function between Gaussian distributions.

为了使得确定的预测损失更加全面,从而提高模型的迭代速度,在构建节点表征连续分布之后,还可以对节点进行聚类,确定聚类基本的对比损失函数。In order to make the determined prediction loss more comprehensive and improve the iteration speed of the model, after constructing the node representation continuous distribution, the nodes can also be clustered to determine the basic comparative loss function of the cluster.

具体的,可以基于节点表征连续分布Z,对多个节点进行聚类,得到多个节点分别归属的类簇。Specifically, multiple nodes can be clustered based on the continuous distribution Z of the node representation, and clusters to which multiple nodes belong can be obtained.

在确定预测损失时,可以基于同类簇节点的第一采样表征Z′和第二采样表征Z″之间的差异,以及异类簇节点的第一采样表征Z′和第二采样表征Z″之间的差异,确定第四损失,基于第一损失和第四损失等确定预测损失。When determining the prediction loss, it can be based on the difference between the first sampled representation Z' and the second sampled representation Z" of the same cluster nodes, and the difference between the first sampled representation Z' and the second sampled representation Z" of the heterogeneous cluster nodes , determine the fourth loss, determine the prediction loss based on the first loss and the fourth loss, etc.

在使用节点表征连续分布Z对多个节点进行聚类时,可以使用节点表征连续分布Z中的任意一个值,可以是第一采样表征Z′或第二采样表征Z″,也可以是重新采样后的值。When clustering multiple nodes using the node to represent the continuous distribution Z, you can use the node to represent any value in the continuous distribution Z, which can be the first sampling representation Z' or the second sampling representation Z", or resampling after the value.

在聚类时,可以采用多种已有的聚类算法,例如K-Means算法或均值漂移算法等。下面以K-Means算法为例说明对节点的聚类过程。在聚类时,可以针对用户节点和推送对象节点分别进行聚类。When clustering, various existing clustering algorithms can be used, such as K-Means algorithm or mean shift algorithm. The following uses the K-Means algorithm as an example to illustrate the clustering process of nodes. During clustering, user nodes and push object nodes can be clustered separately.

初始时,可以定义用户节点聚类个数为Ku,推送对象聚类个数为Ki。使用K-Means算法确定用户节点的聚类原型为Cu={ck u}Ku,推送对象聚类原型为Ci={ck i}Ki,进而得到用户节点聚类分布∏a=1 Mk=1 Kup(ck u|za),以及推送对象节点聚类分布∏i=M+1 M+Nk=1 Kip(ck i|zi)。聚类原型即聚类中心,一个聚类原型对应一个类簇。聚类分布包括用户节点聚类分布和推送对象节点聚类分布。聚类分布可以采用向量或矩阵形式表示。在一种实施方式中,聚类分布向量的维度是聚类的总类别数,节点属于哪个类别,对应的向量中的元素可以取值为1,其他元素取值为0。聚类分布矩阵为所有节点的聚类分布向量构成的矩阵。例如,矩阵中的行可以是用户或推送对象的聚类分布向量,列为聚类分布向量的维度。Initially, the number of clusters of user nodes can be defined as K u , and the number of clusters of push objects can be defined as K i . Use the K-Means algorithm to determine the clustering prototype of user nodes as C u ={c k u } Ku , and the clustering prototype of push objects as C i ={c k i } Ki , and then get the clustering distribution of user nodes ∏ a=1 Mk=1 Ku p(c k u |z a ), and the cluster distribution of push object nodes ∏ i=M+1 M+Nk=1 Ki p(c k i |z i ). The clustering prototype is the clustering center, and one clustering prototype corresponds to one cluster. The cluster distribution includes the cluster distribution of user nodes and the cluster distribution of push object nodes. Cluster distributions can be represented in vector or matrix form. In one embodiment, the dimension of the cluster distribution vector is the total number of categories of the cluster, which category the node belongs to, the corresponding elements in the vector can take a value of 1, and the other elements can take a value of 0. The cluster distribution matrix is a matrix composed of the cluster distribution vectors of all nodes. For example, the rows in the matrix can be the cluster distribution vectors of users or push objects, and the columns are the dimensions of the cluster distribution vectors.

在一种实施方式中,在确定节点的聚类分布之后,还可以基于多个节点的类簇分布,确定任意两个节点属于同一个类簇的概率,基于该概率确定聚类级别的对比损失函数。In one embodiment, after determining the cluster distribution of nodes, the probability that any two nodes belong to the same cluster can be determined based on the cluster distribution of multiple nodes, and the comparative loss at the cluster level can be determined based on the probability function.

例如,可以采用以下的式(11)确定第a个用户和第b个用户属于同一个聚类原型的概率,也就是属于同一个类簇的概率p(a,b):For example, the following formula (11) can be used to determine the probability that the ath user and the bth user belong to the same cluster prototype, that is, the probability p(a,b) of belonging to the same cluster:

其中,za是节点表征连续分布中第a个用户的向量,zb是节点表征连续分布中第b个用户的向量。Among them, z a is the vector of the node representing the ath user in the continuous distribution, and z b is the vector of the node representing the bth user in the continuous distribution.

同样的,可以采用以下的式(12)确定第i个推送对象和第j个推送对象属于同一个聚类原型的概率,也就是属于同一个类簇的概率p(i,j):Similarly, the following formula (12) can be used to determine the probability that the i-th push object and the j-th push object belong to the same cluster prototype, that is, the probability p(i,j) of the same cluster:

其中,zi是节点表征连续分布中第i个推送对象的向量,zj是节点表征连续分布中第j个推送对象的向量。Among them, z i is the vector representing the i-th pushing object in the continuous distribution, and z j is the vector representing the j-th pushing object in the continuous distribution.

上述计算概率的公式(11)和(12)仅是一种举例。对这些公式进行适当的修改,比如增加系数或权重等,可以得到新的实施方式。The above formulas (11) and (12) for calculating probabilities are just examples. Appropriate modifications are made to these formulas, such as adding coefficients or weights, etc., to obtain new implementations.

同类簇节点包括属于同类簇的不同用户节点和属于同类簇的不同推送对象节点。异类簇节点包括属于不同类簇的不同用户节点和属于不同类簇的不同推送对象节点。在第一采样表征Z′和第二采样表征Z″中,对于属于同一类簇的不同用户a和b,用户a的第一采样表征向量和用户b的第二采样表征向量属于正样本。对于不同类簇的不同用户a和b,用户a的第一采样表征向量和用户b的第二采样表征向量属于负样本。对于属于同一类簇的不同推送对象i和j,推送对象i的第一采样表征向量和推送对象j的第二采样表征向量属于正样本。对于属于不同类簇的不同推送对象i和j,推送对象i的第一采样表征向量和推送对象j的第二采样表征向量属于负样本。在基于同类簇节点的第一采样表征Z′和第二采样表征Z″之间的差异,以及异类簇节点的第一采样表征Z′和第二采样表征Z″之间的差异,确定第四损失时,可以采用对比损失函数进行确定。The same cluster nodes include different user nodes belonging to the same cluster and different push object nodes belonging to the same cluster. The heterogeneous cluster nodes include different user nodes belonging to different clusters and different push object nodes belonging to different clusters. In the first sampling representation Z′ and the second sampling representation Z″, for different users a and b belonging to the same cluster, the first sampling representation vector of user a and the second sampling representation vector of user b belong to positive samples. For For different users a and b of different clusters, the first sampling characterization vector of user a and the second sampling characterization vector of user b belong to negative samples. For different pushing objects i and j belonging to the same cluster, the first sampling characterization vector of pushing object i The sampled characterization vector and the second sampled characterization vector of the push object j belong to the positive samples. For different push objects i and j belonging to different clusters, the first sample characterization vector of the push object i and the second sample characterization vector of the push object j belong to Negative samples. Based on the difference between the first sampled representation Z' and the second sampled representation Z" of the nodes of the same cluster, and the difference between the first sampled representation Z' and the second sampled representation Z" of the heterogeneous cluster nodes, When determining the fourth loss, a comparison loss function may be used for determination.

例如,可以采用以下式(13)确定用户聚类级别的对比损失函数LC U,采用式(14)确定推送对象聚类级别的对比损失函数LC IFor example, the following formula (13) can be used to determine the comparison loss function L C U of the user clustering level, and the formula (14) can be used to determine the comparison loss function L C I of the push object clustering level:

其中,τ2是对比温度,是预先设置的超参数。Bu是一批节点中的用户,Bi是一批节点中的推送对象。za′为第a个用户的第一采样表征向量,zb″为第b个用户的第二采样表征向量。zi′为第i个推送对象的第一采样表征向量,zj″为第j个推送对象的第二采样表征向量。SP(a)是式(13)中分子部分的正样本的数量和,SP(i)是式(14)中分子部分的正样本的数量和,添加这两个参量的倒数使得式(13)和(14)与式(7)和(8)处在同一节点级别。式(13)和(14)仅是一种实施方式,对其进行修改可以得到不同的实施方式。where τ2 is the contrast temperature, which is a pre-set hyperparameter. B u is a user in a batch of nodes, and B i is a push object in a batch of nodes. z a ′ is the first sampling characterization vector of the a-th user, z b ″ is the second sampling characterization vector of the b-th user. z i ′ is the first sampling characterization vector of the i-th push object, and z j ″ is The second sample representation vector of the jth pushed object. SP(a) is the sum of the number of positive samples of the molecular part in formula (13), SP(i) is the sum of the number of positive samples of the molecular part in formula (14), adding the reciprocal of these two parameters makes formula (13) and (14) are at the same node level as formulas (7) and (8). Formulas (13) and (14) are just one implementation, and different implementations can be obtained by modifying them.

在一种实施方式中,基于第一损失、第二损失和第三损失的和,可以确定总的预测损失,进而根据该总的预测损失对节点表征等待学习参量进行更新。例如,可以基于式(7)和(8)以及式(13)和(14),并采用以下的式(15)确定总的对比损失函数LclIn an implementation manner, based on the sum of the first loss, the second loss and the third loss, the total prediction loss may be determined, and then the node representation waiting learning parameters are updated according to the total prediction loss. For example, based on formulas (7) and (8) and formulas (13) and (14), the total contrastive loss function L cl can be determined using the following formula (15):

Lcl=(LN U+LN I)+γ(LC U+LC I) (15)L cl =(L N U +L N I )+γ(L C U +L C I ) (15)

其中,γ为预设的权重系数,可以根据经验设定。Wherein, γ is a preset weight coefficient, which can be set according to experience.

基于式(15)以及式(10)可以采用以下式(16)建立多任务优化目标,即确定总的损失函数L(θ):Based on formula (15) and formula (10), the following formula (16) can be used to establish a multi-task optimization goal, that is, to determine the total loss function L(θ):

L(θ)= LELBO+αLcl +β‖E‖2 (16)L(θ)= L ELBO +αL cl +β‖E‖ 2 (16)

其中,E为节点表征,α和β分别用于调控对比损失函数和正则项的权重。‖E‖2为对E求L2范数。θ=[E,W,b]是待学习参量。可以通过梯度下降法对上述优化目标求解,更新参数θ。Among them, E is the node representation, and α and β are used to control the weight of the comparison loss function and the regularization item, respectively. ‖E‖ 2 is to find the L2 norm of E. θ=[E, W, b] is the parameter to be learned. The above optimization objective can be solved by the gradient descent method, and the parameter θ can be updated.

上述步骤S210~S240为评分模型的一次迭代过程。在一次迭代过程中可以取关系网络中的一批节点进行训练。当评分模型的预测损失小于阈值,或者迭代次数达到次数阈值时,模型收敛。The above steps S210-S240 are an iterative process of the scoring model. In one iteration process, a batch of nodes in the relational network can be taken for training. When the prediction loss of the scoring model is less than the threshold, or the number of iterations reaches the threshold, the model converges.

以上是评分模型的训练过程。上述实施例中,利用聚合表征和随机参数对节点表征进行了重构,并对重构后的参数进行采样,构建了对比目标用于对比学习,从而从关系网络中学习节点表征。在构建节点表征连续分布时,以方差作为随机参数的系数,能够使得参数构建的过程充分考虑到关系网络中节点的个性化,从而构建语义无损且节点个性化的对比目标,有效地提高了推送效果。The above is the training process of the scoring model. In the above embodiment, the node representation is reconstructed by using aggregated representation and random parameters, and the reconstructed parameters are sampled, and a comparison target is constructed for comparative learning, so as to learn node representation from the relational network. When building a node to represent a continuous distribution, using the variance as the coefficient of the random parameter can make the process of parameter construction fully take into account the individuality of the nodes in the relationship network, thereby constructing a comparison target with lossless semantics and individualized nodes, which effectively improves the push rate. Effect.

上述实施例,通过评分模型深度挖掘了用户的历史交互数据,利用图神经网络建模了用户与推送对象的高阶潜在偏好,精准推理了节点表征连续分布。并且,在基于聚类感知的对比学习中,通过无监督的方式计算节点之间的相似度,从聚类分布的角度进一步改进了对比学习,有效缓解了关系网络中交互数据稀疏的问题。In the above-mentioned embodiment, the user's historical interaction data is deeply mined through the scoring model, the high-order potential preferences of the user and the push object are modeled by using the graph neural network, and the continuous distribution of node representations is accurately inferred. Moreover, in cluster-aware contrastive learning, the similarity between nodes is calculated in an unsupervised manner, which further improves contrastive learning from the perspective of cluster distribution and effectively alleviates the problem of sparse interaction data in relational networks.

图3为实施例提供的一种利用评分模型对用户进行推送方法的流程示意图。评分模型采用图2所示实施例提供的方法训练得到。该方法包括以下步骤。Fig. 3 is a schematic flowchart of a method for pushing users by using a scoring model provided by an embodiment. The scoring model is trained using the method provided in the embodiment shown in FIG. 2 . The method includes the following steps.

步骤S310,通过评分模型,基于用户节点的节点表征连续分布和推送对象节点的节点表征连续分布,确定对应的用户与推送对象之间的相似度。Step S310, through the scoring model, based on the continuous distribution of node representations of user nodes and the continuous distribution of node representations of push object nodes, determine the similarity between the corresponding user and the push object.

步骤S320,通过评分模型,将相似度作为输入参数输入激活函数,将得到的输出值作为用户对推送对象的评分。Step S320, through the scoring model, the similarity is input into the activation function as an input parameter, and the obtained output value is used as the user's rating on the pushed object.

例如,可以采用以下的式(17)预测第a个用户对第i个推送对象的评分值rai′:For example, the following formula (17) can be used to predict the rating value r ai ′ of the a-th user on the i-th pushed object:

rai′=sigmoid(za Tzi) (17)r ai ′=sigmoid(z a T z i ) (17)

其中,za Tzi为第a个用于与第i个推送对象之间的相似度,sigmoid为激活函数。通过上式,可以得到预测评分矩阵R′={rai′}M×NAmong them, z a T z i is the similarity between the ath object and the ith push object, and sigmoid is the activation function. Through the above formula, the prediction score matrix R'={r ai '} M×N can be obtained.

步骤S330,基于用户对若干个推送对象的评分,对若干个推送对象进行选择,基于选择结果对用户进行推送。在选择时,可以将评分最高的若干个推送对象向用户推送。Step S330, based on the user's ratings on several push objects, select several push objects, and push the user based on the selection result. When selecting, several push objects with the highest scores may be pushed to the user.

在本实施例中,在确定用户与推送对象之间的相似度时,使用了节点表征连续分布作为节点向量参与评分预测。节点表征连续分布相对于节点表征聚合了更多的邻居节点信息,包含了更深层的用户特征和/或推送对象特征,能够使得评分更准确,推送更合理。In this embodiment, when determining the similarity between the user and the pushed object, the continuous distribution of node representation is used as the node vector to participate in score prediction. Compared with node representation, the continuous distribution of node representation aggregates more neighbor node information, including deeper user characteristics and/or push object characteristics, which can make scoring more accurate and push more reasonable.

在其他实施例中,也可以直接采用评分模型训练到的节点表征参与评分预测。In other embodiments, the node representation trained by the scoring model may also be directly used to participate in the scoring prediction.

本说明书中,第一采样表征、第一节点等词语中的“第一”,以及文中相应的“第二”(如果有),仅仅是为了区分和描述方便,并不具有任何限定意义。In this specification, the "first" in words such as the first sampling representation and the first node, and the corresponding "second" (if any) in the text are only for the convenience of distinction and description, and do not have any limiting meaning.

上述内容对本说明书的特定实施例进行了描述,其他实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行,并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要按照示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的,或者可能是有利的。While the foregoing describes certain embodiments of the specification, other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. Multitasking and parallel processing are also possible, or may be advantageous, in certain embodiments.

图4为实施例提供的一种评分模型的训练装置的示意性框图。评分模型用于预测若干个用户分别对若干个待推送的推送对象的评分;所述评分模型基于包含多个节点的关系网络进行训练,多个节点包括代表用户的节点和代表推送对象的节点,以及表征节点之间连接关系的边;所述评分模型的待学习参量包括节点表征。该装置可以部署在服务平台中,服务平台可以通过任何具有计算、处理能力的装置、设备、平台、设备集群等来实现。该装置实施例与图2所示方法实施例相对应。该装置400包括:Fig. 4 is a schematic block diagram of a scoring model training device provided in an embodiment. The scoring model is used to predict the ratings of several users on several push objects to be pushed; the scoring model is trained based on a relationship network comprising a plurality of nodes, and the multiple nodes include nodes representing users and nodes representing push objects, and edges representing connection relationships between nodes; the parameters to be learned of the scoring model include node representations. The device can be deployed in a service platform, and the service platform can be realized by any device, device, platform, device cluster, etc. that have computing and processing capabilities. This device embodiment corresponds to the method embodiment shown in FIG. 2 . The device 400 includes:

聚合模块410,配置为通过图神经网络,基于多个节点的所述节点表征以及所述关系网络的原始邻接矩阵,确定节点的聚合表征;其中,所述聚合表征聚合了邻居用户特征和/或邻居推送对象特征;The aggregation module 410 is configured to determine an aggregated representation of a node based on the node representations of multiple nodes and the original adjacency matrix of the relationship network through a graph neural network; wherein the aggregated representation aggregates neighbor user features and/or Neighbors push object characteristics;

构建模块420,配置为基于节点的所述聚合表征和随机参数,构建节点表征连续分布,并通过确定所述随机参数的取值,对所述节点表征连续分布进行采样,得到作为对比目标的第一采样表征和第二采样表征;其中,所述节点表征连续分布包括:包含用户特征的节点表征连续分布和包含推送对象特征的节点表征连续分布;The construction module 420 is configured to construct a continuous distribution of node representations based on the aggregated representations and random parameters of nodes, and sample the continuous distribution of node representations by determining the value of the random parameters to obtain the first comparison target A sampling representation and a second sampling representation; wherein, the node representation continuous distribution includes: a node representation continuous distribution containing user characteristics and a node representation continuous distribution containing push object characteristics;

损失模块430,配置为基于同一节点的所述第一采样表征与所述第二采样表征之间的差异,以及不同节点的所述第一采样表征与所述第二采样表征之间的差异,确定第一损失,基于所述第一损失确定预测损失;a loss module 430 configured to be based on a difference between the first sampled representation and the second sampled representation of the same node, and a difference between the first sampled representation and the second sampled representation of different nodes, determining a first loss, determining a predicted loss based on the first loss;

更新模块440,配置为向减小所述预测损失的方向,更新多个节点的所述节点表征。The update module 440 is configured to update the node representations of multiple nodes in the direction of reducing the prediction loss.

在一种实施方式中,所述图神经网络采用图卷积网络实现;所述图卷积网络包括若干个卷积层;聚合模块410包括第一确定子模块和第二确定子模块;(图中未示出)In one embodiment, the graph neural network is implemented using a graph convolutional network; the graph convolutional network includes several convolutional layers; the aggregation module 410 includes a first determination sub-module and a second determination sub-module; (Fig. not shown in

第一确定子模块,配置为任意一个卷积层采用以下方式输出任意一个节点的中间表征:基于上一卷积层输出的该节点的邻居节点的中间表征,确定该节点在该卷积层的中间表征;The first determination sub-module is configured such that any convolutional layer outputs the intermediate representation of any node in the following manner: based on the intermediate representation of the node’s neighbors output by the previous convolutional layer, determine the node’s position in the convolutional layer intermediate representation;

第二确定子模块,配置为针对任意一个节点,基于若干个所述卷积层输出的该节点的中间表征,确定该节点的聚合表征。The second determination sub-module is configured to, for any node, determine the aggregate representation of the node based on the intermediate representations of the node output by several convolutional layers.

在一种实施方式中,所述节点表征连续分布符合高斯分布;构建模块420包括第三确定子模块和第一构建子模块;(图中未示出)In one embodiment, the node characterizes a continuous distribution conforming to a Gaussian distribution; the construction module 420 includes a third determination submodule and a first construction submodule; (not shown in the figure)

第三确定子模块,配置为以所述聚合表征为均值,基于所述均值确定对应的方差;The third determining submodule is configured to use the aggregation representation as a mean value, and determine the corresponding variance based on the mean value;

第一构建子模块,配置为基于所述均值、所述方差和所述随机参数,构建符合高斯分布的节点表征连续分布。The first construction submodule is configured to construct a continuous distribution of node representation conforming to Gaussian distribution based on the mean value, the variance and the random parameter.

在一种实施方式中,所述第一构建子模块具体配置为:In one embodiment, the first construction submodule is specifically configured as:

以所述方差作为所述随机参数的系数,构建节点表征连续分布的第一项;Using the variance as the coefficient of the random parameter, constructing the first term of the node representing the continuous distribution;

基于所述第一项与所述均值的和,构建所述节点表征连续分布。Based on the sum of the first term and the mean value, the node representation continuous distribution is constructed.

在一种实施方式中,所述随机参数为均值为0、方差为1的随机高斯噪声。In one embodiment, the random parameter is random Gaussian noise with a mean of 0 and a variance of 1.

在一种实施方式中,损失模块430,在基于所述第一损失确定预测损失时,包括:In one embodiment, the loss module 430, when determining the predicted loss based on the first loss, includes:

基于所述均值和所述方差分别与预设的高斯分布的均值与方差之间的差异,确定第二损失;determining a second loss based on the difference between the mean and the variance and the mean and variance of a preset Gaussian distribution, respectively;

基于第一损失和第二损失确定预测损失。A predicted loss is determined based on the first loss and the second loss.

在一种实施方式中,装置400还包括:In one embodiment, the device 400 further includes:

重构模块(图中未示出),配置为在构建节点表征连续分布之后,基于所述节点表征连续分布,预测多个节点之间相互连接的概率;基于所述概率,确定所述关系网络的重构邻接矩阵;A reconstruction module (not shown in the figure), configured to predict the probability of interconnection between multiple nodes based on the node representation continuous distribution after constructing the node representation continuous distribution; based on the probability, determine the relationship network The reconstructed adjacency matrix of ;

所述损失模块430,在基于所述第一损失确定预测损失时,包括:The loss module 430, when determining the predicted loss based on the first loss, includes:

基于所述重构邻接矩阵与所述原始邻接矩阵之间的差异,确定第三损失;determining a third loss based on the difference between the reconstructed adjacency matrix and the original adjacency matrix;

基于所述第一损失和所述第三损失确定预测损失。A predicted loss is determined based on the first loss and the third loss.

在一种实施方式中,所述重构模块,在预测多个节点之间相互连接的概率时,包括:In one embodiment, the reconstruction module, when predicting the probability of interconnection between multiple nodes, includes:

针对任意的第一节点和第二节点,将所述第一节点的节点表征连续分布与所述第二节点的节点表征连续分布之间的相似度,作为激活函数的输入参数,将得到的输出值作为所述第一节点和所述第二节点之间相互连接的概率。For any first node and second node, the similarity between the node representation continuous distribution of the first node and the node representation continuous distribution of the second node is used as the input parameter of the activation function, and the obtained output The value is used as the probability of interconnection between the first node and the second node.

在一种实施方式中,装置400还包括:In one embodiment, the device 400 further includes:

聚类模块,配置为在构建节点表征连续分布之后,基于所述节点表征连续分布,对多个节点进行聚类,得到多个节点分别归属的类簇;The clustering module is configured to cluster multiple nodes based on the continuous distribution of node representations after constructing the continuous distribution of node representations, to obtain clusters to which multiple nodes belong respectively;

损失模块430,在基于所述第一损失确定预测损失时,包括:The loss module 430, when determining the predicted loss based on the first loss, includes:

基于同类簇节点的所述第一采样表征与所述第二采样表征之间的差异,以及异类簇节点的所述第一采样表征与所述第二采样表征之间的差异,确定第四损失;Determining a fourth loss based on a difference between the first sampled representation and the second sampled representation of nodes in a homogeneous cluster and a difference between the first sampled representation and the second sampled representation of nodes in a heterogeneous cluster ;

基于所述第一损失和所述第四损失确定预测损失。A predicted loss is determined based on the first loss and the fourth loss.

在一种实施方式中,所述损失模块430,在基于所述第一损失确定预测损失时,包括:In an implementation manner, the loss module 430, when determining the predicted loss based on the first loss, includes:

基于所述第一损失,采用对比损失函数确定所述预测损失。Based on the first loss, the prediction loss is determined using a contrastive loss function.

图5为实施例提供的一种利用评分模型对用户进行推送的装置的示意性框图。该评分模型采用图2所示实施例提供的方法训练得到。该装置500可以部署在服务平台中,服务平台可以通过任何具有计算、处理能力的装置、设备、平台、设备集群等来实现。该装置实施例与图3所示方法实施例相对应。装置500包括:Fig. 5 is a schematic block diagram of an apparatus for pushing users by using a scoring model provided by an embodiment. The scoring model is trained using the method provided in the embodiment shown in FIG. 2 . The apparatus 500 may be deployed on a service platform, and the service platform may be implemented by any apparatus, device, platform, device cluster, etc. that have computing and processing capabilities. This device embodiment corresponds to the method embodiment shown in FIG. 3 . Device 500 includes:

确定模块510,配置为通过所述评分模型,基于用户节点的节点表征连续分布和推送对象节点的节点表征连续分布,确定对应的用户与推送对象之间的相似度;The determination module 510 is configured to determine the similarity between the corresponding user and the push object based on the continuous distribution of the node representation of the user node and the continuous distribution of the node representation of the push object node through the scoring model;

评分模块520,配置为通过所述评分模型,将所述相似度作为输入参数输入激活函数,将得到的输出值作为所述用户对所述推送对象的评分;The scoring module 520 is configured to use the scoring model to input the similarity as an input parameter into an activation function, and use the obtained output value as the user's score on the pushed object;

推送模块530,配置为基于所述用户对若干个推送对象的评分,对所述若干个推送对象进行选择,基于选择结果对所述用户进行推送。The push module 530 is configured to select the several push objects based on the user's ratings on the several push objects, and push the user based on the selection result.

上述装置实施例与方法实施例相对应,具体说明可以参见方法实施例部分的描述,此处不再赘述。装置实施例是基于对应的方法实施例得到,与对应的方法实施例具有同样的技术效果,具体说明可参见对应的方法实施例。The foregoing device embodiments correspond to the method embodiments, and for specific descriptions, refer to the description of the method embodiments, and details are not repeated here. The device embodiment is obtained based on the corresponding method embodiment, and has the same technical effect as the corresponding method embodiment. For specific description, please refer to the corresponding method embodiment.

本说明书实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行图1至图3任一项所述的方法。The embodiment of the present specification also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed in a computer, the computer is instructed to execute the method described in any one of FIG. 1 to FIG. 3 .

本说明书实施例还提供了一种计算设备,包括存储器和处理器,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现图1至图3任一项所述的方法。The embodiment of this specification also provides a computing device, including a memory and a processor, wherein executable code is stored in the memory, and when the processor executes the executable code, the computer described in any one of Fig. 1 to Fig. 3 is implemented. described method.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于存储介质和计算设备实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the storage medium and computing device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for relevant parts, please refer to part of the description of the method embodiments.

本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。Those skilled in the art should be aware that, in the above one or more examples, the functions described in the embodiments of the present invention may be implemented by hardware, software, firmware or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.

以上所述的具体实施方式,对本发明实施例的目的、技术方案和有益效果进行了进一步的详细说明。所应理解的是,以上所述仅为本发明实施例的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。The specific implementation manners described above further describe the purpose, technical solutions and beneficial effects of the embodiments of the present invention in detail. It should be understood that the above description is only the specific implementation of the embodiment of the present invention, and is not used to limit the protection scope of the present invention. Any modification and equivalent replacement made on the basis of the technical solution of the present invention , improvements, etc., should be included within the protection scope of the present invention.

Claims (15)

1.一种评分模型的训练方法,所述评分模型用于预测若干个用户分别对若干个待推送的推送对象的评分;所述评分模型基于包含多个节点的关系网络进行训练,多个节点包括代表用户的节点和代表推送对象的节点,以及表征节点之间连接关系的边;所述评分模型的待学习参量包括节点表征;所述方法包括:1. A training method of a scoring model, the scoring model is used to predict the scoring of several users to be pushed respectively to several push objects to be pushed; the scoring model is trained based on a relational network comprising a plurality of nodes, and a plurality of nodes Including a node representing a user and a node representing a push object, and an edge representing a connection relationship between nodes; the parameters to be learned of the scoring model include node representation; the method includes: 通过图神经网络,基于多个节点的所述节点表征以及所述关系网络的原始邻接矩阵,确定节点的聚合表征;其中,所述聚合表征聚合了邻居用户特征和/或邻居推送对象特征;Through a graph neural network, based on the node representations of multiple nodes and the original adjacency matrix of the relationship network, determine the aggregation representation of the node; wherein, the aggregation representation aggregates neighbor user features and/or neighbor push object features; 基于节点的所述聚合表征和随机参数,构建节点表征连续分布,并通过确定所述随机参数的取值,对所述节点表征连续分布进行采样,得到作为对比目标的第一采样表征和第二采样表征;其中,所述节点表征连续分布包括:包含用户特征的节点表征连续分布和包含推送对象特征的节点表征连续分布;Based on the aggregate representation and random parameters of nodes, construct a continuous distribution of node representations, and by determining the value of the random parameters, sample the continuous distribution of node representations to obtain the first sampling representation and the second sampling representation as the comparison target. Sampling representation; wherein, the node representation continuous distribution includes: a node representation continuous distribution containing user characteristics and a node representation continuous distribution containing push object characteristics; 基于同一节点的所述第一采样表征与所述第二采样表征之间的差异,以及不同节点的所述第一采样表征与所述第二采样表征之间的差异,确定第一损失,基于所述第一损失确定预测损失;Determining a first loss based on the difference between the first sampled representation and the second sampled representation for the same node, and the difference between the first sampled representation and the second sampled representation for different nodes, based on said first loss determines a predicted loss; 向减小所述预测损失的方向,更新多个节点的所述节点表征。The node representations of a plurality of nodes are updated in the direction of reducing the prediction loss. 2.根据权利要求1所述的方法,所述图神经网络采用图卷积网络实现;所述图卷积网络包括若干个卷积层;所述确定节点的聚合表征的步骤,包括:2. The method according to claim 1, the graph neural network is implemented using a graph convolutional network; the graph convolutional network includes several convolutional layers; the step of determining the aggregation representation of a node includes: 任意一个卷积层采用以下方式输出任意一个节点的中间表征:基于上一卷积层输出的该节点的邻居节点的中间表征,确定该节点在该卷积层的中间表征;Any convolutional layer outputs the intermediate representation of any node in the following way: based on the intermediate representation of the node's neighbor nodes output by the previous convolutional layer, determine the intermediate representation of the node in the convolutional layer; 针对任意一个节点,基于若干个所述卷积层输出的该节点的中间表征,确定该节点的聚合表征。For any node, based on the intermediate representations of the node output by several convolutional layers, the aggregated representation of the node is determined. 3.根据权利要求1所述的方法,所述节点表征连续分布符合高斯分布;3. The method according to claim 1, wherein the continuous distribution of the node representation conforms to a Gaussian distribution; 所述构建节点表征连续分布的步骤,包括:The step of constructing a node to represent a continuous distribution includes: 以所述聚合表征为均值;taking the aggregated characterization as the mean; 基于所述均值确定对应的方差;determining a corresponding variance based on the mean; 基于所述均值、所述方差和所述随机参数,构建符合高斯分布的节点表征连续分布。Based on the mean value, the variance and the random parameter, a continuous distribution of node representation conforming to the Gaussian distribution is constructed. 4.根据权利要求3所述的方法,所述构建符合高斯分布的节点表征连续分布的步骤,包括:4. The method according to claim 3, the step of constructing a node characterizing a continuous distribution conforming to a Gaussian distribution, comprising: 以所述方差作为所述随机参数的系数,构建节点表征连续分布的第一项;Using the variance as the coefficient of the random parameter, constructing the first term of the node representing the continuous distribution; 基于所述第一项与所述均值的和,构建所述节点表征连续分布。Based on the sum of the first term and the mean value, the node representation continuous distribution is constructed. 5.根据权利要求3所述的方法,所述随机参数为均值为0、方差为1的随机高斯噪声。5. The method according to claim 3, wherein the random parameter is random Gaussian noise with a mean value of 0 and a variance of 1. 6.根据权利要求3所述的方法,所述基于所述第一损失确定预测损失的步骤,包括:6. The method of claim 3, said step of determining a predicted loss based on said first loss, comprising: 基于所述均值和所述方差分别与预设的高斯分布的均值与方差之间的差异,确定第二损失;determining a second loss based on the difference between the mean and the variance and the mean and variance of a preset Gaussian distribution, respectively; 基于所述第一损失和所述第二损失确定预测损失。A predicted loss is determined based on the first loss and the second loss. 7.根据权利要求1所述的方法,在构建节点表征连续分布之后,还包括:7. The method according to claim 1, after constructing the node representation continuous distribution, further comprising: 基于所述节点表征连续分布,预测多个节点之间相互连接的概率;Predicting the probability of interconnection between multiple nodes based on the node representation continuous distribution; 基于所述概率,确定所述关系网络的重构邻接矩阵;determining a reconstructed adjacency matrix of the relational network based on the probability; 所述基于所述第一损失确定预测损失的步骤,包括:The step of determining a predicted loss based on the first loss includes: 基于所述重构邻接矩阵与所述原始邻接矩阵之间的差异,确定第三损失;determining a third loss based on the difference between the reconstructed adjacency matrix and the original adjacency matrix; 基于所述第一损失和所述第三损失确定预测损失。A predicted loss is determined based on the first loss and the third loss. 8.根据权利要求7所述的方法,所述预测多个节点之间相互连接的概率的步骤,包括:8. The method according to claim 7, the step of predicting the probability of interconnection between multiple nodes, comprising: 针对任意的第一节点和第二节点,将所述第一节点的节点表征连续分布与所述第二节点的节点表征连续分布之间的相似度,作为激活函数的输入参数,将得到的输出值作为所述第一节点和所述第二节点之间相互连接的概率。For any first node and second node, the similarity between the node representation continuous distribution of the first node and the node representation continuous distribution of the second node is used as the input parameter of the activation function, and the obtained output The value is used as the probability of interconnection between the first node and the second node. 9.根据权利要求1所述的方法,在构建节点表征连续分布之后,还包括:9. The method according to claim 1, after constructing the node representation continuous distribution, further comprising: 基于所述节点表征连续分布,对多个节点进行聚类,得到多个节点分别归属的类簇;Based on the continuous distribution of the node representation, clustering the multiple nodes to obtain the clusters to which the multiple nodes belong respectively; 所述基于所述第一损失确定预测损失的步骤,包括:The step of determining a predicted loss based on the first loss includes: 基于同类簇节点的所述第一采样表征与所述第二采样表征之间的差异,以及异类簇节点的所述第一采样表征与所述第二采样表征之间的差异,确定第四损失;Determining a fourth loss based on a difference between the first sampled representation and the second sampled representation of nodes in a homogeneous cluster and a difference between the first sampled representation and the second sampled representation of nodes in a heterogeneous cluster ; 基于所述第一损失和所述第四损失确定预测损失。A predicted loss is determined based on the first loss and the fourth loss. 10.根据权利要求1所述的方法,所述基于所述第一损失确定预测损失的步骤,包括:10. The method of claim 1, said step of determining a predicted loss based on said first loss, comprising: 基于所述第一损失,采用对比损失函数确定所述预测损失。Based on the first loss, the prediction loss is determined using a contrastive loss function. 11.一种利用评分模型对用户进行推送方法,所述评分模型采用权利要求1所述的方法训练得到;所述方法包括:11. A method of pushing users by using a scoring model, wherein the scoring model is obtained by training according to the method of claim 1; the method comprises: 通过所述评分模型,基于用户节点的节点表征连续分布和推送对象节点的节点表征连续分布,确定对应的用户与推送对象之间的相似度;Through the scoring model, based on the continuous distribution of the node representation of the user node and the continuous distribution of the node representation of the push object node, the similarity between the corresponding user and the push object is determined; 通过所述评分模型,将所述相似度作为输入参数输入激活函数,将得到的输出值作为所述用户对所述推送对象的评分;Through the scoring model, the similarity is input into an activation function as an input parameter, and the obtained output value is used as the user's rating of the pushed object; 基于所述用户对若干个推送对象的评分,对所述若干个推送对象进行选择,基于选择结果对所述用户进行推送。Based on the user's ratings on several push objects, select the several push objects, and push the user based on the selection result. 12.一种评分模型的训练装置,所述评分模型用于预测若干个用户分别对若干个待推送的推送对象的评分;所述评分模型基于包含多个节点的关系网络进行训练,多个节点包括代表用户的节点和代表推送对象的节点,以及表征节点之间连接关系的边;所述评分模型的待学习参量包括节点表征;所述装置包括:12. A training device for a scoring model, the scoring model is used to predict the ratings of several users on several push objects to be pushed; the scoring model is trained based on a relationship network comprising a plurality of nodes, and the multiple nodes Including a node representing a user and a node representing a push object, and an edge representing a connection relationship between nodes; the parameters to be learned of the scoring model include node representation; the device includes: 聚合模块,配置为通过图神经网络,基于多个节点的所述节点表征以及所述关系网络的原始邻接矩阵,确定节点的聚合表征;其中,所述聚合表征聚合了邻居用户特征和/或邻居推送对象特征;The aggregation module is configured to determine an aggregated representation of a node based on the node representations of multiple nodes and the original adjacency matrix of the relationship network through a graph neural network; wherein the aggregated representation aggregates neighbor user features and/or neighbors push object characteristics; 构建模块,配置为基于节点的所述聚合表征和随机参数,构建节点表征连续分布,并通过确定所述随机参数的取值,对所述节点表征连续分布进行采样,得到作为对比目标的第一采样表征和第二采样表征;其中,所述节点表征连续分布包括:包含用户特征的节点表征连续分布和包含推送对象特征的节点表征连续分布;A building module configured to construct a continuous distribution of node representations based on the aggregate representation and random parameters of nodes, and sample the continuous distribution of node representations by determining the value of the random parameters to obtain the first A sampling representation and a second sampling representation; wherein, the node representation continuous distribution includes: a node representation continuous distribution containing user characteristics and a node representation continuous distribution containing push object characteristics; 损失模块,配置为基于同一节点的所述第一采样表征与所述第二采样表征之间的差异,以及不同节点的所述第一采样表征与所述第二采样表征之间的差异,确定第一损失,基于所述第一损失确定预测损失;a loss module configured to determine based on a difference between the first sampled representation and the second sampled representation of the same node, and a difference between the first sampled representation and the second sampled representation of a different node a first loss, determining a predicted loss based on the first loss; 更新模块,配置为向减小所述预测损失的方向,更新多个节点的所述节点表征。An update module configured to update the node representations of a plurality of nodes in the direction of reducing the prediction loss. 13.一种利用评分模型对用户进行推送的装置,所述评分模型采用权利要求1所述的方法训练得到;所述装置包括:13. A device that utilizes a scoring model to push users, the scoring model is obtained by training according to the method of claim 1; the device comprises: 确定模块,配置为通过所述评分模型,基于用户节点的节点表征连续分布和推送对象节点的节点表征连续分布,确定对应的用户与推送对象之间的相似度;The determination module is configured to determine the similarity between the corresponding user and the push object based on the continuous distribution of the node representation of the user node and the continuous distribution of the node representation of the push object node through the scoring model; 评分模块,配置为通过所述评分模型,将所述相似度作为输入参数输入激活函数,将得到的输出值作为所述用户对所述推送对象的评分;The scoring module is configured to input the similarity as an input parameter into an activation function through the scoring model, and use the obtained output value as the user's score on the pushed object; 推送模块,配置为基于所述用户对若干个推送对象的评分,对所述若干个推送对象进行选择,基于选择结果对所述用户进行推送。The push module is configured to select the several push objects based on the user's ratings on the several push objects, and push the user based on the selection result. 14.一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行权利要求1-11中任一项所述的方法。14. A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed in a computer, it causes the computer to execute the method according to any one of claims 1-11. 15.一种计算设备,包括存储器和处理器,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现权利要求1-11中任一项所述的方法。15. A computing device, comprising a memory and a processor, wherein executable code is stored in the memory, and when the processor executes the executable code, the method according to any one of claims 1-11 is implemented.
CN202310572391.3A 2023-05-18 2023-05-18 A scoring model training method, user push method and device Pending CN116611731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310572391.3A CN116611731A (en) 2023-05-18 2023-05-18 A scoring model training method, user push method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310572391.3A CN116611731A (en) 2023-05-18 2023-05-18 A scoring model training method, user push method and device

Publications (1)

Publication Number Publication Date
CN116611731A true CN116611731A (en) 2023-08-18

Family

ID=87684847

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310572391.3A Pending CN116611731A (en) 2023-05-18 2023-05-18 A scoring model training method, user push method and device

Country Status (1)

Country Link
CN (1) CN116611731A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117217792A (en) * 2023-09-06 2023-12-12 五凌电力湖南能源销售有限公司 Power value-added service product matching decision method based on data processing

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117217792A (en) * 2023-09-06 2023-12-12 五凌电力湖南能源销售有限公司 Power value-added service product matching decision method based on data processing

Similar Documents

Publication Publication Date Title
CN110910218B (en) Multi-behavior migration recommendation method based on deep learning
Li et al. Deep probabilistic matrix factorization framework for online collaborative filtering
US20220253722A1 (en) Recommendation system with adaptive thresholds for neighborhood selection
CN112232925A (en) Method for carrying out personalized recommendation on commodities by fusing knowledge maps
CN112364976A (en) User preference prediction method based on session recommendation system
CN115087970B (en) Recommender Systems Using Bayesian Graph Convolutional Networks
US20100169328A1 (en) Systems and methods for making recommendations using model-based collaborative filtering with user communities and items collections
CN111681067A (en) Method and system for long-tail product recommendation based on graph attention network
Hassan et al. Genetic algorithm approaches for improving prediction accuracy of multi-criteria recommender systems
CN110119474A (en) Recommended models training method, the prediction technique based on recommended models and device
Navgaran et al. Evolutionary based matrix factorization method for collaborative filtering systems
CN115130536A (en) Training method of feature extraction model, data processing method, device and equipment
CN111985623A (en) Attribute graph group discovery method based on maximized mutual information and graph neural network
CN115099886B (en) A method, device and storage medium for recommending long and short interest sequences
CN113360772B (en) Interpretable recommendation model training method and device
CN113342994B (en) A Recommendation System Based on Sampling-Free Collaborative Knowledge Graph Network
CN115564532A (en) Training method and device of sequence recommendation model
Deng et al. Network Intrusion Detection Based on Sparse Autoencoder and IGA‐BP Network
CN116645130A (en) Automobile order demand prediction method based on combination of federal learning and GRU
CN117216375A (en) Training method and system for information recommendation, storage medium and server
CN116611731A (en) A scoring model training method, user push method and device
Liang et al. A normalizing flow-based co-embedding model for attributed networks
CN118135279A (en) Clustering method and system for incomplete views
CN117522511A (en) Reinforced learning object recommendation method based on user information knowledge graph
CN117216376A (en) Fair perception recommendation system and recommendation method based on depth map neural network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination