A user characterization processing method and device

By cropping and fusing user relationship diagrams and using graph neural network to process heterogeneous graphs, the problem of insufficient user representation determined based on user's own attribute information is solved, and more accurate and comprehensive user representation is achieved.

CN115115404BActive Publication Date: 2025-03-25ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210747019.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-28
Publication Date
2025-03-25
Estimated Expiration
2042-06-28

AI Technical Summary

Technical Problem

In e-commerce and electronic payment platforms, user representations determined based on user's own attribute information are often not comprehensive and accurate enough to effectively classify risk users.

Method used

By obtaining user relationship diagrams corresponding to multiple preset relationship types, using sparse model to crop the relationship diagram, fuse the heterogeneous graph, and processing the heterogeneous graphs using graph neural network to obtain user representations of the target user.

Benefits of technology

It realizes conveniently identifying relatively accurate and comprehensive user representations, improving the accuracy and comprehensiveness of user classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115115404B_ABST
    Figure CN115115404B_ABST
Patent Text Reader

Abstract

The embodiments of the present specification provide a method and device for processing user representations, the method comprising: obtaining multiple user relationship graphs corresponding to multiple preset relationship types, the edges in each user relationship graph represent the corresponding relationship type, and the nodes correspond to users; using multiple sparsification models corresponding to the multiple preset relationship types, respectively cropping the multiple user relationship graphs to obtain multiple corresponding cropped relationship graphs; based on the multiple cropped relationship graphs, fusing to obtain a heterogeneous graph involving multiple preset relationship types; using a graph neural network to process the heterogeneous graph to obtain a user representation of a target user corresponding to a target node, and the user representation is used to classify the target user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method and device for processing user characterization. Background Art

[0002] In e-commerce, electronic payment and other platforms, in order to better provide high-quality services to platform users, it is often necessary to classify platform users. For example, in order to protect the property safety of platform users (including merchant users and consumer users), risk identification and prevention are carried out, that is, risk user classification of platform users. In the process of classifying platform users, it is generally necessary to first determine the user representation of the platform users, and then classify them based on the user representation (such as risk identification).

[0003] However, platform users often do not exist in isolation on the platform. Determining the user representation of platform users based solely on their own user attribute information is often not comprehensive and accurate enough. Summary of the invention

[0004] One or more embodiments of the present specification provide a method and device for processing user characterization to conveniently determine a relatively accurate and comprehensive user characterization.

[0005] According to a first aspect, a user characterization processing method is provided, comprising:

[0006] Obtain multiple user relationship graphs corresponding to multiple preset relationship types, where the edges in each user relationship graph represent the corresponding relationship type, and the nodes correspond to the users;

[0007] Using a plurality of sparse models corresponding to the plurality of preset relationship types, respectively clipping the plurality of user relationship graphs to obtain a plurality of corresponding clipped relationship graphs;

[0008] Based on the multiple clipping relationship graphs, fusing to obtain heterogeneous graphs involving the multiple preset relationship types;

[0009] The heterogeneous graph is processed using a graph neural network to obtain a user representation of a target user corresponding to a target node, and the user representation is used to classify the target user.

[0010] According to a second aspect, a user characterization processing device is provided, comprising:

[0011] A first obtaining module is configured to obtain a plurality of user relationship graphs corresponding to a plurality of preset relationship types, wherein the edges in each user relationship graph represent the corresponding relationship type, and the nodes correspond to the users;

[0012] A first cutting module is configured to cut the multiple user relationship graphs respectively using multiple sparse models corresponding to the multiple preset relationship types to obtain multiple corresponding cut relationship graphs;

[0013] A first fusion module is configured to fuse the plurality of clipping relationship graphs to obtain heterogeneous graphs involving the plurality of preset relationship types;

[0014] The first processing module is configured to process the heterogeneous graph using a graph neural network to obtain a user representation of a target user corresponding to a target node, wherein the user representation is used to classify the target user.

[0015] According to a third aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method described in the first aspect.

[0016] According to a fourth aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in the first aspect is implemented.

[0017] According to the method and device provided in the embodiment of this specification, after obtaining multiple user relationship graphs corresponding to multiple preset relationship types, multiple sparsification models corresponding to multiple preset relationship types that are pre-trained are used to crop the multiple user relationship graphs respectively to crop the edges determined to be unimportant in the user relationship graphs, and obtain the corresponding multiple cropped relationship graphs, thereby reducing the data volume of the relationship graphs to a certain extent, and then based on the multiple cropped relationship graphs, a heterogeneous graph involving multiple preset relationship types is fused, and the heterogeneous graph is processed using a graph neural network to obtain a user representation of the target user corresponding to the target node, which is used to classify the target user. In this way, through multiple sparsification models corresponding to multiple preset relationship types, the original large-scale relationship graph can be compressed into a smaller-scale cropped relationship graph, and then a heterogeneous graph involving multiple preset relationship types is fused, which contains edges in each preset relationship type that are determined to be more important for user classification, and then the heterogeneous graph is processed using a graph neural network to obtain a user representation that integrates the user attribute information of the target user himself and the user attribute information of its corresponding important neighbors, thereby realizing the convenient determination of a relatively accurate user representation. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 A schematic diagram of an implementation framework of an embodiment disclosed in this specification;

[0020] Figure 2 A schematic diagram of a flow chart of a training process of a sparse model provided in an embodiment;

[0021] Figure 3 A schematic diagram of a flow chart of a user characterization processing method provided in an embodiment;

[0022] Figure 4A A schematic diagram of a scenario for cutting a user relationship graph provided by an embodiment;

[0023] Figure 4B A schematic diagram of a scene in which a heterogeneous graph is obtained by merging the clipping relationship graphs provided in the embodiment;

[0024] Figure 5 A schematic block diagram of a user characterization processing device provided in an embodiment. DETAILED DESCRIPTION

[0025] The technical solutions of the embodiments of this specification will be described in detail below with reference to the accompanying drawings.

[0026] The embodiments of this specification disclose a method and device for processing user characterization. The application scenarios and technical concepts of the method are first introduced as follows:

[0027] As mentioned above, in e-commerce, electronic payment and other platforms, platform users often do not exist in isolation. It is often not comprehensive and accurate to determine the user representation of platform users based solely on the user attribute information of the platform users themselves. In order to solve the above problem, it is possible to consider combining the user attribute information of the platform users themselves and the user attribute information of other platform users related to the platform users (hereinafter referred to as their neighbor users) to jointly determine the user representation of the platform users.

[0028] However, in the above-mentioned process of jointly determining the user representation of platform users, considering that the relationships between platform users are often very complex, there may be many different types of relationships between different platform users, such as social relationships, transaction relationships, transfer relationships, etc. In any type of relationship, for any target user, some of the user attribute information of its neighbor users can reflect the characteristics of the target user to a certain extent, that is, there is a positive gain in accurately determining the representation of the target user; while some have no gain in accurately determining the representation of the target user, and may even have a negative gain. Therefore, how to provide a method that can easily determine a relatively accurate user representation becomes an urgent problem to be solved.

