CN115689762A - Bank transaction fund flow direction path detection method, system, equipment and storage medium - Google Patents

Bank transaction fund flow direction path detection method, system, equipment and storage medium Download PDF

Info

Publication number
CN115689762A
CN115689762A CN202310000333.3A CN202310000333A CN115689762A CN 115689762 A CN115689762 A CN 115689762A CN 202310000333 A CN202310000333 A CN 202310000333A CN 115689762 A CN115689762 A CN 115689762A
Authority
CN
China
Prior art keywords
node
path
account
stack
directed graph
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310000333.3A
Other languages
Chinese (zh)
Other versions
CN115689762B (en
Inventor
陈祖希
张世钒
骆翔宇
郑黎晓
周长利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huaqiao University
Original Assignee
Huaqiao University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huaqiao University filed Critical Huaqiao University
Priority to CN202310000333.3A priority Critical patent/CN115689762B/en
Publication of CN115689762A publication Critical patent/CN115689762A/en
Application granted granted Critical
Publication of CN115689762B publication Critical patent/CN115689762B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a bank transaction fund flow direction path detection method, a system, equipment and a storage medium, and relates to the technical field of bank transaction detection. The method constructs the directed graph of the bank transaction record, each vertex in the directed graph is a concurrent lock-free shared data structure, and the directed graph is detected by adopting a multithreading parallel detection method according to inflow and outflow account pairs to obtain the transaction path of the account number to be detected. The invention processes data in a multithread parallel mode, fully utilizes the high concurrency of a bottom layer multi-core processor to shorten the execution time of the algorithm and improve the efficiency of transaction path detection.

Description

Bank transaction fund flow direction path detection method, system, equipment and storage medium
Technical Field
The invention relates to the technical field of bank transaction detection, in particular to a bank transaction fund flow direction path detection method, a system, equipment and a storage medium.
Background
In the field of financial big data analysis, transaction relation graph data in bank flow records is an important basis for bank financial wind control and financial supervision. Because the data volume of the bank transaction records is huge, billions of accounts and billions or even trillions of transaction lines can be contained, and the information of the interaction between the accounts in the field of financial big data analysis can be complicated, the method for detecting the simple path between the known outgoing account and the known incoming account from the massive complex data is an important problem to be solved.
The graph data structure represents a group of objects and relationships between the objects by using vertexes and edges, and can intuitively and naturally model bank transaction data by using a directed graph. Under the large financial data scale, the traditional deep-first search for a simple path between an outgoing account and an incoming account has the problems of memory explosion and slow operation. Meanwhile, the serial method for detecting the simple path for the mass data of the bank transaction records has many defects. On one hand, the high concurrency of the multi-core multiprocessor cannot be fully utilized by the serial method, so that the bottom hardware resource is greatly wasted; on the other hand, the serial simple path mining efficiency is low, and the requirement of quick detection of a bank cannot be met.
Disclosure of Invention
The invention aims to provide a bank transaction fund flow direction path detection method, a system, equipment and a storage medium, which can fully utilize the high concurrency of a bottom-layer multi-core processor to shorten the execution time of an algorithm and improve the efficiency of transaction path detection.
In order to achieve the purpose, the invention provides the following scheme:
a bank transaction fund flow path detection method comprises the following steps:
constructing a concurrent lock-free shared data structure;
constructing a directed graph according to the bank transaction records, and setting a lock-free shared data structure with each vertex in the directed graph as concurrence;
acquiring running information of an account number to be detected, and extracting inflow and outflow account pairs from the running information of the account number to be detected;
and when a detection request of the transaction path of the account to be detected is initiated, detecting the digraph by adopting a multithreading parallel detection method according to the inflow and outflow account pairs to obtain the transaction path of the account to be detected.
Optionally, the constructing a directed graph according to the bank transaction record specifically includes:
and (3) setting each transaction flow in the bank transaction records as a directed edge, transferring out the fund of each transaction flow as an initial vertex, and transferring into the fund of each transaction flow as a termination vertex, so as to construct a directed graph of the bank transaction records.
Optionally, the constructing a directed graph according to the bank transaction record further includes:
adding a virtual vertex to the directed graph, wherein the virtual vertex points to each vertex in the directed graph, and a directed edge is formed between the virtual vertex and each vertex in the directed graph.
Optionally, the concurrent lock-free shared data structure includes: the system comprises an isDone mark, an isReachable mark and a dynamic array for storing a neighbor node pointer;
the isDone mark is true and called a completed node, and the completed node indicates that all neighbor nodes of the node are explored and completed by one thread;
the isDone mark is false and called as an incomplete node, and the incomplete node indicates that the neighbor nodes of the node are not traversed;
the isReachable mark is true and called a reachable node, and the reachable node represents that the node is an end point or can reach the end point through the node;
the isReachable label false refers to an unreachable node, which means that no node can reach the destination through the node.
Optionally, according to the pair of inflow and outflow accounts, detecting the directed graph by using a multi-thread parallel detection method, and obtaining a transaction path of the account to be detected, specifically including:
and according to the inflow and outflow account pairs, taking a fund transfer-out account in the inflow and outflow account pairs as a starting point and taking the fund transfer-in account in the inflow and outflow account pairs as an end point, and running a depth-first algorithm on each thread to detect the directed graph in parallel to cooperatively obtain all transaction paths between the inflow and outflow account pairs.
Optionally, the running depth-first algorithm of each thread concurrently detects the directed graph, and specifically includes:
constructing a path stack based on the directed graph, and taking the virtual vertex as a stack top node of the path stack;
marking the end point as a reachable node and a completed node, simultaneously setting all nodes except the end point as unaccessed nodes, and pressing the starting point into a path stack;
judging whether the path stack is empty or not based on the starting point to obtain a first judgment result;
if the first judgment result shows yes, ending the detection;
if the first judgment result shows that the path stack is not the path stack, extracting stack top nodes of the path stack;
traversing neighbor nodes of the stack top node;
in the process of traversing the neighbor nodes of the stack top node, judging whether the stack top node is a finished node and an unreachable node or not to obtain a second judgment result;
if the second judgment result shows that the first judgment result is yes, the stack top node is popped, a neighbor node of the stack top node is used as a new stack top node, and the step of executing 'traversing the neighbor node of the stack top node' is returned;
if the second judgment result shows that the stack top node is not the neighbor node u, acquiring any neighbor node of the stack top node and recording the neighbor node u as the neighbor node u;
if the neighbor node u is a completed node and a reachable node, marking the top node of the stack as a reachable node, and returning to execute 'judging whether the path stack is empty based on the starting point to obtain a first judgment result';
if the neighbor node u is an incomplete node and is not accessed, the neighbor node u is stacked and marked as accessed, and the execution is returned, namely whether the path stack is empty or not is judged based on the starting point, and a first judgment result is obtained;
after traversing the neighbor nodes of the stack top node, judging whether the neighbor nodes of the stack top node have reachable nodes or not to obtain a third judgment result;
when the third judgment result is yes, marking the stack top node as a reachable node;
enabling the stack top node to be popped and marked as not-accessed, taking a neighbor node of the stack top node as a new stack top node, and returning to execute 'traversing the neighbor node of the stack top node';
and when the third judgment result is negative, enabling the stack top node to be popped and marked as not-accessed, taking the neighbor node of the stack top node as a new stack top node, and returning to execute the step of traversing the neighbor node of the stack top node.
A system for detecting the flow of funds to a path in a banking transaction, comprising:
the shared data structure construction module is used for constructing a concurrent lock-free shared data structure;
the directed graph constructing module is used for constructing a directed graph according to the bank transaction records and is provided with a lock-free shared data structure with each vertex in the directed graph as concurrence;
the system comprises a to-be-detected information acquisition module, a to-be-detected information acquisition module and a to-be-detected account acquisition module, wherein the to-be-detected information acquisition module is used for acquiring running information of an account to be detected and extracting an inflow and outflow account pair from the running information of the account to be detected;
and the detection module is used for detecting the directed graph by adopting a multithreading parallel detection method according to the inflow and outflow account pairs when a detection request of a transaction path of the account number to be detected is initiated, so as to obtain the transaction path of the account number to be detected.
An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the method for detecting the flow path of the bank transaction funds.
A computer-readable storage medium having stored thereon a computer program which, when executed, implements a method of bank transaction funds flow path detection as aforesaid.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
the invention discloses a bank transaction fund flow direction path detection method, a system, equipment and a storage medium, which are used for constructing a directed graph of a bank transaction record, wherein each vertex in the directed graph is a concurrent lock-free shared data structure, and the directed graph is detected by adopting a multithreading parallel detection method according to inflow and outflow account pairs to obtain a transaction path of an account number to be detected. The invention processes data in a multithread parallel mode, fully utilizes the high concurrency of a bottom layer multi-core processor to shorten the execution time of the algorithm and improve the efficiency of transaction path detection.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a flow chart of a method for detecting the flow path of funds in a bank transaction according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a method for detecting the flow of funds to a path in a bank transaction according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a structure of concurrent lock-free shared data according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a directed graph and an adjacency list storage structure thereof according to an embodiment of the present invention;
fig. 5 is a flowchart of a per-thread operation depth-first algorithm according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The invention aims to provide a bank transaction fund flow direction path detection method, a system, equipment and a storage medium, which can fully utilize the high concurrency of a bottom-layer multi-core processor to shorten the execution time of an algorithm and improve the efficiency of transaction path detection.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
As shown in fig. 1 and fig. 2, the invention provides a bank transaction fund flow path detection method, which decomposes a calculation task onto a plurality of threads for parallel execution, and fully utilizes the high concurrency of a bottom-layer multi-core processor to shorten the execution time of an algorithm. Through a new concurrent data structure, the transaction path detection efficiency is improved by using a divide-and-conquer multi-thread cooperative simple path exploration strategy. The memory utilization rate is improved through an efficient memory allocation mechanism, so that the purpose of high efficiency in both time and space is achieved.
The embodiment of the invention provides a bank transaction fund flow direction path detection method, which comprises the following steps:
and S1, constructing a concurrent lock-free shared data structure.
FIG. 3 illustrates a concurrent lock-free shared data structure. The concurrent lock-free shared data structure is mainly divided into three parts, namely an isDone mark, an isReatable mark and a dynamic array for storing the pointers of the neighbor nodes. The isDone flag is an important flag for ensuring that the algorithm has parallelism and pruning capability, when the flag is true, it indicates that one thread has finished processing the node, and when another thread accesses the node marked by the isDone flag, it does not repeatedly access the node. The isReachable mark indicates whether the endpoint can be reached through the current node, in order to reduce memory consumption, each node only occupies one space in the memory, and the neighbor vector stores the pointer address of the neighbor node.
The isDone flag true is called a completed node, indicating that all neighbor nodes of the node have been explored by a thread.
The isDone flag false is called an incomplete node, indicating that the neighbor nodes of the node have not been traversed. All nodes except the end point are initialized into unfinished nodes, and all nodes after traversing are modified into finished nodes.
The isReachable label false refers to an unreachable node, meaning that any node cannot reach an endpoint through the node, and all nodes except the endpoint are initialized to unreachable nodes.
The isReatable label true is referred to as the reachable node. Indicating that this node is an endpoint or through which an endpoint may be reached.
And S2, constructing a directed graph according to the bank transaction records, and setting a lock-free shared data structure with each vertex in the directed graph as concurrence.
The specific process is as follows:
step 1: acquiring a bank transaction record; the bank transaction record includes a plurality of transaction streamers.
Step 2: and (3) corresponding each transaction flow to a directed edge, taking the fund transfer-out account as an initial vertex and the fund transfer-in account as a termination vertex, and constructing a directed graph of the bank transaction record, wherein a, b, c, d, e and f in the graph are vertexes in the directed graph as shown in fig. 4. The left side of the arrow in fig. 4 is a directed graph, and the right side of the arrow in fig. 4 is an adjacency list storage structure.
And reading the account flow information from the bank database, wherein one piece of flow information corresponds to one directed edge of the graph, and the vertex of the directed graph is the shared data structure.
And step 3: and constructing a corresponding adjacency list for each vertex v in the directed graph to store all adjacency points pointed by the vertex v.
Specifically, all vertex information is stored by using a hash table, and an adjacency list structure stored by using the hash table is constructed for each vertex. For each directed edge v- > w, vertex w is inserted into the adjacency table for vertex v. For example, as shown in FIG. 4, vertex a is inserted into the adjacency list for vertex b.
And 4, step 4: adding a virtual vertex in the directed graph, wherein the adjacent points in the adjacent table of the virtual vertex are all the vertices in the directed graph.
Specifically, a virtual vertex is added to the original directed graph, and a directed edge is added to each vertex in the original directed graph. And storing the virtual vertex-to-vertex hash table, and inserting each vertex in the original directed graph into the adjacency table, wherein the storage structure of the obtained adjacency table is shown as the right side of an arrow in fig. 4.
And S3, acquiring the running information of the account number to be detected, and extracting an inflow and outflow account pair from the running information of the account number to be detected.
And S4, when a detection request of the transaction path of the account to be detected is initiated, detecting the directed graph by adopting a multithreading parallel detection method according to the inflow and outflow account pairs, and obtaining the transaction path of the account to be detected.
When a request for detecting the simple path is initiated, a plurality of threads (the number of the threads is determined by a CPU) are called to start the depth-first search of the simple path, information among nodes is shared by the threads, each thread can modify the state information of the nodes according to the search progress, and the threads can also determine whether to access the next node according to the state information of the nodes. When all the threads are traversed, a graph with reachable marks can be obtained. Finally, it may be necessary to choose to generate a graph containing only reachable paths or to traverse all simple paths again.
Fig. 5 is a flowchart of the per-thread run depth-first algorithm.
The basic idea is to generate all possible solutions on a shared data structure using a depth first search algorithm and backtracking. Initially, there are multiple threads starting DFS operations from the source vertex. Then, an attempt is made to traverse all of its neighbors. For each neighbor, an attempt is made to have each thread traverse a different neighbor, while an undesired thread repeatedly traverses the completed node, and so on. It is desirable to be able to reach the destination. When this happens, the simple path is added to the effective simple path set, and the reachable marking is performed at the same time, so that other threads do not need to explore the complete simple path. Then go back to find other paths. To avoid looping, any vertex must be prevented from being visited multiple times in a simple path. After a vertex is processed, it should be removed from the current path, and therefore marked as not visited before returning. The reason for this is that the same node may be part of a plurality of different paths. However, it cannot be part of the same path multiple times.
The method comprises the following steps:
the method comprises the steps of firstly marking an end point with reacable and done, wherein the end point is the last point on a simple path and can be reached without continuously exploring downwards. And initializing each thread, setting all nodes except the end point as unaccessed, and pushing the starting point to the path stack. Taking the non-empty stack as the circulating condition, taking out the stack top every time, and processing the stack top node by three conditions. First, if all the neighbor nodes of the node are accessed and there is a reachable node in the neighbor nodes, the stack top node is also marked as reacable, otherwise, the stack top node is marked as done, and the stack is popped and marked as not accessed. In the second case, the done mark of the node at the top of the stack is empty, and the node can be directly popped out of the stack without repeatedly processing one node twice. And finally, processing a neighbor node in the last situation, taking a random neighbor node u of v, if the node u is a completed node and can reach the end point, marking the node u as a reachable node, and if the node u is an uncompleted node and is not visited, stacking the node u and continuing to perform next layer of circulation.
The method comprises the following specific steps:
constructing a path stack based on the directed graph, and taking the virtual vertex as a stack top node of the path stack;
marking the end point as a reachable node and a completed node, simultaneously setting all nodes except the end point as non-visited nodes, and pressing the starting point into a path stack;
judging whether the path stack is empty or not based on the starting point to obtain a first judgment result;
if the first judgment result shows yes, ending the detection;
if the first judgment result shows that the path stack is not the path stack, extracting stack top nodes of the path stack;
traversing neighbor nodes of the stack top node;
in the process of traversing the neighbor nodes of the stack top node, judging whether the stack top node is a finished node and an unreachable node or not to obtain a second judgment result;
if the second judgment result shows that the first judgment result is yes, the stack top node is popped, a neighbor node of the stack top node is used as a new stack top node, and the step of executing 'traversing the neighbor node of the stack top node' is returned;
if the second judgment result shows that the stack top node is not the neighbor node u, acquiring any neighbor node of the stack top node and recording the neighbor node u as the neighbor node u;
if the neighbor node u is a completed node and a reachable node, marking the top node of the stack as a reachable node, and returning to execute 'judging whether the path stack is empty based on the starting point to obtain a first judgment result';
if the neighbor node u is an incomplete node and is not accessed, the neighbor node u is stacked and marked as accessed, and the execution is returned, namely whether the path stack is empty or not is judged based on the starting point, and a first judgment result is obtained;
after traversing the neighbor nodes of the stack top node, judging whether the neighbor nodes of the stack top node have reachable nodes or not to obtain a third judgment result;
when the third judgment result is yes, marking the stack top node as a reachable node;
enabling the stack top node to be popped and marked as not-accessed, taking a neighbor node of the stack top node as a new stack top node, and returning to execute 'traversing the neighbor node of the stack top node';
and when the third judgment result is negative, enabling the stack top node to be popped and marked as not-accessed, taking the neighbor node of the stack top node as a new stack top node, and returning to execute the 'traversal of the neighbor node of the stack top node'.
Compared with the prior art, the invention has the beneficial effects that:
1. the data layer is built in a multithreading parallel mode, high concurrency of a multi-core multiprocessor of bottom hardware can be fully utilized, computing performance is effectively improved, feedback delay is reduced, large-scale bank transaction data containing billions of vertexes and trillions to trillions of edges can be processed, and requirements of practical application can be met;
2. the method has the advantages that the depth-first search of multithread shared data is adopted, the completion mark and the reachable mark are made on the graph node, and different threads randomly access the neighbor nodes of each node, so that the probability that each thread runs in different directions is high, unnecessary calculation can be trimmed without sacrificing parallelism, and the efficiency is improved;
3. when the adjacency list storage structure is used for constructing the graph, a virtual vertex is added and points to each vertex in the original directed graph, and when multi-thread calling is carried out, the mode that each thread starts from the virtual vertex and randomly selects the next adjacency point is adopted, the graph data can be uniformly dispersed to different threads for processing, and the parallel computing capability among the threads is improved.
Corresponding to the bank transaction fund flow path detection method, the invention provides a bank transaction fund flow path detection system, which comprises:
the shared data structure construction module is used for constructing a concurrent lock-free shared data structure;
the directed graph constructing module is used for constructing a directed graph according to the bank transaction records and is provided with a lock-free shared data structure with each vertex in the directed graph as concurrence;
the system comprises a to-be-detected information acquisition module, a to-be-detected information acquisition module and a to-be-detected information acquisition module, wherein the to-be-detected information acquisition module is used for acquiring running information of an account number to be detected and extracting an inflow-outflow account pair from the running information of the account number to be detected;
and the detection module is used for detecting the directed graph by adopting a multithreading parallel detection method according to the inflow and outflow account pairs when a detection request of a transaction path of the account number to be detected is initiated, so as to obtain the transaction path of the account number to be detected.
The bank transaction fund flow path detection system provided by the embodiment of the invention is similar to the bank transaction fund flow path detection method described in the embodiment in working principle and beneficial effect, so detailed description is omitted here, and specific contents can be referred to the introduction of the embodiment of the method.
An embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the method for detecting the fund flow path in a banking transaction as described above when executing the computer program.
Further, the computer program stored in the memory described above may be stored in a computer-readable storage medium when it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: u disk, removable hard disk, read only memory, random access memory, magnetic or optical disk, etc. for storing program codes.
Further, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed to implement the method for detecting the flow path of the bank transaction funds as described above.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The principle and the embodiment of the present invention are explained by applying specific examples, and the above description of the embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.

Claims (8)

1. A bank transaction fund flow path detection method is characterized by comprising the following steps:
constructing a concurrent lock-free shared data structure;
constructing a directed graph according to the bank transaction records, and setting a lock-free shared data structure with each vertex in the directed graph as concurrence; the construction of the directed graph according to the bank transaction records comprises the following steps: adding a virtual vertex in the directed graph, wherein the virtual vertex points to each vertex in the directed graph, and a directed edge is formed between the virtual vertex and each vertex in the directed graph;
acquiring running information of an account to be detected, and extracting an inflow-outflow account pair from the running information of the account to be detected;
and when a detection request of the transaction path of the account to be detected is initiated, detecting the digraph by adopting a multithreading parallel detection method according to the inflow and outflow account pairs to obtain the transaction path of the account to be detected.
2. The method for detecting the fund flow path of the banking transaction according to claim 1, wherein the constructing of the directed graph according to the banking transaction record specifically comprises:
and (3) setting each transaction flow in the bank transaction records as a directed edge, setting the fund transfer-out account of each transaction flow as an initial vertex and the fund transfer-in account of each transaction flow as a termination vertex, and constructing a directed graph of the bank transaction records.
3. The method for detecting the flow path of funds in bank transactions according to claim 1, wherein said concurrent lock-free shared data structure comprises: the system comprises an isDone mark, an isReachable mark and a dynamic array for storing neighbor node pointers;
the isDone mark is true and called a completed node, and the completed node represents that all neighbor nodes of the node are explored and completed by one thread;
the isDone marks as false and is called as an unfinished node, and the unfinished node indicates that the neighbor node of the node is not traversed;
the isReachable is marked as true and called as a reachable node, and the reachable node indicates that the node is an end point or can reach the end point through the node;
the isReachable label false is referred to as an unreachable node, which means that any node is unreachable through the node to the endpoint.
4. The method for detecting the fund flow path in the bank transaction according to claim 3, wherein the step of detecting the directed graph by adopting a multi-thread parallel detection method according to the pair of inflow and outflow accounts to obtain the transaction path of the account to be detected specifically comprises the following steps:
and according to the inflow and outflow account pairs, taking a fund transfer-out account in the inflow and outflow account pairs as a starting point and taking the fund transfer-in account in the inflow and outflow account pairs as an end point, and running a depth-first algorithm on each thread to detect the directed graph in parallel to cooperatively obtain all transaction paths between the inflow and outflow account pairs.
5. The method for detecting the fund flow path for bank transaction according to claim 4, wherein the step of running the depth-first algorithm on each thread to detect the directed graph in parallel specifically comprises the following steps:
constructing a path stack based on the directed graph, and taking the virtual vertex as a stack top node of the path stack;
marking the end point as a reachable node and a completed node, simultaneously setting all nodes except the end point as non-visited nodes, and pressing the starting point into a path stack;
judging whether the path stack is empty or not based on the starting point to obtain a first judgment result;
if the first judgment result shows yes, ending the detection;
if the first judgment result shows that the path stack is not the path stack, extracting stack top nodes of the path stack;
traversing neighbor nodes of the stack top node;
in the process of traversing the neighbor nodes of the stack top node, judging whether the stack top node is a finished node and an unreachable node or not to obtain a second judgment result;
if the second judgment result shows that the first judgment result is yes, the stack top node is popped, a neighbor node of the stack top node is used as a new stack top node, and the step of executing 'traversing the neighbor node of the stack top node' is returned;
if the second judgment result shows that the stack top node is not the neighbor node u, acquiring any neighbor node of the stack top node and recording the neighbor node u as the neighbor node u;
if the neighbor node u is a completed node and a reachable node, marking the top node of the stack as a reachable node, and returning to execute 'judging whether the path stack is empty based on the starting point to obtain a first judgment result';
if the neighbor node u is an incomplete node and is not accessed, the neighbor node u is stacked and marked as accessed, and the execution is returned, namely whether the path stack is empty or not is judged based on the starting point, and a first judgment result is obtained;
after traversing the neighbor nodes of the stack top node, judging whether the neighbor nodes of the stack top node have reachable nodes or not to obtain a third judgment result;
when the third judgment result is yes, marking the stack top node as a reachable node;
enabling the stack top node to be popped and marked as not-accessed, taking a neighbor node of the stack top node as a new stack top node, and returning to execute 'traversing the neighbor node of the stack top node';
and when the third judgment result is negative, enabling the stack top node to be popped and marked as not-accessed, taking the neighbor node of the stack top node as a new stack top node, and returning to execute the step of traversing the neighbor node of the stack top node.
6. A system for detecting the flow of funds to a path in a banking transaction, comprising:
the shared data structure construction module is used for constructing a concurrent lock-free shared data structure;
the directed graph constructing module is used for constructing a directed graph according to the bank transaction records and is provided with a lock-free shared data structure with each vertex in the directed graph as concurrence;
the system comprises a to-be-detected information acquisition module, a to-be-detected information acquisition module and a to-be-detected information acquisition module, wherein the to-be-detected information acquisition module is used for acquiring running information of an account number to be detected and extracting an inflow-outflow account pair from the running information of the account number to be detected;
and the detection module is used for detecting the directed graph by adopting a multithreading parallel detection method according to the inflow and outflow account pairs when a detection request of the transaction path of the account to be detected is initiated, and obtaining the transaction path of the account to be detected.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and operable on the processor, the processor when executing the computer program implementing a bank transaction funds flow path detection method as claimed in any one of claims 1 to 5.
8. A computer-readable storage medium, having stored thereon a computer program which, when executed, implements a banking transaction funds flow path detection method according to any one of claims 1 to 5.
CN202310000333.3A 2023-01-03 2023-01-03 Bank transaction fund flow direction path detection method, system, equipment and storage medium Active CN115689762B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310000333.3A CN115689762B (en) 2023-01-03 2023-01-03 Bank transaction fund flow direction path detection method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310000333.3A CN115689762B (en) 2023-01-03 2023-01-03 Bank transaction fund flow direction path detection method, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115689762A true CN115689762A (en) 2023-02-03
CN115689762B CN115689762B (en) 2023-04-07

Family

ID=85057527

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310000333.3A Active CN115689762B (en) 2023-01-03 2023-01-03 Bank transaction fund flow direction path detection method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115689762B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115982207A (en) * 2023-03-20 2023-04-18 华侨大学 Bank transaction fund backflow multithreading parallel detection method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838811A (en) * 2012-11-20 2014-06-04 Sap股份公司 Circular transaction path detection
CN111127024A (en) * 2019-11-19 2020-05-08 支付宝(杭州)信息技术有限公司 Suspicious fund link detection method and device
US20200273116A1 (en) * 2019-02-21 2020-08-27 Agora AltX Path of funds blockchain system
CN113298650A (en) * 2020-12-29 2021-08-24 阿里巴巴集团控股有限公司 Information processing method and device and electronic equipment
CN113888317A (en) * 2021-10-20 2022-01-04 支付宝(杭州)信息技术有限公司 Method and device for managing and controlling credit funds
CN114239963A (en) * 2021-12-16 2022-03-25 南京冰鉴信息科技有限公司 Method and device for detecting directed graph circulation path

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838811A (en) * 2012-11-20 2014-06-04 Sap股份公司 Circular transaction path detection
US20200273116A1 (en) * 2019-02-21 2020-08-27 Agora AltX Path of funds blockchain system
CN111127024A (en) * 2019-11-19 2020-05-08 支付宝(杭州)信息技术有限公司 Suspicious fund link detection method and device
CN113298650A (en) * 2020-12-29 2021-08-24 阿里巴巴集团控股有限公司 Information processing method and device and electronic equipment
CN113888317A (en) * 2021-10-20 2022-01-04 支付宝(杭州)信息技术有限公司 Method and device for managing and controlling credit funds
CN114239963A (en) * 2021-12-16 2022-03-25 南京冰鉴信息科技有限公司 Method and device for detecting directed graph circulation path

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115982207A (en) * 2023-03-20 2023-04-18 华侨大学 Bank transaction fund backflow multithreading parallel detection method and system

Also Published As

Publication number Publication date
CN115689762B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
Okcan et al. Processing theta-joins using mapreduce
Nakano Simple memory machine models for GPUs
CN106502791A (en) A kind of method for allocating tasks and device
CN115689762B (en) Bank transaction fund flow direction path detection method, system, equipment and storage medium
CN104952032B (en) Processing method, device and the rasterizing of figure represent and storage method
Wang et al. Towards efficient solutions of bitruss decomposition for large-scale bipartite graphs
CN103049392B (en) The implementation method of CACHE DIRECTORY and device
Kerdprasop et al. Parallelization of k-means clustering on multi-core processors
Ito et al. A GPU implementation of dynamic programming for the optimal polygon triangulation
CN102810133B (en) Ray querying method in online game and scene server
CN115689761B (en) Multithreading parallel detection method and equipment for electronic commerce flow direction path
CN113419861A (en) Graph traversal mixed load balancing method facing GPU card group
CN110264392B (en) Strong connection graph detection method based on multiple GPUs
Velentzas et al. In-memory k Nearest Neighbor GPU-based Query Processing.
JP5321691B2 (en) Parallel computing device, parallel computing method, and parallel computing program
Nunes et al. A fast approximate string matching algorithm on GPU
Peng et al. FA-Stack: A fast array-based stack with wait-free progress guarantee
Nakano et al. The random address shift to reduce the memory access congestion on the discrete memory machine
Kim et al. Optimizing seam carving on multi-GPU systems for real-time content-aware image resizing
Nakano et al. The super warp architecture with random address shift
CN115982207B (en) Bank transaction funds reflux multithread parallel detection method and system
Pioli et al. Characterization research on I/O improvements targeting DISC and HPC applications
VanCompernolle et al. Maximum clique solver using bitsets on GPUs
Nakano A time optimal parallel algorithm for the dynamic programming on the hierarchical memory machine
CN115713628A (en) Rapid feature acquisition method based on global index table

Legal Events

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