Design method of secure and reliable cryptocurrency transaction fraud detection model under hybrid blockchain

By employing a hybrid blockchain architecture and an adaptive privacy budgeting approach, the problems of storage consumption and privacy leakage in blockchain federated learning are addressed, enabling efficient and secure detection of cryptocurrency transaction fraud.

CN119741021BActive Publication Date: 2026-02-10DONGHUA UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411760448.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2026-02-10
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

Under the blockchain federated learning framework, how can we reduce storage consumption without sacrificing decentralization, ensure the security and reliability of cryptocurrency transaction fraud detection, and prevent privacy leaks and detection performance loss?

Method used

A hybrid blockchain architecture is adopted, combining public and consortium blockchains. Ledger nodes are selected based on hash value and trust score. A differential privacy method with adaptive privacy budget and sensitivity calculation is designed. Local model parameters are stored only on the consortium blockchain, while hash values ​​are stored on the public blockchain to prevent information inference attacks.

Benefits of technology

It increased transaction throughput, reduced storage consumption, ensured the privacy and security of transaction participants, and reduced the performance loss of fraud detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741021B_ABST
    Figure CN119741021B_ABST
Patent Text Reader

Abstract

The application provides a kind of mixed blockchain under safe and reliable cryptocurrency transaction fraud detection model design method, including steps: building light mixed blockchain cryptocurrency transaction fraud detection model based on federated learning;According to the user credibility score, a consensus mechanism based on light mixed blockchain is proposed;Based on gradient similarity and attack heterogeneity, an adaptive privacy budget and sensitivity calculation differential privacy method is designed, and based on adaptive privacy budget allocation and sensitivity calculation method, a cryptocurrency transaction fraud detection model based on federated learning framework based on mixed blockchain is constructed.The federated learning framework based on mixed blockchain can improve the throughput and reduce the memory usage, and can also defend against information inference attacks through adaptive privacy allocation and sensitivity calculation, ensure that the privacy of transaction participants is not disclosed, while reducing the performance loss of fraud detection.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to a secure and reliable cryptocurrency transaction fraud detection model design method under a hybrid blockchain, and belongs to the technical field of blockchains. BACKGROUND

[0002] With the development of blockchain technology, cryptocurrencies have received more and more attention. At the same time, fraudulent activities in cryptocurrency transactions have become more rampant and complex, such as phishing scams and Ponzi schemes. In order to effectively detect counterfeit cryptocurrency transactions, regulators must collect transaction records between users. However, existing privacy-preserving payment mechanisms, in order to defend against de-anonymization attacks, also prevent regulators from collecting transaction records for transaction fraud detection. However, users will keep their original transaction records locally, which allows us to collaboratively train a cryptocurrency transaction fraud detection model using federated learning (FL).

[0003] Traditional federated learning frameworks aggregate local models in a centralized manner, which can cause single points of failure. Since blockchain has the characteristics of decentralization, tamper resistance, and traceability, some research has combined federated learning with blockchain to address the above shortcomings. Under this framework, each user trains a local model based on their own data and sends the local model to the blockchain. After aggregating the received models, the blockchain will broadcast the global model to the users and reward them. At the same time, the blockchain stores the global model and the local model in each block, providing an opportunity to track and punish attackers. However, there are two challenges when building a privacy-preserving cryptocurrency transaction fraud detection model.

[0004] First, blockchain can be divided into public blockchain and consortium blockchain. Some research has proposed FL that supports public blockchain. However, public blockchain-based methods are open and transparent. They will provide loopholes for attackers to blur the supervision of smart contracts or launch information inference attacks. Storing local models in a public database will also consume a large amount of storage space. In order to protect privacy and reduce the time consumption of reaching consensus, some research has proposed a consortium FL framework based on blockchain. However, consortium blockchain-based methods are partially decentralized, which can authorize privileged nodes to maliciously change the content of the blockchain, potentially harming the interests of other nodes. Therefore, under the FL framework that supports blockchain, how to reduce storage consumption, ensure security and reliability without sacrificing decentralization is a challenge.

