Method, device, computer equipment, medium and program product for detecting capital reflow

Through the graph attention neural network model and timing neural network model, transaction data is analyzed, and the target user is automatically detected whether there is capital return, which solves the problem of low intelligence in the existing technology of manual detection and realizes efficient and intelligent capital return detection.

CN114418747BActive Publication Date: 2025-05-09INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210079053.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-24
Publication Date
2025-05-09
Estimated Expiration
2042-01-24

AI Technical Summary

Technical Problem

In the existing technology, capital return detection mainly relies on manual labor, and is not very intelligent, making it difficult to effectively detect capital return phenomenon.

Method used

The graph attention neural network model and timing neural network model are used to obtain the transaction data of the target user, and the transaction directed graph and timing data are constructed. The graph attention neural network model is used to extract the characteristics of funds outflow and inflow into the user. The transaction timing data is analyzed in combination with the timing neural network model, and the indication information is output to determine whether the target user has funds backflow.

Benefits of technology

It realizes automated detection of whether there is capital return on the target user, improves the intelligence of the phenomenon of capital return on the target user, and improves the detection speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114418747B_ABST
    Figure CN114418747B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, computer equipment, medium and program product for detecting capital reflux, and belongs to the field of big data technology. The method comprises: obtaining transaction data corresponding to the target user to be detected for capital reflux, and obtaining transaction time series data and an adjacency matrix of a directed transaction graph according to the transaction data, wherein the transaction users include the target user and the user who has capital transactions with the target user; inputting the adjacency matrix into a pre-trained graph attention neural network model, and obtaining an intermediate matrix based on the output of the graph attention neural network model; transforming the transaction time series data based on the intermediate matrix, and inputting the multiple vectors obtained after the transformation into a pre-trained time series neural network model, and the time series neural network model outputs indication information, and the indication information is used to indicate whether the target user has capital reflux. The present method can realize the automatic detection of whether the target user has capital reflux.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a method, device, computer equipment, medium and program product for detecting capital reflux. Background Art

[0002] When a user borrows money from a bank, in order to ensure the safety of the bank's loan funds, the bank usually requires the user to make a commitment on the use of the borrowed funds. At the same time, the bank will detect the use of the borrowed funds to see if there is a phenomenon of capital reflux, where capital reflux refers to the customer using the borrowed funds for purposes other than the promised purpose. In the prior art, the capital reflux phenomenon is mainly detected manually, but the intelligence of the manual detection of capital reflux phenomenon is not high. Summary of the invention

[0003] Based on this, it is necessary to provide a capital reflux detection method, device, computer equipment, medium and program product to address the above technical issues.

[0004] In a first aspect, the present application provides a method for detecting capital reflux, the method comprising: obtaining transaction data corresponding to a target user to be subjected to capital reflux detection, and obtaining transaction timing data and an adjacency matrix of a directed transaction graph based on the transaction data, wherein each element in the adjacency matrix is ​​used to characterize the directed relationship of capital transactions between transaction users, and the nodes in the directed transaction graph are used to characterize transaction users, and the transaction users include target users and users who have capital transactions with the target users, and the edges in the directed transaction graph are used to characterize the capital transaction relationship between transaction users, and the transaction timing data includes a plurality of transaction records arranged according to transaction time; the adjacency matrix is ​​input into a pre-trained graph attention neural network model, and an intermediate matrix is ​​obtained based on the output of the graph attention neural network model, and the intermediate matrix includes elements characterizing users with capital outflow and elements characterizing users with capital inflow; the transaction timing data is transformed based on the intermediate matrix, and a plurality of vectors obtained after the transformation are input into a pre-trained time series neural network model, each vector includes an element characterizing users with capital outflow, an element characterizing users with capital inflow, an element characterizing transaction time difference, and an element characterizing transaction amount ratio, and the time series neural network model outputs indication information, and the indication information is used to indicate whether there is capital reflux for the target user.

[0005] In one embodiment, a pre-trained graph attention neural network model includes a first graph attention neural network model and a second graph attention neural network model, and inputting an adjacency matrix into the pre-trained graph attention neural network model includes: inputting the adjacency matrix and a preset original matrix into the first graph attention neural network model, obtaining a first matrix based on the output of the first graph attention neural network model, the first matrix being a matrix obtained by iterating according to the outflow direction of funds, and the first matrix including elements representing the first candidate funds outflow user and elements representing the first candidate funds inflow user; transposing the adjacency matrix, inputting the transposed adjacency matrix and the preset original matrix into the second graph attention neural network model, obtaining a second matrix based on the output of the second graph attention neural network model, the second matrix being a matrix obtained by iterating according to the inflow direction of funds, and the second matrix including elements representing the second candidate funds outflow user and elements representing the second candidate funds inflow user.

[0006] In one of the embodiments, an intermediate matrix is ​​obtained based on the output of a graph attention neural network model, including: concatenating a first matrix with a second matrix, wherein the concatenation is used to delete row vectors corresponding to directed relationships between a first candidate outflow user, a first candidate inflow user, a second candidate outflow user, and a second candidate inflow user in which fund transactions cannot form a closed loop, and reorganize the retained row vectors to obtain an intermediate matrix, wherein the intermediate matrix includes elements representing inflow users and elements representing outflow users, and the directed relationship between fund transactions between inflow users and outflow users is a closed loop.

[0007] In one embodiment, the transaction record includes users with outflow of funds, users with inflow of funds, transaction time difference and transaction amount ratio, wherein the transaction time difference is the difference between the current transaction time and the previous transaction time, and the transaction amount ratio is the ratio of the transaction amount of the current transaction to the transaction amount of the initial transaction. The transaction time series data is transformed based on the intermediate matrix, including: using the elements representing the users with inflow of funds and the elements representing the users with outflow of funds included in the intermediate matrix to replace the users with outflow of funds and the users with inflow of funds in each transaction record in the transaction time series data respectively; for each transaction record, after the replacement process, splicing the data in the transaction record to obtain a transaction record vector; splicing each transaction record vector to obtain multiple vectors after the transformation process.

[0008] In one embodiment, the time series neural network model outputs indication information, and the indication information is used to indicate whether the target user has capital reflux, including: using the attention mechanism to perform weighted sum processing on the vector output by the time series neural network model to obtain a weighted summed vector, the weighted summed vector includes elements representing characteristics of users with capital outflow, elements representing characteristics of users with capital inflow, elements representing characteristics of transaction time difference, and elements representing characteristics of transaction amount ratio; performing linear change processing on the weighted summed vector to obtain a two-dimensional vector, and the elements in the two-dimensional vector are used to represent the probability of capital reflux for the target user; and determining whether the target user has capital reflux based on the two-dimensional vector.

[0009] In one of the embodiments, the training process of the graph attention neural network model and the time series neural network model includes: obtaining a training sample set, the training sample set includes transaction data corresponding to the sample user and a label corresponding to the sample user, the label is used to indicate whether the sample user has capital reflux; using the training sample set to train the initial graph attention neural network model and the initial time series neural network model until a preset loss function converges to obtain the graph attention neural network model and the time series neural network model.

[0010] In a second aspect, the present application also provides a fund reflux detection device, the device comprising:

[0011] The first acquisition module is used to acquire transaction data corresponding to the target user to be tested for capital reflux, and acquire transaction time series data and an adjacency matrix of a transaction directed graph according to the transaction data, wherein each element in the adjacency matrix is ​​used to represent the directed relationship of capital transactions between transaction users, and the nodes in the transaction directed graph are used to represent transaction users, including target users and users who have capital transactions with the target users. The edges in the transaction directed graph are used to represent the capital transaction relationship between transaction users, and the transaction time series data includes a plurality of transaction records arranged according to transaction time;

