CN103136013B - Method for upgrading software and system - Google Patents

Method for upgrading software and system Download PDF

Info

Publication number
CN103136013B
CN103136013B CN201110392461.4A CN201110392461A CN103136013B CN 103136013 B CN103136013 B CN 103136013B CN 201110392461 A CN201110392461 A CN 201110392461A CN 103136013 B CN103136013 B CN 103136013B
Authority
CN
China
Prior art keywords
file
software
information
upgraded
module
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.)
Active
Application number
CN201110392461.4A
Other languages
Chinese (zh)
Other versions
CN103136013A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Filing date
Publication date
Priority to CN201110392461.4A priority Critical patent/CN103136013B/en
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to SG11201401480QA priority patent/SG11201401480QA/en
Priority to IN4930CHN2014 priority patent/IN2014CN04930A/en
Priority to US14/354,405 priority patent/US9043778B2/en
Priority to BR112014012772A priority patent/BR112014012772A8/en
Priority to RU2014126337/08A priority patent/RU2580065C2/en
Priority to PCT/CN2012/084721 priority patent/WO2013078951A1/en
Publication of CN103136013A publication Critical patent/CN103136013A/en
Application granted granted Critical
Publication of CN103136013B publication Critical patent/CN103136013B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of method for upgrading software and system, including: user end to server reports software upgrading to ask, and carries the fileinfo of local software to be upgraded in this upgrade request;Server determines and the difference of latest edition software according to the fileinfo of the software to be upgraded in upgrade request, generates upgrading command information according to software differences and is handed down to client;Client is according to the instruction down loading updating corresponding document in the upgrading command information received and performs corresponding local upgrade operation.Utilize the present invention, bandwidth resources can be saved and reduce the workload of software upgrading.

Description

Method for upgrading software and system
Technical field
The present invention relates to the software processing technology field of data handling equipment, particularly relate to a kind of software upgrading Method and system.
Background technology
The method for upgrading software of existing data handling equipment (such as computer, smart mobile phone etc.) generally has Two kinds, a kind of is upgrading mode based on installation kit, and another kind is upgrading mode based on cab AKU.
Described upgrading mode based on installation kit is the simplest, it is simply that download from a server a brand-new peace Dress bag, to be downloaded complete after start it, installation kit can complete the installation of the unloading to legacy version and redaction Work.
The shortcoming of this upgrading mode based on installation kit is: bandwidth waste is serious, even one little Function is changed, it is also desirable to user downloads the installation kit of several million (M) the most up to a hundred Mbytes, most The file being not changed in also can not caused bandwidth waste by together downloading and replace.
Described mode based on cab AKU is more targeted, and described cab AKU is a kind of Microsoft The compressed package of WINDOWS operating system, including upgrade file.In this fashion, simply will The version x of software to the differential file between version y according to the reference format (cab form) of operating system Carrying out packing and obtain cab AKU, this cab AKU is set downloading to user this locality by program to be upgraded Standby this cab AKU of rear startup, cab AKU can complete to refer to according to its internal upgrade logic and file Determine renewal and the operation of file, thus realize the upgrading of software version.
But the shortcoming of this upgrading mode based on cab AKU is: increasing of the version quantity of software The workload making cab AKU can be caused to increase sharply.Such as, if the current version number of product is M, and the minimal version number supported in operating environment is n, that means that and has under current operating environment M-n different version is being used by a user simultaneously, then using this upgrading mode to mean that needs To be this m-n different version customized different cab AKU respectively, and rise every time Level is all such, and the workload therefore making multi version cab AKU is the hugest, causes safeguarding The cost of software upgrading is greatly increased.
Summary of the invention
In view of this, present invention is primarily targeted at a kind of method for upgrading software of offer and system, to save Bandwidth resources and the workload of reduction software upgrading.
The technical scheme is that and be achieved in that:
A kind of method for upgrading software, including:
User end to server reports software upgrading to ask, and carries local software to be upgraded in this upgrade request Fileinfo;
Server determines and the difference of latest edition software according to the fileinfo of the software to be upgraded in upgrade request Different, generate upgrading command information according to software differences and be handed down to client;
Client is according to the instruction down loading updating corresponding document in the upgrading command information received and performs corresponding Local upgrade operates.
A kind of software update system, including:
Upgraded module in the client is set, carries local software document to be upgraded for reporting to server The software upgrading request of information, and according to the instruction down loading updating phase in the upgrading command information of server return Answer file and perform corresponding local upgrade operation;
It is arranged on the upgrade service module of server, for receiving what the described upgraded module in client sent Upgrade request, and determine and latest edition software according to the fileinfo of the software to be upgraded in this upgrade request Difference, generate upgrading command information according to software differences and be handed down to the upgraded module of client.
Compared with prior art, the essence of the present invention is the process logic in cab bag to move to data process set In the upgraded module of standby client, and determined and latest edition according to the fileinfo of software to be upgraded by server The difference of this software, dynamically generates upgrading command information and is handed down to the upgrading mould of client according to software differences Block;Upgraded module according to the upgrade command that server issues complete the download of file, renewal and delete, Registration com component etc. needs the operation that cab bag performs in the prior art.So server and client side it Between mutual information few, saved bandwidth resources, can also evade falling simultaneously and originally make cab bag by hand Work, transfers to by upgrade server according to the version situation dynamic organization upgrade command of user, thus reduces The workload of software upgrading, and then reduce the operation cost safeguarding software update system.
Accompanying drawing explanation
Fig. 1 is a kind of flow chart of method for upgrading software of the present invention;
Fig. 2 is a kind of schematic diagram merged by the operational order collection found of the present invention;
Fig. 3 is that a kind of of client upgraded module in the method for the invention performs flow chart;
Fig. 4 is that a kind of of software update system of the present invention constitutes schematic diagram;
Fig. 5 is a kind of composition schematic diagram of the described upgrade service module of server end;
Fig. 6 is a kind of composition schematic diagram of the described upgraded module of client.
Detailed description of the invention
Below in conjunction with the accompanying drawings and specific embodiment the present invention is further described in more detail.
Fig. 1 is a kind of flow chart of method for upgrading software of the present invention.Seeing Fig. 1, this flow process includes:
Step 101, user end to server report software upgrading to ask, and carry this locality in this upgrade request The fileinfo of software to be upgraded.
Step 102, server determine with up-to-date according to the fileinfo of the software to be upgraded in upgrade request The difference of version software, generates upgrading command information according to software differences and is handed down to client.
Step 103, client are according to the instruction down loading updating corresponding document in the upgrading command information received And perform corresponding local upgrade operation.
Described client may refer to central processing unit (CPU), internal memory and operating system and provides soft The software run in the calculating system of part running environment, the described typical example of calculating system is desk-top calculating Handheld devices such as machine, notebook computer, panel computer and the smart mobile phone with computing capability and have meter The robot device etc. of calculation ability.The operation of client-side described in the method for the invention is waited to rise by this locality The upgraded module that level software is corresponding performs, and this upgraded module is also a software program, can after it starts With operate in one with in the process of software independence to be upgraded.
Fileinfo in the upgrade request that described upgraded module in described client sends mainly includes treating The filename of each file and version information included in upgrading software, it is also possible to farther include each literary composition The information such as the HASH value of part and relative path.Described server after receiving described upgrade request, according to Dbase to be upgraded in this upgrade request searches the latest edition number of this software, according to described each file Filename and version information contrast with latest edition software, determine file difference and difference in version; Then illustrate need not software of upgrading without difference, now return the instruction that need not upgrading to client, Described upgraded module stops updating operation after receiving this instruction;If it is variant, then further according to software version Difference dynamically generates upgrading command information.
Described server according to software version difference dynamically generate the concrete grammar of upgrading command information include as Lower step 11) to 13):
11) the newly-increased file in latest edition software and change file are searched according to described file difference, will The inventory information of described newly-increased file and change file forms lists of documents information to be updated.
The current version that described lists of documents information to be updated contains from upgrade request is upgraded to latest edition In this time, needs the listed files increasing newly, revise and replacing, and each file comprises the description information of file, Such as filename, relative path, file size and MD5 check value etc..
Herein, can be by server for the mapping of one All Files latest edition of software maintenance to be upgraded Table, a kind of example for this mapping table as shown in table 1 below.
Filename Relative path Size Last revision
AAA.dll %INSTALL_DIR%/BIN 2513 20532
BBB.dll %INSTALL_DIR%/BIN 4732 20476
CCC.png %INSTALL_DIR%/RES 1004 20587
DDD.bmp %INSTALL_DIR%/RES 1313 20476
Table 1
As shown in table 1, described mapping table includes latest edition clear of All Files of software to be upgraded Single information, each file inventory information at least includes that filename, download path information, relative path are believed Breath.In above-mentioned table 1, owing to the All Files of same software is stored in that this software is corresponding by server Under individual unified catalogue, and the relative path under this catalogue and this software installation directory in the client Under relative path completely the same, therefore described in table 1, relative path can represent its download path, only To unify plus this software catalogue on the server before relative path, the most in Table 1 Only maintain relative path, as long as the address incidentally going up catalogue just can be added obtains download path information. Certainly, can also include absolute download path information in table 1, client need not add directory address, can Corresponding document is downloaded with the download path information absolute from this.It addition, the lists of documents in described mapping table In information, (width at table is limited, and does not has in Table 1 for file size to be included, MD5 check value Embody) etc. and last revision information.
After server receives upgrade request, server is then with the software to be upgraded carried in upgrade request Current file inventory filters above-mentioned mapping table, the newly-increased file in latest edition software and change file is protected Stay the inventory being organized into a file to be updated.Described newly-increased file is exactly client software to be upgraded The file not having;Described change file is exactly the file having same file name in client software to be updated, But the version information of file is different from latest edition, illustrates that its content there occurs change, need client File of the same name in the software to be upgraded of end is modified.
12) all version numbers are searched higher than the letter of version described in described upgrade request according to described difference in version The operational order collection of the software described to be upgraded of breath, and merge found operational order collection.
In the present invention, more new capital of each software version may be attended by an operational order collection, once Edition upgrading may have some such operational orders, so eventually organizing with the form of set. Each the operational order that described operational order is concentrated includes: local client discernible operational order name The relative path of the file destination of title and this instruction respective operations and file name information, it is also possible to enter one Step includes the auxiliary program title processing file destination.As shown in table 2 below for operational order collection Example, for convenience of explanation, further comprises the description of use to each operational order in table 2.
Table 2
In server, the more new capital for each software version may be attended by an operational order collection, often One operational order collection has a version number.Server, after receiving upgrade request, searches software to be upgraded All version numbers, higher than the operational order collection of version number described in described upgrade request, finally return that to upgrading The instruction set found to be merged by the instruction set of module.Fig. 2 is of the present invention will to find A kind of schematic diagram that operational order collection merges.As illustrated in fig. 2, it is assumed that higher than described in upgrade request The operational order of version number integrates as the operational order collection 201 that version number (version) is 20476 and version Number it is the operational order collection 202 of 20532, then merges the two operational order collection, obtain final instruction Collection 203.
13) using the described operational order collection after described renewal lists of documents information and merging as described upgrading Command information.
Described upgrading command information is finally carried out tissue in xml format and obtains a tables of data by server It is handed down to the upgraded module of client.This XML data table mainly comprises " renewal lists of documents ", " behaviour Make instruction set " and some other additional information.The most described server also further searches for described The functional circuit information of the latest edition of software to be upgraded, doses described upgrading by this functional circuit information In command information.Described functional circuit information illustrates for the New function bringing user to this upgrading, Comprise some and describe information and preview picture, in order to the effect that this most just can be upgraded by user There is a understanding.
Shown in the following xml code of content of the upgrade command table of one typical XML format:
In upgrade-system of the present invention, the operation that setting upgraded module in the client performs is main Including: report the software upgrading request of local software version information to be upgraded of carrying to server, according to clothes Instruction in the upgrading command information that business device returns is downloaded file and updates the corresponding document of this locality, Yi Jigen Corresponding local upgrade operation is performed according to described upgrade command.
Fig. 3 is that a kind of of client upgraded module in the method for the invention performs flow chart.See Fig. 3, This flow process includes:
Step 301, upgraded module and the server interaction of client determine whether to, from upgrading, i.e. judge Whether server has the upgraded module than local update version, if it is downloads the upgraded module of redaction File and replace local original upgraded module file, and restart redaction upgraded module perform Next step 302;The most directly perform next step 302.
Owing to upgraded module itself is simplified very much, it quantity of documents included the most all is controlled at 1 to 2 Within, so self escalation process of whole upgraded module is very simple and quick.Certainly this step 301 For optional step, it is also possible to skip this step, directly perform step 302.
Step 302, upgraded module and server interaction judge whether to need software of upgrading, i.e. to server Report software upgrading to ask, this upgrade request is carried the fileinfo of local software to be upgraded, wherein wraps Include filename and the version information of each file included in this software to be upgraded, it is also possible to farther include The information such as the HASH value of each file and relative path, server according to the filename of described each file and Version information contrasts with latest edition software, determines file difference and difference in version, if variant Then server is according to method described above, dynamically generates described upgrade command letter according to software version difference Cease and be handed down to the upgraded module of client, and perform next step 303;Without software differences then Notify the upgraded module upgrading failure of client and exit this flow process.
Step 303, described upgrading command information include lists of documents to be updated, and each file is clear Single information includes filename, download path information, relative path information, and therefore upgraded module can basis File download routing information in described lists of documents to be updated downloads corresponding file.
If it addition, described upgrading command information includes the functional circuit information of new version software, then institute State client after receiving described upgrading command information, before this step 303, farther include: display The functional circuit information comprised in described upgrading command information, in order to user the most just can be to this The effect of upgrading has a understanding.
Step 304, according to the relative path information in lists of documents to be updated, the file of download is updated Under the described relative path of local software installation directory to be upgraded.This step 304 is referred to as legacy version With the merging of redaction differential file, the new file that will download to is substituted into software installation directory to be upgraded Under legacy version file.
Under many circumstances, file destination to be replaced temporarily may cannot revise or replace (as by Antivirus software scans, or is used by certain process), that is accomplished by carrying out comprehensive to these situations Security mechanism ensure because each program file of software to be upgraded is the most all complementary, If having a file not to be replaced successfully, it is most likely that to cause program again to run.So, this Invent and done following two Security Assurance Mechanism for this problem:
A) before performing merging (i.e. the updating file) operation of file, it is judged that software to be upgraded is the most transported OK, running if had, then prompting user closes this software, updates corresponding document again, otherwise after closedown Directly update corresponding document.Upgraded module of the present invention and software to be upgraded operate in two processes, Close software to be upgraded will not current upgraded module be impacted.
B) before Piece file mergence, the original to be updated that backup is local, legacy version file that will be to be replaced Backup to, under a temp directory, carry out file renewal afterwards.If renewal process is found to have some File updates unsuccessfully, then judge whether this file have to be updated successfully, and this literary composition is if it is described Part is indispensable to the properly functioning of program, it is necessary to all the most updated with the reduction of described backup file File.The purpose of do so is to ensure that " although upgrading unsuccessfully, but legacy version still can run ". And if this file is not necessarily meant to be replaced successfully, then the up-to-date download file of this document can be noted Volume restarting in replacement service to operating system (such as WINDOWS system), starts when system reboot Replacement service updates this document.Specifically how to judge whether described file have to be replaced successfully, then may be used To judge, in this case according to " critical file (key the file) " field updated in lists of documents Need server when generating renewal lists of documents, the description information of each file also needs to include one " critical file " field, is used for identifying whether this document is the most whether critical file must be replaced successfully, Such as: most bottom assemblies are that program is run necessary, will by as key file, and if Extended resources bag and plug-in unit etc., then do not result in the biggest impact to the properly functioning of whole system, the most not It is used as key file.Client judges " critical file " of this document when certain file updates unsuccessfully Field, if critical file then judges to be replaced successfully, is otherwise not necessary to the literary composition being replaced successfully Part.
Step 305, complete Piece file mergence after, also will be according to the operational order in described upgrading command information Collection performs corresponding local upgrade operation.
Each the operational order that described operational order is concentrated includes: the discernible operation of local client refers to Make relative path and the file name information of the file destination of title and this instruction respective operations.Described liter Level module, for each operational order, is searched from the described relative path of software installation directory to be upgraded To the file destination identical with this operational order indication filename, and this file destination is performed described operation The operation that instruction name is corresponding.Such as certain com component in listed files is registered, deleted Certain file destination of routine processes specified in certain file destination, employing operational order etc..
In actual application, due to directly issue complete file can unusual occupied bandwidth because one The file of individual a few M size probably due to the amendment of little bit will allow the whole file of client downloads, this Sample is not only lost time but also waste the network bandwidth, so the present invention can also realize a kind of saving bandwidth and file The embodiment of download time.
In this embodiment, in the fileinfo in the upgrade request that described client sends Farther include the HASH value of each file;Further, described server is in finding out latest edition software Change file after, according to the filename of this change file find in described upgrade request correspondence file HASH value, identical with this HASH value original further according to the inquiry server end storage of this HASH value File, carries out binary system contrast by the file of the same name of this original document Yu latest edition, generates binary difference Different article part, replaces in described lists of documents to be updated by the download path information of this binary system differential file The download path information of file of the same name, the i.e. information of this renewal file include: filename, binary system difference The download path information of file, relative path information etc..
Described binary system differential file is commonly referred to diff file, and the volume of this diff file is the least, wherein Describing needs to carry out legacy version file the other additions and deletions of which binary level and changes operation and generate a new edition This file.At x, such as delete the data of 2 byte, at y except the data etc. of 3 byte of amendment Deng.As to how the file of the same name of this original document Yu latest edition to be carried out binary system contrast, generate two System differential file can use existing technological means, such as in LINUX operating system, permissible Diff operational order is used to generate the binary system differential file of two files.Further, since server end The time cost generating a diff file is higher, so the diff file generated and original document HASH value can store, when receiving upgrade request next time, and can be according to the HASH of file Value directly finds the diff file of correspondence, and is directly substituted into be updated by the download path of diff file In the inventory of file, it is not necessary to regenerate biff file.
Described client downloads to according to the download path information in described lists of documents information to be updated accordingly Binary system differential file after, according to corresponding relative path information, further by local software to be upgraded File of the same name under the described relative path of installation directory merges with described binary system differential file, from And produce complete new file.As to how merge binary system differential file equally use existing skill Art means, repeat no more herein.
In above-described embodiment, for only have modified the file of content, it is corresponding that client can only download it Binary system differential file, and this binary system differential file is the least, thus save bandwidth resources and The download time of file.
Corresponding with said method, the invention also discloses a kind of software update system, be used for performing the present invention Described method.Fig. 4 is that a kind of of software update system of the present invention constitutes schematic diagram.See Fig. 4, This software update system includes:
Upgraded module 401 in the client is set, for report to server carry local to be upgraded soft The software upgrading request of part fileinfo, and according under the instruction in the upgrading command information of server return Carry and update corresponding document and perform corresponding local upgrade operation;
It is arranged on the upgrade service module 402 of server, for receiving the described upgraded module in client 401 send upgrade request, and according to the fileinfo of the software to be upgraded in this upgrade request determine with The difference of latest edition software, generates upgrading command information according to software differences and is handed down to the liter of client Level module 401.
Fig. 5 is a kind of composition schematic diagram of the described upgrade service module of server end.It is shown in Figure 5, In a kind of specific embodiment, the described upgrade service module 402 of server end specifically includes:
Difference in version determines module 421, soft with latest edition for the version information according to described each file Part contrasts, and determines file difference and difference in version;
File to be updated determines module 422, for searching in latest edition software according to described file difference Newly-increased file and change file, by described newly-increased file and change file inventory information composition to be updated Lists of documents information;Described lists of documents information to be updated at least includes: the download of each file to be updated The information such as routing information, relative path;
Operational order determines module 423, for searching all version numbers higher than institute according to described difference in version State the operational order collection of the software to be upgraded of version information described in upgrade request, and merge and found Operational order collection;Each the operational order that described operational order is concentrated at least includes: local client can The operational order title identified and the relative path of file destination of this instruction respective operations and filename Information;
Upgrade command synthesis sending module 424, for by after described lists of documents information to be updated and merging Described operational order collection as described upgrading command information be handed down to initiate upgrade request upgraded module.
Further, described upgrade service module 402 can further include:
Describing information determination module 425, the function of the latest edition for searching described software to be upgraded is retouched State information, this functional circuit information is sent to upgrade command synthesis sending module 424;Described upgrading refers to This functional circuit information is dosed in described upgrading command information and is sent out by order synthesis sending module 424 further Give the client upgraded module initiating upgrade request.
Fig. 6 is a kind of composition schematic diagram of the described upgraded module of client.Shown in Figure 6, one Planting in specific embodiment, the described upgraded module 401 of client specifically includes:
From upgraded module 411, for, before reporting software upgrading request, first sentencing with server interaction Disconnected whether if it is to download the upgraded module file of redaction from upgrading, and with the liter of this redaction Level module file replaces former upgraded module file;Software upgrading is reported to ask the most again.
Inquiry upgraded module 412, carries local software version information to be upgraded for reporting to server Software upgrading is asked, and receives the upgrading command information that server returns.
File download module 413, for according to lists of documents information to be updated in described upgrading command information In file download path download corresponding file.
Differential file merges module 414, for according to described lists of documents information to be updated, by download File updates under the described relative path of local software installation directory to be upgraded.
Perform operation module 415, be used for for each operational order in described upgrading command information, Find same with file famous prime minister in this operational order from the described relative path of software installation directory to be upgraded File destination, and to this file destination perform described operational order.
In one embodiment, described differential file merges module 414 needs to implement further safety guarantee, This differential file i.e. may further include in merging module:
Close reminding module, for before updating corresponding document, it is judged that software to be upgraded is the most transported OK, if it is prompting user closes this software, updates corresponding document again, the most directly update after closedown Corresponding document.
Backup operation module, for before updating corresponding document, backs up local original to be updated, When a certain file updates unsuccessfully, it is judged that whether this document have to be updated successfully, if it is with described The all files being updated over of backup file reduction;Otherwise the up-to-date download file of this document is registered to behaviour Make system restart replacement service in, when system reboot start replacement service update this document.
In order to save further bandwidth resources and file download time, in another embodiment, treat more described in New file determines can also include binary system differential file generation module, at file to be updated in module After determining the change file that module searches goes out in latest edition software, exist according to the filename of this change file Described upgrade request is found the file HASH value of correspondence, inquires about server end further according to this HASH value The original document identical with this HASH value of storage, by the file of the same name of this original document Yu latest edition Carry out binary system contrast, generate binary system differential file, believe with the download path of this binary system differential file Breath replaces the download path information of the file of the same name in described lists of documents to be updated;
Corresponding, the differential file merging module of described client can further include binary difference Different merging module, for after the binary system differential file downloaded to, installs mesh by local software to be upgraded File of the same name under the described relative path of record merges with described binary system differential file.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all at this Within the spirit of invention and principle, any modification, equivalent substitution and improvement etc. done, should be included in Within the scope of protection of the invention.

