Method and apparatus for mining related transaction addresses in a blockchain network
By building a directed graph of blockchain transactions and directed graph of connected components, using Tarjan algorithm and routing table generation technology, the problem of low mining efficiency of related transaction addresses in the blockchain network is solved, and efficient accessible path extraction and abnormal transaction detection are achieved.
Patent Information
- Application Number
- CN202411403788.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2044-10-09
AI Technical Summary
The prior art is inefficient in mining related transaction addresses in blockchain networks, and requires a lot of time to find all accessible paths between two nodes in the topology graph.
By building a directed graph of blockchain transactions and directed graphs of connected components, the Tarjan algorithm is used to extract strong connected components, and a routing table is generated to store accessible path information, and the accessed path extraction is optimized through greedy algorithms and mining rate.
On the basis of ensuring the comprehensiveness of mining related transaction addresses, the mining efficiency is significantly improved, and thus the efficiency of subsequent applications such as abnormal transaction detection is improved.
Smart Images

Figure CN119537441B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular, to a method and device for mining associated transaction addresses for a blockchain network. Background Art
[0002] In scenarios such as abnormal transaction detection and transaction risk identification for a blockchain network, it is necessary to first mine associated transaction addresses between different transaction addresses in the blockchain network, that is, find the reachable paths between them. In a blockchain network, if the set of Party A addresses and the set of Party B addresses in a transaction behavior are known, the information that may be required includes other associated addresses in the capital flow path from Party A to Party B, etc. For example: In an abnormal transaction event using blockchain, if the addresses of both Party A and Party B are disclosed, it is necessary to mine other relevant addresses between Party A and Party B. The mined associated addresses can be used as one of the clues for abnormal transaction detection, thereby making the abnormal transaction detection event itself clearer and improving the effectiveness and reliability of subsequent applications such as abnormal transaction monitoring.
[0003] However, in the existing methods for mining associated transaction addresses for a blockchain network, due to the large number of transaction addresses and the complex interaction relationships, even if a topological graph structure is used to represent the transaction relationships between various transaction addresses in the blockchain network, it still takes a lot of time to find all the reachable paths between two nodes in the topological graph. Therefore, there is an urgent need to design a method that can improve the efficiency of mining associated transaction addresses on the basis of ensuring the comprehensiveness of mining associated transaction addresses. Summary of the Invention
[0004] In view of this, embodiments of this application provide a method and device for mining associated transaction addresses for a blockchain network to eliminate or improve one or more defects existing in the prior art.
[0005] One aspect of this application provides a method for mining associated transaction addresses for a blockchain network, including:
[0006] Determine the starting node in the strongly connected component digraph corresponding to the starting vertex in the blockchain transaction digraph and the destination node in the strongly connected component digraph corresponding to the destination vertex in the blockchain transaction digraph; wherein, each vertex in the blockchain transaction digraph represents each transaction address in the blockchain network, and the edges in the blockchain transaction digraph represent the transactions between the two vertices connected by the edge; each node in the strongly connected component digraph corresponds one-to-one with each strongly connected component corresponding to the blockchain transaction digraph, and each strongly connected component contains multiple vertices, and the edges in the strongly connected component digraph are respectively used to represent the one-way connection relationships between the strongly connected components;
[0007] Find all adjacent nodes corresponding to the starting node in the connected component directed graph, and fill the routing table of the starting node according to the routing tables of the respective adjacent nodes, where the routing table is used to store the correspondence between the unique identifiers of the nodes reachable by the node corresponding thereto in the connected component directed graph and the reachability vectors representing the reachable paths, and the reachability vector consists of at least one of the nodes;
[0008] Check whether the unique identifier of the destination node is included in the filled routing table of the starting node. If so, extract the reachability vector corresponding to the unique identifier of the destination node, and extract from the blockchain transaction directed graph the reachable path graph formed by each node in the reachability vector and the strongly connected components corresponding to the destination node respectively, so as to use the reachable path graph as the associated transaction address mining result data for the starting vertex to reach the destination vertex.
[0009] In some embodiments of the present application, before determining the starting node in the connected component directed graph corresponding to the starting vertex in the blockchain transaction directed graph and the destination node in the connected component directed graph corresponding to the destination vertex in the blockchain transaction directed graph, it further includes:
[0010] Take each transaction address in the blockchain network as a different vertex, and take the transactions between the transaction addresses as different edges to construct a blockchain transaction directed graph;
[0011] Construct a connected component directed graph corresponding to the blockchain transaction directed graph.
[0012] In some embodiments of the present application, the constructing a connected component directed graph corresponding to the blockchain transaction directed graph includes:
[0013] Extract each strongly connected component from the blockchain transaction directed graph based on the Tarjan algorithm;
[0014] According to the connection relationship of each strongly connected component in the blockchain transaction directed graph, construct a connected component directed graph with each strongly connected component as a node;
[0015] Set a unique identifier and a routing table for each node in the connected component directed graph.
[0016] In some embodiments of the present application, before determining the starting node in the connected component directed graph corresponding to the starting vertex in the blockchain transaction directed graph and the destination node in the connected component directed graph corresponding to the destination vertex in the blockchain transaction directed graph, it further includes:
[0017] Receive an associated transaction address mining request, where the associated transaction address mining request includes a starting transaction address and an ending transaction address;
[0018] Determine the vertex corresponding to the starting transaction address in the blockchain transaction directed graph as the starting vertex, and determine the vertex corresponding to the ending transaction address in the blockchain transaction directed graph as the destination node.
[0019] In some embodiments of the present application, the associated transaction address mining request further includes a mining rate;
[0020] Correspondingly, the method for mining associated transaction addresses for a blockchain network further includes:
[0021] If the associated transaction address mining result data shows that the reachable paths between the starting vertex and the destination vertex are not unique, then based on the greedy algorithm and the mining rate, solve the flow loss rate of each of the reachable paths in the associated transaction address mining result data, and determine the reachable path corresponding to the maximum value among the values of each flow loss rate as the target reachable path from the starting vertex to the destination vertex.
[0022] In some embodiments of the present application, before determining the starting node corresponding to the starting vertex in the connected component directed graph of the blockchain transaction directed graph and the destination node corresponding to the destination vertex in the connected component directed graph of the blockchain transaction directed graph, it further includes:
[0023] Construct a mapping data table, where the mapping data table is used to store the corresponding relationship between each vertex and the node to which it belongs.
[0024] In some embodiments of the present application, determining the starting node corresponding to the starting vertex in the connected component directed graph of the blockchain transaction directed graph and the destination node corresponding to the destination vertex in the connected component directed graph of the blockchain transaction directed graph includes:
[0025] Search for the node corresponding to the starting vertex in the mapping data table as the starting node, and search for the node corresponding to the destination vertex in the mapping data table as the destination node.
[0026] Another aspect of the present application provides an apparatus for mining associated transaction addresses for a blockchain network, including:
[0027] A connected component determination module, configured to determine a starting node in a connected component digraph corresponding to a starting vertex in a blockchain transaction digraph and a destination node in the connected component digraph corresponding to a destination vertex in the blockchain transaction digraph; wherein each vertex in the blockchain transaction digraph represents each transaction address in a blockchain network, and an edge in the blockchain transaction digraph represents a transaction between two vertices connected by the edge; each node in the connected component digraph corresponds one-to-one with each strongly connected component corresponding to the blockchain transaction digraph, and each strongly connected component contains multiple vertices, and each edge in the connected component digraph is respectively used to represent a one-way connection relationship between each strongly connected component;
[0028] A routing table filling module, configured to find all adjacent nodes corresponding to the starting node in the connected component digraph, and fill the routing table of the starting node according to the routing tables of each of the adjacent nodes, wherein the routing table is used to store the corresponding relationship between the unique identifier of each node reachable by the node corresponding to it in the connected component digraph and the reachability vector for representing the reachable path, and the reachability vector is composed of at least one of the nodes;
[0029] A reachable path extraction module, configured to check whether the unique identifier of the destination node is included in the filled routing table of the starting node, and if so, extract the reachability vector corresponding to the unique identifier of the destination node, and extract a reachable path graph composed of each node in the reachability vector and the strongly connected components corresponding to the destination node respectively from the blockchain transaction digraph, so as to use the reachable path graph as the mining result data of the associated transaction addresses from the starting vertex to the destination vertex.
[0030] A third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the method for mining associated transaction addresses for a blockchain network as described above is implemented.
[0031] A fourth aspect of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for mining associated transaction addresses for a blockchain network as described above is implemented.
[0032] A fifth aspect of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method for mining associated transaction addresses for a blockchain network as described above is implemented.
[0033] The method for mining associated transaction addresses for a blockchain network provided by this application determines the starting node in the connected component digraph corresponding to the starting vertex in the blockchain transaction digraph and the destination node in the connected component digraph corresponding to the destination vertex in the blockchain transaction digraph; wherein, each vertex in the blockchain transaction digraph represents each transaction address in the blockchain network, and the edges in the blockchain transaction digraph represent the transactions between the two vertices connected by the edge; each node in the connected component digraph corresponds one-to-one with each strongly connected component corresponding to the blockchain transaction digraph, and each strongly connected component contains multiple vertices, and each edge in the connected component digraph is used to represent the one-way connection relationship between each strongly connected component; find all adjacent nodes corresponding to the starting node in the connected component digraph, and fill the routing table of the starting node according to the routing tables of each of the adjacent nodes, wherein the routing table is used to store the corresponding relationship between the unique identifiers of each node reachable by the node corresponding to it in the connected component digraph and the reachability vectors representing the reachable paths, and the reachability vector is composed of at least one of the nodes; check whether the unique identifier of the destination node is included in the filled routing table of the starting node, if so, extract the reachability vector corresponding to the unique identifier of the destination node, and extract from the blockchain transaction digraph the reachability path graph composed of each node in the reachability vector and the strongly connected components corresponding to the destination node respectively, so as to use the reachability path graph as the mining result data of the associated transaction addresses from the starting vertex to the destination vertex, which can effectively improve the efficiency of mining associated transaction addresses on the basis of ensuring the comprehensiveness of mining associated transaction addresses in the blockchain network, and further improve the efficiency of subsequent applications such as detecting abnormal transactions according to the associated transaction addresses.
[0034] Additional advantages, objects, and features of this application will be partially described below and will become partially apparent to those of ordinary skill in the art after studying the following text, or may be learned from the practice of this application. The objects and other advantages of this application can be realized and obtained by the structure specifically pointed out in the specification and the drawings.
[0035] Those skilled in the art will understand that the objects and advantages that can be achieved by this application are not limited to the above specific descriptions, and the above and other objects that can be achieved by this application will be more clearly understood according to the following detailed description. Brief Description of the Drawings
[0036] The accompanying drawings described herein are used to provide a further understanding of the present application, form a part of the present application, and do not limit the present application. The components in the drawings are not drawn to scale, but are only for showing the principles of the present application. For the convenience of showing and describing some parts of the present application, the corresponding parts in the drawings may be enlarged, that is, they may become larger relative to other components in the exemplary device actually manufactured according to the present application. In the drawings:
[0037] Figure 1 FIG. 4(a) is a first flowchart showing the method for mining associated transaction addresses in a blockchain network according to an embodiment of the present application.
[0038] Figure 2 FIG. 4(b) is a second flowchart showing the method for mining associated transaction addresses in a blockchain network according to an embodiment of the present application.
[0039] Figure 3 FIG. 4(c) is a third flowchart showing the method for mining associated transaction addresses in a blockchain network according to an embodiment of the present application.
[0040] FIG. 4(a) is a schematic diagram showing each strongly connected component in the blockchain transaction digraph distinguished by different colors in an example of the present application.
[0041] FIG. 4(b) is a digraph of connected components formed after aggregating the strongly connected components in FIG. 4(a) in an example of the present application.
[0042] Figure 5 FIG. 4(c) is a digraph of connected components in another example of the present application.
[0043] Figure 6 FIG. 4(d) is a schematic diagram showing the mining result data of the associated transaction addresses corresponding to the start vertex S to the destination vertex E in another example of the present application.
[0044] Figure 7 FIG. 5 is a schematic structural diagram of an apparatus for mining associated transaction addresses in a blockchain network according to an embodiment of the present application. Detailed Embodiments
[0045] To make the objectives, technical solutions, and advantages of the present application clearer and more understandable, the present application will be further described in detail below in conjunction with the embodiments and the accompanying drawings. Herein, the illustrative embodiments of the present application and their descriptions are used to explain the present application, but do not limit the present application.
[0046] Herein, it should also be noted that in order to avoid obscuring the present application due to unnecessary details, only the structures and / or processing steps closely related to the solution according to the present application are shown in the drawings, while other details less related to the present application are omitted.
[0047] It should be emphasized that when the term "comprising / including" is used herein, it refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0048] Here, it should also be noted that if not otherwise specified, the term "connection" herein can refer not only to a direct connection, but also to an indirect connection with an intermediate.
[0049] In the following, embodiments of the present application will be described with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0050] In order to improve the efficiency of mining associated transaction addresses on the basis of ensuring the comprehensiveness of mining associated transaction addresses, embodiments of the present application respectively provide a method for mining associated transaction addresses for a blockchain network, an apparatus for mining associated transaction addresses for a blockchain network for executing the method for mining associated transaction addresses for a blockchain network, an entity device, a computer-readable storage medium, and a computer program product, which can effectively improve the efficiency of mining associated transaction addresses on the basis of ensuring the comprehensiveness of mining associated transaction addresses in the blockchain network, and further improve the efficiency of subsequent applications such as detecting abnormal transactions based on the associated transaction addresses.
[0051] Specifically, it will be described in detail through the following embodiments.
[0052] Based on this, embodiments of the present application provide a method for mining associated transaction addresses for a blockchain network that can be implemented by an apparatus for mining associated transaction addresses for a blockchain network. Refer to Figure 1 , and the method for mining associated transaction addresses for a blockchain network specifically includes the following content:
[0053] Step 100: Determine the starting node in the connected component digraph corresponding to the starting vertex in the blockchain transaction digraph and the destination node in the connected component digraph corresponding to the destination vertex in the blockchain transaction digraph; wherein, each vertex in the blockchain transaction digraph represents each transaction address in the blockchain network, and the edge in the blockchain transaction digraph represents the transaction between the two vertices connected by the edge; each node in the connected component digraph corresponds one-to-one with each strongly connected component corresponding to the blockchain transaction digraph, and each strongly connected component includes multiple vertices, and each edge in the connected component digraph is respectively used to represent the one-way connection relationship between each strongly connected component.
[0054] It can be understood that the blockchain transaction directed graph is composed of various vertices and edges connecting different vertices. Each vertex represents a transaction address in the blockchain network, and the edge represents the transaction between the two vertices connected by the edge. The edges in the blockchain transaction directed graph are directed edges, and the direction is used to represent the transaction direction. That is, if the transaction direction between the first transaction address and the second transaction address is that the first transaction address transfers funds to the second transaction address, the direction of the edge between the vertex uniquely corresponding to the first transaction address and the vertex uniquely corresponding to the second transaction address is from the vertex uniquely corresponding to the first transaction address to the vertex uniquely corresponding to the second transaction address.
[0055] In one or more embodiments of the present application, the vertex refers to a point in the blockchain transaction directed graph, and the node refers to a point in the connected component directed graph.
[0056] It can be understood that each node in the connected component directed graph corresponds one-to-one with each strongly connected component corresponding to the blockchain transaction directed graph, and each strongly connected component contains multiple vertices. Each edge in the connected component directed graph is used to represent the one-way connection relationship between the strongly connected components.
[0057] In one or more embodiments of the present application, a strongly connected component means that in the blockchain transaction directed graph, if there is a directed path from any point to another point between two vertices, and there is also a directed path from the other point to this point, then these two vertices are called strongly connected. If every vertex pair in the blockchain transaction directed graph satisfies this condition, then the blockchain transaction directed graph can directly be regarded as a strongly connected component, or can also be called a strongly connected graph. The maximum strongly connected subgraph of the strongly connected component directed graph is called a strongly connected component.
[0058] Step 200: Search for all adjacent nodes corresponding to the starting node in the connected component directed graph, and fill the routing table of the starting node according to the routing tables of the respective adjacent nodes. The routing table is used to store the corresponding relationship between the unique identifiers of the nodes reachable by the node corresponding to it in the connected component directed graph and the reachability vectors representing the reachable paths. The reachability vector is composed of at least one of the nodes.
[0059] Specifically, since the addresses in the blockchain network are completely irregular, when trying to find all paths from one address to another, brute-force search using DFS or BFS is required. Even when using the reconstructed connected component directed graph, the search time will be extremely long. A feasible solution is to add "routing" capabilities to the nodes in the connected component directed graph.
[0060] Therefore, the embodiments of the present application can generate a routing table for each node based on the connected component directed graph. In one or more embodiments of the present application, the structure of the routing table is different from the traditional RIP protocol. In the RIP protocol, the next hop corresponding to each network segment is a scalar value, which means the shortest hop count value. While the next hop of the routing table of the present application corresponds to a vector value. An example of the routing table is shown in Table 1 below.
[0061] Table 1
[0062] Number Node number (unique identifier of the node) Reachability vector 1 0x12abc [0x32amc,0x73ohy]
[0063] Among them, the node number in the routing table is used to represent the unique identifier generated for each node when the connected component directed graph (which can also be simply referred to as the reconstruction graph) is generated. The reachable vector means that if the current node corresponding to this routing table wants to reach the node indicated by the node number, it can reach from any component (the unique identifier of other nodes) in the reachable vector.
[0064] Assume that the unique identifier of the current node corresponding to the routing table shown in Table 1 is 0x99xyz. If this node wants to reach the node with the unique identifier of 0x12abc, it can route through the node with the unique identifier of 0x32amc, or it can route through the node with the unique identifier of 0x73ohy.
[0065] Step 300: Check whether the unique identifier of the destination node is included in the filled routing table of the starting node. If so, extract the reachable vector corresponding to the unique identifier of the destination node, and extract from the blockchain transaction directed graph the reachable path graph composed of each node in the reachable vector and the strongly connected components corresponding to the destination node respectively, and use this reachable path graph as the associated transaction address mining result data for the starting vertex to reach the destination vertex.
[0066] After step 300, the associated transaction address mining result data can be output for subsequent processing such as abnormal transaction or transaction risk prediction between the starting vertex and the destination vertex based on this associated transaction address mining result data. If the reachable path between the starting vertex and the destination vertex shown by the associated transaction address mining result data is not unique, importance screening can also be performed, which will be described in detail in subsequent embodiments.
[0067] As can be seen from the above description, the method for mining associated transaction addresses for a blockchain network provided by the embodiments of the present application can effectively improve the efficiency of mining associated transaction addresses on the basis of ensuring the comprehensiveness of mining associated transaction addresses in the blockchain network, and further improve the efficiency of subsequent applications such as abnormal transaction detection based on the associated transaction addresses.
[0068] To further improve the efficiency, comprehensiveness, and reliability of mining associated transaction addresses in a blockchain network, in a method for mining associated transaction addresses in a blockchain network provided in an embodiment of the present application, refer to Figure 2 Before step 100 in the method for mining associated transaction addresses in the blockchain network, the following specific content is further included:
[0069] Step 010: Use each transaction address in the blockchain network as a different vertex, and use each transaction between the transaction addresses as a different edge to construct a directed graph of blockchain transactions.
[0070] Specifically, for each transaction address in a given blockchain network, in an embodiment of the present application, transactions are modeled as edges and addresses are modeled as vertices to form a directed graph of blockchain transactions.
[0071] Step 020: Construct a directed graph of connected components corresponding to the directed graph of blockchain transactions.
[0072] To further improve the application effectiveness and reliability of the directed graph of connected components, and further improve the efficiency, comprehensiveness, and reliability of mining associated transaction addresses in a blockchain network, in a method for mining associated transaction addresses in a blockchain network provided in an embodiment of the present application, refer to Figure 3 Step 020 in the method for mining associated transaction addresses in the blockchain network specifically includes the following content:
[0073] Step 021: Extract each strongly connected component from the directed graph of blockchain transactions based on the Tarjan algorithm;
[0074] Step 022: According to the connection relationships of each of the strongly connected components in the directed graph of blockchain transactions, construct a directed graph of connected components with each of the strongly connected components as nodes;
[0075] Specifically, in an embodiment of the present application, the Tarjan algorithm is used on the directed graph of blockchain transactions to divide each strongly connected component. In each strongly connected component, any two nodes are reachable. Among them, the Tarjan algorithm is an algorithm for depth-first search (DFS) of a graph, used to find strongly connected components (Strongly Connected Components, abbreviated as SCC).
[0076] For each strongly connected component, abstract it as a node respectively and perform graph reconstruction to obtain a directed graph of connected components.
[0077] In one example, referring to FIG. 4(a), in the embodiment of the present application, the Tarjan algorithm is used to distinguish different strongly connected components in the directed graph of blockchain transactions with different colors. For each strongly connected component, it is regarded as a point, and after aggregating each of the strongly connected components, a directed graph of connected components as shown in FIG. 4(b) is formed. Among them, there are two edges pointing from the magenta component in FIG. 4(a) to the green component, while in FIG. 4(b) there is only one. That is to say, the directed graph of connected components only reflects the connection relationship between components rather than the actual connection situation. It can be seen that the reconstructed directed graph of connected components will greatly simplify the directed graph of blockchain transactions, effectively reducing the complexity of the original directed graph of blockchain transactions. Furthermore, on the basis of ensuring the comprehensiveness of associated transaction address mining, the efficiency and reliability of associated transaction address mining based on the directed graph of connected components can be effectively improved.
[0078] Step 023: Set a unique identifier and a routing table for each of the nodes in the directed graph of connected components.
[0079] Specifically, referring to Figure 5 , if the directed graph of connected components generated in step 022 includes node C, node B, node A, node M, and node X, the generation process of the routing table for each node is as follows:
[0080] Each node can ask the nodes it is linked to for their routing tables. For example, node B first sends a routing table query request (such as a Hello request) to node A to query the routing table of node A. After receiving the Hello request, node A responds to node B with its own routing table. After receiving the response from node A, node B will complete its own routing table according to the routing table of node A. The following takes Figure 5 as an example to describe the routing table update process:
[0081] (1) Suppose the current routing table of node A is Table 2:
[0082] Table 2 - Routing Table of Node A
[0083] Number Node number Reachability vector 1 X [X]
[0084] It means that if node A wants to reach node X, it can directly go to the directly connected node X.
[0085] (2) Suppose the current routing table of node M is Table 3, which is the same as the current routing table of node A:
[0086] Table 3 - Routing Table of Node M
[0087] Number Node number Reachability vector 1 X [X]
[0088] (3) At this time, the routing table of node B is Table 4:
[0089] Table 4 - Initial State of the Routing Table of Node B
[0090] Number Node number Reachability vector 1 A [A] 2 M [M]
[0091] (4) Since Node B is directly connected to Node A, Node B sends a Hello request to Node A. After receiving the Hello request, Node A returns its routing table. At this time, Node B discovers that Node A can reach Node X. Thus, Node B also learns the method to reach Node X through Node A, and the routing table of Node B is changed to Table 5:
[0092] Table 5 - Node B Changes Its Routing Table After Obtaining the Routing Table of the Adjacent Node A
[0093] Number Node number Reachability vector 1 A [A] 2 M [M] 3 X [A]
[0094] (5) Similarly, Node B can ask Node M about the routing situation. When Node M returns its routing table, Node B discovers that there is more than one path to reach Node X other than through Node A. Thus, Node B also adds Node M to the reachable vector numbered 3 in its routing table. At this time, the routing table of Node B is changed to Table 6:
[0095] Table 6 - Node B Changes Its Routing Table After Obtaining the Routing Table of the Adjacent Node M
[0096] Number Node number Reachability vector 1 A [A] 2 M [M] 3 X [A,M]
[0097] (6) Similarly, Node C asks Node B for its routing table and discovers that Node B can reach Node A, Node M, and Node X. Then Node C can also reach these three nodes through Node B, and the routing table of Node C is changed to Table 7:
[0098] Table 7 - Node C Changes Its Routing Table After Obtaining the Routing Table of the Adjacent Node B
[0099] Number Node number Reachability vector 1 A [B] 2 M [B] 3 X [B] 4 B [B]
[0100] Therefore, when wanting to query all reachable paths between two transaction addresses, one can first query the nodes corresponding to the strongly connected components where the two transaction addresses are located, and then step by step query all the nodes passed through through the above routing table update process. Since all vertices within each connected component are mutually reachable, all vertices within all the connected components passed through are vertices on the reachable path between the two addresses. Therefore, after determining these vertices, the reachable path graph from the starting vertex to the destination vertex can be obtained by performing a subgraph operation on the directed graph of the blockchain transaction.
[0101] In order to further improve the application flexibility and wide applicability of associated transaction address mining for blockchain networks, in a method for mining associated transaction addresses for a blockchain network provided in an embodiment of the present application, refer to Figure 2 or Figure 3 , before step 100 in the method for mining associated transaction addresses of the blockchain network, the following specific content is further included:
[0102] Step 030: Receive an associated transaction address mining request, where the associated transaction address mining request includes a starting transaction address and an ending transaction address;
[0103] Step 040: Determine the vertex corresponding to the starting transaction address in the blockchain transaction directed graph as the starting vertex, and determine the vertex corresponding to the ending transaction address in the blockchain transaction directed graph as the destination node.
[0104] In addition, on the basis of ensuring the comprehensiveness of associated transaction address mining in the blockchain network and being able to effectively improve the efficiency of associated transaction address mining, it can also be considered which one is more important when the reachable paths between the starting vertex and the destination vertex are not unique according to the associated transaction address mining result data, so as to further improve the accuracy of associated transaction address mining for the blockchain network.
[0105] Based on this, in order to further improve the accuracy of associated transaction address mining for the blockchain network, in a method for mining associated transaction addresses for a blockchain network provided in an embodiment of the present application, the associated transaction address mining request further includes a mining rate, refer to Figure 2 or Figure 3 , after step 300 in the method for mining associated transaction addresses of the blockchain network, the following specific content is further included:
[0106] Step 400: If the associated transaction address mining result data shows that the reachable paths between the starting vertex and the destination vertex are not unique, then based on the greedy algorithm and the mining rate, solve the respective flow loss rates of each of the reachable paths in the associated transaction address mining result data, and determine the reachable path corresponding to the maximum value among the values of each flow loss rate as the target reachable path from the starting vertex to the destination vertex.
[0107] For example, refer to Figure 6The mining result data of the associated transaction address corresponding to the starting vertex S to the destination vertex E shown. After determining the starting vertex S corresponding to a starting transaction address and the destination vertex E corresponding to an ending transaction address, the reachable path graph between the two can be quickly discovered through steps 100 to 200, that is, the mining result data of the associated transaction address. Then, if the reachable paths in the reachable path graph are not unique, evaluating the importance of the vertices H1 to H4 involved in these reachable paths becomes a core issue. That is to say, the embodiments of the present application determine whether each group of vertices corresponding to each reachable path between the starting vertex S and the destination vertex E is important through the maximum flow loss. Whenever a group of vertices is deleted, the maximum flow between the starting vertex S and the destination vertex E must be damaged. If the loss between the starting vertex S and the destination vertex E is very large after deleting a certain group of vertices, it means that this group of vertices is very important (deleting this group of vertices significantly reduces the flow, indicating that this group of vertices plays a very important hub role between the starting vertex S and the destination vertex E). In the embodiments of the present application, the basis for evaluating whether a group of vertices constituting a reachable path is important is the flow loss rate Loss of the reachable path, that is, the average maximum loss of deleting a certain group, that is, the average loss brought by each vertex in the group.
[0108]
[0109] The higher the Loss value corresponding to a certain group of nodes, the more important this group of nodes is. And how large this group of nodes is needs to be controlled by the mining rate R, that is, determined by the parameter passed in by the user. This algorithm only tries to find the group with the largest loss (which can be simply referred to as the largest group) as much as possible when the mining rate R is determined.
[0110] That is to say, the embodiments of the present application set the transaction amount of the edge as the flow limit, and finding the maximum flow from the starting vertex S to the destination vertex is the overall maximum flow. When deleting this group, find the maximum flow again and subtract this maximum flow from the overall maximum flow to get the maximum flow loss. The maximum flow loss means the overall flow loss after deleting this group of nodes. Therefore, the capacity of the largest group MaxGroup mined can be adjusted according to the mining rate R.
[0111] MaxGroup = R * total number of nodes
[0112] Since it is very difficult to solve the global optimal solution, the greedy algorithm is used instead to solve the local optimal solution. Because each time a vertex is removed, the maximum flow has only two situations: unchanged and loss. Therefore, MaxGroup vertices that can generate the largest loss each time can be removed in turn (the greedy process). Calculate the current Loss in real time during the removal process. The group when Loss is the largest is the associated vertex set V.
[0113] That is to say, the mining algorithm mentioned in the embodiments of this application refers to: in a given blockchain network, input a starting transaction address, an ending transaction address, and a mining rate R, and mine the set of associated nodes V involved in the transaction path existing between the two addresses. These key nodes reflect the relevance between the starting address and the ending address.
[0114] To further improve the efficiency and convenience of mining associated transaction addresses for a blockchain network, in a method for mining associated transaction addresses for a blockchain network provided in the embodiments of this application, refer to Figure 2 or Figure 3 , after step 010 and before step 030 in the method for mining associated transaction addresses of the blockchain network, the following specific content is further included:
[0115] Step 050: Construct a mapping data table, where the mapping data table is used to store the corresponding relationships between each of the vertices and the nodes to which they belong.
[0116] Specifically, in the embodiments of this application, a mapping data table T1 is established. The key of the mapping data table T1 is the node, and the value is the strongly connected component where it is located.
[0117] Correspondingly, refer to Figure 2 or Figure 3 , step 100 in the method for mining associated transaction addresses of the blockchain network specifically includes the following content:
[0118] Step 110: Search in the mapping data table for the node corresponding to the starting vertex as the starting node, and search in the mapping data table for the node corresponding to the destination vertex as the destination node.
[0119] Therefore, when wanting to query all reachable paths between two transaction addresses, the unique identifier of the node corresponding to the strongly connected component where it is located can be first queried through the mapping data table T1. Then, step by step query all the connected components passed through through the routing table of the node. Since all vertices within each connected component are mutually reachable, all vertices within all the connected components passed through are the vertices on the reachable path between the two addresses. Therefore, after determining these vertices, a subgraph operation is performed on the original blockchain transaction directed graph to obtain the reachable path graph between the two addresses.
[0120] In summary, the method for mining associated transaction addresses for a blockchain network provided by the embodiments of the present application has the advantages of high mining efficiency and high mining accuracy through the extended application of the RIP protocol on the reconstructed graph and the greedy mining strategy based on operations research. High mining efficiency means that the algorithm only takes a long time in the preprocessing process, but has a high query efficiency on the transaction network after processing. This feature is particularly crucial in a large blockchain transaction network. High mining accuracy means that the algorithm models the problem from the perspective of operations research and attempts to find a solution for the locally optimal solution using the greedy algorithm.
[0121] At the software level, the present application also provides a device for mining associated transaction addresses for a blockchain network for executing all or part of the method for mining associated transaction addresses for a blockchain network. Refer to Figure 7 The device for mining associated transaction addresses for a blockchain network specifically includes the following:
[0122] The connected component determination module 10 is used to determine the starting node in the connected component digraph corresponding to the starting vertex in the blockchain transaction digraph and the destination node in the connected component digraph corresponding to the destination vertex in the blockchain transaction digraph; wherein, each vertex in the blockchain transaction digraph represents each transaction address in the blockchain network, and the edge in the blockchain transaction digraph represents the transaction between the two vertices connected by the edge; each node in the connected component digraph corresponds one-to-one with each strongly connected component corresponding to the blockchain transaction digraph, and each strongly connected component contains multiple vertices, and each edge in the connected component digraph is used to represent the one-way connection relationship between each strongly connected component.
[0123] The routing table filling module 20 is used to find all adjacent nodes corresponding to the starting node in the connected component digraph and fill the routing table of the starting node according to the routing tables of each of the adjacent nodes, where the routing table is used to store the corresponding relationship between the unique identifier of each node reachable by the corresponding node in the connected component digraph and the reachability vector representing the reachable path, and the reachability vector is composed of at least one node.
[0124] The reachable path extraction module 30 is used to check whether the unique identifier of the destination node is included in the filled routing table of the starting node. If so, extract the reachability vector corresponding to the unique identifier of the destination node, and extract from the blockchain transaction digraph the reachable path graph composed of each node in the reachability vector and the strongly connected component corresponding to the destination node respectively, so as to use the reachable path graph as the mining result data of the associated transaction address from the starting vertex to the destination vertex.
[0125] The embodiments of the associated transaction address mining device for a blockchain network provided in this application can specifically be used to execute the processing procedures of the embodiments of the associated transaction address mining method for a blockchain network in the above embodiments. Its functions will not be elaborated here, and reference can be made to the detailed description of the embodiments of the associated transaction address mining method for a blockchain network above.
[0126] The part of the associated transaction address mining device for a blockchain network for conducting associated transaction address mining for a blockchain network can be executed in a server or completed in a client device. Specifically, it can be selected according to the processing capabilities of the client device and the limitations of the user usage scenario, etc. This application does not make any limitations in this regard. If all operations are completed in the client device, the client device may further include a processor for specific processing of associated transaction address mining for a blockchain network.
[0127] The above client device may have a communication module (i.e., a communication unit) and can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and in other implementation scenarios, it may also include a server of an intermediate platform, such as a server of a third-party server platform having a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster composed of multiple servers, or a server structure of a distributed device.
[0128] Any suitable network protocol can be used for communication between the above server and the client device side, including network protocols not yet developed on the filing date of this application. The network protocol may, for example, include TCP / IP protocol, UDP / IP protocol, HTTP protocol, HTTPS protocol, etc. Of course, the network protocol may, for example, also include the RPC protocol (Remote Procedure Call Protocol) and REST protocol (Representational State Transfer) used on top of the above protocols, etc.
[0129] As can be seen from the above description, the associated transaction address mining device for a blockchain network provided in the embodiments of this application can effectively improve the efficiency of associated transaction address mining on the basis of ensuring the comprehensiveness of associated transaction address mining in the blockchain network, and further improve the efficiency of subsequent applications such as abnormal transaction detection based on the associated transaction address.
[0130] An embodiment of the present application further provides an electronic device, which may include a processor, a memory, a receiver, and a transmitter. The processor is configured to execute the method for mining associated transaction addresses for a blockchain network mentioned in the above embodiments. The processor and the memory may be connected through a bus or other means. Taking the bus connection as an example, the receiver may be connected to the processor and the memory in a wired or wireless manner.
[0131] The processor may be a Central Processing Unit (CPU). The processor may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., or a combination of the above types of chips.
[0132] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions / modules corresponding to the method for mining associated transaction addresses for a blockchain network in the embodiments of the present application. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory, that is, to implement the method for mining associated transaction addresses for a blockchain network in the above method embodiments.
[0133] The memory may include a program storage area and a data storage area. Among them, the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely set relative to the processor, and these remote memories may be connected to the processor through a network. Examples of the above networks include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0134] The one or more modules are stored in the memory and, when executed by the processor, execute the method for mining associated transaction addresses for a blockchain network in the embodiments.
[0135] In some embodiments of the present application, the user equipment may include a processor, a memory, and a transceiver unit. The transceiver unit may include a receiver and a transmitter. The processor, the memory, the receiver, and the transmitter may be connected through a bus system. The memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to control the transceiver unit to transmit and receive signals.
[0136] As an implementation manner, the functions of the receiver and the transmitter in the present application may be considered to be implemented through a transceiver circuit or a dedicated chip for transceiver. The processor may be considered to be implemented through a dedicated processing chip, a processing circuit, or a general-purpose chip.
[0137] As another implementation manner, it may be considered to use a general-purpose computer to implement the server provided in the embodiments of the present application. That is, the program codes for implementing the functions of the processor, the receiver, and the transmitter are stored in the memory, and the general-purpose processor implements the functions of the processor, the receiver, and the transmitter by executing the codes in the memory.
[0138] The embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the foregoing method for mining associated transaction addresses for a blockchain network are implemented. The computer-readable storage medium may be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0139] The embodiments of the present application further provide a computer program product, including a computer program, which implements the foregoing method for mining associated transaction addresses for a blockchain network when executed by a processor.
[0140] Those of ordinary skill in the art should understand that the various exemplary components, systems, and methods described in combination with the embodiments disclosed herein can be implemented in hardware, software, or a combination of the two. Specifically, whether to execute in hardware or software depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application. When implemented in hardware, it may be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment may be stored in a machine-readable medium, or transmitted through a data signal carried in a carrier wave on a transmission medium or a communication link.
[0141] It should be clear that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present application.
[0142] In the present application, features described and / or illustrated for one embodiment can be used in the same or similar manner in one or more other embodiments, and / or combined with the features of other embodiments or replace the features of other embodiments.
[0143] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and variations can be made to the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for mining associated transaction addresses in a blockchain network, characterized in that: include: Determine that the starting vertex in the blockchain transaction directed graph corresponds to the starting node in the connected component directed graph and the destination vertex in the blockchain transaction directed graph corresponds to the destination node in the connected component directed graph; wherein each vertex in the blockchain transaction directed graph represents each transaction address in the blockchain network, and an edge in the blockchain transaction directed graph represents a transaction between two vertices connected by the edge; each node in the connected component directed graph corresponds one-to-one to each strongly connected component corresponding to the blockchain transaction directed graph, and each of the strongly connected components includes multiple vertices, and each edge in the connected component directed graph is used to represent a unidirectional connection relationship between each of the strongly connected components; Searching for all adjacent nodes corresponding to the start node in the connected component directed graph, and filling the routing table of the start node according to the respective routing tables of the adjacent nodes, wherein the routing table is used to store the corresponding relationship between the unique identifiers of the respective nodes reachable by the corresponding node in the connected component directed graph and the reachable vectors used to represent the reachable path, wherein the reachable vectors are composed of at least one of the nodes; In the filled routing table of the starting node, check whether the unique identifier of the destination node is included. If so, extract the reachable vector corresponding to the unique identifier of the destination node, and extract the reachable path graph consisting of each node in the reachable vector and the strongly connected components corresponding to each destination node from the blockchain transaction directed graph, so as to use the reachable path graph as the associated transaction address mining result data from the starting vertex to the destination vertex.
2. The method for mining associated transaction addresses for a blockchain network according to claim 1, characterized in that: Before determining that the starting vertex in the blockchain transaction directed graph corresponds to the starting node in the connected component directed graph and the destination vertex in the blockchain transaction directed graph corresponds to the destination node in the connected component directed graph, the method further includes: Each transaction address in the blockchain network is used as a different vertex, and the transactions between each transaction address are used as different edges to construct a blockchain transaction directed graph; Construct a connected component directed graph corresponding to the blockchain transaction directed graph.
3. The method for mining associated transaction addresses for a blockchain network according to claim 2, characterized in that: The step of constructing a connected component directed graph corresponding to the blockchain transaction directed graph includes: Extracting each strongly connected component from the blockchain transaction directed graph based on the Tarjan algorithm; According to the connection relationship between each of the strongly connected components in the blockchain transaction directed graph, a connected component directed graph is constructed with each of the strongly connected components as a node; A unique identifier and a routing table are respectively set for each of the nodes in the connected component directed graph.
4. The method for mining associated transaction addresses for a blockchain network according to claim 1, characterized in that: Before determining that the starting vertex in the blockchain transaction directed graph corresponds to the starting node in the connected component directed graph and the destination vertex in the blockchain transaction directed graph corresponds to the destination node in the connected component directed graph, the method further includes: Receiving a request for mining an associated transaction address, wherein the request for mining an associated transaction address includes a starting transaction address and an end transaction address; The vertex corresponding to the starting point transaction address is determined from the blockchain transaction directed graph as the starting vertex, and the vertex corresponding to the ending point transaction address is determined from the blockchain transaction directed graph as the destination node.
5. The method for mining associated transaction addresses for a blockchain network according to claim 4, characterized in that: The associated transaction address mining request also includes a mining rate; Correspondingly, the method for mining associated transaction addresses for a blockchain network also includes: If the associated transaction address mining result data shows that the reachable path from the starting vertex to the destination vertex is not unique, the traffic loss rate of each reachable path in the associated transaction address mining result data is solved based on the greedy algorithm and the mining rate, and the reachable path corresponding to the maximum value of each traffic loss rate is confirmed as the target reachable path from the starting vertex to the destination vertex.
6. The method for mining associated transaction addresses for a blockchain network according to claim 4, characterized in that: Before determining that the starting vertex in the blockchain transaction directed graph corresponds to the starting node in the connected component directed graph and the destination vertex in the blockchain transaction directed graph corresponds to the destination node in the connected component directed graph, the method further includes: A mapping data table is constructed, wherein the mapping data table is used to store the corresponding relationship between each of the vertices and the corresponding nodes.
7. The method for mining associated transaction addresses for a blockchain network according to claim 6, characterized in that: The step of determining that a starting vertex in the blockchain transaction directed graph corresponds to a starting node in the connected component directed graph and a destination vertex in the blockchain transaction directed graph corresponds to a destination node in the connected component directed graph includes: The node corresponding to the starting vertex is searched from the mapping data table to serve as the starting node, and the node corresponding to the destination vertex is searched from the mapping data table to serve as the destination node.
8. A device for mining associated transaction addresses for a blockchain network, characterized in that: include: A connected component determination module, used to determine that the starting vertex in the blockchain transaction directed graph corresponds to the starting node in the connected component directed graph and the destination vertex in the blockchain transaction directed graph corresponds to the destination node in the connected component directed graph; wherein each vertex in the blockchain transaction directed graph represents each transaction address in the blockchain network, and an edge in the blockchain transaction directed graph represents a transaction between two vertices connected by the edge; each node in the connected component directed graph corresponds to each strongly connected component corresponding to the blockchain transaction directed graph in a one-to-one correspondence, and each of the strongly connected components includes multiple vertices, and each edge in the connected component directed graph is used to represent a unidirectional connection relationship between each of the strongly connected components; A routing table filling module, used for searching all adjacent nodes corresponding to the starting node in the connected component directed graph, and filling the routing table of the starting node according to the respective routing tables of the adjacent nodes, wherein the routing table is used to store the corresponding relationship between the unique identifiers of the respective nodes reachable by the corresponding node in the connected component directed graph and the reachable vectors used to represent the reachable path, wherein the reachable vector is composed of at least one of the nodes; A reachable path extraction module is used to search whether the unique identifier of the destination node is included in the filled routing table of the starting node. If so, the reachable vector corresponding to the unique identifier of the destination node is extracted, and each node in the reachable vector and the reachable path graph consisting of the strongly connected components corresponding to the destination node are extracted from the blockchain transaction directed graph, so as to use the reachable path graph as the associated transaction address mining result data from the starting vertex to the destination vertex.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for mining associated transaction addresses for a blockchain network is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for mining associated transaction addresses for a blockchain network is implemented.
Citation Information
Patent Citations
Virtual currency address analysis method and system
CN117788158A
Block chain transaction association address discovery method and device
CN118690342A