CN103399804A - Method and system for repairing remote package files - Google Patents

Method and system for repairing remote package files Download PDF

Info

Publication number
CN103399804A
CN103399804A CN2013103278809A CN201310327880A CN103399804A CN 103399804 A CN103399804 A CN 103399804A CN 2013103278809 A CN2013103278809 A CN 2013103278809A CN 201310327880 A CN201310327880 A CN 201310327880A CN 103399804 A CN103399804 A CN 103399804A
Authority
CN
China
Prior art keywords
packaging file
data
data segment
service end
local
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
CN2013103278809A
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.)
Zhuhai Kingsoft Online Game Technology Co Ltd
Chengdu Xishanju Interactive Entertainment Technology Co Ltd
Original Assignee
Zhuhai Kingsoft Online Game Technology Co Ltd
Chengdu Xishanju Interactive Entertainment Technology Co Ltd
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 Zhuhai Kingsoft Online Game Technology Co Ltd, Chengdu Xishanju Interactive Entertainment Technology Co Ltd filed Critical Zhuhai Kingsoft Online Game Technology Co Ltd
Priority to CN2013103278809A priority Critical patent/CN103399804A/en
Publication of CN103399804A publication Critical patent/CN103399804A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and system for repairing remote package files. When a local package file downloaded from a server-side is damaged, damaged data segments in the local package file are detected through verifying data, original data segments corresponding to the damaged data segments in the local package file are downloaded from an original package file of the server-side according to revised data, and the original data segments are wrote in the local package file in a covering mode to complete repair of the local package file. The fact of downloading the original package file again is avoided in the repair process, flow is reduced, and therefore, time is saved, and data transmission error might generated in a re-downloading process and re-decompression error after downloading are avoided.

Description