[0012] A second acquisition module is used to input the adjacency matrix into a pre-trained graph attention neural network model, and obtain an intermediate matrix based on the output of the graph attention neural network model, wherein the intermediate matrix includes elements representing users with outflow of funds and elements representing users with inflow of funds;

[0013] A determination module is used to transform the transaction time series data based on the intermediate matrix, and input multiple vectors obtained after the transformation into a pre-trained time series neural network model. Each vector includes an element representing the user with capital outflow, an element representing the user with capital inflow, an element representing the transaction time difference, and an element representing the transaction amount ratio. The time series neural network model outputs indication information, which is used to indicate whether there is capital reflux for the target user.

[0014] In one embodiment, the pre-trained graph attention neural network model includes a first graph attention neural network model and a second graph attention neural network model, and the second acquisition module is specifically used to: input the adjacency matrix and the pre-set original matrix into the first graph attention neural network model, and obtain the first matrix based on the output of the first graph attention neural network model, the first matrix is ​​a matrix obtained by iterating according to the outflow direction of funds, and the first matrix includes elements representing the first candidate funds outflow user and elements representing the first candidate funds inflow user; transpose the adjacency matrix, input the transposed adjacency matrix and the pre-set original matrix into the second graph attention neural network model, and obtain the second matrix based on the output of the second graph attention neural network model, the second matrix is ​​a matrix obtained by iterating according to the inflow direction of funds, and the second matrix includes elements representing the second candidate funds outflow user and elements representing the second candidate funds inflow user.

[0015] In one embodiment, the second acquisition module is specifically used to: concatenate the first matrix and the second matrix, the concatenation processing is used to delete the row vectors corresponding to the directed relationship between the first candidate fund outflow user, the first candidate fund inflow user, the second candidate fund outflow user and the second candidate fund inflow user in which the fund transactions cannot form a closed loop, and reorganize the retained row vectors to obtain an intermediate matrix, wherein the intermediate matrix includes elements representing the fund inflow users and elements representing the fund outflow users, and the directed relationship between the fund inflow users and the fund outflow users is a closed loop.

[0016] In one of the embodiments, the transaction record includes users with outflow of funds, users with inflow of funds, transaction time difference and transaction amount ratio, wherein the transaction time difference is the difference between the current transaction time and the previous transaction time, and the transaction amount ratio is the ratio of the transaction amount of the current transaction to the transaction amount of the initial transaction. The determination module is specifically used to: use the elements representing the users with inflow of funds and the elements representing the users with outflow of funds included in the intermediate matrix to replace the users with outflow of funds and the users with inflow of funds in each transaction record in the transaction time series data respectively; for each transaction record, after the replacement process, splice the data in the transaction record to obtain a transaction record vector; splice the transaction record vectors to obtain multiple vectors after transformation.

[0017] In one of the embodiments, the determination module is specifically used to: use the attention mechanism to perform weighted sum processing on the vector output by the time series neural network model to obtain a weighted summed vector, the weighted summed vector includes elements representing the characteristics of users with capital outflow, elements representing the characteristics of users with capital inflow, elements representing the characteristics of transaction time difference, and elements representing the characteristics of transaction amount ratio; perform linear change processing on the weighted summed vector to obtain a two-dimensional vector, the elements in the two-dimensional vector are used to represent the probability of capital reflux for the target user; determine whether the target user has capital reflux based on the two-dimensional vector.

[0018] In one of the embodiments, the training process of the graph attention neural network model and the time series neural network model includes: obtaining a training sample set, the training sample set includes transaction data corresponding to the sample user and a label corresponding to the sample user, the label is used to indicate whether the sample user has capital reflux; using the training sample set to train the initial graph attention neural network model and the initial time series neural network model until a preset loss function converges to obtain the graph attention neural network model and the time series neural network model.

[0019] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the methods described in the first aspect are implemented.

[0020] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any one of the methods described in the first aspect when executed by a processor.

[0021] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.

[0022] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0023] In an embodiment of the present application, first, the transaction data corresponding to the target user to be tested for capital reflux is obtained, and the transaction time series data and the adjacency matrix of the transaction directed graph are obtained based on the transaction data; secondly, the adjacency matrix is ​​input into a pre-trained graph attention neural network model, and an intermediate matrix is ​​obtained based on the output of the graph attention neural network model; finally, the transaction time series data is transformed based on the intermediate matrix, and the multiple vectors obtained after the transformation are input into a pre-trained time series neural network model, and the time series neural network model outputs indication information, and the indication information is used to indicate whether the target user has capital reflux. In this way, the embodiment of the present application realizes the automated detection of whether the target user has capital reflux through the pre-trained graph attention neural network model and the time series neural network model, and improves the intelligence of detecting the capital reflux phenomenon. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A schematic diagram of an implementation environment provided for an embodiment of the present application;

[0025] Figure 2 A flow chart of a method for detecting capital reflux provided in an embodiment of the present application;

[0026] Figure 3 A directed transaction graph provided in an embodiment of the present application;

[0027] Figure 4 A flowchart of a technical process for inputting an adjacency matrix into a pre-trained graph attention neural network model provided in an embodiment of the present application;

[0028] Figure 5 A flowchart of a technical process for converting transaction time series data provided in an embodiment of the present application;

[0029] Figure 6 A flowchart of a technical process for determining whether there is a capital reflow based on the output of a time series neural network model provided in an embodiment of the present application;

[0030] Figure 7 A flowchart of a training process of a graph attention neural network model and a temporal neural network model provided in an embodiment of the present application;

[0031] Figure 8 A flow chart of a method for detecting capital reflux provided in an embodiment of the present application;

[0032] Fig. 9 A side file provided for an embodiment of the present application;

[0033] Fig.10 A block diagram of a capital reflux detection device provided in an embodiment of the present application;

[0034] Fig.11 An internal structure diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0036] When a user borrows money from a bank, in order to ensure the safety of the bank's loan funds, the bank usually requires the user to make a commitment on the use of the borrowed funds. At the same time, the bank will detect the use of the borrowed funds to see if there is a phenomenon of capital reflux, where capital reflux refers to the customer using the borrowed funds for purposes other than the promised purpose. In the prior art, the capital reflux phenomenon is mainly detected manually, but the intelligence of the manual detection of capital reflux phenomenon is not high.

[0037] In view of this, the embodiments of the present application provide a method, device, computer equipment, medium and program product for detecting capital reflux. The method for detecting capital reflux can be used to automatically detect whether there is capital reflux for the target user, thereby improving the intelligence of detecting capital reflux phenomenon.

[0038] See also Figure 1 , which shows a schematic diagram of the implementation environment involved in the capital reflux detection method provided in the embodiment of the present application. Figure 1 As shown, the execution subject of the capital return detection method provided in the embodiment of the present application can be a computer device, or a computer device cluster composed of multiple computer devices. Different computer devices can communicate with each other through wired or wireless methods, and the wireless method can be implemented through WIFI, operator network, NFC (near field communication) or other technologies.

[0039] See also Figure 2 , which shows a flow chart of a method for detecting capital reflux provided in an embodiment of the present application. The method for detecting capital reflux can be applied to Figure 1 In the computer device shown. Figure 2 As shown, the capital return detection method may include the following steps:

[0040] Step 201: The computer device obtains the transaction data corresponding to the target user to be tested for capital reflow, and obtains the transaction time series data and the adjacency matrix of the transaction directed graph based on the transaction data.

