CN107391216A - A kind of method for upgrading software and device - Google Patents
A kind of method for upgrading software and device Download PDFInfo
- Publication number
- CN107391216A CN107391216A CN201710881627.6A CN201710881627A CN107391216A CN 107391216 A CN107391216 A CN 107391216A CN 201710881627 A CN201710881627 A CN 201710881627A CN 107391216 A CN107391216 A CN 107391216A
- Authority
- CN
- China
- Prior art keywords
- software
- file
- upgrading
- program
- mode
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of method for upgrading software and device, including:The upgrading mode of software and file name corresponding with the upgrading mode are parsed from the configuration file pre-set;Upgrading mode and file name according to parsing upgrade to software.Pass through the embodiment of the present invention, due to the upgrading mode of software and file name corresponding with the upgrading mode are set in configuration file in advance, by parsing configuration file can according to the content parsed automatically to software upgrading, avoid and manually software is upgraded, when particularly there are many contents to need upgrading in software, the efficiency of software upgrading is effectively improved.
Description
Technical field
The present invention relates to computer technology, espespecially a kind of method for upgrading software and device.
Background technology
Software includes program and file, and program refers to one group of instruction computer execution action or the instruction judged,
That is the program is computer program, and file includes configuration file and journal file, for example, grub.cfg,
Libvirt.conf and anaconda-ks.cfg is configuration file, and upgrade.log is journal file.By in software
Program and file, which carry out upgrading, can repair leak present in software and increase the function of software.In the related art, pass through
The artificial program to be upgraded determined in software and file to be upgraded, and develop for ROMPaq installation kit and be used for
The file of upgrade file, then the program in software is upgraded using the installation kit developed by artificial, and use exploitation
The file gone out upgrades to the file in software.It can be seen that the upgrading of the program and file in software is required for manually to complete,
Which results in the upgrading efficiency comparison of software is low.Particularly when the program to be upgraded in software and file to be upgraded ratio
When more, manually the efficiency to software upgrading is low-down.
The content of the invention
In order to solve the above-mentioned technical problem, can be automatically to soft the invention provides a kind of method for upgrading software and device
Part is upgraded, and improves the efficiency of software upgrading.
In order to reach the object of the invention, the invention provides a kind of method for upgrading software, including:
The upgrading mode of software and file corresponding with the upgrading mode are parsed from the configuration file pre-set
Title;
Upgrading mode and file name according to parsing upgrade to software.
Further, before the upgrading mode and file name that the basis parses upgrade to software, in addition to:
The action that is performed before to the software upgrading is parsed from the configuration file and to the software liter
The action performed after level.
Further, it is described software is upgraded before, in addition to:
According to the file name, check whether the software meets the liter corresponding with the upgrading mode pre-set
Level requires;
When not meeting the upgrading corresponding with upgrading mode pre-set and requiring, the prompt message of staging error is exported.
Further, the upgrading mode is:The program in the software is updated, program is added into the software, unloads
Carry the program in the software, replace the file in the software, add file or the deletion software into the software
In file.
Further, the upgrading mode and title that the basis parses upgrade to software, including:
If the upgrading mode is updates the program in the software, into the software, addition program, replacement are described soft
File in part or the add file into the software, the then text parsed from the upgrade file pre-set described in lookup
The file of part title, according to the upgrading mode, the software is upgraded using the file that this finds out;
If the upgrading mode to unload the program in the software, according to the file name parsed, unloads institute
State the program of the document upgrading of the file name parsed described in the use in software;
If the upgrading mode includes deleting the file of the software, the file name parsed according to, delete
The file of the file name parsed in the software.
Further, if the upgrading mode is:Update the program in the software, the journey in the unloading software
Sequence, the file in the replacement software or the file in the deletion software, the upgrading mode and name that the basis parses
Before title upgrades to software, in addition to:
According to the file name, search from the backup file pre-set and be used for when failing to the software upgrading
The file for the state that the software is rolled back to before upgrading.
Further, if to the software upgrade success, in addition to:
If the upgrading mode is the program updated in the software or the file replaced in the software, institute is deleted
The file of the state for being used to roll back to the software before upgrading in backup file is stated, will be found from the upgrade file
File be added in the backup file;
If the upgrading mode is that program or the add file into the software are added into the software, will be from institute
The file found in upgrade file is stated to be added in the backup file;
If the upgrading mode is the program unloaded in the software or the file deleted in the software, institute is deleted
State the file of the state for being used to roll back to the software before upgrading in backup file.
The present invention provides a kind of software updating apparatus, including:
Parsing module, for parsed from the configuration file pre-set software upgrading mode and with the upgrading side
File name corresponding to formula;
Upgraded module, for being upgraded according to the upgrading mode and file name that parse to software.
Further, the parsing module is additionally operable to,
The action that is performed before to the software upgrading is parsed from the configuration file and to the software liter
The action performed after level.
Further, in addition to:
Module is checked, for according to the file name, checking it is pre-setting with the liter whether the software meets
Upgrading corresponding to level mode requires;
Output module, for when not meeting the upgrading corresponding with upgrading mode pre-set and requiring, output upgrading to be wrong
Prompt message by mistake.
Further, the upgrading mode is:The program in the software is updated, program is added into the software, unloads
Carry the program in the software, replace the file in the software, add file or the deletion software into the software
In file.
Further, the upgraded module includes:
First upgrade unit, if adding for the upgrading mode for the program in the renewal software, into the software
Add program, replace the file in the software or the add file into the software, then from the upgrade file pre-set
The file of the file name parsed described in lookup, according to the upgrading mode, using the file that this finds out to the software
Upgraded;
Second upgrade unit, if being parsed for the upgrading mode to unload the program in the software according to described
File name, unload the program of the document upgrading of the file name parsed described in the use in the software;
3rd upgrade unit, if including deleting the file of the software for the upgrading mode, according to the parsing
The file name gone out, delete the file of the file name parsed in the software.
Further, if the upgrading mode is:Update the program in the software, the journey in the unloading software
Sequence, the file in the replacement software or the file in the deletion software, in addition to:
Searching modul, for according to the file name, being searched from the backup file pre-set to the software
For the file for the state for rolling back to the software before upgrading during upgrading failure.
Further, if to the software upgrade success, in addition to:
Add module, if being the program in the renewal software for the upgrading mode, the text in the replacement software
Part, program or the add file into the software are added into the software, then will be found from the upgrade file
File is added in the backup file;
Removing module, if being the program in the unloading software for the upgrading mode, the text in the deletion software
Part, the program in the renewal software or the file in the replacement software, then delete and be used to incite somebody to action in the backup file
The file for the state that the software is rolled back to before upgrading.
The present invention comprise at least parsed from the configuration file pre-set software upgrading mode and with the upgrading
File name corresponding to mode;Upgrading mode and file name according to parsing upgrade to software.Implement from the present invention
Example is visible, due to setting the upgrading mode of software and file name corresponding with the upgrading mode in configuration file in advance, leads to
Parsing configuration file can is crossed according to the content parsed automatically to software upgrading, avoids and manually software is upgraded,
When particularly there are many contents to need upgrading in software, the efficiency of software upgrading is effectively improved.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification
Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by specification, rights
Specifically noted structure is realized and obtained in claim and accompanying drawing.
Brief description of the drawings
Accompanying drawing is used for providing further understanding technical solution of the present invention, and a part for constitution instruction, with this
The embodiment of application is used to explain technical scheme together, does not form the limitation to technical solution of the present invention.
Fig. 1 is a kind of schematic flow sheet of method for upgrading software provided in an embodiment of the present invention;
Fig. 2 is the schematic flow sheet of another method for upgrading software provided in an embodiment of the present invention;
Fig. 3 is a kind of structural representation of software updating apparatus provided in an embodiment of the present invention;
Fig. 4 is the structural representation of another software updating apparatus provided in an embodiment of the present invention.
Embodiment
For the object, technical solutions and advantages of the present invention are more clearly understood, below in conjunction with accompanying drawing to the present invention
Embodiment be described in detail.It should be noted that in the case where not conflicting, in the embodiment and embodiment in the application
Feature can mutually be combined.
Can be in the computer system of such as one group computer executable instructions the flow of accompanying drawing illustrates the step of
Perform.Also, although logical order is shown in flow charts, in some cases, can be with suitable different from herein
Sequence performs shown or described step.
The embodiment of the present invention provides a kind of method for upgrading software, as shown in figure 1, the method for upgrading software includes:
Step 101, the upgrading mode for parsing from the configuration file pre-set software and with the upgrading mode pair
The file name answered.
Specifically, file name corresponding to the upgrading mode and the upgrading mode of software is set in configuration file in advance,
File name corresponding to the upgrading mode and the upgrading mode of software so is parsed to configuration file parsing can.Its
In, software includes:System software (such as operating system software) and application software (such as office software, image processing software, society
Hand over communication software etc.).The software may be mounted on virtual machine, can also be arranged on physical host.Configuration file can be
The file of extensible markup language (eXtensible Markup Language, XML) form, such as configuration file is
upgrade.xml。
The upgrading mode and title that step 102, basis parse upgrade to software.
The executive agent of step 101 and step 102 is main frame.
Further, on the basis of Fig. 1 corresponds to embodiment, before step 102, in addition to:
Parse the action performed before to software upgrading from configuration file and performed after to software upgrading
Action.
Configuration file further comprises:For identifying the field of the action performed before to software upgrading and for marking
Know the field of action performed after to software upgrading, in other words configuration file further comprises two kinds of fields, first
Kind field is used to identify which action to be performed before software upgrading, and second of field is used for mark and performed after software upgrading
Which action.Therefore when being parsed to configuration file, upgrading mode and file corresponding with upgrading mode have not only been parsed
Title, the action performed before to software upgrading and the action performed after to software upgrading are also parsed, so that
To before software upgrading and to performing the action parsed automatically after software upgrading, avoid before software upgrading and
Manually manipulated after software upgrading to perform the action that this is parsed.Wherein, parsing the realization of configuration file can use
Mode in correlation technique is realized, is implemented the protection domain being not intended to limit the present invention, is repeated no more here.Parse
The action performed before to software upgrading include:Suspend the business of main frame, if software is mounted on virtual machine, solution
The action performed before to software upgrading separated out can also include:Empty virtual machine, parse to software upgrading it
The action performed afterwards includes:Reboot operation system.
Further, on the basis of Fig. 1 corresponds to embodiment, before step 102, in addition to:
According to the file name parsed, check whether software meets the upgrading corresponding with upgrading mode pre-set and want
Ask;When not meeting the upgrading corresponding with upgrading mode pre-set and requiring, the prompt message of staging error is exported.
Further, upgrading mode is:Update the program in software, the journey into software in addition program, uninstall
File in sequence, replacement software, add file or delete file in software into the software.
One software includes program and file, and program refers to one group of instruction computer execution action or the finger judged
Order, that is to say, that the program is computer program, and file includes configuration file and journal file, for example, grub.cfg,
Libvirt.conf and anaconda-ks.cfg is configuration file, and upgrade.log is journal file., can in ROMPaq
With update the program in software, add into software program, the program in uninstall, replacement, delete file in software or
Person's add file into software.
Upgrading corresponding with upgrading mode is specifically described below to require.If upgrade mode be replacement software in file or
The file in software is deleted, then upgrading requirement corresponding with the upgrading mode is:In the presence of the file name parsed in software
File;If the mode of upgrading is the add file into software, upgrading requirement corresponding with the upgrading mode is:It is not present in software
The file of the file name parsed.If the mode of upgrading is the program in renewal software, upgrading corresponding with the upgrading mode
It is required that it is:Program to be updated in software be present, and after upgrading to program, before the version of the program after upgrading is higher than upgrading
The version of program;If the mode of upgrading is the program in uninstall, upgrading requirement corresponding with the upgrading mode is:In software
Program to be unloaded be present, if upgrading mode is program is added into software, upgrading requirement corresponding with the upgrading mode is:
Program to be added is not present in software.If software does not meet upgrading and required, illustrate staging error, then export staging error
Prompt message, so that technical staff has found mistake and corrected, so as to reduce the probability of software upgrading error.
Further, on the basis of Fig. 1 corresponds to embodiment, step 102 includes:
If upgrade mode for renewal software in program, into software add program, the file in replacement software or to
Add file in software, then the file of the file name parsed is searched from the upgrade file pre-set, according to upgrading side
Formula, software is upgraded using the file found out;If the mode of upgrading is the program in uninstall, according to the text parsed
Part title, the program of the document upgrading of the use file name parsed in uninstall;If the mode of upgrading includes deleting
The installation file of software, then according to the file name that parses, delete the file of the file name parsed in software.
Specifically, if upgrading mode is the program in renewal software, according to the file name that parses, from pre-setting
Upgrade file in search the file of the file name parsed, the program in software is carried out using the file that this finds
Renewal;If upgrading mode is adds program into software, according to the file name parsed, from the upgrade file pre-set
The middle file for searching the file name parsed, the file found using this add new program into software, that is,
It is the new program of software installation to say the file found using this;If the mode of upgrading is the program in uninstall, according to solution
The file name of precipitation, the program of the file installation of the use file name parsed in uninstall.Wherein, to soft
When program in part is updated or program is added into software, the file found from the upgrade file pre-set can
To be the file generated by software package manager (Red Hat Package Manager, RPM), the file of the generation is RPM lattice
The file of formula.If the mode of upgrading is the file in replacement software, according to the file name parsed, from the upgrading pre-set
The file of the file name parsed is searched in file, the text parsed in the file replacement software found using this
The file of part title;If the mode of upgrading is the add file into software, according to the file name parsed, from what is pre-set
The file of the file name parsed is searched in upgrade file, the file that this is found is added in software;If upgrading side
Formula is the file in deletion software, then the file name that basis parses, the file name parsed in deletion software
File.
Further, on the basis of Fig. 1 corresponds to embodiment, if upgrading mode is:Update the program in software, unload
File in program, replacement software in software deletes file in software, before step 102, in addition to:
According to the file name parsed, search from the backup file pre-set and used when the software upgrading fails
The file of state before software to be rolled back to upgrading.
The file of the state for software to be rolled back to before upgrading is searched from backup file, so when software upgrading fails
When, state that the file that finds out can be utilized to roll back to software before upgrading is reduced and brought when upgrading failure to client
Loss, so as to ensure that the availability of software.In addition, if main frame is unexpected during the program in software upgrades
Delay machine or power-off, check the part upgraded successfully of the program when upgrading again to the program automatically, and skip and upgraded
Successful part, then the part upgraded successfully start to upgrade, thus be avoided that influence of the fortuitous event to upgrading, reduce
Technical staff participates in the upgrading of software.
For example, if upgrading mode is the program in renewal software, according to the file name parsed, from what is pre-set
The installation kit of program to be updated is searched in backup file, the installation kit of the program found in backup file is legacy version
Installation kit;Fail if being updated to the program, rollback is carried out to the program using the installation kit found from backup file.If
Upgrading mode is the program in uninstall, then according to the file name parsed, is searched from the backup file pre-set
The installation kit of program to be unloaded;If the program unloading is failed, using the installation kit found from backup file to the journey
Sequence carries out rollback.
If the mode of upgrading to delete the file in software, according to the file name parsed, is searched from backup file
The file of the file name parsed, if deleting the file in software not successfully, utilize and found out from backup file
File by software roll back to upgrading before state.If the mode of upgrading is the file in replacement software, according to the text parsed
Part title, the file of the file name parsed is searched from upgrade file, this document is the file of latest edition, and from standby
The file of the file name parsed is searched in part file, this document is the file of legacy version, is replaced using the file of latest edition
The file of legacy version is changed, if replacing failure, rollback is carried out to software using the file of legacy version.
Further, if to software upgrade success, in addition to:
If the mode of upgrading is the file in the program or replacement software in renewal software, the use in backup file is deleted
The file of state before software to be rolled back to upgrading, the file found from upgrade file is added in backup file;
If the mode of upgrading is that program or the add file into software, the file that will be found from upgrade file are added into software
It is added in backup file;If the mode of upgrading is the program in uninstall or the file in deletion software, backup is deleted
The file of the state for being used to roll back to software before upgrading in file.
Because the file found from upgrade file is the file of latest edition, therefore will be found from upgrade file
File be added in backup file, ensure that the file in backup file is the file of latest edition.And delete backup text
The file of the state for being used to roll back to software before upgrading in part, avoids and excessive redundant data in backup file be present.
Give one example below and the configuration file in above-mentioned is illustrated, in this example embodiment, software installation is in virtual machine
On, the content for the configuration file to software upgrading is as follows:
Wherein,<id>Center</id>The pattern for representing software is Center.
<description>common configuration</description>Represent the updated contents of software.
<version>CS50EESP1-Center</version>Represent the version number of software.
<hotfix>yes</hotfix>In hotfix indicate whether upgrading between the version for software, yes represent be
Upgrading between the version of software, the upgrading between the version of software refer to repairing the leak of software, but do not change the version of software
Number, that is the version number of software does not change.
<backuppath>/tmp/iso</backuppath>Represent the path of software rollback, that is to say, that in the path
Under be stored with the backup file of software.
<dependencies>
<dependency>CS50EE_Center_SP1.upgrade.zip</dependency>
</dependencies>
The version that the content representation software of the row of the above three is relied on, mean that software dependent on version is CS50EE_
Center_SP1.upgrade.zip installation kit come complete installation.
<requirements>With</requirements>Between content include to the action that is performed before software upgrading and
Action to being performed after software upgrading.
<reboot>yes</reboot>In reboot represent upgrading after whether restart the operating system of virtual machine,<
reboot>yes</reboot>In yes represent upgrading after restart the operating system of virtual machine.
<maintenance>yes</maintenance>In maintenance represent upgrading before whether operation suspension void
The business of the main frame of plan machine,<maintenance>yes</maintenance>In yes represent upgrading before suspend the main frame
Business.
<cleanvm>yes</cleanvm>In cleanvm represent upgrading before whether empty virtual machine,<cleanvm>
yes</cleanvm>In yes represent upgrading before empty virtual machine.
In content more than, cs-agent-1.7-39.20161021.x86_64.rpm represents to be used to update in software
Program RPM bags title, cs-agent represents the title of program to be updated.
In content more than, tree-2.5.0-1.x86_64.rpm represents the RPM bags for adding program into software
Title, tree represents the title of program to be added.
In content more than, screen-4.0.3-16.el.x86_64.rpm represents the RPM of software Program to be unloaded
The title of bag, in other words the program to be unloaded in software using the RPM bags installation obtain, screen represent it is to be unloaded
Program title.
<File method='add'>/var/log/upgrade.log</file>In ' add' represented into software
Add file, upgrade.log represent the title of file to be added, and/var/log/ represents the storage position of file to be added
Put, in other words the add file into/file file.
<File method='add'>/etc/grub/grub.cfg</file>In ' add' represents to add into software
Add file, grub.cfg represent the title of file to be added, and/etc/grub/ represents the storage location of file to be added, changed
It is exactly the add file into/file file that sentence, which is talked about,.
<File method='update'>/etc/sasl2/libvirt.conf</file>In ' update' expressions
The file in software is updated, libvirt.conf represents the title of file to be updated, and/etc/sasl2/ represents text to be updated
The storage location of part, the in other words file in renewal/file file.
<File method='delete'>/root/anaconda-ks.cfg</file>In ' delete' represent delete
Except the file in software, anaconda-ks.cfg represents the title of file to be deleted, and/root/ represents file to be deleted
Storage location, the in other words file in deletion/file file.
Method for upgrading software according to embodiments of the present invention, the upgrading of software is parsed from the configuration file pre-set
Mode and file name corresponding with the upgrading mode;Upgrading mode and file name according to parsing rise to software
Level.From the embodiment of the present invention, due to set in advance in configuration file software upgrading mode and with the upgrading mode pair
The file name answered, by parsing configuration file can according to the content parsed automatically to software upgrading, avoid artificial
Software is upgraded, when particularly there are many contents to need upgrading in software, is effectively improved the efficiency of software upgrading.
And the present invention is to set upgrading mode and file name corresponding with the upgrading mode into configuration file, is not required to
Updating operation manually carried out to software, reduce the complexity of software upgrading, enormously simplify the flow of software upgrading, used
Family is easier to operate to, and ensure that the ease for use of software upgrading.Because user is easy to operate software upgrading, that is to say, that to user
It is less demanding in level professional technology, more costs are put into terms of manpower O&M so as to reduce company.
The embodiment of the present invention provides another method for upgrading software, as shown in Fig. 2 the method for upgrading software includes:
Step 201, task to software upgrading is issued, issuing for task includes being used for the configuration file to software upgrading
And upgrade file.
Step 202, verify whether the upgrade file of software is correct, when verifying correct, perform step 203, otherwise, terminate
This flow, the prompting of upgrade file error can be exported when terminating this flow.Specifically, the text in upgrade file is read
The title of part, according to the title of this document judge upgrade file whether be the software upgrade file, that is to say, that judge upgrading
Whether file and software are corresponding.
Step 203, parsing configuration file, it is in a manner of parsing the upgrading in configuration file and corresponding with the upgrading mode
File name.The file name parsed includes the title for being used to upgrade the RPM bags of program in software and/or soft for upgrading
The title of file in part.
Step 204, the file for searching from backup file the state for software to be rolled back to before upgrading.
If step 205, the file for finding multiple states for being used to roll back to software before upgrading, it is unnecessary to delete
Early version file.For example, finding the RPM bags of 3 versions in backup file, the RPM bags of 3 versions are all used to upgrade one
Individual program, the RPM bags of 2 unnecessary early versions of version are deleted, to retain the RPM of the latest edition in the RPM bags of 3 versions
Bag.
If step 206, the file name parsed include the title of RPM bags, the name is searched from upgrade file
The RPM bags of title, the program in software is upgraded using the RPM bags of lookup.
Whether the program in step 207, software is upgraded successfully, and step 208 is performed if upgrading successfully, if failure is upgraded
Perform step 209.
Step 208, the RPM bags found out from upgrade file are added in backup file.
Step 209, using the RPM bags of early version, (that i.e. in step 204, is searched from backup file is used for software
In program rollback to upgrading before state file) state that rolls back to software before the upgrading.
If step 210, the title of the file parsed include being used for the title for upgrading the file in software, from liter
The file of the title is searched in level file, the file in software is upgraded using the file of lookup.
Whether the file in step 211, software is upgraded successfully, and step 212 is performed if upgrading successfully, if failure is upgraded
Perform step 214.
Step 212, the RPM bags found out from upgrade file are added in backup file, will be looked into from upgrade file
The file for being used to upgrade the file in software found out is added in backup file.
Step 213, the version number for changing software.
Step 214, using early version file (i.e. in step 204, searched from backup file be used for by software
The file of state that rolls back to before upgrading of file) state that rolls back to the file in software before the upgrading.
Step 215, using the RPM bags of early version, (that i.e. in step 204, is searched from backup file is used for software
In state of the program rollback to before upgrading file) by the state before the program rollback in software to the upgrading.
The embodiment of the present invention provides a kind of software updating apparatus, as shown in figure 3, the software updating apparatus 3 includes:
Parsing module 31, for parsed from the configuration file pre-set software upgrading mode and with the upgrading
File name corresponding to mode.
Upgraded module 32, for being upgraded according to the upgrading mode and file name that parse to software.
Further, on the basis of Fig. 3 corresponds to embodiment, parsing module 31 is additionally operable to,
Parse the action performed before to software upgrading from configuration file and performed after to software upgrading
Action.
Further, on the basis of Fig. 3 corresponds to embodiment, the present invention provides another software updating apparatus, such as Fig. 4 institutes
Show, the software updating apparatus 3 also includes:
Check module 33, for according to file name, check software whether meet pre-set it is corresponding with upgrading mode
Upgrading requirement;
Output module 34, for do not meet pre-set it is corresponding with upgrading mode upgrading require when, output upgrading
The prompt message of mistake.
Further, upgrading mode is:Update the program in software, the journey into software in addition program, uninstall
File in sequence, replacement software, add file or delete file in software into software.
Further, as shown in figure 4, upgraded module 32 includes:
First upgrade unit 321, if adding program for the program in renewal software, into software for upgrading mode, replacing
The file changed in software or the add file into software, then the filename parsed is searched from the upgrade file pre-set
The file of title, according to upgrading mode, the file found out using this is upgraded to software.
Second upgrade unit 322, if being the program in uninstall for upgrading mode, according to the filename parsed
Claim, the program of the document upgrading for the file name that the use in uninstall parses.
3rd upgrade unit 323, if including deleting the file of software for upgrading mode, according to the filename parsed
Claim, delete the file of the file name parsed in software.
Further, if upgrading mode is:Update the program in software, the program in uninstall, in replacement software
File or delete software in file, as shown in figure 4, software updating apparatus 3 also includes:
Searching modul 35, for according to file name, searching from the backup file pre-set and being lost to software upgrading
For the file for the state for rolling back to software before upgrading when losing.
Further, if to software upgrade success, as shown in figure 4, software updating apparatus 3 also includes:
Add module 36, if for upgrading mode to update the program in software, the file in replacement software, into software
Program or the add file into software are added, then the file found from upgrade file is added in backup file.
Removing module 37, if being the program in uninstall, the file in deletion software, renewal software for upgrading mode
In program or replacement software in file, then delete the state for being used to roll back to software before upgrading in backup file
File.
In actual applications, parsing module 31, upgraded module 32, check module 33, output module 34, searching modul 35,
Add module 36 and removing module 37 can be by the CPU in software updating apparatus 3, microprocessor (Micro Processor
Unit, MPU), digital signal processor (Digital Signal Processor, DSP) or field programmable gate array
(Field Programmable Gate Array, FPGA) etc. is realized.
Software updating apparatus according to embodiments of the present invention, the upgrading of software is parsed from the configuration file pre-set
Mode and file name corresponding with the upgrading mode;Upgrading mode and file name according to parsing rise to software
Level.From the embodiment of the present invention, due to set in advance in configuration file software upgrading mode and with the upgrading mode pair
The file name answered, by parsing configuration file can according to the content parsed automatically to software upgrading, avoid artificial
Software is upgraded, when particularly there are many contents to need upgrading in software, is effectively improved the efficiency of software upgrading.
The embodiment of the present invention provides another software updating apparatus, the software updating apparatus include memory, processor with
The step realized and storage is on a memory and the computer program that can run on a processor, during computing device computer program
Suddenly include:
The upgrading mode of software and file corresponding with the upgrading mode are parsed from the configuration file pre-set
Title;
Upgrading mode and file name according to parsing upgrade to software.
Further, the step of being realized during above-mentioned computing device computer program also includes:
The action that is performed before to the software upgrading is parsed from the configuration file and to the software liter
The action performed after level.
Further, the step of being realized during above-mentioned computing device computer program also includes:
According to the file name, check whether the software meets the liter corresponding with the upgrading mode pre-set
Level requires;When not meeting the upgrading corresponding with upgrading mode pre-set and requiring, the prompt message of staging error is exported.
Further, the upgrading mode is:The program in the software is updated, program is added into the software, unloads
Carry the program in the software, replace the file in the software, add file or the deletion software into the software
In file.
Further, the step of being realized during above-mentioned computing device computer program specifically includes:
If the upgrading mode is updates the program in the software, into the software, addition program, replacement are described soft
File in part or the add file into the software, the then text parsed from the upgrade file pre-set described in lookup
The file of part title, according to the upgrading mode, the software is upgraded using the file that this finds out;If the upgrading
Mode, according to the file name parsed, is unloaded described in the use in the software to unload the program in the software
The program of the document upgrading of the file name parsed;If the upgrading mode includes deleting the file of the software, basis
The file name parsed, delete the file of the file name parsed in the software.
Further, if the upgrading mode is:Update the program in the software, the journey in the unloading software
Sequence, replace the file in the software or delete file in the software, it is real during above-mentioned computing device computer program
Existing step also includes:
According to the file name, search from the backup file pre-set and be used for when failing to the software upgrading
The file for the state that the software is rolled back to before upgrading.
Further, the step of being realized if to the software upgrade success, during above-mentioned computing device computer program
Also include:
If the upgrading mode is the program updated in the software or the file replaced in the software, institute is deleted
The file of the state for being used to roll back to the software before upgrading in backup file is stated, will be found from the upgrade file
File be added in the backup file;If the upgrading mode is program to be added into the software or to the software
Middle add file, then the file found from the upgrade file is added in the backup file;If the upgrading side
Formula is the program unloaded in the software or the file deleted in the software, then delete in the backup file be used for by
The file for the state that the software is rolled back to before upgrading.
Although disclosed herein embodiment as above, described content be only readily appreciate the present invention and use
Embodiment, it is not limited to the present invention.Technical staff in any art of the present invention, taken off not departing from the present invention
On the premise of the spirit and scope of dew, any modification and change, but the present invention can be carried out in the form and details of implementation
Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.
Claims (10)
- A kind of 1. method for upgrading software, it is characterised in that including:The upgrading mode of software and file name corresponding with the upgrading mode are parsed from the configuration file pre-set;Upgrading mode and file name according to parsing upgrade to software.
- 2. method for upgrading software according to claim 1, it is characterised in that the upgrading mode and text that the basis parses Before part title upgrades to software, in addition to:Parsed from the configuration file action that is performed before to the software upgrading and to the software upgrading it The action performed afterwards.
- 3. method for upgrading software according to claim 1, it is characterised in that it is described software is upgraded before, also wrap Include:According to the file name, check whether the software meets the upgrading corresponding with the upgrading mode pre-set and want Ask;When not meeting the upgrading corresponding with upgrading mode pre-set and requiring, the prompt message of staging error is exported.
- 4. method for upgrading software according to any one of claim 1 to 3, it is characterised in that the upgrading mode is:More Program in the new software, add program, the program in the unloading software into the software, replace in the software File, add file or delete file in the software into the software.
- 5. method for upgrading software according to claim 4, it is characterised in that the upgrading mode and name that the basis parses Title upgrades to software, including:If the upgrading mode is added program for the program in the renewal software, into the software, replaced in the software File or the add file into the software, then searched from the upgrade file pre-set described in the filename that parses The file of title, according to the upgrading mode, the software is upgraded using the file that this finds out;If the upgrading mode is unloads the program in the software, described soft according to the file name parsed, unloading The program of the document upgrading of the file name parsed described in use in part;If the upgrading mode includes deleting the file of the software, the file name parsed according to, described in deletion The file of the file name parsed in software.
- 6. method for upgrading software according to claim 5, it is characterised in that if the upgrading mode is:Described in renewal Program in software, the program in the unloading software, the text in file or the deletion software in the replacement software Part, before the upgrading mode and title that the basis parses upgrade to software, in addition to:According to the file name, search from the backup file pre-set and be used for when failing to the software upgrading by institute State the file for the state that software is rolled back to before upgrading.
- 7. method for upgrading software according to claim 6, it is characterised in that if to the software upgrade success, also wrap Include:If the upgrading mode is the program updated in the software or the file replaced in the software, delete described standby The file of the state for being used to roll back to the software before upgrading in part file, the text that will be found from the upgrade file Part is added in the backup file;If the upgrading mode is that program or the add file into the software are added into the software, will be from the liter The file found in level file is added in the backup file;If the upgrading mode is the program unloaded in the software or the file deleted in the software, delete described standby The file of the state for being used to roll back to the software before upgrading in part file.
- A kind of 8. software updating apparatus, it is characterised in that including:Parsing module, for parsed from the configuration file pre-set software upgrading mode and with the upgrading mode pair The file name answered;Upgraded module, for being upgraded according to the upgrading mode and file name that parse to software.
- 9. software updating apparatus according to claim 8, it is characterised in that the upgrading mode is:Update the software In program, add into the software program, the program in the unloading software, replace file in the software, to institute State add file in software or delete file in the software.
- 10. software updating apparatus according to claim 9, it is characterised in that the upgraded module includes:First upgrade unit, if adding journey for the program in the renewal software, into the software for the upgrading mode Sequence, the file in the software or the add file into the software are replaced, then searched from the upgrade file pre-set The file of the file name parsed, according to the upgrading mode, the software is carried out using the file that this finds out Upgrading;Second upgrade unit, if for the upgrading mode to unload the program in the software, according to the text parsed Part title, unload the program of the document upgrading of the file name parsed described in the use in the software;3rd upgrade unit, if including deleting the file of the software for the upgrading mode, parsed according to File name, delete the file of the file name parsed in the software.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710881627.6A CN107391216A (en) | 2017-09-26 | 2017-09-26 | A kind of method for upgrading software and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710881627.6A CN107391216A (en) | 2017-09-26 | 2017-09-26 | A kind of method for upgrading software and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107391216A true CN107391216A (en) | 2017-11-24 |
Family
ID=60350750
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710881627.6A Pending CN107391216A (en) | 2017-09-26 | 2017-09-26 | A kind of method for upgrading software and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107391216A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113505777A (en) * | 2021-07-20 | 2021-10-15 | 深圳市拓普泰克技术股份有限公司 | Keyboard layout version detection method, device, equipment and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1866252A (en) * | 2006-02-20 | 2006-11-22 | 华为技术有限公司 | Method and system for transformation between different version configuration data |
CN101158908A (en) * | 2007-10-25 | 2008-04-09 | 中兴通讯股份有限公司 | Equipment software upgrade automatic realizing system and method |
CN101281469A (en) * | 2008-04-11 | 2008-10-08 | 青岛海信电器股份有限公司 | Embedded type system and start-up load application method |
CN101739278A (en) * | 2009-12-17 | 2010-06-16 | 中国电力科学研究院 | Enterprise-level application software updating method and system |
CN102170536A (en) * | 2011-04-15 | 2011-08-31 | 深圳创维数字技术股份有限公司 | Digital television network system, digital television all-in-one machine and upgrading method thereof |
CN102346673A (en) * | 2010-07-27 | 2012-02-08 | 比亚迪股份有限公司 | Method and device for upgrading mobile phone system |
CN104156244A (en) * | 2014-08-06 | 2014-11-19 | 北京奇虎科技有限公司 | Method and device for software upgrading |
CN104615471A (en) * | 2015-03-05 | 2015-05-13 | 浪潮软件集团有限公司 | System upgrading method and device for terminal |
CN106502685A (en) * | 2016-11-01 | 2017-03-15 | Tcl集团股份有限公司 | A kind of upgrade method of data base and system |
-
2017
- 2017-09-26 CN CN201710881627.6A patent/CN107391216A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1866252A (en) * | 2006-02-20 | 2006-11-22 | 华为技术有限公司 | Method and system for transformation between different version configuration data |
CN101158908A (en) * | 2007-10-25 | 2008-04-09 | 中兴通讯股份有限公司 | Equipment software upgrade automatic realizing system and method |
CN101281469A (en) * | 2008-04-11 | 2008-10-08 | 青岛海信电器股份有限公司 | Embedded type system and start-up load application method |
CN101739278A (en) * | 2009-12-17 | 2010-06-16 | 中国电力科学研究院 | Enterprise-level application software updating method and system |
CN102346673A (en) * | 2010-07-27 | 2012-02-08 | 比亚迪股份有限公司 | Method and device for upgrading mobile phone system |
CN102170536A (en) * | 2011-04-15 | 2011-08-31 | 深圳创维数字技术股份有限公司 | Digital television network system, digital television all-in-one machine and upgrading method thereof |
CN104156244A (en) * | 2014-08-06 | 2014-11-19 | 北京奇虎科技有限公司 | Method and device for software upgrading |
CN104615471A (en) * | 2015-03-05 | 2015-05-13 | 浪潮软件集团有限公司 | System upgrading method and device for terminal |
CN106502685A (en) * | 2016-11-01 | 2017-03-15 | Tcl集团股份有限公司 | A kind of upgrade method of data base and system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113505777A (en) * | 2021-07-20 | 2021-10-15 | 深圳市拓普泰克技术股份有限公司 | Keyboard layout version detection method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8365164B1 (en) | Portable software applications | |
US9262153B2 (en) | Firmware update discovery and distribution | |
US9804933B2 (en) | System differential upgrade method, apparatus, and mobile terminal | |
US10114630B2 (en) | Management of software and operating system updates required for the process of creating a virtual machine facsimile of an existing physical or virtual machine | |
CN102693139B (en) | A kind of method and system of radio upgrade cell phone software | |
US6363499B1 (en) | Method and system for restoring a computer to its original state after an unsuccessful installation attempt | |
KR101143112B1 (en) | Applying custom software image updates to non-volatile storage in a failsafe manner | |
JP4878715B2 (en) | Method, computer system and computer readable recording medium for patching applications that do not conform to operating system | |
US20110320882A1 (en) | Accelerated virtual environments deployment troubleshooting based on two level file system signature | |
US20060048129A1 (en) | Patch un-installation | |
US20070118725A1 (en) | CPU life-extension apparatus and method | |
CN106775723A (en) | The method and Android device of the system firmware customization based on Android platform | |
CN101815988A (en) | Firmware image update and management | |
US7320087B2 (en) | Information processing apparatus and method, program, and recording medium | |
CN109062598A (en) | A kind of safe OTA upgrade method and system | |
US6816984B1 (en) | Method and system for verifying and storing documents during a program failure | |
US9141385B2 (en) | Managing operating system components | |
CN102054041B (en) | Method and system for upgrading metadata | |
US6336215B1 (en) | Apparatus and method for on-line code only replacement of a running program using checkpoints | |
CN107391216A (en) | A kind of method for upgrading software and device | |
US20030046524A1 (en) | Method for dynamically designating initialization modules as recovery code | |
CN108228266A (en) | Start the method and apparatus of Fragment components under a kind of Android card cages between different plug-in units | |
US9251043B2 (en) | Managed runtime enabling condition percolation | |
US11573779B2 (en) | Creating and upgrading of solutions for deployment in a virtualized computing environment | |
WO2022120640A1 (en) | Electron-based updating method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171124 |
|
RJ01 | Rejection of invention patent application after publication |