CN103401867A - Method and system for updating package file by virtue of protocols - Google Patents

Method and system for updating package file by virtue of protocols Download PDF

Info

Publication number
CN103401867A
CN103401867A CN2013103276625A CN201310327662A CN103401867A CN 103401867 A CN103401867 A CN 103401867A CN 2013103276625 A CN2013103276625 A CN 2013103276625A CN 201310327662 A CN201310327662 A CN 201310327662A CN 103401867 A CN103401867 A CN 103401867A
Authority
CN
China
Prior art keywords
file
data
agreement
newly
packaging
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
CN2013103276625A
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 CN2013103276625A priority Critical patent/CN103401867A/en
Publication of CN103401867A publication Critical patent/CN103401867A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method and a system for updating a package file by virtue of protocols. According to the method, updating operations such as file deletion and file addition can be rapidly and conveniently performed on the package file by virtue of the generation and execution of the protocols, meanwhile, if different servers provide the same downloading, the updating consistency of the servers can be kept; when a client performs updating, only updating protocol downloading is required to be performed, the client can perform updating according to the updating frequency once an updating protocol is generated, and can also perform updating after a plurality of groups of updating protocols are generated, and the whole package file is not needed to be downloaded during updating, so that the flow is reduced, time is saved, and meanwhile the consistency with the servers after once or several times of updating can also be kept.

Description