[0041] Each element in the adjacency matrix is ​​used to represent the directed relationship between the funds between the trading users. Funds repatriation refers to the use of borrowed funds by the customer for purposes other than those promised. Figure 3 As shown, user A transfers funds to user B, user B transfers funds to user C2, and user C2 transfers funds back to user A. In this case, it indicates that user A has a capital reflux. In other words, if the target user has a capital reflux, no matter how many times the funds flow, the funds will eventually return to the target user. Transaction data may include data related to capital transactions, such as the user of capital inflow, transaction time difference, and transaction amount ratio; transaction time series data includes multiple transaction records arranged according to transaction time; the nodes in the transaction directed graph are used to represent transaction users, and transaction users include target users and users who have capital transactions with target users. The edges in the transaction directed graph are used to represent the capital transaction relationship between transaction users. For example, Figure 3 A transaction directed graph is shown, and the nodes of the transaction directed graph represent the transaction users: target user A, and user B, user C2, user X1 and user X2 that have a financial transaction relationship with target user A, wherein user B is a first-degree transaction user who conducts a transaction with the target user for the first time. Optionally, the nodes in the transaction directed graph may also include user C1 that has a financial transaction relationship with first-degree transaction user B. Further, according to Figure 3 Describe the edges in a directed graph. Figure 3 The direction of the arrow in the middle is the direction of capital flow. For example, in the relationship between target user A and first-degree transaction user B, because target user A points to first-degree transaction user B, target user A is the capital outflow user, and first-degree transaction user B is the capital inflow user. Capital flows from target user A to first-degree transaction user B. In addition, it should be noted that the flow direction of capital is out-degree for target user A and in-degree for first-degree transaction user B.

[0042] The adjacency matrix of the transaction directed graph is a matrix that represents the capital flow relationship between the nodes of the directed graph. Each element in the adjacency matrix is ​​used to represent the directed relationship of capital transactions between transaction users. Figure 3 The adjacency matrix corresponding to the directed graph in is as follows:

[0043]

[0044] Among them, the rows of the matrix represent out-degree users, the rows of the matrix represent in-degree users, 1 in the matrix indicates that there is a financial transaction relationship between the corresponding out-degree user and the in-degree user, and 0 in the matrix indicates that there is no financial transaction relationship between the corresponding out-degree user and the in-degree user. The first row to the last row are target user A, first-degree transaction user B, user C1, user C2, user X1 and user X2, respectively, and the first column to the last column are target user A, first-degree transaction user B, user C1, user C2, user X1 and user X2. For example, the second row and third column in the above matrix indicates that: the out-degree is the first-degree transaction user B, the in-degree is user C1, and the first-degree transaction user B has a financial transaction relationship with user C1, which is represented by 1 in the second row and third column in the matrix.

[0045] Step 202: The computer device inputs the adjacency matrix into a pre-trained graph attention neural network model, and obtains an intermediate matrix based on the output of the graph attention neural network model.

[0046] Among them, an intermediate matrix is ​​obtained based on the output of the Graph Attention Networks (GAT model), and the intermediate matrix includes elements representing users with capital outflow and elements representing users with capital inflow. Because the directed relationship of capital transactions has an obvious node and edge structure, and the Graph Attention Neural Network model is just suitable for this structure, therefore, the accuracy of identifying capital reflux can be improved through the Graph Attention Neural Network model. Moreover, the Graph Attention Neural Network model mainly judges whether there is capital reflux of the target user by paying attention to the out-degree and in-degree of the target user and the out-degree and in-degree of the first-degree transaction user, without paying attention to other intermediate processes of capital flow. Therefore, the embodiment of the present application can simultaneously accommodate explicit looping, implicit looping, and implicit association, etc., and has a certain generalization ability.

[0047] Step 203: The computer device transforms the transaction time series data based on the intermediate matrix, and inputs the multiple vectors obtained after the transformation into a pre-trained time series neural network model. The time series neural network model outputs indication information, which is used to indicate whether there is capital reflux for the target user.

[0048] Each vector includes an element representing the user with outflow of funds, an element representing the user with inflow of funds, an element representing the transaction time difference, and an element representing the transaction amount ratio. Optionally, the conversion processing of the transaction time series data based on the intermediate matrix can be to replace the transaction time series data with the elements included in the intermediate matrix, or it can be other processing methods. The embodiment of the present application does not limit this, as long as the vector obtained after the conversion processing is input into the pre-trained time series neural network model (Gated Recurrent Unit, referred to as GRU model), it can be determined whether the target user has capital reflux according to the output of the GRU model.

[0049] In an embodiment of the present application, first, the transaction data corresponding to the target user to be tested for capital reflux is obtained, and the transaction time series data and the adjacency matrix of the transaction directed graph are obtained based on the transaction data; secondly, the adjacency matrix is ​​input into a pre-trained graph attention neural network model, and an intermediate matrix is ​​obtained based on the output of the graph attention neural network model; finally, the transaction time series data is transformed based on the intermediate matrix, and the multiple vectors obtained after the transformation are input into a pre-trained time series neural network model, and the time series neural network model outputs indication information, and the indication information is used to indicate whether the target user has capital reflux. In this way, the embodiment of the present application realizes the automated detection of whether the target user has capital reflux through the pre-trained graph attention neural network model and the time series neural network model, and improves the intelligence of detecting the capital reflux phenomenon.

[0050] See also Figure 4 , which shows a technical process of inputting an adjacency matrix into a pre-trained graph attention neural network model provided by an embodiment of the present application, wherein the pre-trained graph attention neural network model includes a first graph attention neural network model and a second graph attention neural network model. Figure 4 As shown, the technical process may include the following steps:

[0051] Step 401: The computer device inputs the adjacency matrix and the pre-set original matrix into the first graph attention neural network model, and obtains the first matrix based on the output of the first graph attention neural network model. The first matrix is ​​a matrix obtained by iterating according to the outflow direction of capital transactions.

[0052] Among them, the first matrix includes elements representing the first candidate fund outflow user and elements representing the first candidate fund inflow user, the elements in the pre-set original matrix are randomly set, and the outflow direction of funds can include the outflow direction of funds of the target user and the first-degree transaction user. For example, the outflow direction of funds of the target user A in the above-mentioned is to flow to the first-degree transaction user B.

[0053] Step 402: The computer device performs a transposition operation on the adjacency matrix, and inputs the transposed adjacency matrix and the preset original matrix into the second graph attention neural network model, and obtains a second matrix based on the output of the second graph attention neural network model. The second matrix is ​​a matrix obtained by iterating according to the inflow direction of capital transactions.

[0054] Among them, the second matrix includes elements representing the second candidate fund outflow users and elements representing the second candidate fund inflow users. The inflow direction of funds may include the inflow direction of funds of the target user and the first-degree transaction user. For example, the fund inflow direction of the target user A in the above-mentioned example is that the funds flow from user X1, user X2 and user C2 to the target user A respectively.

[0055] In an optional embodiment of the present application, the adjacency matrix and the pre-set original matrix are input into the first graph attention neural network model, and the process of obtaining the first matrix based on the output of the first graph attention neural network model can be: first, the adjacency matrix and the pre-set original matrix are input into the first graph attention neural network model; second, the adjacency matrix and the pre-set original matrix are multiplied by each other in the first graph attention neural network model to obtain a first candidate matrix; third, the row vectors in the first candidate matrix are aggregated to obtain the aggregated row vectors corresponding to each row vector, and then the first matrix composed of the aggregated row vectors output by the first graph attention neural network model is obtained.