[0029] In view of this, the inventor proposes a user characterization processing method. Figure 1A schematic diagram of an implementation scenario according to an embodiment disclosed in this specification is shown. In which, multiple user relationship graphs corresponding to multiple preset relationship types are obtained, such as Figure 1 As shown, the multiple preset relationship types may include relationship types 1, 2, ..., M, and the corresponding multiple user relationship graphs include user relationship graphs corresponding to relationship type 1. Figure 1 , user relationship corresponding to relationship type 2 Figure 2 ...The user relationship graph M corresponding to the relationship type M, the edges in each user relationship graph represent the corresponding relationship type, and the nodes correspond to users. Use the sparse model 1 corresponding to the relationship type 1 to analyze the user relationship Figure 1 Perform cutting to obtain cutting relationship Figure 1 ; Use the sparse model 2 corresponding to relationship type 2 to compare user relationships Figure 2 Perform cutting to obtain cutting relationship Figure 2 ; Similarly, the user relationship graph M is pruned using the sparsification model M corresponding to the relationship type M to obtain the pruned relationship graph M. The sparsification model i is pre-trained based on the sample relationship graph corresponding to the relationship type i, and the sample relationship graph includes sample nodes corresponding to sample users with user category labels.

[0030] After obtaining N cropped relationship graphs, a fusion module is used to fuse M cropped relationship graphs to obtain a heterogeneous graph involving M preset relationship types (i.e., relationship types 1, 2, ... M). The graph neural network is used to process the heterogeneous graph, that is, the node information of the target node in the heterogeneous graph and the node information of its neighbor nodes under each preset relationship type are input into the graph neural network to obtain the user representation of the target user corresponding to the target node. Among them, the node information of the node includes the user attribute information of the user corresponding to the node.

[0031] In the above process, through multiple sparsification models corresponding to multiple preset relationship types, the edges in the original user relationship graph that are determined to be unimportant (relative to user classification) can be pruned off, so that the original large-scale relationship graph can be compressed into a smaller-scale pruned relationship graph, and then fused to obtain a heterogeneous graph involving multiple preset relationship types, which contains edges in each preset relationship type that are determined to be more important for user classification (that is, the neighbor nodes of the heterogeneous graph nodes are the neighbor nodes corresponding to the neighbor users who have a positive gain for the representation of the user corresponding to the determined node). After that, the heterogeneous graph is processed by the graph neural network to obtain a user representation that integrates the user attribute information of the target user himself and the user attribute information of his corresponding important neighbors, thereby realizing the convenient determination of a relatively accurate user representation.

[0032] The user characterization processing method and device provided in this specification are described in detail below in conjunction with specific embodiments.

[0033] For a clear layout, we first introduce the training process of the sparsification model and the training process of the graph neural network required for the user representation processing flow.

[0034] For the sparsification model, it is a pre-trained model used to trim the relationship graph. Among them, different preset relationship types can correspond to different sparsification models respectively, multiple preset relationship types can include any first relationship type, and multiple sparsification models can include a first sparsification model corresponding to the first relationship type. The training processes of different sparsification models are similar. The training process of the first sparsification model corresponding to the first relationship type is taken as an example for explanation below. The training process of the sparsification models corresponding to other relationship types can refer to the training process of the first sparsification model.

[0035] Among them, the training process of the first sparse model is as follows: Figure 2 As shown, the training process can be performed by any device, equipment, platform, equipment cluster, etc. with computing and processing capabilities, and may include the following steps S210-S240;

[0036] In step S210, a sample relationship graph corresponding to the first relationship type is obtained, including a first sample node corresponding to a first sample user with a user category label. The edge of the sample relationship graph represents the first relationship type. The first relationship type may be, but is not limited to, a transaction relationship, a transfer relationship, a social relationship, or a same-machine relationship, wherein the same-machine relationship refers to users logging in using the same device. The nodes of the sample relationship graph correspond to each user, and in one implementation, each user in the sample relationship graph may be a user of the target platform. The target platform may include, but is not limited to, an e-commerce platform, an electronic payment platform, etc.

[0037] In one case, the process of obtaining a sample relationship graph may be: for users of a target platform, acquiring relationship data collected within a specified period (for clarity, referred to as sample relationship data), wherein the sample relationship data includes relationship data characterizing the existence of a first relationship type between users. Afterwards, based on the relationship data of the first relationship type between users, an initial relationship graph corresponding to the first relationship type is constructed, wherein the nodes corresponding to two users with the first relationship type may be connected by a line (edge). Afterwards, user category labels are annotated on sample users corresponding to sample nodes in the initial relationship graph using a specific program or manually to obtain a sample relationship graph. Among them, there may be multiple nodes corresponding to sample users with user category labels in the sample relationship graph, that is, sample users corresponding to multiple nodes in the sample relationship graph have user category labels, the first sample user is any sample user in the sample relationship graph, and the first sample node is a node corresponding to the arbitrary sample user in the sample relationship graph.

[0038] It can be understood that the user category label can be set for the preset scenario task requirements. For example, the preset scenario task requirement is a risk user classification requirement. Accordingly, the user category label can be a label that characterizes whether the sample user in the sample relationship graph is a risk user. When the preset scenario task requirement is other classification requirements, the user category label can also be a label that characterizes the sample user as other specific categories. The other specific categories may include but are not limited to: specific categories of unsafe transactions (for example: fraud, gambling, money laundering, etc.), categories of interested targets (for example: science fiction movies or books, historical movies or books, etc.). In one implementation, the users corresponding to the nodes in the sample relationship graph may include consumer users and merchant users. The sample users with user category labels are merchant users. Accordingly, the user category label can be a label that characterizes whether the merchant user is a risk merchant.

[0039] Each node in the sample relationship graph corresponds to node information, and the node information of each node is the user attribute information of the user corresponding to the node. It can be understood that the user attribute information of the user corresponding to each node in the sample relationship graph is determined in advance based on the preset scenario task requirements (preset user classification scenario requirements), that is, it includes the user attribute information of each preset dimension that needs to be collected for the user based on the preset scenario task requirements.

[0040] Sample relationship graphs of different preset relationship types, in which the user attribute information of the users corresponding to each node may have the same characteristics or different characteristics. For example, the user attribute information of the users corresponding to each node in the sample relationship graph of transaction relationship may at least include user attribute information related to the transaction. User attribute information related to the transaction may include but is not limited to some indicators that characterize the characteristics of the transaction, such as transaction time, transaction amount, transaction ID (transaction identifier), transaction product code, PS, number of transactions with the other transaction party, etc. The user attribute information of the users corresponding to each node in the sample relationship graph of social relationship may at least include some indicators that characterize the social characteristics of the users, such as but not limited to: social activity, social group tags, number of friends, etc.

[0041] On the other hand, the user attribute information of the users corresponding to each node in the sample relationship graph of the preset relationship type may also include: basic attribute information of the users, wherein the basic attribute information may be some indicators related to the users corresponding to the nodes and used to characterize the characteristics of the users, such as including but not limited to the users' hobbies, occupations, and crowd labels.

[0042] After obtaining the sample relationship graph of the first relationship type, in step S220, the attention coefficient between each node and its neighboring node in the sample relationship graph is determined using the first sparsification model. In one implementation, the sample relationship graph and the node information of each node therein (i.e., the user attribute information of the user corresponding to the node) may be input into the first sparsification model to determine the attention coefficient between each node and its neighboring node in the sample relationship graph. In another implementation, the sample relationship graph and the node information of the first sample node and its neighboring nodes may be input into the first sparsification model to determine the attention coefficient between the neighboring node of the first sample node in the sample relationship graph and the neighboring node. The attention coefficient may characterize the importance of the neighboring node of the node relative to the node. The larger the attention coefficient, the higher the importance of the neighboring node of the node relative to the node.