Claims (13)

1. a method for upgrading software, it is characterised in that including:
User end to server reports software upgrading to ask, and carries local software to be upgraded in this upgrade request Fileinfo;
Server determines and the difference of latest edition software according to the fileinfo of the software to be upgraded in upgrade request Different, generate upgrading command information according to software differences and be handed down to client;Described upgrading command information includes Lists of documents to be updated;
Client is according to the instruction down loading updating corresponding document in the upgrading command information received and performs corresponding Local upgrade operates;
Described client is downloaded after corresponding document according to the instruction in the upgrading command information received, more cenotype Before answering file, farther include: the original to be updated that backup is local;Carry out file renewal afterwards;
When a certain file updates unsuccessfully, it is judged that whether this document have to be updated successfully, and if it is uses institute State the backup all files being updated over of file reduction;Otherwise the up-to-date download file of this document is registered to behaviour Make system restart replacement service in, when system reboot start replacement service update this document;
Server, when generating renewal lists of documents, also includes " a key in the description information of each file File " field, it is used for identifying whether this document is critical file;Client is when certain file updates unsuccessfully Judge " critical file " field of this document, if critical file then judges to be replaced successfully, no Then it is not necessarily meant to the file being replaced successfully.
Method the most according to claim 1, it is characterised in that the basis carried in described upgrade request The fileinfo of ground software to be upgraded includes: the filename of each file and version information;
Described server determines and latest edition software according to the fileinfo of the software to be upgraded in upgrade request Difference particularly as follows: filename and version information according to described each file contrast with latest edition software, Determine file difference and difference in version;
Described server generates upgrading command information according to software differences and specifically includes:
Search the newly-increased file in latest edition software and change file according to described file difference, by described newly The inventory information increasing file and change file forms lists of documents information to be updated;
All version numbers treating higher than version information described in described upgrade request is searched according to described difference in version The operational order collection of upgrading software, and merge found operational order collection;
Using the described operational order collection after described lists of documents information to be updated and merging as described upgrade command Information.
Method the most according to claim 2, it is characterised in that
Described server may further comprise: according to software differences generation upgrading command information and waits described in lookup to rise The functional circuit information of the latest edition of level software, doses described upgrade command by this functional circuit information and believes In breath;
Described client is after receiving described upgrading command information, down loading updating corresponding document perform corresponding Before local upgrade operation, farther include: show that the function comprised in described upgrading command information describes letter Breath.
Method the most according to claim 2, it is characterised in that described lists of documents information to be updated At least include: the download path information of each file to be updated, relative path;
Described client specifically includes according to the instruction down loading updating corresponding document in the upgrading command information received: Download under corresponding file, and general according to the file download routing information in described lists of documents information to be updated The file carried updates under the described relative path of local software installation directory to be upgraded.
Method the most according to claim 4, it is characterised in that the file letter in described upgrade request Breath farther includes the HASH value of each file;
After described server change file in finding out latest edition software, according to the literary composition of this change file Part name finds the file HASH value of correspondence in described upgrade request, further according to the inquiry service of this HASH value The original document identical with this HASH value of device end storage, by the literary composition of the same name of this original document Yu latest edition Part carries out binary system contrast, generates binary system differential file, believes with the download path of this binary system differential file Breath replaces the download path information of the file of the same name in described lists of documents to be updated;
Described client downloads to according to the download path information in described lists of documents information to be updated accordingly After binary system differential file, same by under the described relative path of local software installation directory to be upgraded further Name file merges with described binary system differential file.
Method the most according to claim 2, it is characterised in that
Each the operational order that described operational order is concentrated includes: the discernible operational order of local client The relative path of the file destination of title and this instruction respective operations and file name information;
Described client performs corresponding local upgrade operation tool according to the instruction in the upgrading command information received Body includes: for each operational order, searches from the described relative path of software installation directory to be upgraded To the file destination same with file famous prime minister in this operational order, and this file destination is performed described operational order.
Method the most according to claim 1, it is characterised in that client-side described in the method Operate the upgraded module by local software to be upgraded is corresponding to perform, and the method farther includes: described liter Level module after start-up, report software upgrading request before, first determine whether to server interaction from Upgrading, then downloads the upgraded module file of redaction when needing from upgrading, and with the upgrading mould of this redaction Block file replaces the original of self.
8. a software update system, it is characterised in that including:
Upgraded module in the client is set, carries local software document to be upgraded for reporting to server The software upgrading request of information, and according to the instruction down loading updating phase in the upgrading command information of server return Answer file and perform corresponding local upgrade operation;" closing of this document is judged when certain file updates unsuccessfully Keyed file " field, if critical file then judges to be replaced successfully, otherwise it is not necessarily meant to replace Successfully file;
It is arranged on the upgrade service module of server, for receiving what the described upgraded module in client sent Upgrade request, and determine and latest edition software according to the fileinfo of the software to be upgraded in this upgrade request Difference, generate upgrading command information according to software differences and be handed down to the upgraded module of client;Described liter Level command information includes lists of documents to be updated;When generating renewal lists of documents, the description letter of each file Breath also includes " critical file " field, is used for identifying whether this document is critical file;
Described upgraded module includes that differential file merges module, and described differential file merges module and includes backup behaviour Making module, for before updating corresponding document, the original to be updated that backup is local, at a certain file When updating unsuccessfully, it is judged that whether this document have to be updated successfully, if it is reduce with described backup file All files being updated over;Otherwise the up-to-date download file of this document is registered to restarting of operating system replace Change in service, when system reboot, start replacement service update this document.
System the most according to claim 8, it is characterised in that the basis carried in described upgrade request The fileinfo of ground software to be upgraded includes: the filename of each file and version information;
Described upgrade service module specifically includes:
Difference in version determines module, for carrying out with latest edition software according to the version information of described each file Contrast, determines file difference and difference in version;
File to be updated determines module, for searching increasing newly in latest edition software according to described file difference File and change file, form lists of documents to be updated by the inventory information of described newly-increased file and change file Information;
Operational order determines module, for searching all version numbers higher than described upgrading according to described difference in version The operational order collection of the software to be upgraded of version information described in request, and merge found operational order Collection;
Upgrade command synthesis sending module, for by described lists of documents information to be updated and merge after described in Operational order collection is handed down to initiate the upgraded module of upgrade request as described upgrading command information.
System the most according to claim 9, it is characterised in that described upgrade service module is further Including:
Information determination module is described, for searching the functional circuit information of the latest edition of described software to be upgraded, This functional circuit information is sent to upgrade command synthesis sending module;
This functional circuit information is dosed described upgrade command by described upgrade command synthesis sending module further Information is sent to initiate the upgraded module of upgrade request.
11. systems according to claim 9, it is characterised in that
Described lists of documents information to be updated at least includes: the download path information of each file to be updated, phase To path;
Each the operational order that described operational order is concentrated includes: the discernible operational order of local client The relative path of the file destination of title and this instruction respective operations and file name information;
Described upgraded module in client specifically includes:
File download module, for according to the file download routing information in described lists of documents information to be updated Download corresponding file;
Differential file merges module, is used for according to described lists of documents information to be updated, by the file of download more Under the new described relative path arriving local software installation directory to be upgraded;
Perform operation module, for for each the operational order received, from software installation directory to be upgraded Described relative path in find with file famous prime minister in this operational order with file destination, and to this target File performs described operational order.
12. systems according to claim 11, it is characterised in that described file to be updated determines mould Block includes binary system differential file generation module, for determining that module searches goes out latest edition at file to be updated After change file in this software, in described upgrade request, find correspondence according to the filename of this change file File HASH value, further according to this HASH value inquiry server end storage identical with this HASH value Original document, carries out binary system contrast by the file of the same name of this original document Yu latest edition, generates binary system Differential file, replaces in described lists of documents to be updated by the download path information of this binary system differential file The download path information of file of the same name;
The differential file of described client merges module and farther includes binary system difference merging module, is used for After the binary system differential file downloaded to, by under the described relative path of local software installation directory to be upgraded File of the same name merge with described binary system differential file.
13. systems according to claim 8, it is characterised in that the described upgraded module in client Include from upgraded module, for before reporting software upgrading request, first with server interaction judgement be No if it is to download the upgraded module file of redaction from upgrading, and with the upgraded module of this redaction Former upgraded module file replaced by file;Software upgrading is reported to ask the most again.
CN201110392461.4A 2011-12-01 2011-12-01 Method for upgrading software and system Active CN103136013B (en)