[0056] Optionally, the first formula may be used to perform an aggregation operation on each row vector in the first candidate matrix to obtain an aggregated row vector corresponding to each row vector.

[0057] Among them, the first formula is:

[0058]

[0059] Among them, h v is the aggregate row vector corresponding to the vth row vector in the first candidate matrix, h u is the row vector adjacent to the vth row vector in the first candidate matrix, a v,u Based on the row vector h v and the row vector h u The weight value obtained by the feature, N is the number of row vectors in the first candidate matrix, u∈N(v) represents the row vector h u Belongs to the N row vectors and h v Adjacent row vectors.

[0060] In another optional embodiment of the present application, the adjacency matrix is ​​transposed, and the transposed adjacency matrix and the pre-set original matrix are input into the second graph attention neural network model. The process of obtaining the second matrix based on the output of the second graph attention neural network model can be: first, the transposed adjacency matrix and the pre-set original matrix are input into the second graph attention neural network model; second, the transposed adjacency matrix and the pre-set original matrix are multiplied in the second graph attention neural network model to obtain a second candidate matrix; third, the row vectors in the second candidate matrix are aggregated to obtain the aggregated row vectors corresponding to each row vector, and then the second matrix composed of the aggregated row vectors output by the second graph attention neural network model is obtained. Among them, the aggregation operation on each row vector in the second candidate matrix refers to the above-mentioned aggregation operation on each row vector in the first candidate matrix, which will not be repeated here.

[0061] In the embodiment of the present application, based on the adjacency matrix and the pre-set original matrix, iteration is performed both according to the outflow direction of capital transactions and according to the inflow direction of capital transactions, thereby improving the accuracy of detecting capital reflux phenomena.

[0062] In one of the embodiments of the present application, an optional way to obtain an intermediate matrix based on the output of the graph attention neural network model is: concatenate the first matrix with the second matrix, and the concatenation process is used to delete the row vectors corresponding to the directed relationship between the first candidate fund outflow user, the first candidate fund inflow user, the second candidate fund outflow user, and the second candidate fund inflow user, in which the fund transactions cannot form a closed loop, and reorganize the retained row vectors to obtain the intermediate matrix. Among them, the intermediate matrix includes elements representing the fund inflow users and elements representing the fund outflow users, and the directed relationship between the fund inflow users and the fund outflow users is a closed loop. For example, as mentioned above, user A transfers funds to user B, user B transfers funds to user C2, and user C2 transfers funds back to user A. Then, the directed relationship between user A, user B, and user C2 is a closed loop. In this case, the row vector including elements representing the outflow of funds from user A and the inflow of funds into user B, the row vector including elements representing the outflow of funds from user B and the inflow of funds into user C2, and the row vector including elements representing the outflow of funds from user C2 and the inflow of funds into user A will be retained.

[0063] See also Figure 5 , which shows a technical process for converting transaction time series data provided by an embodiment of the present application. The transaction time series data includes multiple transaction records arranged according to transaction time, wherein the transaction records include the user with outflow of funds, the user with inflow of funds, the transaction time difference and the transaction amount ratio. Figure 5As shown, the technical process may include the following steps:

[0064] Step 501: The computer device uses the elements representing the users with capital inflows and the elements representing the users with capital outflows included in the intermediate matrix to replace the users with capital outflows and users with capital inflows in each transaction record in the transaction time series data.

[0065] In the embodiment of the present application, each transaction record in the transaction time series data is arranged according to the transaction time, and the elements representing the capital inflow users and the elements representing the capital outflow users included in the intermediate matrix are used to replace the capital outflow users and the capital inflow users in each transaction record in the transaction time series data, and the transaction time difference and transaction amount ratio in each transaction record remain unchanged. Among them, the transaction time difference is the difference between the current transaction time and the previous transaction time, and the transaction amount ratio is the ratio of the transaction amount of the current transaction to the transaction amount of the initial transaction. The initial transaction refers to the transaction between the target user and the first transaction user.

[0066] Step 502: After the replacement process, the computer device concatenates the data in each transaction record to obtain a transaction record vector.

[0067] Step 503: The computer device concatenates the transaction record vectors to obtain a plurality of transformed vectors.

[0068] Among them, each vector after the conversion process includes elements representing users with capital outflow, elements representing users with capital inflow, elements representing transaction time differences, and elements representing transaction amount ratios. The multiple vectors obtained after the conversion process can be input into a pre-trained time series neural network model, and then the output of the time series neural network model can be used to determine whether the target user has capital reflux. Compared with the graph attention neural network model, the time series neural network model is mainly responsible for learning the transaction time difference and transaction amount ratio in the transaction time series data.

[0069] In the application embodiment, the time series neural network model can output indication information indicating whether there is capital reflux for the target user by learning the directed relationship of capital flow between capital outflow users, capital inflow users, and capital flow between capital outflow users and capital inflow users, transaction time difference, and transaction amount ratio, thereby realizing automated detection of whether there is capital reflux for the target user.

[0070] See also Figure 6 , which shows a technical process provided by an embodiment of the present application for determining whether there is a capital reflow based on the output of a time series neural network model. Figure 6 As shown, the technical process may include the following steps:

[0071] Step 601: The computer device uses the attention mechanism to perform weighted sum processing on the vector output by the temporal neural network model to obtain a weighted summed vector.

[0072] Optionally, the attention mechanism may be an Attention mechanism, through which the vector output by the time series neural network model may be weighted and summed to obtain a weighted summed vector. The weighted summed vector includes elements representing the characteristics of users with outflow of funds, elements representing the characteristics of users with inflow of funds, elements representing the characteristics of transaction time difference, and elements representing the characteristics of transaction amount ratio.

[0073] Step 602: The computer device performs linear transformation processing on the weighted summed vector to obtain a two-dimensional vector, and the elements in the two-dimensional vector are used to characterize the probability of capital reflux of the target user.

[0074] Step 603: The computer device determines whether there is capital reflux of the target user according to the two-dimensional vector.

[0075] Optionally, the 0th dimension of the two-dimensional vector may indicate that there is no capital reflow for the target user, and the 1st dimension may indicate that there is capital reflow for the target user.

[0076] See also Figure 7 , which shows the training process of a graph attention neural network model and a temporal neural network model provided by an embodiment of the present application. Figure 7 As shown, the training process may include the following steps:

[0077] Step 701: The computer device obtains a training sample set, which includes transaction data corresponding to a sample user and a label corresponding to the sample user, where the label is used to indicate whether there is capital reflux for the sample user.

[0078] Step 702: The computer device trains the initial graph attention neural network model and the initial time series neural network model using the training sample set until the preset loss function converges to obtain the graph attention neural network model and the time series neural network model.

[0079] Among them, the loss function is:

[0080]

[0081] Among them, Y is the label, is the two-dimensional vector output by the model.

[0082] In an optional embodiment of the present application, the initial graph attention neural network model, the initial time series neural network model, the attention mechanism, and the linear change can be trained as a whole using a loss function until the loss function converges. When the loss function converges, the two-dimensional vector output by the model can be used to characterize whether the user has capital repatriation.

[0083] In an embodiment of the present application, the graph attention neural network model can identify directed graphs of transactions without considering the time sequence, and the identification is not limited by the number of fund transactions. In addition, the time series neural network model can perform calculations in seconds. The method of detecting fund reflows that matches the graph attention neural network model and the time series neural network model has greatly improved the detection speed and computing cost compared to the prior art. At the same time, the combination of the graph attention neural network model and the time series neural network model is more conducive to solving hidden fund reflow cases, where hidden fund reflow cases refer to hidden loop cases that are not reflected in the transaction data.

