Blockchain transaction privacy protector penetration model training method, penetration method and equipment
Through the graph attention neural network model training method, a blockchain transaction privacy protector penetration model is constructed, which solves the problem of abnormal transaction identification caused by the untraceability of the transaction privacy protector and achieves higher transaction traceability and security.
Patent Information
- Application Number
- CN202411695704.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-11-25
AI Technical Summary
In the existing technology, the untraceability of transaction privacy protectors becomes an obstacle to the identification of abnormal transactions in the blockchain, making it difficult to identify whether the transaction data processed by the transaction privacy protectors in the blockchain network is abnormal.
The graph attention neural network model training method is adopted to construct a blockchain transaction privacy protector penetration model by extracting the directed graph feature data of single address conversion transaction data to identify the anomalies of transaction data.
The transaction privacy protector improves the traceability and security of transactions executed, can identify abnormal transactions, and enhances the monitoring capabilities of the blockchain network.
Smart Images

Figure CN119646872B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain transaction privacy protector penetration model training method, penetration method, and device. Background Art
[0002] A transaction privacy protector (also known as a blockchain transaction privacy protector) refers to a tool used to provide transaction privacy protection functions to users through smart contracts in a blockchain network, enabling users to hide the source and destination of their financial transactions to avoid disclosing their specific deposit addresses or other transaction details, thereby achieving privacy protection for users' financial transactions.
[0003] Specifically, the transaction processing services provided by the Transaction Privacy Protector include: a smart contract only accepts deposits of a fixed amount; after user A deposits funds into a smart contract, he or she receives a voucher R. User A can subsequently use R to withdraw the funds from the smart contract without disclosing the specific amount deposited. However, if a user other than user A obtains voucher R, they can also obtain control of the funds from the Transaction Privacy Protector. For example, if users A, B, and C all deposit funds into the Transaction Privacy Protector and receive voucher R, and user D obtains user A's voucher R, user D can withdraw the funds from the smart contract corresponding to the Transaction Privacy Protector without being able to identify the specific funds obtained by user D. In other words, the untraceability of the Transaction Privacy Protector makes it difficult for external observers to track the flow of funds, thereby increasing the anonymity of transactions. This makes the Transaction Privacy Protector a black box, concealing the correspondence between inflows and outflows. This characteristic of the Transaction Privacy Protector also hinders the identification of abnormal blockchain transactions.
[0004] Therefore, there is an urgent need to design a penetration technology for transaction privacy protectors. This penetration technology refers to a technology that can explore the relationship between funds flowing into and out of the transaction privacy protector. In other words, there is an urgent need to design a method that can identify whether the transaction data processed by the transaction privacy protector in the blockchain network is abnormal based on the above-mentioned inherent characteristics of the transaction privacy protector. Summary of the Invention
[0005] In view of this, the embodiments of the present application provide a blockchain transaction privacy protector penetration model training method, penetration method and device to eliminate or improve one or more defects in the prior art.
[0006] One aspect of the present application provides a blockchain transaction privacy protector penetration model training method, comprising:
[0007] For each piece of single address conversion transaction data corresponding to each piece of entity data obtained after processing by the transaction privacy protector in the blockchain network, extract each directed graph feature data corresponding to each piece of said single address conversion transaction data; wherein the entity data includes: an address transaction set of a starting transaction address corresponding to a transaction account and an address transaction set corresponding to each of other transaction addresses generated after the starting transaction address is converted at least once by the transaction privacy protector, wherein the address transaction set includes each piece of transaction data corresponding to the transaction address uniquely corresponding to the address transaction set;
[0008] A graph attention neural network model is trained based on each directed graph feature data corresponding to each of the single address conversion transaction data, so that the graph attention neural network model is trained as a blockchain transaction privacy protector penetration model that outputs abnormal transaction identification result data corresponding to the single address conversion transaction data based on each of the directed graph feature data corresponding to the single address conversion transaction data.
[0009] In some embodiments of the present application, before extracting the directed graph feature data corresponding to each of the single address conversion transaction data corresponding to each of the entity data obtained after processing by the transaction privacy protector in the blockchain network, the method further includes:
[0010] The real entity data corresponding to each transaction account obtained after being processed by the transaction privacy protector in the blockchain network is marked as a positive sample; and the new entity data generated by cross-constructing the address transaction set of the entity data corresponding to each transaction account is marked as a negative sample;
[0011] Based on the number of times each of the entity data marked as the positive sample and the negative sample is subjected to address conversion by the transaction privacy protector, each of the entity data is split separately to obtain each single address conversion transaction data corresponding to each of the entity data; wherein, the single address conversion transaction data includes: a pre-address conversion transaction set corresponding to the source address and a post-address conversion transaction set corresponding to the target address; the source address is any transaction address in the entity data, and the target address is another transaction address generated after the source address is subjected to one address conversion by the transaction privacy protector.
[0012] In some embodiments of the present application, for each piece of entity data obtained after processing by the transaction privacy protector in the blockchain network, the steps of extracting the directed graph feature data corresponding to each piece of entity data obtained after processing by the transaction privacy protector in the blockchain network include:
[0013] According to the transaction time sequence corresponding to each of the transaction data, based on a preset transaction quantity division threshold, the pre-address conversion transaction set and the post-address conversion transaction set corresponding to each of the single address conversion transaction data are respectively divided into transaction data to obtain directed graphs corresponding to the pre-address conversion transaction set and the post-address conversion transaction set, respectively, wherein each of the directed graphs includes vertices for representing different transaction data and edges for representing transaction relationships between different transaction data;
[0014] The graph feature data corresponding to each of the directed graphs is extracted respectively to obtain the directed graph feature data corresponding to each of the single address conversion transaction data; wherein the directed graph feature data includes a directed graph corresponding to the corresponding single address conversion transaction data and the graph feature data corresponding to the directed graph.
[0015] In some embodiments of the present application, respectively extracting graph feature data corresponding to each of the directed graphs includes:
[0016] The vertex feature data of each vertex and the edge feature data of each edge corresponding to each directed graph are extracted respectively to form the graph feature data corresponding to each directed graph.
[0017] In some embodiments of the present application, the graph attention neural network model includes:
[0018] A graph attention neural network is configured to extract features of the vertices and edges in the directed graph for each directed graph feature data corresponding to the input single address conversion transaction data, so as to obtain a graph readout embedding vector corresponding to each directed graph feature data corresponding to the single address conversion transaction data;
[0019] A first concatenation layer is configured to concatenate graph-read embedding vectors corresponding to respective directed graph feature data corresponding to the pre-address conversion transaction set, to obtain a concatenation vector corresponding to the pre-address conversion transaction set;
[0020] The second splicing layer is used to splice the graph-read embedding vectors corresponding to the directed graph feature data corresponding to the post-address conversion transaction set to obtain a splicing vector corresponding to the post-address conversion transaction set;
[0021] a first multi-layer perceptron, configured to extract transaction behavior features from the concatenated vector corresponding to the pre-address conversion transaction set output by the first concatenation layer, to obtain pre-address conversion transaction behavior feature data corresponding to the pre-address conversion transaction set;
[0022] a second multi-layer perceptron, configured to extract transaction behavior features from the concatenated vector corresponding to the post-address conversion transaction set output by the second concatenation layer, to obtain post-address conversion transaction behavior feature data corresponding to the post-address conversion transaction set;
[0023] And, a cosine loss layer is used to calculate the cosine loss value between the transaction behavior feature data before address conversion output by the first multi-layer perceptron and the transaction behavior feature data after address conversion output by the second multi-layer perceptron based on the cosine loss function.
[0024] In some embodiments of the present application, the graph attention neural network model further includes:
[0025] A binary classifier is used to determine whether the cosine loss value output by the cosine loss layer is within a preset transaction behavior difference threshold range. If so, it outputs abnormal transaction identification result data indicating that there is no abnormality in the single address conversion transaction data; if not, it outputs abnormal transaction identification result data indicating that there is an abnormality in the single address conversion transaction data.
[0026] Another aspect of the present application provides a blockchain transaction privacy protector penetration method, comprising:
[0027] Obtaining each single address conversion transaction data corresponding to the entity data obtained after processing by the transaction privacy protector in the blockchain network, and extracting each directed graph feature data corresponding to each of the single address conversion transaction data;
[0028] The directed graph feature data corresponding to each single address conversion transaction data corresponding to the entity data are input into the blockchain transaction privacy protector penetration model, so that the blockchain transaction privacy protector penetration model outputs the abnormal transaction identification result data corresponding to each single address conversion transaction data corresponding to the entity data, wherein the blockchain transaction privacy protector penetration model is pre-trained based on the blockchain transaction privacy protector penetration model training method.
[0029] In some embodiments of the present application, the blockchain transaction privacy protector penetration method further includes:
[0030] From the abnormal transaction identification result data corresponding to each of the single address conversion transaction data corresponding to the entity data, the number of abnormal transaction identification result data indicating that the single address conversion transaction data does not have abnormalities is obtained as the abnormal transaction value;
[0031] Determining whether a ratio between the abnormal transaction value corresponding to the entity data and the total number of single address conversion transaction data corresponding to the entity data is less than an abnormal transaction ratio threshold;
[0032] If the ratio is less than the abnormal transaction ratio threshold and the ratio is 0, generating entity recognition result data indicating that the entity data has no abnormal risk;
[0033] If the ratio is less than the abnormal transaction ratio threshold and the ratio is not 0, generating entity recognition result data indicating that the abnormal risk level of the entity data is a first risk level;
[0034] If the ratio is equal to or greater than the abnormal transaction ratio threshold, entity recognition result data is generated, indicating that the abnormal risk level of the entity data is a second risk level.
[0035] The third aspect of the present application provides a blockchain transaction privacy protector penetration model training device, comprising:
[0036] A training data processing module is configured to extract directed graph feature data corresponding to each piece of single address conversion transaction data corresponding to each piece of entity data obtained after processing by a transaction privacy protector in a blockchain network; wherein the entity data includes: an address transaction set of a starting transaction address corresponding to a transaction account, and an address transaction set corresponding to each of other transaction addresses generated after the starting transaction address has been subjected to at least one address conversion by the transaction privacy protector, wherein the address transaction set includes each piece of transaction data corresponding to the transaction address uniquely corresponding to the address transaction set;
[0037] The model training module is used to train a graph attention neural network model based on each directed graph feature data corresponding to each of the single address conversion transaction data, so as to train the graph attention neural network model into a blockchain transaction privacy protector penetration model for outputting abnormal transaction identification result data corresponding to the single address conversion transaction data according to each of the directed graph feature data corresponding to the single address conversion transaction data.
[0038] A fourth aspect of the present application provides a blockchain transaction privacy protector penetration device, comprising:
[0039] An application data processing module is used to obtain each single address conversion transaction data corresponding to the entity data obtained after processing by the transaction privacy protector in the blockchain network, and respectively extract each directed graph feature data corresponding to each of the single address conversion transaction data;
[0040] The model recognition module is used to input each directed graph feature data corresponding to each single address conversion transaction data corresponding to the entity data into the blockchain transaction privacy protector penetration model, so that the blockchain transaction privacy protector penetration model outputs each abnormal transaction identification result data corresponding to each single address conversion transaction data corresponding to the entity data, wherein the blockchain transaction privacy protector penetration model is pre-trained based on the blockchain transaction privacy protector penetration model training method.
[0041] The fifth aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, it implements the blockchain transaction privacy protector penetration model training method and / or implements the blockchain transaction privacy protector penetration method.
[0042] The sixth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it implements the blockchain transaction privacy protector penetration model training method and / or implements the blockchain transaction privacy protector penetration method.
[0043] The seventh aspect of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the blockchain transaction privacy protector penetration model training method and / or implements the blockchain transaction privacy protector penetration method.
[0044] The present application provides a blockchain transaction privacy protector penetration model training method, which extracts directed graph feature data corresponding to each single address conversion transaction data corresponding to each entity data obtained after being processed by a transaction privacy protector in a blockchain network. The entity data includes: an address transaction set of a starting transaction address corresponding to a transaction account, and an address transaction set corresponding to each other transaction address generated after the starting transaction address is converted at least once by the transaction privacy protector, wherein the address transaction set contains each transaction data corresponding to the transaction address uniquely corresponding to the address transaction set. A graph attention neural network model is trained based on each directed graph feature data corresponding to each single address conversion transaction data, so that the graph attention neural network model is trained as a blockchain transaction privacy protector penetration model for outputting abnormal transaction identification result data corresponding to the single address conversion transaction data based on each directed graph feature data corresponding to the single address conversion transaction data. The method can train a model for identifying whether transaction data processed by the blockchain transaction privacy protector contains anomalies, and thus can achieve penetration of the blockchain transaction privacy protector based on the model, thereby improving the traceability and security of transactions executed by the transaction privacy protector.
[0045] Additional advantages, purposes, and features of the present application will be described in part in the following description and will become apparent to those skilled in the art upon study of the following or may be learned from practice of the present application. The purposes and other advantages of the present application may be achieved and obtained by the structures specifically pointed out in the specification and drawings.
[0046] Those skilled in the art will understand that the purposes and advantages that can be achieved by the present application are not limited to the above specific description, and the above and other purposes that can be achieved by the present application will be more clearly understood based on the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The drawings described herein are intended to provide a further understanding of the present application, constitute a part of the present application, and do not constitute a limitation of the present application. The components in the drawings are not drawn to scale, but are only for the purpose of illustrating the principles of the present application. In order to facilitate the illustration and description of some parts of the present application, the corresponding parts in the drawings may be enlarged, that is, they may become larger than other components in the exemplary device actually manufactured according to the present application. In the drawings:
[0048] Figure 1 This is a first flow chart of a blockchain transaction privacy protector penetration model training method in one embodiment of the present application.
[0049] Figure 2This is a second flow chart of the blockchain transaction privacy protector penetration model training method in one embodiment of the present application.
[0050] Figure 3 This is a schematic diagram of the directed graphs corresponding to the transaction set before address conversion and the transaction set after address conversion in an example of this application.
[0051] Figure 4 This is a third flow chart of the blockchain transaction privacy protector penetration model training method in one embodiment of the present application.
[0052] Figure 5 This is a schematic diagram of the architecture of a graph attention neural network model in one embodiment of the present application.
[0053] Figure 6 This is another architectural diagram of the graph attention neural network model in one embodiment of the present application.
[0054] Figure 7 This is a first flow chart of a blockchain transaction privacy protector penetration method in one embodiment of the present application.
[0055] Figure 8 This is a second flow chart of the blockchain transaction privacy protector penetration method in one embodiment of the present application.
[0056] Figure 9 This is a first structural diagram of a blockchain transaction privacy protector penetration model training device in one embodiment of the present application.
[0057] Figure 10 This is a second structural diagram of the blockchain transaction privacy protector penetration model training device in one embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail in conjunction with the embodiments and drawings. Here, the illustrative embodiments of this application and their descriptions are used to explain this application, but are not intended to limit this application.
[0059] It should also be noted here that in order to avoid obscuring the present application due to unnecessary details, the accompanying drawings only show structures and / or processing steps that are closely related to the scheme according to the present application, while other details that are not closely related to the present application are omitted.
[0060] It should be emphasized that the term "include / comprises" when used herein refers to the existence of features, elements, steps or components, but does not exclude the existence or addition of one or more other features, elements, steps or components.
[0061] It should also be noted that, unless otherwise specified, the term "connection" herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0062] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0063] In one or more embodiments of the present application, the transaction privacy protector (i.e., blockchain transaction privacy protector) can be implemented in a blockchain network using a privacy protection contract based on Zero-Knowledge Proof (ZKP).
[0064] In one example, the working process of the transaction privacy protector includes:
[0065] (1) Deposit: Users deposit their funds or other tradable entity unique identifiers into the smart contract address provided by the transaction privacy protector.
[0066] (2) Generate zero-knowledge proofs: When making a deposit, users generate a “zero-knowledge proof” (zk-SNARKs), a cryptographic technique used to prove the authenticity of certain information without revealing specific details. Transaction privacy protectors use these proofs to ensure that users can provide valid credentials when withdrawing funds without revealing their transaction history.
[0067] (3) Privacy protection process: The smart contract of the transaction privacy protector protects the privacy of the source and destination of deposits, converts the transaction address of deposits, and prevents external observers from tracking the transaction flow.
[0068] (4) Withdrawal: Users can withdraw their deposits from the transaction privacy protector to their new transaction address. When withdrawing, users use the previously generated zero-knowledge proof to verify their deposit without revealing their specific deposit address or other transaction details.
[0069] The features of the transaction privacy protector include:
[0070] (1) Decentralization: The transaction privacy protector runs on Ethereum smart contracts and does not rely on centralized service providers, which means there is no single control point or operator.
[0071] (2) Privacy protection: By using zero-knowledge proof technology, the transaction privacy protector can effectively hide the source and destination of transactions, providing stronger privacy protection.
[0072] (3) Untraceability: Due to the complexity of the privacy protection process and the use of zero-knowledge proof, it is difficult for external observers to track the flow of funds, thereby increasing the anonymity of transactions.
[0073] Funds flowing into a transaction privacy protector are untraceable. A transaction privacy protector acts like a black box, obscuring the relationship between inflows and outflows. This characteristic of a transaction privacy protector also presents an obstacle to combating anomalous trading behavior.
[0074] "Penetration" technology refers to a technology that can explore the relationship between funds flowing into and out of a transaction privacy protector. Because transaction privacy protectors are open source, decentralized, and based on zero-knowledge proofs, it is almost impossible to "frontally penetrate" a transaction privacy protector. However, an entity (i.e., a user account) has its own behavioral habits, which may also be reflected in its use of the blockchain network. Therefore, this application is based on the "entity behavior invariance" assumption, which assumes that even if an entity uses a transaction privacy protector, the behavior habits of the address after privacy protection will not change.
[0075] Based on this, in order to design a method that can identify whether transaction data processed by a transaction privacy protector in a blockchain network is abnormal, the embodiments of the present application respectively provide a blockchain transaction privacy protector penetration model training method, a blockchain transaction privacy protector penetration method, a blockchain transaction privacy protector penetration model training device for executing the blockchain transaction privacy protector penetration model training method, a blockchain transaction privacy protector penetration device for executing the blockchain transaction privacy protector penetration method, a physical device, a computer-readable storage medium and a computer program product, and use the disclosed entity data of the publicly used transaction privacy protector to train the graph attention network.
[0076] It can be understood that in one or more embodiments of the present application, blockchain transaction privacy protector penetration refers to identifying whether there are abnormal transactions in the entity data processed by the transaction privacy protector in the blockchain network.
[0077] The details are described in detail through the following examples.
[0078] Based on this, the embodiment of the present application provides a blockchain transaction privacy protector penetration model training method that can be implemented by a blockchain transaction privacy protector penetration model training device, see Figure 1 The blockchain transaction privacy protector penetration model training method specifically includes the following contents:
[0079] Step 100: For each single address conversion transaction data corresponding to each entity data obtained after processing by the transaction privacy protector in the blockchain network, extract each directed graph feature data corresponding to each single address conversion transaction data; wherein, the entity data includes: an address transaction set of a starting transaction address corresponding to a transaction account and an address transaction set corresponding to each other transaction address generated after the starting transaction address is converted at least once by the transaction privacy protector, and the address transaction set contains each transaction data corresponding to the transaction address uniquely corresponding to the address transaction set.
[0080] In one or more embodiments of the present application, the single address conversion transaction data includes: an address transaction set of a transaction address in the entity data (i.e., a transaction set before address conversion corresponding to the source address) and an address transaction set of another transaction address generated after the transaction address is converted once by the transaction privacy protector (i.e., a transaction set after address conversion corresponding to the target address).
[0081] Step 200: A graph attention neural network model is trained based on each directed graph feature data corresponding to each of the single address conversion transaction data, so as to train the graph attention neural network model into a blockchain transaction privacy protector penetration model for outputting abnormal transaction identification result data corresponding to the single address conversion transaction data according to each of the directed graph feature data corresponding to the single address conversion transaction data.
[0082] The Graph Attention Neural Network (GAT) is a machine learning model based on the Graph Attention Neural Network (GAT). Its core working principle is to calculate the relationships between nodes through an attention mechanism. In traditional neural networks, the state of each vertex in a directed graph is updated independently. However, in the GAT, the state update of each vertex takes into account the states of its neighbors. The GAT calculates the attention weights between a vertex and its neighbors and then updates the vertex's state based on these weights. This weighted information update allows the GAT to better capture structural information in directed graphs.
[0083] From the above description, it can be seen that the blockchain transaction privacy protector penetration model training method provided in the embodiment of the present application can train a model for identifying whether there are anomalies in the transaction data processed by the blockchain transaction privacy protector, and then can realize the penetration of the blockchain transaction privacy protector based on the model, thereby improving the traceability and security of transactions executed by the transaction privacy protector.
[0084] In order to further improve the application effectiveness and reliability of single address conversion transaction data, in a blockchain transaction privacy protector penetration model training method provided in an embodiment of the present application, see Figure 2 The blockchain transaction privacy protector penetration model training method further includes the following contents before step 100:
[0085] Step 010: The real entity data corresponding to each transaction account obtained after processing by the transaction privacy protector in the blockchain network are marked as positive samples respectively; and the new entity data generated by cross-constructing the address transaction set of the entity data corresponding to each transaction account is marked as a negative sample.
[0086] Specifically, the embodiment of the present application can pre-collect the entity data of each entity that has been publicly disclosed on the network and has used a transaction privacy protector. In order to ensure the training accuracy, the transaction address (i.e., Ethereum address, also referred to as address) used in this application must meet a certain transaction quantity TC. Therefore, each transaction address in the selected entity data must contain multiple transaction data in the corresponding address transaction set. It can be understood that the transaction data refers to data containing a certain transaction information. The transaction information can include information such as the transaction amount, average transaction interval time, account balance, fund retention rate, and smart contract call preference, which can be set according to actual application requirements.
[0087] In one example, the data structure of the entity data is as follows:
[0088] TXSET addr(1) :{Tx1,Tx2…}→TXSET addr(2) :{Tx1,Tx2…}→…
[0089] →TXSET addr(n) :{Tx1,Tx2…}
[0090] In the above structure, TXSET addr(1) :{Tx1,Tx2…} represents the address transaction set corresponding to address addr(1), which contains specific transaction data. The transaction data Tx1 and Tx2 in each address transaction set only represent the first and second transactions in the set, respectively. Although Tx1 and Tx2 in different sets have the same symbolic expression, they represent different transaction data.
[0091] The symbol “→” that follows represents the use of a transaction privacy protector. Due to the use of a transaction privacy protector, its address may change (or may not change). Here, addr(2) is used to represent the address that may change. If the address does not change, then:
[0092] addr(1)=addr(2)
[0093] This entity data may use the transaction privacy protector multiple times, and each use will generate a new arrow pointing to a new address transaction set. It can be seen that in the above structure, the transaction privacy protector is used a total of n-1 times, forming n address transaction sets.
[0094] Step 020: Based on the number of times each of the entity data marked as the positive sample and the negative sample is subjected to address conversion by the transaction privacy protector, each of the entity data is split separately to obtain each single address conversion transaction data corresponding to each of the entity data; wherein the single address conversion transaction data includes: a pre-address conversion transaction set corresponding to the source address and a post-address conversion transaction set corresponding to the target address; the source address is any transaction address in the entity data, and the target address is another transaction address generated after the source address is subjected to one address conversion by the transaction privacy protector.
[0095] It can be understood that the transaction set before address conversion includes all transaction data in which the source address participates; and the transaction set after address conversion includes all transaction data in which the target address participates.
[0096] In one example, based on the above example of entity data, the specific form of each single address conversion transaction data is shown in Table 1:
[0097] Table 1
[0098]
[0099]
[0100] Assuming that a total of N entity data are collected, each entity data can be split into n-1 single address conversion transaction data, then the total training data volume of this application can reach N×(n-1).
[0101] In order to further improve the application effectiveness and reliability of extracting each directed graph feature data corresponding to each of the single address conversion transaction data, in a blockchain transaction privacy protector penetration model training method provided in an embodiment of the present application, see Figure 2 , step 100 in the blockchain transaction privacy protector penetration model training method specifically includes the following content:
[0102] Step 110: According to the transaction time sequence corresponding to each of the transaction data, based on a preset transaction quantity division threshold, the pre-address conversion transaction set and the post-address conversion transaction set corresponding to each of the single address conversion transaction data are divided into transaction data to obtain directed graphs corresponding to the pre-address conversion transaction set and the post-address conversion transaction set, respectively, wherein each of the directed graphs includes vertices for representing different transaction data and edges for representing transaction relationships between different transaction data.
[0103] Specifically, for each address transaction set in each training data, this application decomposes it based on the transaction number threshold T. That is, the packaging timestamps of all transaction data in the address transaction set are flattened on the timeline, and a subgraph (i.e., a directed graph) is generated for every T transactions.
[0104] See also Figure 3 , each piece of training data is protected by a transaction privacy protector ( Figure 3 The big black dot on the time axis is divided into two time intervals on the left and right. For the address transaction sets on the left and right sides, they are divided according to the transaction number threshold T=3, that is, every 3 transactions are a partition interval and a directed graph SG can be generated. i ( Figure 3 A total of 5 directed graphs are generated, numbered SG1-SG5). Figure 3 In the example, transactions in different intervals are marked on the timeline with different colored dots. Since the address will usually change after the transaction privacy protector, Figure 3 All directed graphs on the left use red vertices to represent transaction addresses before address conversion by the transaction privacy protector. Figure 3 The directed graph on the right side uses dark green vertices to represent transaction addresses after address conversion by the transaction privacy protector.
[0105] Regarding negative samples, this application randomly selects different entity data and cross-constructs negative sample data of the same amount as the positive samples. For example, the address transaction set of entity data X is spliced with the address transaction set of entity data Y.
[0106] Step 120: Extract the graph feature data corresponding to each of the directed graphs respectively to obtain the directed graph feature data corresponding to each of the single address conversion transaction data; wherein the directed graph feature data includes a directed graph corresponding to the corresponding single address conversion transaction data and the graph feature data corresponding to the directed graph.
[0107] In order to further extract the application effectiveness and reliability of the graph feature data corresponding to each of the directed graphs, in a blockchain transaction privacy protector penetration model training method provided in an embodiment of the present application, see Figure 4 Step 120 in the blockchain transaction privacy protector penetration model training method specifically includes the following content:
[0108] Step 121: extracting vertex feature data of each vertex and edge feature data of each edge corresponding to each directed graph respectively, to form graph feature data corresponding to each directed graph.
[0109] Specifically, for each directed graph SG i , all transaction data within 3 hops are completed for it, and features are extracted from the vertices and edges in the completed directed graph based on the completed directed graph.
[0110] In one embodiment of the present application, the vertex feature data includes: feature data for representing the in-degree of the vertex in the directed graph, the out-degree of the vertex in the directed graph, the total deposits and total withdrawals corresponding to the vertex, the average transaction interval time, the account balance, the fund retention rate and the smart contract call preference.
[0111] The fund retention rate refers to the address's ability to process funds. For example, if an address transfers 5 ETH to this address, and the account immediately transfers all 4.7 ETH out, the fund retention rate for this address is (5-4.7) / 5. If multiple transactions transfer funds to the address, the fund retention rate is the average of these retention rates.
[0112] Smart contract call preference is a vector whose dimensions represent the smart contract classification. Currently, a large amount of research has been conducted on classifying smart contracts based on their code content. For example, this application can utilize pre-trained language models to classify the content of smart contracts. This application categorizes smart contracts into: finance, governance, authentication and authorization, supply chain, gaming, NFT, contract and legal, data, and other contracts. Therefore, the smart contract call preference is a 9-dimensional vector. The vector content is the normalized data of the number of times the address calls each type of smart contract.
[0113] In one embodiment of the present application, the edge feature data includes feature data representing the number of calls and the total amount corresponding to the edge. The number of calls corresponding to the edge refers to the number of edges after multiple transactions are combined. The total amount feature data refers to the total amount after multiple transactions are combined.
[0114] In order to further identify whether the transaction data processed by the blockchain transaction privacy protector has abnormal validity and reliability, in a blockchain transaction privacy protector penetration model training method provided in an embodiment of the present application, see Figure 5 The graph attention neural network model in the blockchain transaction privacy protector penetration model training method specifically includes the following contents:
[0115] A graph attention neural network is configured to extract features of the vertices and edges in the directed graph for each directed graph feature data corresponding to the input single address conversion transaction data, so as to obtain graph readout embedding vectors corresponding to each directed graph feature data corresponding to the single address conversion transaction data;
[0116] A first concatenation layer is used to concatenate graph-read embedding vectors corresponding to respective directed graph feature data corresponding to the pre-address conversion transaction set, to obtain a concatenation vector (Embedding_left) corresponding to the pre-address conversion transaction set;
[0117] The second splicing layer is used to splice the graph-read embedding vectors corresponding to the directed graph feature data corresponding to the post-address conversion transaction set to obtain the splicing vector (Embedding_right) corresponding to the post-address conversion transaction set;
[0118] a first multi-layer perceptron, configured to extract transaction behavior features from the concatenated vector corresponding to the pre-address conversion transaction set output by the first concatenation layer, to obtain pre-address conversion transaction behavior feature data (Behaviour_left) corresponding to the pre-address conversion transaction set;
[0119] The second multi-layer perceptron is used to extract transaction behavior features from the splicing vector corresponding to the post-address conversion transaction set output by the second splicing layer, so as to obtain post-address conversion transaction behavior feature data (Behaviour_right) corresponding to the post-address conversion transaction set; wherein both the first multi-layer perceptron and the second multi-layer perceptron adopt a multi-layer perceptron MLP.
[0120] And, a cosine loss layer (Cosine Loss), which is used to calculate the cosine loss value between the transaction behavior feature data before address conversion output by the first multi-layer perceptron and the transaction behavior feature data after address conversion output by the second multi-layer perceptron based on the cosine loss function.
[0121] exist Figure 5In the figure, Embedding_1, Embedding_2, Embedding_3, Embedding_4 and Embedding_5 represent the feature vectors corresponding to different directed graphs (i.e., graph readout embedding vectors).
[0122] like Figure 5 As shown, all SG i The graph attention neural network (GAT) is fed with graph readout embeddings (Embeddings). These embeddings are then concatenated in chronological order, before and after the use of the transaction privacy protector. To utilize the behavior data before the use of the transaction privacy protector, this application feeds the concatenated embeddings into a multi-layer perceptron (MLP). Note that two MLPs are used here, representing the behavior extracted before and after the use of the transaction privacy protector. At this point, the feature vectors output by the two MLPs are of the same dimension. The cosine loss function is then used to evaluate their losses and update the entire network.
[0123] In this application, the attention mechanism in the graph attention neural network GAT is also improved. Generally speaking, the traditional graph attention neural network GAT calculates the vertex V i With vertex V j The attention is based on the concatenation of the embedding vectors between two vertices without considering the edge between the two vertices. The original formula is as follows:
[0124]
[0125] in is the attention weight matrix, W is the graph embedding vector weight matrix, is the vertex eigenvector. The result of calculation is a scalar value, so The dimension is 1*2F, where F is Therefore It is 2F*1.
[0126] This application adds the semantics of the edge to the original formula, and the formula is rewritten as:
[0127]
[0128] Among them, att ij It is an improved attention mechanism to distinguish the original attention ij Attention mechanism makes the distinction; is a 2*2F weight matrix for extracting vertex eigenvalues. ij refers to the edge feature; LeakyReLU is the LeakyReLU function.
[0129] It means splicing point features with edge features. The role of The function of is the same as that of , which is a 1*4 weight matrix used to calculate the scalar value, namely the attention score. Through this improvement, this application also includes the edge features into the assessment scope of the attention mechanism. This is a very important improvement. In the blockchain network, V i If you give V j Transferring a large sum of money or making frequent transfers is a clear behavioral characteristic that should be addressed. However, traditional attention mechanisms do not take this into account.
[0130] In order to further improve the application intelligence of the blockchain transaction privacy protector penetration model, in a blockchain transaction privacy protector penetration model training method provided in an embodiment of the present application, see Figure 6 The graph attention neural network model in the blockchain transaction privacy protector penetration model training method also specifically includes the following contents:
[0131] A binary classifier connected to the cosine loss layer is used to determine whether the cosine loss value output by the cosine loss layer is within a preset transaction behavior difference threshold range. If so, the binary classifier outputs abnormal transaction identification result data indicating that there is no abnormality in the single address conversion transaction data; if not, the binary classifier outputs abnormal transaction identification result data indicating that there is an abnormality in the single address conversion transaction data.
[0132] It is understandable that the transaction behavior difference threshold range can be set according to actual application requirements, for example, it can be set to 0 to 0.3.
[0133] Based on the above-mentioned blockchain transaction privacy protector penetration model training method embodiment, this application also provides a blockchain transaction privacy protector penetration method embodiment, see Figure 7 The blockchain transaction privacy protector penetration method specifically includes the following contents:
[0134] Step 300: Obtain each single address conversion transaction data corresponding to the entity data obtained after processing by the transaction privacy protector in the blockchain network, and extract each directed graph feature data corresponding to each of the single address conversion transaction data.
[0135] Step 400: Input each directed graph feature data corresponding to each single address conversion transaction data corresponding to the entity data into the blockchain transaction privacy protector penetration model, so that the blockchain transaction privacy protector penetration model outputs each abnormal transaction identification result data corresponding to each single address conversion transaction data corresponding to the entity data, wherein the blockchain transaction privacy protector penetration model is pre-trained based on the blockchain transaction privacy protector penetration model training method.
[0136] It can be understood that the specific implementation methods of the model online application process from step 300 to step 400 of the present application can refer to the implementation methods of each step in the aforementioned blockchain transaction privacy protector penetration model training method. In addition, the blockchain transaction privacy protector penetration model mentioned in step 400 can also be implemented using the blockchain transaction privacy protector penetration model training method mentioned in the aforementioned embodiment, which will not be repeated here.
[0137] From the above description, it can be seen that the blockchain transaction privacy protector penetration method provided in the embodiment of the present application can achieve the penetration of the blockchain transaction privacy protector based on the model, thereby improving the traceability and security of transactions executed by the transaction privacy protector.
[0138] In order to further improve the intelligent degree of penetration of the blockchain transaction privacy protector and the effectiveness of the abnormal transaction identification result data, in the blockchain transaction privacy protector penetration method provided in the embodiment of the present application, see Figure 8 The blockchain transaction privacy protector penetration method further includes the following content after step 400:
[0139] Step 500: From the abnormal transaction identification result data corresponding to each of the single address conversion transaction data corresponding to the entity data, the number of abnormal transaction identification result data indicating that the single address conversion transaction data does not have abnormality is obtained as the abnormal transaction value.
[0140] Step 600: Determine whether the ratio between the abnormal transaction value corresponding to the entity data and the total number of single address conversion transaction data corresponding to the entity data is less than an abnormal transaction ratio threshold; if the ratio is less than the abnormal transaction ratio threshold and the ratio is 0, generate entity identification result data indicating that the entity data has no abnormal risk; if the ratio is less than the abnormal transaction ratio threshold and the ratio is not 0, generate entity identification result data indicating that the abnormal risk level of the entity data is a first risk level; if the ratio is equal to or greater than the abnormal transaction ratio threshold, generate entity identification result data indicating that the abnormal risk level of the entity data is a second risk level.
[0141] It is understandable that the abnormal transaction ratio threshold can be set according to actual application requirements. For example, it can be set to any ratio between 0% and 50%.
[0142] From the software level, this application also provides a blockchain transaction privacy protector penetration model training device for executing all or part of the blockchain transaction privacy protector penetration model training method, see Figure 9 The blockchain transaction privacy protector penetration model training device specifically includes the following contents:
[0143] The training data processing module 10 is configured to extract directed graph feature data corresponding to each piece of single address conversion transaction data corresponding to each piece of entity data obtained after processing by the transaction privacy protector in the blockchain network. The entity data includes: an address transaction set of a starting transaction address corresponding to a transaction account, and an address transaction set corresponding to each of other transaction addresses generated after the starting transaction address is converted at least once by the transaction privacy protector. The address transaction set includes transaction data corresponding to each transaction address uniquely corresponding to the address transaction set.
[0144] The model training module 20 is used to train a graph attention neural network model based on each directed graph feature data corresponding to each of the single address conversion transaction data, so as to train the graph attention neural network model into a blockchain transaction privacy protector penetration model that outputs abnormal transaction identification result data corresponding to the single address conversion transaction data based on each of the directed graph feature data corresponding to the single address conversion transaction data.
[0145] The embodiment of the blockchain transaction privacy protector penetration model training device provided in this application can be specifically used to execute the processing flow of the embodiment of the blockchain transaction privacy protector penetration model training method in the above embodiment. Its functions will not be repeated here, and reference can be made to the detailed description of the embodiment of the blockchain transaction privacy protector penetration model training method.
[0146] The portion of the blockchain transaction privacy protector penetration model training apparatus that performs blockchain transaction privacy protector penetration model training can be performed on a server or client device. The specific selection can be based on the processing capabilities of the client device and the limitations of the user's usage scenario. This application is not limited to this. If all operations are performed on the client device, the client device may also include a processor for the specific processing of blockchain transaction privacy protector penetration model training.
[0147] The client device may include a communication module (i.e., a communication unit) that can establish a communication connection with a remote server to implement data transmission with the server. The server may include a server on the task scheduling center side, and in other implementation scenarios, may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, a server cluster consisting of multiple servers, or a server structure of a distributed device.
[0148] The server and the client device may communicate using any suitable network protocol, including network protocols that have not yet been developed as of the filing date of this application. Examples of such network protocols include TCP / IP, UDP / IP, HTTP, and HTTPS. Furthermore, examples of such network protocols include RPC (Remote Procedure Call Protocol) and REST (Representational State Transfer) protocols, which are used on top of the aforementioned protocols.
[0149] From the above description, it can be seen that the blockchain transaction privacy protector penetration model training device provided in the embodiment of the present application can train a model for identifying whether there are anomalies in the transaction data processed by the blockchain transaction privacy protector, and then can realize the penetration of the blockchain transaction privacy protector based on the model, thereby improving the traceability and security of transactions executed by the transaction privacy protector.
[0150] From the software level, this application also provides a blockchain transaction privacy protector penetration device for executing all or part of the blockchain transaction privacy protector penetration method, see Figure 10 The blockchain transaction privacy protector penetration device specifically includes the following contents:
[0151] The application data processing module 30 is used to obtain each single address conversion transaction data corresponding to the entity data obtained after processing by the transaction privacy protector in the blockchain network, and respectively extract each directed graph feature data corresponding to each of the single address conversion transaction data.
[0152] The model identification module 40 is used to input the directed graph feature data corresponding to each single address conversion transaction data corresponding to the entity data into the blockchain transaction privacy protector penetration model, so that the blockchain transaction privacy protector penetration model outputs the abnormal transaction identification result data corresponding to each single address conversion transaction data corresponding to the entity data, wherein the blockchain transaction privacy protector penetration model is pre-trained based on the blockchain transaction privacy protector penetration model training method.
[0153] The embodiment of the blockchain transaction privacy protector penetration device provided in this application can be specifically used to execute the processing flow of the embodiment of the blockchain transaction privacy protector penetration method in the above embodiment. Its functions will not be repeated here, and reference can be made to the detailed description of the above-mentioned blockchain transaction privacy protector penetration method embodiment.
[0154] The portion of the blockchain transaction privacy protector penetration device that performs blockchain transaction privacy protector penetration can be performed on either the server or the client device. The specific selection can be based on the processing capabilities of the client device and the limitations of the user's usage scenario. This application does not impose any restrictions on this. If all operations are performed on the client device, the client device may also include a processor for the specific processing of blockchain transaction privacy protector penetration.
[0155] The present application also provides an electronic device that may include a processor, a memory, a receiver, and a transmitter. The processor is configured to execute the blockchain transaction privacy protector penetration model training method and / or the blockchain transaction privacy protector penetration method described in the above embodiments. The processor and memory may be connected via a bus or other means, with bus connection being used as an example. The receiver may be connected to the processor and memory via a wired or wireless connection.
[0156] The processor may be a central processing unit (CPU). The processor 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.
[0157] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as the blockchain transaction privacy protector penetration model training method and / or the program instructions / modules corresponding to the blockchain transaction privacy protector penetration method in the embodiments of the present application. The processor executes the non-transitory software programs, instructions, and modules stored in the memory to perform various processor functions and data processing, thereby implementing the blockchain transaction privacy protector penetration model training method and / or the blockchain transaction privacy protector penetration method in the above method embodiments.
[0158] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to the processor 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.
[0159] The one or more modules are stored in the memory, and when executed by the processor, execute the blockchain transaction privacy protector penetration model training method and / or the blockchain transaction privacy protector penetration method in the embodiment.
[0160] In some embodiments of the present application, the user equipment may include a processor, a memory and a transceiver unit, and the transceiver unit may include a receiver and a transmitter. The processor, memory, receiver and transmitter may be connected through a bus system. The memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to control the transceiver unit to send and receive signals.
[0161] As an implementation method, the functions of the receiver and transmitter in this application can be considered to be implemented through a transceiver circuit or a dedicated transceiver chip, and the processor can be considered to be implemented through a dedicated processing chip, a processing circuit or a general-purpose chip.
[0162] As another implementation method, it is possible to use a general-purpose computer to implement the server provided in the embodiments of the present application. That is, the program code for implementing the functions of the processor, receiver, and transmitter is stored in a memory, and the general-purpose processor implements the functions of the processor, receiver, and transmitter by executing the code in the memory.
[0163] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned blockchain transaction privacy protector penetration model training method and / or the steps of the blockchain transaction privacy protector penetration method. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, floppy disk, hard disk, removable storage disk, CD-ROM, or any other form of storage medium known in the art.
[0164] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the blockchain transaction privacy protector penetration model training method and / or implements the blockchain transaction privacy protector penetration method.
[0165] It should be understood by those skilled in the art that the various exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is specifically performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of this application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0166] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.
[0167] In this application, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or replace features of other embodiments.
[0168] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Those skilled in the art will appreciate that various modifications and variations of the present embodiment are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A blockchain transaction privacy protector penetration model training method, characterized in that: include: For each piece of single address conversion transaction data corresponding to each piece of entity data obtained after processing by the transaction privacy protector in the blockchain network, extract each directed graph feature data corresponding to each piece of said single address conversion transaction data; wherein the entity data includes: an address transaction set of a starting transaction address corresponding to a transaction account and an address transaction set corresponding to each of other transaction addresses generated after the starting transaction address is converted at least once by the transaction privacy protector, wherein the address transaction set includes each piece of transaction data corresponding to the transaction address uniquely corresponding to the address transaction set; Training a graph attention neural network model based on each directed graph feature data corresponding to each of the single address conversion transaction data, so as to train the graph attention neural network model into a blockchain transaction privacy protector penetration model for outputting abnormal transaction identification result data corresponding to the single address conversion transaction data according to each of the directed graph feature data corresponding to the single address conversion transaction data; Before extracting the directed graph feature data corresponding to each of the single address conversion transaction data corresponding to each of the entity data obtained after processing by the transaction privacy protector in the blockchain network, the method further includes: The real entity data corresponding to each transaction account obtained after being processed by the transaction privacy protector in the blockchain network is marked as a positive sample; and the new entity data generated by cross-constructing the address transaction set of the entity data corresponding to each transaction account is marked as a negative sample; Based on the number of times each of the entity data marked as the positive sample and the negative sample is subjected to address conversion by the transaction privacy protector, each of the entity data is split to obtain each of the single address conversion transaction data corresponding to each of the entity data; wherein the single address conversion transaction data includes: a pre-address conversion transaction set corresponding to the source address and a post-address conversion transaction set corresponding to the target address; the source address is any transaction address in the entity data, and the target address is another transaction address generated after the source address is subjected to one address conversion by the transaction privacy protector; The method further comprises extracting directed graph feature data corresponding to each single address conversion transaction data corresponding to each entity data obtained after processing by the transaction privacy protector in the blockchain network, including: According to the transaction time sequence corresponding to each of the transaction data, based on a preset transaction quantity division threshold, the pre-address conversion transaction set and the post-address conversion transaction set corresponding to each of the single address conversion transaction data are respectively divided into transaction data to obtain directed graphs corresponding to the pre-address conversion transaction set and the post-address conversion transaction set, respectively, wherein each of the directed graphs includes vertices for representing different transaction data and edges for representing transaction relationships between different transaction data; The graph feature data corresponding to each of the directed graphs is extracted respectively to obtain the directed graph feature data corresponding to each of the single address conversion transaction data; wherein the directed graph feature data includes a directed graph corresponding to the corresponding single address conversion transaction data and the graph feature data corresponding to the directed graph.
2. The blockchain transaction privacy protector penetration model training method according to claim 1 is characterized in that: The extracting graph feature data corresponding to each of the directed graphs includes: The vertex feature data of each vertex and the edge feature data of each edge corresponding to each directed graph are extracted respectively to form the graph feature data corresponding to each directed graph.
3. The blockchain transaction privacy protector penetration model training method according to claim 2 is characterized in that: The graph attention neural network model includes: A graph attention neural network is configured to extract features of the vertices and edges in the directed graph for each directed graph feature data corresponding to the input single address conversion transaction data, so as to obtain a graph readout embedding vector corresponding to each directed graph feature data corresponding to the single address conversion transaction data; A first concatenation layer is configured to concatenate graph-read embedding vectors corresponding to respective directed graph feature data corresponding to the pre-address conversion transaction set, to obtain a concatenation vector corresponding to the pre-address conversion transaction set; The second splicing layer is used to splice the graph-read embedding vectors corresponding to the directed graph feature data corresponding to the post-address conversion transaction set to obtain a splicing vector corresponding to the post-address conversion transaction set; a first multi-layer perceptron, configured to extract transaction behavior features from the concatenated vector corresponding to the pre-address conversion transaction set output by the first concatenation layer, to obtain pre-address conversion transaction behavior feature data corresponding to the pre-address conversion transaction set; a second multi-layer perceptron, configured to extract transaction behavior features from the concatenated vector corresponding to the post-address conversion transaction set output by the second concatenation layer, to obtain post-address conversion transaction behavior feature data corresponding to the post-address conversion transaction set; And, a cosine loss layer is used to calculate the cosine loss value between the transaction behavior feature data before address conversion output by the first multi-layer perceptron and the transaction behavior feature data after address conversion output by the second multi-layer perceptron based on the cosine loss function.
4. The blockchain transaction privacy protector penetration model training method according to claim 3 is characterized in that: The graph attention neural network model also includes: A binary classifier is used to determine whether the cosine loss value output by the cosine loss layer is within a preset transaction behavior difference threshold range. If so, it outputs abnormal transaction identification result data indicating that there is no abnormality in the single address conversion transaction data; if not, it outputs abnormal transaction identification result data indicating that there is an abnormality in the single address conversion transaction data.
5. A blockchain transaction privacy protector penetration method, characterized in that: include: Obtaining each single address conversion transaction data corresponding to the entity data obtained after processing by the transaction privacy protector in the blockchain network, and extracting each directed graph feature data corresponding to each of the single address conversion transaction data; The directed graph feature data corresponding to each single address conversion transaction data corresponding to the entity data are input into the blockchain transaction privacy protector penetration model, so that the blockchain transaction privacy protector penetration model outputs the abnormal transaction identification result data corresponding to each single address conversion transaction data corresponding to the entity data, wherein the blockchain transaction privacy protector penetration model is pre-trained based on the blockchain transaction privacy protector penetration model training method according to any one of claims 1 to 4.
6. The blockchain transaction privacy protector penetration method according to claim 5 is characterized in that: Also includes: From the abnormal transaction identification result data corresponding to each of the single address conversion transaction data corresponding to the entity data, the number of abnormal transaction identification result data indicating that the single address conversion transaction data does not have abnormalities is obtained as the abnormal transaction value; Determining whether a ratio between the abnormal transaction value corresponding to the entity data and the total number of single address conversion transaction data corresponding to the entity data is less than an abnormal transaction ratio threshold; If the ratio is less than the abnormal transaction ratio threshold and the ratio is 0, generating entity recognition result data indicating that the entity data has no abnormal risk; If the ratio is less than the abnormal transaction ratio threshold and the ratio is not 0, generating entity recognition result data indicating that the abnormal risk level of the entity data is a first risk level; If the ratio is equal to or greater than the abnormal transaction ratio threshold, entity recognition result data is generated, indicating that the abnormal risk level of the entity data is a second risk level.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, it implements the blockchain transaction privacy protector penetration model training method as described in any one of claims 1 to 4, and / or implements the blockchain transaction privacy protector penetration method as described in claim 5 or 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the blockchain transaction privacy protector penetration model training method as described in any one of claims 1 to 4, and / or implements the blockchain transaction privacy protector penetration method as described in claim 5 or 6.
Citation Information
Patent Citations
Auxiliary tracking method and system for abnormal fund flow in Ethereum
CN118313842A