A file updating method, system, device and computer readable storage medium

CN116932005BActive Publication Date: 2026-09-15HANGZHOU SHUNWANG TECH
2 Cites 0 Cited by

Patent Information

Application Number
CN202311027008.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-15
Publication Date
2026-09-15
Estimated Expiration
2043-08-15

AI Technical Summary

Technical Problem

[0003]然而,该更新方法需要将原文件中的复用块拷贝到更新文件里,造成不必要的磁盘IO开销,且需要新建一个文件,文件大小设置为更新后的大小,且为了设备顺利更新,需要预留出更多的剩余空间,导致设备的磁盘实际可使用空间减少,当磁盘剩余空间不足时,还容易出现文件更新失败的风险;此外,新建文件在创建后,一直到接收下载块完成,存在于整个文件对比更新的周期里,留存时间较长,当设备包含的文件较多时,打开的文件句柄就会翻倍,当系统句柄资源耗尽时,会导致系统卡死;由此可见,该更新方法的缺陷较大,适用性差

Benefits of technology

[0036]This application provides a file update method that involves: determining the original file to be updated; matching the original file with the target file to identify reuse blocks with identical content; determining the original position, reuse position, and reuse length of the reuse blocks; and determining the movement method of the reuse blocks based on the original position and reuse position, including left shift and right shift. In the original file, for a reuse block to be left-shifted, if the reuse position after the left shift does not contain data for another reuse block to be right-shifted, the reuse block is left-shifted according to the left-shifted reuse position; if the reuse position after the left shift contains data for another reuse block, the reuse block is stored in the target cache and the left-shifted reuse position is recorded. For a multiplexed block to be right-shifted, if the multiplexed block only needs to be right-shifted, the original position, multiplexed position, and multiplexed length are recorded in the first right-shift result set. If the multiplexed block also needs to be left-shifted, the multiplexed position after the left shift, the multiplexed position after the right shift, and the multiplexed length are recorded in the second right-shift result set. In the original file, the multiplexed blocks corresponding to the first right-shift result set are right-shifted, the multiplexed blocks recorded in the target cache are left-shifted, the multiplexed blocks corresponding to the second right-shift result set are right-shifted, and other data blocks other than the multiplexed blocks are written into the target file. Here, the original position includes the position of the multiplexed block in the original file, and the multiplexed position includes the position of the multiplexed block in the target file. In this application, the reused blocks in the original file and the target file and their corresponding movement methods are determined. The reused blocks are moved directly in the original file to avoid copying them from the target file, reducing disk I/O overhead. Furthermore, only the data blocks other than the reused blocks in the target file need to be written to the original file to update it, avoiding the need to create a new file for data copying. This prevents insufficient disk space and exhaustion of system handle resources, demonstrating good applicability. The file update system, device, and computer-readable storage medium provided in this application also solve the corresponding technical problems.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The application discloses a file updating method, system, device and computer readable storage medium, relates to the field of computer updating, determines a multiplex block in an original file and a target file, determines an original position, a multiplex position, a multiplex length and a moving mode of the multiplex block, in the original file, for the multiplex block to be left shifted, if another multiplex block to be right shifted does not exist in the multiplex position after left shifting, the multiplex block is left shifted, if another multiplex block exists in the multiplex position after left shifting, the multiplex block is stored into a target cache, for the multiplex block to be right shifted, if the multiplex block is only right shifted, the multiplex block is recorded into a first right shift result set, if the multiplex block still has left shift coverage, the multiplex block is recorded into a second right shift result set after being corrected, in the original file, the right shift result set is right shifted, the multiplex block recorded in the target cache is left shifted, and other data blocks except the multiplex block are written into the target file, and the method is good in applicability.
Need to check novelty before this filing date? Find Prior Art