[0084] See also Figure 8 , which shows a flow chart of a method for detecting capital reflux provided in an embodiment of the present application. The method for detecting capital reflux can be applied to Figure 1 In the computer device shown. Figure 8 As shown, the capital return detection method may include the following steps:

[0085] Step 801: The computer device obtains the transaction data corresponding to the target user for which the fund reflux detection is to be performed.

[0086] Step 802: The computer device constructs transaction time series data and a transaction directed graph based on the transaction data.

[0087] Among them, the nodes in the transaction directed graph are used to represent transaction users, and transaction users include target users and users who have financial transactions with target users. The edges in the transaction directed graph are used to represent the financial transaction relationship between transaction users. The transaction time series data includes multiple transaction records arranged according to transaction time. The transaction records include users with capital outflow, users with capital inflow, transaction time difference, and transaction amount ratio.

[0088] Step 803: The computer device constructs an adjacency matrix of the directed graph according to the directed graph.

[0089] Optionally, the process of constructing an adjacency matrix of a directed graph from a directed graph can be: first, construct an edge file from the directed graph; second, construct an adjacency matrix from the edge file. The edge file is an array. Before constructing the directed graph into an edge file, the customers in the directed graph nodes need to be numbered in sequence. Optionally, they can be numbered in the order of transaction time. Assume Figure 3The transaction time sequence is from user A to user B, user B to user C1, user B to user C2, user C2 to user A, user X1 to user A, user X2 to user A. Then A, B, C1, C2, X1, and X2 can be numbered 1, 2, 3, 4, 5, and 6 in the order of transaction time. After the customers in the directed graph nodes are numbered in sequence, the edge file can be constructed according to the number and transaction relationship. Figure 3 The constructed edge file is as follows Fig. 9 As shown, Fig. 9 The first row represents the out-degree, and the second row represents the in-degree, that is, funds flow from 1 to 2, from 2 to 3, from 2 to 4, from 4 to 1, from 6 to 1, and from 5 to 1.

[0090] Step 804: The computer device inputs the adjacency matrix and the preset original matrix into the first graph attention neural network model, and obtains the first matrix based on the output of the first graph attention neural network model.

[0091] Step 805: perform a transposition operation on the adjacency matrix, input the transposed adjacency matrix and the preset original matrix into the second graph attention neural network model, and obtain a second matrix based on the output of the second graph attention neural network model.

[0092] Step 806: The computer device concatenates the first matrix and the second matrix. The concatenation process is used to delete the row vectors corresponding to the directed relationships between the first candidate fund outflow user, the first candidate fund inflow user, the second candidate fund outflow user, and the second candidate fund inflow user in which the fund transactions cannot form a closed loop, and reorganize the retained row vectors to obtain an intermediate matrix.

[0093] Step 807: The computer device uses the elements representing the users with capital inflows and the elements representing the users with capital outflows included in the intermediate matrix to replace the users with capital outflows and users with capital inflows in each transaction record in the transaction time series data.

[0094] Step 808: After the replacement process, the computer device concatenates the data in each transaction record to obtain a transaction record vector.

[0095] Step 809: The computer device concatenates the transaction record vectors to obtain multiple vectors after conversion.

[0096] Step 810: The computer device inputs the multiple vectors obtained after the conversion process into a pre-trained temporal neural network model.

[0097] Step 811: The computer device uses the attention mechanism to perform weighted sum processing on the vector output by the temporal neural network model to obtain a weighted summed vector.

[0098] Step 812: The computer device performs linear transformation processing on the weighted summed vector to obtain a two-dimensional vector, and the elements in the two-dimensional vector are used to characterize the probability of capital reflux of the target user.

[0099] Step 813: The computer device determines whether there is capital reflux of the target user based on the two-dimensional vector.

[0100] In an optional embodiment of the present application, the GAT model and the GRU model can be implemented using the Pytorch platform, or other deep learning platforms can be used to implement the GAT model and the GRU model, wherein other deep learning platforms may include TensorFlow, paddlepaddle, and mxnet, etc. Optionally, the GAT model can be replaced by a model such as a graph convolutional neural network (GCN for short), and the GRU model can be replaced by a model such as a recurrent neural network (RNN for short).

[0101] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0102] See also Fig.10 , which shows a block diagram of a fund reflux detection device 1000 provided in an embodiment of the present application, and the fund reflux detection device can be configured in the above-mentioned computer device. Fig.10 As shown, the fund reflux detection device 1000 includes a first acquisition module 1001 , a second acquisition module 1002 and a determination module 1003 .

[0103] The first acquisition module 1001 is used to acquire transaction data corresponding to the target user to be subjected to fund reflux detection, and acquire transaction time series data and an adjacency matrix of a transaction directed graph according to the transaction data, wherein each element in the adjacency matrix is ​​used to represent the directed relationship of fund transactions between transaction users, and the nodes in the transaction directed graph are used to represent transaction users, including target users and users who have fund transactions with the target users. The edges in the transaction directed graph are used to represent the fund transaction relationship between transaction users, and the transaction time series data includes a plurality of transaction records arranged according to transaction time;

[0104] The second acquisition module 1002 is used to input the adjacency matrix into a pre-trained graph attention neural network model, and obtain an intermediate matrix based on the output of the graph attention neural network model, wherein the intermediate matrix includes elements representing users with outflow of funds and elements representing users with inflow of funds;

[0105] Determination module 1003 is used to transform the transaction time series data based on the intermediate matrix, and input multiple vectors obtained after the transformation into a pre-trained time series neural network model, each vector includes an element representing the user with capital outflow, an element representing the user with capital inflow, an element representing the transaction time difference, and an element representing the transaction amount ratio. The time series neural network model outputs indication information, and the indication information is used to indicate whether there is capital reflux for the target user.

[0106] In an optional embodiment of the present application, the pre-trained graph attention neural network model includes a first graph attention neural network model and a second graph attention neural network model, and the second acquisition module 1002 is specifically used to: input the adjacency matrix and the pre-set original matrix into the first graph attention neural network model, and obtain the first matrix based on the output of the first graph attention neural network model, the first matrix is ​​a matrix obtained by iterating according to the outflow direction of funds, and the first matrix includes elements representing the first candidate funds outflow user and elements representing the first candidate funds inflow user; transpose the adjacency matrix, input the transposed adjacency matrix and the pre-set original matrix into the second graph attention neural network model, and obtain the second matrix based on the output of the second graph attention neural network model, the second matrix is ​​a matrix obtained by iterating according to the inflow direction of funds, and the second matrix includes elements representing the second candidate funds outflow user and elements representing the second candidate funds inflow user.

[0107] In an optional embodiment of the present application, the second acquisition module 1002 is specifically used to: concatenate the first matrix and the second matrix, the concatenation processing is used to delete the row vectors corresponding to the directed relationship between the first candidate fund outflow user, the first candidate fund inflow user, the second candidate fund outflow user and the second candidate fund inflow user in which the fund transactions cannot form a closed loop, and reorganize the retained row vectors to obtain an intermediate matrix, wherein the intermediate matrix includes elements representing the fund inflow users and elements representing the fund outflow users, and the directed relationship between the fund inflow users and the fund outflow users is a closed loop.

[0108] In an optional embodiment of the present application, the transaction record includes a user with outflow of funds, a user with inflow of funds, a transaction time difference, and a transaction amount ratio, wherein the transaction time difference is the difference between the current transaction time and the previous transaction time, and the transaction amount ratio is the ratio of the transaction amount of the current transaction to the transaction amount of the initial transaction. The determination module 1003 is specifically used to: utilize the elements representing the users with inflow of funds and the elements representing the users with outflow of funds included in the intermediate matrix to replace the users with outflow of funds and the users with inflow of funds in each transaction record in the transaction time series data respectively; for each transaction record, after the replacement process, concatenate the data in the transaction record to obtain a transaction record vector; and concatenate the transaction record vectors to obtain multiple vectors after the conversion process.

[0109] In an optional embodiment of the present application, the determination module 1003 is specifically used to: use the attention mechanism to perform weighted sum processing on the vector output by the time series neural network model to obtain a weighted summed vector, the weighted summed vector includes elements representing the characteristics of users with capital outflows, elements representing the characteristics of users with capital inflows, elements representing the characteristics of transaction time differences, and elements representing the characteristics of transaction amount ratios; perform linear change processing on the weighted summed vector to obtain a two-dimensional vector, the elements in the two-dimensional vector are used to represent the probability of capital reflux for the target user; determine whether the target user has capital reflux based on the two-dimensional vector.

[0110] In an optional embodiment of the present application, the training process of the graph attention neural network model and the time series neural network model includes: obtaining a training sample set, the training sample set includes transaction data corresponding to the sample user and a label corresponding to the sample user, the label is used to indicate whether there is capital reflux for the sample user; using the training sample set to train the initial graph attention neural network model and the initial time series neural network model until a preset loss function converges to obtain the graph attention neural network model and the time series neural network model.

[0111] The embodiment of the present application provides a capital reflux detection device, which can implement the above method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0112] Each module in the above-mentioned capital reflux detection device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0113] In one embodiment, a computer device is provided, whose internal structure diagram can be as follows: Fig.11 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for detecting capital reflux is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0114] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0115] In one embodiment of the present application, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining transaction data corresponding to a target user to be subjected to fund reflux detection, and obtaining transaction time series data and an adjacency matrix of a transaction directed graph according to the transaction data, wherein each element in the adjacency matrix is ​​used to represent a directed relationship of fund transactions between transaction users, a node in the transaction directed graph is used to represent a transaction user, and the transaction users include a target user and a user who has fund transactions with the target user, an edge in the transaction directed graph is used to represent the fund transaction relationship between the transaction users, and the transaction time series data includes a transaction time series data according to the transaction time series data. multiple transaction records arranged in time; inputting the adjacency matrix into a pre-trained graph attention neural network model, obtaining an intermediate matrix based on the output of the graph attention neural network model, the intermediate matrix including elements representing users with capital outflow and elements representing users with capital inflow; transforming the transaction time series data based on the intermediate matrix, and inputting multiple vectors obtained after the transformation into a pre-trained time series neural network model, each vector including elements representing users with capital outflow, elements representing users with capital inflow, elements representing transaction time differences and elements representing transaction amount ratios, the time series neural network model outputs indication information, the indication information is used to indicate whether there is capital reflux for the target user.

[0116] In one embodiment of the present application, a pre-trained graph attention neural network model includes a first graph attention neural network model and a second graph attention neural network model, and the processor further implements the following steps when executing the computer program: inputting an adjacency matrix and a preset original matrix into the first graph attention neural network model, obtaining a first matrix based on the output of the first graph attention neural network model, the first matrix being a matrix obtained by iterating according to the outflow direction of funds, and the first matrix including elements representing the first candidate funds outflow user and elements representing the first candidate funds inflow user; transposing the adjacency matrix, inputting the transposed adjacency matrix and the preset original matrix into the second graph attention neural network model, obtaining a second matrix based on the output of the second graph attention neural network model, the second matrix being a matrix obtained by iterating according to the inflow direction of funds, and the second matrix including elements representing the second candidate funds outflow user and elements representing the second candidate funds inflow user.

[0117] In one embodiment of the present application, the processor also implements the following steps when executing the computer program: concatenating the first matrix and the second matrix, the concatenating process is used to delete the row vectors corresponding to the directed relationship between the first candidate fund outflow user, the first candidate fund inflow user, the second candidate fund outflow user and the second candidate fund inflow user in which the fund transactions cannot form a closed loop, and reorganize the retained row vectors to obtain an intermediate matrix, wherein the intermediate matrix includes elements representing the fund inflow users and elements representing the fund outflow users, and the directed relationship between the fund inflow users and the fund outflow users is a closed loop.

[0118] In one embodiment of the present application, the transaction record includes users with outflow of funds, users with inflow of funds, transaction time difference and transaction amount ratio, wherein the transaction time difference is the difference between the current transaction time and the previous transaction time, and the transaction amount ratio is the ratio of the transaction amount of the current transaction to the transaction amount of the initial transaction. When the processor executes the computer program, it also implements the following steps: using the elements representing the users with inflow of funds and the elements representing the users with outflow of funds included in the intermediate matrix, the users with outflow of funds and the users with inflow of funds in each transaction record in the transaction time series data are replaced respectively; for each transaction record, after the replacement process, the data in the transaction record is spliced ​​to obtain a transaction record vector; and each transaction record vector is spliced ​​to obtain multiple vectors after transformation.

[0119] In one embodiment of the present application, the processor also implements the following steps when executing the computer program: using the attention mechanism to perform weighted sum processing on the vector output by the time series neural network model to obtain a weighted summed vector, the weighted summed vector includes elements representing the characteristics of users with capital outflows, elements representing the characteristics of users with capital inflows, elements representing the characteristics of transaction time differences, and elements representing the characteristics of transaction amount ratios; performing linear change processing on the weighted summed vector to obtain a two-dimensional vector, the elements in the two-dimensional vector are used to represent the probability of capital reflux for the target user; and determining whether the target user has capital reflux based on the two-dimensional vector.

[0120] In one embodiment of the present application, the processor also implements the following steps when executing the computer program: obtaining a training sample set, the training sample set including transaction data corresponding to the sample user and a label corresponding to the sample user, the label being used to indicate whether there is capital reflux for the sample user; using the training sample set to train the initial graph attention neural network model and the initial time series neural network model until a preset loss function converges to obtain a graph attention neural network model and a time series neural network model.

[0121] The computer device provided in the embodiment of the present application has similar implementation principles and technical effects to those of the above-mentioned method embodiment, and will not be described in detail here.

[0122] In one embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining transaction data corresponding to a target user to be subjected to fund reflux detection, and obtaining transaction time series data and an adjacency matrix of a transaction directed graph based on the transaction data, wherein each element in the adjacency matrix is ​​used to represent a directed relationship of fund transactions between transaction users, a node in the transaction directed graph is used to represent a transaction user, and the transaction user includes a target user and a user having fund transactions with the target user, an edge in the transaction directed graph is used to represent the fund transaction relationship between the transaction users, and the transaction time series data includes a plurality of nodes arranged according to transaction time. multiple transaction records; the adjacency matrix is ​​input into a pre-trained graph attention neural network model, and an intermediate matrix is ​​obtained based on the output of the graph attention neural network model, wherein the intermediate matrix includes elements representing users with outflow of funds and elements representing users with inflow of funds; the transaction time series data is transformed based on the intermediate matrix, and multiple vectors obtained after the transformation are input into a pre-trained time series neural network model, wherein each vector includes elements representing users with outflow of funds, elements representing users with inflow of funds, elements representing transaction time differences, and elements representing transaction amount ratios, and the time series neural network model outputs indication information, and the indication information is used to indicate whether there is capital reflux for the target user.

