Disclosure of Invention
The embodiment of the invention provides an application updating method and device, and at least solves the technical problem that in the related art, when application updating is carried out, updating cannot be interrupted, and user experience is reduced.
According to an aspect of an embodiment of the present invention, there is provided an application update method, including: determining that an application installed in a terminal needs to be updated; acquiring files required by updating the application, wherein all files of the application for updating are pre-stored in a network disk; and updating the application by using the file required by updating the application.
Further, obtaining a file required for updating the application includes: acquiring a network address of the terminal; searching a network disk with a network distance close to the network distance of the terminal according to the network address, wherein the network distance refers to a path through which a file is transmitted from the terminal to the network disk; and acquiring files required by updating the application from the network disks with similar network distances.
Further, searching for a network disk close to the network distance of the terminal according to the network address includes: and searching a network disk with a distance close to the network distance of the terminal in a pre-configured file according to the network address, wherein the network addresses of all network disks storing the updated file are stored in the pre-configured file.
Further, the network address includes an IP address.
According to another aspect of the embodiments of the present invention, there is also provided an application updating apparatus, including: the device comprises a determining unit, a judging unit and a judging unit, wherein the determining unit is used for determining that the application installed in the terminal needs to be updated; an obtaining unit, configured to obtain a file required to update the application, where all files of the application that are updated are pre-saved in a network disk; and the updating unit is used for updating the application by using the file required by updating the application.
Further, the acquisition unit includes: the first acquisition module is used for acquiring the network address of the terminal; the searching module is used for searching a network disk which is close to the network distance of the terminal according to the network address, wherein the network distance refers to a path through which the file is transmitted from the terminal to the network disk; and the second acquisition module is used for acquiring files required by updating the application from the network disks with similar network distances.
Further, the lookup module includes: and the searching submodule is used for searching the network disk with the network distance close to that of the terminal in a pre-configured file according to the network address, wherein the network addresses of all the network disks storing the updated file are stored in the pre-configured file.
Further, the network address includes an IP address.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium for storing a program, where the program, when executed on a processor, controls a device on which the storage medium is located to execute any one of the above-mentioned application update methods.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes to perform any one of the above application updating methods.
In the embodiment of the present invention, a message that an application installed in a terminal needs to be updated may be determined, and then a file needed by the updated application is obtained after the application needs to be updated, where the file is stored in a network disk, and after the file needed by the updated application is obtained, the application may be updated through the file. In the embodiment, the network disk can be used for storing the file of the application to be updated, the storage mode of the file of the application to be updated is changed, and the mode of downloading the file is more flexible, so that the technical problem that the updating cannot be interrupted when the application is updated, and the user experience is reduced in the related art is solved.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for applying updates, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
The following embodiments may be applied to all terminals, including but not limited to a mobile terminal, and in the present application, a terminal is described as an example, that is, the following embodiments are applied to an application update environment of a mobile terminal, a specific implementation location of an application update is not limited, in the related art, if an application installed in a terminal needs to be updated, generally, after an application update package is provided in a server, the update package is directly sent to the terminal, so as to perform the application update. In the embodiments described in the following embodiments of the present application, all files for updating an application are placed in a network disk, and are not in a server, and in the embodiments described in the following embodiments, files required by an update application are obtained autonomously, and an update message is not sent by an application update server, that is, the location for storing an update package can be changed by the network disk.
The invention will be described with reference to preferred implementation steps, and fig. 1 is a flow chart of an application update method according to an embodiment of the invention, as shown in fig. 1, the method includes the following steps:
and step S102, determining that the application installed in the terminal needs to be updated.
When it is determined that the application installed in the terminal needs to be updated, after an update file (such as an update package) is obtained, an application message to be updated is sent, and the application installed in the terminal needs to be updated through the application message to be updated.
In the present invention, the specific type and model of the terminal are not limited, and taking a mobile terminal as an example, the specific type and model of the terminal may include, but are not limited to: the smart device may be a smart device to which the application update method in this embodiment is applied, and one or more preset applications may be stored in the smart device, and the application may be used to control the smart device to perform related operations. Each terminal may have one or more applications installed therein, each of which may require application updates at different time periods to optimize or increase the functionality of the application. In general, when an application update is performed, a file to be updated may be set in advance, and the application update may be performed using the file. The application in the embodiment of the present invention may include, but is not limited to, APP installed in a terminal, and the like.
And step S104, acquiring files required by the update application, wherein all files of the application for updating are stored in a network disk in advance.
The files that need to be updated by the application may be stored in the network disk in advance, and the specific type of the network disk is not limited in the embodiment of the present invention, and may be a network disk used by a user corresponding to the terminal, or a network disk set for the application, and the files of all applications are stored in the network disk; meanwhile, the number of the network disks in the embodiment of the present invention is not specifically limited, and may be determined according to the size of the file of the stored application, for example, the file related to the application is stored in a plurality of network disks, where the network disks may be virtual storage disks, that is, a large amount of data may be stored by the network disks. When the application needs to be updated, the file to be updated can be stored in the network disk, so that the terminal can download the file of the application needing to be updated through the network.
Optionally, when the file required by the updated application is obtained, the network disk close to the network distance of the terminal may be searched according to the network address by obtaining the network address of the terminal, where the network distance is a path through which the file is transmitted from the terminal to the network disk; so as to obtain files required by the updated application from the network disks with similar network distances. The searching for the network disk close to the network distance of the terminal according to the network address may include: and searching a network disk close to the network distance of the terminal in a pre-configured file according to the network address, wherein the network addresses of all network disks storing the updated file are stored in the pre-configured file. That is, the network address of the terminal and the network address of the network disk in the embodiment of the present invention may be IP addresses. The network address of the terminal may include a mobile IP address of the mobile terminal, and the network disk close to the network distance of the terminal may be found through the network address, and when finding, the network disk close to the network distance of the terminal may be found in a preconfigured file according to the network address, and the network addresses of all network disks storing the update file are stored in the preconfigured file. That is, the network addresses of all the network disks may be saved in one file (for example, a network disk address file is set), and when a file required by the update application is obtained, if the network address of the terminal is obtained, the network address of the network disk closest to the network address of the terminal may be found in the file for saving the network addresses of the network disks.
Optionally, when obtaining the file required by the update application, the sorting order of the network disks may also be obtained, and the network disk with the optimal sorting is selected according to the sorting order of the network disks, so as to obtain the file required by the update application from the network disk with the optimal sorting. When the network disks are sorted, the sorting may be performed according to priorities of the network disks, where the priorities of the network disks are determined according to the size of a file required by the update application and a current transmission speed of each of the plurality of network disks, and the higher the transmission speed is, the higher the priority of the network disk may be.
In addition, when the sorting order of the network disks is obtained, the sorting order of the network disks can be determined according to the number of current downloading processes of each network disk in the plurality of network disks, the number of current downloading processes of the network disks refers to the number of tasks for downloading different files on the corresponding network disk at the current time point, the size and the downloading speed of the downloaded file corresponding to each downloading task also need to be obtained, the current load rate of each network disk is determined according to the number of current downloading processes of each network disk and the size and the downloading speed of the downloaded file corresponding to each downloading task, the current load rate indicates the number and the downloading speed of the downloading tasks which can be added into the corresponding network disk, and the files needed by updating the application can be obtained from the network disk according to the current load rate.
After the current load rate of each network disk is determined, the weight of each network disk can be determined according to the current load rate of each network disk, the priority sequence of the network disks can be determined according to the weight of each network disk, and when files required by the update application are obtained, the network disk where the files required by the update application are obtained can be determined according to the priority sequence of each network disk. When the weight of each network disk is determined according to the current load rate of each network disk, weighting processing may be performed on each network disk according to the current load rate of each network disk, and the weight of the network disk may be changed each time a download task is added to the network disk or the download speed decreases, for example, when the download task of the network disk increases or the download speed decreases, the weight of the network disk may be decreased, which means that the network disk is not suitable for receiving the download task again.
And step S106, updating the application by using the file required by the updated application.
When the application is updated by using the file required by the updated application, sandbox filtering processing may be performed on the file first, or security level scanning may be performed to determine the security level of the file, and when the security level of the file is greater than a preset security level, update processing on the application by using the file required by the updated application is determined.
Through the steps, the message that the application installed in the terminal needs to be updated can be determined, then the file needed by the updated application is obtained after the application needs to be updated, wherein the file is stored in the network disk, and after the file needed by the updated application is obtained, the application can be updated through the file. In the embodiment, the network disk can be used for storing the file of the application to be updated, the storage mode of the file of the application to be updated is changed, and the mode of downloading the file is more flexible, so that the technical problem that the updating cannot be interrupted when the application is updated, and the user experience is reduced in the related art is solved.
Fig. 2 is a schematic diagram of an application update apparatus according to an embodiment of the present invention, and as shown in fig. 2, the apparatus may include: a determining unit 21, configured to determine that an application installed in the terminal needs to be updated; an obtaining unit 23, configured to obtain files required by an update application, where all files of the application that are updated are pre-saved in a network disk; an updating unit 25, configured to update the application with a file required by the update application.
With the above application updating apparatus, the determining unit 21 determines that the application installed in the terminal needs to be updated, and then after determining that the application needs to be updated, the acquiring unit 23 acquires a file required for updating the application, where the file is stored in the network disk, and after acquiring the file required for updating the application, the updating unit 25 can update the application through the file. In the embodiment, the network disk can be used for storing the file of the application to be updated, the storage mode of the file of the application to be updated is changed, and the mode of downloading the file is more flexible, so that the technical problem that the updating cannot be interrupted when the application is updated, and the user experience is reduced in the related art is solved.
The acquiring unit 23 may include: the first acquisition module is used for acquiring the network address of the terminal; the searching module is used for searching a network disk which is close to the network distance of the terminal according to the network address, wherein the network distance refers to a path through which the file is transmitted from the terminal to the network disk; and the second acquisition module is used for acquiring files required by the updated application from the network disks with similar network distances.
For the above lookup module, it may include: and the searching submodule is used for searching the network disk with the distance close to the network distance of the terminal in a pre-configured file according to the network address, wherein the network addresses of all the network disks for storing the updated file are stored in the pre-configured file.
Optionally, the network address comprises an IP address.
The application updating device may further include a processor and a memory, the determining unit 21, the obtaining unit 23, the updating unit 25, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, files required by the application are stored and updated by the network disk through adjusting kernel parameters, so that the application is updated when needed, and the corresponding files are transmitted.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium for storing a program, where the program, when executed on a processor, controls an apparatus in which the storage medium is located to execute any one of the above-mentioned application updating methods.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes to perform any one of the above application updating methods.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: determining that an application installed in a terminal needs to be updated; acquiring files required by updating application, wherein all files of the application for updating are pre-stored in a network disk; and updating the application by using the file required by the updated application.
Optionally, the processor may further obtain a network address of the terminal when executing the program; searching a network disk with a similar network distance with the terminal according to the network address, wherein the network distance refers to a path through which the file is transmitted from the terminal to the network disk; so as to obtain files required by the updated application from the network disks with similar network distances.
Optionally, when executing the program, the processor may further search, according to the network address, a network disk that is close to the network distance of the terminal in a pre-configured file, where the network addresses of all network disks storing the update file are stored in the pre-configured file.
Optionally, the network address comprises an IP address.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: determining that an application installed in a terminal needs to be updated; acquiring files required by updating application, wherein all files of the application for updating are pre-stored in a network disk; and updating the application by using the file required by the updated application.
Optionally, when the data processing device executes the program, the data processing device may further obtain a network address of the terminal; searching a network disk with a similar network distance with the terminal according to the network address, wherein the network distance refers to a path through which the file is transmitted from the terminal to the network disk; so as to obtain files required by the updated application from the network disks with similar network distances.
Optionally, when the data processing device executes the program, the data processing device may further search, according to the network address, a network disk that is close to the network distance of the terminal in a pre-configured file, where the network addresses of all network disks storing the update file are stored in the pre-configured file.
Optionally, the network address comprises an IP address.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.