A model training method, a business risk control method and device
By constructing a business relationship graph and a prediction model, extracting user business sequence data features, and determining attention weights and edge features, the problem of insufficient risk control capabilities in existing business risk control models is solved, and more accurate risk prediction and risk control are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2026-03-31
AI Technical Summary
Existing business risk control models have poor risk control capabilities and are unable to effectively manage business risks.
A business relationship graph is constructed. Features are extracted from the business sequence data of target users and related users through the feature extraction layer and attention layer in the prediction model. Attention weights and edge features are determined, and node features and edge features are input into the decision layer to minimize the bias between risk prediction results and labels for model training.
It improved the accuracy of risk prediction results and enabled effective business risk control during the user's business execution process.
Smart Images

Figure CN115660105B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a method for model training, a method and apparatus for business risk control. Background Technology
[0002] With the rapid development of internet technology, more and more businesses can be conducted online (e.g., payments, loans), which also brings about many business risks (e.g., online fraud). Risk control and privacy protection are often an indispensable part of business processes.
[0003] Currently, a common approach in business risk control is to collect large amounts of user data to train a risk control model, which is then used to perform timely business risk control on online operations. However, the current risk control models have relatively poor business risk control capabilities.
[0004] Therefore, how to effectively control business risks during the user's business execution process is an urgent problem to be solved. Summary of the Invention
[0005] This specification provides a method, apparatus, storage medium, and electronic device for model training, enabling effective business risk control during user business operations.
[0006] The following technical solution is adopted in this specification:
[0007] This manual provides a method for model training, including:
[0008] The node corresponding to the target user in the pre-constructed business relationship graph is determined as the target node, and the node connected to the target node is determined as the associated node. In the business relationship graph, one node corresponds to one user, and the nodes corresponding to users with business associations are connected by edges.
[0009] Obtain the business sequence data corresponding to the target user, and obtain the business sequence data corresponding to the user of the associated node. The business sequence data is used to represent each business data sorted in chronological order.
[0010] The business sequence data of the target user and the business sequence data of the user corresponding to the associated node are input into the prediction model to be trained. Through the feature extraction layer in the prediction model, features are extracted from the business sequence data corresponding to the target user to obtain the first sequence feature, and features are extracted from the business sequence data of the user corresponding to the associated node to obtain the second sequence feature.
[0011] The attention weight between the first sequence feature and the second sequence feature is determined through the attention layer in the prediction model, and the edge feature of the edge between the target node and the associated node is determined based on the attention weight, the first sequence feature and the second sequence feature.
[0012] The node features and edge features corresponding to the determined target node are input into the decision layer of the prediction model to obtain the risk prediction result;
[0013] The prediction model is trained with the optimization objective of minimizing the deviation between the risk prediction result and the tag corresponding to the target user.
[0014] Optionally, the attention weights between the first sequence features and the second sequence features are determined through the attention layer in the prediction model, specifically including:
[0015] Through the attention layer in the prediction model, for each time-bound business feature contained in the first sequence feature, the weight between the business feature at that time and the business features at each time-bound in the second sequence feature is determined, and used as the weight corresponding to the business feature at that time contained in the first sequence feature;
[0016] For each time-based service data contained in the second sequence feature, determine the weight between the service feature at that time and the service features at each time-based service data in the first sequence feature, and use this weight as the weight corresponding to the service feature at that time-based service data contained in the second sequence feature.
[0017] Based on the weights corresponding to the business features at each time step contained in the first sequence feature and the weights corresponding to the business features at each time step contained in the second sequence feature, the attention weight between the first sequence feature and the second sequence feature is determined.
[0018] Optionally, the edge features of the edge between the target node and the associated node are determined based on the attention weight, the first sequence feature, and the second sequence feature, specifically including:
[0019] The first sequence features are weighted by the attention weights to obtain the weighted first sequence features, and the second sequence features are weighted by the attention weights to obtain the weighted second sequence features.
[0020] Based on the weighted first sequence features and the weighted second sequence features, the edge features of the edge between the target node and the associated node are determined.
[0021] Optionally, based on the weighted first sequence features and the weighted second sequence features, the edge features between the target node and the associated node are determined, specifically including:
[0022] For each time step of the weighted features contained in the weighted first sequence features, feature compression is performed on the weighted features at that time step according to the weights between the sub-features of each dimension contained in the weighted features at that time step, to obtain the compressed features at that time step contained in the weighted first sequence features.
[0023] For each time step of the weighted features contained in the weighted second sequence features, feature compression is performed on the weighted features at that time step according to the weights between the sub-features of each dimension contained in the weighted features at that time step, to obtain the compressed features at that time step contained in the weighted second sequence features.
[0024] Based on the compressed features at each time point contained in the weighted first sequence features and the compressed features at each time point contained in the weighted second sequence features, the edge features of the edge between the target node and the associated node are determined.
[0025] Optionally, the edge features of the edge between the target node and the associated node are determined based on the attention weight, the first sequence feature, and the second sequence feature, specifically including:
[0026] Based on the business sequence data input into the prediction model, the business data executed by the target user and the user corresponding to the associated node for the same business object in history are determined and used as the target data.
[0027] Based on the attention weight, the first sequence feature, the second sequence feature, and the target data, the edge feature of the edge between the target node and the associated node is determined.
[0028] Optionally, the edge features of the edge between the target node and the associated node are determined based on the attention weight, the first sequence feature, and the second sequence feature, specifically including:
[0029] Based on the business sequence data input into the prediction model, the merchants corresponding to each business executed by the target user in history are determined, and the proportion of the target user executing business in each merchant is determined as the first proportion, and the proportion of the user corresponding to the associated node executing business in each merchant is determined as the second proportion.
[0030] Based on the attention weight, the first sequence feature, the second sequence feature, the first ratio, and the second ratio, the edge feature of the edge between the target node and the associated node is determined.
[0031] Optionally, the business relationship diagram may further include: merchant nodes;
[0032] Determining the node characteristics corresponding to the target node specifically includes:
[0033] Based on the business sequence data of the target user, determine the initial node characteristics corresponding to the target node;
[0034] Based on the business sequence data of the user corresponding to the associated node, determine the node characteristics corresponding to the associated node;
[0035] Merchant nodes connected to the target node via edges are identified from the business relationship graph and designated as associated merchant nodes.
[0036] Based on the business data of the merchants corresponding to the associated merchant nodes, the node characteristics corresponding to the associated merchant nodes are determined;
[0037] The node characteristics corresponding to the target node are determined based on the initial node characteristics corresponding to the target node, the node characteristics corresponding to the associated node, and the node characteristics corresponding to the associated merchant node.
[0038] This manual provides a business risk control method, including:
[0039] Obtain business sequence data when a user performs business operations;
[0040] The business sequence data is input into a pre-trained prediction model to determine the risk prediction result when the target user performs the business. The prediction model is trained using the model training method described above.
[0041] Based on the risk prediction results, business risk control is carried out on the user.
[0042] This specification provides a model training apparatus, comprising:
[0043] The determination module is used to determine the node corresponding to the target user in the pre-built business relationship graph as the target node, and to determine the node connected to the target node as the associated node. In the business relationship graph, one node corresponds to one user, and the nodes corresponding to users with business associations are connected by edges.
[0044] The acquisition module is used to acquire the business sequence data corresponding to the target user and the business sequence data corresponding to the user of the associated node. The business sequence data is used to represent the business data sorted in chronological order.
[0045] The extraction module is used to input the business sequence data of the target user and the business sequence data of the user corresponding to the associated node into the prediction model to be trained, so as to extract features from the business sequence data corresponding to the target user through the feature extraction layer in the prediction model to obtain the first sequence feature, and extract features from the business sequence data of the user corresponding to the associated node to obtain the second sequence feature.
[0046] The weighting module is used to determine the attention weight between the first sequence feature and the second sequence feature through the attention layer in the prediction model, and to determine the edge feature of the edge between the target node and the associated node based on the attention weight, the first sequence feature and the second sequence feature;
[0047] The input module is used to input the node features and edge features corresponding to the determined target node into the decision layer of the prediction model to obtain the risk prediction result;
[0048] The training module is used to train the prediction model with the optimization objective of minimizing the deviation between the risk prediction result and the label corresponding to the target user.
[0049] This specification provides a business risk control device, including:
[0050] The acquisition module is used to acquire business sequence data when a target user performs business operations;
[0051] The input module is used to input the business sequence data into a pre-trained prediction model to determine the risk prediction result when the target user performs the business. The prediction model is trained by the above-mentioned model training method.
[0052] The risk control module is used to conduct business risk control on the user based on the risk prediction results.
[0053] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for model training and business risk control.
[0054] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-mentioned method for model training and the method for business risk control.
[0055] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:
[0056] In the model training method provided in this specification, firstly, the node corresponding to the target user in a pre-constructed business relationship graph is determined as the target node, and the nodes connected to the target node are determined as associated nodes. In the business relationship graph, one node corresponds to one user, and nodes corresponding to users with business associations are connected by edges. Secondly, the business sequence data corresponding to the target user and the business sequence data corresponding to the associated nodes are obtained. The business sequence data is used to represent the business data sorted in chronological order. Then, the business sequence data of the target user and the business sequence data of the associated nodes are input into the prediction model to be trained. Through the feature extraction layer in the prediction model, features are extracted from the business sequence data corresponding to the target user to obtain the first sequence feature, and features are extracted from the business sequence data of the associated nodes to obtain the second sequence feature. Then, through the attention layer in the prediction model, the attention weight between the first sequence feature and the second sequence feature is determined, and the edge features between the target node and the associated nodes are determined based on the attention weight, the first sequence feature, and the second sequence feature. Finally, the determined node features and edge features corresponding to the target node are input into the decision layer in the prediction model to obtain the risk prediction result. Finally, the prediction model is trained with the optimization objective of minimizing the deviation between the risk prediction results and the corresponding tags of the target users.
[0057] As can be seen from the above method, this approach can pre-construct a business relationship graph. Through the feature extraction layer in the prediction model, features are extracted from the business sequence data corresponding to the target user to obtain the first sequence features, and features are extracted from the business sequence data corresponding to the users of the associated nodes to obtain the second sequence features. Then, through the attention layer in the prediction model, the attention weight between the first and second sequence features is determined, and based on the attention weight, the first and second sequence features, the edge features between the target node and the associated nodes are determined. Next, the determined node features and edge features corresponding to the target node are input into the decision layer of the prediction model to obtain the risk prediction result. Finally, the prediction model is trained with the optimization objective of minimizing the deviation between the risk prediction result and the label corresponding to the target user. The target nodes and associated nodes in the business relationship graph of this method contain business sequence data, which allows the prediction model to refer to the order information of user business execution during the risk prediction process. Furthermore, the prediction model can obtain more detailed information about the target user through the node features and edge features corresponding to the target node, thereby improving the accuracy of the determined risk prediction result and enabling effective business risk control during user business execution. Attached Figure Description
[0058] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and their descriptions, serving to explain this specification and do not constitute an undue limitation thereof.
[0059] In the picture:
[0060] Figure 1 A schematic flowchart illustrating a model training method provided in an embodiment of this specification;
[0061] Figure 2 A flowchart illustrating a business risk control method provided in an embodiment of this specification;
[0062] Figure 3 This is a schematic diagram illustrating the construction of a business relationship diagram, provided as an embodiment of this specification.
[0063] Figure 4 A schematic diagram of a model training apparatus provided in the embodiments of this specification;
[0064] Figure 5 A schematic diagram of the structure of a business risk control device provided in the embodiments of this specification;
[0065] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this specification. Detailed Implementation
[0066] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0067] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0068] Figure 1 This is a flowchart illustrating a model training method described in this specification, which specifically includes the following steps:
[0069] S100: Determine the node corresponding to the target user in the pre-constructed business relationship graph as the target node, and determine the node connected to the target node as the associated node. In the business relationship graph, one node corresponds to one user, and the nodes corresponding to users with business associations are connected by edges.
[0070] S102: Obtain the business sequence data corresponding to the target user and the business sequence data corresponding to the user of the associated node. The business sequence data is used to represent the business data sorted in chronological order.
[0071] In the embodiments of this specification, the execution subject of the model training method can refer to electronic devices such as servers or desktop computers. For ease of description, the model training method provided in this specification will be described below using only a server as the execution subject.
[0072] In the embodiments of this specification, the server can determine the node corresponding to the target user in a pre-built business relationship graph as the target node, and determine the node connected to the target node as the associated node. In the business relationship graph, one node corresponds to one user, and the nodes corresponding to users with business associations are connected by edges.
[0073] The server can generate nodes corresponding to users in the business relationship graph based on the user's business sequence data. The business sequence data mentioned here represents business data sorted chronologically. This business data can refer to the data corresponding to each operation event performed by the user during business processes. Examples include user registration data, user login data, user click data, user transaction data, and user favorites data.
[0074] Furthermore, business data will include multiple pieces of business information. For example, a user's transaction data will include business information such as the user's transaction time, the user's trading partner, and the user's transaction amount. As another example, a user's favorites data will include business information such as the time the user saved the item, the item saved, and the value of the saved item.
[0075] In the embodiments of this specification, each piece of business data executed by a user in the business sequence data corresponding to a user, and the order of each piece of business data, can reflect the user's personal preferences to a certain extent. If the business sequence data corresponding to two users contain business data executed for the same business object, it can be considered that these two users may have similar personal preferences. Based on this, in the business relationship graph, the nodes corresponding to users with business associations are connected by edges. The business association mentioned here can refer to executing business for the same business object. For example, if two users purchase the same product, the nodes corresponding to these two users are connected by edges in the business relationship graph.
[0076] In the embodiments described in this specification, the server can obtain the business sequence data corresponding to the target user, as well as the business sequence data of the user corresponding to the associated node, for use in the subsequent model training of the prediction model.
[0077] S104: Input the business sequence data of the target user and the business sequence data of the user corresponding to the associated node into the prediction model to be trained, so as to extract features from the business sequence data corresponding to the target user through the feature extraction layer in the prediction model to obtain the first sequence feature, and extract features from the business sequence data of the user corresponding to the associated node to obtain the second sequence feature.
[0078] In the embodiments of this specification, the prediction model includes a feature extraction layer, an attention layer, and a decision layer. The server can input the business sequence data of the target user and the business sequence data of the users corresponding to the associated nodes into the prediction model to be trained, so that the feature extraction layer in the prediction model can extract features from the business sequence data corresponding to the target user to obtain a first sequence feature, and extract features from the business sequence data of the users corresponding to the associated nodes to obtain a second sequence feature.
[0079] Specifically, the server can encode the business data at each time step in the business sequence data corresponding to the target user using various encoding methods in the feature extraction layer of the prediction model, thereby obtaining the basic business features corresponding to the business data at each time step. Examples include one-hot encoding, target encoding, and nonlinear PCA. This specification does not limit the encoding method.
[0080] Furthermore, since the basic business features corresponding to the business data at each time step may contain sparse business sub-features, these sparse sub-features result in useful information being scattered across a large amount of data, reducing the accuracy of the risk prediction results determined by the prediction model and the efficiency of training the prediction model. Therefore, the server can use various feature combination methods in the feature extraction layer of the prediction model to combine the business sub-features within the basic business features corresponding to the business data at each time step, thereby obtaining the business features corresponding to the business data at each time step. Examples include Factorization Machines (FM) and Deep Factorization Machines (DeepFM). This specification does not limit the feature combination methods.
[0081] The business sub-features mentioned here can be obtained by encoding the business information in the business data.
[0082] Using the method described above, the server can determine the business characteristics corresponding to the business data at each time point in the business sequence data corresponding to the target user. Then, the server can sort the business characteristics corresponding to the business data at each time point in chronological order to obtain the first sequence characteristics.
[0083] Similarly, the server can determine the business characteristics corresponding to the business data at each moment in the business sequence data of the user corresponding to the associated node. Then, the server can sort the business characteristics corresponding to the business data at each moment in chronological order to obtain the second sequence characteristics.
[0084] S106: Through the attention layer in the prediction model, determine the attention weight between the first sequence feature and the second sequence feature, and determine the edge feature of the edge between the target node and the associated node based on the attention weight, the first sequence feature and the second sequence feature.
[0085] In practical applications, if the business sequence data of two users contains business data executed for the same business object, it can be assumed that these two users may have similar personal preferences. Based on this, the server can determine the shared preferences of the two users by using the correlated data in their respective business sequence data.
[0086] In the embodiments of this specification, the server can determine the attention weight between the first sequence feature and the second sequence feature through the attention layer in the prediction model, and determine the edge feature of the edge between the target node and the associated node based on the attention weight, the first sequence feature and the second sequence feature.
[0087] Specifically, the server can use the attention layer in the prediction model to determine the weight between the business features at each time step included in the first sequence features and the business features at each time step in the second sequence features, and use this weight as the weight corresponding to the business features at that time step included in the first sequence features.
[0088] Furthermore, for the business data at each time point contained in the second sequence features, the weight between the business features at that time point and the business features at each time point in the first sequence features is determined, and this weight is used as the weight corresponding to the business features at that time point contained in the second sequence features.
[0089] Then, the server can determine the attention weight between the first sequence feature and the second sequence feature based on the weights of the business features at each time point contained in the first sequence feature and the weights of the business features at each time point contained in the second sequence feature.
[0090] Next, the server can weight the first sequence features using attention weights to obtain the weighted first sequence features, and weight the second sequence features using attention weights to obtain the weighted second sequence features.
[0091] Finally, the server can determine the edge features between the target node and the associated nodes based on the weighted first sequence features and the weighted second sequence features.
[0092] For example, the first sequence features contain business features at N time points, and the second sequence features contain business features at M time points. The correlation between the business feature at the first time point in the first sequence features and the business features at the M time points in the second sequence features is calculated, and M weights are determined as the weights corresponding to the business feature at the first time point in the first sequence features.
[0093] Then, the server can use the weights corresponding to the business features at the first moment in the first sequence features to weight the business features at the first moment in the first sequence features, and obtain the weighted business features at the first moment in the first sequence features.
[0094] Finally, the server can determine the weighted first sequence features based on the business features at each time point contained in the weighted first sequence features.
[0095] Similarly, the correlation between the business feature at the first moment in the second sequence feature and the business features at the N moments in the first sequence feature is calculated, and N weights are determined as the weights corresponding to the business feature at the first moment in the second sequence feature.
[0096] Then, the server can use the weights corresponding to the business features at the first moment contained in the second sequence features to weight the business features at the first moment contained in the second sequence features, and obtain the weighted business features at the first moment contained in the second sequence features.
[0097] Finally, the server can determine the weighted second sequence features based on the business features at each time point contained in the weighted second sequence features.
[0098] It should be noted that the methods described above for determining the weighted first sequence features and the weighted second sequence features can be co-attention mechanisms.
[0099] In practical applications, in addition to determining the common preferences of two users by using the relevant data in the business sequence data corresponding to the two users, the server can also determine the common preferences of two users by using the business data of the two users who have executed the same business object in history.
[0100] In the embodiments of this specification, the server can determine the business data executed by the target user and the corresponding user of the associated node against the same business object in history based on the business sequence data input into the prediction model, and use this data as the target data.
[0101] For example, data showing that the target user and the user corresponding to the associated node have historically purchased the same product. Another example is data showing that the target user and the user corresponding to the associated node have historically favorited the same product.
[0102] Secondly, the server can determine the edge features of the edges between the target node and the associated nodes based on the attention weight, the first sequence features, the second sequence features, and the target data.
[0103] It should be noted that the server can obtain the attribute characteristics of the edges between the target node and the associated nodes through the target data, which can be used to subsequently determine the edge characteristics of the edges between the target node and the associated nodes.
[0104] In practical applications, in addition to determining the shared preferences of two users by using the correlated data in the business sequence data corresponding to the two users, the server can also determine the shared preferences of two users by the proportion of business performed by the two users in each merchant.
[0105] In the embodiments of this specification, based on the business sequence data input into the prediction model, the merchants corresponding to each business executed by the target user in history are determined, and the proportion of the target user executing business in each merchant is determined as the first proportion, and the proportion of the user corresponding to the associated node executing business in each merchant is determined as the second proportion.
[0106] For example, the percentage of items purchased by the target user from different merchants in history out of the total number of items purchased by the target user, and the percentage of items purchased by users corresponding to associated nodes out of the total number of items purchased by users corresponding to associated nodes. Another example is the percentage of the total amount spent by the target user on purchases from different merchants in history out of the total amount spent by the target user, and the percentage of the total amount spent by users corresponding to associated nodes out of the total amount spent by users corresponding to associated nodes.
[0107] Secondly, the server can determine the edge features of the edges between the target node and the associated nodes based on attention weights, first sequence features, second sequence features, first ratio, and second ratio.
[0108] It should be noted that the server can obtain the graph structure features of the target node in the business relationship graph through the first ratio, and obtain the graph structure features of the associated node in the business relationship graph through the second ratio. The graph structure features of the target node and the associated node in the business relationship graph can be used to determine the edge features of the edge between the target node and the associated node in the subsequent process.
[0109] In practical applications, the weighted first and second sequence features of an edge have high dimensionality, which significantly impacts risk prediction results. This can prevent other data determining the edge features from influencing the prediction, thus reducing the accuracy of the predicted risk. Therefore, the server can perform feature compression on the weighted first and second sequence features to reduce their dimensionality.
[0110] In the embodiments of this specification, for each time-phased feature included in the weighted first sequence features, the server can perform feature compression on the weighted features at that time phase based on the weights between the sub-features of each dimension included in the weighted features at that time phase, to obtain the compressed features at that time phase included in the weighted first sequence features. The sub-features mentioned here can be obtained by weighting the business sub-features with attention weights.
[0111] Then, for each time step of the weighted features contained in the weighted second sequence features, the server can compress the weighted features at that time step according to the weights between the sub-features of each dimension contained in the weighted features at that time step, to obtain the compressed features at that time step contained in the weighted second sequence features.
[0112] Finally, the server can determine the edge features between the target node and the associated node based on the compressed features at that time contained in the weighted first sequence features and the compressed features at that time contained in the weighted second sequence features.
[0113] In the embodiments described in this specification, the server can perform feature compression on the weighted features using various methods. For example, self-attention mechanisms. Another example is principal component analysis (PCA). This specification does not limit the methods used for feature compression on the weighted features.
[0114] Furthermore, the server can determine the edge features between the target node and the associated node based on the compressed features at each time point contained in the weighted first sequence features, the compressed features at each time point contained in the weighted second sequence features, the target data, the first ratio, and the second ratio.
[0115] In other words, the server can determine the edge features between the target node and the associated nodes based on the compressed features at each time step contained in the weighted first sequence features, the compressed features at each time step contained in the weighted second sequence features, the edge attribute features, and the graph structure features.
[0116] In addition to including the graph structure features of the target node and the associated node in the business relationship graph, the graph structure features of the target node and the associated node in the business relationship graph can also include the graph structure features between the target node and the associated node determined by motif analysis in the business relationship graph.
[0117] S108: Input the node features and edge features corresponding to the determined target node into the decision layer of the prediction model to obtain the risk prediction result.
[0118] In the embodiments described in this specification, the server can input the node features and edge features corresponding to the determined target node into the decision layer of the prediction model to obtain the risk prediction result.
[0119] In the embodiments described in this specification, the business relationship diagram further includes merchant nodes. The server can determine the node characteristics corresponding to the target node based on the associated nodes connected to the target node and the associated merchant nodes, such that the node characteristics corresponding to the target node include the node characteristics of each node in the business relationship diagram.
[0120] It should be noted that merchant nodes do not contain business sequence data. The edge features between the target node and associated merchant nodes can refer to the number of transactions and transaction amount of the target user within the merchant over a period of time.
[0121] In the embodiments of this specification, the server can determine the initial node characteristics corresponding to the target node based on the target user's business sequence data.
[0122] Specifically, the server can use various encoding methods to encode the business data at each moment in the business sequence data corresponding to the target user, thereby obtaining the basic business characteristics corresponding to the business data at each moment.
[0123] Secondly, the server can use various feature combination methods to combine the business sub-features within the basic business features corresponding to the business data at each time point, thereby obtaining the business features corresponding to the business data at each time point.
[0124] Then, for the business features corresponding to the business data at each time point, the server can compress the business features at that time point according to the weights between the sub-features of each dimension contained in the business features at that time point, and obtain the compressed features of that time point contained in the business features.
[0125] Finally, the server can sort the compressed features at each time point contained in the business features in chronological order to obtain the initial node features of the target node.
[0126] In practical applications, business sequence data is obtained by sorting business data in chronological order over a short period of time. The target nodes in the business relationship graph constructed from this only determine the target user's personal preferences within a short period, not their preferences over a longer period. Therefore, the server can be configured with a node memory module to capture the target user's personal preferences over a longer timeframe.
[0127] In the embodiments described in this specification, the target node in the business relationship graph corresponds to a node memory module. The node memory module stores the historical node characteristics corresponding to the target node. After determining the initial node characteristics corresponding to the target node, the server can retrieve the historical node characteristics.
[0128] Secondly, the server can determine the weight between the historical node features and the initial node features based on the correlation between the historical node features corresponding to the target node and the initial node features corresponding to the target node.
[0129] Finally, the server can determine the current node features corresponding to the target node based on the weight between the historical node features and the initial node features, as well as the historical node features. The server then stores the current node features corresponding to the target node in the node memory module and updates the node memory module.
[0130] One method for determining the weights between historical node features and initial node features is an attention mechanism. Before the prediction model training begins, randomly generated features can be stored in the node memory module. As the prediction model trains, the features in the node memory module can capture the user's long-term preferences.
[0131] Similarly, the server can determine the node characteristics corresponding to the associated node based on the business sequence data of the user corresponding to the associated node. The specific method for determining the node characteristics corresponding to the associated node is the same as the method for determining the initial node characteristics corresponding to the target node, and will not be described in detail here.
[0132] In the embodiments described in this specification, the server can determine the merchant nodes that are connected to the target node through an edge from the business relationship graph, and use them as associated merchant nodes.
[0133] Then, the server can determine the node characteristics corresponding to the associated merchant node based on the business data of the merchant corresponding to the associated merchant node. The business data of the merchant corresponding to the associated merchant node mentioned here can refer to data such as the merchant's registration time, the number of transactions on the account, and the transaction amount of the merchant.
[0134] Specifically, the server can use various encoding methods to encode the business data of the merchants corresponding to the associated merchant nodes, thereby obtaining the node characteristics corresponding to the associated merchant nodes.
[0135] Finally, the server can determine the node characteristics corresponding to the target node based on the initial node characteristics corresponding to the target node, the node characteristics corresponding to the associated nodes, and the node characteristics corresponding to the associated merchant nodes.
[0136] Specifically, the server can determine the node features corresponding to the target node through various methods that combine the node features of each node. For example, Graph Isomorphism Network (GIN). Another example is Graph Neural Network (GNN). This specification does not limit the methods used to determine the node features corresponding to the target node.
[0137] Of course, the server can determine the node characteristics of the target node based on the current node characteristics of the target node, the node characteristics of the associated nodes, and the node characteristics of the associated merchant nodes.
[0138] Furthermore, the server can also determine the node characteristics corresponding to the target node based on the initial node characteristics corresponding to the target node, the node characteristics corresponding to the associated nodes, the node characteristics corresponding to the associated merchant nodes, the edge characteristics between the target node and the associated nodes, and the edge characteristics between the target node and the associated merchant nodes.
[0139] In practical applications, since the node characteristics of a target node are determined by combining the node characteristics of each node in the business relationship graph, a significant amount of node characteristics are inevitably lost. Therefore, accurate risk prediction results cannot be determined solely based on the node characteristics of the target node. To address this, the server can determine the risk prediction result based on both the node characteristics of the target node and the edge characteristics of its edges, thereby increasing the number of node characteristics and improving the accuracy of the predicted risk outcome.
[0140] In the embodiments described in the specification, the server can input the node features and edge features corresponding to the determined target node into the decision layer of the prediction model to obtain the risk prediction result.
[0141] S110: The prediction model is trained with the optimization objective of minimizing the deviation between the risk prediction result and the tag corresponding to the target user.
[0142] In the embodiments of this specification, the server may train the prediction model with the optimization objective of minimizing the deviation between the risk prediction result and the tag corresponding to the target user.
[0143] The predictive model can be applied to multiple business scenarios, such as information recommendation and business risk control. This specification does not limit the business scenarios in which the predictive model can be applied.
[0144] It should be noted that the specific content of the business sequence data, risk prediction results, and tags corresponding to the target users may differ in different business scenarios. For example, in a business risk control scenario, the business sequence data, risk prediction results, and tags corresponding to the target users all meet the business requirements of the business risk control scenario.
[0145] As can be seen from the above method, this approach can pre-construct a business relationship graph. Through the feature extraction layer in the prediction model, features are extracted from the business sequence data corresponding to the target user to obtain the first sequence features, and features are extracted from the business sequence data corresponding to the users of the associated nodes to obtain the second sequence features. Then, through the attention layer in the prediction model, the attention weight between the first and second sequence features is determined, and based on the attention weight, the first and second sequence features, the edge features between the target node and the associated nodes are determined. Next, the determined node features and edge features corresponding to the target node are input into the decision layer of the prediction model to obtain the risk prediction result. Finally, the prediction model is trained with the optimization objective of minimizing the deviation between the risk prediction result and the label corresponding to the target user. The target nodes and associated nodes in the business relationship graph of this method contain business sequence data, which allows the prediction model to refer to the order information of user business execution during the risk prediction process. Furthermore, the prediction model can obtain more detailed information about the target user through the node features and edge features corresponding to the target node, thereby improving the accuracy of the determined risk prediction result and enabling effective business risk control during user business execution.
[0146] In the embodiments described in this specification, after the prediction model has been trained, the server can apply the prediction model to perform business risk control on users.
[0147] Figure 2 This is a flowchart illustrating one of the business risk control methods described in this specification, which specifically includes the following steps:
[0148] S200: Obtain business sequence data when the user performs business.
[0149] S202: Input the business sequence data into a pre-trained prediction model to determine the risk prediction results when the target user performs the business.
[0150] S204: Based on the risk prediction results, conduct business risk control on the user.
[0151] In the embodiments described in this specification, the server can obtain business sequence data when a user performs a business operation.
[0152] Secondly, the server can input business sequence data into a pre-trained prediction model to determine the risk prediction results when the target user performs business.
[0153] Finally, the server can perform business risk control on users based on the risk prediction results. This business risk control can refer to predicting whether a user has been defrauded based on the business sequence data during the user's business transactions; if the user has been defrauded, then business risk control measures are taken against them.
[0154] In the embodiments of this specification, the specific process for constructing the business relationship diagram is as follows: Figure 3 As shown.
[0155] Figure 3 This is a schematic diagram illustrating the construction of a business relationship diagram, provided as an embodiment of this specification.
[0156] exist Figure 3 In the diagram, the business relationship graph contains nodes A, B, and C. Node B is the target node. Nodes A and C are related nodes. The server can encode the business data at each time step in the business sequence data of the user corresponding to node B using various encoding methods to obtain the first sequence feature. It can also encode the business data at each time step in the business sequence data of the user corresponding to node C to obtain the second sequence feature.
[0157] Secondly, the server can determine the attention weight between node B and node C based on the first sequence features and the second sequence features. It can also determine the weighted first sequence features and the weighted second sequence features.
[0158] Then, the server can perform feature compression on the weighted first sequence features to obtain the compressed features corresponding to the weighted first sequence features, and perform feature compression on the weighted second sequence features to obtain the compressed features corresponding to the weighted second sequence features.
[0159] Then, the server can determine the edge features of the edge between node B and node C based on the compressed features at each time point contained in the weighted first sequence features, the compressed features at each time point contained in the weighted second sequence features, the target data, the first ratio, and the second ratio.
[0160] Next, after determining the initial node features corresponding to node B, the server can obtain the historical node features. The server can then determine the weights between the historical and initial node features based on the correlation between them.
[0161] Next, the server can determine the current node characteristics corresponding to node B based on the weight between the historical node characteristics and the initial node characteristics, as well as the historical node characteristics.
[0162] Similarly, the server can determine the current node characteristics corresponding to node A, the current node characteristics corresponding to node C, the edge characteristics of the edge between node A and node C, and the edge characteristics of the edge between node A and node B.
[0163] Finally, the server can construct a business relationship graph based on the current node characteristics corresponding to node A, the current node characteristics corresponding to node B, the current node characteristics corresponding to node C, the edge characteristics of the edge between node A and node C, the edge characteristics of the edge between node B and node C, and the edge characteristics of the edge between node A and node B.
[0164] It should be noted that the business relationship graph can be located either inside or outside the prediction model. The method described above for constructing the business relationship graph is based on the example of the business relationship graph being located inside the prediction model. If the business relationship graph is located outside the prediction model, after determining the node characteristics of each node and the edge characteristics between each node, the prediction model will update the business relationship graph by determining the node characteristics of each node and the edge characteristics between each node. Based on the updated business relationship graph, the node characteristics and edge characteristics corresponding to the target node will be input into the decision layer of the prediction model to obtain the risk prediction result.
[0165] As can be seen from the above method, this method allows the prediction model to refer to the sequence information of users' business operations when determining the risk prediction results, thereby obtaining more detailed information about the target users. This improves the accuracy of the determined risk prediction results and enables effective business risk control during the user's business operations.
[0166] The above is a model training method provided by the embodiments of this specification. Based on the same idea, this specification also provides corresponding devices, storage media and electronic devices.
[0167] Figure 4 This is a schematic diagram of a model training apparatus provided in an embodiment of this specification. The apparatus includes:
[0168] The determination module 400 is used to determine the node corresponding to the target user in the pre-constructed business relationship graph as the target node, and to determine the node connected to the target node as the associated node. In the business relationship graph, one node corresponds to one user, and the nodes corresponding to users with business associations are connected by edges.
[0169] The acquisition module 402 is used to acquire the business sequence data corresponding to the target user and the business sequence data corresponding to the user of the associated node. The business sequence data is used to represent the business data sorted in chronological order.
[0170] The extraction module 404 is used to input the business sequence data of the target user and the business sequence data of the user corresponding to the associated node into the prediction model to be trained, so as to extract features from the business sequence data corresponding to the target user through the feature extraction layer in the prediction model to obtain the first sequence feature, and extract features from the business sequence data of the user corresponding to the associated node to obtain the second sequence feature.
[0171] The weight module 406 is used to determine the attention weight between the first sequence feature and the second sequence feature through the attention layer in the prediction model, and to determine the edge feature of the edge between the target node and the associated node based on the attention weight, the first sequence feature and the second sequence feature.
[0172] The input module 408 is used to input the node features and edge features corresponding to the determined target node into the decision layer of the prediction model to obtain the risk prediction result;
[0173] The training module 410 is used to train the prediction model with the optimization objective of minimizing the deviation between the risk prediction result and the label corresponding to the target user.
[0174] Optionally, the weighting module 406 is specifically configured to, through the attention layer in the prediction model, determine the weight between the business feature at each time moment included in the first sequence feature and the business features at each time moment in the second sequence feature, as the weight corresponding to the business feature at that time moment included in the first sequence feature; determine the weight between the business feature at each time moment included in the second sequence feature and the business features at each time moment in the first sequence feature, as the weight corresponding to the business feature at that time moment included in the second sequence feature; and determine the attention weight between the first sequence feature and the second sequence feature based on the weights corresponding to the business features at each time moment included in the first sequence feature and the weights corresponding to the business features at each time moment included in the second sequence feature.
[0175] Optionally, the weighting module 406 is specifically used to: weight the first sequence features with the attention weight to obtain weighted first sequence features, and weight the second sequence features with the attention weight to obtain weighted second sequence features, and determine the edge features of the edge between the target node and the associated node based on the weighted first sequence features and the weighted second sequence features.
[0176] Optionally, the weighting module 406 is specifically configured to: for each time step of the weighted features included in the weighted first sequence features, compress the weighted features at that time step according to the weights between the sub-features of each dimension included in the weighted features at that time step, to obtain the compressed features at that time step included in the weighted first sequence features; for each time step of the weighted features included in the weighted second sequence features, compress the weighted features at that time step according to the weights between the sub-features of each dimension included in the weighted second sequence features, to obtain the compressed features at that time step included in the weighted second sequence features; and determine the edge features of the edge between the target node and the associated node based on the compressed features at each time step included in the weighted first sequence features and the compressed features at each time step included in the weighted second sequence features.
[0177] Optionally, the weighting module 406 is specifically used to determine, based on the business sequence data input into the prediction model, the business data executed by the target user and the user corresponding to the associated node for the same business object in history, as target data, and to determine the edge features of the edge between the target node and the associated node based on the attention weight, the first sequence feature, the second sequence feature and the target data.
[0178] Optionally, the weighting module 406 is specifically used to: determine the merchants corresponding to each business executed by the target user in history based on the business sequence data input into the prediction model, and determine the proportion of the target user executing business in each merchant as a first proportion, and determine the proportion of the user corresponding to the associated node executing business in each merchant as a second proportion; and determine the edge features of the edge between the target node and the associated node based on the attention weight, the first sequence feature, the second sequence feature, the first proportion, and the second proportion.
[0179] Optionally, the business relationship diagram may further include: merchant nodes;
[0180] The input module 408 is specifically used to: determine the initial node characteristics corresponding to the target node based on the business sequence data of the target user; determine the node characteristics corresponding to the associated node based on the business sequence data of the user corresponding to the associated node; determine the merchant nodes connected to the target node by edges from the business relationship graph as associated merchant nodes; determine the node characteristics corresponding to the associated merchant nodes based on the business data of the merchants corresponding to the associated merchant nodes; and determine the node characteristics corresponding to the target node based on the initial node characteristics corresponding to the target node, the node characteristics corresponding to the associated node, and the node characteristics corresponding to the associated merchant nodes.
[0181] Figure 5 This is a schematic diagram of a business risk control device provided in an embodiment of this specification. The device includes:
[0182] Module 500 is used to acquire business sequence data when the target user performs business.
[0183] The input module 502 is used to input the business sequence data into a pre-trained prediction model to determine the risk prediction result when the target user performs the business. The prediction model is trained by the above-mentioned model training method.
[0184] The risk control module 504 is used to perform business risk control on the user based on the risk prediction results.
[0185] This specification also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can be used to perform the above-described actions. Figure 1 The provided model training method and the above Figure 2 The business risk control methods provided.
[0186] The embodiments in this specification also provide Figure 6 The diagram shows the structure of the electronic device. Figure 6At the hardware level, this electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then executes it to achieve the above. Figure 1 The provided model training method and the above Figure 2 The business risk control methods provided.
[0187] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0188] It should be noted that all actions involving the acquisition of signals, information, or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where the application is located, and with the authorization granted by the owner of the relevant device.
[0189] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0190] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0191] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0192] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.
[0193] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0194] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0195] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0196] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0197] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0198] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0199] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0200] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0201] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0202] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0203] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0204] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.
Claims
1. A method for model training, comprising: determining a node corresponding to a target user in a pre-constructed business relationship graph as a target node, and determining a node connected to the target node as an associated node, in the business relationship graph, a node corresponding to a user, and nodes corresponding to users having business associations are connected by edges; obtaining business sequence data corresponding to the target user, and obtaining business sequence data corresponding to users of the associated node, the business sequence data being used to represent each business data sorted in time sequence, and the business data including at least registration data of a user, login data of the user, click data of the user, transaction data of the user, and collection data of the user; inputting the business sequence data of the target user and the business sequence data of the users of the associated node into a prediction model to be trained, to extract features from the business sequence data corresponding to the target user by a feature extraction layer in the prediction model to obtain first sequence features, and to extract features from the business sequence data of the users of the associated node by the feature extraction layer to obtain second sequence features; determining attention weights between the first sequence features and the second sequence features by an attention layer in the prediction model, and determining an edge feature of an edge between the target node and the associated node according to the attention weights, the first sequence features, and the second sequence features; inputting the determined node feature corresponding to the target node and the edge feature into a decision layer in the prediction model to obtain a risk prediction result; training the prediction model with an optimization objective of minimizing a deviation between the risk prediction result and a label corresponding to the target user.
2. The method of claim 1, wherein determining the attention weights between the first sequence features and the second sequence features by the attention layer in the prediction model comprises: determining, by the attention layer in the prediction model, for each time point of business features included in the first sequence features, a weight between the time point of business features and each time point of business features in the second sequence features as a weight corresponding to the time point of business features included in the first sequence features; determining, for each time point of business data included in the second sequence features, a weight between the time point of business features and each time point of business features in the first sequence features as a weight corresponding to the time point of business features included in the second sequence features; determining the attention weights between the first sequence features and the second sequence features according to the weights corresponding to each time point of business features included in the first sequence features and the weights corresponding to each time point of business features included in the second sequence features.
3. The method of claim 1, wherein determining the edge feature of the edge between the target node and the associated node according to the attention weights, the first sequence features, and the second sequence features comprises: weighting the first sequence feature by the attention weight to obtain a weighted first sequence feature, and weighting the second sequence feature by the attention weight to obtain a weighted second sequence feature; determining the edge feature of the edge between the target node and the associated node according to the weighted first sequence feature and the weighted second sequence feature. 4.The method of claim 3, wherein the edge feature of the edge between the target node and the associated node is determined according to the weighted first sequence feature and the weighted second sequence feature, and specifically comprising: performing feature compression on each time point's weighted feature included in the weighted first sequence feature according to the weights between the sub-features of each dimension included in the time point's weighted feature to obtain a compressed feature of the time point included in the weighted first sequence feature; performing feature compression on each time point's weighted feature included in the weighted second sequence feature according to the weights between the sub-features of each dimension included in the time point's weighted feature to obtain a compressed feature of the time point included in the weighted second sequence feature; and determining the edge feature of the edge between the target node and the associated node according to the compressed features of each time point included in the weighted first sequence feature and the compressed features of each time point included in the weighted second sequence feature. 5.The method of claim 1, wherein the edge feature of the edge between the target node and the associated node is determined according to the attention weight, the first sequence feature and the second sequence feature, and specifically comprising: determining, as target data, the business data respectively performed by the target user and the user corresponding to the associated node on the same business object in history according to the business sequence data input into the prediction model; and determining the edge feature of the edge between the target node and the associated node according to the attention weight, the first sequence feature, the second sequence feature and the target data. 6.The method of claim 1, wherein the edge feature of the edge between the target node and the associated node is determined according to the attention weight, the first sequence feature and the second sequence feature, and specifically comprising: determining the merchants corresponding to each business performed by the target user in history, and determining the proportion of the business performed by the target user in each merchant as a first proportion, and determining the proportion of the business performed by the user corresponding to the associated node in each merchant as a second proportion according to the business sequence data input into the prediction model; and determining the edge feature of the edge between the target node and the associated node according to the attention weight, the first sequence feature, the second sequence feature, the first proportion and the second proportion. a merchant node; determining the node feature corresponding to the target node, specifically comprising: determining an initial node feature corresponding to the target node according to the business sequence data of the target user; 7. The method of claim 1, the business relationship graph further comprising: determine a node feature corresponding to the target node according to the initial node feature corresponding to the target node, the node feature corresponding to the associated node, and the node feature corresponding to the associated merchant node.
8. A method for business risk control, comprising: obtaining business sequence data of a user performing a business; inputting the business sequence data into a pre-trained prediction model to determine a risk prediction result of the target user performing a business, the prediction model being trained by the method of any one of claims 1-7; performing business risk control on the user according to the risk prediction result.
9. An apparatus for model training, comprising: a determination module configured to determine a node corresponding to a target user in a pre-constructed business relationship graph as a target node, and determine a node connected to the target node as an associated node, in the business relationship graph, one node corresponds to one user, and nodes corresponding to users having business associations are connected by edges; an acquisition module configured to acquire business sequence data corresponding to the target user, and acquire business sequence data of a user corresponding to the associated node, the business sequence data being used to represent each business data sorted in chronological order, and the business data including at least registration data, login data, click data, transaction data, and collection data of a user; an extraction module configured to input the business sequence data of the target user and the business sequence data of the user corresponding to the associated node into a prediction model to be trained, to extract features from the business sequence data of the target user through a feature extraction layer in the prediction model, to obtain first sequence features, and to extract features from the business sequence data of the user corresponding to the associated node, to obtain second sequence features; a weight module configured to determine an attention weight between the first sequence features and the second sequence features through an attention layer in the prediction model, and determine an edge feature of an edge between the target node and the associated node according to the attention weight, the first sequence features, and the second sequence features; an input module configured to input the determined node feature corresponding to the target node and the edge feature into a decision layer in the prediction model to obtain a risk prediction result; a training module configured to train the prediction model with minimizing a deviation between the risk prediction result and a label corresponding to the target user as an optimization target.
10. An apparatus for business risk control, comprising: an acquisition module configured to acquire business sequence data of a target user performing a business; An input module configured to input the service sequence data into a pre-trained prediction model to determine a risk prediction result of the target user performing the service, the prediction model being trained by the method of any one of claims 1-7; A risk control module configured to perform service risk control on the user according to the risk prediction result. 11.A computer readable storage medium, the storage medium storing a computer program, the computer program being executed by a processor to implement the method of any one of claims 1-8. 12.An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the method of any one of claims 1-8 when executing the program.
Citation Information
Patent Citations
Information recommendation method and device
CN113641892A
Anti-fraud risk assessment method and device, training method and device and readable storage medium
CN114298417A