[0123] In one embodiment of the present application, a pre-trained graph attention neural network model includes a first graph attention neural network model and a second graph attention neural network model, and the computer program, when executed by a processor, further implements the following steps: inputting an adjacency matrix and a preset original matrix into the first graph attention neural network model, obtaining a first matrix based on the output of the first graph attention neural network model, the first matrix being a matrix obtained by iterating according to the outflow direction of funds, and the first matrix including elements representing the first candidate funds outflow user and elements representing the first candidate funds inflow user; transposing the adjacency matrix, inputting the transposed adjacency matrix and the preset original matrix into the second graph attention neural network model, obtaining a second matrix based on the output of the second graph attention neural network model, the second matrix being a matrix obtained by iterating according to the inflow direction of funds, and the second matrix including elements representing the second candidate funds outflow user and elements representing the second candidate funds inflow user.

[0124] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: the first matrix and the second matrix are concatenated, and the concatenation process is used to delete the row vectors corresponding to the directed relationship between the first candidate fund outflow user, the first candidate fund inflow user, the second candidate fund outflow user and the second candidate fund inflow user in which the fund transactions cannot form a closed loop, and the retained row vectors are reorganized to obtain an intermediate matrix, wherein the intermediate matrix includes elements representing the fund inflow users and elements representing the fund outflow users, and the directed relationship between the fund inflow users and the fund outflow users is a closed loop.

[0125] In one embodiment of the present application, the transaction record includes users with outflow of funds, users with inflow of funds, transaction time difference and transaction amount ratio, wherein the transaction time difference is the difference between the current transaction time and the previous transaction time, and the transaction amount ratio is the ratio of the transaction amount of the current transaction to the transaction amount of the initial transaction. When the computer program is executed by the processor, the following steps are also implemented: using the elements representing the users with inflow of funds and the elements representing the users with outflow of funds included in the intermediate matrix, the users with outflow of funds and the users with inflow of funds in each transaction record in the transaction time series data are replaced respectively; for each transaction record, after the replacement process, the data in the transaction record is spliced ​​to obtain a transaction record vector; and each transaction record vector is spliced ​​to obtain multiple vectors after transformation.

[0126] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: using the attention mechanism to perform weighted sum processing on the vector output by the time series neural network model to obtain a weighted summed vector, the weighted summed vector includes elements representing the characteristics of users with capital outflows, elements representing the characteristics of users with capital inflows, elements representing the characteristics of transaction time differences, and elements representing the characteristics of transaction amount ratios; performing linear change processing on the weighted summed vector to obtain a two-dimensional vector, the elements in the two-dimensional vector are used to represent the probability of capital reflux for the target user; and determining whether the target user has capital reflux based on the two-dimensional vector.

[0127] In one embodiment of the present application, when the computer program is executed by a processor, the following steps are also implemented: obtaining a training sample set, the training sample set including transaction data corresponding to the sample user and a label corresponding to the sample user, the label being used to indicate whether there is capital reflux for the sample user; using the training sample set to train an initial graph attention neural network model and an initial time series neural network model until a preset loss function converges to obtain a graph attention neural network model and a time series neural network model.

[0128] The computer-readable storage medium provided in this embodiment has similar implementation principles and technical effects to those of the above method embodiments, and will not be described in detail here.

[0129] In one embodiment of the present application, a computer program product is provided, including a computer program, which, when executed by a processor, implements the following steps: obtaining transaction data corresponding to a target user to be subjected to fund reflux detection, and obtaining transaction time series data and an adjacency matrix of a transaction directed graph based on the transaction data, wherein each element in the adjacency matrix is ​​used to represent a directed relationship of fund transactions between transaction users, a node in the transaction directed graph is used to represent a transaction user, the transaction user includes a target user and a user having fund transactions with the target user, an edge in the transaction directed graph is used to represent the fund transaction relationship between the transaction users, and the transaction time series data includes multiple nodes arranged according to transaction time. transaction records; the adjacency matrix is ​​input into a pre-trained graph attention neural network model, and an intermediate matrix is ​​obtained based on the output of the graph attention neural network model, wherein the intermediate matrix includes elements representing users with capital outflow and elements representing users with capital inflow; the transaction time series data is transformed based on the intermediate matrix, and multiple vectors obtained after the transformation are input into a pre-trained time series neural network model, wherein each vector includes elements representing users with capital outflow, elements representing users with capital inflow, elements representing transaction time differences, and elements representing transaction amount ratios; the time series neural network model outputs indication information, and the indication information is used to indicate whether there is capital reflux for the target user.

[0130] In one embodiment of the present application, a pre-trained graph attention neural network model includes a first graph attention neural network model and a second graph attention neural network model, and the computer program, when executed by a processor, further implements the following steps: inputting an adjacency matrix and a preset original matrix into the first graph attention neural network model, obtaining a first matrix based on the output of the first graph attention neural network model, the first matrix being a matrix obtained by iterating according to the outflow direction of funds, and the first matrix including elements representing the first candidate funds outflow user and elements representing the first candidate funds inflow user; transposing the adjacency matrix, inputting the transposed adjacency matrix and the preset original matrix into the second graph attention neural network model, obtaining a second matrix based on the output of the second graph attention neural network model, the second matrix being a matrix obtained by iterating according to the inflow direction of funds, and the second matrix including elements representing the second candidate funds outflow user and elements representing the second candidate funds inflow user.

[0131] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: the first matrix and the second matrix are concatenated, and the concatenation process is used to delete the row vectors corresponding to the directed relationship between the first candidate fund outflow user, the first candidate fund inflow user, the second candidate fund outflow user and the second candidate fund inflow user in which the fund transactions cannot form a closed loop, and the retained row vectors are reorganized to obtain an intermediate matrix, wherein the intermediate matrix includes elements representing the fund inflow users and elements representing the fund outflow users, and the directed relationship between the fund inflow users and the fund outflow users is a closed loop.

[0132] In one embodiment of the present application, the transaction record includes users with outflow of funds, users with inflow of funds, transaction time difference and transaction amount ratio, wherein the transaction time difference is the difference between the current transaction time and the previous transaction time, and the transaction amount ratio is the ratio of the transaction amount of the current transaction to the transaction amount of the initial transaction. When the computer program is executed by the processor, the following steps are also implemented: using the elements representing the users with inflow of funds and the elements representing the users with outflow of funds included in the intermediate matrix, the users with outflow of funds and the users with inflow of funds in each transaction record in the transaction time series data are replaced respectively; for each transaction record, after the replacement process, the data in the transaction record is spliced ​​to obtain a transaction record vector; and each transaction record vector is spliced ​​to obtain multiple vectors after transformation.

[0133] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: using the attention mechanism to perform weighted sum processing on the vector output by the time series neural network model to obtain a weighted summed vector, the weighted summed vector includes elements representing the characteristics of users with capital outflows, elements representing the characteristics of users with capital inflows, elements representing the characteristics of transaction time differences, and elements representing the characteristics of transaction amount ratios; performing linear change processing on the weighted summed vector to obtain a two-dimensional vector, the elements in the two-dimensional vector are used to represent the probability of capital reflux for the target user; and determining whether the target user has capital reflux based on the two-dimensional vector.

[0134] In one embodiment of the present application, when the computer program is executed by a processor, the following steps are also implemented: obtaining a training sample set, the training sample set including transaction data corresponding to the sample user and a label corresponding to the sample user, the label being used to indicate whether there is capital reflux for the sample user; using the training sample set to train an initial graph attention neural network model and an initial time series neural network model until a preset loss function converges to obtain a graph attention neural network model and a time series neural network model.

