Blockchain data tracking method, device and electronic device
By building a graph data model and querying target nodes, the problem of low blockchain data tracking efficiency is solved, and efficient data tracking and supervision is achieved.
Patent Information
- Application Number
- CN202210776279.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2042-06-29
AI Technical Summary
Existing blockchain data tracking methods are inefficient and have large resource occupancy, making it difficult to quickly retrieve and filter data in a blockchain environment with high transaction volume.
Build the address and transaction data in the blockchain into a graph model, configure the attributes through nodes and directed edges in the graph data model, determine the target nodes of the problem address, and find the nodes containing identity information based on directed edges, and optimize the Transaction link query to improve efficiency.
Through the construction and query of graph data models, the efficiency of blockchain data tracking is significantly improved, the computing complexity and resource occupation are reduced, and the rapid supervision and tracking of suspicious addresses is achieved.
Smart Images

Figure CN115049493B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain data tracking method, device and electronic device. Background Art
[0002] Due to the decentralized and anonymous characteristics of blockchain, when regulating transactions on the chain, the regulatory authorities usually use a method of locating the problem address through a layer-by-layer transaction chain to some platforms that can verify real-name information, retrieve the identity information of the user corresponding to the problem address, and then determine the transaction amount of the account corresponding to the problem address by summarizing the transaction information of the problem address. The regulatory information is fixed through the evidence of the user's identity information and the corresponding transaction amount. When fixing the user's identity information, it is usually only necessary to know the problem address and which addresses have had transactions, without paying attention to the time of the transaction and whether a transaction is related to the funds of the problem address. When fixing the transaction amount information, it is the opposite. It does not care where the funds eventually flow to, but only cares whether the funds flowing out of a certain address belong to the funds of the problem address; it can be understood that when tracking transactions, it is necessary to pay attention to the order of transactions in the time dimension; assuming that the problem address (addr1) transfers a sum of money to the address (addr2), then the funds transferred from addr2 after the transaction may be funds associated with addr1.
[0003] The commonly used data tracking method is to read all transaction information of the problem address, obtain the address associated with the transaction information, and then obtain the transaction information of these associated addresses in turn, and repeat this process. All transactions are traversed using the depth-first or breadth-first method, and transactions that meet the tracking requirements are screened out for calculation, and finally the tracking result data is obtained. However, the existing method needs to filter all transactions of the target problem address. The transaction volume is huge. There may be tens of thousands of transaction data between any two addresses in the database, and they must be read as data to be screened during retrieval. In the case where the address and transaction data on the blockchain are generally in the order of hundreds of millions, the data tracking retrieval performance is extremely low and the resource usage is extremely large. Therefore, it is urgent to propose a new blockchain data tracking method to improve the efficiency of blockchain data tracking. Summary of the invention
[0004] Therefore, the technical problem to be solved by the present invention is to overcome the defect of low efficiency of the existing blockchain problem data tracking method, thereby providing a blockchain data tracking method, device and electronic device.
[0005] According to the first aspect, an embodiment of the present invention discloses a blockchain data tracking method, including: traversing the addresses contained in the blockchain and the transaction data between the addresses; constructing a graph data model by using the traversed blockchain addresses as nodes of the graph model and the flow direction of the transaction data between the addresses corresponding to any two nodes as the directed edges of the graph model; performing attribute data configuration operations on the nodes and directed edges in the graph data model, the attribute data of the nodes including: an address identifier corresponding to the node; determining a target node corresponding to the problem address in the graph data model, and starting from the target node, determining other nodes connected to the target node according to the directed edges of the graph data model until a node containing a target identifier is found, wherein the target identifier is an identifier used to indicate identity information.
[0006] Optionally, the method further includes: when the problem address includes multiple addresses, performing an operation of searching for a corresponding node containing a target identifier for each target node corresponding to the problem address.
[0007] Optionally, the method further includes: taking the found node containing the target identifier as a new target node, and repeating the step of determining other nodes connected to the target node according to the directed edges of the graph data model starting from the target node, until the node containing the target identifier corresponding to the new target node is found.
[0008] Optionally, the attribute data of the directed edge includes: the total number of transactions between two nodes, the total transaction amount, and the first start time and the last end time corresponding to all transactions; the method also includes: when a node containing a target identifier corresponding to any target node is found, among all the directed edges from the target node to the node containing the target identifier, determining the first target directed edge whose flow direction is outward from the target node; determining whether the last end time of all transactions of each of the first target directed edges is later than the funds inflow time of the target node corresponding to the problem address based on the attribute data of the first target directed edge; taking the first target directed edge whose last end time is later than the funds inflow time of the target node corresponding to the problem address as the second target directed edge and determining whether the first start time of all transactions of each of the second target directed edges is later than the funds inflow time; if it is later than the funds inflow time, taking all transaction data in the second target directed edge as problem transaction data.
[0009] Optionally, the method also includes: in the process of searching for a corresponding node containing a target identifier starting from any target node in the graph data model, when the nodes found consecutively for multiple times do not contain the target identifier, the search operation for the node containing the target identifier corresponding to the target node is stopped in response.
[0010] Optionally, the method of constructing a graph data model by taking the addresses of the traversed blockchain as nodes of the graph model and taking the flow direction of transaction data between any two traversed addresses as directed edges of the graph model includes: taking multiple addresses containing the same address attribution information as a node of the graph model.
[0011] According to the second aspect, an embodiment of the present invention further discloses a blockchain data tracking device, comprising: a traversal module, used to perform traversal operations on addresses contained in the blockchain and transaction data between addresses; a construction module, used to construct a graph data model by using the addresses of the traversed blockchain as nodes of the graph model and the flow direction of transaction data between addresses corresponding to any two nodes as directed edges of the graph model; a configuration operation, used to perform attribute data configuration operations on the nodes and directed edges in the graph data model, the attribute data of the node including: an address identifier corresponding to the node; a search module, used to determine the target node corresponding to the problem address in the graph data model, and starting from the target node, determine other nodes connected to the target node according to the directed edges of the graph data model until a node containing a target identifier is found, wherein the target identifier is an identifier used to indicate identity information.
[0012] Optionally, the search module is further configured to, when the problem address includes multiple addresses, perform an operation of searching for a corresponding node containing a target identifier for each target node corresponding to the problem address.
[0013] According to the third aspect, an embodiment of the present invention also discloses an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor performs the steps of the blockchain data tracking method as described in the first aspect or any optional embodiment of the first aspect.
[0014] According to the fourth aspect, an embodiment of the present invention further discloses a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the blockchain data tracking method as described in the first aspect or any optional embodiment of the first aspect are implemented.
[0015] The technical solution of the present invention has the following advantages:
[0016] The blockchain data tracking method / device provided by the present invention performs a traversal operation on the addresses and transaction data between addresses contained in the blockchain, uses the traversed blockchain addresses as nodes of the graph model and uses the flow direction of transaction data between addresses corresponding to any two nodes as directed edges of the graph model to construct a graph data model, performs attribute data configuration operations on the nodes and directed edges in the graph data model, determines the target node corresponding to the problem address in the graph data model, and determines other nodes connected to the target node from the target node according to the directed edges of the graph data model until a node containing a target identifier is found, where the target identifier is an identifier that can be used to indicate identity information. By traversing the addresses and transaction data between addresses contained in the blockchain and constructing a corresponding graph data model, a transaction link query is performed on the target node corresponding to the problem address in combination with the identification information of the nodes in the graph data model until a node containing an identifier that can be used to indicate identity information is found; by tracking the node containing an identifier that can be used to indicate identity information, the address that may be associated with the problem address can be supervised through the identity information, and the address that may be associated with the problem address is tracked in combination with the graph data model, thereby improving the efficiency of blockchain data tracking. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 This is a flowchart of a specific example of a blockchain data tracking method in an embodiment of the present invention;
[0019] Figure 2 This is a schematic diagram of an application scenario of the blockchain data tracking method in an embodiment of the present invention;
[0020] Figure 3 It is a principle block diagram of a specific example of a blockchain data tracking device in an embodiment of the present invention;
[0021] Figure 4 FIG. 4 is a specific example diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0024] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0025] The embodiment of the present invention discloses a blockchain data tracking method, which can be applied to a data tracking platform. By merging transaction data of the same transaction flow direction for business modeling, a graph data model that meets the tracking requirements is constructed, and abstract graph data and full transaction information are used to track data together, so as to achieve the purpose of accelerating retrieval speed and improving system performance. This method is not limited to a certain blockchain and is suitable for all blockchain data tracking scenarios. Figure 1 As shown, the method comprises the following steps:
[0026] Step 101, traverse the addresses contained in the blockchain and the transaction data between the addresses;
[0027] Exemplarily, the blockchain can be any blockchain for data tracking. The embodiment of the present application does not limit the type of the blockchain, as long as the full transaction data contained in the blockchain can be obtained, where the full transaction data may include but is not limited to transaction hash, transaction sending address, transaction receiving address, transaction amount and transaction time, etc. The full transaction data can be obtained from an authorized database that records the full transaction data of the blockchain.
[0028] Step 102, constructing a graph data model by taking the addresses of the traversed blockchain as nodes of the graph model and taking the flow direction of transaction data between the addresses corresponding to any two nodes as directed edges of the graph model;
[0029] Exemplarily, each transaction address on the traversed blockchain can be used as a node of the graph model, and multiple addresses containing the same address attribution information can be used as a node of the graph model. For example, if the attribute information of the multiple addresses traversed contains the address information of the same trading platform, it can be shown that these addresses come from a trading platform. Then, the multiple addresses are merged as a node of the graph model to construct the graph data model, which reduces the amount of data for model construction and the dimension of the constructed graph data model, and improves the efficiency of subsequent use of the graph data model for suspicious data tracking. For transaction data between any two nodes, the directed edges of the graph model are constructed according to the flow direction of the transaction data between their corresponding addresses. That is, when there are multiple transactions between node A and node B from node A to node B, it is only necessary to construct a directed edge from node A to node B between node A and node B. By constructing directed edges according to the flow direction of transaction data between two addresses, the data complexity and data volume of the constructed graph data model are reduced. An address on the blockchain or a cluster of addresses with the same attributes is constructed as a node, recorded as Node; all transactions on the blockchain are traversed in sequence, and multiple transaction data between two nodes are merged according to the transaction direction to construct a directed edge, recorded as Edge. After traversing all blockchain data, a graph constructed by nodes and directed edges will be constructed.
[0030] Step 103, perform attribute data configuration operations on the nodes and directed edges in the graph data model, the attribute data of the nodes include: the address identifier corresponding to the node; illustratively, the address identifier corresponding to the node includes but is not limited to the platform identifier belonging to a certain trading platform, the node amount, etc., and those skilled in the art can set it according to actual business needs.
[0031] Specifically, Figure 2It is shown as a schematic diagram of a graph data model, which includes nodes A, B and T. The directed edge from node A to node B includes four attribute information, namely, the total number of transactions (Count), the total transaction amount (Value), the first start time (Begin) and the last end time (End) corresponding to all transactions, wherein "1500393600" and "1635004800" in the figure are timestamp representation forms, "1500393600" is the timestamp corresponding to the first start time of 10 transactions between node A and node B, and "1635004800" is the timestamp corresponding to the last end time of 10 transactions between node A and node B. The attribute information of node T includes: the label of the node (Label), the label of node T in the embodiment of the present application is a wallet (Wallet), and the current remaining amount of the node (Balance). Those skilled in the art can flexibly set it according to actual needs.
[0032] Step 104, determine the target node corresponding to the problem address in the graph data model, and starting from the target node, determine other nodes connected to the target node according to the directed edges of the graph data model until a node containing a target identifier is found, where the target identifier is an identifier used to indicate identity information.
[0033] Exemplarily, the problem address may be an address that needs to be tracked and supervised and obtained from other regulatory platforms; or it may be an address that may have problems and is captured by an algorithm when actually analyzing transaction data on the blockchain. The embodiment of the present application does not limit the source of the problem address. After determining the target node corresponding to the problem address in the graph data model, the node associated with the target node is searched in the graph data model according to the link constructed by the directed edge starting from the target node until a node containing an identifier that can be used to indicate identity information is found. Since the node contains an identifier that can be used to indicate its identity information, the identity information of the node can then be determined by the identifier, and then the address corresponding to the node can be used as a suspicious problem address associated with the problem address to achieve subsequent tracking and monitoring of the suspicious problem address. When the identifier that can be used to indicate the identity information contained in the found node is the identifier of a platform that can perform real-name information verification, it indicates that the identity information of the node can be determined on the platform that can perform real-name information verification, and then the address corresponding to the node can be tracked and monitored.
[0034] As an optional implementation of the present invention, the method further includes: when the problem address includes multiple, performing an operation of searching for a corresponding node containing a target identifier for each target node corresponding to the problem address. Exemplarily, when multiple problem addresses are obtained and an associated address query is required, the steps of the above embodiment are repeated to perform a search operation for other nodes. Please refer to the above embodiment for details, which will not be repeated here.
[0035] As an optional embodiment of the present invention, the method also includes: taking the node containing the target identifier found as a new target node, repeating the step of determining other nodes connected to the target node according to the directed edges of the graph data model starting from the target node, until the node containing the target identifier corresponding to the new target node is found.
[0036] Exemplarily, for any target node, when a corresponding node containing a target identifier is found, the node containing the target identifier is used as the new target node for the next round of suspicious node search operation. For the specific search method, please refer to the above embodiment and will not be repeated here. Starting from the target node, search for nodes connected by directed edges in turn to see if these nodes have specified labels (i.e., identifiers that can be used to characterize identity information). If not, repeat the above process until a node with a specified label is found. Since the abstract graph structure merges a large number of transactions, the total amount of data is significantly reduced, which reduces the computational complexity of locating nodes with specified labels and improves data tracking efficiency.
[0037] As an optional implementation of the present invention, the attribute data of the directed edge includes: the total number of transactions between two nodes, the total transaction amount, and the first start time and the last end time corresponding to all transactions; the method also includes:
[0038] When a node containing a target identifier corresponding to any target node is found, among all directed edges from the target node to the node containing the target identifier, the first target directed edge whose flow direction is from the target node is determined; for example, when Figure 2 Node A in is the target node, then the first target directed edge is the directed edge from node A to node B and the directed edge from node B to node T, that is, the transaction direction corresponding to the first target directed edge is the transaction outflow direction of the target node.
[0039] Determine, based on the attribute data of the first target directed edge, whether the final end time of all transactions of each of the first target directed edges is later than the capital inflow time of the target node corresponding to the problem address; use the first target directed edge whose final end time is later than the capital inflow time of the target node corresponding to the problem address as the second target directed edge and determine whether the first start time of all transactions of each of the second target directed edges is later than the capital inflow time; if later than the capital inflow time, use all transaction data in the second target directed edge as problem transaction data.
[0040] For example, Figure 2 Taking the first target directed edge between node B and node T as an example, the capital inflow time can be the time when the target node A first has a transaction with node B. When there is a transaction between target node A and node B, the capital of target node A will flow into node B. When the latest end time of all transactions between node B and node T is not later than the capital inflow time of target node A, it means that the capital transfer involved in all transactions between node B and node T is completed before the capital of target node A enters B. That is, it can be determined that the transaction situation between node B and node T has nothing to do with the problem node A. In the process of determining the problem transaction data, there is no need to retrieve and calculate the transaction data of this directed edge. Only the first target directed edge whose last end time is later than the capital inflow time of the target node corresponding to the problem address can be used, and the first target directed edge whose last end time is later than the capital inflow time of the target node corresponding to the problem address can be used as the second target directed edge.
[0041] Since the attribute information of the directed edge only includes the first start time and the last end time of all transactions in the method recorded in the embodiment of the present application in order to improve the tracking efficiency, when the first start time of all transactions of each second target directed edge is later than the capital inflow time, all transaction data in the second target directed edge are used as problematic transaction data. For example, when the first start time of the transaction between node B and node T is later than the capital inflow time of target node A, the transaction between node B and node T may involve the problematic capital flow of target node A. At this time, all transaction data in the second target directed edge corresponding to node B and node T are used as problematic transaction data for subsequent further supervision. In the process of searching for problematic transaction data in the embodiment of the present application, additional algorithm filters can be attached to eliminate some directed edges that do not meet the additional conditions (such as directed edges trapped in a loop) to make the algorithm more accurate and efficient.
[0042] As an optional embodiment of the present invention, the method also includes: in the process of searching for a corresponding node containing a target identifier starting from any target node in the graph data model, when the nodes found consecutively for multiple times do not contain the target identifier, the search operation for the node containing the target identifier corresponding to the target node is stopped in response.
[0043] Exemplarily, when the problem address includes multiple ones, in order to ensure the efficiency of searching for the associated addresses of other problem addresses, for any target node, when searching for its associated nodes, if the nodes found for multiple consecutive times (such as 3 times) do not contain the target identifier, the response is to stop searching for the node containing the target identifier corresponding to the target node.
[0044] As a specific implementation of the present application, this embodiment takes any target blockchain as an example to track abnormal addresses of the target blockchain. The tracking platform for data tracking integrates a blockchain data parsing program, a transaction graph construction program, a transaction data tracking program, and an algorithm filter for directed edge screening. The tracking platform can obtain the full transaction data from a database (MySQL) containing the full transaction data of the target blockchain, and can store the constructed graph data model in a graph database (Neo4j).
[0045] Step 1: parse the full transaction data on the target blockchain through the blockchain data parsing program, use the transaction hash as the primary key, and store all transaction data in the full transaction database. Each piece of data contains the transaction hash, sending address, receiving address, transaction amount, and transaction time.
[0046] Step 2: Calculate the data in the full transaction database through the transaction graph construction program, build a graph data model of the transaction, store the model in the graph database, and import the attribute information of nodes and directed edges into the graph data model;
[0047] Step 3: Based on the initial target address, the transaction data tracking program uses graph algorithms in the graph database Neo4j to query the transaction link within the specified tracking level and locate the address corresponding to the node with specific annotation information (i.e., target identifier). The suspicious person can be identified by verifying the actual controller information corresponding to the address.
[0048] Step 4: Enter the initial target address in the transaction data tracking program, confirm the time of fund inflow, use the address as the input, use the graph algorithm in the graph database Neo4j to count all transaction outflow edges, and calculate the first and last times on the edges, and remove all edges whose last inflow time is earlier than the target address fund inflow time;
[0049] Step 5: retain all edges whose first fund inflow time is later than the target address fund inflow time. Optionally, additional algorithm filters can be used to remove some edges that do not meet the conditions.
[0050] Step 6: Among the remaining directed edges, obtain all transaction information in the directed edges from the full transaction database MySQL through the transaction data tracking program, and select all transactions later than the time of fund inflow to the target address for calculation based on the time record. Optionally, some transaction information that does not meet the conditions can be eliminated through additional algorithm filters;
[0051] Step 7: Select a transaction outflow address with a directed edge from the target address as the new target address, and repeat steps 4, 5, and 6 in sequence until all outflow addresses meet the hierarchical settings or reach an address with a specific label.
[0052] Starting from the target node, search for nodes connected by directed edges in turn to see if these nodes have the specified label. If not, repeat the above process until a node with the specified label is found. Since the abstract graph structure merges a large number of transactions, the total amount of data is significantly reduced, which reduces the computational complexity of locating nodes with specified labels and improves data tracking efficiency.
[0053] The embodiment of the present invention also discloses a blockchain data tracking device, such as Figure 3 As shown, the device comprises:
[0054] The traversal module 301 is used to traverse the addresses contained in the blockchain and the transaction data between the addresses;
[0055] A construction module 302 is used to construct a graph data model by using the addresses of the traversed blockchain as nodes of the graph model and using the flow direction of transaction data between the addresses corresponding to any two nodes as directed edges of the graph model;
[0056] Configuration operation 303 is used to perform attribute data configuration operation on the nodes and directed edges in the graph data model, wherein the attribute data of the nodes include: address identifiers corresponding to the nodes;
[0057] The search module 304 is used to determine the target node corresponding to the problem address in the graph data model, and starting from the target node, determine other nodes connected to the target node according to the directed edges of the graph data model until a node containing a target identifier is found, where the target identifier is an identifier used to indicate identity information.
[0058] The blockchain data tracking device provided by the present invention traverses the addresses contained in the blockchain and the transaction data between the addresses and constructs a corresponding graph data model, and performs a transaction link query on the target node corresponding to the problem address in combination with the identification information of the nodes in the graph data model, until a node containing an identification for indicating identity information is found; by tracking the node containing an identification for indicating identity information, addresses that may be associated with the problem address can be supervised through the identity information, and addresses that may be associated with the problem address are tracked in combination with the graph data model, thereby improving the efficiency of blockchain data tracking.
[0059] As an optional implementation manner of the present invention, the search module is further used for, when the problem address includes multiple addresses, to perform an operation of searching for a corresponding node containing a target identifier for each target node corresponding to the problem address.
[0060] As an optional embodiment of the present invention, the search module is also used to take the node containing the target identifier that is found as a new target node, and repeat the step of determining other nodes connected to the target node according to the directed edges of the graph data model starting from the target node, until the node containing the target identifier corresponding to the new target node is found.
[0061] As an optional embodiment of the present invention, the attribute data of the directed edge includes: the total number of transactions between two nodes, the total transaction amount, and the first start time and the last end time corresponding to all transactions; the device also includes: a first determination module, which is used to determine, when a node containing a target identifier corresponding to any target node is found, the first target directed edge whose flow direction is from the target node among all the directed edges from the target node to the node containing the target identifier; a second determination module, which is used to determine, based on the attribute data of the first target directed edge, whether the last end time of all transactions of each of the first target directed edges is later than the capital inflow time of the target node corresponding to the problem address; a third determination module, which is used to use the first target directed edge whose last end time is later than the capital inflow time of the target node corresponding to the problem address as the second target directed edge and determine whether the first start time of all transactions of each of the second target directed edges is later than the capital inflow time; and a judgment module, which is used to use all transaction data in the second target directed edge as problem transaction data if it is later than the capital inflow time.
[0062] As an optional embodiment of the present invention, the device also includes: a stop search module, which is used to stop the search operation of the node containing the target identifier corresponding to any target node in the graph data model when the nodes found consecutively for multiple times do not contain the target identifier.
[0063] As an optional implementation manner of the present invention, the construction module is further used to use multiple addresses containing the same address attribution information as a node of the graph model.
[0064] The embodiment of the present invention further provides an electronic device, such as Figure 4 As shown, the electronic device may include a processor 401 and a memory 402, wherein the processor 401 and the memory 402 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0065] The processor 401 may be a central processing unit (CPU). The processor 401 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0066] The memory 402 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the blockchain data tracking method in the embodiment of the present invention. The processor 401 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory 402, that is, the blockchain data tracking method in the above method embodiment is implemented.
[0067] The memory 402 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the processor 401, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 402 may optionally include a memory remotely arranged relative to the processor 401, and these remote memories may be connected to the processor 401 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0068] The one or more modules are stored in the memory 402, and when executed by the processor 401, the following is performed: Figure 1 The blockchain data tracking method in the illustrated embodiment.
[0069] For details of the above electronic equipment, please refer to Figure 1 The corresponding related descriptions and effects in the illustrated embodiments can be understood and will not be repeated here.
[0070] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0071] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A blockchain data tracking method, characterized in that: include: Traverse the addresses contained in the blockchain and the transaction data between addresses; The addresses of the traversed blockchain are used as nodes of the graph model, and the flow direction of transaction data between the addresses corresponding to any two nodes is used as the directed edge of the graph model to construct a graph data model; Performing attribute data configuration operations on the nodes and directed edges in the graph data model, wherein the attribute data of the nodes include: an address identifier corresponding to the node; the attribute data of the directed edges include: the first start time and the last end time corresponding to all transactions between two nodes; Determine a target node corresponding to the problem address in the graph data model, and determine other nodes connected to the target node based on the directed edges of the graph data model, until a node containing a target identifier is found, where the target identifier is an identifier used to indicate identity information; When a node including a target identifier corresponding to any target node is found, among all directed edges from the target node to the node including the target identifier, a first target directed edge whose flow direction is outward from the target node is determined among all directed edges; Determine, according to the attribute data of the first target directed edge, whether the final end time of all transactions of each of the first target directed edges is later than the capital inflow time of the target node corresponding to the problem address; Eliminate the first target directed edges whose last end time is later than the capital inflow time of the target node corresponding to the problem address, and use them as second target directed edges, and determine whether the first start time of all transactions of each of the second target directed edges is later than the capital inflow time; the edges that do not meet the conditions include: directed edges that fall into a loop; If it is later than the capital inflow time, all transaction data in the second target directed edge are regarded as problematic transaction data.
2. The method according to claim 1, characterized in that: The method further comprises: When the problem address includes multiple addresses, an operation of searching for a corresponding node containing a target identifier is performed for each target node corresponding to the problem address.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: The node containing the target identifier found is used as a new target node, and the step of determining other nodes connected to the target node according to the directed edges of the graph data model starting from the target node is repeated until a node containing the target identifier corresponding to the new target node is found.
4. The method according to claim 1, characterized in that: The attribute data of the directed edge also includes: the total number of transactions and the total transaction amount between the two nodes.
5. The method according to claim 1, characterized in that The method further comprises: In the process of searching for a corresponding node containing a target identifier starting from any target node in the graph data model, if the nodes found consecutively for multiple times do not contain the target identifier, the search operation for the node containing the target identifier corresponding to the target node is stopped in response.
6. The method according to claim 1, characterized in that The graph data model is constructed by taking the addresses of the traversed blockchain as nodes of the graph model and taking the flow direction of transaction data between any two traversed addresses as directed edges of the graph model, including: Multiple addresses containing the same address ownership information are taken as a node of the graph model.
7. A blockchain data tracking device, characterized in that: include: The traversal module is used to traverse the addresses contained in the blockchain and the transaction data between addresses; A construction module is used to construct a graph data model by taking the addresses of the traversed blockchain as nodes of the graph model and taking the flow direction of transaction data between the addresses corresponding to any two nodes as directed edges of the graph model; Configuration operation, used to perform attribute data configuration operation on the nodes and directed edges in the graph data model, wherein the attribute data of the nodes include: the address identifier corresponding to the node; the attribute data of the directed edges include: the first start time and the last end time corresponding to all transactions between two nodes; A search module is used to determine the target node corresponding to the problem address in the graph data model, and to determine other nodes connected to the target node from the target node according to the directed edges of the graph data model until a node containing a target identifier is found, wherein the target identifier is an identifier used to indicate identity information. When a node containing a target identifier corresponding to any target node is found, a first target directed edge whose flow direction is from the target node is determined among all directed edges from the target node to the node containing the target identifier; and a first target directed edge whose flow direction is from the target node is determined according to the attribute data of the first target directed edge. Determine whether the last end time of all transactions of each of the first target directed edges is later than the capital inflow time of the target node corresponding to the problem address; remove the first target directed edges whose last end time is later than the capital inflow time of the target node corresponding to the problem address, and use them as second target directed edges, and determine whether the first start time of all transactions of each of the second target directed edges is later than the capital inflow time; the edges that do not meet the conditions include: directed edges trapped in a loop; if later than the capital inflow time, all transaction data in the second target directed edges are used as problematic transaction data.
8. The device according to claim 7, characterized in that The search module is further configured to, when the problem address includes multiple addresses, perform an operation of searching for a corresponding node containing a target identifier for each target node corresponding to the problem address.
9. An electronic device, characterized in that: include: at least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor performs the steps of the blockchain data tracking method as described in any one of claims 1-6.
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 steps of the blockchain data tracking method as described in any one of claims 1 to 6 are implemented.