[0043] In one implementation, the first sparsification model may be a model based on a graph algorithm such as GAT, Geniepath or GraphTransformer. The first sparsification model may include an aggregation layer (i.e., the first aggregation layer mentioned later) and an attention layer, which is a network layer based on an attention mechanism. The first aggregation layer is used to determine the aggregate representation of the user corresponding to each node in the relationship graph, and the attention layer is used to determine the attention coefficient between the node and its neighboring nodes based on the determined aggregate representation of the user corresponding to each node.

[0044] Taking any first sample node as an example, the process of determining the attention coefficient between the first sample node and its neighbor nodes may include the following steps: in the first aggregation layer, based on the node information of the first sample node and the node information of its neighbor nodes, several levels of information aggregation are performed to obtain the aggregation representation of the first sample node and the aggregation representation of each of its neighbor nodes (hereinafter referred to as sample aggregation representation), wherein the specific number of aggregations of several levels of information aggregation is related to the number of layers of the first aggregation layer. Afterwards, in the attention layer, based on the sample aggregation representation of the first sample node and the sample aggregation representation of each of the neighbor nodes of the first sample node, the attention coefficient between the first sample node and each of its neighbor nodes is determined.

[0045] In the process of performing several levels of information aggregation based on the node information of the first sample node and the node information of its neighboring nodes, each level of information aggregation may include: determining the weight value of each neighboring node relative to the first sample node based on the previous level aggregation vector of the first sample node and the previous level aggregation vector of its neighboring nodes, and determining the neighbor aggregation vector of the first sample node based on the weight value of each neighboring node relative to the first sample node and the previous level aggregation vector of the neighboring node; and determining the current level aggregation vector of the first sample node at least based on the neighbor aggregation vector of the first sample node, wherein the primary aggregation vector of each node is determined according to the user attribute information of the corresponding user (i.e., the node information of the node).

[0046] In one case, the aforementioned process of determining the neighbor aggregation vector of the first sample node may be to determine a node that meets a preset weight value threshold from each neighbor node based on the weight value of each neighbor node relative to the first sample node (hereinafter referred to as a second neighbor node for clarity of description); and to determine the neighbor aggregation vector of the first sample node based on the weight value of each second neighbor node relative to the first sample node and the previous level aggregation vector of each second neighbor node. Meeting the preset weight value threshold may be: the corresponding weight value exceeds the preset weight threshold, or the corresponding weight value is the first number of weight values ​​with the largest value.

[0047] In one implementation, the process of determining the neighbor aggregation vector of the first sample node may be, for each second neighbor node, calculating the product of the weight value of the second neighbor node relative to the first sample node and the previous level aggregation vector of the second neighbor node, and determining the sum of the products corresponding to the second neighbor nodes as the neighbor aggregation vector of the first sample node. In another implementation, the first neighbor aggregation function may be used to determine the neighbor aggregation vector of the first sample node based on the weight value of each second neighbor node relative to the first node and the previous level aggregation vector of each second neighbor node. The first neighbor aggregation function may include parameters to be trained.

[0048] The process of determining the current-level aggregation vector of the first sample node at least based on the neighbor aggregation vector of the first sample node may be: determining the neighbor aggregation vector of the first sample node as the current-level aggregation vector of the first sample node; or determining the current-level aggregation vector of the first sample node based on the neighbor aggregation vector of the first sample node and the previous-level aggregation vector of the first sample node.

[0049] Afterwards, the aggregation vector of the first sample node output by the first aggregation layer is determined as the sample aggregation representation of the first sample node. It can be understood that the first aggregation layer can also output the aggregation vector of each neighboring node of the first sample node (that is, the sample aggregation representation of each neighboring node of the first sample node).

[0050] It can be understood that the process of inputting the sample relationship graph and the node information corresponding to each node therein into the first sparsification model and determining the attention coefficient between each node in the sample relationship graph and its neighboring nodes can refer to the process described in conjunction with the first sample node, and will not be repeated here.

[0051] After determining the attention coefficient of the neighboring nodes of the first sample node in the sample relationship graph relative to the first sample node, then, in step S230, the first user representation of the first sample user is determined based at least on the attention coefficient associated with the first sample node. In one implementation, it may be that based on the attention coefficient associated with the first sample node, a neighboring node whose corresponding attention coefficient satisfies a preset coefficient relationship is determined from the neighboring nodes of the first sample node as the third neighboring node corresponding to the first sample node; and then based on the aforementioned sample aggregation representations of each third neighboring node and its attention coefficient relative to the first sample node, as well as the aforementioned sample aggregation representation of the first sample node, the first user representation of the first sample user is determined, and the first user representation is a representation used for user classification. Wherein, satisfying the preset coefficient relationship may be: the corresponding attention coefficient exceeds the preset coefficient threshold, or the corresponding attention coefficient is the largest first second number of coefficients.

[0052] The process of determining the first user representation of the first sample user may refer to the process of information aggregation in the aforementioned first aggregation layer, which will not be described in detail here.

[0053] Next, in step S240, a first classification prediction is determined based on the first user representation, and a first sparsification model is trained based on the first classification prediction and the user category label. In this step, after the first user representation of the first sample user is determined, the first classification prediction is determined based on the first user representation. Specifically, the first user representation may be input into the first user classification model, and the first classification prediction is determined based on the output result of the first user classification model.

[0054] In one case, the first user classification model can be a pre-trained model (based on this type of first user classification model, a relatively accurate first classification prediction can be directly determined); in another case, the first user classification model can also be a model that needs to be trained. In this case, the first user classification model and the first sparsification model can be jointly trained.

[0055] After determining the first classification prediction, a first loss is determined based on the first classification prediction and the user category label using a preset first loss function, and then the first sparsification model is trained using the first loss (or the first user classification model and the first sparsification model are jointly trained). The first sparsification model training is determined to be complete until the first sparsification model reaches a preset first convergence condition. The first convergence condition may include, but is not limited to: the number of iterations exceeds a first number threshold, and the determined first loss is lower than a first loss threshold.

[0056] Through the above training process, the sample relationship graphs corresponding to the multiple preset relationship types can be used in turn to train the sparse models corresponding to the multiple preset relationship types.

[0057] Described below Figure 1 The training process of the graph neural network involved. In one implementation, the sparsification models corresponding to the multiple preset relationship types obtained by the above training can be used to crop the sample relationship graphs corresponding to the multiple preset relationship types respectively, to obtain the cropped sample graphs corresponding to each sample relationship graph; then, based on the multiple cropped sample graphs, a graph involving multiple preset relationship types is fused, which is called a fused sample graph. Furthermore, the graph neural network can be trained based on the fused sample graph. In another implementation, a heterogeneous graph involving multiple preset relationship types can be directly obtained, and the heterogeneous graph is preferably a relatively sparse heterogeneous graph; then, such a heterogeneous graph is used as a fused sample graph to train the graph neural network until a preset second convergence condition is reached. The second convergence condition may include, but is not limited to: the number of iterations exceeds the second number threshold, and the determined loss value is lower than the second loss threshold.

[0058] Among them, the nodes of the above fusion sample graph correspond to each user, including users with user category labels, and the edges represent multiple preset relationship types. Accordingly, the fusion sample graph is a graph including heterogeneous multi-class relationships.