Priority Applications (7)

Application Number Priority Date Filing Date Title
CN201110392461.4A CN103136013B (en) 2011-12-01 Method for upgrading software and system
IN4930CHN2014 IN2014CN04930A (en) 2011-12-01 2012-11-16
US14/354,405 US9043778B2 (en) 2011-12-01 2012-11-16 Method and system for upgrading software
BR112014012772A BR112014012772A8 (en) 2011-12-01 2012-11-16 method and system for enhancing software
SG11201401480QA SG11201401480QA (en) 2011-12-01 2012-11-16 Method and system for upgrading software
RU2014126337/08A RU2580065C2 (en) 2011-12-01 2012-11-16 Method and system for software update
PCT/CN2012/084721 WO2013078951A1 (en) 2011-12-01 2012-11-16 Method and system for upgrading software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110392461.4A CN103136013B (en) 2011-12-01 Method for upgrading software and system

Publications (2)

Publication Number Publication Date
CN103136013A CN103136013A (en) 2013-06-05
CN103136013B true CN103136013B (en) 2016-12-14

Family

ID=

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1641582A (en) * 2003-12-16 2005-07-20 微软公司 Applying custom software image updates to non-volatile storage in a failsafe manner
CN101697133A (en) * 2009-10-26 2010-04-21 中兴通讯股份有限公司 Software upgrading method, software upgrading system and client

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1641582A (en) * 2003-12-16 2005-07-20 微软公司 Applying custom software image updates to non-volatile storage in a failsafe manner
CN101697133A (en) * 2009-10-26 2010-04-21 中兴通讯股份有限公司 Software upgrading method, software upgrading system and client

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
用VC++实现软件的自动升级;陈刚等;《计算机应用与软件》;20101015;第27卷(第10期);第298-301页 *

