Author Login Editor-in-Chief Peer Review Editor Work Office Work

Computer Engineering ›› 2023, Vol. 49 ›› Issue (1): 181-190,200. doi: 10.19678/j.issn.1000-3428.0063814

• Computer Architecture and Software Technology • Previous Articles     Next Articles

File Data Synchronization Method Based on Ordered Hash Chain

ZENG Chang, JIANG Wenbao, GUO Yangnan   

  1. School of Information Management, Beijing Information Science & Technology University, Beijing 100085, China
  • Received:2022-01-23 Revised:2022-03-01 Published:2023-01-06

基于有序哈希链的文件数据同步方法

曾畅, 蒋文保, 郭阳楠   

  1. 北京信息科技大学 信息管理学院, 北京 100085
  • 作者简介:曾畅(1998-),男,硕士研究生,主研方向为管理科学、区块链;蒋文保(通信作者),教授、博士;郭阳楠,硕士研究生。
  • 基金资助:
    国家重点研发计划“区块链可证明安全隐私保护技术研究”(2022YFB2703000)。

Abstract: This study aims to tackle the problems of low efficiency and local update difficulties in the existing file data synchronization transmission methods.To this end, it proposes a Hash chain construction and file data synchronization method.It takes the changes of server files or directories in the C/S architecture as a series of Hash nodes, iterates the Hash values of files or directories through the Hash function according to the time sequence, and forms an ordered Hash chain that can record all the operation states of the file library.The client only needs to perform the same file operation according to the Hash chain node for synchronous updates, without synchronous authentication for each file data, to ensure the integrity, non-repudiation, traceability, and tamper resistance of the file library.The sequential Hash chain synchronization method is used to monitor the difference and consistency of file data for different terminals to quickly obtain file changes and perform logical synchronization.The experimental results show that the average synchronization acceleration ratio of the proposed method is 94.85% under the mode of unchanged file library, in the mode of changed file library, the average synchronization acceleration ratio is 6.5% and 69.99% respectively compared with the Rsync algorithm with ‘quick check’ strategy and conventional strategy, effectively reduces the time and resource consumption during synchronization.

Key words: Hash chain, file synchronization, data backup, Rsync algorithm, file monitoring

摘要: 针对现有文件数据同步传输方法效率低、局部更新困难的问题,提出一种哈希链构建及文件数据同步方法。将C/S架构中服务器端文件或目录的变化作为一系列哈希节点,根据时间先后顺序,通过哈希函数迭代文件或目录的哈希值,形成能够记录文件库所有操作状态的有序哈希链。客户端只需根据哈希链节点执行相同文件操作并进行同步更新,而不需要对每个文件数据进行同步认证,确保文件库的完整性、不可抵赖性、可溯源性和防篡改性。采用有序哈希链的同步方法对不同终端进行文件数据差异监视和一致性检测,以快速获取文件变化并进行逻辑同步。实验结果表明,该方法在文件库未变动模式下的平均同步加速比为94.85%,在文件库变动的模式下,相较于“quick check”策略和常规策略的Rsync算法,平均同步加速比分别为6.5%和69.99%。有效地减少了同步过程中时间和资源的消耗。

关键词: 哈希链, 文件同步, 数据备份, Rsync算法, 文件监控

CLC Number: