基于区块链的数据校验方法技术

技术编号:20081229 阅读:45 留言:0更新日期:2019-01-15 02:40
本发明专利技术公开的基于区块链的数据校验方法,涉及共享汽车领域,通过获取待校验数据的第一哈希值并将所述第一哈希值发送给服务器,针对所述待校验数据,利用sha256算法,生成第二哈希值,接收所述服务器发送的所述待校验数据的第三哈希值,判断所述第二哈希值与所述第三哈希值是否一致,如一致,则说明所述待校验数据校验通过,避免了共享汽车行业中,用户认为平台多扣费、数据被平台篡改过情况,保证了数据的真实性,解决了现有技术存在的不能保证数据真实的缺陷。

Data Checking Method Based on Block Chain

The block chain-based data verification method disclosed in the present invention relates to the field of shared automobile. By acquiring the first hash value of the data to be verified and sending the first hash value to the server, according to the data to be verified, the second hash value is generated by using the sha256 algorithm, the third hash value of the data to be verified transmitted by the server is received, and the second hash value is judged. If the value is consistent with the third hash value, it shows that the data to be checked has passed, which avoids the situation that users think that the platform deducts more fees and data has been tampered with by the platform in the shared automobile industry, ensures the authenticity of the data, and solves the defect that the existing technology can not guarantee the authenticity of the data.

【技术实现步骤摘要】
基于区块链的数据校验方法
本专利技术涉及共享汽车领域,具体涉及一种基于区块链的数据校验方法。
技术介绍
目前的共享汽车行业,由于涉及到汽车的共享,会经常出现用户对数据不信任的情况,例如用户认为平台多扣费、数据被平台篡改过。现有的中心化数据结构无法改变用户的观念,也无法保证数据真的没有被篡改。
技术实现思路
为解决现有技术的不足,本专利技术实施例提供了一种基于区块链的数据校验方法。第一方面,本专利技术实施例提供的基于区块链的数据校验方法,适用于客户端,包括:获取待校验数据的第一哈希值并将所述第一哈希值发送给服务器;针对所述待校验数据,利用sha256算法,生成第二哈希值;接收所述服务器发送的所述待校验数据的第三哈希值,判断所述第二哈希值与所述第三哈希值是否一致,如一致,则说明所述待校验数据校验通过。优选地,所述方法还包括:显示所述待校验数据,其中,所述待校验数据包括用户ID、属性、哈希值及所在的块高度。第二方面,本专利技术实施例提供的基于区块链的数据校验方法,适用于服务器,其特征在于,包括:接收客户端发送的待校验数据的第一哈希值,根据所述第一哈希值,获取所述第一哈希值对应的待校验数据;针对本文档来自技高网...

【技术保护点】
1.一种基于区块链的数据校验方法,适用于客户端,其特征在于,包括:获取待校验数据的第一哈希值并将所述第一哈希值发送给服务器;针对所述待校验数据,利用sha256算法,生成第二哈希值;接收所述服务器发送的所述待校验数据的第三哈希值,判断所述第二哈希值与所述第三哈希值是否一致,如一致,则说明所述待校验数据校验通过。

【技术特征摘要】
1.一种基于区块链的数据校验方法,适用于客户端,其特征在于,包括:获取待校验数据的第一哈希值并将所述第一哈希值发送给服务器;针对所述待校验数据,利用sha256算法,生成第二哈希值;接收所述服务器发送的所述待校验数据的第三哈希值,判断所述第二哈希值与所述第三哈希值是否一致,如一致,则说明所述待校验数据校验通过。2.根据权利要求1所述的方法,其特征在于...

【专利技术属性】
技术研发人员:杨星李鹏
申请(专利权)人:北京首汽智行科技有限公司
类型:发明
国别省市:北京,11

网友询问留言 已有0条评论
  • 还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。

1