[0135] The implementation principle and technical effects of the computer program product provided in this embodiment are similar to those of the above method embodiments and will not be described in detail here.

[0136] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0137] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0138] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for detecting capital reflux, characterized in that: The method comprises: Acquire transaction data corresponding to the target user to be tested for capital reflux, and acquire transaction time series data and an adjacency matrix of a directed transaction graph according to the transaction data, wherein each element in the adjacency matrix is ​​used to represent the directed relationship of capital transactions between transaction users, and the nodes in the directed transaction graph are used to represent transaction users, wherein the transaction users include the target user and users who have capital transactions with the target user, and the edges in the directed transaction graph are used to represent the capital transaction relationship between the transaction users, and the transaction time series data includes a plurality of transaction records arranged according to transaction time; Inputting the adjacency matrix into a pre-trained graph attention neural network model, and obtaining an intermediate matrix based on the output of the graph attention neural network model, wherein the intermediate matrix includes elements representing users with outflow of funds and elements representing users with inflow of funds; The transaction time series data is transformed based on the intermediate matrix, and multiple vectors obtained after the transformation are input into a pre-trained time series neural network model, each of the vectors includes an element representing a user with outflow of funds, an element representing a user with inflow of funds, an element representing a transaction time difference, and an element representing a transaction amount ratio, and the time series neural network model outputs indication information, and the indication information is used to indicate whether the target user has a capital reflux; The pre-trained graph attention neural network model includes a first graph attention neural network model and a second graph attention neural network model, and the inputting the adjacency matrix into the pre-trained graph attention neural network model includes: Inputting the adjacency matrix and the preset original matrix into the first graph attention neural network model, obtaining a first matrix based on the output of the first graph attention neural network model, wherein the first matrix is ​​a matrix obtained by iterating according to the outflow direction of capital transactions, and the first matrix includes elements representing the first candidate capital outflow user and elements representing the first candidate capital inflow user; Transpose the adjacency matrix, input the transposed adjacency matrix and the preset original matrix into the second graph attention neural network model, and obtain a second matrix based on the output of the second graph attention neural network model, wherein the second matrix is ​​a matrix obtained by iterating according to the inflow direction of capital transactions, and the second matrix includes elements representing the second candidate capital outflow user and elements representing the second candidate capital inflow user; The intermediate matrix is ​​obtained based on the output of the graph attention neural network model, including: The first matrix and the second matrix are concatenated, and the concatenation process is used to delete the row vectors corresponding to the directed relationship between the first candidate fund outflow user, the first candidate fund inflow user, the second candidate fund outflow user and the second candidate fund inflow user in which the fund transactions cannot form a closed loop, and reorganize the retained row vectors to obtain the intermediate matrix, wherein the intermediate matrix includes elements representing the fund inflow users and elements representing the fund outflow users, and the directed relationship between the fund inflow users and the fund outflow users is a closed loop.

2. The method according to claim 1, characterized in that The transaction record includes a user with outflow of funds, a user with inflow of funds, a transaction time difference, and a transaction amount ratio, wherein the transaction time difference is the difference between the current transaction time and the previous transaction time, and the transaction amount ratio is the ratio of the transaction amount of the current transaction to the transaction amount of the initial transaction. The conversion processing of the transaction time series data based on the intermediate matrix includes: Using the elements representing the users with inflow of funds and the elements representing the users with outflow of funds included in the intermediate matrix, respectively performing replacement processing on the users with outflow of funds and the users with inflow of funds in each of the transaction records in the transaction time series data; For each of the transaction records, after the replacement process, the data in the transaction record are concatenated to obtain a transaction record vector; The transaction record vectors are concatenated to obtain a plurality of transformed vectors.

3. The method according to claim 1 or 2, characterized in that: The temporal neural network model outputs indication information, and the indication information is used to indicate whether the target user has capital reflux, including: Performing weighted sum processing on the vector output by the time series neural network model by using an attention mechanism to obtain a weighted summed vector, wherein the weighted summed vector includes elements representing user characteristics of capital outflow, elements representing user characteristics of capital inflow, elements representing transaction time difference characteristics, and elements representing transaction amount ratio characteristics; Performing linear transformation processing on the weighted summed vector to obtain a two-dimensional vector, wherein the elements in the two-dimensional vector are used to represent the probability of fund reflux of the target user; It is determined whether there is capital reflux of the target user according to the two-dimensional vector.

4. The method according to claim 1, characterized in that: The training process of the graph attention neural network model and the temporal neural network model includes: Acquire a training sample set, the training sample set including transaction data corresponding to a sample user and a label corresponding to the sample user, the label being used to indicate whether the sample user has capital reflow; The initial graph attention neural network model and the initial time series neural network model are trained using the training sample set until a preset loss function converges to obtain the graph attention neural network model and the time series neural network model.

5. A capital reflux detection device, characterized in that: The device comprises: A first acquisition module is used to acquire transaction data corresponding to a target user to be subjected to fund reflux detection, and acquire transaction time series data and an adjacency matrix of a transaction directed graph according to the transaction data, wherein each element in the adjacency matrix is ​​used to represent a directed relationship of fund transactions between transaction users, a node in the transaction directed graph is used to represent a transaction user, the transaction user includes the target user and a user having fund transactions with the target user, an edge in the transaction directed graph is used to represent the fund transaction relationship between the transaction users, and the transaction time series data includes a plurality of transaction records arranged according to transaction time; A second acquisition module is used to input the adjacency matrix into a pre-trained graph attention neural network model, and obtain an intermediate matrix based on the output of the graph attention neural network model, wherein the intermediate matrix includes elements representing users with outflow of funds and elements representing users with inflow of funds; A determination module, configured to transform the transaction time series data based on the intermediate matrix, and input multiple vectors obtained after the transformation into a pre-trained time series neural network model, wherein each of the vectors includes an element representing a user with capital outflow, an element representing a user with capital inflow, an element representing a transaction time difference, and an element representing a transaction amount ratio, and the time series neural network model outputs indication information, wherein the indication information is used to indicate whether the target user has capital reflux; The pre-trained graph attention neural network model includes a first graph attention neural network model and a second graph attention neural network model. The second acquisition module is specifically used to input the adjacency matrix and the preset original matrix into the first graph attention neural network model, and obtain a first matrix based on the output of the first graph attention neural network model. The first matrix is ​​a matrix obtained by iterating according to the outflow direction of capital transactions, and the first matrix includes elements representing the first candidate capital outflow user and elements representing the first candidate capital inflow user; the adjacency matrix is ​​transposed, and the transposed adjacency matrix and the preset original matrix are input into the second graph attention neural network model, and the second matrix is ​​obtained based on the output of the second graph attention neural network model. , the second matrix is ​​a matrix obtained by iterating according to the inflow direction of fund transactions, and the second matrix includes elements representing the second candidate fund outflow users and elements representing the second candidate fund inflow users; the first matrix and the second matrix are spliced, and the splicing process is used to delete the row vectors corresponding to the directed relationship between the first candidate fund outflow user, the first candidate fund inflow user, the second candidate fund outflow user and the second candidate fund inflow user that cannot form a closed loop, and reorganize the retained row vectors to obtain the intermediate matrix, and the intermediate matrix includes elements representing the fund inflow users and elements representing the fund outflow users, and the directed relationship between the fund inflow users and the fund outflow users is a closed loop.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Fund return identification method, device and equipment

    CN112613986A

  • Risk detection method and device for transaction data and server

    CN113450215A