Blockchain transaction address role identification method and device

By constructing directed multigraphs and multiview learning, combined with self-supervised comparative learning, the problems of data imbalance and insufficient robustness in blockchain transaction address identification are solved, achieving fine-grained role identification and improving identification accuracy and stability.

CN121544388BActive Publication Date: 2026-04-07NANJING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-19
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing blockchain transaction address identification technologies suffer from problems such as data imbalance, coarse identification granularity, and insufficient robustness when faced with massive, dynamic, and complex real transaction data, making it difficult to effectively identify specific roles in the transaction network.

Method used

We construct a weighted, temporal, and heterogeneous directed multigraph, select key nodes by computing node voting capabilities, generate fused embedding vectors by combining multi-view learning and self-supervised comparative learning, and use a hierarchical clustering algorithm for role classification.

Benefits of technology

It achieves high-precision identification of blockchain transaction address roles in scenarios lacking manual labeling, improving the robustness and interpretability of the model and enabling precise identification of fine-grained transaction roles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121544388B_ABST
    Figure CN121544388B_ABST
Patent Text Reader

Abstract

The application discloses a blockchain transaction address role identification method and device, comprising the following steps: constructing a unified blockchain interaction graph for account model public chain characteristics; calculating the voting ability of nodes and extracting key nodes; extracting statistical features of remaining nodes and constructing a statistical feature vector; generating a first embedding vector by aggregating the features and edge attributes of neighbor nodes; modeling a transaction sequence to generate a second embedding vector; splicing the first embedding vector and the second embedding vector to obtain a fusion embedding vector; and performing role division on the fusion embedding vector to identify different roles. The application can maintain high recognition accuracy in an open scene lacking artificial labeling labels, and the multi-view joint modeling mechanism effectively overcomes the defects of one-sided single view information and poor anti-interference ability, significantly improves the stability of role identification by fusing information in multiple dimensions such as local structure, time sequence behavior, global topology and feature similarity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain technology, and specifically to a method and device for identifying the role of a blockchain transaction address. Background Technology

[0002] Despite the progress made in existing blockchain regulatory and forensic technologies, the following significant limitations and technical bottlenecks remain when dealing with massive, dynamic, and complex real-world transaction data:

[0003] (1) Over-reliance on labeled data makes it difficult to cope with the real-world challenges of "label scarcity" and "extreme class imbalance". Most existing entity recognition technologies fall under the category of supervised learning, and their performance is highly dependent on large-scale, high-quality labeled datasets. However, in real blockchain transaction networks, the vast majority of addresses are anonymous, and users can generate new addresses infinitely at low cost. Known, clearly labeled data accounts for only a very small proportion of the massive amount of data, resulting in an extreme imbalance between "labeled data" and "unlabeled data". This skewed data distribution makes supervised models prone to overfitting and has poor generalization ability, making it difficult to effectively identify unlabeled hidden entities.

[0004] (2) The identification granularity is coarse, lacking a refined characterization of the specific "role" of the entity. Existing address tagging systems usually remain at the macro level of "scenario classification", that is, they can only identify which type of service institution the address belongs to. However, in the complex blockchain transaction network, knowing only the scenario type is far from enough. Existing technologies have failed to delve into the specific functional "role" that an entity plays in a specific scenario ecosystem, resulting in overly coarse regulatory granularity.

[0005] (3) Existing role recognition methods have technical defects in mining massive transaction data, with insufficient robustness and interpretability. When attempting to conduct deeper role mining, existing graph learning methods mainly face the following three major technical bottlenecks: weak noise resistance: the blockchain transaction network is essentially a highly sparse and noisy dynamic graph. Transactions contain a large amount of randomly generated transaction and other interference information. Existing methods are easily affected by the inherent randomness and noise in these graph structures, resulting in inaccurate feature extraction and insufficient robustness of the model; one-sided capture of structural information: most role recognition methods based on graph neural networks often only focus on the local neighborhood structure of nodes, while ignoring the global topological structure information that is crucial for identifying transaction groups; lack of domain knowledge integration: existing general graph algorithms often treat the blockchain transaction graph as an ordinary social network, failing to fully integrate the domain knowledge unique to blockchain. This not only limits the recognition accuracy but also leads to a lack of interpretability in the model output. Summary of the Invention

[0006] This invention aims to overcome the limitations of existing technologies that only identify transaction scenario types, and to achieve role-level behavior recognition of blockchain entities.

[0007] This invention provides a method for identifying the role of a blockchain transaction address, comprising the following steps:

[0008] Based on the characteristics of public blockchains with account models, a unified blockchain interaction graph is constructed, with wallet addresses as nodes and the transfer of fungible and non-fungible tokens defined as directed edges with attributes, forming a weighted, time-series, and heterogeneous directed multigraph.

[0009] The voting ability of the computing nodes is used to select nodes with high one-dimensional structural entropy and whose connections are distributed in a diverse set of neighbors as key nodes.

[0010] Statistical features of the remaining nodes are extracted from three dimensions: account status, transaction intensity, and transaction frequency. A statistical feature vector is constructed and used as an embedding for multi-view learning.

[0011] By aggregating the features and edge attributes of neighboring nodes, a role embedding reflecting local structural features, i.e., the first embedding vector, is generated; and by modeling the transaction sequence, a role embedding reflecting temporal behavior, i.e., the second embedding vector, is generated.

[0012] The first embedding vector and the second embedding vector are concatenated to obtain a fused embedding vector. A hierarchical clustering algorithm is then used to classify the fused embedding vector into roles and identify different roles.

[0013] Preferably, the directed multigraph is represented as G=(V,E), where the node set V includes externally owned accounts and contract accounts, each edge of the edge set E is represented as (u,v,a,m), u and v are wallet addresses, a is the transferred asset, where fungible tokens are represented by token type and amount, non-fungible tokens are represented by contract address and unique ID, and m is transaction metadata.

[0014] Preferably, the voting power of computing nodes and the process of extracting key nodes include:

[0015] Calculate the voting power of the address nodes, and initialize the voting power and voting score of each node v.

[0016] ,

[0017] in, and These represent the initial input and output voting capabilities of node v, respectively. and These represent the initial input vote score and the output vote score obtained from neighboring nodes, respectively. and Let the one-dimensional input and output structure entropies of node v be represented respectively; defined as ,

[0018] ,in Let v be the weighted in-degree of node v. Let v be the weighted out-degree of node v. This represents the total weight of all edges in the graph;

[0019] Calculate the input vote scores that node v obtains from its neighbors. and output voting scores :

[0020] ,

[0021] ,

[0022] in, This represents the output voting power of the input neighbor node u at the t-th iteration. This represents the input voting power of the output neighbor node u' at the t-th iteration, where u and u' represent the input and output neighbor nodes that interact with the target node v, respectively. and Let v represent the transaction amounts from v to u' and from u to v, respectively. and These represent the number of input neighbors and the number of output neighbors of node v, respectively.

[0023] In each iteration, select the highest... and the highest For key addresses with higher scores, the selected node will not participate in subsequent elections; for the input neighbors of the selected node, their output voting power will be reduced. ,in The average degree of graph G is the output neighbor of the selected node, which reduces its input voting power. Other voting ability values ​​remain unchanged;

[0024] Iterate until p key nodes are selected.

[0025] A further preferred method for generating the role embedding that reflects local structural features, i.e., the first embedding vector, includes:

[0026] For node i and its neighbor j, the attention coefficient is defined as , ;

[0027] in, This represents the transaction amount between nodes i and j, where N(i) refers to the neighborhood of node i. It is a weight matrix used to transform node features. It is a weight matrix used to transform edge features. It is a learnable weight vector. , These represent the statistical feature vectors of nodes i and j, respectively.

[0028] After passing through an L-layer augmented graph attention network, the first embedding vector of node i for ,in

[0029] For updating node i at level l, This is the activation function.

[0030] Furthermore, the process of generating role embeddings that reflect temporal behavior, i.e., the second embedding vector, includes:

[0031] For account u, sort all its transaction records in ascending order by timestamp to construct the original transaction sequence;

[0032] By zero-padding or truncating the sequence to a uniform length of S, a uniform sequence is obtained. ,

[0033] ;

[0034] Where x i (i=1,2,...,n) represents the feature vector of the i-th transaction record of account u, S is the preset uniform sequence length, and n is the actual number of historical transaction records of account u; Inputting the data into a Long Short-Term Memory (LSTM) network yields the second embedding vector. .

[0035] Furthermore, the method also includes a role optimization step, which includes introducing two-dimensional structural entropy minimization as a global structural constraint, a self-supervised contrastive learning mechanism, and joint training.