Similar Documents

Publication Publication Date Title
US9043778B2 (en) Method and system for upgrading software
US8233893B2 (en) Mobile handset update package generator that employs nodes technique
CN107515776B (en) Method for upgrading service continuously, node to be upgraded and readable storage medium
JP5705869B2 (en) Apparatus and method for loading and updating code of a cluster-based JAVA application system
CN101110788B (en) Method and system for updating client software
US6993760B2 (en) Installing software on a mobile computing device using the rollback and security features of a configuration manager
US6314567B1 (en) Apparatus and method for transferring state data when performing on-line replacement of a running program code and data
CN103002024B (en) Application program upgrade system and application program upgrade method
CN102402438B (en) Method and device for automatically merging patch files and communication terminal
CN101697133A (en) Software upgrading method, software upgrading system and client
CN102053853A (en) Version updating method of online game
CN101964725B (en) Method and system for realizing upgrading without interrupting service
CN102799500A (en) System repair method, device and storage medium
US8893272B2 (en) Method and device for recombining runtime instruction
CN102833350A (en) Processing method and processing device of WebApp updating
CN109614167B (en) Method and system for managing plug-ins
US7216344B2 (en) Side-by-side drivers
CN103036855A (en) Achievement device and method of authority management
CN104699511A (en) Plug-in upgrading method and plug-in upgrading device
CN110502264A (en) Method for upgrading system, terminal and readable storage medium storing program for executing
CN102707690A (en) Configuration data download method and download system
CN104580428A (en) Data routing method, data management device and distributed storage system
CN103136013B (en) Method for upgrading software and system
CN112328284A (en) Application program upgrading method, system, equipment and storage medium
CN100550744C (en) The method that network element device is configured

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant