| Blockchain is a technology based on cryptography and distributed networks.It enables secure,transparent,tamper-proof and decentralised storage and transmission of data.Data sharing refers to the process of exchanging,using or utilizing data resources among different entities.Traditional data sharing models face many challenges.Through the use of blockchainbased data sharing,the value of data can be enhanced and innovation and collaboration can be facilitated.At present,there are still some problems in the traditional blockchain consensus algorithm and data sharing.At the level of consensus algorithm,although the proof-of-work consensus algorithm has very high security,it also has some problems,such as low efficiency and waste of resources.In terms of data sharing,most of the research is based on blockchain for the sharing of a specific data category,while in the field of commercial data sharing,few people pay attention to commercial data sharing.Against this background,this paper improves the existing learning-based consensus algorithm,and improves the blockchain-based commercial data sharing model.The specific improvements are as follows:(1)To improve the demand of speed,the Proof of Learning-two phase consensus algorithm is proposed.This consensus algorithm adds a round of node pre-consensus on the basis of the original consensus algorithm,that is,the training nodes do not train the model until reaching the final model accuracy when performing the training task,but conduct a preliminary consensus after reaching the pre-consensus accuracy,and then each training node continues to train the model until reaching the final model accuracy,at which point the consensus is completed.Certain rewards are given to the nodes contributing to the pre-consensus model and the final model.(2)In order to improve the security,the Learning-based Nonlinear Consensus Algorithm is proposed.This consensus algorithm uses the original consensus algorithm to verify and reward the wasted time for the training of the next machine learning task,and turns the original linear consensus into a nonlinear consensus.Under the condition of ensuring the security of the original algorithm,the block generation speed is improved to a certain extent.At the same time,the verification list is set to ensure the normal progress of verification and reward.(3)The improved consensus algorithm is applied to the blockchain-based commercial data sharing model and improved,the specific content of each link of the model is discussed,and it is initially implemented in the hyperledger alliance chain.The commercial data sharing model includes:how to link user metadata and how to interact user’s raw data with IPFS file system;How users purchase data and deduct fees Users query,delete relevant data,and change data ownership. |