CN114357490A - A method, device and system for data sharing based on blockchain - Google Patents

A method, device and system for data sharing based on blockchain Download PDF

Info

Publication number
CN114357490A
CN114357490A CN202210016171.8A CN202210016171A CN114357490A CN 114357490 A CN114357490 A CN 114357490A CN 202210016171 A CN202210016171 A CN 202210016171A CN 114357490 A CN114357490 A CN 114357490A
Authority
CN
China
Prior art keywords
data
blockchain
node
chain
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210016171.8A
Other languages
Chinese (zh)
Inventor
李开元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huazhong University of Science and Technology
Ezhou Industrial Technology Research Institute of Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
Ezhou Industrial Technology Research Institute of Huazhong University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huazhong University of Science and Technology, Ezhou Industrial Technology Research Institute of Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN202210016171.8A priority Critical patent/CN114357490A/en
Publication of CN114357490A publication Critical patent/CN114357490A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请提供了一种基于区块链的数据共享方法、装置以及系统,用于在科研方面,通过构建联盟区块链平台,为各机构提供了科研数据采集共享联盟区块链网络(Science Collection Sharing Blockchain,SCSB),如此在共享数据的前提下,克服数据泄密、网络安全风险的问题。方法包括:在加入联盟区块链平台后,区块链节点在所属区块链节点网络组织中,从自身负责的链下采集节点处获取科研机构的科研数据或者医院的病情数据;区块链节点将从链下采集节点获取到的科研数据或者病情数据,根据联盟区块链平台的数据要求进行打包,得到待上链数据;区块链节点将待上链数据提交至联盟区块链平台,待联盟区块链平台中的不同区块链节点间达成共识后写入账本,以提供数据共享服务。

Figure 202210016171

This application provides a blockchain-based data sharing method, device and system, which are used in scientific research to provide various institutions with a scientific research data collection and sharing alliance blockchain network (Science Collection Sharing Blockchain, SCSB), so on the premise of sharing data, it can overcome the problems of data leakage and network security risks. The method includes: after joining the consortium blockchain platform, the blockchain node obtains the scientific research data of scientific research institutions or the condition data of the hospital from the off-chain collection node that it is responsible for in the blockchain node network organization to which it belongs; The node will package the scientific research data or disease data obtained by the off-chain collection node according to the data requirements of the alliance blockchain platform to obtain the data to be uploaded; the blockchain node will submit the data to be uploaded to the alliance blockchain platform. , and write into the ledger after reaching a consensus among different blockchain nodes in the alliance blockchain platform to provide data sharing services.

Figure 202210016171

Description

一种基于区块链的数据共享方法、装置以及系统A method, device and system for data sharing based on blockchain

技术领域technical field

本申请涉及数据共享领域,具体涉及一种基于区块链的数据共享方法、装置以及系统。The present application relates to the field of data sharing, and in particular to a method, device and system for data sharing based on blockchain.

背景技术Background technique

保障数据安全是实现数据共享的必要前提,目前,我国科研数据共享还处在起步阶段,面临着较大的安全风险和治理困境,主要体现在数据泄密和网络安全两个方面。Ensuring data security is a necessary prerequisite for data sharing. At present, my country's scientific research data sharing is still in its infancy, and it faces greater security risks and governance dilemmas, mainly in data leakage and network security.

一是敏感数据和隐私数据随着数据挖掘、数据整合交换泄密风险升高。大数据时代,数据开发应用往往容易侵犯公众、企业、组织、甚至国家的安全和隐私,而科研数据量大,来源广泛,存储集中,数据窃取、滥用、交易变得更容易;并且,科研数据与不同数据源有机整合,也可能导致隐私数据某些特性被逐渐挖掘出来,使得敏感数据存在被泄露和侵害风险,导致很多科研机构之间不愿意共享,担心由于数据共享可能带来的安全隐患,害怕承担责任。因此,保护数据隐私成为实现数据共享的必要前提和必要保障。First, the risk of leakage of sensitive data and private data increases with data mining, data integration and exchange. In the era of big data, data development and application often infringe on the security and privacy of the public, enterprises, organizations, and even the country, while scientific research data is large in volume, widely sourced, and stored in a centralized manner, making data theft, abuse, and transaction easier. The organic integration with different data sources may also lead to the gradual mining of some characteristics of private data, making sensitive data at risk of being leaked and infringed, causing many scientific research institutions to be reluctant to share, worrying about potential security risks due to data sharing. , afraid of taking responsibility. Therefore, protecting data privacy has become a necessary premise and necessary guarantee for realizing data sharing.

二是中心平台架构的结构更易遭受网络攻击。当前,中心科研机构是科研数据的主要拥有者,通用的大数据存储、传输和处理都是通过高度集中的中心服务器来进行的,很多科研机构已经开始通过购买云计算服务存储数据资源,进一步导致数据向各类云端集中,一旦服务器遭到外部黑客攻击,必然会严重威胁数据安全,甚至造成数据库冻结,数据丢失、伪造或恶意篡改等后果。这其中不仅涉及公众、机构的微观数据,也有关乎科研安全、研究安全问题的宏观数据,遭到攻击后将会威胁国家安全,造成全社会无法估量的损失。Second, the structure of the central platform architecture is more vulnerable to cyber attacks. At present, central scientific research institutions are the main owners of scientific research data. General big data storage, transmission and processing are carried out through highly centralized central servers. Many scientific research institutions have begun to store data resources by purchasing cloud computing services, which further leads to Data is centralized in various clouds. Once the server is attacked by external hackers, it will inevitably seriously threaten the data security, and even cause the database to freeze, data loss, forgery or malicious tampering and other consequences. This involves not only the micro data of the public and institutions, but also the macro data related to scientific research security and research security issues. After being attacked, it will threaten national security and cause immeasurable losses to the whole society.

从上述来看,在科研方面,现有技术中的数据共享方案,存在着数据泄密、网络安全风险的问题。From the above point of view, in terms of scientific research, the data sharing solutions in the prior art have the problems of data leakage and network security risks.

发明内容SUMMARY OF THE INVENTION

本申请提供了一种基于区块链的数据共享方法、装置以及系统,用于在科研方面,通过构建联盟区块链平台,为各机构提供了科研数据采集共享联盟区块链网络(ScienceCollection Sharing Blockchain,SCSB),如此在共享数据的前提下,克服数据泄密、网络安全风险的问题。This application provides a blockchain-based data sharing method, device and system, which are used in scientific research to provide various institutions with a scientific research data collection and sharing alliance blockchain network (ScienceCollection Sharing Blockchain, SCSB), so on the premise of sharing data, it can overcome the problems of data leakage and network security risks.

第一方面,本申请提供了一种基于区块链的数据共享方法,方法包括:In a first aspect, the present application provides a blockchain-based data sharing method, the method comprising:

在加入不同科研机构以及不同医院构成的联盟区块链平台后,区块链节点在所属区块链节点网络组织中,从自身负责的链下采集节点处获取科研机构的科研数据或者医院的病情数据,区块链节点以及链下采集节点属于联盟区块链平台登记的同一组织,链下采集节点为处于联盟区块链外部的、用于为区块链节点提供数据采集服务的节点;After joining the consortium blockchain platform composed of different scientific research institutions and different hospitals, the blockchain nodes in the blockchain node network organization to which they belong, obtain the scientific research data of scientific research institutions or the conditions of the hospital from the off-chain collection nodes that they are responsible for Data, blockchain nodes and off-chain collection nodes belong to the same organization registered on the alliance blockchain platform, and off-chain collection nodes are nodes outside the alliance blockchain that provide data collection services for blockchain nodes;

区块链节点将从链下采集节点获取到的科研数据或者病情数据,根据联盟区块链平台的数据要求进行打包,得到待上链数据;The blockchain node will package the scientific research data or disease data obtained from the off-chain collection node according to the data requirements of the alliance blockchain platform to obtain the data to be uploaded;

区块链节点将待上链数据提交至联盟区块链平台,待联盟区块链平台中的不同区块链节点间达成共识后写入账本,以提供数据共享服务。The blockchain node submits the data to be on-chain to the alliance blockchain platform, and writes it to the ledger after reaching a consensus among different blockchain nodes in the alliance blockchain platform to provide data sharing services.

结合本申请第一方面,在本申请第一方面第一种可能的实现方式中,区块链节点在所属区块链节点网络组织中,从自身负责的链下采集节点处获取科研机构的科研数据或者医院的病情数据之前,方法还包括:In combination with the first aspect of the present application, in the first possible implementation manner of the first aspect of the present application, the blockchain node in the blockchain node network organization to which it belongs, obtains the scientific research of scientific research institutions from the off-chain collection node that it is responsible for Before data or hospital condition data, methods also include:

构建联盟区块链平台,联盟区块链平台设计为六层平台结构,六层平台结构包括数据层、网络层、安全层、共识激励层、合约层以及应用业务层,To build an alliance blockchain platform, the alliance blockchain platform is designed as a six-layer platform structure. The six-layer platform structure includes data layer, network layer, security layer, consensus incentive layer, contract layer and application business layer.

数据层,封装了区块数据、链式结构、区块头上的时间戳、哈希函数、Merkle树及区块尾上的随机数、链上的公钥;The data layer encapsulates the block data, the chain structure, the timestamp on the block header, the hash function, the Merkle tree, the random number on the block tail, and the public key on the chain;

网络层,封装了区块链系统的组网方式、消息传播协议和数据验证机制;The network layer encapsulates the networking method, message dissemination protocol and data verification mechanism of the blockchain system;

安全层,为整个联盟区块链体系提供安全保证;The security layer provides security guarantee for the entire consortium blockchain system;

共识激励层,封装了基于统计能力和统计工作量证明的共识算法和激励机制,构建了一种数据提供者、中间人、数据使用者各方参与的共识激励机制;The consensus incentive layer encapsulates the consensus algorithm and incentive mechanism based on statistical capabilities and statistical workload proof, and builds a consensus incentive mechanism for data providers, intermediaries, and data users to participate;

合约层,封装了脚本、算法和智能合约,将区块链由一个封装的系统变成一个可以编程进行二次开发甚至是智能运行的合约机制;The contract layer, which encapsulates scripts, algorithms and smart contracts, turns the blockchain from an encapsulated system into a contract mechanism that can be programmed for secondary development or even intelligent operation;

应用业务层,位于六层平台结构的最顶端,是以代码来实现的应用程序。The application business layer, located at the top of the six-layer platform structure, is an application program implemented by code.

结合本申请第一方面,在本申请第一方面第二种可能的实现方式中,区块链节点存有数据记录池和数据控制器;In combination with the first aspect of the present application, in the second possible implementation manner of the first aspect of the present application, the blockchain node stores a data recording pool and a data controller;

数据记录池存储联盟区块链区块数据;The data record pool stores the block data of the consortium blockchain;

数据控制器负责整合链下采集节点上传的科研数据或者病情数据,并根据智能合约审查采集数据的质量及控制数据的共享访问。The data controller is responsible for integrating scientific research data or disease data uploaded by off-chain collection nodes, reviewing the quality of collected data and controlling shared access to data according to smart contracts.

