Transaction tracking method and device based on transaction relation graph

By dynamically splitting directed edges in the transaction relationship graph and matching upstream and downstream funds in real time, the problem of long-term dependence relationship in transaction graph traversal calculation is solved, which significantly improves the computing efficiency.

CN119444224AActive Publication Date: 2025-02-14ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411444183.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-02-14
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

During the traversal calculation process of the transaction relationship graph, there is a long-term dependency relationship, which leads to inefficient calculations and cannot be effectively applied to large-scale capital transaction calculations.

Method used

By dynamically splitting directed edges in the transaction relationship graph, upstream funds are matched in real time with downstream funds, and dynamically splitting fund transactions when necessary according to the matching results, thereby eliminating the long dependency relationship.

Benefits of technology

It effectively solves the problem of long-term dependence of funds in transaction graph traversal calculation, improves the utilization rate of computing resources, shortens the time-consuming calculation of the whole graph, and improves the efficiency of transaction graph calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444224A_ABST
    Figure CN119444224A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a transaction relation graph-based transaction tracking method, which comprises multiple rounds of graph iterative computation, any round of iteration not in the first round comprises the following steps: determining a node pointed by a first directed edge for target processing in the last round of iteration as a target node, and the target processing comprises the following steps: determining the node pointed by a second directed edge for target processing in the last round of iteration as a target node; and transmitting the transaction information on the edge to the pointing node along the edge. For a plurality of first outgoing edges which are not subjected to target processing on the target node, first outgoing edge processing is carried out, and the first outgoing edge processing comprises the steps of determining at least one outgoing edge, enabling the sum of transaction amounts of the outgoing edges to correspond to a first transaction amount of the first directed edge, and carrying out target processing on the at least one outgoing edge; wherein the at least one outgoing edge comprises at least one of the plurality of first outgoing edges and / or a sub-edge obtained by splitting based on a target outgoing edge in the plurality of first outgoing edges; wherein the remaining outgoing edges, except the sub-edges, generated by splitting the target outgoing edge are kept in a state without target processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of graph computing, and in particular, to a method and device for tracking transactions based on a transaction relationship graph. Background Art

[0002] With the development of computer technology and the rapid popularization of e-commerce, online transactions have become an indispensable part of people's daily lives. As the base system supporting online transactions, the payment system generates massive amounts of capital transactions every day. These capital transactions link users, merchants, financial institutions and other transaction objects, reflecting the complex transaction relationships between massive transaction objects.

[0003] By abstractly modeling a large number of fund transactions, a transaction relationship graph can be constructed. Iterative calculation and analysis of the transaction relationship graph and tracking of the fund transaction chain can play an important reference role in resolving business risks, combating illegal and gray production activities, analyzing the intentions of transaction objects, and controlling fund risks, and has great mining and analysis value.

[0004] Therefore, we hope to have a solution that can efficiently analyze the transaction relationship graph and track transactions through technical means. Summary of the invention

[0005] One or more embodiments of the present specification describe a method and device for transaction tracking based on a transaction relationship graph. In a transaction relationship graph containing massive financial transaction information, financial transactions with upstream financial dependencies are dynamically split to resolve long dependencies in the financial transaction tracking calculation process, thereby improving the analysis efficiency of the transaction relationship graph.

[0006] According to a first aspect, a method for tracing transactions based on a transaction relationship graph is provided, wherein the transaction relationship graph includes nodes representing transaction objects and directed edges representing transactions between the nodes, and the method includes multiple rounds of graph iteration calculations, wherein any round of iteration other than the first round includes:

[0007] The node pointed to by the first directed edge that performs target processing in the previous iteration is determined as the target node, wherein the target processing includes transmitting the transaction information on the edge along the edge to the pointed node.

[0008] For several first outgoing edges on the target node that have not yet undergone the target processing, first outgoing edge processing is performed, and the first outgoing edge processing includes determining at least one outgoing edge so that the sum of its transaction amounts corresponds to the first transaction amount of the first directed edge, and performing target processing on the at least one outgoing edge; wherein the at least one outgoing edge includes at least one of the several first outgoing edges, and / or a sub-edge obtained by splitting a target outgoing edge among the several first outgoing edges; and wherein the remaining outgoing edges generated by the splitting of the target outgoing edge, except the sub-edges, remain in a state of not undergoing target processing.

[0009] According to one implementation, the arbitrary round iteration further includes:

[0010] After the first outgoing edge processing, a first judgment is performed on the target node. If there is no incoming edge that has not been subjected to the target processing, and there is a second outgoing edge that has not been subjected to the target processing, the target processing is directly performed on the second outgoing edge.

[0011] According to one implementation, the arbitrary round iteration further includes:

[0012] If the target node has a third outgoing edge, and the transaction time corresponding to the third outgoing edge is earlier than all incoming edges on the target node that have not yet been subjected to target processing, the target processing is directly performed on the third outgoing edge.

[0013] According to one implementation, the first round of iterations includes:

[0014] In the transaction relationship graph, several starting nodes are determined, and the starting nodes do not contain incoming edges. The target processing is performed on the outgoing edges of any starting nodes.

[0015] According to one implementation, the target processing further includes: recording the source of the transaction information.

[0016] According to an implementation, the first outgoing edge satisfies a first condition, and the first condition includes: a first transaction time corresponding to the first outgoing edge is later than a second transaction time corresponding to the first directed edge.

[0017] In one scenario of the above implementation, the first condition also includes: a time difference between the first transaction time and the second transaction time is less than a first time threshold.

[0018] According to an implementation manner, the plurality of first outgoing edges is a single outgoing edge; and the determining at least one outgoing edge includes:

[0019] If the second transaction amount corresponding to the single outgoing edge is greater than the first transaction amount, the single outgoing edge is taken as the target outgoing edge and split into a sub-edge and a remaining outgoing edge, the transaction amount of the sub-edge is the first transaction amount, and the transaction amount corresponding to the remaining outgoing edge is the difference between the second transaction amount and the first transaction amount.

[0020] According to an implementation manner, the plurality of first outgoing edges are a plurality of first outgoing edges; and the determining at least one outgoing edge comprises:

[0021] A plurality of selected out-edges and the target out-edge are determined from the plurality of first out-edges, and the target out-edge is split into sub-edges and remaining out-edges, wherein the sum of transaction amounts of the plurality of selected out-edges is a third transaction amount, the transaction amount of the sub-edges is a fourth transaction amount, the sum of the third transaction amount and the fourth transaction amount is the first transaction amount, and the transaction amount corresponding to the remaining out-edges is a difference between an original transaction amount of the target out-edge and the fourth transaction amount.

[0022] According to an implementation, the determining of at least one outgoing edge includes: determining the at least one outgoing edge from the plurality of first outgoing edges based on a first sorting; the first sorting is sorting according to transaction times corresponding to the first outgoing edges.

[0023] According to an implementation, the determining of at least one outgoing edge includes: determining the at least one outgoing edge from the plurality of first outgoing edges based on a second sorting; the second sorting is sorting according to transaction amounts corresponding to the first outgoing edges.

[0024] According to a second aspect, a device for tracking transactions based on a transaction relationship graph is provided, wherein the transaction relationship graph includes nodes representing transaction objects and directed edges representing transactions between the nodes, and the device is used to perform any round of iteration other than the first round in multiple rounds of graph iterative calculations, and the device includes:

[0025] The determination module is configured to determine the node pointed to by the first directed edge that performs target processing in the previous iteration as the target node, wherein the target processing includes transmitting the transaction information on the edge along the edge to the pointed node.

[0026] A processing module is configured to perform first outgoing edge processing on a plurality of first outgoing edges on the target node that have not yet undergone the target processing, wherein the first outgoing edge processing includes determining at least one outgoing edge so that the sum of its transaction amounts corresponds to the first transaction amount of the first directed edge, and performing target processing on the at least one outgoing edge; wherein the at least one outgoing edge includes at least one of the plurality of first outgoing edges, and / or a sub-edge obtained by splitting a target outgoing edge among the plurality of first outgoing edges; wherein the remaining outgoing edges generated by the splitting of the target outgoing edge, except the sub-edges, remain in a state of not undergoing target processing.

[0027] According to a third aspect, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method described in the first aspect.

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

[0029] By implementing the method and device provided in the embodiments of this specification, it is possible to match upstream funds with downstream funds in real time during the process of traversing and calculating the transaction relationship graph, and dynamically split the fund transaction when necessary based on the matching results. The application of real-time fund transaction matching and dynamic fund transaction splitting technology can effectively solve the problem of long-term fund dependency in the process of traversing and calculating the transaction relationship graph, improve the utilization rate of computing resources, reduce long-tail dependency calculations, thereby significantly shortening the time consumption of full-graph calculations, improving the efficiency of transaction relationship graph calculations, and expanding its scope of application. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0031] Figure 1 This is an example of a transaction relationship graph structure disclosed in the embodiments of this specification;

[0032] Figure 2 An example of a transaction relationship diagram is provided for the embodiments of this specification;

[0033] Figure 3A Provides an example transaction object and related fund transaction subgraph;

[0034] Figure 3B Provides an example transaction object and related fund transaction subgraph;

[0035] Figure 4 A flowchart of a method for tracking transactions based on a transaction relationship graph provided according to an embodiment of this specification;

[0036] Figure 5 Several examples of starting node determination are provided;

[0037] Fig. 6A This is an illustration of a scenario of determining an outgoing edge in the first outgoing edge processing according to an embodiment of this specification;

[0038] Figure 6B This is an illustration of a scenario of determining an outgoing edge in the first outgoing edge processing according to an embodiment of this specification;

[0039] Figure 6C This is an illustration of a rule scenario for determining an outgoing edge in the first outgoing edge processing according to an embodiment of this specification;

[0040] Fig.6D This is an illustration of a scenario of determining a first outgoing edge according to an embodiment of this specification;

[0041] Figure 7 A schematic diagram of a device for tracking transactions based on a transaction relationship graph according to an embodiment of this specification. DETAILED DESCRIPTION

[0042] The solution provided by the embodiments of this specification is described below in conjunction with the accompanying drawings.

[0043] As mentioned above, the transaction relationship graph is a directed graph obtained by abstractly modeling a large number of fund transactions. In it, nodes can represent transaction objects, which can be users, merchants, financial institutions, etc. These transaction objects can be identified by some form of account (for example, ID in electronic payment system, bank card number, etc.), and directed edges can represent fund transactions between nodes. In other words, the transaction objects can be abstracted as nodes in the directed graph, and the fund transactions can be abstracted as directed edges in the directed graph. The corresponding transaction information (for example, transaction amount, transaction time, transaction scene, etc.) is loaded on the corresponding directed edges as edge attribute information, thereby constructing a transaction relationship graph.

[0044] In real business scenarios, as capital transactions occur, funds flow between multiple transaction objects. In order to identify business risks in massive capital transactions, the transaction relationship graph can be iterated and calculated to track capital transactions.

[0045] Figure 1A sample transaction relationship graph architecture is provided, where nodes A, B, C, and D represent the transaction objects in the transaction. A directed edge represents a capital transaction, and the source node it connects to is the initiator of the transaction, and the node it points to is the counterparty or receiver of the transaction. The directed edge carries the transaction information of the corresponding capital transaction, for example, transaction scenario: transfer, transaction amount: ¥100, transaction time: 2024.01.0115:00. In addition, the transaction relationship graph can also be interpreted from the perspective of capital relations. Taking transaction object B as an example, B's downstream capital transactions include "spending ¥50 on transaction object C" and "sending a red envelope of ¥50 to transaction object D", and the corresponding upstream funds are "transferring ¥100 from A to B". Based on the transaction relationship graph, traversing along the directed edges can obtain capital turnover records and complete transaction tracking. The extracted transaction features such as capital flow path, capital stay time, and capital source can assist in analysis in downstream tasks, and provide important references in resolving business risks, combating black and gray production activities, analyzing the intentions of transaction objects, and controlling capital risks.

[0046] In one scenario, the transaction relationship graph can be distributed and stored in different computing devices through graph partitioning techniques (e.g., point partitioning, edge partitioning, etc.). Figure 1 , the dotted line indicates the device where the node is located. Nodes A and B in the figure are stored in device DA, and nodes C and D are stored in device DB. When performing graph iterative calculations, device DA and device DB can communicate with each other and use distributed graph computing technology (for example, BSP model, Pregel framework, etc.) to complete the traversal calculation of the transaction relationship graph. In practice, according to specific business needs and combined with the characteristics of the transaction relationship graph, different nodes / directed edges can be stored in one computing device or in multiple storage devices. Figure 1 Just an example.

[0047] It should be understood that in the following text and in the description of the embodiments, for the sake of simplicity, for the transaction information in the transaction relationship diagram, the transaction time is expressed in natural days in the form of D+n, where D represents the base transaction date of the transaction relationship diagram, and n represents the nth natural day after the base transaction date. For example, assuming that D is January 1, 2024, then D+1 represents January 2, 2024, D+2 represents January 3, 2024, and so on. The transaction amount is simplified to an integer. The simplified expression does not represent a limitation on the embodiments. In actual applications, according to business requirements and computing power, the transaction time in the payment system can usually be accurate to milliseconds or even microseconds; the transaction amount can usually be processed by a carry algorithm to retain two decimal places.

[0048] Due to the massive amount of fund transactions in the payment system, the transaction relationship graph constructed based on the abstract modeling of these transactions often also includes a massive amount of directed edges and nodes. Obviously, transaction tracking on a transaction relationship graph of such a scale will inevitably lead to the inability to focus the graph traversal calculation, waste computing resources, and reduce computing efficiency. Therefore, the transaction relationship graph that includes fund transactions within a period of time can be used as the target for transaction tracking. The transaction relationship graph can be a subgraph extracted from the total transaction relationship graph that includes all fund transactions. For example, it can be an incremental transaction relationship graph composed of fund transactions that occurred within nearly 6 months based on transaction time; it can also be a transaction relationship graph obtained by composing a graph centered on a certain node to be analyzed, or some fund transactions to be analyzed. See Figure 2 , the accompanying figure provides an example transaction relationship diagram, which is extracted from the total transaction relationship diagram and includes capital transactions between 14 transaction objects in the past 5 natural days (D+0 to D+4).

[0049] In order to achieve transaction tracking, in a related technology, the transaction relationship graph can be traversed and calculated along the directed edges according to the upstream and downstream fund dependencies of the fund transaction, which includes multiple rounds of graph iteration calculations, and each round of iteration is a superstep. In each superstep, there are several directed edges that meet the calculation conditions to trigger edge calculations, and the calculation conditions are that the upstream funds on which the directed edge depends have been calculated and transferred to the source node of the directed edge. Edge calculation is to process the transactions on the directed edges and pass the corresponding transaction information to the pointing node. In the transaction relationship graph, there are also some nodes that do not have incoming edges, that is, there is no upstream fund dependency, and these directed edges can be directly calculated as starting directed edges. The following example illustrates the calculation conditions involved in the related technology. In the following examples and the embodiments below, <source node, pointing node> represents a directed edge between two nodes, and the direction is from the source node to the pointing node; in some special cases, <source node, pointing node, amount> is used to distinguish and represent multiple directed edges between two nodes. This representation method briefly and clearly describes the financial transactions between nodes, which helps to better understand and apply the methods and devices disclosed in the embodiments of this specification.

[0050] Figure 3A In the example provided, a transaction object and a subgraph of related fund transactions are generated. Node A generates a fund transaction with node B, the amount of which is RMB 150, and node B generates a fund transaction with node C, the amount of which is RMB 150. In this example, the amounts of the two fund transactions are equal, so it can be seen that the upstream fund dependency of the funds spent by B on C is the RMB 150 spent by A on B. Therefore, the edge<B,C> The calculation condition is the edge<A,B> The edge calculation has been completed and ¥150 has been transferred to node B.

[0051] Figure 3B In another example, a transaction object and a related fund transaction subgraph are provided. Node A makes a fund transaction with node B, the amount is ¥50, node D makes a fund transaction with node B, the amount is ¥100, and node B makes a fund transaction with node C, the amount is ¥150. In this example, the amount of funds paid by B to C is equal to the sum of the amounts of funds received by B from A and D. Therefore, the upstream fund dependency of the funds paid by B to C is the ¥50 paid by A to B and the ¥100 paid by D to B. Therefore, the edge<B,C> The calculation condition is the edge<A,B> With edge<D,B> The edge calculations have been completed.

[0052] Next, Figure 2 Taking the transaction relationship diagram shown as an example, applying the calculation ideas of the above-mentioned related technologies, and tracking transactions based on the transaction relationship diagram in the attached figure, supersteps as shown in Table 1 below will be generated.

[0053] Table 1 Transaction relationship diagram calculation example

[0054]

[0055]

[0056] By applying this calculation method, the full graph calculation of the transaction relationship graph can be completed after 7 rounds of iterations. Node S and node O do not have outgoing edges (i.e., fund expenditure transactions), so as the terminal node, a total of ¥950 of funds are received, and the directed edges calculated during the graph calculation process completely record the transaction chain of these funds. The inventor found that in this calculation process, each round of iteration is based on strong dependence and strong waiting on upstream funds, and the directed edges are strictly conducted and calculated in sequence according to the transaction sequence. Therefore, there are some inefficient waiting. For example, node C receives ¥500 of funds from nodes D and E in superstep 1. However, because the expenditure transaction amount of node C is ¥950, it is necessary to wait for the remaining upstream funds ¥450 to be calculated before processing this expenditure transaction, which also leads to the expenditure transaction directed edge of node C being calculated until superstep 4. Obviously, this inefficient waiting will become more and more serious as the transaction chain lengthens, greatly reducing the efficiency of graph calculation, so that transaction tracking based on the transaction relationship graph cannot be applied to large-scale fund transaction calculation.

[0057] In order to solve the above problems, a method and device for transaction tracking based on a transaction relationship graph are proposed in the embodiments of this specification. During the graph calculation process, directed edges can be dynamically split, and the global strong dependency that triggers the directed edge calculation can be resolved into local dependencies. Fund matching calculations can be performed on the split directed edges in real time, thereby reducing local dependencies, reducing waiting, and improving graph calculation efficiency.

[0058] Following the above technical ideas. Figure 4 In FIG. 1 , a flow chart of a method for tracking transactions based on a transaction relationship graph according to an embodiment of the present specification is shown. It can be understood that the method can be executed by any device, equipment, platform, or device cluster with computing and processing capabilities. Figure 4 In this embodiment, the transaction relationship graph includes nodes representing transaction objects and directed edges representing transactions between nodes. The method includes multiple rounds of graph iterative calculations, wherein:

[0059] The first round of iteration includes at least step S401: in the transaction relationship graph, determine a number of starting nodes, the starting nodes do not contain incoming edges; perform target processing on the outgoing edges of any starting nodes. The target processing includes transferring the transaction information on the edge along the edge to the pointed node, which corresponds to the aforementioned edge calculation.

[0060] Any iteration round other than the first round includes at least the following steps: Step S403: Determine the node pointed to by the first directed edge that has been subjected to target processing in the previous iteration as the target node, wherein the target processing includes transferring the transaction information on the edge along the edge to the pointed node. Step S405: Perform first outgoing edge processing on a number of first outgoing edges on the target node that have not yet been subjected to the target processing, wherein the first outgoing edge processing includes determining at least one outgoing edge so that the sum of its transaction amounts corresponds to the first transaction amount of the first directed edge, and performing target processing on the at least one outgoing edge; wherein the at least one outgoing edge includes at least one of the several first outgoing edges, and / or a sub-edge obtained by splitting a target outgoing edge among the several first outgoing edges; wherein the remaining outgoing edges except the sub-edges generated by the splitting of the target outgoing edge remain in a state of not being subjected to target processing.

[0061] The specific implementation methods of the above steps will be described in detail below with reference to the accompanying drawings.

[0062] First, the atomization method used multiple times in the process is briefly explained.

[0063] Target processing: The transaction information on the edge is transmitted to the node along the edge. Transaction information refers to business information related to the transaction, including but not limited to the transaction amount, transaction time, and transaction scenario. Let's take an example to explain target processing: A transaction occurs between node A and node B. The transaction is initiated by node A and node B is the recipient. There will be a directed edge between the two nodes.<A,B> Indicates that the transaction performs target processing on this directed edge, indicating that the edge<A,B> The transaction information of the corresponding fund transaction is transmitted to the pointing node B. In some embodiments, the target processing also includes recording the source of the transaction information.<A,B> When performing target processing, the funding source node A is recorded in the register, so that a complete list of funding transaction initiators can be obtained after the transaction relationship graph is processed.

[0064] First outgoing edge processing: determine at least one outgoing edge so that the sum of its transaction amounts corresponds to the transaction amount of the target incoming edge, and perform target processing on the at least one outgoing edge. For ease of understanding, assuming that node B is the target node, in a nutshell, the first outgoing edge processing is: for node B, based on the transaction amount, target processing is performed on the outgoing edge that matches the target incoming edge. In one example, the transaction amount corresponding to an outgoing edge of node B is equal to the transaction amount of the target incoming edge, then the outgoing edge is subjected to target processing. In another example, the sum of the transaction amounts corresponding to multiple outgoing edges of node B is equal to the transaction amount of the target incoming edge, then these multiple outgoing edges need to be subjected to target processing separately. In specific applications, there are a variety of situations for the matching determination of outgoing edges, and different matching strategies need to be formulated according to specific scenarios. A detailed explanation will be given below and will not be expanded here.

[0065] Then, yes Figure 4 The method flow shown in the figure is used for a framework introduction. In the transaction tracking based on the transaction relationship graph, all processed directed edges are recorded by traversing the transaction relationship graph, so as to extract the flow tracking information of funds. The traversal of the transaction relationship graph includes multiple rounds of graph iterative calculations. The first round of iteration is the starting step. The directed edges without upstream fund dependency are found in the transaction relationship graph, and the directed edges are calculated to start the traversal of the transaction relationship graph. In the subsequent iterations except the first round of iteration, the calculation steps can be repeatedly executed until all directed edges in the transaction relationship graph have been calculated, or until the cutoff condition is reached.

[0066] Next, Figure 4 The method flow provided is described in detail.

[0067] For the first round of iteration, in step S401, in the transaction relationship graph, several starting nodes are determined, and the starting nodes do not contain incoming edges; and target processing is performed on the outgoing edges of any starting nodes.

[0068] As the initiating node of the fund transaction in the transaction tracking, the starting node needs to satisfy that the fund transaction it issues will not rely on any upstream funds. Therefore, a node without any incoming edges (i.e., incoming fund transactions) can be determined as the starting node. Figure 5 Several examples of starting node determination are provided. Referring to example No. 1 in the figure, node A has two outgoing edges, neither of which has been processed by the target, and it has no incoming edges. In other words, the two fund transactions corresponding to the two outgoing edges of node A do not have any upstream fund dependency, so node A can be determined as the starting node, and both outgoing edges of node A are processed by the target to complete the first round of iteration.

[0069] After the first round of iteration, several directed edges that have been processed by the target are generated. The nodes pointed to by these directed edges can be used as the processing targets of the next round of iteration. Based on the rules of the first outgoing edge processing, the fund transaction information is continuously transmitted to the next pointing node along the directed edge, and the subsequent multiple rounds of iterative processing are started until the transaction tracking task is completed. Next, taking any round of iteration other than the first round of iteration as an example, the embodiment of the specification is explained.

[0070] Step S403: determine the node pointed to by the first directed edge that performs target processing in the previous iteration as the target node.

[0071] In a single round of iteration, the first thing to determine is the target node to be processed in this round of iteration. The target node should be the node connected by the directed edge processed by the target in the previous round. For example, in the previous round, the edge<A,B> The target processing was carried out. In this round of iteration, the edge<A,B> For the first directed edge, the node B pointed to by the edge can be determined as the target node.

[0072] Next, in step S405, first outgoing edge processing is performed on a plurality of first outgoing edges on the target node that have not yet been subjected to target processing.

[0073] The first outgoing edge processing involved in this step has been introduced in the previous article and will not be repeated here. Combined with the technical concepts introduced above, it can be known that in the first outgoing edge processing, the at least one outgoing edge selected from the several first outgoing edges is closely related to the computational efficiency of the graph traversal. In order to improve the computational efficiency, it is necessary to select as many outgoing edges that meet the matching conditions as possible, perform targeted processing on them as early as possible, and pass the transaction information to the pointing node in the early iteration rounds, thereby alleviating the computational inefficiency caused by long dependencies in related technologies.

[0074] According to the embodiments of this specification, Fig. 6A The following provides an illustration of determining the at least one outgoing edge in different scenarios in the first outgoing edge processing. Each scenario will be described in detail below with reference to the accompanying drawings.

[0075] In an example, Fig. 6A As shown in the first scenario, in the current iteration round, the edge<A,B> In the previous iteration, the target processing was performed. This edge is the first directed edge, and the corresponding first transaction amount is ¥50. The node B it points to is the target node.<B,C> Without target processing, the corresponding transaction amount is ¥50, which is equal to the first transaction amount, so the at least one outgoing edge can be determined as an edge<B,C> , and perform target processing on this edge.

[0076] In another example, Fig. 6A As shown in the second scenario, the difference from the first scenario is that in the current iteration round, the outgoing edge of the target node B<B,C> The corresponding transaction amount is ¥30, which is less than the first transaction amount. However, since node B has only one outgoing edge, from the perspective of fund matching of fund transactions, the outgoing transaction part matches the incoming transaction, and the upstream fund dependency condition has been met. Therefore, the at least one outgoing edge can be determined as an edge.<B,C> , and perform target processing on this edge.

[0077] In another example, Fig. 6A As shown in the third scenario, the difference from the first scenario is that in the current iteration round, the outgoing edge of the target node B<B,C> The corresponding transaction amount is ¥80, which is greater than the first transaction amount.<B,C> The upstream funding dependency is not met and the target processing cannot be performed. However, in order to process the funding transaction as soon as possible and reduce long-term dependencies, the edge<B,C> Splitting is performed. Corresponding to this example, in a specific implementation, the plurality of first outgoing edges is a single outgoing edge; the determining of at least one outgoing edge includes: if the second transaction amount corresponding to the single outgoing edge is greater than the first transaction amount, the single outgoing edge is used as a target outgoing edge, and is split into a sub-edge and a remaining outgoing edge, the transaction amount of the sub-edge is the first transaction amount, and the transaction amount corresponding to the remaining outgoing edge is the difference between the second transaction amount and the first transaction amount.

[0078] That is to say, the edge<B,C> The sub-edge is split into a transaction amount of ¥50 (equal to the first transaction amount) and a remaining outgoing edge with a transaction amount of ¥30 (equal to the difference between the second transaction amount and the first transaction amount). The upstream fund dependency condition of the sub-edge has been met. In this way, the at least one outgoing edge can be determined as the sub-edge.<B,C,¥50> , perform target processing on the edge and convert the remaining outgoing edges<B,C,¥30> Keep the state of not processing the target. By splitting the edges, the global long dependency of the directed edges in the graph traversal is decomposed into local dependencies, and the sub-edges that have satisfied the upstream capital dependency are processed in advance, so as to reduce waiting and improve the efficiency of graph calculation.

[0079] In the above example, the scenario listed is that the target node has only one outgoing edge that has not been processed by the target. In actual applications, a transaction object usually has multiple inbound and outbound transactions. The following is an example of such a scenario.

[0080] Figure 6B The following is a schematic diagram of determining at least one outgoing edge from a combination of a plurality of first outgoing edges in the first outgoing edge processing. Next, various scenarios will be introduced in detail with reference to the accompanying drawings. It should be noted that, for the sake of brevity of description, in multiple examples, two or three outgoing edges are used as examples to introduce the scenarios, but this does not mean that the processing method is limited to the application scenario. In actual applications, the processing method is also applicable to scenarios where the target node has more outgoing edges.

[0081] In an example, Figure 6B As shown in the first scenario, in the current iteration round, the edge<A,B> In the previous iteration, the target processing was performed. This edge is the first directed edge, and the corresponding first transaction amount is ¥50. The node B it points to is the target node.<B,C,¥20> ,<B,C,¥30> Without target processing, the sum of the transaction amounts of the two outgoing edges is equal to the first transaction amount, so the at least one outgoing edge can be determined as an edge<B,C,¥20> and edge<B,C,¥30> , target processing is performed on the two edges respectively.

[0082] In another example, Figure 6B As shown in the second scenario, the difference from the first scenario is that in the current iteration round, the outgoing edge of the target node B that has not been processed by the target is<B,C,¥20> ,<B,C,¥10> The sum of the transaction amounts of the two outgoing edges is less than the first transaction amount. Since node B has no other outgoing edges that have not been processed by the target, from the perspective of fund matching of fund transactions, the outgoing transaction part matches the incoming transaction, and the upstream fund dependency condition has been met. Therefore, the at least one outgoing edge can be determined as an edge.<B,C,¥20> and edge<B,C,¥10> , target processing is performed on the two edges respectively.

[0083] In another example, Figure 6BAs shown in the third scenario, the difference from the first scenario is that in the current iteration round, the outgoing edge of the target node B that has not been processed by the target is<B,C,¥20> ,<B,C,¥70> Obviously<A,B> The first transaction amount cannot fully satisfy the upstream capital dependency of the outgoing edge on the target node B. In order to process the capital transaction as early as possible and reduce long dependencies, the outgoing edges on the target node B in this scenario that have not been processed by the target can be split and combined to correspond to the first transaction amount. In this example, according to a specific implementation, the several first outgoing edges are multiple first outgoing edges; the determining of at least one outgoing edge includes: determining several selected outgoing edges and the target outgoing edge from the multiple first outgoing edges, and splitting the target outgoing edge into sub-edges and remaining outgoing edges, wherein the sum of the transaction amounts of the several selected outgoing edges is the third transaction amount, the transaction amount of the sub-edge is the fourth transaction amount, the sum of the third transaction amount and the fourth transaction amount is the first transaction amount, and the transaction amount corresponding to the remaining outgoing edges is the difference between the original transaction amount of the target outgoing edge and the fourth transaction amount.

[0084] That is to say, first<B,C,¥20> Into the at least one outgoing edge, at this time, the portion of the first transaction amount that needs to be matched is ¥30, and then the edge<B,C,¥70> It is split into a sub-edge with a transaction amount of ¥30 and a remaining outgoing edge with a transaction amount of ¥40. The upstream fund dependency condition of the sub-edge has been met and can be included in the at least one outgoing edge.<B,C,¥20> and<B,C,¥30> Perform target processing and remove the remaining edges<B,C,¥40> Keep the state of not processing the target. In this way, by splitting the edge and combining it with other outgoing edges to correspond to the first transaction amount of the first directed edge, the global long dependency of the directed edge in the graph traversal is decomposed into local dependencies, and the sub-edges and other outgoing edges that have satisfied the upstream capital dependency are processed in advance, thereby reducing waiting and improving the efficiency of graph calculation.

[0085] Further, it should be understood that when there are multiple outgoing edges that can correspond to the first directed edge among the first outgoing edges of the target node that have not yet been processed, if there is no specific directed edge matching order, it will cause at least one outgoing edge determination method listed in the above examples to lack idempotence. Therefore, in some embodiments, the matching order rule applied in the determination process of the at least one outgoing edge is also provided. Figure 6C A scenario diagram of the matching order rule is provided, which will be introduced below based on the accompanying drawings and examples.

[0086] In one example, based on a first sorting, the at least one outgoing edge is determined from the plurality of first outgoing edges; the first sorting is sorting according to the transaction time corresponding to each first outgoing edge. Figure 6CAs shown in the first scene, the first directed edge<A,B> The corresponding first transaction amount is ¥50. In the first outgoing edge of the target node B, the edge<B,C> With edge<B,D> can all correspond to the first transaction amount. If sorted in ascending order by transaction time,<B,C> is determined as the at least one outgoing edge and is processed as a target.<B,D> is determined as the at least one outgoing edge and performs target processing.

[0087] In another example, based on a second sorting, the at least one outgoing edge is determined from the plurality of first outgoing edges; the second sorting is sorted according to the transaction amounts corresponding to the first outgoing edges. Figure 6C As shown in the second scenario, the first directed edge<A,B> The corresponding first transaction amount is ¥50. In the first outgoing edge of the target node B, the edge<B,C> ,side<B,D> With edge<B,E> can all correspond to the first transaction amount. If the order is sorted in positive order by transaction amount, the side<B,E> ,side<B,C> , and the edge<B,D> Split sub-edges<B,D,¥20> is determined as the at least one outgoing edge, and target processing is performed.<B,D> The remaining outgoing edges<B,D,¥10> If the transaction amount is sorted in reverse order, the side<B,D> With edge<B,C> is determined as the at least one outgoing edge, and target processing is performed.<B,E> The state where the target is not processed remains.

[0088] In another example, based on a first matching degree, the at least one outgoing edge is determined from the plurality of first outgoing edges; the first matching degree is used to indicate the degree of proximity between the transaction amount corresponding to the selected outgoing edge and the first transaction amount. Figure 6C As shown in the third scene, the first directed edge<A,B> The corresponding first transaction amount is ¥50. In the first outgoing edge of the target node B, the edge<B,C> With edge<B,D> can correspond to the first transaction amount.<B,C> The corresponding transaction amount differs from the first transaction amount by ¥20.<B,D> The corresponding transaction amount is ¥5 different from the first transaction amount.<B,C> is closer to the first transaction amount. If the order is sorted in positive order according to the degree of proximity, then the edge<B,C> , and the edge<B,D> Split sub-edges<B,D,¥20> is determined as the at least one outgoing edge, and target processing is performed.<B,D> The remaining outgoing edges<B,D,¥25> If the order is reversed according to the proximity, then the edge<B,D> , and the edge<B,C> Split sub-edges<B,C,¥5> is determined as the at least one outgoing edge, and target processing is performed.<B,C> The remaining outgoing edges<B,C,¥25> The target processing remains unperformed.

[0089] The above exemplary embodiments describe the determination method of the at least one outgoing edge under various rules. It should be noted that the above various rules can be cross-linked and used in combination to cope with more complex transaction relationship graph processing.

[0090] In the multiple examples provided above, it is explained how to determine at least one outgoing edge corresponding to the first directed edge in the graph iteration calculation. According to the elaboration of the at least one outgoing edge determination process in the embodiment, it can be understood that these outgoing edges are determined from all the first outgoing edges of the target node that have not been processed by the target. When the target node has multiple outgoing edges that have not been processed by the target, which outgoing edges can be determined as the first outgoing edges will affect the determination result of the at least one outgoing edge. Therefore, in some embodiments, the determination process of the first outgoing edge is also provided. An example will be given below to explain the determination process of the first outgoing edge.

[0091] In one example, the transaction time of the fund transaction represented by the outgoing edge should be later than the transaction time of the upstream transaction on which it depends. Therefore, the transaction sequence based on the transaction time can be considered, and the outgoing edge that satisfies the increasing transaction sequence can be selected from the outgoing edges of the target node as the first outgoing edge. That is, the first outgoing edge satisfies the first condition, which includes: the first transaction time corresponding to the first outgoing edge is later than the second transaction time corresponding to the first directed edge. Fig.6D As shown, the second transaction time corresponding to the first directed edge is D+2. Among the outgoing edges of the target node B, the outgoing edges that satisfy the increasing transaction timing are<B,C,¥20> and<B,C,¥70> , so the first outgoing edges that have not yet been processed by the target include edges<B,C,¥20> and edge<B,C,¥70> .

[0092] Furthermore, in a specific implementation of the above example, the first condition also includes: the time difference between the first transaction time and the second transaction time is less than a first time threshold. The first time threshold may be a maximum time difference value set according to the business scenario characteristics supported by the payment platform. For example, for financial services, the fund settlement cycle in the payment system may be 2 natural days, that is, for transactions with a time difference within 2 natural days, they can be considered to be related. Corresponding to this example, let's look at Figure 6C In the first scenario, it can be determined that the first outgoing edges that have not yet been processed by the target have only the edges<B,C,¥20> .

[0093] After introducing the non-first-round graph iteration calculation and the first outgoing edge processing in detail, we return to Figure 5, and then introduce the determination of the starting node in several special scenarios. As the graph iteration calculation proceeds, some nodes that can be regarded as meeting the starting node identification conditions will be generated in the transaction relationship graph. The capital transactions represented by some outgoing edges on such nodes do not have any upstream capital dependency. Therefore, such nodes can be regarded as the starting nodes, and the outgoing edges on them that do not have upstream capital dependency can be directly processed as targets to start transaction tracking.

[0094] In one scenario, after the first outgoing edge is processed, a first judgment is performed on the target node. If there is no incoming edge that has not been processed, and there is a second outgoing edge that has not been processed, the second outgoing edge is directly processed. Figure 5 As shown in the second scenario, in the current iteration round, the outgoing edge of the target node A<A,B> The target processing has been completed, and there is one outgoing edge that has not yet been processed.<A,C> , since all the incoming edges of node A have been processed to the target, it can be inferred that there is no edge in the transaction relationship graph.<A,C> In the current iteration, node A can be regarded as the starting node, and the outgoing edges of node A that do not have upstream funding dependencies are<A,C> Directly proceed to target processing.

[0095] In another scenario, if the target node has a third outgoing edge, and the transaction time corresponding to the third outgoing edge is earlier than all incoming edges on the target node that have not yet been processed, the target processing is directly performed on the third outgoing edge. Figure 5 As shown in the third scenario, unlike the second scenario, there is an incoming edge on the target node A that has not yet been processed. However, the transaction time of this incoming edge is D+3, which is later than the remaining outgoing edges on node A that have not been processed.<A,C> Based on the transaction timing rule, the incoming edge that is later than the outgoing transaction will not become an edge<A,C> That is to say, although in this scenario, the target node A has an incoming edge that has not been processed, the transaction time of all the incoming edges that have not been processed is later than the transaction time of the outgoing edges on node A that have not been processed. At this time, it can also be inferred that there is no upstream fund transaction corresponding to this outgoing edge in the transaction relationship graph. In the current iteration round, node A can be regarded as the starting node, and all outgoing edges on node A that meet the above conditions and have not been processed can be directly processed.

[0096] It should be understood that the above steps S403-S405 can be executed repeatedly. By executing multiple rounds of graph iterative calculations, the transaction relationship graph can be traversed, the fund transaction tracking record can be generated, the fund transaction chain can be tracked, and analysis references can be provided for downstream tasks.

[0097] Next, Figure 2Taking the transaction relationship graph shown in the figure as an example, applying the graph iteration calculation method introduced above, and performing transaction tracking based on the transaction relationship graph in the figure, the superstep shown in the following Table 2 will be generated.

[0098] Table 2 Transaction relationship diagram calculation example

[0099]

[0100] It can be seen that by applying the graph iteration calculation method provided in the embodiment of this specification, the full graph calculation of the transaction relationship graph can be completed after 5 rounds of iteration. Node S and node O do not have outgoing edges (i.e., fund expenditure transactions), so as the terminal node, a total of ¥950 of funds are received. The directed edges calculated during the graph calculation process fully record the transaction chain of these funds. On the premise of ensuring the correctness of the calculation results, the iterative calculation rounds of traversing the transaction relationship graph are reduced from 7 rounds to 5 rounds, which makes more efficient use of computing resources and reduces the time consumption of full graph calculation.

[0101] According to one or more embodiments, a method for tracking transactions based on a transaction relationship graph is described in detail above. By using the above method provided in the embodiments of this specification, in the process of traversing and calculating the transaction relationship graph j, upstream funds can be matched with downstream funds in real time, and according to the matching results, the fund transaction can be dynamically split when necessary. This effectively solves the problem of long-term fund dependency in the process of traversing and calculating the transaction relationship graph, and improves the efficiency of the transaction relationship graph calculation.

[0102] In this specification, the word "first" in terms such as the first outgoing edge and the first transaction amount, as well as the corresponding "second", "third" (if any), etc. in the text, are merely for the convenience of distinction and description and do not have any limiting meaning.

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

[0104] Figure 7 Schematic diagram of a device for tracking transactions based on a transaction relationship graph according to an embodiment of this specification. The device 700 is deployed in a computing device, which can be implemented by any device, equipment, platform, device cluster, etc. with computing and processing capabilities. Figure 4The transaction relationship graph includes nodes representing transaction objects and directed edges representing transactions between nodes, and the device is used to perform any round of iteration other than the first round in multiple rounds of graph iteration calculation, and the device 700 includes:

[0105] The determination module 701 is configured to determine the node pointed to by the first directed edge that performs target processing in the previous iteration as the target node, wherein the target processing includes transmitting the transaction information on the edge along the edge to the pointed node.

[0106] The processing module 702 is configured to perform first outgoing edge processing on several first outgoing edges on the target node that have not yet undergone the target processing, wherein the first outgoing edge processing includes determining at least one outgoing edge so that the sum of its transaction amounts corresponds to the first transaction amount of the first directed edge, and performing target processing on the at least one outgoing edge; wherein the at least one outgoing edge includes at least one of the several first outgoing edges, and / or a sub-edge obtained by splitting a target outgoing edge among the several first outgoing edges; wherein the remaining outgoing edges generated by the splitting of the target outgoing edge, except the sub-edge, remain in a state of not undergoing target processing.

[0107] According to another embodiment of the present specification, there is also provided a computer program product, including a computer program / instruction, which implements the aforementioned combination when executed by a processor. Figure 4 The steps of the method.

[0108] According to another embodiment, the present specification further provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the aforementioned combination is implemented. Figure 4 The steps of the method.

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

[0110] The specific implementation methods described above further describe the purpose, technical solutions and beneficial effects of the embodiments of the present invention in detail. It should be understood that the above description is only a specific implementation method of the embodiments of the present invention and is not intended to limit the scope of protection of the present invention. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solution of the present invention shall be included in the scope of protection of the present invention.

Claims

1. A method for tracing transactions based on a transaction relationship graph, wherein the transaction relationship graph includes nodes representing transaction objects and directed edges representing transactions between the nodes, and the method includes multiple rounds of graph iteration calculations, wherein any round of iteration other than the first round includes: Determine the node pointed to by the first directed edge that performs target processing in the previous iteration as the target node, wherein the target processing includes transmitting the transaction information on the edge along the edge to the pointed node; For several first outgoing edges on the target node that have not yet undergone the target processing, first outgoing edge processing is performed, and the first outgoing edge processing includes determining at least one outgoing edge so that the sum of its transaction amounts corresponds to the first transaction amount of the first directed edge, and performing target processing on the at least one outgoing edge; wherein the at least one outgoing edge includes at least one of the several first outgoing edges, and / or a sub-edge obtained by splitting a target outgoing edge among the several first outgoing edges; and wherein the remaining outgoing edges generated by the splitting of the target outgoing edge, except the sub-edges, remain in a state of not undergoing target processing.

2. The method according to claim 1, wherein: The arbitrary round iteration also includes: After the first outgoing edge processing, a first judgment is performed on the target node. If there is no incoming edge that has not been subjected to the target processing, and there is a second outgoing edge that has not been subjected to the target processing, the target processing is directly performed on the second outgoing edge.

3. The method according to claim 1, wherein: The arbitrary round iteration also includes: If the target node has a third outgoing edge, and the transaction time corresponding to the third outgoing edge is earlier than all incoming edges on the target node that have not yet been subjected to target processing, the target processing is directly performed on the third outgoing edge.

4. The method according to claim 1, wherein: The first iteration includes: In the transaction relationship graph, determining a number of starting nodes, wherein the starting nodes do not include incoming edges; The target processing is performed on the outgoing edges of any starting node.

5. The method according to claim 1, wherein: The target processing also includes: recording the source of the transaction information.

6. The method according to claim 1, wherein: The first outgoing edge satisfies a first condition, where the first condition includes: a first transaction time corresponding to the first outgoing edge is later than a second transaction time corresponding to the first directed edge.

7. The method according to claim 6, wherein: The first condition also includes: a time difference between the first transaction time and the second transaction time is less than a first time threshold.

8. The method according to claim 1, wherein: The plurality of first outgoing edges are a single outgoing edge; and the determining at least one outgoing edge comprises: If the second transaction amount corresponding to the single outgoing edge is greater than the first transaction amount, the single outgoing edge is taken as the target outgoing edge and split into a sub-edge and a remaining outgoing edge, the transaction amount of the sub-edge is the first transaction amount, and the transaction amount corresponding to the remaining outgoing edge is the difference between the second transaction amount and the first transaction amount.

9. The method according to claim 1, wherein: The plurality of first outgoing edges are a plurality of first outgoing edges; and the determining at least one outgoing edge comprises: A plurality of selected out-edges and the target out-edge are determined from the plurality of first out-edges, and the target out-edge is split into sub-edges and remaining out-edges, wherein the sum of transaction amounts of the plurality of selected out-edges is a third transaction amount, the transaction amount of the sub-edges is a fourth transaction amount, the sum of the third transaction amount and the fourth transaction amount is the first transaction amount, and the transaction amount corresponding to the remaining out-edges is a difference between an original transaction amount of the target out-edge and the fourth transaction amount.

10. The method according to claim 1, wherein: The determining of at least one outgoing edge comprises: Based on a first sorting, the at least one outgoing edge is determined from the plurality of first outgoing edges; the first sorting is performed according to transaction times corresponding to the first outgoing edges.

11. The method according to claim 1, wherein: The determining of at least one outgoing edge comprises: Based on a second sorting, the at least one outgoing edge is determined from the plurality of first outgoing edges; the second sorting is sorted according to transaction amounts corresponding to the first outgoing edges.

12. A device for tracking transactions based on a transaction relationship graph, wherein the transaction relationship graph includes nodes representing transaction objects and directed edges representing transactions between nodes, and the device is used to perform any round of iteration other than the first round in multiple rounds of graph iteration calculation, and the device comprises: A determination module is configured to determine the node pointed to by the first directed edge for target processing in the previous iteration as the target node, wherein the target processing includes transmitting the transaction information on the edge along the edge to the pointed node; A processing module is configured to perform first outgoing edge processing on a plurality of first outgoing edges on the target node that have not yet undergone the target processing, wherein the first outgoing edge processing includes determining at least one outgoing edge so that the sum of its transaction amounts corresponds to the first transaction amount of the first directed edge, and performing target processing on the at least one outgoing edge; wherein the at least one outgoing edge includes at least one of the plurality of first outgoing edges, and / or a sub-edge obtained by splitting a target outgoing edge among the plurality of first outgoing edges; wherein the remaining outgoing edges generated by the splitting of the target outgoing edge, except the sub-edges, remain in a state of not undergoing target processing.

13. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.

14. A computing device comprising a memory and a processor, characterized in that: The memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Graph structure model based false transaction identification method and device

    CN108921566A

  • Fund transaction splitting and combining link tracking method

    CN112465638A

  • Data processing method and system

    CN113434737A

  • Link completion method and device, computer readable storage medium and electronic equipment

    CN115269924A

  • Systems and methods for transaction tracing

    US20240119538A1