Disclosure of Invention
The disclosure provides an upgrade method, apparatus, and storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided an upgrade method applied to an electronic device, including:
according to the file identification of the current file to be upgraded, determining a target upgrade package corresponding to the current file to be upgraded from a set upgrade package set; wherein the setting the upgrade package set comprises: at least one upgrade package which is manufactured according to the file type classification of each file to be upgraded;
upgrading the current file to be upgraded by using the target upgrading packet according to an upgrading strategy corresponding to the current file to be upgraded;
and the upgrading strategies corresponding to the files to be upgraded in different types are different.
Optionally, the method further includes:
determining the priority for upgrading each file to be upgraded according to the file type of each file to be upgraded;
and sequencing the priority of each file to be upgraded according to a set sequence, and determining the current file to be upgraded from each file to be upgraded according to a sequencing result.
Optionally, determining, from the set upgrade package set, a target upgrade package corresponding to the current file to be upgraded includes:
determining a target compression package containing the target upgrading package from the set upgrading package set;
and downloading the target compression package, and decompressing the target compression package to obtain the target upgrading package.
Optionally, the upgrading the current file to be upgraded by using the upgrade package corresponding to the current file to be upgraded according to the upgrade policy corresponding to the current file to be upgraded includes:
if the current file to be upgraded is the system firmware of the electronic equipment, determining whether the version of the current installation package of the system firmware is lower than that of the target upgrade package;
and if the version of the current installation package of the system firmware is lower than the version of the target upgrading package, upgrading the system firmware according to the target upgrading package.
Optionally, the upgrading the current file to be upgraded by using the upgrade package corresponding to the current file to be upgraded according to the upgrade policy corresponding to the current file to be upgraded includes:
if the current file to be upgraded is a source code resource file, downloading the target upgrade package to a memory storage space corresponding to the source code resource file;
and compiling the target upgrading packet in the memory storage space, and upgrading the source code resource file.
Optionally, the upgrading the current file to be upgraded by using the upgrade package corresponding to the current file to be upgraded according to the upgrade policy corresponding to the current file to be upgraded includes:
if the current file to be upgraded is an application program file, determining the number of application programs of the electronic equipment in the running state;
and under the condition that the number of the application programs in the current running state is lower than a set number threshold, upgrading the application program files by using the target upgrading package.
Optionally, the method further includes:
determining whether the upgrading time for upgrading the application program file is longer than a set time;
and if the upgrading time length is longer than the set time length, switching the application program file from a desktop upgrading mode to a background upgrading mode.
According to a second aspect of the embodiments of the present disclosure, there is provided an upgrade apparatus applied to an electronic device, including:
the first determining module is configured to determine a target upgrade package corresponding to a current file to be upgraded from a set upgrade package set according to a file identifier of the current file to be upgraded; wherein the setting the upgrade package set comprises: at least one upgrade package which is manufactured according to the file type classification of each file to be upgraded;
the upgrading module is configured to upgrade the current file to be upgraded by using the target upgrading packet according to an upgrading strategy corresponding to the current file to be upgraded;
and the upgrading strategies corresponding to the files to be upgraded in different types are different.
Optionally, the apparatus further comprises:
the second determining module is configured to determine the priority for upgrading each file to be upgraded according to the file type of each file to be upgraded;
and the third determining module is configured to sort the priority levels of the files to be upgraded according to a set sequence, and determine the current files to be upgraded from the files to be upgraded according to a sorting result.
Optionally, the first determining module is further configured to:
determining a target compression package containing the target upgrading package from the set upgrading package set;
and downloading the target compression package, and decompressing the target compression package to obtain the target upgrading package.
Optionally, the upgrade module is further configured to:
if the current file to be upgraded is the system firmware of the electronic equipment, determining whether the version of the current installation package of the system firmware is lower than that of the target upgrade package;
and if the version of the current installation package of the system firmware is lower than that of the target upgrading package, upgrading the system firmware according to the target upgrading package.
Optionally, the upgrade module is further configured to:
if the current file to be upgraded is a source code resource file, downloading the target upgrade package to a memory storage space corresponding to the source code resource file;
and compiling the target upgrading packet in the memory storage space, and upgrading the source code resource file.
Optionally, the upgrade module is further configured to:
if the current file to be upgraded is an application program file, determining the number of application programs of the electronic equipment in the running state;
and under the condition that the number of the application programs in the current running state is lower than a set number threshold, upgrading the application program files by using the target upgrading package.
Optionally, the apparatus further comprises:
the fourth determining module is configured to determine whether the upgrading time for upgrading the application program file is longer than the set time;
and the switching module is configured to switch the application program file from a desktop upgrading mode to a background upgrading mode if the upgrading duration is longer than the set duration.
According to a third aspect of the embodiments of the present disclosure, there is provided an upgrade apparatus, including:
a processor;
a memory configured to store processor-executable instructions;
wherein the processor is configured to: when executed, implement the steps of any of the upgrade methods of the first aspect described above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer readable storage medium having instructions thereon, which when executed by a processor of an upgrade apparatus, enable the apparatus to perform the steps of any one of the upgrade methods of the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the disclosure, a target upgrade package corresponding to a current file to be upgraded can be determined from a set upgrade package set according to a file identifier of the file to be upgraded, and the current file to be upgraded is upgraded by using the target upgrade package according to an upgrade strategy corresponding to the current file to be upgraded. On one hand, each upgrade package in the set upgrade package set is manufactured according to the file type of each file to be upgraded in a classified mode, each upgrade package can be downloaded in a classified mode in the upgrade process, and compared with the mode of downloading the whole upgrade package set, flexibility of upgrading resource allocation can be improved. On the other hand, the method and the device can set different upgrading strategies according to different types of files to be upgraded, so that the files to be upgraded of different types can be upgraded according to different strategies in the upgrading process, the upgrading waiting time is reduced, and the upgrading flexibility is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The embodiment of the disclosure provides a file upgrading method, which can be applied to electronic equipment. Fig. 1 is a flowchart illustrating an upgrading method according to an exemplary embodiment, as shown in fig. 1, the method mainly includes the following steps:
in step 101, according to a file identifier of a current file to be upgraded, determining a target upgrade package corresponding to the current file to be upgraded from a set of upgrade packages; wherein the setting the upgrade package set comprises: at least one upgrade package which is manufactured according to the file type classification of each file to be upgraded;
in step 102, upgrading the current file to be upgraded by using the target upgrade package according to an upgrade strategy corresponding to the current file to be upgraded;
and the upgrading strategies corresponding to the files to be upgraded in different types are different.
The upgrading method related in the embodiments of the present disclosure may be applied to an electronic device, where the electronic device includes a mobile terminal and a fixed terminal, where the mobile terminal includes: mobile phones, tablet computers, notebook computers, and the like; the fixed terminal includes: a personal computer. In other optional embodiments, the upgrade method may also be executed in a network side device, where the network side device includes: servers, processing centers, etc. In some embodiments, the technical solution in the present disclosure can be applied in a scenario of remote upgrading a service program and repairing and updating related problems of an electronic device.
Here, the current file to be upgraded may be at least one of system firmware, a source resource file, and an application file to be upgraded at present. In the implementation process, a file identifier can be set for each file to be upgraded, and the file identifier is used for uniquely identifying each file to be upgraded. The file identifier may be a letter, a code, or a character, as long as the file identifier can be used to identify each file to be upgraded, and is not specifically limited herein.
In the embodiment of the present disclosure, taking the electronic device as a terminal device as an example, after the terminal device determines the current file to be upgraded, the file identifier of the current file to be upgraded may be determined, and after the file identifier of the current file to be upgraded is determined, the request information carrying the file identifier may be sent to the server. After receiving the request information, the server can analyze the file identifier of the current file to be upgraded from the request information, query a set upgrade package set based on the file identifier, determine a target upgrade package corresponding to the current file to be upgraded from the set upgrade package set, and send the target upgrade package to the terminal device.
After receiving the target upgrade package sent by the server, the terminal device may upgrade the current file to be upgraded by using the target upgrade package. In some embodiments, the target upgrade package may be a differential package containing upgrade information between two adjacent versions, wherein the two adjacent versions may be: the current version of the current file to be upgraded and the latest version of the current file to be upgraded. Taking the target upgrade package as the differential package as an example, in the embodiment of the present disclosure, the current version of the current file to be upgraded may be updated based on the upgrade information in the differential package, and the current file to be upgraded is upgraded from the current version to the latest version.
In some embodiments, the upgrade package to which the present disclosure relates may be an OTA upgrade package.
In the embodiment of the disclosure, a target upgrade package corresponding to a current file to be upgraded can be determined from a set upgrade package set according to a file identifier of the file to be upgraded, and the current file to be upgraded is upgraded by using the target upgrade package according to an upgrade strategy corresponding to the current file to be upgraded. On one hand, each upgrade package in the set upgrade package set is manufactured according to the file type of each file to be upgraded in a classified mode, each upgrade package can be downloaded in a classified mode in the upgrade process, and compared with the mode of downloading the whole upgrade package set, flexibility of upgrading resource allocation can be improved. On the other hand, the method and the device can set different upgrading strategies according to different types of files to be upgraded, so that the files to be upgraded of different types can be upgraded according to different strategies in the upgrading process, the upgrading waiting time is reduced, and the upgrading flexibility is improved.
In some embodiments, the method further comprises:
determining the priority for upgrading each file to be upgraded according to the file type of each file to be upgraded;
and sequencing the priority of each file to be upgraded according to a set sequence, and determining the current file to be upgraded from each file to be upgraded according to a sequencing result.
In some embodiments, the method further comprises: and determining the file type of each file to be upgraded. Here, after determining the file type of each file to be upgraded, the priority for upgrading each file to be upgraded may be determined according to the file type. For example, a first priority for upgrading a first type of file to be upgraded is higher than a second priority for upgrading a second type of file to be upgraded; the second priority for upgrading the file to be upgraded of the second type is higher than the third priority for upgrading the file to be upgraded of the third type … …, the M-1 priority for upgrading the file to be upgraded of the M-1 type is higher than the M-1 priority for upgrading the file to be upgraded of the M type.
For another example, taking the files to be upgraded respectively as the system firmware, the source code resource file and the application program file, the priority for upgrading the system firmware is higher than the priority for upgrading the source code resource file, and the priority for upgrading the source code resource file is higher than the priority for upgrading the application program file. The system firmware can be a program written into an erasable programmable read only memory or an electrically erasable programmable read only memory; the source code resource file can be a file containing information such as source codes or documents; the application files may be computer program files that are developed to run on top of the operating system in order to accomplish a certain set task or tasks, and may be an integral part of the software.
In the embodiment of the present disclosure, the priorities of the files to be upgraded may be sorted from high to low to obtain a sorting result, and then the current file to be upgraded is determined from the files to be upgraded according to the sorting result. For example, the file to be upgraded with the highest priority may be determined as the current file to be upgraded.
In other embodiments, the priorities of the files to be upgraded can be sorted from low to high to obtain a sorting result, and then the current file to be upgraded is determined from the files to be upgraded according to the sorting result.
In the embodiment of the disclosure, the priority for upgrading each file to be upgraded can be determined according to the file type of each file to be upgraded, and when the file is prepared to be upgraded, the upgrading sequence of each file to be upgraded can be sequenced according to the priority of each file to be upgraded, so that the file with higher priority can be upgraded preferentially, and the upgrading of each file to be upgraded can be successfully completed on the basis of ensuring the normal operation of the electronic equipment.
In some embodiments, the determining, from the set of upgrade packages, a target upgrade package corresponding to the current file to be upgraded includes:
determining a target compression package containing the target upgrading package from the set upgrading package set;
and downloading the target compression package, and decompressing the target compression package to obtain the target upgrading package.
In the embodiment of the present disclosure, after the preparation of each upgrade package is completed, each upgrade package can be compressed to obtain a compressed package of each upgrade package, and each compressed package is uploaded to the server. Therefore, the uploading speed of the upgrade package can be improved, and the uploading time and the uploading flow are saved.
Correspondingly, after the file identifier of the current file to be upgraded is obtained, a target compression package containing the target upgrade package can be determined from the set upgrade package set based on the file identifier, and the electronic device can download the target compression package from the server and locally decompress the target compression package to obtain the target upgrade package. Because the compression package is downloaded, and the compression package is smaller than the upgrade package, the file of the compression package is smaller, so that the speed of the electronic equipment for downloading the target upgrade package can be increased, the downloading flow can be saved, and the experience of the user for using the electronic equipment is improved.
In some embodiments, the upgrading the current file to be upgraded by using an upgrade package corresponding to the current file to be upgraded according to an upgrade policy corresponding to the current file to be upgraded includes:
if the current file to be upgraded is the system firmware of the electronic equipment, determining whether the version of the current installation package of the system firmware is lower than that of the target upgrade package;
and if the version of the current installation package of the system firmware is lower than the version of the target upgrading package, upgrading the system firmware according to the target upgrading package.
Here, the system firmware may be a program written in an erasable programmable read only memory or an electrically erasable programmable read only memory. When the current upgrade file is determined to be the system firmware of the electronic device, the version matching downloading can be performed, whether the current version of the current installation package of the system firmware is lower than the latest version or not is determined, and if the current version of the current installation package is lower than the latest version, the system firmware can be upgraded directly based on the target upgrade package. For example, when the target upgrade patch is a differential patch, the differential patch may be updated to the current version of the current file to be upgraded in a patching manner, so as to implement differential upgrade on the current file to be upgraded.
Taking the current version as V3 for example, if the latest version is V5, the current version is determined to be lower than the latest version, and at this time, the system firmware needs to be upgraded based on the target upgrade package. Or for example, if the current version is V3, if the latest version is V2, the current version is determined to be higher than the latest version, and at this time, the system firmware does not need to be upgraded.
In some embodiments, before the current file to be upgraded is upgraded, a path may be designated on the electronic device side, the file identifier matching may be performed on the current file to be upgraded, the current version of the current file to be upgraded is compared with the latest version, if the current version is lower than the latest version, the target upgrade package may be downloaded, and the current version may be upgraded based on the target upgrade package.
In other embodiments, the target compression package including the target upgrade package may be downloaded, and after the downloading is completed, the target compression package may be decompressed, and since the downloaded target compression package is smaller, the traffic may be saved and the downloading speed may be increased, and since the target compression package is decompressed faster at the local end of the electronic device, the decompressing speed of the compression package may be increased.
Because the priority of the system firmware is higher, in the embodiment of the disclosure, after the versions of the system firmware are matched, the system firmware is directly upgraded, so that the upgrading of the system firmware can be completed in the boot stage of the electronic device, and the use of the electronic device and the subsequent upgrading of other types of files cannot be influenced.
In some embodiments, the upgrading the current file to be upgraded by using an upgrade package corresponding to the current file to be upgraded according to an upgrade policy corresponding to the current file to be upgraded includes:
if the current file to be upgraded is a source code resource file, downloading the target upgrade package to a memory storage space corresponding to the source code resource file;
and compiling the target upgrading packet in the memory storage space, and upgrading the source code resource file.
Here, the source resource file may be a file containing information such as source code or a document. In the implementation process, if it is determined that the current file to be upgraded is the source code resource file, the target upgrade package of the source code resource file can be directly downloaded to the memory storage space corresponding to the source code resource file, and the target upgrade package is compiled in the memory storage space to upgrade the source code resource file. Here, the source resource file may be a non-image file.
Compared with the prior art that the target upgrade package is downloaded to the hard disk storage space, the target upgrade package is transmitted to the memory storage space from the hard disk storage space through the input/output interface, and the current file to be upgraded is upgraded in the memory storage space, in the embodiment of the disclosure, the transmission process of the input/output interface can be skipped, and the target upgrade package is directly downloaded to the corresponding memory storage space, so that the issuing speed of the target upgrade package can be increased, the backup speed of the upgrade package is increased, and the waiting time required by upgrading is shortened.
In some embodiments, the upgrading the current file to be upgraded by using an upgrade package corresponding to the current file to be upgraded according to an upgrade policy corresponding to the current file to be upgraded includes:
if the current file to be upgraded is an application program file, determining the number of application programs of the electronic equipment in a running state;
and under the condition that the number of the application programs in the current running state is lower than a set number threshold, upgrading the application program files by using the target upgrading package.
Here, the application program file may be a computer program file that is developed to run on an operating system in order to perform a certain set task or tasks, and may be a component of software. In the embodiment of the disclosure, when the current file to be upgraded is an application program file, the number of application programs currently running on the electronic device may be determined, and when the number of application programs currently running is lower than a set number threshold, it indicates that the processor of the current electronic device is idle, and at this time, the application program file may be upgraded using the target upgrade package.
In some embodiments, if the current file to be upgraded is an application file, it may be determined whether a processor of the electronic device is currently in an idle state, and if the processor of the electronic device is currently in the idle state, the application file may be upgraded using the target upgrade package.
In other embodiments, a processor usage rate of the electronic device may be determined and a determination may be made as to whether the processor usage rate is less than or equal to a set threshold; when the processor utilization rate is smaller than or equal to the set threshold value, the processor of the electronic device is determined to be in an idle state currently. In other embodiments, when the processor usage is greater than a set threshold, then it is determined that the processor of the electronic device is currently in a non-idle state.
Because the application program file can not influence the use function of the electronic equipment, when the file to be upgraded is determined to be the application program file, the application program file can be not upgraded firstly, whether the processor of the electronic equipment is in an idle state or not is determined firstly, and when the processor of the electronic equipment is in the idle state, the application program file is upgraded, so that the processor resource of the electronic equipment can be fully utilized on the basis of ensuring the success rate of upgrading other files with higher priority.
In some embodiments, the method further comprises:
determining whether the upgrading time for upgrading the application program file is longer than a set time;
and if the upgrading time length is longer than the set time length, switching the application program file from a desktop upgrading mode to a background upgrading mode.
Here, the upgrade duration may be a period from a start time at which the upgrade of the application file is started to a current time. In the embodiment of the disclosure, the application program file may be directly upgraded in a desktop upgrade mode, that is, upgrade information of the application program, for example, information such as an upgrade progress and a version number, may be displayed on a desktop of a display screen of the electronic device.
In the process of upgrading the application program file, the upgrading time length of the application program file can be obtained in real time, whether the upgrading time length is longer than the set time length or not is determined, and if the upgrading time length is longer than the set time length, the application program file is switched from a desktop upgrading mode to a background upgrading mode, namely upgrading information of the application program, such as upgrading progress, version number and the like, is hidden.
In the embodiment of the disclosure, the upgrading time for upgrading the current file to be upgraded can be monitored in real time, and after the set time is reached during upgrading, background invisible upgrading is performed, so that a user cannot perceive the upgrading process of the application program file, other functions of the user using the electronic equipment are not affected, and further user experience is improved.
In some embodiments, the technical solution in the present disclosure can be applied in a scenario of remote upgrading a service program and repairing and updating related problems of an electronic device.
Fig. 2 is a schematic flow chart diagram illustrating another upgrading method according to an exemplary embodiment, as shown in fig. 2, the method mainly includes the following steps:
in step 201, an upgrade package is made.
Here, the upgrade package of the system firmware to be upgraded, the source resource file, and the Application (App) file may be classified and made, and the priority of each file to be upgraded may be sorted in a set order. The priority of the system firmware is the highest, and the priority of the source code resource file with the lowest priority of the application program file is between the priority of the system firmware and the priority of the application program file.
In the implementation process, the system firmware to be upgraded, the source code resource file and the application program file can be compiled by the server side according to the specified path to obtain the upgrade package of each file, the upgrade package of each file is compressed, and the compressed upgrade package is uploaded to the server.
In step 202, the versions match the download.
Before the file to be upgraded is upgraded, a path can be designated on the electronic equipment side, the file identifier matching can be carried out on the current file to be upgraded, the current version of the file to be upgraded is compared with the latest version, and if the current version is lower than the latest version, the compression package containing the upgrade package is downloaded. After the downloading is finished, the compression packet can be decompressed, the flow can be saved and the downloading speed can be improved due to the fact that the downloaded compression packet is small, and the decompression speed of the compression packet can be improved due to the fact that the target compression packet is decompressed fast at the local end of the electronic equipment.
In step 203, the resource is compiled for matching.
Here, if it is determined that the current file to be upgraded is the source code resource file, the target upgrade package of the source code resource file may be directly downloaded to the memory storage space corresponding to the source code resource file, and the target upgrade package is compiled in the memory storage space to upgrade the source code resource file. Here, the source resource file may be a non-image file.
In the embodiment of the disclosure, the process of transmission of the input/output interface can be skipped, and the target upgrade patch is directly downloaded to the corresponding memory storage space, so that not only can the issuing speed of the target upgrade patch be increased, but also the backup speed of the upgrade patch is accelerated. Taking the electronic device as an example, in the technical scheme of the disclosure, the terminal device can execute a parallel upgrade process in a communication gap.
In step 204, the desktop application is upgraded.
Here, since the application file is a third-party path file that does not affect the basic function of the electronic device, when the current file to be upgraded is the application file, it may be determined whether the processor of the electronic device is currently in an idle state, and if the processor of the electronic device is currently in an idle state, the application file may be upgraded using the target upgrade package.
In the process of upgrading the application program file, the upgrading time length of the application program file can be obtained in real time, whether the upgrading time length is longer than the set time length or not is determined, and if the upgrading time length is longer than the set time length, the application program file is switched from a desktop upgrading mode to a background upgrading mode, namely upgrading information of the application program, such as upgrading progress, version number and the like, is hidden.
In the embodiment of the disclosure, the upgrading time for upgrading the current file to be upgraded can be monitored in real time, and when the upgrading time reaches the set time, background invisible upgrading is performed, so that a user cannot perceive the upgrading process of the application program file, other functions of the user using the electronic equipment are not affected, and further user experience is improved.
The technical scheme of the method mainly comprises upgrading modules such as upgrading package manufacturing, version matching downloading, resource matching compiling, desktop application upgrading and the like. In the process of manufacturing the upgrade package, the size of the upgrade package uploaded to the server can be reduced, files to be upgraded are classified and compiled, the upload speed of the upgrade package can be increased, and upload time and upload flow are saved.
When the processor of the electronic equipment is in an idle state, the application program file is upgraded, and the processor resource of the electronic equipment can be fully utilized on the basis of ensuring the success rate of upgrading other files with higher priority.
The updating of files such as source files, interface documents and the like is not required to be transmitted through an input/output interface, but is directly decompressed to the corresponding memory storage space for compiling, the transmission process of the input/output interface can be skipped, and the target upgrade package is directly downloaded to the corresponding memory storage space, so that the issuing speed of the target upgrade package can be increased, the backup speed of the upgrade package is increased, and the waiting time required by upgrading is shortened.
FIG. 3 is a block diagram illustrating an upgrade apparatus according to an example embodiment. As shown in fig. 3, the upgrade apparatus 300 is applied to an electronic device, and mainly includes:
a first determining module 301, configured to determine, according to a file identifier of a current file to be upgraded, a target upgrade package corresponding to the current file to be upgraded from a set upgrade package set; wherein the setting the upgrade package set comprises: at least one upgrade package which is manufactured according to the file type classification of each file to be upgraded;
the upgrading module 302 is configured to upgrade the current file to be upgraded by using the target upgrading packet according to an upgrading strategy corresponding to the current file to be upgraded;
and the upgrading strategies corresponding to the files to be upgraded in different types are different.
In some embodiments, the apparatus 300 further comprises:
the second determining module is configured to determine the priority for upgrading each file to be upgraded according to the file type of each file to be upgraded;
and the third determining module is configured to sort the priority levels of the files to be upgraded according to a set sequence, and determine the current files to be upgraded from the files to be upgraded according to a sorting result.
In some embodiments, the first determining module 301 is further configured to:
determining a target compression package containing the target upgrading package from the set upgrading package set;
and downloading the target compression package, and decompressing the target compression package to obtain the target upgrading package.
In some embodiments, the upgrade module 302 is further configured to:
if the current file to be upgraded is the system firmware of the electronic equipment, determining whether the version of the current installation package of the system firmware is lower than that of the target upgrade package;
and if the version of the current installation package of the system firmware is lower than the version of the target upgrading package, upgrading the system firmware according to the target upgrading package.
In some embodiments, the upgrade module 302 is further configured to:
if the current file to be upgraded is a source code resource file, downloading the target upgrade package to a memory storage space corresponding to the source code resource file;
and compiling the target upgrading packet in the memory storage space, and upgrading the source code resource file.
In some embodiments, the upgrade module 302 is further configured to:
if the current file to be upgraded is an application program file, determining the number of application programs of the electronic equipment in the running state;
and under the condition that the number of the application programs in the current running state is lower than a set number threshold, upgrading the application program files by using the target upgrading package.
In some embodiments, the apparatus 300 further comprises:
the fourth determining module is configured to determine whether the upgrading time for upgrading the application program file is longer than the set time;
and the switching module is configured to switch the application program file from a desktop upgrading mode to a background upgrading mode if the upgrading duration is longer than the set duration.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 4 is a block diagram illustrating an upgrade apparatus 1200 according to an example embodiment. For example, the apparatus 1200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, the apparatus 1200 may include one or more of the following components: processing component 1202, memory 1204, power component 1206, multimedia component 1208, audio component 1210, input/output (I/O) interface 1212, sensor component 1214, and communications component 1216.
The processing component 1202 generally controls overall operation of the device 1200, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 1202 may include one or more processors 1220 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 1202 can include one or more modules that facilitate interaction between the processing component 1202 and other components. For example, the processing component 1202 can include a multimedia module to facilitate interaction between the multimedia component 1208 and the processing component 1202.
The memory 1204 is configured to store various types of data to support operation at the device 1200. Examples of such data include instructions for any application or method operating on the device 1200, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1204 may be implemented by any type or combination of volatile and non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A power supply component 1206 provides power to the various components of the device 1200. Power components 1206 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for apparatus 1200.
The multimedia components 1208 include a screen that provides an output interface between the device 1200 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1208 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 1200 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
Audio component 1210 is configured to output and/or input audio signals. For example, audio component 1210 includes a Microphone (MIC) configured to receive external audio signals when apparatus 1200 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 1204 or transmitted via the communications component 1216. In some embodiments, audio assembly 1210 further includes a speaker for outputting audio signals.
The I/O interface 1212 provides an interface between the processing component 1202 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 1214 includes one or more sensors for providing various aspects of state assessment for the apparatus 1200. For example, the sensor assembly 1214 may detect an open/closed state of the device 1200, the relative positioning of the components, such as a display and keypad of the apparatus 1200, the sensor assembly 1214 may also detect a change in the position of the apparatus 1200 or a component of the apparatus 1200, the presence or absence of user contact with the apparatus 1200, an orientation or acceleration/deceleration of the apparatus 1200, and a change in the temperature of the apparatus 1200. The sensor assembly 1214 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 1214 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1214 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communications component 1216 is configured to facilitate communications between the apparatus 1200 and other devices in a wired or wireless manner. The apparatus 1200 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1216 receives the broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 1216 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 1200 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as memory 1204 comprising instructions, executable by processor 1220 of apparatus 1200 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of an upgrading device, enable the upgrading device to perform a method of upgrading, the method comprising:
according to the file identification of the current file to be upgraded, determining a target upgrade package corresponding to the current file to be upgraded from a set upgrade package set; wherein the setting the upgrade package set comprises: at least one upgrade package which is manufactured according to the file type classification of each file to be upgraded;
upgrading the current file to be upgraded by using the target upgrading packet according to an upgrading strategy corresponding to the current file to be upgraded;
and the upgrading strategies corresponding to the files to be upgraded in different types are different.
FIG. 5 is a block diagram illustrating another apparatus 1300 for upgrading according to an example embodiment. For example, the apparatus 1300 may be provided as a server. Referring to fig. 5, apparatus 1300 includes a processing component 1322, which further includes one or more processors, and memory resources, represented by memory 1332, for storing instructions, such as application programs, that may be executed by processing component 1322. The application programs stored in memory 1332 may include one or more modules that each correspond to a set of instructions. Further, processing component 1322 is configured to execute instructions to perform the upgrade method described above, the method comprising:
according to the file identification of the current file to be upgraded, determining a target upgrade package corresponding to the current file to be upgraded from a set upgrade package set; wherein the setting the upgrade package set comprises: at least one upgrade package which is manufactured according to the file type classification of each file to be upgraded;
upgrading the current file to be upgraded by using the target upgrading packet according to an upgrading strategy corresponding to the current file to be upgraded;
and the upgrading strategies corresponding to the files to be upgraded in different types are different.
The apparatus 1300 may also include a power component 1326 configured to perform power management for the apparatus 1300, a wired or wireless network interface 1350 configured to connect the apparatus 1300 to a network, and an input-output (I/O) interface 1358. The apparatus 1300 may operate based on an operating system stored in the memory 1332, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.