[0059] In one implementation, the process of training a graph neural network based on a fused sample graph may be: for each node corresponding to each user with a user category label in the fused sample graph (hereinafter referred to as a target sample node), several levels of information aggregation are performed, wherein each level of information aggregation includes: for any first relationship type, based on the previous level aggregation vector of the target sample node and the previous level aggregation vector of its neighbor node (referred to as the fourth neighbor node) under the first relationship type, determining the neighbor aggregation vector of the target sample node corresponding to the first relationship type; determining the current level aggregation vector of the target sample node at least based on the neighbor aggregation vector of the target sample node under each preset relationship type, wherein the primary aggregation vector of each node is determined according to the user attribute information of the corresponding user (node ​​information of the node).

[0060] In one implementation, the process of determining the neighbor aggregation vector of the target sample node corresponding to the first relationship type may include: determining the weight value of each fourth neighbor node relative to the target sample node based on the previous level aggregation vector of the target sample node and the previous level aggregation vector of each fourth neighbor node under the first relationship type; and determining the neighbor aggregation vector of the target sample node corresponding to the first relationship type according to the previous level aggregation vector of each fourth neighbor node and the weight value relative to the target sample node.

[0061] In one implementation, the process of determining the current-level aggregation vector of the target sample node may include: determining the current-level aggregation vector of the target sample node based on neighbor aggregation vectors of the target sample node under each preset relationship type and the previous-level aggregation vector of the target sample node.

[0062] Afterwards, the current-level aggregation vector of the target sample node obtained by the last information aggregation is determined as the final representation of the user corresponding to the target sample node, and then the final representation of the user corresponding to the target sample node is input into the second user classification model; based on the output result of the second user classification model, the second classification prediction of the user corresponding to the target sample node is determined, and the second loss is determined based on the second classification prediction of the user corresponding to the target sample node and the user category label of the user using the preset second loss function, and the graph neural network is trained based on the second loss. Among them, the second user classification model can be a pre-trained model (for example, it can be the aforementioned first user classification model) or a model that needs to be trained. In this case, the second user classification model and the graph neural network need to be jointly trained.

[0063] After the training of the graph neural network and the sparse models corresponding to the multiple preset relationship types is completed, the sparse models corresponding to the multiple preset relationship types and the graph neural network can be combined to perform user characterization processing. The following is an introduction to the user characterization processing method provided in the embodiment of this specification. Figure 3 The flowchart of the user characterization processing method in one embodiment of the present specification is shown. The method is implemented by any device, equipment, platform, device cluster, etc. having computing and processing capabilities. Figure 3 As shown, the method includes the following steps S310-S340:

[0064] In step S310, multiple user relationship graphs corresponding to multiple preset relationship types are obtained. The edges in each user relationship graph represent the corresponding relationship type, and the nodes correspond to users. It can be understood that the preset relationship type and the user relationship graph are in a one-to-one correspondence. Each node in the user relationship graph corresponds to node information, that is, user attribute information of the user corresponding to each node. The user attribute information is determined in advance based on the preset scenario task requirements, including user attribute information of each preset dimension that needs to be collected for the user based on the preset scenario task requirements.

[0065] In one implementation, taking into account the correlation and conductivity between users, the preset relationship type is generally a strong medium relationship, that is, a relationship that has occurred dynamically between users or has solid evidence in static information, such as a transaction relationship, transfer relationship, social relationship, and same-machine relationship, among which the same-machine relationship refers to users logging in using the same device.

[0066] In one embodiment, the users in the user relationship graph are users of the target platform, which may include but are not limited to e-commerce platforms and electronic payment platforms. In step S310, it is specifically configured to construct multiple user relationship graphs corresponding to multiple preset relationship types for the users of the target platform using the relationship data collected within a preset period. The preset period is set according to actual conditions.

[0067] In this implementation, for users of the target platform, relationship data collected within a preset period is obtained, and the relationship data includes relationship data corresponding to each preset relationship type. For any first relationship type among multiple preset relationship types, based on the relationship data of the first relationship type existing between users, a first relationship graph corresponding to the first relationship type is constructed, wherein nodes corresponding to two users with the first relationship type may be connected by a line (edge). Accordingly, a user relationship graph corresponding to each preset relationship type is obtained.

[0068] Next, in step S320, multiple sparsification models corresponding to multiple preset relationship types are used to crop the multiple user relationship graphs respectively to obtain corresponding multiple cropped relationship graphs.

[0069] In this step, multiple sparse models corresponding to multiple preset relationship types obtained by pre-training can be first obtained, wherein the preset relationship types correspond to the sparse models one by one. For each preset relationship type, the user relationship graph corresponding to the preset relationship type and the node information of each node therein are input into the sparse model corresponding to the preset relationship type, so that the sparse model crops the input user relationship graph to obtain multiple corresponding cropped relationship graphs.

[0070] When the sparsification model prunes the user relationship graph, it may be to prune the edges between nodes in the user relationship graph. Specifically, for each node (or certain specified nodes) in the user relationship graph, the importance of the node's neighbor nodes relative to the node is determined by the sparsification model, and then the edges corresponding to the neighbor nodes that are not important enough relative to the node determined by the sparsification model (i.e., the connecting edges between the neighbor nodes that are not important relative to the node and the node in the user relationship graph) are pruned.

[0071] Among them, the designated node can be a node with a designated mark set artificially, or it can be a special type of node. For example, in the case where the users corresponding to each node in the user relationship graph include merchant users (merchants) and consumer users (buyers), the designated node can refer to the merchant user.

[0072] The neighbor nodes of a node may include nodes that are directly connected to the node.

[0073] After the user relationship graph is pruned using the sparsification model, the size of the resulting pruned relationship graph is greatly reduced relative to the size of the original user relationship graph. Correspondingly, the storage space required for the pruned relationship graph is also greatly reduced relative to the original user relationship graph, which saves graph storage resources to a certain extent and reduces the complexity of the graph.

[0074] It can be understood that the multiple preset relationship types may include any first relationship type, and accordingly, the multiple user relationship graphs include the first relationship graph corresponding to the first relationship type, and the multiple sparsification models include the first sparsification model corresponding to the first relationship type. For the sparsification models corresponding to the multiple preset relationship types, the method of using the sparsification model to crop the corresponding user relationship graph is similar. The following is an example of the process of cropping the first relationship graph using the first sparsification model corresponding to the first relationship type. The process of cropping the corresponding user relationship using the sparsification model corresponding to other preset relationship types can refer to the process of cropping the first relationship graph using the first sparsification model.

[0075] The process of pruning the first relationship graph using the first sparsification model may include: in step 01, determining the attention coefficient between each node and its neighboring node in the first relationship graph using the first sparsification model. In step 02, pruning the first relationship graph based on the attention coefficient.

[0076] In one embodiment, the first sparsification model (the sparsification model corresponding to each preset relationship type) can be a model based on a graph algorithm such as GAT, Geniepath or GraphTransformer. In one implementation, the first sparsification model may include a first aggregation layer and an attention layer, wherein the attention layer is a network layer based on an attention mechanism. Accordingly, the process of determining the attention coefficient in the above step 01 may include, in step 011, in the first aggregation layer, performing several levels of information aggregation based on the node information of each node and the node information of its neighboring nodes to obtain an aggregate representation of each node; in step 012, in the attention layer, for any first node, according to the aggregate representation of the first node and the aggregate representation of each neighboring node of the first node, determine the attention coefficient between the first node and its neighboring nodes.