结合本申请第一方面,在本申请第一方面第三种可能的实现方式中,区块链节点在所属区块链节点网络组织中,从自身负责的链下采集节点处获取科研机构的科研数据或者医院的病情数据之前,方法还包括:In combination with the first aspect of the present application, in the third possible implementation manner of the first aspect of the present application, the blockchain node in the blockchain node network organization to which it belongs, obtains the scientific research of the scientific research institution from the off-chain collection node that it is responsible for Before data or hospital condition data, methods also include:

在数据采集节点接入阶段,链下采集节点通过区块链节点接入联盟区块链平台,成为处于联盟区块链外部的、用于为区块链节点提供数据采集服务的节点,其中,区块链节点利用智能合约进行链下采集节点的基本单位名录库自动更新维护、审核及导入,组织管理员通过实时更新的名录库,将所属组织内链下采集节点的基本信息与公钥上链存储,保证了公钥和链下采集节点之间的匹配关系、公钥的内容不可篡改,公钥从联盟区块链平台中获取,若获取失败,表明数据采集节点未被组织管理员接入,拒绝后续操作,为联盟区块链平台提供最外层的安全防护。In the data collection node access stage, the off-chain collection node accesses the alliance blockchain platform through the blockchain node, and becomes a node outside the alliance blockchain that provides data collection services for the blockchain node. Blockchain nodes use smart contracts to automatically update, maintain, review and import the basic unit directory library of off-chain collection nodes. Organization administrators use the real-time updated directory library to upload the basic information of off-chain collection nodes within their organizations to their public keys. Chain storage ensures the matching relationship between the public key and the off-chain collection node, and the content of the public key cannot be tampered with. The public key is obtained from the alliance blockchain platform. If the acquisition fails, it indicates that the data collection node has not been accessed by the organization administrator. Enter, refuse subsequent operations, and provide the outermost security protection for the alliance blockchain platform.

结合本申请第一方面第三种可能的实现方式中,在本申请第一方面第四种可能的实现方式中,方法还包括:In combination with the third possible implementation manner of the first aspect of the present application, in the fourth possible implementation manner of the first aspect of the present application, the method further includes:

在数据采集阶段中,为保证采集的数据在上报过程中不被篡改、链下采集节点和区块链节点不受非法设备的攻击,区块链平台利用数据采集节点接入阶段生成的公、私钥,采取双向签名验签机制进行链下采集节点和区块链节点之间的身份识别、数据确认。In the data collection stage, in order to ensure that the collected data is not tampered with during the reporting process, and that the off-chain collection nodes and blockchain nodes are not attacked by illegal devices, the blockchain platform uses the public, The private key adopts a two-way signature verification mechanism for identification and data confirmation between off-chain collection nodes and blockchain nodes.

结合本申请第一方面,在本申请第一方面第五种可能的实现方式中,联盟区块链平台中的不同区块链节点间在对待上链数据进行共识的过程中,由统计能力最快计算出有效结果的区块链节点作为当前共识过程中年的主节点,其余区块链节点节点作为从节点,采用拜占庭容错(Practical Byzantine Fault Tolerance,PBFT)共识机制进行区块共识,达成共识后按照时间顺序将当前数据区块以顺序相连的方式存储在联盟区块链平台中,主节点因记录数据获得联盟积分奖励。In combination with the first aspect of the present application, in the fifth possible implementation manner of the first aspect of the present application, in the process of consensus among different blockchain nodes in the consortium blockchain platform to treat the on-chain data, the statistical ability is the most important. The blockchain node that quickly calculates a valid result is used as the master node in the current consensus process, and the rest of the blockchain nodes are used as slave nodes. The Byzantine Fault Tolerance (PBFT) consensus mechanism is used to perform block consensus and reach a consensus. After that, the current data blocks are stored in the alliance blockchain platform in a sequential manner according to the time sequence, and the master node is rewarded with alliance points for recording the data.

结合本申请第一方面,在本申请第一方面第六种可能的实现方式中,在数据共享过程中,采用Merkle树结构,进行层级加密和多级加密,根据区块中三棵Merkle树不同特点,联盟区块链平台上统计数据共享分为三个不同层次:In combination with the first aspect of the present application, in the sixth possible implementation manner of the first aspect of the present application, in the process of data sharing, a Merkle tree structure is used to perform hierarchical encryption and multi-level encryption. According to the difference between the three Merkle trees in the block Features, statistical data sharing on the alliance blockchain platform is divided into three different levels:

第一层次,交易统计Merkle树;The first level, transaction statistics Merkle tree;

第二层次,总体统计Merkle树;The second level, the overall statistical Merkle tree;

第三层次,个体统计Merkle树。The third level, individual statistics Merkle tree.

第二方面,本申请提供了一种基于区块链的数据共享装置,装置包括:In a second aspect, the present application provides a blockchain-based data sharing device, the device comprising:

获取单元,用于在加入不同科研机构以及不同医院构成的联盟区块链平台后,在所属区块链节点网络组织中,从自身负责的链下采集节点处获取科研机构的科研数据或者医院的病情数据,区块链节点以及链下采集节点属于联盟区块链平台登记的同一组织,链下采集节点为处于联盟区块链外部的、用于为区块链节点提供数据采集服务的节点;The acquisition unit is used to obtain scientific research data of scientific research institutions or hospital data from the off-chain collection nodes under the responsibility of the affiliated blockchain node network organization after joining the consortium blockchain platform composed of different scientific research institutions and different hospitals. For disease data, blockchain nodes and off-chain collection nodes belong to the same organization registered on the alliance blockchain platform, and off-chain collection nodes are nodes outside the alliance blockchain that provide data collection services for blockchain nodes;

打包单元,用于将从链下采集节点获取到的科研数据或者病情数据,根据联盟区块链平台的数据要求进行打包,得到待上链数据;The packaging unit is used to package the scientific research data or disease data obtained from the off-chain collection nodes according to the data requirements of the alliance blockchain platform to obtain the data to be uploaded;

上链单元,用于将待上链数据提交至联盟区块链平台,待联盟区块链平台中的不同区块链节点间达成共识后写入账本,以提供数据共享服务。The chaining unit is used to submit the data to be chained to the alliance blockchain platform, and write it into the ledger after reaching a consensus among different blockchain nodes in the alliance blockchain platform to provide data sharing services.

结合本申请第二方面,在本申请第二方面第一种可能的实现方式中,区块链节点在所属区块链节点网络组织中,从自身负责的链下采集节点处获取科研机构的科研数据或者医院的病情数据之前,方法还包括:In combination with the second aspect of the present application, in the first possible implementation manner of the second aspect of the present application, the blockchain node in the blockchain node network organization to which it belongs, obtains the scientific research of the scientific research institution from the off-chain collection node that it is responsible for Before data or hospital condition data, methods also include:

构建联盟区块链平台,联盟区块链平台设计为六层平台结构,六层平台结构包括数据层、网络层、安全层、共识激励层、合约层以及应用业务层,To build an alliance blockchain platform, the alliance blockchain platform is designed as a six-layer platform structure. The six-layer platform structure includes data layer, network layer, security layer, consensus incentive layer, contract layer and application business layer.

数据层,封装了区块数据、链式结构、区块头上的时间戳、哈希函数、Merkle树及区块尾上的随机数、链上的公钥;The data layer encapsulates the block data, the chain structure, the timestamp on the block header, the hash function, the Merkle tree, the random number on the block tail, and the public key on the chain;

网络层,封装了区块链系统的组网方式、消息传播协议和数据验证机制;The network layer encapsulates the networking method, message dissemination protocol and data verification mechanism of the blockchain system;

安全层,为整个联盟区块链体系提供安全保证;The security layer provides security guarantee for the entire consortium blockchain system;

共识激励层,封装了基于统计能力和统计工作量证明的共识算法和激励机制,构建了一种数据提供者、中间人、数据使用者各方参与的共识激励机制;The consensus incentive layer encapsulates the consensus algorithm and incentive mechanism based on statistical capabilities and statistical workload proof, and builds a consensus incentive mechanism for data providers, intermediaries, and data users to participate;

合约层,封装了脚本、算法和智能合约,将区块链由一个封装的系统变成一个可以编程进行二次开发甚至是智能运行的合约机制;The contract layer, which encapsulates scripts, algorithms and smart contracts, turns the blockchain from an encapsulated system into a contract mechanism that can be programmed for secondary development or even intelligent operation;

应用业务层,位于六层平台结构的最顶端,是以代码来实现的应用程序。The application business layer, located at the top of the six-layer platform structure, is an application program implemented by code.

结合本申请第二方面,在本申请第二方面第二种可能的实现方式中,区块链节点存有数据记录池和数据控制器;In combination with the second aspect of the present application, in the second possible implementation manner of the second aspect of the present application, the blockchain node stores a data recording pool and a data controller;

数据记录池存储联盟区块链区块数据;The data record pool stores the block data of the consortium blockchain;

数据控制器负责整合链下采集节点上传的科研数据或者病情数据,并根据智能合约审查采集数据的质量及控制数据的共享访问。The data controller is responsible for integrating scientific research data or disease data uploaded by off-chain collection nodes, reviewing the quality of collected data and controlling shared access to data according to smart contracts.

结合本申请第二方面,在本申请第二方面第三种可能的实现方式中,在数据采集节点接入阶段,链下采集节点通过区块链节点接入联盟区块链平台,成为处于联盟区块链外部的、用于为区块链节点提供数据采集服务的节点,其中,区块链节点利用智能合约进行链下采集节点的基本单位名录库自动更新维护、审核及导入,组织管理员通过实时更新的名录库,将所属组织内链下采集节点的基本信息与公钥上链存储,保证了公钥和链下采集节点之间的匹配关系、公钥的内容不可篡改,公钥从联盟区块链平台中获取,若获取失败,表明数据采集节点未被组织管理员接入,拒绝后续操作,为联盟区块链平台提供最外层的安全防护。In combination with the second aspect of the present application, in the third possible implementation manner of the second aspect of the present application, in the data acquisition node access stage, the off-chain acquisition node accesses the consortium blockchain platform through the blockchain node, and becomes a member of the consortium. A node outside the blockchain that provides data collection services for blockchain nodes. The blockchain node uses smart contracts to automatically update, maintain, review and import the basic unit directory library of off-chain collection nodes, organize administrators Through the real-time updated directory library, the basic information of the off-chain collection node and the public key of the affiliated organization are stored on the chain, which ensures the matching relationship between the public key and the off-chain collection node, and the content of the public key cannot be tampered with. Obtained from the alliance blockchain platform. If the acquisition fails, it indicates that the data collection node has not been accessed by the organization administrator, and subsequent operations are refused, providing the outermost security protection for the alliance blockchain platform.

结合本申请第二方面第三种可能的实现方式中,在数据采集阶段中,为保证采集的数据在上报过程中不被篡改、链下采集节点和区块链节点不受非法设备的攻击,区块链平台利用数据采集节点接入阶段生成的公、私钥,采取双向签名验签机制进行链下采集节点和区块链节点之间的身份识别、数据确认。In combination with the third possible implementation manner of the second aspect of the present application, in the data collection stage, in order to ensure that the collected data is not tampered with during the reporting process, and that off-chain collection nodes and blockchain nodes are not attacked by illegal devices, The blockchain platform uses the public and private keys generated during the access phase of the data acquisition node, and adopts a two-way signature verification mechanism to identify and confirm the identity and data between the off-chain acquisition node and the blockchain node.

结合本申请第二方面,在本申请第二方面第五种可能的实现方式中,联盟区块链平台中的不同区块链节点间在对待上链数据进行共识的过程中,由统计能力最快计算出有效结果的区块链节点作为当前共识过程中年的主节点,其余区块链节点节点作为从节点,采用采用PBFT共识机制进行区块共识,达成共识后按照时间顺序将当前数据区块以顺序相连的方式存储在联盟区块链平台中,主节点因记录数据获得联盟积分奖励。In combination with the second aspect of the present application, in the fifth possible implementation manner of the second aspect of the present application, in the process of consensus among different blockchain nodes in the consortium blockchain platform to treat the data on the chain, the statistical ability is the most important. The blockchain node that quickly calculates a valid result is used as the master node in the current consensus process, and the remaining blockchain nodes are used as slave nodes. The PBFT consensus mechanism is adopted for block consensus. After reaching a consensus, the current data area is chronologically ordered. Blocks are stored in the consortium blockchain platform in a sequential manner, and masternodes are rewarded with consortium points for recording data.

结合本申请第二方面,在本申请第二方面第六种可能的实现方式中,在数据共享过程中,采用Merkle树结构,进行层级加密和多级加密,根据区块中三棵Merkle树不同特点,联盟区块链平台上统计数据共享分为三个不同层次:In combination with the second aspect of the present application, in the sixth possible implementation manner of the second aspect of the present application, in the process of data sharing, a Merkle tree structure is used to perform hierarchical encryption and multi-level encryption. According to the difference between the three Merkle trees in the block Features, statistical data sharing on the alliance blockchain platform is divided into three different levels:

第一层次,交易统计Merkle树;The first level, transaction statistics Merkle tree;

第二层次,总体统计Merkle树;The second level, the overall statistical Merkle tree;

第三层次,个体统计Merkle树。The third level, individual statistics Merkle tree.

第三方面,本申请提供了一种基于区块链的数据共享系统,系统包括区块链节点以及链下采集节点,区块链节点以及链下采集节都包括处理器和存储器,存储器中存储有计算机程序,处理器调用存储器中的计算机程序时执行本申请第一方面或者本申请第一方面任一种可能的实现方式提供的方法。In a third aspect, the present application provides a blockchain-based data sharing system. The system includes a blockchain node and an off-chain collection node. Both the blockchain node and the off-chain collection node include a processor and a memory, and the memory stores There is a computer program, and when the processor calls the computer program in the memory, the method provided by the first aspect of the present application or any possible implementation manner of the first aspect of the present application is executed.

第四方面,本申请提供了一种计算机可读存储介质,计算机可读存储介质存储有多条指令,指令适于处理器进行加载,以执行本申请第一方面或者本申请第一方面任一种可能的实现方式提供的方法。In a fourth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the first aspect of the present application or any one of the first aspect of the present application. methods provided by a possible implementation.

从以上内容可得出,本申请具有以下的有益效果:It can be drawn from the above content that the present application has the following beneficial effects:

在各科研机构和医院之间的科研方面,对于其涉及的数据共享需求,本申请通过构建一联盟区块链平台,每个区块链节点对应一组织,由链下采集节点为区块链节点采集所属组织的相关数据,再由区块链节点进行上链,通过联盟区块链平台提供数据共享服务,保障了数据在输入、存储、访问等阶段中的安全性,克服数据泄密、网络安全风险的问题,促进高效的、安全的科研环境。In terms of scientific research between scientific research institutions and hospitals, for the data sharing requirements involved, this application builds a consortium blockchain platform, each blockchain node corresponds to an organization, and the off-chain collection node is the blockchain The node collects the relevant data of the organization it belongs to, and then uploads it to the blockchain by the blockchain node, and provides data sharing services through the alliance blockchain platform, which ensures the security of data in the stages of input, storage, and access, and overcomes data leakage, network security risk issues and promote an efficient and safe research environment.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained from these drawings without creative effort.

图1为本申请基于区块链的数据共享方法的一种流程示意图;Fig. 1 is a kind of schematic flow chart of the data sharing method based on block chain of the application;

图2为本申请联盟区块链平台的一种结构示意图;FIG. 2 is a schematic structural diagram of the alliance block chain platform of the application;

图3为本申请联盟区块链平台的一种架构示意图;FIG. 3 is a schematic diagram of the architecture of the alliance block chain platform of the application;

图4为本申请联盟区块链平台的一种运行场景示意图;FIG. 4 is a schematic diagram of an operation scenario of the alliance block chain platform of the application;

图5为本申请接入链下采集节点的一种场景示意图;FIG. 5 is a schematic diagram of a scenario of accessing a collection node under a chain of the present application;

图6为本申请采集数据的一种场景示意图;FIG. 6 is a schematic diagram of a scenario of collecting data for the application;

图7为本申请基于区块链的数据共享装置的一种结构示意图;7 is a schematic structural diagram of a data sharing device based on blockchain of the present application;

图8为本申请基于区块链的数据共享系统的一种结构示意图。FIG. 8 is a schematic structural diagram of the blockchain-based data sharing system of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.

本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或模块。在本申请中出现的对步骤进行的命名或者编号,并不意味着必须按照命名或者编号所指示的时间/逻辑先后顺序执行方法流程中的步骤,已经命名或者编号的流程步骤可以根据要实现的技术目的变更执行次序,只要能达到相同或者相类似的技术效果即可。The terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or modules is not necessarily limited to those expressly listed Rather, those steps or modules may include other steps or modules not expressly listed or inherent to the process, method, product or apparatus. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time/logical sequence indicated by the naming or numbering, and the named or numbered process steps can be implemented according to the The technical purpose is to change the execution order, as long as the same or similar technical effects can be achieved.

本申请中所出现的模块的划分,是一种逻辑上的划分,实际应用中实现时可以有另外的划分方式,例如多个模块可以结合成或集成在另一个系统中,或一些特征可以忽略,或不执行,另外,所显示的或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,模块之间的间接耦合或通信连接可以是电性或其他类似的形式,本申请中均不作限定。并且,作为分离部件说明的模块或子模块可以是也可以不是物理上的分离,可以是也可以不是物理模块,或者可以分布到多个电路模块中,可以根据实际的需要选择其中的部分或全部模块来实现本申请方案的目的。The division of modules in this application is a logical division. In practical applications, there may be other divisions. For example, multiple modules may be combined or integrated into another system, or some features may be ignored. , or not implemented, in addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the indirect coupling or communication connection between modules may be electrical or other similar forms. There are no restrictions in the application. In addition, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed into multiple circuit modules, and some or all of them may be selected according to actual needs. module to achieve the purpose of the solution of this application.

在介绍本申请提供的基于区块链的数据共享方法之前,首先介绍本申请所涉及的背景内容。Before introducing the blockchain-based data sharing method provided by this application, the background content involved in this application is first introduced.

本申请提供的基于区块链的数据共享方法、装置以及计算机可读存储介质,可应用于基于区块链的数据共享系统,用于在科研方面,通过构建联盟区块链平台,为各机构提供SCSB,如此在共享数据的前提下,克服数据泄密、网络安全风险的问题。The blockchain-based data sharing method, device and computer-readable storage medium provided in this application can be applied to a blockchain-based data sharing system, and can be used in scientific research, by building an alliance blockchain platform, for various institutions Provide SCSB, so on the premise of sharing data, to overcome the problems of data leakage and network security risks.

本申请提及的基于区块链的数据共享方法,其执行主体可以为基于区块链的数据共享装置,或者集成了该基于区块链的数据共享装置的基于区块链的数据共享系统,其中,基于区块链的数据共享装置可以采用硬件或者软件的方式实现,基于区块链的数据共享系统中的区块链节点可以为服务器、物理主机或者用户设备(User Equipment,UE)等不同类型的设备,UE具体可以为智能手机、平板电脑、笔记本电脑、台式电脑或者个人数字助理(Personal Digital Assistant,PDA)等终端设备,而对应于区块链节点,系统中还可包括与区块链节点属于同一组织的链下采集节点,用于为所属组织、为区块链节点提供相关机构的数据的采集服务,也就是说,可以为联盟区块链平台所涉及的数据共享服务提供数据来源。For the blockchain-based data sharing method mentioned in this application, the executive body may be a blockchain-based data sharing device, or a blockchain-based data sharing system integrating the blockchain-based data sharing device, The blockchain-based data sharing device can be implemented in hardware or software, and the blockchain nodes in the blockchain-based data sharing system can be servers, physical hosts, or user equipment (User Equipment, UE), etc. Type of device, UE can be a terminal device such as a smart phone, tablet computer, notebook computer, desktop computer or Personal Digital Assistant (PDA), and corresponds to a blockchain node, the system can also include and block The chain node belongs to the off-chain collection node of the same organization, which is used to provide the data collection service of the relevant organization for the affiliated organization and the blockchain node, that is to say, it can provide data for the data sharing service involved in the alliance blockchain platform. source.

下面,开始介绍本申请提供的基于区块链的数据共享方法。Next, the blockchain-based data sharing method provided by this application will be introduced.

首先,参阅图1,图1示出了本申请基于区块链的数据共享方法的一种流程示意图,本申请提供的基于区块链的数据共享方法,具体可包括如下步骤S101至步骤S103:First, referring to FIG. 1, FIG. 1 shows a schematic flowchart of the blockchain-based data sharing method of the present application. The blockchain-based data sharing method provided by the present application may specifically include the following steps S101 to S103:

步骤S101,在加入不同科研机构以及不同医院构成的联盟区块链平台后,区块链节点在所属区块链节点网络组织中,从自身负责的链下采集节点处获取科研机构的科研数据或者医院的病情数据,区块链节点以及链下采集节点属于联盟区块链平台登记的同一组织,链下采集节点为处于联盟区块链外部的、用于为区块链节点提供数据采集服务的节点;Step S101, after joining the consortium blockchain platform composed of different scientific research institutions and different hospitals, the blockchain node in the blockchain node network organization to which it belongs, obtains the scientific research data of the scientific research institution from the off-chain collection node that it is responsible for or The hospital's disease data, blockchain nodes and off-chain collection nodes belong to the same organization registered on the alliance blockchain platform. Off-chain collection nodes are outside the alliance blockchain and are used to provide data collection services for blockchain nodes. node;

可以理解,对于本申请涉及的联盟区块链平台或者说联盟区块链网络的架构,还可参考图2示出的本申请联盟区块链平台的一种结构示意图。It can be understood that, for the architecture of the consortium blockchain platform or the consortium blockchain network involved in the present application, reference may also be made to a schematic structural diagram of the consortium blockchain platform of the present application shown in FIG. 2 .

本申请所涉及的联盟区块链平台,具体是由各科研机构、医院所组成,每个机构作为联盟中的一位组织配置,在平台中通过区块链节点进行体现,在基于区块链的分布模式下,通过联盟区块链实现科研数据、病情数据的采集和共享。The alliance blockchain platform involved in this application is specifically composed of various scientific research institutions and hospitals. Each institution is configured as an organization in the alliance, and is reflected in the platform through blockchain nodes. In the distributed mode of the platform, the collection and sharing of scientific research data and disease data are realized through the alliance blockchain.

对于每一位组织,其配置一区块链节点,当然,随着具体应用情况还可能配置两个或者多个区块链节点属于同一组织的情况。For each organization, it configures a blockchain node. Of course, it is also possible to configure two or more blockchain nodes to belong to the same organization depending on the specific application.

在组织内,除了区块链节点,还可包括联盟区块链平台以外的链下采集节点,该链下采集节点,容易理解,具体为处于联盟区块链外部的、用于为区块链节点提供数据采集服务的节点,链下采集节点可以以组织中的一个客户端的形式配置。In the organization, in addition to the blockchain nodes, it can also include off-chain acquisition nodes other than the consortium blockchain platform. The off-chain acquisition nodes are easy to understand. Specifically, they are outside the consortium blockchain and are used for blockchain A node that provides data collection services, and an off-chain collection node can be configured in the form of a client in the organization.

在上述联盟区块链平台的背景下,作为正常数据共享的基础,则可涉及到共享数据的上链,此时,则可从区块链节点从链下采集节点获取数据开始。In the context of the above-mentioned consortium blockchain platform, as the basis for normal data sharing, the on-chain sharing of data can be involved. At this time, the blockchain node can obtain data from the off-chain collection node.

可以理解,对于链下采集节点,其本身可供写入相关的数据,例如科研机构的科研数据或者医院的病情数据,如此可从本地直接提取数据给区块链节点;或者,也可从构建连接的其他设备处提取到相关数据给区块链节点。It can be understood that for off-chain collection nodes, they can write relevant data, such as scientific research data of scientific research institutions or medical condition data of hospitals, so that data can be directly extracted from local to blockchain nodes; Relevant data is extracted from other connected devices and sent to the blockchain node.

其中,在获取待上链数据的过程中,作为一种适于实用的实现方式,一方面可以由区块链节点不定时向组织内的链下采集节点征集当前的统计数据;另一方面,还可由链下采集节点定时向所在组织的区块链节点主动上报统计数据。Among them, in the process of obtaining the data to be uploaded, as a practical implementation method, on the one hand, the blockchain nodes can collect the current statistical data from the off-chain collection nodes in the organization from time to time; on the other hand, The off-chain collection node can also actively report statistical data to the blockchain node of the organization on a regular basis.

此外,对于待上链数据的获取,可以理解,一般是在预设的数据类型、数据内容或者数据存储地址等引导方式下进行获取的,以便供科研使用。In addition, for the acquisition of the data to be uploaded, it can be understood that it is generally acquired under the guidance of the preset data type, data content or data storage address, so as to be used for scientific research.

步骤S102,区块链节点将从链下采集节点获取到的科研数据或者病情数据,根据联盟区块链平台的数据要求进行打包,得到待上链数据;Step S102, the blockchain node packs the scientific research data or disease data obtained from the off-chain collection node according to the data requirements of the alliance blockchain platform, and obtains the data to be uploaded;

可以理解,在区块链节点获取到当前组织内所需上链的科研数据或者病情数据后,则可对其根据联盟区块链平台的上链要求,在合约的要求下,对其进行打包,得到标准格式的待上链数据。It can be understood that after the blockchain node obtains the scientific research data or disease data that needs to be uploaded in the current organization, it can be packaged according to the requirements of the blockchain platform of the alliance and the requirements of the contract. , to get the data to be uploaded in standard format.

其中,可涉及到数据格式转换、异常数据清洗、数据融合等预设的数据加工处理。Among them, it may involve preset data processing such as data format conversion, abnormal data cleaning, and data fusion.

步骤S103,区块链节点将待上链数据提交至联盟区块链平台,待联盟区块链平台中的不同区块链节点间达成共识后写入账本,以提供数据共享服务。In step S103, the blockchain node submits the data to be uploaded to the consortium blockchain platform, and after reaching a consensus among different blockchain nodes in the consortium blockchain platform, it is written into the ledger to provide data sharing services.

可以理解的是,在联盟区块链平台的数据上链过程中,是基于预先配置的共识机制执行的,若联盟区块链平台中各区块链节点对当前的待上链数据的上链达到通过的共识结果时,则可正常完成上链,写入到联盟区块链平台的账本中,后续则可根据预设的数据访问形式,提供该待上链数据的数据访问服务,即,提供数据共享服务。It is understandable that in the process of uploading data on the alliance blockchain platform, it is executed based on the pre-configured consensus mechanism. When the consensus result is passed, the chaining can be completed normally and written into the ledger of the alliance blockchain platform. Subsequently, the data access service of the data to be chained can be provided according to the preset data access form, that is, providing data sharing service.

从图1所示实施例可看出,在各科研机构和医院之间的科研方面,对于其涉及的数据共享需求,本申请通过构建一联盟区块链平台,每个区块链节点对应一组织,由链下采集节点为区块链节点采集所属组织的相关数据,再由区块链节点进行上链,通过联盟区块链平台提供数据共享服务,保障了数据在输入、存储、访问等阶段中的安全性,克服数据泄密、网络安全风险的问题,促进高效的、安全的科研环境。It can be seen from the embodiment shown in Fig. 1 that, in terms of scientific research between various scientific research institutions and hospitals, for the data sharing requirements involved, this application builds a consortium blockchain platform, each blockchain node corresponds to a Organization, the off-chain collection node collects the relevant data of the affiliated organization for the blockchain node, and then the blockchain node uploads the chain, and provides data sharing services through the alliance blockchain platform, ensuring data input, storage, access, etc. security in stages, overcome data leakage, network security risks, and promote an efficient and secure scientific research environment.

进一步的,对于联盟区块链平台的细节处,本申请还配置有进一步的优化方案。Further, for the details of the alliance blockchain platform, this application is also configured with further optimization schemes.

在通过联盟区块链平台提供数据共享服务之前,还可涉及到联盟区块链平台的构建。Before providing data sharing services through the consortium blockchain platform, the construction of the consortium blockchain platform can also be involved.

在本申请中,作为又一种适于实用的实现方式,参阅图3示出的本申请联盟区块链平台的一种架构示意图,联盟区块链平台可设计为六层平台结构,六层平台结构具体包括数据层、网络层、安全层、共识激励层、合约层以及应用业务层,In this application, as another practical implementation, referring to a schematic diagram of the architecture of the consortium blockchain platform of the present application shown in FIG. 3 , the consortium blockchain platform can be designed as a six-layer platform structure. The platform structure specifically includes data layer, network layer, security layer, consensus incentive layer, contract layer and application business layer.

1.数据层,封装了区块数据、链式结构、区块头上的时间戳、哈希函数、Merkle树及区块尾上的随机数、链上的公钥等所有链上相关数据。1. Data layer, which encapsulates all related data on the chain, such as block data, chain structure, timestamp on block header, hash function, Merkle tree, random number on block tail, and public key on the chain.

区块中的数据主要包括各种科研数据、病人疾病数据等。Merkle树借鉴以太坊区块链原理,设计三棵Merkle树,分别为科研疾病Merkle树(共享交易记录、数据评价记录利用哈希过程所得到的块数据结构)、医疗疾病Merkle树(微观主体在不同层面的汇总数据利用哈希过程所得到的块数据结构)、总体统计Merkle树(诸多个体(同类)数据集利用哈希过程所得到的块数据结构)。通过建立不同的统计Merkle树,在数据记录中实现宏观综合信息和微观个体信息的恰当分离,既满足科研数据不同层次上的使用,增强数据使用权限的灵活性,又确保统计数据安全有序可控。The data in the block mainly includes various scientific research data, patient disease data, etc. Merkle tree draws on the principle of Ethereum blockchain and designs three Merkle trees, namely Merkle tree for scientific research diseases (shared transaction records, data evaluation records using the block data structure obtained by the hash process), Merkle tree for medical diseases (the micro-subject is in the Aggregate data at different levels use the block data structure obtained by the hash process), and the overall statistical Merkle tree (the block data structure obtained by the hash process for many individual (similar) data sets). Through the establishment of different statistical Merkle trees, the proper separation of macroscopic comprehensive information and microscopic individual information is realized in data records, which not only satisfies the use of scientific research data at different levels, enhances the flexibility of data use rights, but also ensures that statistical data is safe, orderly and accessible. control.

2.网络层,封装了区块链系统的组网方式、消息传播协议和数据验证机制。2. The network layer, which encapsulates the networking method, message dissemination protocol and data verification mechanism of the blockchain system.

通过P2P网络连接不同科研机构的服务器、医院的服务器甚至监管方的服务器等服务器,结合实际统计需求,设计特定的传播协议和数据验证机制,使得统计区块链系统中每一个节点都能参与区块数据的校验和记账过程,既解决了集中式架构带来的单点失效问题,又缓解了传统中心架构的安全问题。Connect the servers of different scientific research institutions, hospitals and even the servers of the supervisor through the P2P network, and design a specific communication protocol and data verification mechanism based on the actual statistical needs, so that every node in the statistical blockchain system can participate in the area. The verification and accounting process of block data not only solves the single-point failure problem caused by the centralized architecture, but also alleviates the security problems of the traditional central architecture.

3.安全层,为整个联盟区块链体系提供安全保证。3. Security layer, which provides security guarantee for the entire consortium blockchain system.

通过哈希算法、非对称加密技术以及数字签名技术,在整个网络体系中实现基于签名验签机制的数据采集、基于多级权限管理结合多重签名机制的数据共享,对链下采集节点、区块链节点、访问者进行身份验证与身份管理,确保链下采集节点与其对应的区块链节点间的合法对接,确保有权限的访问者进入相应的访问空间,保证了数据的安全性和不可抵赖性。Through hash algorithm, asymmetric encryption technology and digital signature technology, data collection based on signature verification mechanism, data sharing based on multi-level authority management combined with multi-signature mechanism are realized in the entire network system, and the collection of nodes and blocks under the chain is carried out. Chain nodes and visitors perform identity verification and identity management to ensure the legal connection between off-chain collection nodes and their corresponding blockchain nodes, ensure that authorized visitors enter the corresponding access space, and ensure data security and non-repudiation sex.

4.共识激励层,封装了基于统计能力和统计工作量证明的共识算法和激励机制,构建了一种数据提供者、中间人、数据使用者各方参与的共识激励机制;4. Consensus incentive layer, which encapsulates the consensus algorithm and incentive mechanism based on statistical capabilities and statistical workload proof, and builds a consensus incentive mechanism for data providers, intermediaries, and data users to participate;

让分散的统计节点在去中心化的区块链网络中就区块数据的有效性达成共识,以联盟积分作为内部激励执行的统一标准,通过统一运营方式,结合数据质量评分,给数据提供者、统计加工者发放积分,积分可以换取服务,构造一种释放数据价值的生态系统,激发统计数据参与各方活跃度,鼓励数据流通,深化数据服务内容和经营模式。Let the decentralized statistical nodes reach a consensus on the validity of block data in the decentralized blockchain network, use the alliance points as a unified standard for internal incentive execution, through a unified operation method, combined with data quality scores, to data providers. , Statistics processors issue points, which can be exchanged for services, construct an ecosystem that releases data value, stimulate the activity of all parties involved in statistical data, encourage data circulation, and deepen data service content and business models.

5.合约层,封装了脚本、算法和智能合约,将区块链由一个封装的系统变成一个可以编程进行二次开发甚至是智能运行的合约机制;5. The contract layer, which encapsulates scripts, algorithms and smart contracts, turns the blockchain from an encapsulated system into a contract mechanism that can be programmed for secondary development or even intelligent operation;

在合约层的架构中,要求智能合约能够实现以下功能:In the structure of the contract layer, smart contracts are required to implement the following functions:

(1)账户体系:将区块链非对称加密生成的公、私钥,与统计数据采集共享场景中各主体相结合,提供可靠安全、使用便捷、交互友好的账户管理功能;(1) Account system: The public and private keys generated by asymmetric encryption of the blockchain are combined with each subject in the statistical data collection and sharing scenario to provide reliable, safe, convenient and interactive account management functions;

(2)数据管理:实现数据采集、数据检索、数据权限交互、数据共享等基本数据管理功能;(2) Data management: realize basic data management functions such as data collection, data retrieval, data permission interaction, and data sharing;

(3)数据服务:实现基于订阅模式的数据共享服务加工定制、数据自动化整合与授权过程,提供面向数据即服务(Data-as-a-Service,DaaS)的可扩展定制功能;(3) Data service: realize the processing and customization of data sharing service based on subscription model, data automatic integration and authorization process, and provide extensible customization functions for Data-as-a-Service (DaaS);

(4)数据质量评价:实现数据质量评价量化功能,通过数据使用方评价反馈、数据引用量、数据下载量的统计及数据引用指标h指数,实现科研数据质量评价的记录与计算功能。(4) Data quality evaluation: Realize the quantitative function of data quality evaluation, and realize the recording and calculation functions of scientific research data quality evaluation through data user evaluation feedback, data citation volume, data download volume statistics and data citation index h index.

6.应用业务层,位于六层平台结构的最顶端,是以代码来实现的应用程序。6. The application business layer, located at the top of the six-layer platform structure, is an application program implemented by code.

App和Web系统通过接口调用智能合约,负责以可视化的方式向用户提供面向移动端与PC端的统计数据服务,具体包括数据采集、数据查询、数据溯源、数据分析、数据共享等,通过智能合约结合共识算法,将数据审核、数据校对、数据查重等重复性、规律性工作交给机器执行,同时将各种数据分析的算法模型嵌入智能合约,提高数据分析效率与水平。The App and the Web system call smart contracts through the interface, and are responsible for providing users with statistical data services for mobile terminals and PC terminals in a visual way, including data collection, data query, data traceability, data analysis, data sharing, etc., through the combination of smart contracts. The consensus algorithm transfers repetitive and regular tasks such as data auditing, data proofreading, and data duplication checking to machines for execution. At the same time, various data analysis algorithm models are embedded in smart contracts to improve the efficiency and level of data analysis.

此外,在联盟区块链平台的运行方面,作为又一种适于实用的实现方式,区块链节点存有数据记录池和数据控制器;In addition, in terms of the operation of the consortium blockchain platform, as another practical implementation method, the blockchain node has a data recording pool and a data controller;

数据记录池存储联盟链区块数据;The data record pool stores the block data of the consortium chain;

数据控制器负责整合链下采集节点上传的科研数据或者病情数据,并根据智能合约审查采集数据的质量及控制数据的共享访问。The data controller is responsible for integrating scientific research data or disease data uploaded by off-chain collection nodes, reviewing the quality of collected data and controlling shared access to data according to smart contracts.

在区块链节点的软件层面上,通过该数据记录池和数据控制器的配置,通过明确的分工设置,实现更为高效的数据处理。At the software level of the blockchain node, through the configuration of the data recording pool and the data controller, more efficient data processing can be achieved through a clear division of labor settings.

此外,对于联盟区块链平台的运行方面,本申请认为,具体可以由数据采集、数据审查、数据上链(共识机制、产生数据区块)、数据共享四个部分组成,其整体的工作场景还可参考图4示出的本申请联盟区块链平台的一种运行场景示意图进行理解。In addition, for the operation of the alliance blockchain platform, this application believes that it can be specifically composed of four parts: data collection, data review, data on-chain (consensus mechanism, data block generation), and data sharing. The overall working scene It can also be understood with reference to the schematic diagram of a running scenario of the alliance blockchain platform of the present application shown in FIG. 4 .

在前期的数据采集部分中,整个流程可经历以下三个阶段:链下采集节点接入阶段、数据采集阶段、数据存储阶段。In the early data collection part, the whole process can go through the following three stages: the off-chain collection node access stage, the data collection stage, and the data storage stage.

作为又一种适于实用的实现方式,在链下采集节点接入阶段,链下采集节点可通过区块链节点接入联盟区块链平台,成为处于联盟区块链外部的、用于为区块链节点提供数据采集服务的节点,其中,区块链节点利用智能合约进行链下采集节点的基本单位名录库自动更新维护、审核及导入,组织管理员通过实时更新的名录库,将所属组织内链下采集节点的基本信息与公钥上链存储,保证了公钥和链下采集节点之间的匹配关系、公钥的内容不可篡改接入过程如还可参考图5示出的本申请接入链下采集节点的一种场景示意图,而涉及的公钥则可从联盟区块链平台中获取,若获取失败,表明数据采集节点未被组织管理员接入,拒绝后续操作,为联盟区块链平台提供最外层的安全防护,在该过程中,保证了公钥和链下采集节点之间的匹配关系、公钥内容不可篡改,为后续数据输入提供了安全可靠保障。As another practical implementation method, in the off-chain acquisition node access stage, the off-chain acquisition node can access the consortium blockchain platform through the blockchain node, and become outside the consortium blockchain and used for The blockchain node provides data collection services. Among them, the blockchain node uses smart contracts to automatically update, maintain, review and import the basic unit directory library of the off-chain acquisition node. The organization administrator uses the real-time updated directory library. The basic information of the off-chain collection node and the public key are stored on the chain within the organization, which ensures the matching relationship between the public key and the off-chain collection node, and the content of the public key cannot be tampered with. For the access process, please refer to the present example shown in Figure 5. A schematic diagram of a scenario for applying for access to a collection node under the chain, and the involved public key can be obtained from the alliance blockchain platform. If the acquisition fails, it indicates that the data collection node has not been accessed by the organization administrator, and subsequent operations are refused. The alliance blockchain platform provides the outermost security protection. In this process, the matching relationship between the public key and the off-chain collection node is guaranteed, and the content of the public key cannot be tampered with, providing a safe and reliable guarantee for subsequent data input.

进一步的,在数据采集阶段中,作为又一种适于实用的实现方式,为保证采集的数据在上报过程中不被篡改、链下采集节点和区块链节点不受非法设备的攻击,区块链平台利用数据采集节点接入阶段生成的公、私钥,采取双向签名验签机制进行链下采集节点和区块链节点之间的身份识别、数据确认,其相关处理流程还可参考图6示出的本申请采集数据的一种场景示意图进行理解。Further, in the data collection stage, as another practical implementation method, in order to ensure that the collected data is not tampered with during the reporting process, and that off-chain collection nodes and blockchain nodes are not attacked by illegal devices, the The blockchain platform uses the public and private keys generated during the access stage of the data collection node, and adopts a two-way signature verification mechanism to identify and confirm the identity and data between the off-chain collection node and the blockchain node. The related processing flow can also refer to the figure. 6 shows a schematic diagram of a scene of collecting data in the present application for understanding.

在链下采集节点验证区块链节点身份阶段,区块链节点使用其私钥签名数据采集请求发送给链下采集节点,链下采集节点通过区块链节点的基本信息向联盟区块链平台获取区块链节点的公钥,然后用该公钥验证区块链节点的签名数据,验签成功则区块链节点身份验证通过;In the stage of verifying the identity of the blockchain node by the off-chain acquisition node, the blockchain node uses its private key to sign the data acquisition request and send it to the off-chain acquisition node. Obtain the public key of the blockchain node, and then use the public key to verify the signature data of the blockchain node. If the signature is successful, the blockchain node identity verification is passed;

在区块链节点验证链下采集节点身份阶段,链下采集节点使用其私钥对统计数据进行签名并发送给区块链节点,区块链节点从联盟区块链平台中获取链下采集节点的公钥,然后对其发送过来的签名数据作验签,验证通过则认为采集点身份认证通过且发来的统计数据在传输中未被修改过,在数据采集过程中,签名和验签与链下采集节点接入阶段一样,签名用私钥,验签用公钥。In the stage of blockchain node verification of off-chain collection node identity, the off-chain collection node uses its private key to sign the statistical data and send it to the blockchain node, and the blockchain node obtains the off-chain collection node from the alliance blockchain platform the public key, and then verify the signature data sent by it. If the verification is passed, it is considered that the identity authentication of the collection point has passed and the statistical data sent has not been modified during transmission. The off-chain acquisition node access stage is the same, the private key is used for signature and the public key is used for signature verification.

在数据存储阶段中,其主要任务是区块链节点将采集阶段收到的科研数据或者病情数据上链保存。由于不同来源数据的类型和标准规则不一致,联盟节点可根据智能合约上的写入代码自动执行审查,对照相关数据的类型、标准、范围、数量等内容和电子签名进行核对和验证。当有节点数据不合规或超时未上报时,会触发相应代码自动发出全网实时预警,并将预警内容和故障原因记录在区块链上,便于责任追溯。如果通过验证,确认数据安全完整有效,即可存储到本地数据记录池,每隔一段时间后,区块链节点会把本段时间内所采集的有效数据打包整合成数据集,对数据集进行加密和数字签名,确保数据集本身及来源的合法可验证。In the data storage stage, its main task is that the blockchain node uploads the scientific research data or disease data received in the collection stage to the blockchain. As the types and standard rules of data from different sources are inconsistent, the alliance nodes can automatically perform the review according to the code written on the smart contract, and check and verify against the type, standard, scope, quantity and other contents of the relevant data and electronic signatures. When any node data is not compliant or has not been reported over time, the corresponding code will be triggered to automatically issue a real-time warning of the entire network, and the content of the warning and the cause of the failure will be recorded on the blockchain to facilitate responsibility tracing. If it is verified that the data is safe, complete and valid, it can be stored in the local data recording pool. After a period of time, the blockchain node will package and integrate the valid data collected during this period into a data set, and the data set will be processed. Encryption and digital signatures ensure the legitimacy and verifiability of the dataset itself and its origin.

作为又一种适于实用的实现方式,联盟区块链平台中的不同区块链节点间在对待上链数据进行共识的过程中,由统计能力最快计算出有效结果的区块链节点作为当前共识过程中年的主节点,其余区块链节点节点作为从节点,采用PBFT共识机制进行区块共识,达成共识后按照时间顺序将当前数据区块以顺序相连的方式存储在联盟区块链平台中,主节点因记录数据获得联盟积分奖励,在该公式激励机制下,保证了整个系统的健壮性。As another practical implementation method, in the process of consensus among different blockchain nodes in the alliance blockchain platform, the blockchain node with the fastest statistical ability to calculate the effective result is used as the In the current consensus process, the master node of the year, and the rest of the blockchain nodes are used as slave nodes, and the PBFT consensus mechanism is used for block consensus. After reaching a consensus, the current data blocks are stored in the consortium blockchain in a sequential manner according to the time sequence. In the platform, the master node is rewarded with alliance points for recording data. Under this formula incentive mechanism, the robustness of the entire system is guaranteed.

在后期的数据共享部分中,即,在数据共享过程中,本申请具体采用Merkle树结构,进行层级加密和多级加密,可促使不会出现数据泄漏问题,而根据区块中三棵Merkle树不同特点,联盟区块链平台上统计数据共享分为三个不同层次:In the later data sharing part, that is, in the data sharing process, the application specifically adopts the Merkle tree structure to perform hierarchical encryption and multi-level encryption, which can prevent the problem of data leakage, and according to the three Merkle trees in the block According to different characteristics, the statistical data sharing on the alliance blockchain platform is divided into three different levels:

第一层次,交易统计Merkle树;The first level, transaction statistics Merkle tree;

第二层次,总体统计Merkle树;The second level, the overall statistical Merkle tree;

第三层次,个体统计Merkle树。The third level, individual statistics Merkle tree.

具体的,其内容可参考下文:Specifically, its content can refer to the following:

(1)交易统计Merkle树。共享记录和数据评价记录的访问不需设置任何权限,区块链节点使用智能合约实施数据共享的场景主要包括以下流程:(1) Merkle tree of transaction statistics. Access to shared records and data evaluation records does not require any permissions. The scenarios in which blockchain nodes use smart contracts to share data mainly include the following processes:

当节点a向节点b发送数据共享请求后,节点b首先查验节点a身份,查验通过后,根据请求中所包含的数据访问目的、时间和次数等信息执行智能合约,同时使用节点a的公钥和节点b的私钥对共享数据进行非对称加密,输出结果,节点a收到数据后,通过节点b的公钥和自身私钥解密数据,并进行数据读取访问,链下采集节点只需通过所在组织的区块链节点验证其身份,即可实现数据共享。When node a sends a data sharing request to node b, node b first checks the identity of node a. After the check is passed, it executes the smart contract according to the data access purpose, time and times contained in the request, and uses the public key of node a at the same time. Perform asymmetric encryption on the shared data with the private key of node b, and output the result. After node a receives the data, it decrypts the data through the public key of node b and its own private key, and performs data read access. The off-chain collection node only needs to Data sharing can be achieved by verifying its identity through the blockchain node of the organization.

(2)总体统计Merkle树。微观主体在不同层面的汇总数据即宏观综合数据的访问共享,由各区块链节点根据事先协议好的智能合约,部署多级访问、多重签名的访问机制实现。按照访问者的社会属性,可以从安全层级、管辖范围、职能划分这三个方面对其进行分类,同时对宏观综合数据根据密级和所属范围进行分级管理,其中密级分为绝密、机密、秘密以及公开,所属范围对应访问者属性中的管辖范围,根据共享主体与客体的相关属性,在具体策略下,通过秘钥产生、数据加密、多重签名、数据解密的过程进行统计数据的多级访问控制。(2) Overall statistical Merkle tree. The aggregated data of micro-subjects at different levels, that is, the access and sharing of macro-integrated data, is realized by the deployment of multi-level access and multi-signature access mechanism by each blockchain node according to the pre-agreed smart contract. According to the social attributes of visitors, they can be classified from three aspects: security level, jurisdiction, and function division. At the same time, macro-integrated data can be managed hierarchically according to the level of confidentiality and the scope to which it belongs. Disclosure, the scope of which corresponds to the jurisdiction in the attributes of the visitor, according to the relevant attributes of the shared subject and object, under specific policies, through the process of key generation, data encryption, multi-signature, and data decryption. Multi-level access control of statistical data .

(3)个体统计Merkle树。微观个体数据共享由数据真正持有者——链下采集节点授权控制,使用其私钥对个体数据进行加密,通过设定数据共享的范围、时限等约束条件,选择部分数据共享,同时使用计算机程序规范数据访问者行为,主要包括以下流程:(3) Individual statistics Merkle tree. The sharing of micro-individual data is authorized and controlled by the real holder of the data, the off-chain collection node, which uses its private key to encrypt individual data, and selects some data sharing by setting constraints such as the scope and time limit of data sharing. The program regulates the behavior of data visitors, mainly including the following processes:

当节点c向节点d请求共享个体数据时,节点d首先查验节点c身份,与节点c达成共识后,节点d会设置约束条件来限制共享数据的范围、时间、频次等,并将私钥提供给智能合约自动执行数据解密,再根据约束条件自动匹配相关数据,最后使用节点c的公钥对数据进行加密,节点c通过自身私钥进行解密实现数据共享。When node c requests to share individual data from node d, node d first checks the identity of node c, and after reaching a consensus with node c, node d will set constraints to limit the scope, time, frequency, etc. of the shared data, and provide the private key Automatically decrypt the data for the smart contract, then automatically match the relevant data according to the constraints, and finally use the public key of node c to encrypt the data, and node c uses its own private key to decrypt the data to achieve data sharing.

以上是本申请提供基于区块链的数据共享方法的介绍,为便于更好的实施本申请提供的基于区块链的数据共享方法,本申请还从功能模块角度提供了一种基于区块链的数据共享装置。The above is the introduction of the blockchain-based data sharing method provided by this application. In order to facilitate better implementation of the blockchain-based data sharing method provided by this application, this application also provides a blockchain-based data sharing method from the perspective of functional modules. data sharing device.

参阅图7,图7为本申请基于区块链的数据共享装置的一种结构示意图,在本申请中,基于区块链的数据共享装置700具体可包括如下结构:Referring to FIG. 7, FIG. 7 is a schematic structural diagram of a blockchain-based data sharing device in the present application. In this application, the blockchain-based data sharing device 700 may specifically include the following structures:

获取单元701,用于在加入不同科研机构以及不同医院构成的联盟区块链平台后,在所属区块链节点网络组织中,从自身负责的链下采集节点处获取科研机构的科研数据或者医院的病情数据,区块链节点以及链下采集节点属于联盟区块链平台登记的同一组织,链下采集节点为处于联盟区块链外部的、用于为区块链节点提供数据采集服务的节点;The obtaining unit 701 is used to obtain the scientific research data of the scientific research institution or the hospital from the off-chain collection node under the responsibility of the affiliated blockchain node network organization after joining the consortium blockchain platform composed of different scientific research institutions and different hospitals. The blockchain node and the off-chain collection node belong to the same organization registered on the alliance blockchain platform, and the off-chain collection node is the node outside the alliance blockchain that provides data collection services for the blockchain node. ;

打包单元702,用于将从链下采集节点获取到的科研数据或者病情数据,根据联盟区块链平台的数据要求进行打包,得到待上链数据;The packaging unit 702 is used to package the scientific research data or disease data obtained from the off-chain collection nodes according to the data requirements of the alliance blockchain platform to obtain the data to be uploaded on the chain;

上链单元703,用于将待上链数据提交至联盟区块链平台,待联盟区块链平台中的不同区块链节点间达成共识后写入账本,以提供数据共享服务。The chaining unit 703 is used to submit the data to be chained to the consortium blockchain platform, and write into the ledger after reaching a consensus among different blockchain nodes in the consortium blockchain platform, so as to provide data sharing services.

在又一种示例性的实现方式中,区块链节点在所属区块链节点网络组织中,从自身负责的链下采集节点处获取科研机构的科研数据或者医院的病情数据之前,方法还包括:In another exemplary implementation manner, before the blockchain node acquires the scientific research data of the scientific research institution or the condition data of the hospital from the off-chain collection node that it is responsible for in the blockchain node network organization to which it belongs, the method further includes: :

构建联盟区块链平台,联盟区块链平台设计为六层平台结构,六层平台结构包括数据层、网络层、安全层、共识激励层、合约层以及应用业务层,To build an alliance blockchain platform, the alliance blockchain platform is designed as a six-layer platform structure. The six-layer platform structure includes data layer, network layer, security layer, consensus incentive layer, contract layer and application business layer.

数据层,封装了区块数据、链式结构、区块头上的时间戳、哈希函数、Merkle树及区块尾上的随机数、链上的公钥;Data layer, which encapsulates block data, chain structure, timestamp on block header, hash function, Merkle tree, random number on block tail, and public key on the chain;

网络层,封装了区块链系统的组网方式、消息传播协议和数据验证机制;The network layer encapsulates the networking method, message dissemination protocol and data verification mechanism of the blockchain system;

安全层,为整个联盟区块链体系提供安全保证;The security layer provides security guarantee for the entire consortium blockchain system;

共识激励层,封装了基于统计能力和统计工作量证明的共识算法和激励机制,构建了一种数据提供者、中间人、数据使用者各方参与的共识激励机制;The consensus incentive layer encapsulates the consensus algorithm and incentive mechanism based on statistical capabilities and statistical workload proof, and builds a consensus incentive mechanism for data providers, intermediaries, and data users to participate;

合约层,封装了脚本、算法和智能合约,将区块链由一个封装的系统变成一个可以编程进行二次开发甚至是智能运行的合约机制;The contract layer, which encapsulates scripts, algorithms and smart contracts, turns the blockchain from an encapsulated system into a contract mechanism that can be programmed for secondary development or even intelligent operation;

应用业务层,位于六层平台结构的最顶端,是以代码来实现的应用程序。The application business layer, located at the top of the six-layer platform structure, is an application program implemented by code.

在又一种示例性的实现方式中,区块链节点存有数据记录池和数据控制器;In yet another exemplary implementation, the blockchain node stores a data record pool and a data controller;

数据记录池存储联盟区块链区块数据;The data record pool stores the block data of the consortium blockchain;

数据控制器负责整合链下采集节点上传的科研数据或者病情数据,并根据智能合约审查采集数据的质量及控制数据的共享访问。The data controller is responsible for integrating scientific research data or disease data uploaded by off-chain collection nodes, reviewing the quality of collected data and controlling shared access to data according to smart contracts.

在又一种示例性的实现方式中,在数据采集节点接入阶段,链下采集节点通过区块链节点接入联盟区块链平台,成为处于联盟区块链外部的、用于为区块链节点提供数据采集服务的节点,其中,区块链节点利用智能合约进行链下采集节点的基本单位名录库自动更新维护、审核及导入,组织管理员通过实时更新的名录库,将所属组织内链下采集节点的基本信息与公钥上链存储,保证了公钥和链下采集节点之间的匹配关系、公钥的内容不可篡改,公钥从联盟区块链平台中获取,若获取失败,表明数据采集节点未被组织管理员接入,拒绝后续操作,为联盟区块链平台提供最外层的安全防护。In another exemplary implementation manner, in the data collection node access stage, the off-chain collection node accesses the consortium blockchain platform through the blockchain node, and becomes outside the consortium blockchain and is used for blockchain Chain nodes are nodes that provide data collection services. Among them, the blockchain nodes use smart contracts to automatically update, maintain, review and import the basic unit directory library of off-chain collection nodes. The organization administrator uses the real-time updated directory library to transfer the data within the organization. The basic information of the off-chain collection node and the public key are stored on the chain, which ensures the matching relationship between the public key and the off-chain collection node, and the content of the public key cannot be tampered with. The public key is obtained from the alliance blockchain platform. If the acquisition fails , indicating that the data collection node has not been accessed by the organization administrator, refuses subsequent operations, and provides the outermost security protection for the alliance blockchain platform.

