A method and system for detecting abnormal nodes in an incomplete heterogeneous Ethereum network
By using residual attention and adaptive multi-channel attention mechanisms in the incomplete heterogeneous Ethereum network for node attribute completion and graph structure optimization, feature similarity, propagation and semantic graphs are generated, and combined with graph neural networks for joint optimization , solves the problem of abnormal node detection in heterogeneous networks and achieves efficient identification and monitoring.
Patent Information
- Application Number
- CN202410710859.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-06-04
AI Technical Summary
Existing technology is difficult to effectively handle abnormal node detection in the incomplete heterogeneous Ethereum network, especially the problems of poor topology and missing node attributes caused by data noise and anonymity, making it difficult to obtain the optimal graph neural network model. Network structure information.
The residual attention mechanism and the graph structure fusion mechanism of adaptive multi-channel attention are used to generate feature similarity graphs, feature propagation graphs, semantic graphs and observation graphs by completing node attribute features and optimizing graph structures, combined with graph neural networks Perform joint optimization to identify abnormal nodes.
It achieves accurate and efficient identification and monitoring of abnormal nodes in the Ethereum transaction network, solves the problems of poor topology and missing node attributes, and improves the efficiency of abnormal detection.
Smart Images

Figure CN118282876B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network anomaly detection, and in particular to a method and system for detecting abnormal nodes in an incomplete heterogeneous Ethereum network. Background Art
[0002] With the advancement of blockchain technology, especially in the blockchain 2.0 era, Ethereum has become one of the most influential blockchain platforms. Ethereum is a multi-party distributed system in which the identities of users are anonymous. Compared with traditional blockchain systems, the Ethereum transaction network covers a variety of transaction relationships. These relationships include external transactions initiated by users and internal transactions generated by smart contract calls. This diversity shows the complex and rich behavior patterns in the Ethereum transaction network. However, since the anonymity of Ethereum also provides criminals with opportunities to carry out various fraudulent activities, the security of the Ethereum platform has become a key issue affecting the development of its ecosystem.
[0003] At present, applying network representation learning methods to the abnormal node detection technology of the Ethereum network has been proven to be an effective method to identify abnormal nodes by modeling the Ethereum transaction network as a graph structure. However, most neural network methods for processing heterogeneous graphs adopt a message passing mechanism to learn the representation of nodes by aggregating and transforming the neighbor embedding of nodes or the neighbor relationship based on meta-paths, mapping high-dimensional network data into a low-dimensional continuous space, thereby achieving effective learning and analysis. These methods are usually based on a basic assumption: the graph is complete, that is, the original heterogeneous graph structure is true and accurate, and the attribute characteristics of the nodes are rich and complete. However, in the process of collecting Ethereum transaction data sets from the network, it may be affected by various potential noises, or the collected data sets may be incomplete or inaccurate due to the anonymity of Ethereum, resulting in the heterogeneous graphs constructed based on these data being incomplete, with problems such as poor topological structure, low homogeneity, and missing attributes of certain types of nodes, making it difficult for the graph neural network (GNN) model trained directly using these incomplete graphs to obtain the optimal network structure information. At present, no research has simultaneously explored the problems of incomplete heterogeneous graph structure optimization and node attribute feature completion for the Ethereum network. Therefore, structural optimization and attribute completion of the original heterogeneous graphs collected from the network are crucial to improving the efficiency of anomaly detection in the Ethereum network. Summary of the invention
[0004] In order to solve the above-mentioned problems, the present invention provides a method and system for detecting abnormal nodes in an incomplete heterogeneous Ethereum network.
[0005] In the first aspect, the present invention provides a method for detecting abnormal nodes in an incomplete heterogeneous Ethereum network, which adopts the following technical solution:
[0006] A method for detecting abnormal nodes in an incomplete heterogeneous Ethereum network, comprising:
[0007] S1: Obtain Ethereum transaction data, build an Ethereum transaction network, and complete the missing attribute features of the target nodes in the Ethereum transaction network based on the residual attention mechanism;
[0008] S2: Generate a relational transaction subgraph based on the transaction relationship in the Ethereum transaction network;
[0009] S3: Based on the correlation of the relational transaction subgraph, a feature similarity graph, a feature propagation graph, a semantic graph, and an observation graph of the relational transaction subgraph are generated;
[0010] S4: Adopting the graph structure fusion mechanism based on adaptive multi-channel attention, the feature similarity graph, feature propagation graph, semantic graph and observation graph are fused to obtain a heterogeneous graph;
[0011] S5: Send the heterogeneous graph into the graph neural network GNN, jointly optimize the heterogeneous graph structure and GNN parameters, and obtain the optimized graph neural network GNN.
[0012] Furthermore, the method for completing missing attribute features of target nodes in the Ethereum transaction network based on the residual attention mechanism includes calculating the cosine similarity between attribute feature matrix vectors of the Ethereum transaction network, and generating attribute similarity feature embedding of the target node through the cosine similarity; extracting the topological structure features of the Ethereum transaction network through a graph convolutional network and fusing a multi-head attention mechanism and generating a topological structure feature embedding; using the residual attention algorithm to perform residual connection on the attribute similarity feature embedding and the topological structure feature embedding to avoid gradient disappearance, and then obtaining the predicted attributes of the target node through a multi-layer perception MLP.
[0013] Furthermore, the residual attention algorithm is used to perform residual connection on attribute similarity feature embedding and topological structure feature embedding to avoid gradient disappearance, including using node residual and edge residual to perform residual connection of target nodes to aggregate target node attributes.
[0014] Furthermore, the generation of a relational transaction subgraph based on the transaction relations in the heterogeneous Ethereum network includes dividing the Ethereum transaction network into different subgraphs according to the transaction relations as relational transaction subgraphs, wherein when there are relational triples in the relational transaction subgraph, the adjacency matrix of the relational transaction subgraph is 1, and when there are no relational triples in the relational transaction subgraph, the adjacency matrix of the relational transaction subgraph is 0.
[0015] Furthermore, based on the correlation of the relational transaction subgraphs, a feature similarity graph, a feature propagation graph, a semantic graph and an observation graph of the relational transaction subgraphs are generated, including performing similarity metric learning on the relational transaction subgraphs based on edges with the same feature relationship to obtain a feature similarity graph of nodes; generating a feature propagation graph through modeling learning after capturing topological relationships based on the feature similarity graph; obtaining a semantic graph by learning different relationships of the relational transaction subgraphs from different meta-path semantics; and constructing an observation graph of each layer in the relational transaction subgraph through a graph embedding network model, which is then fused into an observation graph using a multi-channel attention layer.
[0016] Furthermore, the graph structure fusion mechanism based on adaptive multi-channel attention is adopted to fuse the feature similarity graph, feature propagation graph, semantic graph and observation graph to obtain a heterogeneous graph, including generating an overall generated graph structure of the feature similarity graph, feature propagation graph, semantic graph and observation graph through aggregate learning, and optimizing the overall generated graph structure to obtain a heterogeneous graph.
[0017] Furthermore, the heterogeneous graph is sent into the graph neural network GNN, and the heterogeneous graph structure and GNN parameters are jointly optimized to obtain the optimized graph neural network GNN, including calculating the loss function of the graph neural network GNN, and jointly optimizing the heterogeneous graph structure and GNN parameters by minimizing the loss function, so as to realize the identification of abnormal nodes in the Ethereum transaction network.
[0018] Second, an abnormal node detection system for an incomplete heterogeneous Ethereum network includes:
[0019] The data acquisition module is configured to acquire Ethereum transaction data, construct an Ethereum transaction network, and complete the missing attribute features of the target node in the Ethereum transaction network based on the residual attention mechanism;
[0020] The transaction subgraph module is configured to generate a relational transaction subgraph based on the transaction relationship in the Ethereum transaction network;
[0021] The correlation module is configured to generate a feature similarity graph, a feature propagation graph, a semantic graph, and an observation graph of the relational transaction subgraph based on the correlation of the relational transaction subgraph;
[0022] The fusion module is configured to adopt a graph structure fusion mechanism based on adaptive multi-channel attention to fuse the feature similarity graph, the feature propagation graph, the semantic graph and the observation graph to obtain a heterogeneous graph;
[0023] The optimization module is configured to feed the heterogeneous graph into the graph neural network GNN, jointly optimize the heterogeneous graph structure and GNN parameters, and obtain the optimized graph neural network GNN.
[0024] In a third aspect, the present invention provides a computer-readable storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device for the method of detecting abnormal nodes in an incomplete heterogeneous Ethereum network.
[0025] In a fourth aspect, the present invention provides a terminal device comprising a processor and a computer-readable storage medium, the processor being used to implement various instructions; the computer-readable storage medium being used to store multiple instructions, the instructions being suitable for being loaded by the processor and executing the method for detecting abnormal nodes in an incomplete heterogeneous Ethereum network.
[0026] In summary, the present invention has the following beneficial technical effects:
[0027] (1) In the present invention, artificial intelligence and machine learning algorithms are introduced, and the Ethereum transaction network is combined with a graph neural network to utilize a series of technologies such as graph structure learning algorithm, attribute completion algorithm, residual attention network, multi-head attention network, meta-learning, etc., to achieve accurate and efficient identification and monitoring of abnormal nodes in the Ethereum transaction network.
[0028] (2) This paper proposes a heterogeneous graph structure learning completion algorithm based on adaptive multi-channel attention. The missing attributes of nodes are completed and the network structure is optimized through the attribute completion module and the graph structure learning module. And by jointly optimizing the graph structure and GNN parameters, the accurate identification of abnormal nodes in the Ethereum network is achieved.
[0029] (3) This paper attempts to study the graph structure optimization and node attribute feature completion problems of incomplete heterogeneous Ethereum networks for the first time. Residual attention and adaptive multi-channel attention algorithms are used to simultaneously optimize the heterogeneous graph structure and complete the missing node attributes, effectively solving the problems of poor topology and missing node attributes in the original data network. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a schematic diagram of an abnormal node detection method for an incomplete heterogeneous Ethereum network according to Example 1 of the present invention. DETAILED DESCRIPTION
[0031] The present invention is further described in detail below in conjunction with the accompanying drawings.
[0032] Example 1
[0033] Reference Figure 1 , a method for detecting abnormal nodes in an incomplete heterogeneous Ethereum network of this embodiment includes:
[0034] S1: Obtain Ethereum transaction data, build an Ethereum transaction network, and complete the missing attribute features of the target nodes in the Ethereum transaction network based on the residual attention mechanism;
[0035] S2: Generate a relational transaction subgraph based on the transaction relationship in the Ethereum transaction network;
[0036] S3: Based on the correlation of the relational transaction subgraph, a feature similarity graph, a feature propagation graph, a semantic graph, and an observation graph of the relational transaction subgraph are generated;
[0037] S4: Adopting the graph structure fusion mechanism based on adaptive multi-channel attention, the feature similarity graph, feature propagation graph, semantic graph and observation graph are fused to obtain a heterogeneous graph;
[0038] S5: Send the heterogeneous graph into the graph neural network GNN, jointly optimize the heterogeneous graph structure and GNN parameters, and obtain the optimized graph neural network GNN.
[0039] Specifically:
[0040] Step S1:
[0041] S1.1: Preprocess the Ethereum transaction dataset obtained directly from the network and build an Ethereum transaction network based on the preprocessed dataset , where V is the node set, A is the adjacency matrix of the Ethereum network, and X is the attribute feature matrix of the node.
[0042] S1.2: K-NN based method selects the most relevant The feature information of the source nodes is used to generate the attribute similarity feature embedding of the target node. Specifically, this goal is achieved by calculating the similarity score between the existing attributes of the source node and the target node. The present invention uses the cosine similarity between two vectors to measure the feature similarity:
[0043]
[0044] in, Is the target node The existing properties of Is the source node The corresponding attributes of is the target node generated Similarity matrix with the source node.
[0045] In the Ethereum dataset used in this paper, factors such as the weight difference between nodes and whether there is a direct connection lead to different source nodes having different influences on the target node. Therefore, in order to more accurately model the influence of different source nodes on the characteristics of the target node, this paper introduces A learnable parameter that dynamically adjusts the target node The weights of similar source nodes:
[0046]
[0047] in, Indicates the target node Before The set of similar neighbors, Is the source node The attribute characteristics of is a learnable weight parameter. is the target node generated Attribute similarity feature aggregation embedding.
[0048] S1.3: Although the attribute similarity feature aggregation of S1.2 above is helpful for predicting the missing attributes of the target node in the feature space, it is not enough to use only the attribute features of the source node to complete the missing feature information of the target node, and it is impossible to cover all potentially useful information. Topological embedding can retain the topological structure, node semantic information and attribute information in the network. Therefore, in order to more comprehensively complete the missing attribute features of the target node, it is necessary to consider the topological structure between the nodes. The present invention adopts a method based on a graph convolutional network (GCN) and integrates a multi-head attention mechanism to weighted aggregate the topological structure, node semantics and attribute information in the neighborhood of the source node, and effectively extract the topological structure characteristics of the network.
[0049] Specifically, we first use the GCN method to aggregate the node topology, node semantic information, and attribute information. The specific feature aggregation process is as follows:
[0050]
[0051] in It is The learnable weight matrix of the layer, It is The feature output of the layer, and .
[0052] S1.4: Since the features of directly connected neighboring nodes also have different effects on the attribute completion of the source node, the present invention further introduces a multi-head attention mechanism to estimate the importance of neighboring nodes relative to the source node, so as to filter out a large number of irrelevant attribute nodes and improve the model's ability to capture and express information. The specific attention weight calculation process is as follows:
[0053]
[0054] in, represents a meta-path in the topology, and Representation Node and The embedding of represents the multi-head attention mechanism, Representation Node For nodes The importance coefficient of is applied to all node pairs.
[0055] After obtaining the attention scores of all node pairs through the above method, the softmax() activation function is used to determine the weight normalization parameters:
[0056]
[0057] in, Is a node A set of neighbor nodes.
[0058] Finally, the obtained attention score For Node The aggregated feature information is weighted and aggregated, and the multi-head attention mechanism is used to improve the expressiveness of the model:
[0059]
[0060] in, Is a node A set of neighbor nodes of This article indicates that different attention processes, refers to the average of these results, Is a node The topological feature embedding of is the target node generated The first-order topological structure feature aggregation embedding.
[0061] S1.5: However, there may be a gradient decay problem during the back-propagation process of GNN, resulting in a small update amount of shallow layer parameters, and then over-smoothing and gradient vanishing may occur when the model depth increases, making the model difficult to train effectively. In order to overcome these challenges, the present invention introduces a residual attention algorithm. By combining node residuals and edge residuals, the input attributes and output attributes are added, thereby retaining the path for transmitting the original information and reducing the attenuation of the gradient during the propagation process. Through residual connections, the gradient can be directly transferred from the shallower layer to the deeper layer, which effectively avoids the gradient vanishing problem and improves the network's expressive power.
[0062] Node residual. Add pre-activated residual connections to the node representations across layers and aggregate node attributes. The specific implementation is as follows:
[0063]
[0064] in, It is the edge The attention weight, is the activation function. Considering the changes in the node layer, the above situation designs an Pre-trained residual connections for aggregation on layers :
[0065]
[0066] Margin residual. The raw attention score between nodes , and for different layers residual attention is also helpful, after getting the original attention score, add residual connection to it:
[0067]
[0068] The hyperparameters is the scaling factor.
[0069] S1.6: After obtaining the attribute similarity feature embedding and the topological structure feature embedding of each target node, considering that the missing attribute of the target node may be related to one of them or even a combination of them, the present invention uses multi-layer perception (MLP) to predict the missing attribute by fusing the learned multi-view embedding. The details are as follows:
[0070]
[0071]
[0072] in represents the connection function, They are attribute completion feature embedding generated by attribute similarity feature aggregation based on K-NN and topological structure feature aggregation based on residual attention. is the predicted attribute of the target node.
[0073] After attribute completion, the attribute set of the training node of the Ethereum heterogeneous network is:
[0074]
[0075] Step S2:
[0076] When learning the heterogeneous graph structure of the Ethereum heterogeneous network, it is impossible to mix all edge types of relationships. Therefore, it is necessary to divide the Ethereum transaction graph into different subgraphs according to the transaction relationships. These subgraphs are called relationship subgraphs. , construct a relationship subgraph containing all nodes with this relationship , whose adjacency matrix is ,if There is a relation triple in , then the adjacency matrix ,otherwise . Define the full image The set of all subgraphs of different relationship types in is ,in is the set of all edge relationship types.
[0077] Step S3:
[0078] In the process of learning heterogeneous graph structures, the formation of graph structures is affected by two main factors: one is the similarity between node features, that is, the degree of similarity between node features; the other is the relationship between node features and relationships, that is, the interaction between node features and relationships in heterogeneous information networks.
[0079] S3.1: For each relationship subgraph , respectively, for the same characteristic relationship The edges of the node are similarly measured to obtain a node feature similarity graph. , where nodes represent Ethereum user nodes and edges represent the relationships between samples. The specific feature similarity calculation process between two nodes is as follows:
[0080]
[0081]
[0082] in, is the threshold that controls the sparsity of the feature similarity graph, is the K-head weighted cosine similarity function used to calculate the similarity between nodes. Is a node and nodes Features, represents the Hadamard product, is a learnable weight matrix that assigns importance to different features.
[0083] S3.2: After getting the relationship subgraph The feature similarity graph After that, through the original topological structure of the relationship subgraph The feature similarity graph is propagated to capture and utilize the complex interactive topological relationships in the graph, thereby generating a potential feature propagation graph structure. There are two types of nodes: head type nodes and tail type nodes , the head feature propagation map and the tail feature propagation map are modeled in the following ways respectively:
[0084]
[0085]
[0086] Finally, the head feature propagation map and the tail feature propagation map are fused through the channel attention layer to obtain the final feature propagation map :
[0087]
[0088] in, represents a channel attention layer with parameters, which balances each relationship by learning different weights separately. The importance of the head and tail propagation maps is calculated to obtain the final feature propagation map.
[0089] S3.3: A semantic graph is a graphical structure used to represent and analyze knowledge. It can intuitively display the complex connections between information and help understand and reason about the semantic associations between entities. In a heterogeneous graph, the edge types are not unique and there are differences between high-order relations. The present invention generates a potential semantic graph structure by learning different relations from different meta-path semantics.
[0090] Specifically, given a set of meta-paths , use MP2Vec to learn the semantic embedding of nodes for each meta-path separately Since this process is offline, it does not increase the computational cost and complexity of the model. Then, based on the obtained semantic embedding set, the candidate semantic subgraph is generated in the following way:
[0091]
[0092] in, is the semantic embedding matrix Midpoint The embedding is different from formula 15 with different parameters Head weighted cosine similarity function, Used to control the sparsity of candidate semantic subgraphs.
[0093] Through the above methods, you can obtain In order to obtain the final semantic subgraph, this work aggregates them in the following way:
[0094]
[0095] in, represents a channel attention layer that assigns importance to each candidate semantic subgraph in the meta-path.
[0096] S3.4: In order to obtain richer information and reduce estimation bias during graph structure optimization, the present invention introduces an observation graph model. The observation graph model enhances the analysis capability of the original graph structure data by capturing and integrating additional information or observed data structure features, and provides information from different angles and dimensions to further guide the generation of the graph structure.
[0097] Specifically, for each relationship subgraph , first through a The layered graph embedding network model is used to obtain embeddings at different levels and capture structural information in different relational neighborhoods.
[0098]
[0099] in, is the activation function, is the learnable weight matrix of layer l, is the feature embedding vector matrix of each node generated in the previous layer.
[0100] Then, according to the feature matrix generated by each layer in the graph embedding network model , to construct the observation map of each layer ,in is the feature matrix In the The adjacency matrix of the KNN graph generated by the layer describes the neighborhood similarity of the h layer. Finally, it is fused into the final observation graph through the multi-channel attention layer .
[0101] Step S4:
[0102] After obtaining each relationship subgraph The feature similarity graph , Feature Propagation Diagram , semantic graph And observation diagram After that, the relationship The overall generated graph structure These learned structure graphs can be aggregated to obtain:
[0103]
[0104] in, Represents the channel attention layer, whose weight matrix Represented as a relation The importance parameter assigned to each candidate graph structure. Finally, the optimized graph structure generated by all relationship subgraphs generates a new heterogeneous graph structure .
[0105] Step S5:
[0106] After learning the optimized heterogeneous Ethereum network structure through the above steps Finally, in order to further optimize the learned graph structure and GNN parameters, the present invention optimizes the graph structure Put it into GNN. By jointly optimizing the graph structure and GNN parameters, training can be more effectively performed to accurately identify abnormal nodes in the Ethereum network. Specifically, the GNN network constructed by the present invention can be expressed as:
[0107]
[0108] in, is the adjacency matrix With the identity matrix of and, yes The diagonal matrix of It is The learnable weight parameters of the layer, represents the activation function, It is Node embeddings generated by the layer.
[0109] The loss function of GNN can be expressed as:
[0110]
[0111] in, is the total number of nodes, Is a node The real label, Is a node The predicted label of .
[0112] In order to avoid overfitting problems during graph structure optimization, the present invention uses a regularization method for processing, as shown below:
[0113] .
[0114] Therefore, the total loss function can be expressed as:
[0115]
[0116] By minimizing the loss function , jointly optimize the structure and parameters of the graph to achieve accurate identification of abnormal nodes in the Ethereum network.
[0117] Example 2
[0118] This embodiment provides an abnormal node detection system for an incomplete heterogeneous Ethereum network, including:
[0119] The data acquisition module is configured to acquire Ethereum transaction data, construct an Ethereum transaction network, and complete the missing attribute features of the target node in the Ethereum transaction network based on the residual attention mechanism;
[0120] The transaction subgraph module is configured to generate a relational transaction subgraph based on the transaction relationship in the Ethereum transaction network;
[0121] The correlation module is configured to generate a feature similarity graph, a feature propagation graph, a semantic graph, and an observation graph of the relational transaction subgraph based on the correlation of the relational transaction subgraph;
[0122] The fusion module is configured to adopt a graph structure fusion mechanism based on adaptive multi-channel attention to fuse the feature similarity graph, the feature propagation graph, the semantic graph and the observation graph to obtain a heterogeneous graph;
[0123] The optimization module is configured to feed the heterogeneous graph into the graph neural network GNN, jointly optimize the heterogeneous graph structure and GNN parameters, and obtain the optimized graph neural network GNN.
[0124] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device for a method for detecting abnormal nodes in an incomplete heterogeneous Ethereum network.
[0125] A terminal device includes a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded and executed by the processor to implement the abnormal node detection method for an incomplete heterogeneous Ethereum network.
[0126] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting abnormal nodes in an incomplete heterogeneous Ethereum network, characterized in that: include: S1: Obtain Ethereum transaction data, build an Ethereum transaction network, and complete the missing attribute features of the target nodes in the Ethereum transaction network based on the residual attention mechanism; S2: Generate a relational transaction subgraph based on the transaction relationship in the Ethereum transaction network; S3: Based on the correlation of the relational transaction subgraph, a feature similarity graph, a feature propagation graph, a semantic graph, and an observation graph of the relational transaction subgraph are generated; S4: Adopting the graph structure fusion mechanism based on adaptive multi-channel attention, the feature similarity graph, feature propagation graph, semantic graph and observation graph are fused to obtain a heterogeneous graph; S5: Send the heterogeneous graph into the graph neural network GNN, jointly optimize the heterogeneous graph structure and GNN parameters, and obtain the optimized graph neural network GNN; where the GNN network is represented as: ; in, adjacency matrix, is the adjacency matrix With the identity matrix of and, yes The diagonal matrix of It is The learnable weight parameters of the layer, represents the activation function, It is The node embedding generated by the layer, Layer is a custom arbitrary layer; The loss function of GNN is expressed as: ; in, is the total number of nodes, Is a node The real label, Is a node The predicted label of In order to avoid overfitting problems during graph structure optimization, a regularization method is used, which is expressed as: ; Therefore, the total loss function is expressed as: ; By minimizing the loss function , jointly optimize the structure and parameters of the graph to achieve accurate identification of abnormal nodes in the Ethereum network.
2. The abnormal node detection method of an incomplete heterogeneous Ethereum network according to claim 1, characterized in that: The method of completing the missing attribute features of the target node in the Ethereum transaction network based on the residual attention mechanism includes calculating the cosine similarity between the attribute feature matrix vectors of the Ethereum transaction network, and generating the attribute similarity feature embedding of the target node through the cosine similarity; Through the graph convolutional network and the fusion of multi-head attention mechanism, the topological structure features of the Ethereum transaction network are extracted and the topological structure feature embedding is generated; the residual attention algorithm is used to perform residual connection on the attribute similarity feature embedding and the topological structure feature embedding to avoid gradient disappearance, and then the predicted attributes of the target node are obtained through the multi-layer perception MLP.
3. According to claim 2, a method for detecting abnormal nodes in an incomplete heterogeneous Ethereum network is characterized in that: The residual attention algorithm is used to perform residual connection on attribute similarity feature embedding and topological structure feature embedding to avoid gradient disappearance, including using node residual and edge residual to perform residual connection on target nodes to aggregate target node attributes.
4. According to claim 3, a method for detecting abnormal nodes in an incomplete heterogeneous Ethereum network is characterized in that: The method generates a relational transaction subgraph based on the transaction relationship in the heterogeneous Ethereum network, including dividing the Ethereum transaction network into different subgraphs according to the transaction relationship as the relational transaction subgraphs, wherein when there is a relation triple in the relational transaction subgraph, the adjacency matrix of the relational transaction subgraph is 1, and when there is no relation triple in the relational transaction subgraph, the adjacency matrix of the relational transaction subgraph is 0.
5. According to claim 4, a method for detecting abnormal nodes in an incomplete heterogeneous Ethereum network is characterized in that: The method generates a feature similarity graph, a feature propagation graph, a semantic graph and an observation graph of the relationship transaction subgraph based on the correlation of the relationship transaction subgraph, including performing similarity metric learning on the edges of the relationship transaction subgraph based on the same feature relationship to obtain a feature similarity graph of the nodes; After capturing the topological relationship based on the feature similarity graph, a feature propagation graph is generated through modeling learning; The semantic graph is obtained by learning different relations of the relational transaction subgraph from different meta-path semantics; the observation graph of each layer in the relational transaction subgraph is constructed through the graph embedding network model, and then fused into the observation graph using the multi-channel attention layer.
6. According to claim 5, a method for detecting abnormal nodes in an incomplete heterogeneous Ethereum network is characterized in that: The method adopts a graph structure fusion mechanism based on adaptive multi-channel attention to fuse the feature similarity graph, feature propagation graph, semantic graph and observation graph to obtain a heterogeneous graph, including generating an overall generated graph structure of the feature similarity graph, feature propagation graph, semantic graph and observation graph through aggregate learning, and optimizing the overall generated graph structure to obtain a heterogeneous graph.
7. The method for detecting abnormal nodes in an incomplete heterogeneous Ethereum network according to claim 6, characterized in that: The heterogeneous graph is sent into the graph neural network GNN, and the heterogeneous graph structure and GNN parameters are jointly optimized to obtain the optimized graph neural network GNN, including calculating the loss function of the graph neural network GNN, and jointly optimizing the heterogeneous graph structure and GNN parameters by minimizing the loss function to realize the identification of abnormal nodes in the Ethereum transaction network.
8. An abnormal node detection system for an incomplete heterogeneous Ethereum network, executing an abnormal node detection method for an incomplete heterogeneous Ethereum network as claimed in claim 1, characterized in that: include: The data acquisition module is configured to acquire Ethereum transaction data, construct an Ethereum transaction network, and complete the missing attribute features of the target node in the Ethereum transaction network based on the residual attention mechanism; The transaction subgraph module is configured to generate a relational transaction subgraph based on the transaction relationship in the Ethereum transaction network; The correlation module is configured to generate a feature similarity graph, a feature propagation graph, a semantic graph, and an observation graph of the relational transaction subgraph based on the correlation of the relational transaction subgraph; The fusion module is configured to adopt a graph structure fusion mechanism based on adaptive multi-channel attention to fuse the feature similarity graph, the feature propagation graph, the semantic graph and the observation graph to obtain a heterogeneous graph; The optimization module is configured to feed the heterogeneous graph into the graph neural network GNN, jointly optimize the heterogeneous graph structure and GNN parameters, and obtain the optimized graph neural network GNN.
9. A computer-readable storage medium storing a plurality of instructions, characterized in that: The instructions are suitable for being loaded by a processor of a terminal device and executed by a method for detecting abnormal nodes in an incomplete heterogeneous Ethereum network as described in claim 1.
10. A terminal device, comprising a processor and a computer-readable storage medium, wherein the processor is used to implement each instruction; and the computer-readable storage medium is used to store multiple instructions, characterized in that: The instructions are suitable for being loaded by a processor and executed by a method for detecting abnormal nodes in an incomplete heterogeneous Ethereum network as described in claim 1.
Citation Information
Patent Citations
Data processing method and device, equipment and storage medium
CN113144624A
Heterogeneous graph neural network attribute completion method
CN115587626A