A kind of method and system of packaging file being upgraded by agreement
Technical field
The present invention relates to the renewal of packaging file, particularly a kind of method and system of packaging file being upgraded by agreement.
Background technology
The user often need to download needed various packaging file from service end, after these packaging files are downloaded to client machine, becomes local packaging file.The original packaging file of service end often can upgrade, and such as increasing file etc., if the mode that adopts traditional increment to append can only simply increase or alternate file in original packaging file, for complex operations such as movement, deletions, is difficult to realize.Same local packaging file may have a plurality of different download service ends, and when the original packaging file of service end need to upgrade, existing mode was difficult to the consistency that keeps same original packaging file to upgrade in different service ends.After the original packaging file of service end upgraded, corresponding local packaging file also needed corresponding renewal, if from the original packaging file after service end down loading updating again, has greatly wasted flow, and has extended update time.Therefore, need a kind of simple method, fast, accurately, as one man the original packaging file on service end is upgraded, and can to local packaging file, carry out consistent update simply, easily.
Summary of the invention
For addressing the above problem, the object of the present invention is to provide a kind of method and system of packaging file being upgraded by agreement, quickly and easily the original packaging file of service end upgraded, and, when local packaging file need to upgrade, quickly and easily local packaging file is upgraded.
The present invention solves the technical scheme that its problem adopts:
A kind of by agreement to the method that packaging file upgrades, comprising:
Service end reads transaction file successively, and, according to the transaction file that reads, generates accordingly more New Deal;
Service end is carried out more New Deal, and the original packaging file of service end is upgraded.
Described method also comprises:
Before service end reads transaction file successively, by service end, load original packaging file.
Described method also comprises:
Client downloads is New Deal more, and carries out more New Deal local packaging file is upgraded.
Described transaction file comprises newly-increased data file and deleted file list.
Wherein, for described newly-increased data file, service end reads each newly-increased data file successively, after reading at every turn, from original packaging file, searching a vacant locations more than or equal to this newly-increased data file size, and a newly-increased data protocol corresponding according to this vacant locations Information generation.
Described newly-increased data protocol comprises from the data content of size of data and the corresponding newly-increased data file of the data address of the vacant locations that finds corresponding newly-increased data file original packaging file, corresponding newly-increased data file.
Wherein, for described deleted file list, service end reads the path of the deleted file in the deleted file list successively or/and unique identifier, and address and the size of in original packaging file, searching corresponding deleted file, generates corresponding deletion data protocol.
After described generation is deleted data protocol accordingly, according to the deletion data protocol that generates, generate corresponding to removing the Mobile data agreement of deletion vacant locations that data protocol produces.
Described Mobile data agreement comprises the size of data of the data address of described deleted file in original packaging file, deleted file and moves to the data address of the new file of deletion vacant locations that data protocol produces.
Described deletion data protocol comprises the data address of service end finds in original packaging file deleted file and the size of the corresponding deleted file that finds in original packaging file.
A kind of by agreement to the system that packaging file upgrades, comprising:
The protocol generation module, for from service end, reading successively transaction file, and, according to the transaction file that reads, generate accordingly more New Deal;
The agreement Executive Module, for from service end, carrying out more New Deal, upgrade the original packaging file of service end.
Described system also comprises:
Load-on module, before in service end, reading transaction file successively, load original packaging file by service end.
Described system also comprises:
Update module, for passing through more New Deal of client downloads, and carry out more New Deal local packaging file upgraded.
Described transaction file comprises newly-increased data file and deleted file list.
Wherein, for described newly-increased data file, service end reads each newly-increased data file successively, after reading at every turn, from original packaging file, searching a vacant locations more than or equal to this newly-increased data file size, and a newly-increased data protocol corresponding according to this vacant locations Information generation.
Described newly-increased data protocol comprises from the data content of size of data and the corresponding newly-increased data file of the data address of the vacant locations that finds corresponding newly-increased data file original packaging file, corresponding newly-increased data file.
Wherein, for described deleted file list, service end reads the path of the deleted file in the deleted file list successively or/and unique identifier, and address and the size of in original packaging file, searching corresponding deleted file, generates corresponding deletion data protocol.
After described generation is deleted data protocol accordingly, according to this deletion data protocol, generate corresponding to removing the Mobile data agreement of deletion vacant locations that data protocol produces.
Described Mobile data agreement comprises the size of data of the data address of described deleted file in original packaging file, deleted file and moves to the data address of the new file of deletion vacant locations that data protocol produces.
Described deletion data protocol comprises the data address of service end finds in original packaging file deleted file and the size of the corresponding deleted file that finds in original packaging file.
The invention has the beneficial effects as follows:
the present invention adopts a kind of method and system of packaging file being upgraded by agreement, service end is after loading original packaging file, read transaction file, generate more New Deal, by service end, according to New Deal more, carried on an agreement again, packaging file is upgraded, complete simply and easily comprise newly-increased, deletion, mobile in interior complex operations, the consistency that keeps exactly simultaneously service end to upgrade, client is after the down loading updating agreement, according to this agreement, also can facilitate, quickly local packaging file is upgraded, and with the renewal of corresponding with service end, be consistent accurately.
The accompanying drawing explanation
The invention will be further described below in conjunction with accompanying drawing and example.
Fig. 1 is renewal protocol generation of the present invention and carries out schematic diagram;
Fig. 2 is renewal protocol generation flow chart of the present invention;
Fig. 3 is more New Deal flowchart of the present invention;
Fig. 4 is the data structure schematic diagram of more New Deal of the present invention;
Fig. 5 is the data structure schematic diagram of newly-increased data protocol of the present invention;
Fig. 6 is the data structure schematic diagram of deletion data protocol of the present invention;
Fig. 7 is the data structure schematic diagram of Mobile data agreement of the present invention;
Fig. 8 is the structure composition diagram of system of the present invention.
Embodiment
the present invention realizes the renewal to the original packaging file of service end and client terminal local packaging file in the mode of agreement, with reference to shown in 1, upgrading protocol generation and carrying out schematic diagram, renewal protocol generation program by service end loads original packaging file, the protocol generation program reads transaction file afterwards, described transaction file comprises the listed files that newly-increased data file and needs are deleted, upgrade protocol procedure and generate corresponding more New Deal according to the content of transaction file, service end can initiatively be carried out this more New Deal, original packaging file is upgraded, client can be downloaded this more New Deal, and carry out this agreement local packaging file is upgraded.Wherein, upgrading the protocol generation program is be used to loading original packaging file and reading the program of transaction file.
Concrete renewal protocol generation flow process is with reference to shown in Figure 2, after upgrading the original packaging file of protocol generation program loading, read transaction file, the order that reads transaction file has determined the order of protocol generation, the present invention reads the deletion data file and describes as example first to read after newly-increased data file, when actual reading, can only read newly-increased data file or deletion data file, read newly-increased data file after also can first reading the deletion data file.Shown in figure, upgrade the protocol generation program and read successively newly-increased data file, while often reading a newly-increased data file, upgrade the protocol generation program from original packaging file, searching a vacant locations more than or equal to this newly-increased data file size, an and newly-increased data protocol corresponding according to this vacant locations Information generation, circulation is carried out, and up to all newly-increased data files, reads complete, the corresponding newly-increased data protocol that generates similar number.Afterwards, upgrade the protocol generation program and read successively the path of deleted file in the deleted file list or/and unique identifier, and address and the size of in original packaging file, searching corresponding deleted file, generate corresponding deletion data protocol, circulation is carried out, all deleted files in the deleted file list read complete, and described unique identifier refers to the unique identification of this deleted file of table, as the cryptographic Hash of file.After carrying out the deletion data protocol, in original packaging file or local packaging file, can generate corresponding vacant locations, for removing these vacant locations, upgrading the protocol generation program can generate corresponding Mobile data agreement according to the deletion data protocol, be used to removing after the deletion data protocol is carried out the vacant locations that produces.For generation and the execution that facilitates agreement, upgrade the protocol generation program and generally in the end generate the Mobile data agreement, namely after generating all newly-increased data protocols and/or deletion data protocol.After generating all more New Deals, upgrade the protocol generation program by this more New Deal output, so that this New Deal more of service end or client executing.
After upgrading protocol generation, will be to this more New Deal carry out, particular flow sheet is with reference to shown in Figure 3, when carrying out, service end can automatically perform after New Deal generating more, client can connect with service end, from service end, downloads this more New Deal, and this more automatically performs after New Deal in download, when carrying out, no matter be in client or service end, the step of execution is identical, specifically as shown in FIG..During beginning, by service end, load original packaging file and New Deal or load local packaging file and New Deal more by client more, afterwards, service end or client read successively every agreement and carry out this agreement and complete corresponding operation, after all agreements read and complete, export the packaging file after upgrading.
After described renewal protocol generation, its data data structure is with reference to shown in Figure 4, this more New Deal according to the difference of file reading, can only comprise newly-increased data protocol, can only comprise deletion data protocol and Mobile data agreement, also can comprise described three kinds of agreements.The present invention comprises that take file reading newly-increased data file and deletion data file are as example, and corresponding more New Deal comprises above three kinds of agreements, wherein, and ADD -DATA represents newly-increased data protocol, its concrete data structure is with reference to shown in Figure 5, and newly-increased data protocol comprises from the data content of size of data and the corresponding newly-increased data file of the data address of the vacant locations that finds corresponding newly-increased data file original packaging file, corresponding newly-increased data file.DELETE -DATA represents to delete data protocol, its concrete data structure is with reference to shown in Figure 6, and described deletion data protocol comprises the data address of service end finds in original packaging file deleted file and the size of the corresponding deleted file that finds in original packaging file.MOVE -DATA represents the Mobile data agreement, its concrete data structure is with reference to shown in Figure 7, and described Mobile data agreement comprises the size of data of (former) data address in original packaging file of deleted file, deleted file and need to move to (newly) data address of the new file of deletion vacant locations that data protocol produces.
By the agreement implementation, can to packaging file, operate easily, comprise newly-increased file, deleted file etc., simultaneously, and if while having different service ends that identical download is provided, the consistency that can keep service end to upgrade; Client is when upgrading, only need the down loading updating agreement to get final product, client is according to the needs that upgrade, can when having the protocol generation of renewal at every turn, service end upgrade, also can generate the some groups of more laggard row renewals of New Deal in service end, during renewal, need not download whole packaging file, thereby reduce flow, save time, the while also can guarantee once or the several times renewal is rear and the consistency of service end.
With reference to shown in Figure 8, the invention provides a kind of system of the present invention that realizes, comprise load-on module, protocol generation module, agreement Executive Module and update module, described load-on module is for loading original packaging file by service end; Described protocol generation module also generates accordingly more New Deal for by service end, reading transaction file, and described transaction file comprises newly-increased data file and deleted file list; Described agreement Executive Module upgrades original packaging file for the more New Deal of carrying out generation; Described update module is for for by client downloads New Deal more, and carries out more New Deal local packaging file is upgraded.It is described with reference to above method that described protocol generation module generates the concrete steps of New Deal more, the concrete execution step of described agreement Executive Module is described with reference to above method, the described content of the step of updating above method of reference that update module is concrete, the present invention does not repeat them here.
The above, be preferred embodiment of the present invention, and the present invention is not limited to above-mentioned execution mode, 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 (20)

  1. One kind by agreement to the method that packaging file upgrades, it is characterized in that, comprising:
    Service end reads transaction file successively, and, according to the transaction file that reads, generates accordingly more New Deal;
    Service end is carried out more New Deal, and the original packaging file of service end is upgraded.
  2. According to claim 1 a kind of by agreement to the method that packaging file upgrades, it is characterized in that, described method also comprises:
    Before service end reads transaction file successively, by service end, load original packaging file.
  3. According to claim 1 a kind of by agreement to the method that packaging file upgrades, it is characterized in that, described method also comprises:
    Client downloads is New Deal more, and carries out more New Deal local packaging file is upgraded.
  4. According to claim 1 a kind of by agreement to the method that packaging file upgrades, it is characterized in that, described transaction file comprises newly-increased data file and deleted file list.
  5. 5. a kind of method of packaging file being upgraded by agreement according to claim 4, it is characterized in that, for described newly-increased data file, service end reads each newly-increased data file successively, after reading at every turn, from original packaging file, searching a vacant locations more than or equal to this newly-increased data file size, and a newly-increased data protocol corresponding according to this vacant locations Information generation.
  6. 6. a kind of method of packaging file being upgraded by agreement according to claim 5, it is characterized in that, described newly-increased data protocol comprises from the data content of size of data and the corresponding newly-increased data file of the data address of the vacant locations that finds corresponding newly-increased data file original packaging file, corresponding newly-increased data file.
  7. 7. a kind of method of packaging file being upgraded by agreement according to claim 4, it is characterized in that, for described deleted file list, service end reads the path of the deleted file in the deleted file list successively or/and unique identifier, and data address and the size of data of in original packaging file, searching corresponding deleted file, generate corresponding deletion data protocol.
  8. 8. a kind of method of packaging file being upgraded by agreement according to claim 7, it is characterized in that, after described generation is deleted data protocol accordingly, according to the deletion data protocol that generates, generate corresponding to removing the Mobile data agreement of deletion vacant locations that data protocol produces.
  9. 9. a kind of method of packaging file being upgraded by agreement according to claim 8, it is characterized in that, described Mobile data agreement comprises the size of data of the data address of described deleted file in original packaging file, deleted file and moves to the data address of the new file of deletion vacant locations that data protocol produces.
  10. 10. a kind of method of packaging file being upgraded by agreement according to claim 7, it is characterized in that, described deletion data protocol comprises the data address of service end finds in original packaging file deleted file and the size of the corresponding deleted file that finds in original packaging file.
  11. 11. one kind by agreement to the system that packaging file upgrades, it is characterized in that, comprising:
    The protocol generation module, for from service end, reading successively transaction file, and, according to the transaction file that reads, generate accordingly more New Deal;
    The agreement Executive Module, for from service end, carrying out more New Deal, upgrade the original packaging file of service end.
  12. 12. according to claim 11 a kind of by agreement to the system that packaging file upgrades, it is characterized in that, described system also comprises:
    Load-on module, before in service end, reading transaction file successively, load original packaging file by service end.
  13. 13. according to claim 11 a kind of by agreement to the system that packaging file upgrades, it is characterized in that, described system also comprises:
    Update module, for passing through more New Deal of client downloads, and carry out more New Deal local packaging file upgraded.
  14. 14. according to claim 11 a kind of by agreement to the system that packaging file upgrades, it is characterized in that, described transaction file comprises newly-increased data file and deleted file list.
  15. 15. a kind of system of packaging file being upgraded by agreement according to claim 14, it is characterized in that, for described newly-increased data file, service end reads each newly-increased data file successively, after reading at every turn, from original packaging file, searching a vacant locations more than or equal to this newly-increased data file size, and a newly-increased data protocol corresponding according to this vacant locations Information generation.
  16. 16. a kind of system of packaging file being upgraded by agreement according to claim 15, it is characterized in that, described newly-increased data protocol comprises from the data content of size of data and the corresponding newly-increased data file of the data address of the vacant locations that finds corresponding newly-increased data file original packaging file, corresponding newly-increased data file.
  17. 17. a kind of system of packaging file being upgraded by agreement according to claim 14, it is characterized in that, for described deleted file list, service end reads the path of the deleted file in the deleted file list successively or/and unique identifier, and address and the size of in original packaging file, searching corresponding deleted file, generate corresponding deletion data protocol.
  18. 18. a kind of system of packaging file being upgraded by agreement according to claim 17, it is characterized in that, after described generation is deleted data protocol accordingly, according to this deletion data protocol, generate corresponding to removing the Mobile data agreement of deletion vacant locations that data protocol produces.
  19. 19. a kind of system of packaging file being upgraded by agreement according to claim 18, it is characterized in that, described Mobile data agreement comprises the size of data of the data address of described deleted file in original packaging file, deleted file and moves to the data address of the new file of deletion vacant locations that data protocol produces.
  20. 20. a kind of system of packaging file being upgraded by agreement according to claim 17, it is characterized in that, described deletion data protocol comprises the data address of service end finds in original packaging file deleted file and the size of the corresponding deleted file that finds in original packaging file.