[0005] Secondly, although FL can build fraud detection models while keeping data locally, there is still a privacy leakage vulnerability in the uploaded local model. Some studies use differential privacy (DP) to defend against the above attacks. DP-based methods usually need to make a good trade-off between fraud detection model performance and privacy budget. Good privacy protection performance will seriously affect the detection performance. Existing adaptive differential privacy algorithms can add different degrees of noise according to the value range of local model parameters. However, it ignores the influence of the heterogeneity risk and gradient similarity of different attacks on the privacy budget, and sacrifices the detection performance when protecting privacy. Therefore, it is necessary to consider the similarity and heterogeneity risk of different inference attacks and design a more fine-grained DP method. SUMMARY

[0006] The purpose of the present application is to reduce the storage consumption of the blockchain and ensure the security and reliability of the transaction detection process under the support of the blockchain-based federated learning framework without sacrificing decentralization, thereby constructing a secure and reliable cryptocurrency transaction fraud detection model with privacy protection function.

[0007] In order to achieve the above purpose, the technical scheme of the present application discloses a safe and reliable cryptocurrency transaction fraud detection model design method under a hybrid blockchain, characterized in that it comprises the following steps:

[0008] Step 1, build a lightweight hybrid blockchain cryptocurrency transaction fraud detection model based on federated learning, comprising the following steps:

[0009] Step 101, the public blockchain participant trains its local model based on the global model and local data;

[0010] Step 102, part of the ordinary users of the public blockchain are selected as committee members, the public blockchain participant calculates the hash value of the local model and sends it to the current committee and the alliance blockchain;

[0011] Step 103, the alliance blockchain participant verifies and aggregates the local model, and calculates the credibility score of the participant c i Credibility score The higher the credibility score, the more reliable the participant, and the global model is obtained by aggregating the verified local model;

[0012] Step 104, when the alliance blockchain participant reaches a consensus, the model training fingerprint is repaired in the alliance blockchain;

[0013] Step 105, the alliance blockchain participant selects the accounting node of the public blockchain from the committee members and sends the global model to it; ​

[0014] Step 106, after the committee members reach a consensus, the accounting node patches the hash value of the local model and the global model into the public blockchain;

[0015] Step 107, the public blockchain participants get the global model from the public chain and start the next round of local model training;

[0016] Step 2, according to the user credibility score, a consensus mechanism based on light hybrid blockchain is proposed, including the following steps:

[0017] Step 201, for the kth round of federated learning, the participants of the last round of public blockchain automatically become the consensus committee C={c1,c2,…,c n}, where n represents the number of committee members;

[0018] Step 202, the participants of this round train their local models based on the global model and local data;

[0019] Step 203, the participants of this round calculate the hash value of the local model, and send the local model and its hash value to the consortium chain;

[0020] Step 204, the consortium chain calculates the credibility score of each participant

[0021]

[0022] Where, TOA(c j ) is the local model time offset accumulation of participant c j

[0023] Step 205, after the consortium chain reaches a consensus, the accounting node generates hash value β and VRF proof π using a verifiable random function according to the hash value and private key, wherein the accounting node of the public blockchain is selected according to the credibility score of the committee members, and the participants with higher scores have a higher probability of becoming the accounting node;

[0024] Step 206, the consortium chain sends the hash value β, VRF proof π and the selection of the accounting node to the committee members;

[0025] Step 207, once the selection of the accounting node is verified by the committee members, the accounting node patches the block into the public blockchain;

[0026] Step 3, based on the gradient similarity and attack heterogeneity, a differential privacy method of adaptive privacy budget and sensitivity calculation is designed.

[0027] ​Preferably, in step 1, the hybrid blockchain is composed of a public blockchain and a consortium blockchain; in the hybrid blockchain, the public blockchain is composed of some ordinary nodes, and the consortium blockchain is composed of some authorities.

[0028] Preferably, for the light hybrid blockchain, a lightweight public blockchain that only retains local model hash values is designed under the hybrid blockchain framework based on federated learning, and the difference between the public blockchain and the consortium blockchain is that the public blockchain only stores the hash values of the local models, while the consortium blockchain not only stores the hash values of the local models, but also stores the model parameters of the local models, wherein:

[0029] The public blockchain stores some public or de-identified data and runs some smart contracts without privacy concerns, and provides some basic reliable services to supervise the consortium blockchain.

[0030] The consortium blockchain stores private data and runs some complex or security-based smart contracts.

[0031] Preferably, in step 1, the public blockchain includes miners and accounting nodes: the accounting nodes receive and save the hash values of the local models and the global model sent by the consortium chain; the miners are responsible for training the model according to the received global model and local data, and uploading the local model and its hash value to the consortium chain.

[0032] The consortium blockchain includes ordinary clients and accounting nodes: the ordinary clients receive the local model and its hash value, verify the uploaded local model parameters, and calculate the reputation score; the accounting nodes: record the account application of the reputation value, the reward value, and the detection cost, and are responsible for the issuance of rewards and the collection of fraud detection costs, and store the local model parameters.

[0033] Preferably, in step 205, the selection of the accounting nodes depends on the credibility score of the committee members, so that each participant c i has a credibility score The selection probability P s (c i ) is calculated as:

[0034]

[0035] For each participant c i , corresponding to a sub-interval SI i in [0,2 L ), we have:

[0036]

[0037] where L represents the number of bits of the hash value β, and if β falls in the sub-interval SI i , then the corresponding participant ci The ledger nodes selected as the public blockchain.

[0038] Preferably, in step 3, the differential privacy method of adaptive privacy budget is used to defend against DLG and MIA attacks, wherein:

[0039] For DLG attack, the privacy budget of user i in the local training of the tth round is adaptively changed according to the model gradient as follows:

[0040]

[0041] Wherein, ε represents a predefined privacy budget, represents the privacy budget of user i in the tth round of communication against DLG attack, represents the model gradient of user i in the tth round, and the symbol represents the Euclidean norm;

[0042] The privacy budget against MIA attack can be adaptively changed as follows:

[0043]

[0044] In the formula, var() is the variance operation, represents the privacy budget of user i in the tth round of communication against MIA attack, represents the prediction of the fraud detection model based on the tuple x m

[0045] The privacy budget of the ith participant in the tth round is adaptively changed to defend against DLG and MIA attacks as follows:

[0046]

[0047] Wherein, represents the privacy budget of user i in the tth round of communication.

[0048] Preferably, in step 3, based on the adaptive privacy budget allocation and sensitivity calculation method, a cryptocurrency transaction fraud detection model under the federated learning framework based on the hybrid blockchain is constructed, including the following steps:

[0049] The alliance blockchain initializes the global transaction fraud detection model;

[0050] ​Participants collaboratively train a global fraud detection model using adaptive privacy budget allocation and adaptive sensitivity calculation. The process includes the following steps: each participant obtains a local model gradient based on the global transaction fraud detection model; each participant calculates the noise scale for the bias and weight gradients; after obtaining the noise scale, each participant calculates a new gradient with adaptive noise, and each participant updates their local model using gradient descent based on the new gradient; after each participant sends their local model to the consortium blockchain, the global model is updated and patched using a hybrid blockchain-based federated learning framework; the hybrid blockchain synchronizes the global model to other participants; when the maximum number of global rounds is reached, the training process stops and the final cryptocurrency transaction fraud detection model is output.

[0051] Preferably, in step 3, the noise scale of the weight gradient between the i-th input and the j-th output of the k-th layer is defined as... Then we have:

[0052]

[0053] The noise scale of the weight gradient between the i-th input and j-th output of the k-th layer in response to R-gap attacks:

[0054]

[0055] In the formula, ε represents the privacy budget. For loss function, Let ||||1 represent the bias of the j-th output of the k-th layer, and ||||1 represents the Manhattan norm.

[0056] Let the noise scale of the Laplace mechanism in the k-th layer at round t be:

[0057]

[0058] In the formula, The sensitivity of the t-th round to the k-th layer Let represent the gradient of the k-th layer in the t-th round. Let represent the privacy budget for user i in round t of communication.

[0059] Preferably, in step 3, each participant calculates a new gradient with adaptive noise using the following formula:

[0060] The new weight gradient between the i-th input and the j-th output of the k-th layer is calculated as follows:

[0061]

[0062] In the formula, Lap() represents the Laplace mechanism.

[0063] The new gradient of the bias at the k-th layer in the t-th round is calculated as follows:

[0064] The technical solution disclosed in this invention has the following advantages compared with the prior art:

[0065] Hybrid blockchain models can improve throughput and reduce memory usage. They can also effectively defend against information inference attacks through adaptive privacy allocation and sensitivity calculation, ensuring that the privacy of transaction participants is not compromised, while reducing the performance loss of fraud detection. Attached Figure Description

