Specific embodiment
It is specific below in conjunction with the application to make the purpose, technical scheme and advantage of the application clearerEmbodiment and corresponding accompanying drawing are clearly and completely described to technical scheme.Obviously, retouchedThe embodiment stated only is some embodiments of the present application, rather than whole embodiments.Based in the applicationEmbodiment, it is all that those of ordinary skill in the art are obtained under the premise of creative work is not madeOther embodiment, belongs to the scope of the application protection.
Fig. 1 is the flow chart of the programme upgrade method according to the application one embodiment, as shown in figure 1,The described method comprises the following steps:
Step S102, in terminal device system upgrade, judge terminal device idle storage space whetherIt is large enough to hold ROMPaq.
In the embodiment of the present application, the terminal device include but is not limited to smart mobile phone, panel computer,The terminal devices such as computer, the system upgrade of terminal device can be to systems soft ware, firmware program or answerWith etc. carry out updating operation.In this case, the ROMPaq size is obtained respectively and terminal setsStandby idle storage space size, and judge whether the idle storage space of terminal device is large enough to hold upgrading journeySequence, that is to say, that whether judge the idle storage space size of terminal device more than ROMPaq size,If otherwise continuing executing with step S104.
Step S104, if it is not, storage size of still needing then is calculated, it is true according to storage size of still needingMigrating data in the fixed terminal device, and the migrating data of the determination is migrated to cloud server.
If it is determined that the idle storage space size of terminal device is less than ROMPaq size, now terminal setsIt is standby to store ROMPaq without enough memory spaces, i.e., can not normally carry out download program and journeySequence installation operation.In the embodiment of the present application, Data Migration terminal device being locally stored to high in the clouds takesBusiness device, to vacate necessary local storage space so that system upgrade operation is smooth.In this ShenIn one embodiment please, described Data Migration refers to just by terminal local data backup to cloud serviceDevice, then deletes local data again.In this application, the corresponding data of Data Migration are referred to as transport numberAccording to.It is determined that during the local migrating data of terminal device, according to the ROMPaq size and this is air-groundNot busy storage size is still needed storage size described in calculating.Memory space of still needing is the ROMPaqThe difference of size and idle storage space.Local transportable number is selected according to predetermined Data Migration principleAccording to for example can be according to data type, data storage location, size of data, and/or last use timeDetermine transportable data etc. dimension, that is, require that the migrating data for determining can not influence the normal fortune of systemOK;Finally according to still needing, storage size determines the migrating data in the transportable data.
Step S106, by the ROMPaq is downloaded to the terminal device and carries out by upgrade serverProgram is upgraded.
After terminal device has enough idle storage spaces, system carry out the download of ROMPaq withAnd the operation such as replacement is installed, here is omitted.It should be noted that after the completion of system program upgrading,The ROMPaq (ROMPaq downloaded by upgrade server) that this system upgrade is downloaded is deleted,And the data file backed up from before the download of cloud backup server, carry out local data recovery.
By above-described embodiment, the system in the case of terminal device local storage space deficiency is realizedUpdating operation.
Describe the details of above-mentioned each treatment in detail with reference to Fig. 2.Fig. 2 is according to another implementation of the applicationThe flow chart of the programme upgrade method of example, is retouched by taking the upgrading of system firmware program as an example in the present embodimentState.As shown in Fig. 2 the described method comprises the following steps:
Step S202, terminal device carries out system upgrade, obtains the document size information of firmware upgrade procedureThe idle storage space size local with terminal device.
In one embodiment of the application, during terminal device system upgrade, terminal device is connected by networkUpgrade server is connect, and upgrade information is obtained by upgrade server, then can by the upgrade informationTo get the size of the firmware upgrade procedure;On the other hand, terminal device can be local by scanningThe data of storage are so as to obtain the size of local idle storage space.
Step S204, judges whether the idle storage space of terminal device is large enough to hold firmware upgrade procedure,Needed into backup operation of racking if not enough accommodating, described cloud backup is exactly by the data of terminal localMigrate to cloud server.For example:Firmware upgrade procedure size is 600M, and the free time of terminal local depositsStorage space size is 500M, and now the idle storage space of terminal device is not enough to accommodate firmware upgrade journeySequence is, it is necessary to carry out data cloud backup operation.Specifically, if the idle storage space size of terminal localLess than firmware upgrade procedure size, then step S206 is performed, otherwise directly perform step S208.
Step S206, Data Migration rule or direct access terminal local are obtained by cloud serverThe Data Migration rule for prestoring, the transportable data of terminal local are determined according to Data Migration rule,The transportable data refer to the data for not influenceing terminal system to run and temporarily take less than;Then according to stillMigrating data in needing storage size to determine the transportable data.In the present embodiment, it is describedData Migration rule can be configured according to three below dimension:
(1) data storage location.Set data storage where subregion priority, for example forFor Windows systems, the subregion where data file including C disks, D disks, E disks etc., Ke YisheThe high priority data of D disks or E disks is put in the data of C disks;For linux system, data file instituteSubregion including cache, data, system, sdcard etc., the data of sdcard subregions can be setPrior to the data of data subregions.
(2) size of data (or shatter value).Larger high priority data is set in less data, for exampleOne big file 40M is than multiple files (10 files) 40M priority treatments.
(3) data type.The data type of transportable data is set and data are set according to data typeThe priority of type.For example, audio-video document is prior to application cache file.
It is determined that after migrating data, the cloud backup server that migrating data is packaged and communicated to specify is carried outBackup.Hold above-mentioned example, terminal local still need 100M memory space, it is necessary to by local at least 100MData Migration to cloud server.
Step S208, after system gets enough memory spaces, system is carried out under firmware programCarry and install replacement operation.
Step S210, after the completion of the upgrading of system firmware program, the firmware updating program that deletion is downloaded, and fromThe data file that cloud server is backed up before downloading, carries out local data recovery.
It is described above carrying out terminal local Data Migration to cloud server the technical side of data backupCase, each subregion is locally stored with reference to Fig. 3 descriptions carries out the scheme of Data Migration.In the present embodiment,During terminal device system upgrade, it is desirable to which ROMPaq is downloaded to fixed subregion.In this case, such asThe fixed subregion idle storage space of fruit is not enough to accommodate ROMPaq, it is not necessary to by Data Migration to outsideCloud server, and only need to be by Data Migration to the other idle subregions of terminal.
Fig. 3 is the flow chart of the programme upgrade method according to another embodiment of the application, as shown in figure 3,Methods described includes:
Step S302, in terminal device system upgrade, judges that the free time of the first subregion of terminal device depositsWhether ROMPaq is large enough to hold in storage space.
Step S304, if it is not, storage size of still needing then is calculated, it is true according to storage size of still needingMigrating data in fixed first subregion, and the migrating data of the determination is migrated to the terminal setThe second standby subregion.
For example, for linux system, the first above-mentioned subregion can be data subregions, second pointArea can be sdcard subregions or cache subregions.Certainly difference can also be chosen in other examplesSubregion, the application is not limited to this.
Further, the idle storage that the ROMPaq size and first subregion are obtained respectively is emptyBetween size, further according to the ROMPaq size and the big subtotal of idle storage space of first subregionStill needed storage size described in calculating.
Step S306, by the ROMPaq is downloaded to first subregion and carries out by upgrade serverProgram is upgraded.
After the completion of program upgrading, the ROMPaq is deleted, and moving to second subregion will be migratedMove data recovery to first subregion.
By above-described embodiment, in the case of the first local partitioned storage insufficient space of terminal device,By the Data Migration of the first subregion to the second subregion so that the first subregion possesses enough space upgradingsProgram, it is achieved thereby that system upgrade is operated.
Fig. 4 is the structured flowchart of the terminal device according to the application one embodiment, as shown in figure 4, instituteStating terminal device at least includes:Space judge module 410, Data Migration module 420 and download program andUpgraded module 430, is described below in detail the 26S Proteasome Structure and Function of each module.
Space judge module 410, in terminal device system upgrade, judging the free time of terminal deviceWhether memory space is large enough to hold ROMPaq;
Data Migration module 420, upgrading journey can not be accommodated for the idle storage space in terminal deviceIn the case of sequence, storage size of still needing is calculated, the terminal is determined according to storage size of still needingMigrating data in equipment, and the migrating data of the determination is migrated to cloud server;Wherein, instituteState Data Migration module 420 and scan the data stored in the terminal device, according to data type and/or mostUse time determines the migrating data in the terminal device afterwards;
Download program and upgraded module 430, for being downloaded to the ROMPaq by upgrade serverThe terminal device go forward side by side line program upgrading.
Fig. 5 is the structured flowchart of the terminal device according to another embodiment of the application, as shown in figure 5, instituteStating terminal device includes:Space judge module 510, Data Migration module 520, download program and upgrading mouldBlock 530, acquisition module 540, removing module 550 and data recovery module 560.
Wherein, space judge module 510, Data Migration module 520 and download program and upgraded module 530Respectively with the space judge module 410 shown in Fig. 4, Data Migration module 420 and download program and literLevel module 430 is similar to, and here is omitted.
Acquisition module 540 is used to obtain respectively the free time of the ROMPaq size and the terminal deviceStorage size, further, the acquisition module 540 can be obtained by the upgrade serverUpgrade information, and the ROMPaq size is obtained according to the upgrade information.Further, the numberIt is used for according to transferring module 520 empty according to the idle storage of the ROMPaq size and the terminal deviceBetween size calculate described in still need storage size.
Removing module 550 is used for after the completion of program upgrading, deletes the ROMPaq;Data recovery module560 are used to migrate to the migrating data of the cloud server to recover to the terminal device.
Embodiment shown in Fig. 4 and Fig. 5 describes to enter terminal local Data Migration to cloud serverThe technical scheme of row data backup.
Fig. 6 is the structured flowchart of the terminal device according to another embodiment of the application, as shown in fig. 6, instituteStating terminal device includes:
Space judge module 610, in terminal device system upgrade, judging the first of terminal deviceWhether the idle storage space of subregion is large enough to hold ROMPaq.
Data Migration module 620, for liter can not to be accommodated in the idle storage space of first subregionIn the case of level program, storage size of still needing is calculated, according to storage size of still needing determinesMigrating data in first subregion, and the migrating data of the determination is migrated to the of the terminal deviceTwo subregions.
For example, for linux system, the first above-mentioned subregion can be data subregions, second pointArea can be sdcard subregions or cache subregions.Certainly difference can also be chosen in other examplesSubregion, the application is not limited to this.
Further, the idle storage that the ROMPaq size and first subregion are obtained respectively is emptyBetween size, further according to the ROMPaq size and the big subtotal of idle storage space of first subregionStill needed storage size described in calculating.
Download program and upgraded module 630, for being downloaded to the ROMPaq by upgrade serverFirst subregion go forward side by side line program upgrading.
Additionally, after the completion of program upgrading, deleting the ROMPaq, and will migrate to described second pointThe migrating data in area is recovered to first subregion.
Embodiment shown in Fig. 6 is described each subregion is locally stored and carries out the technical scheme of Data Migration.
The operating procedure of the present processes is corresponding with the architectural feature of device, can be with cross-referenced, no longerRepeat one by one.
In sum, according to the technical scheme of the application, when terminal system current memory space is less than upgradingIt is required that memory space after, by the data file of terminal local move to cloud server so as to vacate enoughLocal storage space, and then the ROMPaqs such as application program, system firmware are smoothly downloaded into terminal sheetGround simultaneously carries out system upgrade.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computerProgram product.Therefore, the application can be soft using complete hardware embodiment, complete software embodiment or combinationThe form of the embodiment of part and hardware aspect.And, the application can be used and wherein included at one or moreHave computer usable program code computer-usable storage medium (including but not limited to magnetic disk storage,CD-ROM, optical memory etc.) on implement computer program product form.
In a typical configuration, computing device include one or more processors (CPU), input/Output interface, network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memoryAnd/or the form, such as read-only storage (ROM) or flash memory (flash such as Nonvolatile memory (RAM)RAM).Internal memory is the example of computer-readable medium.
Computer-readable medium includes that permanent and non-permanent, removable and non-removable media can be byAny method or technique realizes information Store.Information can be computer-readable instruction, data structure,The module of program or other data.The example of the storage medium of computer includes, but are not limited to phase transition internal memory(PRAM), static RAM (SRAM), dynamic random access memory (DRAM),Other kinds of random access memory (RAM), read-only storage (ROM), electrically erasableRead-only storage (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage(CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic cassette tape, tape magneticDisk storage or other magnetic storage apparatus or any other non-transmission medium, can be used for storage can be countedThe information that calculation equipment is accessed.Defined according to herein, computer-readable medium does not include that temporary computer canRead media (transitory media), such as data-signal and carrier wave of modulation.
Also, it should be noted that term " including ", "comprising" or its any other variant be intended to it is non-It is exclusive to include, so that process, method, commodity or equipment including a series of key elements are not onlyIncluding those key elements, but also other key elements including being not expressly set out, or also include being thisProcess, method, commodity or the intrinsic key element of equipment.In the absence of more restrictions, by languageThe key element that sentence "including a ..." is limited, it is not excluded that in the process including the key element, method, businessAlso there is other identical element in product or equipment.
Embodiments herein is the foregoing is only, the application is not limited to.For this areaFor technical staff, the application can have various modifications and variations.It is all spirit herein and principle itInterior made any modification, equivalent substitution and improvements etc., should be included in claims hereof scopeWithin.