CN2013103276625A 2013-07-31 2013-07-31 Method and system for updating package file by virtue of protocols Pending CN103401867A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013103276625A CN103401867A (en) 2013-07-31 2013-07-31 Method and system for updating package file by virtue of protocols

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013103276625A CN103401867A (en) 2013-07-31 2013-07-31 Method and system for updating package file by virtue of protocols

Publications (1)

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

Family

ID=49565393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013103276625A Pending CN103401867A (en) 2013-07-31 2013-07-31 Method and system for updating package file by virtue of protocols

Country Status (1)

Country Link
CN (1) CN103401867A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446759A (en) * 2014-08-28 2016-03-30 阿里巴巴集团控股有限公司 Rpm package updating method and equipment
CN110351321A (en) * 2018-04-08 2019-10-18 上海擎感智能科技有限公司 Data interactive method, data interaction system and electric terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744603A (en) * 2004-07-19 2006-03-08 微软公司 Remote file updates through remote protocol
CN101017435A (en) * 2006-04-14 2007-08-15 北京瑞星国际软件有限公司 Method and apparatus used for upgrading software
CN102238142A (en) * 2010-04-23 2011-11-09 英业达集团(天津)电子技术有限公司 File transport control method for computer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744603A (en) * 2004-07-19 2006-03-08 微软公司 Remote file updates through remote protocol
CN101017435A (en) * 2006-04-14 2007-08-15 北京瑞星国际软件有限公司 Method and apparatus used for upgrading software
CN102238142A (en) * 2010-04-23 2011-11-09 英业达集团(天津)电子技术有限公司 File transport control method for computer

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446759A (en) * 2014-08-28 2016-03-30 阿里巴巴集团控股有限公司 Rpm package updating method and equipment
CN110351321A (en) * 2018-04-08 2019-10-18 上海擎感智能科技有限公司 Data interactive method, data interaction system and electric terminal

Similar Documents

Publication Publication Date Title
CN103942058B (en) A kind of EMBEDDED AVIONICS method for upgrading software and system
WO2016192197A1 (en) Software upgrade method, apparatus and system of terminal, and computer storage medium
CN104820602A (en) Method, device and system for publishing software package
CN105867973A (en) Loading method and system for so file in application program
CN105511911A (en) System firmware upgrade package generation method and device
CN104866307A (en) Application repairing method and apparatus
CN106897103B (en) Method for quickly and thermally updating version of mobile terminal network game
CN102289382B (en) TV software update method, Apparatus and system
CN110543324B (en) Plug-in increment updating method and device for application program
CN110389766B (en) HBase container cluster deployment method, system, equipment and computer readable storage medium
CN106371875B (en) Mobile phone application updating method based on HTML5
CN109101244B (en) Integrated automatic packaging method for ios system
CN110333876A (en) A kind of data clearing method and control equipment
CN108415714A (en) The method for upgrading system and device of mobile terminal
CN105468395A (en) Updating method, device and system
CN113064630B (en) Mobile terminal APP automatic packaging method, system, electronic equipment and storage medium
CN104461621A (en) Attribute information updating method and device
CN105740298A (en) File processing method and apparatus, and server-side equipment
CN108170459B (en) Software upgrading method, intelligent terminal and device with storage function
CN103401867A (en) Method and system for updating package file by virtue of protocols
CN110659165A (en) Multi-node server automatic testing method and device
CN114564227A (en) Application program updating method and device, electronic equipment and storage medium
CN110750286A (en) Management method, device, system, equipment and medium for upgrading Mbn through OTA
CN100417095C (en) Method and system for realizing network management and network element configuration operation
CN112764874B (en) Virtual machine server information acquisition method based on CMDB configuration management system

Legal Events

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

Application publication date: 20131120