[0036] Preferably, the introduction of two-dimensional structural entropy minimization as a global structural constraint specifically involves, given the role partitioning results of graph G... Define the entropy loss for a two-dimensional structure: ,

[0037] Where L is the number of character clusters. Let v be the weighted in-degree of node v. For clusters The weighted in-degree sum of all nodes in the array. The number of edges that cross the cluster boundary. This represents the total weight of all edges in the graph;

[0038] minimize .

[0039] The self-supervised contrastive learning mechanism includes minimizing the Euclidean distance between node embeddings within the same cluster. This makes similar samples closer together; it maximizes the Euclidean distance between node embeddings in different clusters. This makes dissimilar samples further apart. The contrastive learning loss is... , where R k and R l Representing two distinct clusters, |R k |and|R l | represent the number of nodes, Z i and Z j These are the fused embedding vectors of nodes i and j, respectively.

[0040] The joint training specifically involves defining a total loss function: ,in, L represents the sum of the reconstruction losses corresponding to the first and second embedding vectors. G L represents the reconstruction loss of the first embedding vector. T This represents the reconstruction loss of the second embedding vector. For structural entropy constraint loss, To compare learning loss, is the tradeoff coefficient; minimize the total loss function L.

[0041] The present invention has significant beneficial effects in the following aspects:

[0042] (1) In terms of practical application: Through extensive verification on complex datasets, the present invention can still maintain high recognition accuracy in open scenarios where there is a lack of manual labeling, greatly reducing the dependence on expert experience and labeled data, and can help to quickly filter out abnormal roles from massive amounts of data.

[0043] (2) Model robustness: Through a two-stage identification strategy, the first stage, based on a voting mechanism, prioritizes the identification of key nodes with core influence, such as exchanges and large capital pools, as well as suspicious nodes exhibiting abnormal behavior, providing high-quality guidance information for the role identification of the remaining nodes in the second stage. Simultaneously, the multi-view joint modeling mechanism employed in this invention effectively overcomes the shortcomings of single-view information being one-sided and having poor anti-interference capabilities. By integrating information from multiple dimensions such as local structure, temporal behavior, global topology, and feature similarity, the stability of role identification is significantly improved.

[0044] (3) The constraint optimization from the perspective of two-dimensional structural entropy in this invention accurately captures the hidden topological features that are difficult to find by traditional methods by deeply mining the structural information entropy of the transaction network. This plays a decisive role in improving the overall performance of the model and greatly enhances the system's ability to conduct penetrating supervision in complex network environments. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is a flowchart of a blockchain transaction address role identification method according to the present invention. Detailed Implementation

[0047] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0048] It should be noted that the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.

[0049] This invention relates to a method for identifying the role of blockchain transaction addresses, aiming to overcome the limitations of existing technologies that only identify transaction scenario types and achieve role-level behavioral identification of blockchain entities. Unlike traditional address classification, which focuses on identifying macro-level entity labels, this embodiment can delve into the micro-level functional positioning and behavioral semantics of addresses within specific transaction networks, such as fine-grained roles like "fund transfer node," "payment terminal," and "revenue sharing hub." This fine-grained role profiling provides deep semantic information for understanding the operational mechanisms behind blockchain transactions, compensating for the shortcomings of traditional classification methods in perceiving internal organizational structures.

[0050] Unlike traditional community detection methods that tend to cluster nodes that frequently transfer funds to each other (focusing on connection density), the role identification in this invention focuses on the similarity of topological features—that is, some nodes may not have any financial transactions with each other, but they exhibit highly consistent transaction patterns in the network (such as the same in-degree ratio and similar neighbor structure features). By capturing this potential structural similarity, the identities of accounts with similar functions can be accurately identified in batches.

[0051] Specifically, one embodiment of the present invention provides a blockchain transaction address role identification method, which includes the following steps:

[0052] S1. Based on the characteristics of public blockchains with account models, a unified blockchain interaction graph is constructed, with wallet addresses as nodes and the transfer of fungible tokens (FT) and non-fungible tokens (NFT) defined as directed edges with attributes, forming a weighted, time-series, heterogeneous directed multigraph.

[0053] In some specific implementations, a directed multigraph can be represented as G=(V,E), where the node set V includes externally owned accounts and contract accounts, and each edge of the edge set E is represented as (u,v,a,m), where u and v are wallet addresses, a is the transferred asset, where fungible tokens are represented by token type and amount, non-fungible tokens are represented by contract address and unique ID, and m is transaction metadata (including timestamp, block number, gas fee, etc.), thereby uniformly capturing the flow relationships of different types of assets and providing a complete interactive network foundation for subsequent role identification.

[0054] S2. Calculate the voting ability of the nodes and select the nodes with high one-dimensional structural entropy and whose connections are distributed in a diverse set of neighbors as key nodes.

[0055] In blockchain transaction networks, some nodes exhibit atypical characteristics due to anomalies or their crucial role. Directly analyzing all nodes would increase the complexity of the task. Key nodes have greater influence and dissemination capabilities within the network; prioritizing the identification of these nodes can reduce redundant information, providing more accurate guidance and reference for subsequent role identification, thereby improving overall efficiency and accuracy.

[0056] Traditional centrality metrics cannot fully capture the dynamic interaction patterns and global structural complexity of blockchain networks. Voting behavior in token issuance and transfer can be viewed as the reverse process of node voting within the network. In a blockchain network, tokens flow from issuers to holders, a process similar to a central node distributing "votes"; from the holder's perspective, receiving tokens is equivalent to casting a "vote of confidence" in the issuer. Therefore, the inflow and outflow patterns of tokens reflect the influence and trustworthiness of nodes within the network, and this two-way flow essentially constitutes a mechanism for mutual voting among nodes.

[0057] Specifically, the voting power of computing nodes and the process of extracting key nodes include:

[0058] S201. Calculate the voting power of the address nodes. A node's voting power can be considered as its ability to propagate information or influence other nodes. First, initialize the voting power and voting score of each node v.

[0059]

[0060] in, and These represent the initial input and output voting capabilities of node v, respectively. and These represent the initial input vote score and the output vote score obtained from neighboring nodes, respectively. and These represent the one-dimensional input and output structural entropy of node v, respectively.

[0061] And again, ,in Let v be the weighted in-degree of node v. This represents the total weight of all edges in the graph; correspondingly, ,in Let v be the weighted out-degree of node v.

[0062] This step reflects the structural importance and scope of influence of a node in the network.

[0063] S202. Different roles differ significantly in directionality. For example, exchanges and service providers typically handle large volumes of inflow and outflow transactions, while project teams usually participate in outflow transactions. Therefore, each node v obtains input voting scores from its input and output neighbors, respectively. and output voting scores .

[0064] This step calculates the input vote scores that node v receives from its neighbors. and output voting scores :

[0065] , ,

[0066] in, and Let u and u' represent the input and output voting capabilities of node v in the t-th iteration, respectively, and u and u' represent the input neighbor nodes (incoming edge receiving nodes) and output neighbor nodes (outgoing edge receiving nodes) that interact with the target node v, respectively. and Let v represent the transaction amounts from v to u' and from u to v, respectively. and These represent the number of input neighbors and output neighbors of node v, respectively. This step comprehensively evaluates the actual level of support a node receives, fully characterizing the dual role of a node in a directed network.

[0067] In each iteration, select the highest... and the highest For key addresses with higher scores, the selected node will not participate in subsequent elections; for the input neighbors of the selected node, their output voting power will be reduced. ,in The average degree of graph G is the output neighbor of the selected node, which reduces its input voting power. Other voting power values ​​remain unchanged; iterate until p key nodes are selected.

[0068] This mechanism ensures that the identified key nodes are diverse and representative, covering different functional roles in the network (such as core roles like large exchanges, project teams, and fund pools).

[0069] S3. Statistical features of the remaining nodes are extracted from three dimensions: account status, transaction intensity, and transaction frequency. A statistical feature vector is constructed and used as an embedding for multi-view learning. These features reflect the flow patterns and activity levels of the addresses' funds, serving as the fundamental input for role recognition.

[0070] Specifically, account status features include account balance, number of redirects, etc.; transaction intensity features include input / output transaction amounts, gas fees, etc.; transaction frequency features involve the number of input and output transactions within a specific period. Then, aggregate features are derived through operations such as summation, averaging, variance, and Gini coefficient.

[0071] For the target account u, its set of input transactions is defined as T. in (u), the output transaction set is T out (u), the transaction amount is val.

[0072] (1) Account status characteristics: including account balance B u , defined as the net value of the account's cumulative inflows and cumulative outflows: ;

[0073] (2) Transaction intensity characteristics: including the total amount V of input and output transactions. total(u) : ;

[0074] (3) Transaction frequency characteristics: Characterizing the number of transactions within the time window Δt: ;

[0075] (4) Aggregation characteristics: The mean μ, variance σ², and Gini coefficient of the transaction amount are obtained through statistical operations:

[0076] ,

[0077] ,

[0078] Finally, construct the statistical feature vector. This serves as input for subsequent multi-view learning.

[0079] S4. By aggregating the features and edge attributes of neighboring nodes, a role embedding reflecting local structural features is generated, namely the first embedding vector; the transaction sequence is modeled to generate a role embedding reflecting temporal behavior, namely the second embedding vector.

[0080] First, in a blockchain transaction network, the number, distribution structure, and transaction amount of neighbors have significantly different impacts on the target node. To capture this information, this invention designs an Enhanced Graph Attention Network (EGAT), which generates a role embedding, i.e., the first embedding vector, that reflects the local structural features by aggregating the features of neighboring nodes and edge attributes.

[0081] Specifically, for node i and its neighbor j, the attention coefficient is defined. To measure the importance of neighbor j to node i: ,in, This represents the transaction amount between nodes i and j, where N(i) refers to the neighborhood of node i. It is a weight matrix used to transform node features. It is a weight matrix used to transform edge features. It is a learnable weight vector. , These represent the statistical feature vectors of nodes i and j, respectively.

[0082] Then, the representation of node i at level l is updated as follows: ,in As the activation function, after passing through L layers of EGAT, the first embedding vector of node i is... for .

[0083] Preferably, to ensure that the learned embeddings accurately reflect the graph structure, it is also necessary to define an adjacency matrix reconstruction loss, letting the matrix... Then reconstruct the adjacency matrix. Reconstruction loss .

[0084] This step enables the model to identify addresses with similar local topology, providing structured information for role classification.

[0085] Secondly, in order to capture temporal features, this invention uses a Long Short-Term Memory (LSTM) network to model the transaction sequence and generate role embeddings that reflect temporal behavior, namely the second embedding vector.

[0086] Specifically, for account u, all its transaction records are sorted in ascending order by timestamp to construct the original transaction sequence:

[0087] ,

[0088] in For trading hours, For the transaction amount, This indicates the direction of the transaction (inflow or outflow).

[0089] Define the feature vector of the k-th transaction as: , where ϵ is a very small positive number used for numerical stability and computational efficiency.

[0090] By zero-padding or truncating the sequence to a uniform length of S, a uniform sequence is obtained. : ,

[0091] Where x i (i=1,2,...,n) represents the feature vector (including transaction amount, transaction timestamp, and transaction direction) of the i-th transaction record of account u, S is the preset uniform sequence length (hyperparameter), and n is the actual number of historical transaction records of account u. Inputting the data into a Long Short-Term Memory (LSTM) network yields the second embedding vector. .

[0092] Preferably, the sequence reconstruction loss is defined as follows: Where T is the original sequence matrix, Let be the reconstructed sequence matrix. Then the total reconstruction loss is... .

[0093] This step enables the model to identify addresses with similar time-series trading patterns (such as periodic trading, explosive trading, etc.), providing dynamic behavioral information for role classification.

[0094] S5. The first embedding vector and the second embedding vector are concatenated to obtain a fused embedding vector. A hierarchical clustering algorithm is used to classify the fused embedding vector into roles and identify different roles.

[0095] Specifically, the first embedding vector Second embedding vector By concatenating the vectors, we obtain the fused embedding vector:

[0096] in This represents a vector concatenation operation, where n is the number of nodes and d is the dimension of the merged feature. Hierarchical clustering is suitable for blockchain transaction networks with hierarchical structures and uneven density distributions, and can identify different roles such as exchange addresses, mining pool addresses, ordinary user addresses, and DeFi contract addresses.

[0097] In a preferred embodiment, the method further includes:

[0098] S6. Role optimization steps include introducing two-dimensional structural entropy minimization as a global structural constraint, a self-supervised contrastive learning mechanism, and joint training.

[0099] Specifically, the introduction of two-dimensional structural entropy minimization as a global structural constraint involves, given the role partitioning results of graph G... Define the entropy loss for a two-dimensional structure:

[0100]

[0101] Where L is the number of character clusters. Let v be the weighted in-degree of node v. For clusters The weighted in-degree sum of all nodes in the array. The number of edges that cross the cluster boundary. This represents the total weight of all edges in the graph;

[0102] minimize This allows nodes within the same role cluster to be tightly connected, while connections between different role clusters are sparse, thereby improving the rationality and stability of role partitioning.

[0103] Self-supervised contrastive learning mechanisms include minimizing the Euclidean distance between node embeddings within the same cluster, making similar samples closer together: ;

[0104] Maximize the Euclidean distance between node embeddings in different clusters to make dissimilar samples further apart: .

[0105] Contrast learning loss is , where R k and R l Representing two distinct clusters, |R k |and|R l | represent the number of nodes, Z i and Z j These are the fused embedding vectors of nodes i and j, respectively.

[0106] This mechanism ensures that the role recognition results are not only structurally reasonable, but also have clear interpretability in the embedding space.

[0107] Joint training specifically involves defining the total loss function: ,in, L represents the sum of the reconstruction losses corresponding to the first and second embedding vectors. G L represents the reconstruction loss of the first embedding vector. T This represents the reconstruction loss of the second embedding vector. To compare learning loss, The coefficient is used as a trade-off; by minimizing the total loss function L, the model can automatically learn the role embedding representation of transaction addresses in unsupervised scenarios and output stable and interpretable role classification results.

[0108] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the program to implement the steps of any of the above-described blockchain transaction address role identification methods.

[0109] Unlike traditional address classification, which only focuses on identifying macro-level entity labels, the blockchain transaction address role recognition proposed in this invention can deeply explore the micro-level functional positioning and behavioral semantics of addresses in specific transaction networks.

[0110] This invention designs a two-stage identification framework. First, it identifies key address nodes and their roles based on a voting mechanism and one-dimensional structural entropy. Then, it uses a multi-view graph neural network to identify and optimize the roles of the remaining address nodes, thereby improving identification efficiency and accuracy.

[0111] Unlike traditional clustering algorithms such as community detection that focus on the tightness of connections between nodes, the role recognition defined in this invention refers to finding a set of structurally equivalent or similar nodes in a transaction network. By comprehensively utilizing four views—local structural view, time series view, global structural view, and feature similarity view—it fully captures the multidimensional features of the blockchain transaction network, achieving accurate characterization of roles.

[0112] This invention is the first to introduce the minimization of two-dimensional structural entropy into unsupervised role recognition. It also serves as a global structural view and a regularization method, significantly improving the model's robustness to transaction graph noise and randomness, and overcoming the shortcomings of traditional methods that only focus on local structures.

[0113] By proposing a self-supervised contrastive learning method, a self-supervised contrastive learning mechanism is designed based on feature similarity view. It calculates the maximization of intra-cluster similarity and inter-cluster difference, which significantly improves the interpretability of role recognition results and makes the recognized roles more semantically meaningful.

[0114] A lightweight interactive graph model was designed, which can be adapted to account-based public chain transaction scenarios and provides good cross-chain compatibility and scalability.

[0115] In addition, the method of the present invention does not require any tags, has good portability, and is applicable to various blockchain analysis scenarios with sparse tags.

[0116] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for identifying the role of a blockchain transaction address, characterized in that, Includes the following steps, Based on the characteristics of public blockchains with account models, a unified blockchain interaction graph is constructed, with wallet addresses as nodes and the transfer of fungible and non-fungible tokens defined as directed edges with attributes, forming a weighted, time-series, and heterogeneous directed multigraph. The voting ability of the computing nodes is used to select nodes with high one-dimensional structural entropy and whose connections are distributed in a diverse set of neighbors as key nodes. Statistical features of the remaining nodes are extracted from three dimensions: account status, transaction intensity, and transaction frequency. A statistical feature vector is constructed and used as an embedding for multi-view learning. By aggregating the features and edge attributes of neighboring nodes, a role embedding reflecting local structural features, i.e., the first embedding vector, is generated; and by modeling the transaction sequence, a role embedding reflecting temporal behavior, i.e., the second embedding vector, is generated. The first embedding vector and the second embedding vector are concatenated to obtain a fused embedding vector. A hierarchical clustering algorithm is then used to classify the fused embedding vector into roles and identify different roles. The directed multigraph is represented as G=(V,E), where the node set V includes externally owned accounts and contract accounts, each edge of the edge set E is represented as (u,v,a,m), u and v are wallet addresses, a is the transferred asset, where fungible tokens are represented by token type and amount, non-fungible tokens are represented by contract address and unique ID, and m is transaction metadata; The process of calculating the voting power of nodes and extracting key nodes includes: Calculate the voting power of the address nodes, and initialize the voting power and voting score of each node v. , in, and These represent the initial input and output voting capabilities of node v, respectively. and These represent the initial input vote score and the output vote score obtained from neighboring nodes, respectively. and These represent the one-dimensional input and output structural entropy of node v, respectively. Calculate the input vote scores that node v obtains from its neighbors. and output voting scores : , , in, This represents the output voting power of the input neighbor node u at the t-th iteration. This represents the input voting power of the output neighbor node u' at the t-th iteration, where u and u' represent the input and output neighbor nodes that interact with the target node v, respectively. and Let v represent the transaction amounts from v to u' and from u to v, respectively. and These represent the number of input neighbors and the number of output neighbors of node v, respectively. In each iteration, select the highest... and the highest For key addresses with higher scores, the selected node will not participate in subsequent elections; for the input neighbors of the selected node, their output voting power will be reduced. ,in The average degree of graph G is the output neighbor of the selected node, which reduces its input voting power. Other voting ability values ​​remain unchanged; Iterate until p key nodes are selected.

2. The blockchain transaction address role identification method according to claim 1, characterized in that, The process of generating role embeddings that reflect local structural features, i.e., the first embedding vector, includes: For node i and its neighbor j, the attention coefficient is defined as , , in, This represents the transaction amount between nodes i and j, where N(i) refers to the neighborhood of node i. It is a weight matrix used to transform node features. It is a weight matrix used to transform edge features. It is a learnable weight vector. , These represent the statistical feature vectors of nodes i and j, respectively. go through After layer augmented graph attention network, nodes The first embedding vector for ,in For updating node i at level l, This is the activation function.

3. The blockchain transaction address role identification method according to claim 1, characterized in that, The process of generating role embeddings that reflect temporal behavior, i.e., the second embedding vector, includes: For account u, sort all its transaction records in ascending order by timestamp to construct the original transaction sequence; By zero-padding or truncating the sequence to a uniform length of S, a uniform sequence is obtained. : ; Where x i Let S represent the feature vector of the i-th transaction record of account u, i=1,2,...,n; S is the preset uniform sequence length, and n is the actual number of historical transaction records of account u; Inputting the data into a Long Short-Term Memory (LSTM) network yields the second embedding vector. .

4. The blockchain transaction address role identification method according to any one of claims 1 to 3, characterized in that, It also includes role optimization steps, including introducing two-dimensional structural entropy minimization as a global structural constraint, a self-supervised contrastive learning mechanism, and joint training.

5. The blockchain transaction address role identification method according to claim 4, characterized in that, The specific details of introducing two-dimensional structural entropy minimization as a global structural constraint are as follows: Given the role partitioning results of graph G Define the entropy loss for a two-dimensional structure: , Where L is the number of character clusters. Let v be the weighted in-degree of node v. For clusters The weighted in-degree sum of all nodes in the array. The number of edges that cross the cluster boundary. The total weight of all edges in the graph; minimize .

6. The blockchain transaction address role identification method according to claim 4, characterized in that, The self-supervised contrastive learning mechanism includes minimizing the Euclidean distance of node embeddings within the same cluster to make similar samples closer; and maximizing the Euclidean distance of node embeddings between different clusters to make dissimilar samples farther apart.

7. The blockchain transaction address role identification method according to claim 4, characterized in that, The joint training specifically involves defining a total loss function: , in, L represents the sum of the reconstruction losses corresponding to the first and second embedding vectors. Specifically, L G L represents the reconstruction loss of the first embedding vector. T This represents the reconstruction loss of the second embedding vector. For structural entropy constraint loss, To compare learning loss, is the tradeoff coefficient; minimize the total loss function L.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, When the processor executes the program, it implements the steps of the blockchain transaction address role identification method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Block chain abnormal transaction behavior identification method

    CN120541548A

  • Block chain risk address identification method of dual-structure time perception graph neural network

    CN120804893A