[0077] In one implementation, the first aggregation layer may include multiple layers. Specifically, in the first aggregation layer, several levels of information aggregation are performed based on the node information of each node and the node information of its neighboring nodes to obtain an aggregate representation of each node, wherein the specific number of aggregations of the several levels of information aggregation is related to the number of layers of the first aggregation layer. Afterwards, in the attention layer, for any first node, the attention coefficient between the first node and each of its neighboring nodes is determined based on the aggregate representation of the first node and the aggregate representation of each of its neighboring nodes.

[0078] Among them, in the process of performing several levels of information aggregation based on the node information of each node and the node information of its neighboring nodes, each level of information aggregation may include: for any first node among each node, based on the previous level aggregation vector of the first node and the previous level aggregation vector of its neighboring nodes, determining the weight value of each neighboring node relative to the first node; based on the weight value of each neighboring node relative to the first node and the previous level aggregation vector of the neighboring node, determining the neighbor aggregation vector of the first node; determining the current level aggregation vector of the first node at least based on the neighbor aggregation vector of the first node, wherein the primary aggregation vector of each node is determined according to the user attribute information of the corresponding user (that is, the node information of the node).

[0079] In one case, the aforementioned process of determining the neighbor aggregation vector of the first node may be, based on the weight values ​​of each neighbor node of the first node relative to the first node, determining the neighbor nodes that meet the preset weight value threshold from each neighbor node, and determining the neighbor aggregation vector of the first node based on the weight values ​​of each neighbor node that meets the preset weight value threshold relative to the first node and the previous level aggregation vector of each neighbor node that meets the preset weight value threshold. Meeting the preset weight value threshold may be: the corresponding weight value exceeds the preset weight threshold, or the corresponding weight value is the first number of weight values ​​with the largest value.

[0080] In one implementation, the process of determining the neighbor aggregation vector of the first node may be, for each neighbor node that meets the preset weight value threshold, calculating the weight value of the neighbor node relative to the first node and the product of the previous level aggregation vector of the neighbor node, and determining the sum of the products corresponding to each neighbor node that meets the preset weight value threshold as the neighbor aggregation vector of the first node. Another implementation may also be to use a trained first neighbor aggregation function to determine the neighbor aggregation vector of the first node based on the weight value of each neighbor node that meets the preset weight value threshold relative to the first node and the previous level aggregation vector of each neighbor node that meets the preset weight value threshold.

[0081] The process of determining the current-level aggregation vector of the first node at least based on the neighbor aggregation vector of the first node may be: determining the neighbor aggregation vector of the first node as the current-level aggregation vector of the first node; or determining the current-level aggregation vector of the first node based on the neighbor aggregation vector of the first node and the previous-level aggregation vector of the first node.

[0082] Afterwards, the aggregation vector of the first node output by the first aggregation layer is determined as the aggregation representation of the first node. It can be understood that the first aggregation layer can also output the aggregation vector of each neighboring node of the first node (ie, the aggregation representation of each neighboring node of the first node).

[0083] In one implementation, the attention layer is a network layer based on the attention mechanism. The following formula can be used to express the attention coefficient between the first node v and each of its neighboring nodes u:

[0084]

[0085] Among them, α(h v ,h u ) represents the attention coefficient of the neighbor node u relative to the first node v, that is, the attention coefficient between the first node v and its neighbor node u, N(v) represents the set of neighbor nodes of the first node v, s, W 1 and W 2 is the parameter in the attention layer, tanh 1 () represents the first activation function preset in the attention layer, and exp() represents the exponential function preset in the attention layer.

[0086] After determining the attention coefficient between each node and its neighboring nodes, in the aforementioned step 02, the first relationship graph is pruned based on the attention coefficient. The process of pruned the first relationship graph may be, for each node in the first relationship graph, using the attention coefficient between the node and its neighboring nodes, determining neighboring nodes that are not highly important relative to the node (for example, the corresponding attention coefficients satisfy the preset pruned condition), and then pruned the edges between the neighboring nodes that are not highly important relative to the node and the node in the first relationship graph.

[0087] In one case, the attention coefficient satisfies the preset clipping condition when the attention coefficient between a node's neighbor node and the node is lower than a preset threshold value. Accordingly, in step 02, the edge between two nodes whose attention coefficient is lower than the preset threshold value can be clipped. In another case, the attention coefficient satisfies the preset clipping condition when the attention coefficient between a node's neighbor node and the node is ranked lower, that is, the largest N attention coefficients that do not belong to the node. Accordingly, in step 02, for any first node in the first relationship graph, the N target neighbor nodes with the largest corresponding attention coefficients are determined from its neighbor nodes, and the edges between the first node and other neighbor nodes except the N target neighbor nodes are clipped.

[0088] For example, Figure 4A In the first relationship graph shown, the first node A includes 5 neighbor nodes, namely nodes B, C, D, E and F, wherein the attention coefficient f of node F corresponding to the first node A is less than the attention coefficient e of node E corresponding to the first node A; the attention coefficient e of node E corresponding to the first node A is less than the attention coefficient c of node C corresponding to the first node A; the attention coefficient c of node C corresponding to the first node A is less than the attention coefficient b of node B corresponding to the first node A; the attention coefficient b of node B corresponding to the first node A is less than the attention coefficient d of node D corresponding to the first node A, that is, there is attention coefficient f<attention coefficient e<attention coefficient c<attention coefficient b<attention coefficient d. Assuming that N is set to 3, it is necessary to trim the edge between node F and the first node A and the edge between node E and the first node A to obtain the corresponding trimmed relationship graph.

[0089] In one implementation, when the preset scenario task requirement is to identify merchant risks for merchant users in the target platform (e.g., e-commerce platform), the user classification task at this time is risk classification for merchant users. Accordingly, in order to reduce the workload of clipping to a certain extent, it can be that only the edges between the nodes corresponding to each merchant user and its neighboring nodes are clipped. At this time, the first sparsification model, the first relationship graph, and the node information of each node therein can be used to determine the attention coefficient between the nodes corresponding to each merchant user and its neighboring nodes in the first relationship graph, and then, based on the attention coefficient between the nodes corresponding to each merchant user and its neighboring nodes, the first relationship graph is clipped.

[0090] In the above manner, the first sparsification model is used to clip the first relationship graph to obtain a corresponding clipped relationship graph. By performing similar operations on each of the multiple user relationship graphs, multiple clipped relationship graphs corresponding to the multiple user relationship graphs can be obtained.

[0091] Then, in step S330, based on the multiple cut relationship graphs, a heterogeneous graph involving multiple preset relationship types is obtained by fusion. In this step, multiple cut relationship graphs are fused to obtain a heterogeneous graph involving multiple preset relationship types, wherein the heterogeneous graph includes edges representing each preset relationship type, and nodes correspond to users. The graph data of the heterogeneous graph can be expressed as: G = (V, E, R, h node ,h edge ), where h node Represents the node information of the node in the heterogeneous graph, h edge Represents the edge information of an edge in a heterogeneous graph, the edge information includes the preset relationship type corresponding to the edge, R represents the set of preset relationship types, V represents the set of nodes in the heterogeneous graph, and E represents the set of edges in the heterogeneous graph. Each edge in the heterogeneous graph can indicate that the users corresponding to the two nodes connected by it have a strong correlation and conductivity (such as risk conductivity) under the preset relationship type corresponding to the edge.

