An improved prim blockchain network transmission optimization method combining training loss and privacy loss

By adding Laplace noise to the local dataset and using the Prim algorithm to select consensus nodes, the blockchain network transmission is optimized, solving the security and efficiency problems of privacy computing in the industrial field, and achieving efficient data consensus and privacy protection.

CN116226897BActive Publication Date: 2026-05-01KUNMING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KUNMING UNIV OF SCI & TECH
Filing Date
2022-08-22
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing privacy computing methods cannot meet the requirements for secure processing of massive industrial data in the industrial field. They suffer from low computational efficiency and low communication speed. At the same time, encrypted data has security vulnerabilities, and federated learning is vulnerable to various types of attacks, such as refactoring attacks.

Method used

By combining training loss and privacy loss, Laplace noise is added to the local dataset for training, the comprehensive loss value is calculated, and the Prim algorithm is used to construct a minimum spanning tree to select the node with the minimum loss as the consensus node, thereby optimizing the blockchain network transmission.

Benefits of technology

It improves the scalability of blockchain network transmission, balances the contradiction between data training loss and privacy loss, improves the consensus efficiency of blockchain network, and ensures model quality and privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116226897B_ABST
    Figure CN116226897B_ABST
Patent Text Reader

Abstract

This invention relates to an improved Prim blockchain network transmission optimization method that combines training loss and privacy loss, belonging to the fields of blockchain and privacy computing technology. First, the dataset to be trained is first subjected to Laplacian noise before local training. Based on the training results, the training loss L is obtained. f ; calculate the privacy loss L based on the noise mechanism added to the dataset. p Secondly, according to L i =λL f +ηL p Calculate the overall loss value. Finally, based on the overall loss evaluation value of the nodes, construct a minimum spanning tree using the Prim algorithm, and select the node on the branch with the minimum loss as the consensus node. This invention can optimize communication between nodes in a blockchain network, improve the scalability of blockchain network transmission, and balance the contradiction between data training loss and privacy loss.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an improved Prim blockchain network transmission optimization method that combines training loss and privacy loss, belonging to the fields of blockchain and privacy computing technology. Background Technology

[0002] Privacy-preserving computation can break down data silos while ensuring privacy and security, and it is already widely used in government, finance, and healthcare. However, for the industrial sector, privacy-preserving computation cannot meet the requirements for secure processing of massive industrial data. On the one hand, privacy-preserving computation is based on complex algorithms such as machine learning and cryptography, and lacks dedicated acceleration chips. When faced with massive industrial data spanning multiple industries and fields, its computational efficiency and communication speed are low. For example, secure multi-party computation currently only achieves millisecond-level computation for a single operation, which is far from sufficient to support massive data processing. On the other hand, encrypted data is essentially a mapping of the original data under certain rules. Attackers can reverse engineer some or all of the original data, posing significant security risks. For example, federated learning faces various types of attacks, including reconstruction attacks, inference attacks, and data theft attacks. Summary of the Invention

[0003] The technical problem this invention aims to solve is to provide an improved Prim blockchain network transmission optimization method that combines training loss and privacy loss, thereby optimizing communication between nodes in the blockchain network, improving the scalability of blockchain network transmission, and balancing the contradiction between data training loss and privacy loss. Furthermore, to ensure the quality of the trained model, a loss threshold is set to filter out unreliable models.

[0004] The technical solution of this invention is: an improved Prim blockchain network transmission optimization method combining training loss and privacy loss. First, the dataset to be trained is first subjected to Laplace noise before local training. Based on the training results, the training loss is obtained. and privacy loss Then, the comprehensive loss value is calculated. Finally, based on the comprehensive loss evaluation value of the node, the minimum spanning tree is constructed using the Prim algorithm, and the node on the branch with the minimum loss is selected as the consensus node.

[0005] The specific steps are as follows:

[0006] Step 1: On the local dataset to be trained Add Laplace noise Then, the model parameters are obtained by training on the dataset with added noise. Based on the training results, obtain the training loss. Privacy loss is calculated based on the noise mechanism added to the dataset. .

[0007] Step 2: Calculate the comprehensive loss evaluation value according to formula (1):

[0008] (1)

[0009] In the formula, Indicates FL number The local training loss of each mobile edge device and Represents a constant.

[0010] constant and Adjustable to meet varying requirements regarding accuracy and privacy. This can be achieved by setting a loss threshold. Models below the loss threshold are ignored to ensure model quality and meet privacy protection requirements.

[0011] Step 3: Based on the comprehensive loss evaluation value of the nodes, construct a minimum spanning tree using the Prim algorithm, and select the node on the branch with the minimum loss as the consensus node. This improves the efficiency of block verification.

[0012] Step 4: Verify and store the training results through consensus nodes.

[0013] After adding Laplace noise in Step 1, the first... The trainee in the first The formula for the wheel model vector iteration is as follows:

[0014] (2)

[0015] In the formula, Indicates the learning rate. This represents the training loss function.

[0016] The calculation of privacy loss in Step 1 Specifically:

[0017] Choose a random algorithm ,and .

[0018] algorithm satisfy Local differential privacy if and only if for all , When the following inequalities are satisfied:

[0019] (3)

[0020] In the formula, Represents the privacy protection budget, This indicates the probability of failure.

[0021] Privacy loss can be expressed as:

[0022] (4)

[0023] Step 3 specifically refers to:

[0024] Step 3.1: The blockchain's node connections form an undirected weighted graph, where the weights represent the combined evaluation of training loss and privacy loss. .

[0025] Step 3.2: Initialize tree T as an empty tree, then add... Extend an edge into tree T until the minimum spanning tree is generated. Edge.

[0026] Step 3.3: After obtaining the minimum spanning tree, select the node with the smallest weight from the initial node 0 as the consensus node of the blockchain.

[0027] This invention addresses the privacy leakage problem during data transmission and sharing in industrial edge network scenarios. First, it employs a differential privacy protection method, incorporating Laplace noise into the gradient to ensure transmission security. Second, based on model training loss and privacy loss, a novel evaluation mechanism for filtering unreliable nodes and substandard models is proposed to balance the conflict between federated learning model loss and data privacy protection, further improving blockchain consensus efficiency. Third, based on node training loss evaluation and privacy leakage levels, the Prim minimum spanning tree algorithm is used to select blockchain consensus nodes to optimize the blockchain network, improve its transmission scalability, and complete the consensus-based on-chain storage of learning parameters, ensuring model parameter security.

[0028] The beneficial effects of this invention are: it optimizes communication between nodes in a blockchain network, improves the scalability of blockchain network transmission, and balances the contradiction between data training loss and privacy loss. Furthermore, since models below the loss threshold can be ignored, the proposed algorithm can guarantee the quality of the trained model. Attached Figure Description

[0029] Figure 1 This is a flowchart of the steps of the present invention;

[0030] Figure 2 This invention is based on Prim's blockchain consensus node selection diagram;

[0031] Figure 3 This is the communication overhead diagram of the present invention. Detailed Implementation

[0032] To make the uses, technical solutions, and advantages of this invention clearer and easier to understand, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention.

[0033] The illustrations and specific parameter values ​​provided in the following examples are mainly for illustrating the basic concept of the present invention and for simulation verification of the present invention. In specific application environments, appropriate adjustments can be made according to the actual scenario and requirements.

[0034] Example 1: As Figure 1 As shown, an improved Prim blockchain network transmission optimization method combining training loss and privacy loss includes the following steps:

[0035] Step 1: On the local dataset to be trained Add Laplace noise Then, the model parameters are obtained by training on the dataset with added noise. Based on the training results, obtain the training loss. Privacy loss is calculated based on the noise mechanism added to the dataset. .

[0036] Step 2: Calculate the comprehensive loss evaluation value according to formula (1):

[0037] (1)

[0038] In the formula, Indicates FL number The local training loss for each mobile edge device. (Constant) and Adjustable to meet varying requirements regarding accuracy and privacy. This can be achieved by setting a loss threshold. Models below the loss threshold are ignored to ensure model quality and meet privacy protection requirements.

[0039] Step 3: Based on the comprehensive loss evaluation value of the nodes, construct the minimum spanning tree using the Prim algorithm, and select the node on the branch with the minimum loss as the consensus node to improve the efficiency of block verification.

[0040] Step 4: Consensus nodes verify and store the training results.

[0041] After adding Laplace noise in Step 1, the first... The trainee in the first The formula for the wheel model vector iteration is:

[0042] (2)

[0043] In the formula, Indicates the learning rate. This represents the training loss function.

[0044] In Step 1, the privacy loss is calculated according to the following formula:

[0045] Choose a random algorithm ,and .algorithm satisfy Local differential privacy if and only if for all , When the following inequalities are satisfied

[0046] (3)

[0047] In the formula, Represents the privacy protection budget, This represents the probability of failure. Privacy loss can be expressed as:

[0048] (4)

[0049] As attached Figure 2 As shown, the relationship between training loss and different privacy losses is illustrated, and a trade-off is found between model convergence and privacy protection level. Since loss evaluation is related to both training loss and privacy loss, this is achieved by adjusting the parameters... and This can be used to meet the different loss requirements of different users. As can be seen from the graph, the larger the weight of the training loss (taking...), the better. After 30 iterations, the total loss is... Smaller. In other words, the lower the level of privacy protection (taking... The more privacy information is leaked, the higher the accuracy of the FL model and the lower the overall loss. The smaller. With increasing privacy protection... The total loss continues to increase It will also increase. From arrive Different weight parameter settings will lead to differences in loss. The difference between the maximum loss in the initial iteration and the minimum loss in the final iteration is 18% and 23%, respectively. Different users can set different loss parameters according to their own needs.

[0050] The process of optimizing the blockchain network in Step 3 is as follows: Figure 3 As shown:

[0051] Step 3.1: The blockchain's node connections form an undirected weighted graph, where the weights represent the combined evaluation of training loss and privacy loss. .

[0052] Step 3.2: Initialize tree T as an empty tree, then add... Extend an edge into tree T until the minimum spanning tree is generated. Edge.

[0053] Step 3.3: After obtaining the minimum spanning tree, select the node with the smallest weight from the initial node 0 as the consensus node of the blockchain.

[0054] This demonstrates the differences in transmission communication overhead under different processing schemes. Compared to the unoptimized scheme, the Prim-optimized scheme has significantly lower communication overhead (almost five times that of the unoptimized scheme) as privacy loss increases. Privacy loss is further reduced when variable Laplace noise is added. The calculation is based on the above formula (4). If some models exceeding the set threshold are selected for pruning, the bandwidth overhead decreases compared to the unoptimized case, but is still higher than the proposed Prim optimization scheme.

[0055] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.

Claims

1. An improved Prim blockchain network transmission optimization method combining training loss and privacy loss, characterized in that: First, Laplacian noise is added to the dataset to be trained before local training. Based on the training results, the training loss is obtained. and privacy loss Then, the comprehensive loss value is calculated. Finally, based on the comprehensive loss evaluation value of the node, the minimum spanning tree is constructed using the Prim algorithm, and the node on the branch with the minimum loss is selected as the consensus node. The specific steps are as follows: Step 1: On the local dataset to be trained Add Laplace noise Then, the model parameters are obtained by training on the dataset with added noise. Based on the training results, obtain the training loss. ; calculate privacy loss based on the noise mechanism added to the dataset. ; Step 2: Calculate the comprehensive loss evaluation value according to formula (1): (1); In the formula, Indicates FL number The local training loss of each mobile edge device and Represents a constant; Step 3: Based on the comprehensive loss evaluation value of the nodes, construct the minimum spanning tree using the Prim algorithm, and select the node on the branch with the minimum loss as the consensus node. Step 4: Verify and store the training results through consensus nodes.

2. The improved Prim blockchain network transmission optimization method combining training loss and privacy loss according to claim 1, characterized in that, The calculation of privacy loss in Step 1 Specifically: Choose a random algorithm ,and ; algorithm satisfy Local differential privacy if and only if for all , When the following inequalities are satisfied: (2); In the formula, Represents the privacy protection budget, Indicates the probability of failure; Privacy loss can be expressed as: (3)。 3. The improved Prim blockchain network transmission optimization method combining training loss and privacy loss according to claim 1, characterized in that, Step 3 specifically refers to: Step 3.1: The blockchain's node connections form an undirected weighted graph, where the weights represent the combined evaluation of training loss and privacy loss. ; Step 3.2: Initialize tree T as an empty tree, then add... Extend an edge into tree T until the minimum spanning tree is generated. Edge; Step 3.3: After obtaining the minimum spanning tree, select the node with the smallest weight from the initial node 0 as the consensus node of the blockchain.

Citation Information

Patent Citations

  • Data value evaluation method based on block chain smart contract

    CN114596095A

  • Method, device and system for privacy protection

    CN114692197A