[0066] Figure 1 This is a flowchart illustrating the design of a secure and reliable cryptocurrency transaction fraud detection model under a hybrid blockchain, as disclosed in an embodiment of the present invention.

[0067] Figure 2 This is shown as a system framework for a federated learning model based on hybrid blockchain in one embodiment of the present invention;

[0068] Figure 3 The diagram shows the block structure of the public blockchain within the hybrid blockchain in one embodiment of the present invention.

[0069] Figure 4 The block structure of the consortium blockchain within the hybrid blockchain is shown in one embodiment of the present invention;

[0070] Figure 5 The diagram shown is a schematic representation of a public blockchain consensus mechanism within a hybrid blockchain according to an embodiment of the present invention. Detailed Implementation

[0071] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.

[0072] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0073] like Figure 1 As shown, this invention provides a design for a secure and reliable cryptocurrency transaction fraud detection model under a hybrid blockchain, the steps of which are as follows:

[0074] Step 1: Construct a lightweight hybrid blockchain cryptocurrency transaction fraud detection model based on federated learning.

[0075] Step 2: Based on user credibility scores, propose a consensus mechanism based on a lightweight hybrid blockchain.

[0076] Step 3: Based on gradient similarity and attack heterogeneity, a differential privacy method for adaptive privacy budget and sensitivity calculation is designed.

[0077] like Figure 2 As shown, the cube on the left represents each block in a public blockchain, and the cube on the right represents each block in a consortium blockchain. A hybrid blockchain consists of both public and consortium blockchains. In a hybrid blockchain, the public blockchain comprises ordinary nodes, such as cryptocurrency users; the consortium blockchain comprises authoritative institutions, such as national banking regulatory commissions, cryptocurrency exchanges, and banks.

[0078] In this embodiment of the invention, step 1 constructs a federated learning fraud detection framework that integrates public and consortium blockchains, further including the following steps:

[0079] Step 101: Public blockchain participants train their local models based on the global model and local data.

[0080] Step 102: Some ordinary users of the public blockchain will be selected as committee members. Public blockchain participants calculate the hash value of their local model and send it to the current committee and the consortium blockchain.

[0081] Step 103: Consortium blockchain participants verify and summarize their local models, and calculate corresponding credibility scores. Participants with higher credibility scores are more trustworthy. This invention uses... To represent participant c i The score. The global model is obtained by aggregating validated local models.

[0082] Step 104: When the participants in the consortium blockchain reach a consensus, they will patch the model training fingerprint in the consortium blockchain, such as the local model and the credibility score.

[0083] Step 105: Consortium blockchain participants select the public blockchain's ledger node from the committee members and send the global model to it.

[0084] Step 106: After the committee members reach a consensus, the ledger node patches the hash value of the local model and the global model into the public blockchain.

[0085] Step 107: Public blockchain participants obtain the global model from the public chain and begin the next round of local model training.

[0086] Furthermore, to reduce storage space consumption for ordinary users, this invention designs a lightweight public blockchain that only retains the local model hash value within a hybrid blockchain framework based on federated learning. Specifically, the public blockchain stores some public or anonymized data and runs some smart contracts without privacy concerns, such as calculating model hashes. It mainly provides some basic reliable services to monitor the consortium blockchain. The consortium blockchain stores private data and runs some complex or security-based smart contracts, such as local models, model verification, and reputation calculations. In this way, the privacy of data and smart contracts can be maintained when building fraud detection models, while reducing congestion on the public blockchain and facilitating model training under the FL framework.

[0087] Figure 3 This demonstrates the block structure of a public blockchain. In a public blockchain, each block contains the hash of the previous block, forming a chain. The global model is shared through the public blockchain. Local model hashes (LMHs) guarantee the correctness of the local models stored in the consortium blockchain. This way, the public blockchain doesn't need to store local models for each update round, saving space for participants. The score distribution represents the trust score of public blockchain participants. The consortium blockchain uses a VRF (Verifiable Ranking Function) to select ledger nodes based on the score distribution. A VRF is a function that can be used to verify the validity of the output. Through VRF proofs, the public keys of the ledger nodes in the consortium blockchain, and the score distribution, any participant can obtain the same VRF output to verify the selection of ledger nodes. Furthermore, each block in a public blockchain also contains a timestamp, the training round number, and a CoinBase (the CoinBase transaction is the first transaction in a new block, rewarding miners with newly generated cryptocurrency).

[0088] like Figure 4 As shown, each block in the consortium blockchain not only stores the model hash value of the received local model, but also stores the model parameters of the local model (LM), namely LM1 to LM8.

[0089] In addition, public blockchains include miners and ledger nodes. Consortium blockchains include regular clients and ledger nodes. In public blockchains, ledger nodes receive and store the hash values ​​of local models and the global model sent by the consortium blockchain; miners are responsible for training models based on the received global model and local data and uploading the local model and its hash value to the consortium blockchain. In consortium blockchains, regular clients receive the local model and its hash value, verify the uploaded local model parameters, and calculate reputation scores; ledger nodes record reputation scores, reward values, and detection fees, and are responsible for distributing rewards and collecting fraud detection fees, as well as storing local model parameters.

[0090] Consensus mechanisms play a crucial role in maintaining the integrity and security of blockchain systems. This invention utilizes the Replicated And Fault-Tolerant (RAFT) consensus algorithm in consortium blockchains. For public blockchains, this invention proposes a consensus mechanism based on user credit scores.

[0091] like Figure 5 As shown, step 2, the public blockchain consensus mechanism based on the consortium blockchain, includes the following steps:

[0092] Step 201: For the k-th round FL, the participants of the previous round of the public blockchain automatically become the consensus committee C = {c1, c2, ..., c...} n}, where n represents the number of committee members.

[0093] Step 202: Participants in this round train their local models based on the global model and local data.

[0094] Step 203: Participants in this round calculate the hash value of their local model and send the local model and its hash value to the consortium blockchain.

[0095] Step 204: The consortium blockchain calculates the credibility score for each participant.

[0096] Credibility Score The calculation formula is as follows:

[0097]

[0098] Among them, TOA(c j ) for participant c j The local model's Time Offset Accumulation (TOA) is used. A higher TOA value indicates a greater likelihood of malicious intent from the participant.

[0099] Step 205: After reaching consensus, the ledger nodes generate a hash value β and a VRF proof π using the hash value and private key. Here, the ledger nodes of the public blockchain are selected based on the credibility scores of the committee members. Participants with higher scores have a higher probability of becoming ledger nodes. Therefore, this invention selects ledger nodes based on the credibility scores of each participant c. i Credibility score A selection probability P is defined. s (c i ).

[0100]

[0101] In the formula, c i Representing different participants; Representative participant c i The credibility score. For each participant c i , corresponding to [0,2 L A sub-interval SI in ) i ,have

[0102]

[0103] Where L represents the number of bits in the hash value β, if β falls within the subinterval SI i Then the corresponding participant c i It will be selected as a ledger node for the public blockchain.

[0104] Step 206: The consortium blockchain sends the hash value β, the VRF proof π, and the selection of the ledger node to the committee members.

[0105] Step 207: Once the selection of the ledger node is verified by the committee members, the ledger node will patch the block to the public blockchain.

[0106] Because federated learning-based hybrid blockchain cryptocurrency transaction fraud detection models involve a large number of participating nodes, aggregating local models using multi-party secure computation methods results in significant communication overhead, while homomorphic encryption introduces substantial communication costs. Therefore, this invention proposes an adaptive differential privacy-focused model aggregation method that improves model accuracy while ensuring privacy and security.

[0107] Dynamic programming (DP)-based methods typically require a careful trade-off between fraud detection model performance and privacy budget. Good privacy protection performance can significantly impact detection performance. Therefore, to minimize the performance loss in fraud detection, the privacy budget in DP needs to be set appropriately.

[0108] This invention first presents an adaptive privacy budget allocation method to defend against Data Leakage Gradient (DLG) attacks and Membership Inference Attack (MIA) attacks. Building upon this, the invention proposes an adaptive sensitivity calculation method to defend against Reconstruction Gap (R-gap) attacks. Based on the adaptive privacy budget allocation and sensitivity calculation methods, this invention constructs a cryptocurrency transaction fraud detection model within the FL framework based on a hybrid blockchain.

[0109] Furthermore, step 3, based on gradient similarity and attack heterogeneity, designs a differential privacy method for adaptive privacy budget and sensitivity calculation, including the following steps:

[0110] DLG attacks reconstruct the input by minimizing the deviation between the model gradient g and the generated model gradient g′. Since the attacker has access to g rather than local data, this invention can assume that local training employs a Laplace mechanism. The dynamic programming (DP) algorithm. The t-th round of local training can be represented by the DP mechanism as follows:

[0111]

[0112] It is a random number generation algorithm, where x is the original dataset, x′ is the dataset adjacent to x, and o is... The generated random numbers, g is the model gradient, g′ is the model gradient generated by DLG, ||||2 represents the Euclidean norm, σ is the noise scale of the Laplace mechanism, and ε t For the privacy budget in round t.

[0113] As the model converges, the bias between gradients of different inputs decreases, and the bias between g and g′ also decreases. Simultaneously, the privacy budget of FL gradually decreases, thereby strengthening privacy protection. Therefore, to counter DLG attacks, this invention adaptively changes the privacy budget of user i in round t based on the model gradient as follows:

[0114]

[0115] Where ε represents a predefined privacy budget, This represents the privacy budget of user i against DLG attacks in round t of communication. This represents the model gradient for user i in round t.

[0116] In reality, the training input is classified with high confidence, while the non-training input is classified with low confidence. MIA attacks can infer the in / out labels based on the confidence of the model's output. The FL framework aggregates the participants' local models, improving the model's generalization performance. Therefore, more non-training inputs will be classified with higher confidence, leading to lower MIA attack performance. Thus, the privacy budget for MIA attacks can be adaptively changed as follows:

[0117]

[0118] In the formula, var() is the variance operator; This represents the privacy budget of user i against MIA attacks in round t of communication. Calculated as

[0119]

[0120] In the formula, Represents based on tuple xm The prediction of the fraud detection model Represents tuple x m The label.

[0121] Therefore, this invention adaptively changes the privacy budget of the i-th participant in the t-th round to defend against DLG and MIA attacks, as follows:

[0122]

[0123] in, Let represent the privacy budget for user i in round t of communication.

[0124] Sensitivity of the t-th round to the k-th layer It can be calculated as

[0125]

[0126] The noise scale of the Laplace mechanism is calculated as follows:

[0127]

[0128] Let be the noise scale for the k-th layer.

[0129] R-gap attacks infer inputs based on gradients of weights and biases. To defend against R-gap attacks, this invention can only add dynamic programming (DP) to the weights or biases. The forward propagation process of a neural network can be represented as follows:

[0130] y=ω*x+b (11)

[0131] When we add noise Δn to the weights, we have

[0132] Δy=Δn*x (12)

[0133] When we add noise Δn to the bias, we have

[0134]

[0135] If x∈[0,1], then Therefore, when the input is normalized, adding noise to the bias of the neural network leads to a relatively large prediction error. Furthermore, based on the attack process of the R-gap attack, we have...

[0136]

[0137] In the formula, For loss function, This represents the i-th input of the k-th layer. This represents the weights between the i-th input and the j-th output of the k-th layer. This represents the bias of the j-th output of the k-th layer. The sensitivity of the k-th layer is the bias gradient. The noise scale of the weight gradient between the i-th input and the j-th output of the k-th layer can be defined as follows:

[0138]

[0139] In the formula, ||||1 represents the Manhattan norm.

[0140] Based on adaptive privacy budget allocation and adaptive sensitivity calculation, the noise scale for calculating the weight gradient between the i-th input and j-th output of the k-th layer is:

[0141]

[0142] The new weight gradient between the i-th input and the j-th output of the k-th layer can be calculated as follows:

[0143]

[0144] In the formula, Lap() represents the Laplace mechanism.

[0145] Then the new gradient of the bias at the k-th layer in the t-th round can be calculated as follows:

[0146]

[0147] Therefore, the implementation process of a secure and reliable cryptocurrency transaction fraud detection model under a hybrid blockchain is as follows:

[0148] The consortium blockchain first initializes a global transaction fraud detection model. Then, participants collaboratively train the global fraud detection model using adaptive privacy budget allocation and adaptive sensitivity calculation.

[0149] Specifically, each participant obtains the local model gradient based on the global transaction fraud detection model. Then, each participant calculates the noise scale of the bias and weight gradients according to a predefined privacy budget ε, Equations (10) and (16). After obtaining the noise scale, each participant obtains a new gradient with adaptive noise according to Equations (17) and (18). Each participant updates its local model using gradient descent based on the new gradient. After each participant sends its local model to the consortium blockchain, the global model is updated and patched using a hybrid blockchain-based federated learning framework. Finally, the hybrid blockchain synchronizes the global model to the other participants.

[0150] When the maximum number of global rounds is reached, the training process will stop and the final cryptocurrency transaction fraud detection model will be output.

[0151] As described above, the hybrid blockchain cryptocurrency transaction fraud detection model based on secure and reliable federated learning provided by this invention can improve throughput and reduce memory usage. Through adaptive privacy allocation and sensitivity calculation, this invention can effectively defend against information inference attacks while minimizing the performance penalty in fraud detection.

[0152] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A method for designing a secure and reliable cryptocurrency transaction fraud detection model under a hybrid blockchain, characterized in that, Includes the following steps: Step 1: Construct a lightweight hybrid blockchain cryptocurrency transaction fraud detection model based on federated learning, including the following steps: Step 101: Public blockchain participants train their local models based on the global model and local data; Step 102: Some ordinary users of the public blockchain are selected as committee members. The public blockchain participants calculate the hash value of the local model and send it to the current committee and the consortium blockchain. Step 103: Consortium blockchain participants verify and summarize the local model, and calculate participant c. i Credibility rating Credibility rating More participants are more trustworthy, and a global model is obtained by aggregating validated local models; Step 104: When the participants in the consortium blockchain reach a consensus, repair the model training fingerprint in the consortium blockchain; Step 105: Consortium blockchain participants select the public blockchain's ledger node from the committee members and send the global model to it; Step 106: After the committee members reach a consensus, the ledger node patches the hash value of the local model and the global model to the public blockchain; Step 107: Public blockchain participants obtain the global model from the public chain and begin the next round of local model training; Step 2: Based on user trust scores, propose a consensus mechanism based on a lightweight hybrid blockchain, including the following steps: Step 201: For the k-th round of federated learning, the participants from the previous round of the public blockchain automatically become the consensus committee C = {c1, c2, ..., c...} n }, where n represents the number of committee members; Step 202: Participants in this round train their local models based on the global model and local data; Step 203: Participants in this round calculate the hash value of their local model and send the local model and its hash value to the consortium blockchain; Step 204: The consortium blockchain calculates the credibility score for each participant. Among them, TOA(c j ) for participant c j Local model time offset accumulation; Step 205: After the consortium blockchain reaches a consensus, the ledger nodes generate a hash value β and a VRF proof π using a verifiable random function based on the hash value and the private key. The ledger nodes of the public blockchain are selected based on the credibility scores of the committee members, with participants with better scores having a higher probability of becoming ledger nodes. Step 206: The consortium blockchain sends the hash value β, the VRF proof π, and the selection of the ledger node to the committee members; Step 207: Once the selection of the ledger node is verified by the committee members, the ledger node will patch the block to the public blockchain; Step 3: Based on gradient similarity and attack heterogeneity, a differential privacy method for adaptive privacy budget and sensitivity calculation is designed.

2. The design method for a secure and reliable cryptocurrency transaction fraud detection model under a hybrid blockchain as described in claim 1, characterized in that, In step 1, a hybrid blockchain is formed by public blockchain and consortium blockchain; in the hybrid blockchain, the public blockchain is composed of some ordinary nodes, and the consortium blockchain is composed of some authoritative institutions.

3. The design method for a secure and reliable cryptocurrency transaction fraud detection model under a hybrid blockchain as described in claim 2, characterized in that, For lightweight hybrid blockchains, a lightweight public blockchain that only retains the hash value of the local model is designed within the federated learning-based hybrid blockchain framework. The difference between the public blockchain and the consortium blockchain is that the public blockchain only stores the hash value of the local model, while the consortium blockchain stores not only the hash value of the local model but also the model parameters of the local model. Public blockchains store some publicly available or anonymized data and run some smart contracts without privacy concerns, providing some basic and reliable services to regulate consortium blockchains; Consortium blockchains store private data and run complex or security-based smart contracts.

4. The design method for a secure and reliable cryptocurrency transaction fraud detection model under a hybrid blockchain as described in claim 3, characterized in that, In step 1, the public blockchain includes miners and ledger nodes: ledger nodes receive and save the hash value of the local model and the global model sent by the consortium blockchain; miners are responsible for training the model based on the received global model and local data and uploading the local model and its hash value to the consortium blockchain. The consortium blockchain consists of regular clients and ledger nodes: regular clients receive the local model and its hash value, verify the uploaded local model parameters, and calculate the reputation score; ledger nodes are ledger applications that record reputation values, reward values, and detection fees, and are also responsible for distributing rewards and collecting fraud detection fees, as well as storing local model parameters.

5. The design method for a secure and reliable cryptocurrency transaction fraud detection model under a hybrid blockchain as described in claim 1, characterized in that, In step 205, the selection of the accounting node depends on the credibility scores of the committee members, so each participant c i Credibility rating Calculate the selection probability P s (c i ): For each participant c i , corresponding to [0,2 L A sub-interval SI in ) i ,have: Where L represents the number of bits in the hash value β, if β falls within the subinterval SI i Then the corresponding participant c i It will be selected as a ledger node for the public blockchain.

6. The design method for a secure and reliable cryptocurrency transaction fraud detection model under a hybrid blockchain as described in claim 1, characterized in that, In step 3, a differential privacy method with an adaptive privacy budget is used to defend against DLG and MIA attacks, wherein: For DLG attacks, the privacy budget for user i during local training in round t is adaptively changed according to the model gradient as follows: Where ε represents a predefined privacy budget. This represents the privacy budget of user i against DLG attacks in round t of communication. Let represent the model gradient of user i in round t, and ∥∥2 symbol represent the Euclidean norm. The privacy budget for MIA attacks can be adaptively changed as follows: In the formula, var() is the variance operator. This represents the privacy budget of user i against MIA attacks in round t of communication. Represents based on tuple x m The prediction of the fraud detection model; Adaptively adjust the privacy budget of the i-th participant in round t to defend against DLG and MIA attacks, as follows: in, Let represent the privacy budget for user i in round t of communication.

7. The design method for a secure and reliable cryptocurrency transaction fraud detection model under a hybrid blockchain as described in claim 1, characterized in that, In step 3, based on the adaptive privacy budget allocation and sensitivity calculation method, a cryptocurrency transaction fraud detection model based on a hybrid blockchain federated learning framework is constructed, including the following steps: The consortium blockchain initializes a global transaction fraud detection model; Participants collaboratively train a global fraud detection model using adaptive privacy budget allocation and adaptive sensitivity calculation. The process includes the following steps: each participant obtains a local model gradient based on the global transaction fraud detection model; each participant calculates the noise scale for the bias and weight gradients; after obtaining the noise scale, each participant calculates a new gradient with adaptive noise, and each participant updates their local model using gradient descent based on the new gradient; after each participant sends their local model to the consortium blockchain, the global model is updated and patched using a hybrid blockchain-based federated learning framework; the hybrid blockchain synchronizes the global model to other participants; when the maximum number of global rounds is reached, the training process stops and the final cryptocurrency transaction fraud detection model is output.

8. The design method for a secure and reliable cryptocurrency transaction fraud detection model under a hybrid blockchain as described in claim 7, characterized in that, In step 3, the noise scale of the weight gradient between the i-th input and the j-th output of the k-th layer is defined as... Then we have: The noise scale of the weight gradient between the i-th input and j-th output of the k-th layer in response to R-gap attacks: In the formula, ε represents the privacy budget. For loss function, ∥∥1 represents the bias of the j-th output of the k-th layer, and ∥∥1 represents the calculation of the Manhattan norm; Let the noise scale of the Laplace mechanism in the k-th layer at round t be: In the formula, The sensitivity of the t-th round to the k-th layer Let represent the gradient of the k-th layer in the t-th round. Let represent the privacy budget for user i in round t of communication.

9. The design method for a secure and reliable cryptocurrency transaction fraud detection model under a hybrid blockchain as described in claim 8, characterized in that, In step 3, each participant calculates a new gradient with adaptive noise using the following formula: The new weight gradient between the i-th input and the j-th output of the k-th layer is calculated as follows: In the formula, Lap() represents the Laplace mechanism. The new gradient of the bias at the k-th layer in the t-th round is calculated as follows:

Citation Information

Patent Citations

  • Industry Internet of Things data lightweight trusted sharing technology based on block chain

    CN112395640A

  • Federal learning-based block chain data management method and system, and storage medium

    CN114580009A