[0092] like Figure 4B , shows a schematic diagram of a scene where two clipping relationship graphs are fused, where Figure 4B The cropped relationship diagram shown on the upper left is the cropped relationship diagram corresponding to the social relationship. Figure 4B The trimming relationship diagram shown on the lower left side is the trimming relationship diagram corresponding to the transaction relationship. Figure 4B The right side shows the heterogeneous graph involving social relationships and transaction relationships, which is obtained by merging the two cropped relationship graphs on the left. Figure 4B It shows that there is both a social relationship and a transaction relationship between node A and node B. Correspondingly, Figure 4B The edge information of the edge between node A and node B in the heterogeneous graph shown on the right side represents the social relationship and transaction relationship corresponding to the edge.

[0093] In step S340, the heterogeneous graph is processed using a graph neural network to obtain a user representation of the target user corresponding to the target node, and the user representation is used to classify the target user. In this step, a pre-trained graph neural network is obtained, and the node information of the heterogeneous graph and the nodes therein is input into the graph neural network to obtain a user representation of the target user corresponding to the target node, and the user representation is used to classify the target user.

[0094] In one embodiment, there are different types of relationships represented by edges in a heterogeneous graph. In step S340, it can be specifically set to: in step 11, a graph neural network is used to obtain a user representation based on the node information of the target node in the heterogeneous graph and the node information of its neighbor nodes under each preset relationship type. In this implementation, at least the node information of the target node in the heterogeneous graph and the node information of its neighbor nodes under each preset relationship type can be input into the graph neural network to determine the user representation of the target user corresponding to the target node through the graph neural network. Among them, the graph neural network can be used to determine the aggregate representation corresponding to the neighbor nodes of the target node under each preset relationship type (i.e., the first aggregate vector mentioned later), and then the user representation of the target user corresponding to the target node can be determined based on at least the aggregate representation corresponding to the neighbor nodes of the target node under each preset relationship type.

[0095] In one implementation, the node information of several-order neighbor nodes of the target node under each preset relationship type can also be input into the graph neural network according to the network structure of the graph neural network (such as the number of aggregation layers included) to determine the user representation of the target user corresponding to the target node. For example, if the number of aggregation layers (second aggregation layer) included in the graph neural network is k, the node information of the k-order neighbor nodes of the target node under each preset relationship type needs to be input into the graph neural network.

[0096] In one embodiment, in step 11, it is specifically configured to perform several levels of vector aggregation for the target node, wherein each level of vector aggregation includes:

[0097] In step 111 , for any first relationship type, based on the previous level aggregation vector of the target node and the previous level aggregation vector of its first neighbor node under the first relationship type, a first aggregation vector of the target node corresponding to the first relationship type is determined.

[0098] In step 112, the current level aggregation vector of the target node is determined based at least on the first aggregation vector of the target node under each preset relationship type, wherein the primary aggregation vector of each node is determined according to user attribute information of the corresponding user.

[0099] In this implementation, the graph neural network may include a second aggregation layer, and the second aggregation layer may include several. The node information of the target node in the heterogeneous graph and the node information of its neighbor nodes under each preset relationship type are input into the graph neural network, that is, input into the second aggregation layer of the graph neural network. In the second aggregation layer, several levels of information aggregation are performed on the target node, wherein the several levels of vector aggregation are related to the number of layers of the second aggregation layer. For example, if there are k second aggregation layers, then k levels of information aggregation are performed on the target node in k second aggregation layers in sequence. Specifically, first, the primary aggregation vector of the target node m is determined according to the node information of the target node m. And according to the node information of each neighbor node n of the target node m, determine the primary aggregation vector of each neighbor node n Then based on the primary aggregation vector and the primary aggregation vector Perform k-level information aggregation for the target node m and obtain the aggregation vector of the k-th second aggregation layer As the user representation of the target user corresponding to the target node m.

[0100] In one embodiment, the above determination of the primary aggregation vector The process may be: encoding the node information of the target node m, and using the encoded vector as the primary aggregation vector Alternatively, the encoded vector can be linearly or nonlinearly transformed and the transformed vector can be used as the primary aggregation vector

[0101] In each level of information aggregation (for example, in the i-th second aggregation layer), for any first relationship type r, based on the previous level aggregation vector of the target node m and its first neighbor node n under the first relationship type r r The previous aggregation vector Determine the first aggregation vector of the target node m corresponding to the first relationship type r Among them, N(m r ) represents a set of neighbor nodes of the target node m under the first relationship type r. The current level aggregation vector of the target node m is determined based at least on the first aggregation vector of the target node m under each preset relationship type.

[0102] Taking into account that the importance of each first neighbor node of the target node under the first relationship type is different relative to the target node, the first aggregation vector of the target node corresponding to the first relationship type can be determined based on the importance of each first neighbor node relative to the target node to determine a more accurate first aggregation vector.

[0103] Accordingly, in one embodiment, in step 111, it is specifically configured that, in step 1111, based on the previous level aggregation vector of the target node and the previous level aggregation vector of each first neighbor node under the first relationship type, the weight value of each first neighbor node relative to the target node is determined. The weight value of each first neighbor node relative to the target node can represent the importance of each first neighbor node under the first relationship type relative to the target node, that is, it can represent the conduction importance of each first neighbor node under the first relationship type relative to the target node, wherein the larger the weight value of the first neighbor node relative to the target node, the higher the importance (conduction importance) of each first neighbor node under the first relationship type relative to the target node.

[0104] Considering the interpretability of the above-mentioned weight values ​​for the transmission importance of neighbor nodes, in one embodiment, after determining the weight values ​​of neighbor nodes under each preset relationship type relative to the target node, not only are they used for calculations in subsequent steps, but also the weight values ​​of neighbor nodes under each preset relationship type relative to the target node are output. In this way, it can help subsequent downstream businesses (such as risk identification business of whether a merchant-type user is a risk merchant) to explain the source of the relationship of the category (such as risk) or entity determination.

[0105] In step 1112, a first aggregation vector of the target node corresponding to the first relationship type is determined according to the previous level aggregation vector of each first neighbor node and the weight value relative to the target node.

[0106] In one implementation, this step may first calculate the product of the previous level aggregation vector of each first neighbor node and its weight value relative to the target node as the product corresponding to each first neighbor node, and then use the sum of the products corresponding to each first neighbor node as the first aggregation vector of the target node corresponding to the first relationship type. In another implementation, the first aggregation vector of the target node corresponding to the first relationship type may be determined based on the previous level aggregation vector of each first neighbor node and its weight value relative to the target node using a trained second neighbor aggregation function.

[0107] Next, the current-level aggregation vector of the target node m can be determined based on the first aggregation vector of the target node m under each preset relationship type. The specific process can be: based on the previous-level aggregation vector of the target node m and the first aggregation vector of the target node m under each preset relationship type, the current-level aggregation vector of the target node m is determined. In one implementation, at the i-th second aggregation layer, the current-level aggregation vector of the target node m is determined. It can be expressed by the following formula:

[0108]

[0109] in, represents the aggregation vector of the previous level (i-1 second aggregation layer) of the target node m, Represents the first neighbor node n under the first relationship type r r Relative to the weight value of the target node m, Agg() represents the aggregation function of the second aggregation layer of the i-th layer, R represents the set of preset relationship types, Represents the first neighbor node n r The aggregation vector of the previous level (i-1 second aggregation layer) is obtained after the sum symbol operation, which is the synthesis of the first aggregation vectors under each preset relationship type.

[0110] The aggregation function Agg may adopt different forms and algorithms according to actual needs. For example, the aggregation function Agg may be, but is not limited to, a pooling operation, a summing operation, a concatenation operation, and the like.

[0111] In this way, the user representation of the target user node is obtained by integrating the information of the neighbor nodes of the target user node under each relationship type in the heterogeneous graph.

[0112] It can be understood that the heterogeneous graph is obtained by fusing together the relationship graphs of multiple preset relationship types that have been trimmed. Therefore, the heterogeneous graph involves the user relationship graph corresponding to each preset relationship type after concentration and simplification, which contains the edges in each preset relationship type that are determined to be more important for user classification, which provides a basis for the convenient determination of user representations later. Therefore, by processing the heterogeneous graph using a graph neural network, a user representation that fuses the user attribute information of the target user himself and the user attribute information of his corresponding important neighbors can be obtained, so that the user is no longer isolated and a relatively accurate user representation can be determined.

[0113] Furthermore, the heterogeneous graph involves a condensed and streamlined user relationship graph corresponding to each preset relationship type, and the user representation determined thereby integrates the user attribute information of the target user himself and the neighbors that are more important for user classification under each preset relationship type. Such user representation is more general and can be applied to various user classification scenarios. For example, when the user classification scenario is a merchant risk identification scenario, the user representation provided in the embodiments of this specification can support the merchant's entire life cycle, including various risk identification scenarios of risks that may occur in links such as access signing and in-process transactions.

[0114] In one embodiment, after determining the user representation of the target user, the method may further include the following step 21: inputting the user representation of the target user into a user classification model to obtain a user classification result of the target user. In one case, the user classification model may be the aforementioned first user classification model or the second user classification model, or may be a user classification model trained based on the sparse models and graph neural networks corresponding to the aforementioned multiple preset relationship types, and the corresponding relationship graph (including nodes corresponding to users with user category labels) after the sparse models and graph neural networks corresponding to the aforementioned multiple preset relationship types are trained.

[0115] In one implementation, the users corresponding to the nodes in the multiple user relationship graphs are users of the target platform, and the target platform is an e-commerce platform. It can be understood that merchant users (i.e. merchants) are important entities of the e-commerce platform, and merchant risk identification and prevention and control are important contents in security risk control. Merchant risk identification is based on the merchant subject (i.e. the attribute information of the merchant), and identifies the risks that may occur in the merchant's entire life cycle, including access contract signing, in-process transactions, etc. Correspondingly, in this implementation, the target user is a merchant user, and the user classification model is a merchant risk identification model. In this way, combined with the aforementioned determination method of the user representation (merchant representation) of the target user, the merchant representation not only integrates the attribute information of the merchant itself, but also integrates the attribute information of other merchants or consumer users (buyers) that are more important to it. The merchant representation can accurately and comprehensively reflect the characteristics of the target merchant, and the accuracy of the identification result of whether the target merchant is a risk merchant is correspondingly higher and more credible.

[0116] Furthermore, in the process of determining the merchant representation, the weight value (i.e., importance) of the neighboring merchants or consumer users of the target merchant (the corresponding node is the user of the neighboring node of the target node) relative to the target merchant is determined. Accordingly, subsequently, based on the identification result of whether the target merchant is a risky merchant, it can be determined whether the neighboring merchants or consumer users with high importance relative to it are risky merchants or risky consumer users, which facilitates risk identification.

[0117] The foregoing describes certain embodiments of the present specification, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in an order different from that in the embodiments, and the desired results may still be achieved. In addition, the processes depicted in the accompanying drawings do not necessarily have to be performed in the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0118] Corresponding to the above method embodiment, the present specification embodiment provides a user characterization processing device 500, whose schematic block diagram is as follows: Figure 5 As shown, including:

[0119] A first obtaining module 510 is configured to obtain a plurality of user relationship graphs corresponding to a plurality of preset relationship types, wherein the edges in each user relationship graph represent the corresponding relationship type, and the nodes correspond to the users;

[0120] A first clipping module 520 is configured to clip the multiple user relationship graphs respectively using multiple sparse models corresponding to the multiple preset relationship types to obtain corresponding multiple clipped relationship graphs;

[0121] A first fusion module 530 is configured to fuse the plurality of clipping relationship graphs to obtain heterogeneous graphs involving the plurality of preset relationship types;

[0122] The first processing module 540 is configured to process the heterogeneous graph using a graph neural network to obtain a user representation of a target user corresponding to a target node, wherein the user representation is used to classify the target user.

[0123] In an optional implementation, the multiple preset relationship types include any first relationship type, the multiple user relationship graphs include a first relationship graph corresponding to the first relationship type; the multiple sparsification models include a first sparsification model corresponding to the first relationship type,

[0124] The first cutting module 520 includes:

[0125] A first determining unit (not shown in the figure) is configured to determine an attention coefficient between each node and its neighboring nodes in the first relationship graph by using the first sparsification model;

[0126] A cropping unit (not shown in the figure) is configured to crop the first relationship graph based on the attention coefficient.

[0127] In an optional embodiment, the first sparsification model includes a first aggregation layer and an attention layer;

[0128] The first determining unit is specifically configured to perform several levels of information aggregation based on the node information of each node and the node information of its neighboring nodes in the first aggregation layer to obtain an aggregate representation of each node;

[0129] In the attention layer, for any first node, an attention coefficient between the first node and each of its neighboring nodes is determined according to an aggregate representation of the first node and aggregate representations of each of its neighboring nodes.

[0130] In an optional implementation, the clipping unit is specifically configured to clip the edge between two nodes whose attention coefficient is lower than a preset threshold; or

[0131] For any first node, N target neighbor nodes with the largest corresponding attention coefficients are determined from its neighbor nodes, and the edges between the first node and other neighbor nodes except the N target neighbor nodes are pruned.

[0132] In an optional implementation, the device further includes a model training module (not shown in the figure), configured to obtain a sample relationship graph corresponding to the first relationship type, including a first sample node corresponding to a first sample user having a user category label;

[0133] Determine the attention coefficient between each node and its neighboring nodes in the sample relationship graph by using the first sparsification model;

[0134] Determining a first user representation of the first sample user based at least on an attention coefficient associated with the first sample node;

[0135] A first classification prediction is determined according to the first user representation, and the first sparsification model is trained according to the first classification prediction and the user category label.

[0136] In an optional embodiment, the first processing module 540 is specifically configured to utilize the graph neural network to obtain the user representation based on the node information of the target node in the heterogeneous graph and the node information of its neighbor nodes under each preset relationship type.

[0137] In an optional implementation, the first processing module 540 is specifically configured to: perform several levels of vector aggregation for the target node, including a second determination unit (not shown in the figure) and a third determination unit (not shown in the figure);

[0138] A second determining unit is configured to determine, for any first relationship type, based on the previous level aggregation vector of the target node and the previous level aggregation vector of the first neighboring node under the first relationship type, a first aggregation vector of the target node corresponding to the first relationship type;

[0139] The third determining unit is configured to determine a current-level aggregation vector of the target node based at least on a first aggregation vector of the target node under each preset relationship type, wherein the primary aggregation vector of each node is determined according to user attribute information of a corresponding user.

[0140] In an optional implementation, the second determining unit is configured to determine a weight value of each first neighboring node relative to the target node based on the previous level aggregation vector of the target node and the previous level aggregation vector of each first neighboring node under the first relationship type;

[0141] A first aggregation vector of the target node corresponding to the first relationship type is determined according to the previous level aggregation vectors of the first neighbor nodes and the weight values ​​relative to the target node.

[0142] In an optional embodiment, the device further comprises:

[0143] The output module (not shown in the figure) is configured to output the weight value of the neighbor node under each preset relationship type relative to the target node.

[0144] In an optional implementation, the first obtaining module 510 is specifically configured to construct, for users of the target platform, a plurality of user relationship graphs corresponding to the plurality of preset relationship types using the relationship data collected within a preset period.

[0145] In an optional implementation manner, the users include consumer users and merchant users, the target user is a merchant user, and the classification includes: determining whether the target user is a risky merchant.

[0146] In an optional implementation manner, the preset relationship type includes at least one of the following relationship types: a transaction relationship, a transfer relationship, a social relationship, and a same-machine relationship, and the same-machine relationship refers to that users have logged in using the same device.

[0147] In an optional embodiment, the device further comprises:

[0148] An input module (not shown in the figure) is configured to input the user representation of the target user into a user classification model to obtain a user classification result of the target user.

[0149] The above device embodiments correspond to the method embodiments. For specific descriptions, please refer to the description of the method embodiments, which will not be repeated here. The device embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For specific descriptions, please refer to the corresponding method embodiments.

[0150] The embodiments of the present specification also provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the user characterization processing method provided in the present specification.

[0151] An embodiment of the present specification further provides an electronic device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the user characterization processing method provided in the present specification is implemented.

[0152] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the storage medium and electronic device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

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

[0154] The specific implementation methods 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 a specific implementation method of the embodiments of the present invention and is not intended to limit the scope of protection of the present invention. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solution of the present invention shall be included in the scope of protection of the present invention.

Claims

1. A user characterization processing method, comprising: Obtain multiple user relationship graphs corresponding to multiple preset relationship types, where the edges in each user relationship graph represent the corresponding relationship type, and the nodes correspond to the users; Using a plurality of sparse models corresponding to the plurality of preset relationship types, respectively clipping the plurality of user relationship graphs to obtain a plurality of corresponding clipped relationship graphs; Based on the multiple clipping relationship graphs, fusing to obtain heterogeneous graphs involving the multiple preset relationship types; The heterogeneous graph is processed using a graph neural network to obtain a user representation of a target user corresponding to a target node, and the user representation is used to classify the target user.

2. The method of claim 1, wherein: The multiple preset relationship types include any first relationship type, and the multiple user relationship graphs include a first relationship graph corresponding to the first relationship type; The multiple sparsification models include a first sparsification model corresponding to the first relationship type, The step of trimming the plurality of user relationship graphs includes: Determine, by using the first sparsification model, an attention coefficient between each node and its neighboring nodes in the first relationship graph; Based on the attention coefficient, the first relationship graph is cropped.

3. The method of claim 2, wherein: The first sparsification model includes a first aggregation layer and an attention layer; The determining of the attention coefficient between each node and its neighboring nodes in the first relationship graph includes: In the first aggregation layer, several levels of information aggregation are performed based on the node information of each node and the node information of its neighboring nodes to obtain an aggregate representation of each node; In the attention layer, for any first node, an attention coefficient between the first node and each of its neighboring nodes is determined according to an aggregate representation of the first node and aggregate representations of each of its neighboring nodes.

4. The method of claim 2, wherein: Based on the attention coefficient, the first relationship graph is trimmed, including: Prune the edges between two nodes whose attention coefficient is lower than a preset threshold; or For any first node, N target neighbor nodes with the largest corresponding attention coefficients are determined from its neighbor nodes, and the edges between the first node and other neighbor nodes except the N target neighbor nodes are pruned.

5. The method of claim 2, wherein: The first sparsification model is trained in the following way: Obtaining a sample relationship graph corresponding to the first relationship type, including a first sample node corresponding to a first sample user having a user category label; Determine the attention coefficient between each node and its neighboring nodes in the sample relationship graph by using the first sparsification model; Determining a first user representation of the first sample user based at least on an attention coefficient associated with the first sample node; A first classification prediction is determined according to the first user representation, and the first sparsification model is trained according to the first classification prediction and the user category label.

6. The method of claim 1, wherein: The using of a graph neural network to process the heterogeneous graph to obtain a user representation of a target user corresponding to a target node includes: The graph neural network is used to obtain the user representation based on the node information of the target node in the heterogeneous graph and the node information of its neighbor nodes under each preset relationship type.

7. The method of claim 6, wherein: The obtaining the user representation based on the node information of the target node in the heterogeneous graph and the node information of its neighbor nodes under each preset relationship type includes: Performing several levels of vector aggregation for the target node, wherein each level of vector aggregation includes: For any first relationship type, based on the previous level aggregation vector of the target node and the previous level aggregation vector of the first neighboring node under the first relationship type, determine the first aggregation vector of the target node corresponding to the first relationship type; The current level aggregation vector of the target node is determined based at least on the first aggregation vector of the target node under each preset relationship type, wherein the primary aggregation vector of each node is determined according to user attribute information of the corresponding user.

8. The method of claim 7, wherein: Determining that the target node corresponds to a first aggregation vector of a first relationship type includes: Determine a weight value of each first neighbor node relative to the target node based on the previous level aggregation vector of the target node and the previous level aggregation vector of each first neighbor node under the first relationship type; A first aggregation vector of the target node corresponding to the first relationship type is determined according to the previous level aggregation vectors of the first neighbor nodes and the weight values ​​relative to the target node.

9. The method of claim 8, further comprising: Output the weight value of the neighbor node under each preset relationship type relative to the target node.

10. The method of claim 1, wherein: The obtaining of a plurality of user relationship graphs corresponding to a plurality of preset relationship types includes: For users of the target platform, multiple user relationship graphs corresponding to the multiple preset relationship types are constructed using the relationship data collected within a preset period.

11. The method of claim 1, wherein: The users include consumer users and merchant users, the target users are merchant users, and the classification includes: determining whether the target users are risky merchants.

12. The method of claim 1, wherein: The preset relationship type includes at least one of the following relationship types: transaction relationship, transfer relationship, social relationship and same-machine relationship, and the same-machine relationship refers to that users have logged in using the same device.

13. The method of claim 1, further comprising: The user representation of the target user is input into a user classification model to obtain a user classification result of the target user.

14. A user characterization processing device, comprising: A first obtaining module is configured to obtain a plurality of user relationship graphs corresponding to a plurality of preset relationship types, wherein the edges in each user relationship graph represent the corresponding relationship type, and the nodes correspond to the users; A first cutting module is configured to cut the multiple user relationship graphs respectively using multiple sparse models corresponding to the multiple preset relationship types to obtain multiple corresponding cut relationship graphs; A first fusion module is configured to fuse the plurality of clipping relationship graphs to obtain heterogeneous graphs involving the plurality of preset relationship types; The first processing module is configured to process the heterogeneous graph using a graph neural network to obtain a user representation of a target user corresponding to a target node, wherein the user representation is used to classify the target user.

15. An electronic device comprising a memory and a processor, wherein: The memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 13 is implemented.

Citation Information

Patent Citations

  • Service processing method and device based on heterogeneous graph

    CN111309983A

  • Method and device for training graph neural network based on privacy protection

    CN112464292A

  • Transaction intention recognition method and device

    CN114418767A