在又一种示例性的实现方式中,在数据采集阶段中,为保证采集的数据在上报过程中不被篡改、链下采集节点和区块链节点不受非法设备的攻击,区块链平台利用数据采集节点接入阶段生成的公、私钥,采取双向签名验签机制进行链下采集节点和区块链节点之间的身份识别、数据确认。In another exemplary implementation manner, in the data collection stage, in order to ensure that the collected data is not tampered with during the reporting process, and that off-chain collection nodes and blockchain nodes are not attacked by illegal devices, the blockchain platform Using the public and private keys generated during the access phase of the data collection node, a two-way signature verification mechanism is used to identify and confirm the identity and data between the off-chain collection node and the blockchain node.

在又一种示例性的实现方式中,联盟区块链平台中的不同区块链节点间在对待上链数据进行共识的过程中,由统计能力最快计算出有效结果的区块链节点作为当前共识过程中年的主节点,其余区块链节点节点作为从节点,采用采用PBFT共识机制进行区块共识,达成共识后按照时间顺序将当前数据区块以顺序相连的方式存储在联盟区块链平台中,主节点因记录数据获得联盟积分奖励。In another exemplary implementation manner, in the process of consensus among different blockchain nodes in the consortium blockchain platform on the data to be on-chain, the blockchain node with the fastest statistical ability to calculate valid results is used as the In the current consensus process, the master node of the year, and the rest of the blockchain nodes are used as slave nodes. The PBFT consensus mechanism is adopted for block consensus. After reaching a consensus, the current data blocks are stored in the alliance block in a sequential manner according to the time sequence. In the chain platform, the master node is rewarded with alliance points for recording data.

在又一种示例性的实现方式中,在数据共享过程中,采用Merkle树结构,进行层级加密和多级加密,根据区块中三棵Merkle树不同特点,联盟区块链平台上统计数据共享分为三个不同层次:In another exemplary implementation, in the process of data sharing, a Merkle tree structure is used to perform hierarchical encryption and multi-level encryption. According to the different characteristics of the three Merkle trees in the block, statistical data sharing on the alliance blockchain platform There are three different levels:

第一层次,交易统计Merkle树;The first level, transaction statistics Merkle tree;

第二层次,总体统计Merkle树;The second level, the overall statistical Merkle tree;

第三层次,个体统计Merkle树。The third level, individual statistics Merkle tree.

本申请还从硬件结构角度提供了一种基于区块链的数据共享系统,系统包括区块链节点以及链下采集节点,参阅图8,图8示出了本申请基于区块链的数据共享系统的一种结构示意图,从整体来看,本申请基于区块链的数据共享系统可包括处理器801、存储器802以及输入输出设备803,处理器801用于执行存储器802中存储的计算机程序时实现如图1对应实施例中方法的各步骤;或者,处理器801用于执行存储器802中存储的计算机程序时实现如图7对应实施例中各单元的功能,存储器802用于存储处理器801执行上述图1对应实施例中基于区块链的数据共享方法所需的计算机程序。The present application also provides a blockchain-based data sharing system from the perspective of hardware structure. The system includes blockchain nodes and off-chain collection nodes. Refer to FIG. 8 , which shows the blockchain-based data sharing system of the present application. A schematic diagram of the structure of the system. From an overall point of view, the blockchain-based data sharing system of the present application may include a processor 801, a memory 802, and an input and output device 803. The processor 801 is used to execute the computer program stored in the memory 802. Each step of the method in the embodiment corresponding to FIG. 1 is realized; or, when the processor 801 is used to execute the computer program stored in the memory 802, the functions of each unit in the embodiment corresponding to FIG. 7 are realized, and the memory 802 is used to store the processor 801 A computer program required to execute the blockchain-based data sharing method in the embodiment corresponding to FIG. 1 .

示例性的,计算机程序可以被分割成一个或多个模块/单元,一个或者多个模块/单元被存储在存储器802中,并由处理器801执行,以完成本申请。一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述计算机程序在计算机装置中的执行过程。Exemplarily, the computer program may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 802 and executed by the processor 801 to complete the present application. One or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in a computer apparatus.

基于区块链的数据共享系统可包括,但不仅限于处理器801、存储器802、输入输出设备803。本领域技术人员可以理解,示意仅仅是基于区块链的数据共享系统的示例,并不构成对基于区块链的数据共享系统的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如基于区块链的数据共享系统还可以包括网络接入设备、总线等,处理器801、存储器802、输入输出设备803等通过总线相连。The blockchain-based data sharing system may include, but is not limited to, a processor 801 , a memory 802 , and an input and output device 803 . Those skilled in the art can understand that the illustration is only an example of a blockchain-based data sharing system, and does not constitute a limitation on a blockchain-based data sharing system, and may include more or less components than those shown in the illustration, or Combining some components, or different components, for example, a blockchain-based data sharing system may also include network access devices, buses, etc., and the processor 801, memory 802, input and output devices 803, etc. are connected through the bus.

处理器801可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,处理器是基于区块链的数据共享系统的控制中心,利用各种接口和线路连接整个设备的各个部分。The processor 801 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-available processor Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The processor is the control center of the blockchain-based data sharing system, and uses various interfaces and lines to connect various parts of the entire device.

存储器802可用于存储计算机程序和/或模块,处理器801通过运行或执行存储在存储器802内的计算机程序和/或模块,以及调用存储在存储器802内的数据,实现计算机装置的各种功能。存储器802可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据基于区块链的数据共享系统的使用所创建的数据等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 802 can be used to store computer programs and/or modules, and the processor 801 implements various functions of the computer device by running or executing the computer programs and/or modules stored in the memory 802 and calling data stored in the memory 802. The memory 802 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function, and the like; created data, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory such as hard disk, internal memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card , a flash memory card (Flash Card), at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.

处理器801用于执行存储器802中存储的计算机程序时,具体可实现以下功能:When the processor 801 is configured to execute the computer program stored in the memory 802, the following functions can be specifically implemented:

在加入不同科研机构以及不同医院构成的联盟区块链平台后,区块链节点在所属区块链节点网络组织中,从自身负责的链下采集节点处获取科研机构的科研数据或者医院的病情数据,区块链节点以及链下采集节点属于联盟区块链平台登记的同一组织,链下采集节点为处于联盟区块链外部的、用于为区块链节点提供数据采集服务的节点;After joining the consortium blockchain platform composed of different scientific research institutions and different hospitals, the blockchain nodes in the blockchain node network organization to which they belong, obtain the scientific research data of scientific research institutions or the conditions of the hospital from the off-chain collection nodes that they are responsible for Data, blockchain nodes and off-chain collection nodes belong to the same organization registered on the alliance blockchain platform, and off-chain collection nodes are nodes outside the alliance blockchain that provide data collection services for blockchain nodes;

区块链节点将从链下采集节点获取到的科研数据或者病情数据,根据联盟区块链平台的数据要求进行打包,得到待上链数据;The blockchain node will package the scientific research data or disease data obtained from the off-chain collection node according to the data requirements of the alliance blockchain platform to obtain the data to be uploaded;

区块链节点将待上链数据提交至联盟区块链平台,待联盟区块链平台中的不同区块链节点间达成共识后写入账本,以提供数据共享服务。The blockchain node submits the data to be on-chain to the alliance blockchain platform, and writes it to the ledger after reaching a consensus among different blockchain nodes in the alliance blockchain platform to provide data sharing services.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的基于区块链的数据共享装置、系统及其相应单元的具体工作过程,可以参考如图1对应实施例中基于区块链的数据共享方法的说明,具体在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the blockchain-based data sharing device, system and its corresponding units described above can be referred to in the corresponding embodiment of FIG. The description of the data sharing method of the blockchain will not be repeated here.

本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by instructions that control relevant hardware, and the instructions can be stored in a computer-readable storage medium, and loaded and executed by the processor.

为此,本申请提供一种计算机可读存储介质,其中存储有多条指令,该指令能够被处理器进行加载,以执行本申请如图1对应实施例中基于区块链的数据共享方法的步骤,具体操作可参考如图1对应实施例中基于区块链的数据共享方法的说明,在此不再赘述。To this end, the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the block chain-based data sharing method in the embodiment corresponding to FIG. 1 of the present application. Steps and specific operations can be referred to the description of the blockchain-based data sharing method in the embodiment corresponding to FIG. 1 , which will not be repeated here.

其中,该计算机可读存储介质可以包括:只读存储器(Read Only Memory,ROM)、随机存取记忆体(Random Access Memory,RAM)、磁盘或光盘等。Wherein, the computer-readable storage medium may include: a read only memory (Read Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.

由于该计算机可读存储介质中所存储的指令,可以执行本申请如图1对应实施例中基于区块链的数据共享方法的步骤,因此,可以实现本申请如图1对应实施例中基于区块链的数据共享方法所能实现的有益效果,详见前面的说明,在此不再赘述。Because the instructions stored in the computer-readable storage medium can execute the steps of the blockchain-based data sharing method in the embodiment corresponding to FIG. The beneficial effects that can be achieved by the data sharing method of the blockchain are detailed in the previous description, and will not be repeated here.

以上对本申请提供的基于区块链的数据共享方法、装置、系统以及计算机可读存储介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The blockchain-based data sharing method, device, system and computer-readable storage medium provided by the present application have been described in detail above. The principles and implementations of the present application are described with specific examples. The description is only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, there will be changes in the specific embodiment and the scope of application. In summary, The contents of this specification should not be construed as limiting the application.

Claims (10)

1. A method for sharing data based on a block chain, the method comprising:
after different scientific research institutions and alliance blockchain platforms formed by different hospitals are added, blockchain nodes acquire scientific research data of the scientific research institutions or illness state data of the hospitals from under-chain acquisition nodes in the belonged blockchain node network organization, wherein the blockchain nodes and the under-chain acquisition nodes belong to the same organization registered by the alliance blockchain platform, and the under-chain acquisition nodes are nodes which are positioned outside the alliance blockchain and used for providing data acquisition services for the blockchain nodes;
the block chain link packs the scientific research data or the illness state data acquired from the under-chain acquisition nodes according to the data requirements of the alliance block chain platform to obtain to-be-linked chain data;
and the block chain link point submits the data to be uplink to the alliance block chain platform, and an account book is written after consensus among different block chain nodes in the alliance block chain platform is achieved so as to provide data sharing service.
2. The method of claim 1, wherein the blockchain node, prior to obtaining scientific research data of a scientific research institution or medical data of a hospital from an under-chain collection node in charge of the blockchain node in the blockchain node network organization, further comprises:
constructing the block chain platform, wherein the block chain platform is designed into a six-layer platform structure, the six-layer platform structure comprises a data layer, a network layer, a security layer, a consensus excitation layer, a contract layer and an application service layer,
the data layer encapsulates block data, a chain structure, a timestamp on a block head, a hash function, a Merkle tree, a random number on a block tail and a public key on a chain;
the network layer encapsulates a networking mode, a message propagation protocol and a data verification mechanism of the block chain system;
the security layer provides security guarantee for the whole block chain system of the alliance;
the consensus excitation layer encapsulates a consensus algorithm and an excitation mechanism based on statistical capability and statistical workload certification, and constructs a consensus excitation mechanism for participation of data providers, intermediaries and data users;
the contract layer encapsulates scripts, algorithms and intelligent contracts, and changes a block chain from an encapsulated system into a contract mechanism which can be programmed to carry out secondary development and even intelligent operation;
the application service layer is positioned at the top end of the six-layer platform structure and is an application program realized by codes.
3. The method of claim 1, wherein the blockchain node stores a pool of data records and a data controller;
the data recording pool stores block data of a block chain of the alliance;
and the data controller is responsible for integrating the scientific research data or the illness state data uploaded by the acquisition nodes under the chain, and examining the quality of the acquired data and controlling the shared access of the data according to an intelligent contract.
4. The method of claim 1, wherein the blockchain node, prior to obtaining scientific research data of a scientific research institution or medical data of a hospital from an under-chain collection node in charge of the blockchain node in the blockchain node network organization, further comprises:
in the data acquisition node access stage, the downlink acquisition node accesses the alliance blockchain platform through the blockchain link point to become a node which is positioned outside the alliance blockchain and used for providing data acquisition service for the blockchain node, wherein, the block chain node utilizes an intelligent contract to automatically update, maintain, verify and import the basic unit directory library of the downlink acquisition node, an organization administrator stores the basic information of the downlink acquisition node and the public key in the organization through the directory library updated in real time, thereby ensuring the matching relationship between the public key and the downlink acquisition node and the non-falsification of the content of the public key, and if the public key is acquired from the block chain platform, the public key indicates that the data acquisition node is not accessed by an organization administrator, subsequent operation is refused, and outermost layer safety protection is provided for the block chain platform.
5. The method of claim 4, further comprising:
in the data acquisition stage, in order to ensure that the acquired data is not tampered in the reporting process and the acquisition nodes under the chain and the block chain nodes are not attacked by illegal equipment, the block chain platform adopts a bidirectional signature verification mechanism to identify the identity and confirm the data between the acquisition nodes under the chain and the block chain nodes by using public and private keys generated in the data acquisition node access stage.
6. The method according to claim 1, wherein during the process of consensus on uplink data among different blockchain nodes in the alliance blockchain platform, the blockchain node point with the fastest statistical capability to calculate a valid result is used as a master node in the current consensus process, the other blockchain node points are used as slave nodes, a bayesian fault-tolerant PBFT consensus mechanism is adopted to perform blockchain consensus, after consensus is achieved, current data blocks are stored in the alliance blockchain platform in a sequential connection manner according to a time sequence, and the master node obtains alliance point reward due to recording data.
7. The method according to claim 1, wherein during the data sharing process, a Merkle tree structure is adopted to perform hierarchical encryption and multi-level encryption, and according to different characteristics of three Merkle trees in a block, the statistical data sharing on the alliance block chain platform is divided into three different levels:
at the first level, counting a Merkle tree in a transaction mode;
second level, overall statistics Merkle tree;
third level, individual statistics Merkle Tree.
8. An apparatus for data sharing based on a blockchain, the apparatus comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring scientific research data of scientific research institutions or illness state data of hospitals from under-chain acquisition nodes in charge of the acquisition unit in block chain link point network organizations to which the acquisition unit is responsible after joining alliance block chain platforms formed by different scientific research institutions and different hospitals, the block chain nodes and the under-chain acquisition nodes belong to the same organization registered by the alliance block chain platform, and the under-chain acquisition nodes are nodes which are positioned outside the alliance block chain and used for providing data acquisition services for the block chain nodes;
the packaging unit is used for packaging the scientific research data or the illness state data acquired from the under-chain acquisition node according to the data requirement of the alliance block chain platform to obtain to-be-linked data;
and the uplink unit is used for submitting the data to be uplink to the block chain alliance platform, and writing an account book after the different block chain nodes in the block chain alliance platform achieve consensus so as to provide data sharing service.
9. A blockchain based data sharing system, the system comprising a blockchain node and a down-link acquisition node, the blockchain node and the down-link acquisition node each comprising a processor and a memory, the memory having stored therein a computer program, the processor when calling the computer program in the memory performing the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the method of any one of claims 1 to 7.
CN202210016171.8A 2022-01-07 2022-01-07 A method, device and system for data sharing based on blockchain Pending CN114357490A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210016171.8A CN114357490A (en) 2022-01-07 2022-01-07 A method, device and system for data sharing based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210016171.8A CN114357490A (en) 2022-01-07 2022-01-07 A method, device and system for data sharing based on blockchain

Publications (1)

Publication Number Publication Date
CN114357490A true CN114357490A (en) 2022-04-15

Family

ID=81107977

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210016171.8A Pending CN114357490A (en) 2022-01-07 2022-01-07 A method, device and system for data sharing based on blockchain

Country Status (1)

Country Link
CN (1) CN114357490A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115145885A (en) * 2022-05-31 2022-10-04 中国北方发动机研究所(天津) Engine electric control system data sharing method based on block chain
CN115766030A (en) * 2022-11-16 2023-03-07 国家工业信息安全发展研究中心 Data sharing method and device based on trusted exchange sharing comprehensive service platform
CN116633933A (en) * 2023-07-24 2023-08-22 吉林大学第一医院 Medical equipment information management system based on block chain
CN116846685A (en) * 2023-08-30 2023-10-03 中通服建设有限公司 Remote access method and system for medical information security
CN118466378A (en) * 2024-07-12 2024-08-09 青岛山大齐鲁医院(山东大学齐鲁医院(青岛)) Intelligent comprehensive management and control system of electromechanical equipment based on intelligent hospital

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049027A (en) * 2019-04-02 2019-07-23 安徽省沃昇机电科技有限公司 A kind of transmission platform for block chain network information
CN110868424A (en) * 2019-11-26 2020-03-06 深圳市信联征信有限公司 Data sharing method and device based on block chain, computer equipment and storage medium
CN112203247A (en) * 2020-09-24 2021-01-08 南方电网科学研究院有限责任公司 Safe storage method and system for electric energy data
US20210133182A1 (en) * 2019-11-01 2021-05-06 Microsoft Technology Licensing, Llc Pooled validator node configuration for hosted blockchain network
CN112906055A (en) * 2021-03-16 2021-06-04 钦州市友朋医药咨询有限公司 Medical blockchain data storage system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049027A (en) * 2019-04-02 2019-07-23 安徽省沃昇机电科技有限公司 A kind of transmission platform for block chain network information
US20210133182A1 (en) * 2019-11-01 2021-05-06 Microsoft Technology Licensing, Llc Pooled validator node configuration for hosted blockchain network
CN110868424A (en) * 2019-11-26 2020-03-06 深圳市信联征信有限公司 Data sharing method and device based on block chain, computer equipment and storage medium
CN112203247A (en) * 2020-09-24 2021-01-08 南方电网科学研究院有限责任公司 Safe storage method and system for electric energy data
CN112906055A (en) * 2021-03-16 2021-06-04 钦州市友朋医药咨询有限公司 Medical blockchain data storage system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨美沂等: "基于区块链的统计数据采集共享系统构建研究", 《调研世界》, 14 May 2021 (2021-05-14) *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115145885A (en) * 2022-05-31 2022-10-04 中国北方发动机研究所(天津) Engine electric control system data sharing method based on block chain
CN115766030A (en) * 2022-11-16 2023-03-07 国家工业信息安全发展研究中心 Data sharing method and device based on trusted exchange sharing comprehensive service platform
CN115766030B (en) * 2022-11-16 2024-08-23 国家工业信息安全发展研究中心 Data sharing method and equipment based on trusted exchange sharing comprehensive service platform
CN116633933A (en) * 2023-07-24 2023-08-22 吉林大学第一医院 Medical equipment information management system based on block chain
CN116633933B (en) * 2023-07-24 2023-09-19 吉林大学第一医院 A blockchain-based medical equipment information management system
CN116846685A (en) * 2023-08-30 2023-10-03 中通服建设有限公司 Remote access method and system for medical information security
CN116846685B (en) * 2023-08-30 2023-11-10 中通服建设有限公司 Remote access method and system for medical information security
CN118466378A (en) * 2024-07-12 2024-08-09 青岛山大齐鲁医院(山东大学齐鲁医院(青岛)) Intelligent comprehensive management and control system of electromechanical equipment based on intelligent hospital

Similar Documents

Publication Publication Date Title
Kumar et al. Decentralized secure storage of medical records using Blockchain and IPFS: A comparative analysis with future directions
Houtan et al. A survey on blockchain-based self-sovereign patient identity in healthcare
CN109525671B (en) Block chain-based data storage method, electronic device and storage medium
CN114357490A (en) A method, device and system for data sharing based on blockchain
El Majdoubi et al. [Retracted] SmartMedChain: A Blockchain‐Based Privacy‐Preserving Smart Healthcare Framework
CN110535833B (en) Data sharing control method based on block chain
Rai PcBEHR: patient-controlled blockchain enabled electronic health records for healthcare 4.0
Vangipuram et al. CoviChain: a blockchain based framework for nonrepudiable contact tracing in healthcare cyber-physical systems during pandemic outbreaks
Peng et al. A peer-to-peer file storage and sharing system based on consortium blockchain
CN114513533A (en) Classified and graded fitness and health big data sharing system and method
CN109450910A (en) Data sharing method, data sharing network and electronic equipment based on block chain
CN112559627A (en) Alliance chain-based on-chain-under-chain collaborative electronic medical record data sharing method
CN111291394B (en) False information management method, false information management device and storage medium
Sifah et al. Chain-based big data access control infrastructure
CN112908442A (en) Medical data sharing method, device, equipment and computer readable medium
CN114978638A (en) A blockchain cross-chain supervision method based on shared nodes
CN112053274A (en) Construction guide method and device for government affair block chain network
Ma et al. Integrating blockchain and ZK-ROLLUP for efficient healthcare data privacy protection system via IPFS
Yang et al. An access control model based on blockchain master-sidechain collaboration
CN115514762A (en) Data trusted sharing method, edge server, terminal and system
CN113300853B (en) Financial credit information management method, device, electronic device and storage medium
Demichev et al. Business process engineering for data storing and processing in a collaborative distributed environment based on provenance metadata, smart contracts and blockchain technology
Jin et al. Toward secure, privacy-preserving, and interoperable medical data sharing via blockchain
Zhai et al. TVS: a trusted verification scheme for office documents based on blockchain
CN103020542A (en) Technology for storing secret information for global data center

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination