## 2 Related Work
### Data Sharing  
With the booming development of the Internet of Things industry, data are becoming a valuable asset in our society and economy. In various fields of the Internet of Things, such as smart transportation, smart medical care, and smart homes, a large amount of data and data exchange are generated. As a result, the data-exchange market is becoming increasingly popular. In data-exchange markets, data owners can share or sell their data to data consumers. In smart medicine, for example, sharing patient data between different hospitals can help nurses and doctors judge patients' health and make real-time decisions, even in remote areas. However, the current data-exchange market is centralized, and all participants must trust authorized third parties. In centralized markets, data owners and customers pay a fee to authorized third parties. In addition, a single point of failure may occur. To overcome these challenges, data owners and customers can collaborate to build decentralized data-exchange markets using blockchain technology. Aiming at personal data sharing under personalized service, a study [16] proposed an anonymous dataset-distribution scheme based on blockchain. The platform consists of peers acting as data and receivers, and transaction validators. The blockchain is used to record all transactions of anonymous datasets between data agent and receiver, and to meet the security requirements of data distribution. Aiming at the difficult issues of copyright and privacy protection in the current data-exchange market, another study [17] proposed a distributed Big Data exchange solution. The solution aims to foster an ecosystem in which all participants can collaborate and exchange data in a peer-to-peer manner. The core part of the solution is to use blockchain technology to log transactions and other important documents. Unlike existing data-exchange markets, their solution does not require any third party. It also provides data owners with a convenient way to audit the use of data to protect data copyright and privacy. In patient health systems with personal data sharing in different medical systems, running the risk of privacy breaches, a study [18] proposed an application (medical-data gateway (HDG)) on the basis of the blockchain for patients to control and share their own data easily and safely without violating their privacy. This provides a new potential method to improve the intelligence of healthcare systems while keeping the patient data private, ensuring that patients own and control their medical data, and trusted third parties can utilize patient data when privacy is not invaded. The main objective of [19] was to describe a method to effectively and securely share medical information via a data-sharing network. Patient records should be consistent and cross-institutional boundaries, with access conditions strictly at the discretion of the patient. As a second goal, not only should these data be shared, but also shared in a way that all interested parties can understand their structure and meaning, ultimately improving data utilities and patient care. In the process of medical-care-data sharing, securely sharing health data with other nodes in the network by PSN nodes is a medical-security system based on VPN. The authors in [20] designed two protocols for this system. The first is an improved version of the authentication association shown in IEEE 802.15.6. It establishes secure links with unbalanced computing requirements for mobile devices and sensor nodes with limited resources. The second protocol uses blockchain technology to share health data between PSN nodes. We implemented a protocol suite to study protocol runtime and other factors. In addition, in some use cases, a human body channel is proposed for PSN nodes. The proposed system illustrates a potential approach to implement PSN-based applications using the blockchain; data are the core issue. Table 1 summarizes the above blockchain-based solutions.