The method and system that a kind of long-range packaging file is repaired
Technical field
The present invention relates to the reparation of packaging file, particularly a kind of method and system of long-range packaging file reparation.
Background technology
In the processes such as the transmission of file, download, storage, often can run into packaging file.Reduce the size of original due to packaging file, while by service end, downloading relevant packaging file, just saved the time, improve efficiency, after packaging file is encrypted, also can guarantee the safety of file, and after packaging file is downloaded or stores, correspondingly saved storage space.
Packaging file when bringing convenience, also has some corresponding shortcomings.service end is generally stored the client packaging file with the form of packing, after the client packaging file is received by the user, to client packaging file decompress(ion) the time, usually can occur and can't open, the problems such as decompress(ion) mistake, these problems may be to cut off the power supply during due to disk read-write, transmission or decompress(ion) mistake etc. cause, in case these problems occur, corresponding client packaging file just can't use, if former packaging file can be downloaded from service end again again, can avoid loss or the damage of file, but again during mail downloading charge and take network traffics, and can't avoid transmission and the decompress(ion) mistake of repeatability.
Summary of the invention
For addressing the above problem, the object of the present invention is to provide a kind of long-range packaging file restorative procedure and system, by download verification, correction data, packaging file is repaired, avoid again downloading former packaging file from service end, save time, reduce flow, and prevented repeated transmission and decompress(ion) mistake.
The present invention solves the technical scheme that its problem adopts:
A kind of method that long-range packaging file is repaired, the local packaging file of described packaging file for from service end, obtaining comprises:
Checking procedure, download checking data from service end, whether correctly detects local packaging file by checking data;
Revise step, when by checking data, detecting local packaging file mistake, from service end, download and revise data, and according to revising data, local packaging file is repaired.
Described method also comprises checking data and revises the step that data generate, data segment in the original packaging file of service end is scanned and generates checking data and revise data, and described original packaging file is the source document corresponding with local packaging file of service end storage.
When the original packaging file of described service end changes, regenerate the checking data of original packaging file and revise data.
the described checking data that data segment in the original packaging file of service end is scanned generation comprises the data segment check code of the original packaging file of service end, data segment size and data segment off-set value, thereby described data segment size and data segment off-set value generate the data segment check code of local packaging file for the data segment of locating local packaging file, the data segment check code of described original packaging file is used for comparing with the data segment check code of the local packaging file that generates, whether correct to judge the data segment in local packaging file, thereby determine whether local packaging file is correct.
Described while from service end, download revising data, only download the corresponding correction data of misdata section in the local packaging file of judging.
The described correction data that data segment in the original packaging file of service end is scanned generation comprise data segment address and the corresponding data segment off-set value in the original packaging file of service end, according to revising the data segment address in the original packaging file of service end and corresponding data segment off-set value in data, download the corresponding former data segment of described misdata section from the original packaging file of service end, and this former data segment covering is write to the reparation of the position realization of the data segment that makes a mistake in local packaging file to packaging file.
Data segment address in the included original packaging file of service end of described correction data is relative address.
The system that a kind of long-range packaging file is repaired, the local packaging file of described packaging file for from service end, obtaining comprises:
Correction verification module, be used for downloading checking data from service end, whether correctly detects local packaging file by checking data;
Correcting module, be used for when by checking data, detecting local packaging file mistake, downloads and revise data from service end, and according to revising data, local packaging file is repaired.
Described system also comprises data generation module, is used for data segment to the original packaging file of service end and scan and generate checking data and revise data, and described original packaging file is the source document corresponding with local packaging file that service end is stored.
When the original packaging file of described service end changes, regenerate the checking data of original packaging file and revise data.
the described checking data that data segment in the original packaging file of service end is scanned generation comprises the data segment check code of the original packaging file of service end, data segment size and data segment off-set value, thereby described data segment size and data segment off-set value generate the data segment check code of local packaging file for the data segment of locating local packaging file, the data segment check code of described original packaging file is used for comparing with the data segment check code of the local packaging file that generates, whether correct to judge the data segment in local packaging file, thereby determine whether local packaging file is correct.
Described while from service end, download revising data, only download the corresponding correction data of misdata section in the local packaging file of judging.
The described correction data that data segment in the original packaging file of service end is scanned generation comprise data segment address and the corresponding data segment off-set value in the original packaging file of service end, according to revising the data segment address in the original packaging file of service end and corresponding data segment off-set value in data, download the corresponding former data segment of described misdata section from the original packaging file of service end, and this former data segment covering is write to the reparation of the position realization of the data segment that makes a mistake in local packaging file to packaging file.
Data segment address in the included original packaging file of service end of described correction data is relative address.
The invention has the beneficial effects as follows:
The method and system that the present invention adopts a kind of long-range packaging file to repair, when packaging file decompress(ion) mistake, directly from service end, download checking data packaging file is carried out verification, thereby detect corresponding misdata section, download and revise data again, the data segment of mistake is revised, need not again download former packaging file, save time and flow, the mistake of decompress(ion) again after the data transmission fault while having avoided simultaneously repeated downloads and download.
Description of drawings
The invention will be further described below in conjunction with accompanying drawing and example.
Fig. 1 is the method for the invention process flow diagram;
Schematic diagram data when Fig. 2 is client packaging file storage of the present invention;
Fig. 3 is former packaging file, the checking data of service end storage of the present invention and revises schematic diagram data;
Fig. 4 is the enlarged drawing of checking data described in this Fig. 3;
Fig. 5 revises the data enlarged drawing described in this Fig. 3;
Fig. 6 is the structural drawing of system of the present invention.
Embodiment
The user is when downloading packaging file; corresponding; preserve in service end the file that the user need to download; this file is original packaging file (or benchmark file); after the user downloads to client machine with this file; in theory; corresponding client machine stores the local packaging file consistent with the benchmark file; but this local packaging file is when decompress(ion); often can produce the decompress(ion) mistake; by the method for the invention, can repair this local packaging file, this local packaging file and benchmark file are consistent.
Described service end has checking data and revises data, and described checking data generates with revising the repair data maker of data by service end, and described repair data maker is the program that is used in service end the scanning of benchmark file and writing scan information.The repair data maker after receiving the benchmark file,, take the benchmark file as parameter, scans and generates corresponding checking data and revise data the benchmark file.The benchmark file is generally stored in the mode of data segment, the repair data maker scans first data segment in the benchmark file successively from the low address to the high address take data segment as unit, in the process of scanning, the repair data maker can calculate and record the information of check code of each data segment, and the data segment check code that will record, data segment size, data segment off-set value write to checking data, and in the benchmark file that will record simultaneously, the address of data segment, data segment off-set value write to the correction data.Need to prove, when the benchmark file changed, the repair data maker can regenerate checking data and revise data according to the benchmark file.
When the decompress(ion) mistake appearred in local packaging file, the client obturator of this local packaging file can connect with service end, and local packaging file is repaired, and described client obturator is that client is used for the program that local packaging file is repaired.Process flow diagram shown in Figure 1, client obturator after the Connection Service end, are understood the checking data of download service end.Local packaging file schematic diagram data after downloading with reference to user shown in Figure 2, benchmark file, checking data and the correction schematic diagram data stored with reference to the service end of correspondence shown in Figure 3 simultaneously, the benchmark file is stored with identical data segment with local packaging file.after the client obturator is downloaded checking data, can scan local packaging file, with reference to checking data shown in Figure 4, checking data comprises the data segment check code, data segment size and data segment off-set value, the client obturator scans local packaging file according to data segment size and data segment off-set value that checking data provides, calculate the check code of each data segment in local packaging file, and the check code of each data segment that will calculate and the data segment check code in checking data compare, when if the contrast of the check code of a certain data segment is wrong, illustrate that this data segment damages, if through contrast, all check codes are identical, illustrate that local packaging file does not damage.
When finding that data segment has damage, the client obturator reconnects service end, download and revise data from service end, with reference to correction data shown in Figure 5, the correction data comprise data segment address and the corresponding data segment off-set value in the benchmark file, in order to reduce the space of revising data, described data segment address is relative address.Client's obturator is according to revising data, calculate position and the off-set value of detected error data segment in the benchmark file, download the corresponding former data segment of detected error data segment in the benchmark file, and the former data segment that will download covers the correspondence position that writes in local packaging file, complete to local packaging file reparation.When the client obturator is downloaded the correction data from service end, can only download the corresponding correction data of detected error data segment, not need to download whole correction data, thereby to reduce downloading flow, save time.
By to the method for the invention, when local packaging file damages, do not need again to download, reduce flow and save time, the mistake of decompress(ion) again after the error of transmission while also having avoided again downloading simultaneously and download.
The invention discloses the system that a kind of long-range packaging file is repaired,, with reference to shown in 6, comprise data generation module, correction verification module and correcting module.Described data generation module scans the generation checking data and revises data for the data segment of the reparation of the data by service end maker to the benchmark file of service end, it is to be used in service end the data segment scanning of benchmark file and the program of writing scan information that described data are repaired maker, and described benchmark file is the download file corresponding with local packaging file of service end storage.Data reparation maker scans each data segment of benchmark file, generate corresponding checking data and revise data, described checking data comprises data segment check code, data segment size and the data segment off-set value of each data segment in the benchmark file, revises data and comprises address and the off-set value of each data segment in the benchmark file.When if the benchmark file changes, data are repaired maker and can be regenerated corresponding checking data and revise data according to the benchmark file.After described correction verification module is downloaded checking data from service end, data segment according to the local packaging file of the data segment size of the benchmark file that comprises in checking data and data segment off-set value location, and the generation data segment check code corresponding with local packaging file, afterwards, correction verification module compares the data segment check code of the local packaging file of the data segment check code of benchmark file and generation, whether correct to judge the data segment in local packaging file, thus determine whether local packaging file is correct.if during the data segment mistake in local packaging file, illustrate that local packaging file damages, correcting module is downloaded and is revised data from service end, correcting module can only be downloaded the corresponding correction data of misdata section in local packaging file, thereby to reduce flow, save time, afterwards, correcting module is according to data segment address and the corresponding data segment off-set value revised in the service end benchmark file that data comprise, download the corresponding former data segment of misdata section in described local file from the benchmark file of service end, and this former data segment is covered the position that writes to the data segment that makes a mistake in local packaging file, to complete the reparation to packaging file.
The above, be preferred embodiment of the present invention, and the present invention is not limited to above-mentioned embodiment,, as long as it reaches technique effect of the present invention with identical means, all should belong to protection scope of the present invention.

Claims (14)

1. method that long-range packaging file is repaired, the local packaging file of described packaging file for from service end, obtaining, is characterized in that, comprising:
Checking procedure, download checking data from service end, whether correctly detects local packaging file by checking data;
Revise step, when by checking data, detecting local packaging file mistake, from service end, download and revise data, and according to revising data, local packaging file is repaired.
2. a kind of long-range packaging file according to claim 1 method of repairing, it is characterized in that, also comprise checking data and revise the step that data generate, data segment in the original packaging file of service end is scanned and generates checking data and revise data, and described original packaging file is the source document corresponding with local packaging file of service end storage.
3. the method for a kind of long-range packaging file reparation according to claim 2, is characterized in that, when the original packaging file of described service end changes, regenerates the checking data of original packaging file and revise data.
4. a kind of long-range packaging file according to claim 2 method of repairing, it is characterized in that, the described checking data that data segment in the original packaging file of service end is scanned generation comprises the data segment check code of the original packaging file of service end, data segment size and data segment off-set value, thereby described data segment size and data segment off-set value generate the data segment check code of local packaging file for the data segment of locating local packaging file, the data segment check code of described original packaging file is used for comparing with the data segment check code of the local packaging file that generates, whether correct to judge the data segment in local packaging file, thereby determine whether local packaging file is correct.
5. the method for a kind of long-range packaging file reparation according to claim 4, is characterized in that, while downloading the correction data from service end in described correction step, only downloads the corresponding correction data of misdata section in the local packaging file of judging.
6. a kind of long-range packaging file according to claim 2 method of repairing, it is characterized in that, the described correction data that data segment in the original packaging file of service end is scanned generation comprise data segment address and the corresponding data segment off-set value in the original packaging file of service end, according to revising the data segment address in the original packaging file of service end and corresponding data segment off-set value in data, download the corresponding former data segment of described misdata section from the original packaging file of service end, and this former data segment covering is write to the reparation of the position realization of the data segment that makes a mistake in local packaging file to packaging file.
7. a kind of long-range packaging file according to claim 6 method of repairing, is characterized in that, the data segment address in the included original packaging file of service end of described correction data is relative address.
8. system that long-range packaging file is repaired, the local packaging file of described packaging file for from service end, obtaining, is characterized in that, comprising:
Correction verification module, be used for downloading checking data from service end, whether correctly detects local packaging file by checking data;
Correcting module, be used for when by checking data, detecting local packaging file mistake, downloads and revise data from service end, and according to revising data, local packaging file is repaired.
9. a kind of long-range packaging file according to claim 8 system of repairing, it is characterized in that, also comprise data generation module, data segment for the original packaging file to service end scans the generation checking data and revises data, and described original packaging file is the source document corresponding with local packaging file of service end storage.
10. the system of a kind of long-range packaging file reparation according to claim 9, is characterized in that, when the original packaging file of described service end changes, regenerates the checking data of original packaging file and revise data.
11. the system that a kind of long-range packaging file according to claim 9 is repaired, it is characterized in that, the described checking data that data segment in the original packaging file of service end is scanned generation comprises the data segment check code of the original packaging file of service end, data segment size and data segment off-set value, thereby described data segment size and data segment off-set value generate the data segment check code of local packaging file for the data segment of locating local packaging file, the data segment check code of described original packaging file is used for comparing with the data segment check code of the local packaging file that generates, whether correct to judge the data segment in local packaging file, thereby determine whether local packaging file is correct.
12. the system that a kind of long-range packaging file according to claim 11 is repaired, is characterized in that, when described correcting module is downloaded the correction data from service end, only downloads the corresponding correction data of misdata section in the local packaging file of judging.
13. the system that a kind of long-range packaging file according to claim 9 is repaired, it is characterized in that, the described correction data that data segment in the original packaging file of service end is scanned generation comprise data segment address and the corresponding data segment off-set value in the original packaging file of service end, according to revising the data segment address in the original packaging file of service end and corresponding data segment off-set value in data, download the corresponding former data segment of described misdata section from the original packaging file of service end, and this former data segment covering is write to the reparation of the position realization of the data segment that makes a mistake in local packaging file to packaging file.
14. the system that a kind of long-range packaging file according to claim 13 is repaired, is characterized in that, the data segment address in the included original packaging file of service end of described correction data is relative address.
CN2013103278809A 2013-07-31 2013-07-31 Method and system for repairing remote package files Pending CN103399804A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013103278809A CN103399804A (en) 2013-07-31 2013-07-31 Method and system for repairing remote package files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013103278809A CN103399804A (en) 2013-07-31 2013-07-31 Method and system for repairing remote package files

Publications (1)

Publication Number Publication Date
CN103399804A true CN103399804A (en) 2013-11-20

Family

ID=49563437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013103278809A Pending CN103399804A (en) 2013-07-31 2013-07-31 Method and system for repairing remote package files

Country Status (1)

Country Link
CN (1) CN103399804A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105739971A (en) * 2016-01-20 2016-07-06 网易(杭州)网络有限公司 Verification file generation method and device and verification file using method and device
CN106650473A (en) * 2016-12-01 2017-05-10 中国工商银行股份有限公司 Method and system for verifying multiple document encapsulation packages, transmitting device and receiving device
CN109254954A (en) * 2018-09-13 2019-01-22 政采云有限公司 Document handling method and device calculate equipment and storage medium
CN114548079A (en) * 2022-01-26 2022-05-27 深圳联想懂的通信有限公司 Text display method and device and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070186066A1 (en) * 2006-02-03 2007-08-09 Emc Corporation Fast verification of computer backup data
CN101458645A (en) * 2007-12-11 2009-06-17 英业达股份有限公司 Computer operating system, file data repairing system of software thereof and method thereof
CN101795293A (en) * 2010-01-27 2010-08-04 浪潮(北京)电子信息产业有限公司 File download method, file download system, sending device and detecting device
CN102053880A (en) * 2011-01-07 2011-05-11 杭州电子科技大学 Rar file carving recovery method based on contents
CN102609326A (en) * 2012-01-17 2012-07-25 大唐移动通信设备有限公司 Data downloading processing method and data downloading processing device
CN102937903A (en) * 2012-10-23 2013-02-20 珠海金山网络游戏科技有限公司 Packaged file updating method based on feature matching

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070186066A1 (en) * 2006-02-03 2007-08-09 Emc Corporation Fast verification of computer backup data
CN101458645A (en) * 2007-12-11 2009-06-17 英业达股份有限公司 Computer operating system, file data repairing system of software thereof and method thereof
CN101795293A (en) * 2010-01-27 2010-08-04 浪潮(北京)电子信息产业有限公司 File download method, file download system, sending device and detecting device
CN102053880A (en) * 2011-01-07 2011-05-11 杭州电子科技大学 Rar file carving recovery method based on contents
CN102609326A (en) * 2012-01-17 2012-07-25 大唐移动通信设备有限公司 Data downloading processing method and data downloading processing device
CN102937903A (en) * 2012-10-23 2013-02-20 珠海金山网络游戏科技有限公司 Packaged file updating method based on feature matching

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105739971A (en) * 2016-01-20 2016-07-06 网易(杭州)网络有限公司 Verification file generation method and device and verification file using method and device
CN105739971B (en) * 2016-01-20 2019-03-08 网易(杭州)网络有限公司 Verify generation, application method and the device of file
CN106650473A (en) * 2016-12-01 2017-05-10 中国工商银行股份有限公司 Method and system for verifying multiple document encapsulation packages, transmitting device and receiving device
CN109254954A (en) * 2018-09-13 2019-01-22 政采云有限公司 Document handling method and device calculate equipment and storage medium
CN109254954B (en) * 2018-09-13 2020-06-09 政采云有限公司 File processing method and device, computing equipment and storage medium
CN114548079A (en) * 2022-01-26 2022-05-27 深圳联想懂的通信有限公司 Text display method and device and readable storage medium
CN114548079B (en) * 2022-01-26 2023-05-16 广东联想懂的通信有限公司 Text display method and device and readable storage medium

Similar Documents

Publication Publication Date Title
CN110032377B (en) Communication module software upgrading method and system and communication module
CN106843957B (en) System firmware upgrading method and device
KR100698141B1 (en) A mobile terminal having a radio frequency calibration data recovering function and a method of backup and reinstalling
CN103399804A (en) Method and system for repairing remote package files
CN101178675A (en) Method and device for verifying data
CN103631721A (en) Method and system for isolating bad blocks in internal storage
CN105740088A (en) Flash data error correction method and device
CN101944051A (en) Multi-copy high-reliability embedded system firmware on chip and working method thereof
US20160170735A1 (en) Operating system updating method by using a checklist
CN103024438B (en) A kind of Set Top Box and production test method, system
CN106851410B (en) Set top box fault repairing method and system
CN110083360A (en) A kind of Compilation Method of application code, device, equipment and storage medium
CN105280240A (en) Nand Flash parameter reading method
CN106897166A (en) A kind of mobile terminal and its restorative procedure
CN103279401B (en) A kind of method and device of accessing storer
CN108170461A (en) Difference upgrade package generation method, difference upgrade method and device
CN108196975B (en) Data verification method and device based on multiple checksums and storage medium
CN107368383B (en) Method and equipment for checking configuration file of automobile controller
CN102520223A (en) Software anti-interference method used for electric energy meter
CN113590161B (en) Memory-controllable NB-IOT module differential upgrading method and system
CN103685471A (en) Method and system for updating software client sides in monopoly mode
CN103778114A (en) System and method for file recovery
CN104898985A (en) Storage device, controller, and data writing method
CN109324810A (en) The production method and system of internet of things equipment upgrade package
CN112948819B (en) Application file shelling method and device and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20131120