A method and device for downloading and installing an application, a terminal, and a storage medium
By setting priority in the mobile terminal based on the application download time and memory space, the problem of application installation when the mobile terminal is insufficient memory is solved, and the maximum download and installation efficiency is achieved.
Patent Information
- Application Number
- CN201811191657.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-10-12
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2039-01-02
AI Technical Summary
When there is insufficient memory space in the mobile terminal, how to reasonably install applications to maximize the use of memory space and avoid application download and installation failures caused by insufficient memory space.
By determining the download time and required memory space of each application, setting priority, and downloading and installing in priority order, ensuring that the installation strategy is reasonably planned when the memory space is insufficient to avoid conflicts.
It realizes the maximum download and installation of applications when the memory space of the mobile terminal is insufficient, avoids installation failures caused by insufficient memory, and improves the efficiency of memory space utilization.
Smart Images

Figure CN111045691B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of mobile communications, and relate to but are not limited to a method and device, a terminal, and a storage medium for downloading and installing an application. Background Art
[0002] With the rapid development of smart mobile terminals, the maturity of communication technology and the rapid development of networking, various industries have launched corresponding applications to facilitate people's lives. People will install a variety of applications on mobile terminals, such as video players, games, QQ, WeChat and other APPs (Applications). As the number of installed applications increases, how to reasonably use the memory space of mobile terminals has become an urgent problem to be solved. Summary of the invention
[0003] In view of this, embodiments of the present invention provide a method and device, a terminal, and a storage medium for downloading and installing an application program in order to solve at least one problem existing in the prior art.
[0004] An embodiment of the present invention provides a method for downloading and installing an application program, the method comprising:
[0005] When the current memory space is insufficient, determining the download time of each application in the download list and the memory space required by the corresponding application;
[0006] Determine the priority of each application according to the download time of each application in the download list and the memory space required by the corresponding application;
[0007] The download is completed according to the priority of each application.
[0008] An embodiment of the present invention further provides a device for downloading and installing an application program, the device comprising:
[0009] A first determining unit, configured to determine the download time of each application in the download list and the memory space required by the corresponding application when the current memory space is insufficient;
[0010] A second determining unit is configured to determine the priority of each application according to the download time of each application in the download list and the memory space required by the corresponding application;
[0011] The downloading unit is configured to complete the downloading according to the priority of each application.
[0012] An embodiment of the present invention further provides a terminal for implementing application download and installation, the terminal comprising: a memory and a processor, the memory storing a computer program executable on the processor, and the processor implementing the above-mentioned application download and installation method when executing the computer program.
[0013] An embodiment of the present invention further provides a computer-readable storage medium, in which computer-executable instructions are stored. The computer-executable instructions are configured to execute the above-mentioned method for downloading and installing an application.
[0014] Through the method provided by the embodiment of the present invention, when the memory space of the mobile terminal is insufficient, a reasonable installation strategy can be planned, and the applications to be downloaded can be downloaded and installed according to reasonable priorities, so that the applications to be downloaded can be downloaded and installed to the maximum extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic diagram of a method for downloading and installing an application according to an embodiment of the present invention;
[0016] Figure 2 A schematic diagram of another method flow for downloading and installing an application according to an embodiment of the present invention;
[0017] Figure 3A A schematic diagram of another method flow for downloading and installing an application according to an embodiment of the present invention;
[0018] Figure 3B A schematic diagram of a device structure for downloading and installing an application according to an embodiment of the present invention;
[0019] Figure 3C A schematic diagram of another method flow for downloading and installing an application according to an embodiment of the present invention;
[0020] Figure 3D A schematic diagram of another method flow for downloading and installing an application according to an embodiment of the present invention;
[0021] Figure 4 A schematic diagram of another device structure for downloading and installing an application according to an embodiment of the present invention;
[0022] Figure 5 A schematic diagram of a hardware entity of a terminal for downloading and installing an application in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] When a mobile terminal installs an application online, the installation process requires a larger memory space than the size of the application after installation. In particular, when installing an application online, the application can only be installed correctly when the available memory of the mobile terminal is large enough, and a certain amount of space will be released after the installation is complete. For example, when a mobile phone installs a 1G (GigaByte) application online, the mobile phone may need 2G of memory space to be installed correctly, and a certain amount of space will be released after the installation is complete. The application will eventually occupy only 1G of memory space. This creates a problem: when the memory of the mobile terminal is small, how to reasonably install the application to ensure maximum utilization of the memory space. For example, when the mobile phone currently has 1.1G of available memory space, a 500M (Mega Byte), a 200M and a 100M application are downloaded at the same time, and each application requires twice its own memory space to be correctly installed, then if the 200M and 100M applications are installed first, only 800M of memory space is left after the installation is completed, and continuing to install the 500M application requires 1G of memory space, then the 500M application cannot be correctly downloaded and installed. Therefore, the method provided by the embodiment of the present invention can plan a reasonable installation strategy so that the application can be downloaded and installed to the maximum extent.
[0024] The following is explained in conjunction with embodiments:
[0025] Embodiment 1
[0026] An embodiment of the present invention provides a method for downloading and installing an application program. The method is used in a mobile terminal device. When executing the method, the mobile terminal device can plan a reasonable installation strategy so that the application program can be downloaded and installed to the maximum extent. The functions implemented by the method can be implemented by calling program codes by a processor in the mobile terminal device. Of course, the program codes can be stored in a computer storage medium. It can be seen that the mobile terminal device at least includes a processor and a storage medium.
[0027] Figure 1 FIG. 1 is a flow chart of a method for downloading and installing an application program according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0028] Step S101: when the current memory space is insufficient, determine the download time of each application in the download list and the memory space required by the corresponding application;
[0029] The download list here is a list of applications to be downloaded that the mobile terminal specifies through the user or that the mobile terminal system automatically obtains. Download time refers to the time required to download each application, that is, the time from the start of download to the completion of download. Here you can set the time to start installation when the download is completed.
[0030] When downloading an application, the mobile terminal first obtains the memory space and download address required by the application, and downloads it through the download address. The memory space required by the application here may include the size of the installation package, the memory space required for installation after downloading, and the memory space required by the application after installation.
[0031] The mobile terminal measures the download speed of each application according to the current network bandwidth, and calculates the download time according to the download speed of each application and the memory space required by the application.
[0032] Step S102, determining the priority of each application according to the download time of each application in the download list and the memory space required by the corresponding application;
[0033] Here you need to sort the priorities according to the actual situation. You can put each application at a different priority and then download them one by one. You can also sort them according to the size of the memory space required by each application, for example, sort them from large to small and download them one by one. You can also put non-conflicting applications at the same priority and download them at the same time.
[0034] If applications with the same priority are downloaded at the same time and the download time is the same, that is, they are downloaded and installed at the same time, but the memory space required for the installation of these applications exceeds the remaining memory space of the mobile terminal, then a conflict will occur, resulting in failure to install normally. If applications with the same priority are downloaded at the same time, the memory space required for each application is different, and the download time is also different. If all the applications downloaded at the same time are not downloaded at the same time, they will not be installed at the same time, and there will be no conflict. Therefore, it is sufficient to download applications that will not conflict at the same priority.
[0035] In other embodiments, determining the priority of each application according to the download time of each application in the download list and the memory space required by the corresponding application includes:
[0036] The priority of each application is determined based on the download time of each application, the first memory space and the second memory space required by the application; wherein the first memory space is the memory space required for the application to be installed, and the first memory space is not less than the second memory space required after the corresponding application is installed.
[0037] The first memory space and the second memory space here are the memory space required for each application to be installed, and the memory space occupied by the application after installation. Generally, an application requires a larger memory space during installation, and after installation, it will automatically delete unnecessary installation files to free up some space. Therefore, if multiple applications are installed at the same time, they will need to occupy a larger memory space at the same time, causing conflicts and failures in normal installation.
[0038] By setting a reasonable priority according to the first memory space and the second memory space, the above-mentioned conflict can be avoided. However, whether the priority setting is reasonable or not will also be related to whether the application can be downloaded to the maximum extent in the end. Here, the application in the download list can be sorted from large to small according to the memory space required by the application, and downloaded in sequence. For example, suppose that the memory space required to install an application is twice the memory required by the application after downloading. When the download list contains a 200M application and a 500M application, that is, the memory space occupied by these two applications after downloading is 200M and 500M respectively, and 400M and 1G memory space are required respectively during installation. At this time, if the current available memory space of the mobile terminal is 1G, then if the 200M application is downloaded first, 800M memory space is left after installation, which is not enough to download and install the 500M application. On the contrary, if the 500M application is downloaded first, it just occupies all the 1G memory space during installation, and 500M memory space is released after installation, which is enough to download another 200M application. Therefore, here we put 500M applications in the first priority and 200M applications in the second priority to achieve maximum download and installation.
[0039] In other embodiments, determining the priority of each application according to the download time of each application and the first memory space and the second memory space required by the application includes:
[0040] Step S11, accumulating the first memory space corresponding to each application in the download list to obtain a first accumulated sum;
[0041] Step S12: When the first accumulated sum is not less than the current memory space, the priority of each application is determined according to the download time of each application, the first memory space and the second memory space required by the application.
[0042] Here we consider a situation where the first memory space of all the applications in the download list, that is, the sum of the memory space required for installation, that is, the first cumulative sum, is less than the available memory space of the current mobile terminal; that is, no matter how the download is made, there will be no conflict, and all the applications in the download list can be successfully downloaded and installed. At this time, there is no need to set the priority, that is, the default order can be used as the download order. Therefore, a judgment is first made here. When the first cumulative sum is greater than the current memory space, priority sorting must be performed. At this time, the priority of each application is determined by the method in this embodiment.
[0043] In other embodiments, when the first accumulated sum is not less than the current memory space, determining the priority of each application according to the download time of each application, the first memory space and the second memory space required by the application includes:
[0044] Step S21, sorting the second memory space of each application from large to small to obtain a sorted list;
[0045] Step S22: when the second memory space size of the Nth application in the sorted list is the same as that of the M applications in the first N-1, the first memory space of the Nth application is added to the first memory space of the M applications to obtain a second cumulative sum; wherein N is a natural number greater than or equal to 2, and M is a natural number greater than or equal to 1 and less than N;
[0046] Step S23: when the second accumulated sum is greater than the current remaining memory space, arranging the first N-1 applications into a priority level;
[0047] Step S24: Continue to arrange the remaining applications in the sorting list in other priority levels.
[0048] Here is a way to determine the priority of each application. First, sort the second memory space of each application, that is, the memory space occupied after installation, from large to small, to obtain a sorted list. Next, start with the first application as the first priority, and then judge the first and second memory spaces, download time, and whether conflicts will occur for each application in turn. It is judged that there is no conflict when the first N-1 applications are judged, that is, starting to download at the same time can also ensure the normal installation of these N-1 applications. When it comes to the Nth application, it is found that the second memory space of the Nth application and M of the first N-1 applications are the same, and the download time is also the same, that is, starting to download at the same time may end the download and start the installation at the same time. At this time, the sum of the memory space required for the installation of these M applications and the Nth application, that is, the second cumulative sum of the first memory space exceeds the remaining memory space, which will cause conflicts during installation. Therefore, the Nth application cannot be downloaded at the same time as the first N-1 applications, that is, it cannot be placed in the same priority.
[0049] Through the above process, the first N-1 applications in the sorted list are ranked at the first priority. Next, starting from the Nth application, the above method is continued to be used for judgment until all the applications in the sorted list are ranked at the corresponding priority.
[0050] Step S103: Complete the downloading according to the priority of each application.
[0051] Here, as long as you download in order of priority, applications with the same priority level can be downloaded at the same time or at different times without affecting normal installation.
[0052] Embodiment 2
[0053] The embodiment of the present invention provides another method for downloading and installing an application program, such as Figure 2 As shown, the method includes:
[0054] Step S201: when the current memory space is insufficient, determine the download time of each application in the download list and the memory space required by the corresponding application;
[0055] Step S202, determining the priority of each application according to the download time of each application in the download list and the memory space required by the corresponding application;
[0056] Here, the priority of each application is determined based on the download time of each application in the download list and the memory space required by the corresponding application, including: determining the priority of each application based on the download time of each application, the first memory space and the second memory space required by the application; wherein the first memory space is the memory space required for the application to be installed, and the first memory space is not less than the second memory space required after the corresponding application is installed.
[0057] Step S203, accumulating the first memory space corresponding to each application in the download list to obtain a first accumulated sum;
[0058] Step S204: when the first accumulated sum is greater than the current memory space, uninstall the existing application;
[0059] Here, when the first accumulated sum is greater than the current memory space, an appropriate existing application of the mobile terminal can be selected for uninstallation to release a certain amount of memory space. At the same time, relevant information of the uninstalled application, including download links, download locations, etc., is saved for restoration.
[0060] Step S205, completing the download according to the priority of each application;
[0061] Here you will complete the downloading of the applications in the download list. After completion, you will also need to restore the existing downloaded applications.
[0062] Step S206: after the installation of each application is completed, re-download the uninstalled existing application;
[0063] Since some existing applications have been uninstalled, the current memory space is sufficient to download and install the applications in the download list normally. When the applications in the download list are installed, unnecessary downloaded files are deleted, and some space is released. At this time, the uninstalled applications can be restored, that is, the uninstalled existing applications can be downloaded again.
[0064] This embodiment is more suitable for the case where the download list contains only one application. That is, when the download list contains only one application, the first memory space of this application exceeds the currently available memory space and cannot be installed normally; while the second memory space of this application does not exceed the currently available memory space. At this time, by selecting a suitable existing application to uninstall and releasing part of the space, the normal installation of the application can be guaranteed. After the installation is completed, the uninstalled application can be automatically re-downloaded.
[0065] In other embodiments, the above method further includes:
[0066] Step S31, determining the remaining memory space after the download of the application currently being downloaded is completed according to the second memory space of the application currently being downloaded;
[0067] Step S32, accumulating the first memory space of each application to be downloaded in the download list to obtain a third accumulated sum;
[0068] Step S33: when the remaining memory space is not less than the third accumulated sum, suspend downloading the currently downloading application and download the application to be downloaded;
[0069] Step S34: After the download and installation of the application to be downloaded is complete, continue downloading the application currently being downloaded.
[0070] Here, if the currently downloaded application is downloaded, it will affect the download of other applications to be downloaded. Because the third cumulative sum of the first memory space of the remaining applications in the download list, that is, the sum of the memory space required for installation, is less than the available memory space, it may cause subsequent conflicts. Therefore, the currently downloaded application can be paused first, and the remaining applications to be downloaded in the download list can be downloaded first. After the download and installation are completed, the suspended application can be downloaded again.
[0071] For example, if you are downloading a 200M application, after the download is complete, the remaining memory space is 900M, and the list of pending downloads also includes a 500M application, which requires 1G of memory space when installed. Therefore, you can pause the download of the 200M application when it is less than 100M, and then start downloading the 500M application. After the download and installation are complete, the available space is restored to a state of not less than 500M, and then you can continue to download the 200M application normally.
[0072] In other embodiments, the method further comprises:
[0073] Step S41: when the remaining memory space is less than the third accumulated sum, deleting the application currently being downloaded, and downloading the application to be downloaded;
[0074] Step S42: after the download and installation of the application to be downloaded is completed, re-download the application currently being downloaded;
[0075] or,
[0076] In other embodiments, the method further comprises:
[0077] Step S51: when the remaining memory space is less than the third accumulated sum, deleting the currently downloaded application, and re-downloading the currently downloaded application;
[0078] Step S52: When the current memory space is equal to the third accumulated sum, pausing the currently downloading application and downloading the application to be downloaded.
[0079] Here is another example. The current download of a 200M application has been downloaded to 105M. At this time, it is detected that the remaining memory space is only 995M, which is not enough to download and install another 500M application. At this time, first pause the current download and delete the downloaded part to free up the 105M space. Then you can start downloading another 500M application. When the 500M application is downloaded, you can download the 200M application again.
[0080] Alternatively, after deleting, re-download the 200M application, pause downloading when downloading to 100M, and then start downloading the 500M application. After downloading and installing, continue downloading the remaining 100M of the 200M application.
[0081] Embodiment 3
[0082] The embodiment of the present invention provides a method for downloading and installing an application program, such as Figure 3A As shown, the method includes:
[0083] Step S301: The terminal detects the download speed of each application program;
[0084] When multiple applications are downloaded and installed at the same time, the terminal detects the download speed of each application.
[0085] Step S302: The terminal estimates the time required to complete the download of each application according to the download speed of each application;
[0086] The terminal estimates the time it will take to download each application based on the real-time download speed. Due to the influence of the network, the download speed may change constantly, so the estimated time it will take to download the application will also change. At the same time, the terminal obtains the size of each application and the space it will take up when installed.
[0087] Step S303: the terminal evaluates the priority of each program according to the estimated time and the memory space required for the corresponding application installation;
[0088] Step S304: The terminal downloads and installs each application according to the priority level.
[0089] When the absolute value of the memory space detected by the terminal is greater than the size of the application to be installed itself, but smaller than the space required for the application to be installed during installation, a suitable installed application is selected for uninstallation to release the corresponding space, and information such as the download link of the uninstalled application is saved at the same time. When the installation of the application to be installed is completed, the uninstalled application is automatically downloaded according to the previously remembered connection information.
[0090] The embodiment of the present invention also provides a device 30 for downloading and installing an application program, such as Figure 3B As shown, the device 30 includes a detection module 31 , an evaluation module 32 , and a processing module 33 .
[0091] The detection module 31 is used to detect the relevant data of the application downloaded by the system. This module is started when there is an application download. The detected data includes the number of applications currently downloaded, the download speed of each application, and the space information required for the application installation. At the same time, the time for the corresponding application to be downloaded is estimated according to the download speed of each application, and the time for each application to be downloaded and the space required for installation are sent to the evaluation module. In addition, due to the real-time influence of the network, the download speed changes in real time. Therefore, when the speed changes greatly, for example, the change rate exceeds 20%, the new data is recalculated and passed to the evaluation module to ensure the accuracy of the data.
[0092] The evaluation module 32 is used to detect the current system memory space in real time according to the time and space requirements sent by the detection module 31, and evaluate whether the current memory space meets the installation requirements. If the absolute value of the memory space is greater than the total space required by all the applications to be installed during installation, no processing is required and the program is directly installed; if the absolute value of the memory space is greater than the total size of all the applications to be installed after installation, but less than the space required by all the applications to be installed during installation, the applications are prioritized according to the time and space requirements, and the priority sorting results are sent to the processing module 33 to ensure that all applications are successfully installed; if the absolute value of the memory space is less than the total size of all the applications to be installed after installation, the user is prompted that there is insufficient memory, and a plan to maximize the installation of applications is provided to the user for selection, and the download of the applications used is paused, waiting for the result of the user's selection.
[0093] The processing module 33 processes the application according to the priority sorting result sent by the evaluation module 32. The processing includes: pausing the download of a certain application, determining which applications can be downloaded simultaneously, determining which applications to download in order of priority, restarting the download and releasing the necessary space after determining which applications failed to download, determining which applications need to be uninstalled and then reinstalled to release the necessary space, and when the memory space is insufficient to support the download and installation of all the applications, providing reasonable installation suggestions for the user to choose.
[0094] In practical applications, for example, an application online installation requires twice the size of its own space, such as Figure 3C As shown, the method for downloading multiple applications at the same time is as follows:
[0095] Step S311, receiving an instruction to download an application program;
[0096] Step S312, the terminal detects application information, including the number of applications currently being downloaded simultaneously, the download speed of each application, and the space occupied by each application when installed. At the same time, the corresponding download completion time is estimated according to the download speed of each application, and the time and the space data required to install each application are sent to the evaluation module. In addition, due to the real-time influence of the network, the download speed changes in real time, so when the download speed changes greatly, such as the change rate exceeds 20%, the new estimated time is recalculated and sent to the evaluation module to ensure data accuracy.
[0097] Step S313: The evaluation module detects the current memory space in real time according to the received time and space requirements, and evaluates whether the current memory space meets the installation requirements. If the absolute value of the memory space is greater than the space required for the installation of all applications to be installed, that is, greater than twice the size of the application itself, then enter S316; if the absolute value of the memory space is greater than the sum of the sizes of all applications to be installed, but less than the sum of the space required for the installation of all applications to be installed, that is, twice the size of the application itself, then enter S314; if the absolute value of the memory space is less than the sum of the sizes of all applications to be installed, then enter S317.
[0098] Step S314: Prioritize each application according to the time and space requirements of each application received in S313, give the priority sorting result, and enter S15. The priority sorting principle here is: sort according to the size of the memory space occupied by each application. For example, the mobile terminal currently has 1G of memory space, and downloads a 500M and a 200M application at the same time, then download the 500M application first, and then download the 200M application, while taking into account the time required for downloading. For example, if the current mobile terminal memory space is 1.2G, if it is determined that the download completion time of the two does not conflict, that is, there will be no simultaneous installation phenomenon, then they can be downloaded at the same priority; however, if the download completion time of the two is at the same time, that is, they will start to install at the same time, then the 500M application requires 1G of memory space to install, and the 200M application requires 400M of memory space. If both are installed at the same time, 1.4G of memory space is required. At this time, the need for simultaneous installation cannot be met, and they need to be downloaded at different priorities.
[0099] Step S315: Install the application according to the priority sorting result of step S34. The processing methods may be as follows:
[0100] 1. Pause the download of some applications. For example, if there is 1.1G space and you are downloading 500M and 200M applications at the same time, then pause the download when the 200M application is downloaded to 100M, and install it after the 500M application is downloaded.
[0101] 2. According to the size of the current memory space, some applications can be downloaded at the same time, and other applications are downloaded according to the priority order.
[0102] 3. After some applications fail to download, you need to delete the downloaded part to release space and restart the download. For example, the mobile terminal has 1.1G memory space, and first downloads a 200M application. At this time, the user downloads a 500M application. The mobile terminal determines that 105M of the 200M application has been downloaded, and only 995M of memory space is left. The 500M application requires 1G of memory space to download and install. Then, it is determined that the 200M application has failed to download, and the downloaded 105M content is deleted to release space, and the download is restarted to 100M and paused, and then the remaining 100M is continued after the 500M application is downloaded and installed.
[0103] Step S316, download and install the applications normally in the default order. Here, it is determined that the memory of the mobile terminal is sufficient and is greater than the total space required for the installation of all the applications to be downloaded. In this case, there will be no conflict in the installation of any application, so there is no need to perform priority sorting and other operations, and you can directly download and install.
[0104] Step S317: Providing reasonable recommended installation solutions for the user to choose.
[0105] For example, a recommendation is given not to install an application: when the memory space occupied by an application itself is larger than the memory space of the current mobile terminal, it cannot be successfully downloaded without uninstalling other downloaded applications. At this time, the user can be advised to give up downloading and installing this application.
[0106] Or if the current mobile terminal memory space is insufficient, the user may be advised to uninstall applications that are rarely used or have not been used for a long time. For example, an uninstall suggestion may be given: uninstall applications that have not been used for more than 3 months.
[0107] In actual application, if you only download one application, such as Figure 3D As shown, this can be achieved by the following method:
[0108] Step S321: The terminal receives a download instruction from the user and downloads the application program;
[0109] Step S322: The terminal detects application information. When there is only one application, the detection data includes the size of the application itself and the size of the memory space required for installation.
[0110] Step S323, the terminal detects the current system memory space size in real time, and evaluates whether the current memory capacity meets the installation requirements. If the absolute value of the memory space size is larger than the memory space required to install the application, enter S326; if the absolute value of the memory space size is larger than the size of the application itself, but smaller than the memory space required to install the application, enter S324; if the absolute value of the memory space size is smaller than the size of the application itself, enter S327.
[0111] Step S324: Select appropriate applications to uninstall based on the lack of memory capacity to release necessary space. The principles for selecting applications may be the following aspects:
[0112] 1. Infrequently used applications, for example, applications that users have not used in the past three months; or applications that users use less frequently.
[0113] 2. The size range of the selected application is: less than the current system memory minus the size of the application to be installed, and larger than the memory required by the application to be installed minus the current system memory. For example, if the current memory is 900M and you need to install a 500M application, which requires 1G of memory, then the size of the uninstalled application should be between 100M and 400M. If it is less than 100M, the 500M application cannot be installed. If it is larger than 400M, the uninstalled application cannot be installed again.
[0114] Step S325, uninstall the selected application, and remember the download information of this application, such as the download link, and automatically download and install the uninstalled application after the current application is installed.
[0115] Step S326, download and install the application program normally;
[0116] Step S327: Give a prompt that the installation cannot be performed due to insufficient memory.
[0117] Embodiment 4
[0118] The embodiment of the present invention further provides a device 400 for downloading and installing an application program, the device comprising:
[0119] A first determining unit 401 is configured to determine the download time of each application in the download list and the memory space required by the corresponding application;
[0120] The second determining unit 402 is configured to determine the priority of each application according to the download time of each application in the download list and the memory space required by the corresponding application;
[0121] The downloading unit 403 is configured to complete the downloading according to the priority of each application.
[0122] In other embodiments, the second determining unit is further configured to:
[0123] The priority of each application is determined based on the download time of each application, the first memory space and the second memory space required by the application; wherein the first memory space is the memory space required for the application to be installed, and the first memory space is not less than the second memory space required after the corresponding application is installed.
[0124] In other embodiments, the second determining unit includes:
[0125] An accumulation module configured to accumulate the first memory space corresponding to each application in the download list to obtain a first accumulation sum;
[0126] The determination module is configured to determine the priority of each application according to the download time of each application, the first memory space and the second memory space required by the application when the first accumulated sum is not less than the current memory space.
[0127] In other embodiments, the determining module includes:
[0128] A sorting submodule, configured to sort the second memory space of each application from large to small to obtain a sorting list;
[0129] An accumulation submodule is configured to, when the size of the second memory space of the Nth application in the sorted list is the same as that of the second memory space of the M applications in the first N-1, accumulate the first memory space of the Nth application with the first memory space of the M applications to obtain a second cumulative sum; wherein N is a natural number greater than or equal to 2, and M is a natural number greater than or equal to 1 and less than N;
[0130] a priority submodule, configured to, when the second accumulated sum is greater than the current remaining memory space, rank the first N-1 applications at a priority level;
[0131] The remaining applications in the sorted list continue to be sorted at other priorities.
[0132] In other embodiments, the device further comprises:
[0133] an uninstallation unit, configured to uninstall the existing application when the first accumulated sum is greater than the current memory space;
[0134] The downloading unit is further configured to re-download the uninstalled existing application after the installation of each application is completed.
[0135] In other embodiments, the device further comprises:
[0136] A third determining unit is configured to determine, based on the second memory space of the application currently being downloaded, the remaining memory space after the application currently being downloaded is completed;
[0137] An accumulation unit configured to accumulate the first memory space of each application to be downloaded in the download list to obtain a third accumulation sum;
[0138] a pausing unit, configured to suspend downloading of the currently downloaded application program when the remaining memory space is not less than the third accumulated sum, and download the application program to be downloaded through the downloading unit;
[0139] The downloading unit is further configured to continue downloading the application currently being downloaded after the application to be downloaded is downloaded and installed.
[0140] In other embodiments, the device further comprises:
[0141] The first deleting unit is configured to delete the application currently being downloaded when the remaining memory space is less than the third accumulated sum; the downloading unit is further configured to download the application to be downloaded; the downloading unit is further configured to re-download the application currently being downloaded after the download and installation of the application to be downloaded is completed;
[0142] or,
[0143] The second deleting unit is configured to delete the application currently being downloaded when the remaining memory space is less than the third cumulative sum; the downloading unit is also configured to re-download the application currently being downloaded; the downloading unit is also configured to pause the application currently being downloaded and download the application to be downloaded when the current memory space is equal to the third cumulative sum.
[0144] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present invention, please refer to the description of the method embodiment of the present invention for understanding.
[0145] It should be noted that, in the embodiment of the present invention, if the above-mentioned method for downloading and installing an application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for enabling a terminal (which can be a personal computer, mobile terminal, server, or network device, etc.) for downloading and installing an application to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present invention is not limited to any specific combination of hardware and software.
[0146] Correspondingly, an embodiment of the present invention provides a terminal for downloading and installing an application, including a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the processor executes the program, the steps in the method for downloading and installing an application provided in the above embodiment are implemented.
[0147] Correspondingly, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the method for downloading and installing an application provided in the above embodiment are implemented.
[0148] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present invention, please refer to the description of the method embodiments of the present invention for understanding.
[0149] It should be noted that Figure 5 A schematic diagram of a hardware entity of a terminal for downloading and installing an application program in an embodiment of the present invention is shown in FIG. Figure 5 As shown, the hardware entity of the terminal 500 for downloading and installing the application includes: a processor 501, a communication interface 502 and a memory 503, wherein
[0150] Processor 501 generally controls the overall operation of computer device 500 .
[0151] The communication interface 502 enables the terminal where the application is downloaded and installed to communicate with other terminals or servers through the network.
[0152] The memory 503 is configured to store instructions and applications executable by the processor 501, and can also cache data to be processed or processed by various modules in the processor 501 and the terminal 500 where the application is downloaded and installed (for example, image data, audio data, voice communication data, and video communication data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0153] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present invention, the size of the serial number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. The serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0154] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0155] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0156] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0157] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0158] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0159] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for enabling a terminal device (which can be a personal computer, mobile phone, etc.) where an application is downloaded and installed to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.
[0160] The above is only an embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for downloading and installing an application, characterized in that: The method comprises: When the current memory space is insufficient, determining the download time of each application in the download list and the memory space required by the corresponding application; Accumulating the first memory space corresponding to each application in the download list to obtain a first accumulated sum; When the first accumulated sum is not less than the current memory space, sorting the second memory space of each application from large to small to obtain a sorted list; wherein the first memory space is the memory space required for the application to be installed, and the first memory space is not less than the second memory space required for the corresponding application after the installation is completed; When the size of the second memory space of the Nth application in the sorted list is the same as that of the second memory space of the M applications in the first N-1, the first memory space of the Nth application is added to the first memory space of the M applications to obtain a second cumulative sum; wherein N is a natural number greater than or equal to 2, and M is a natural number greater than or equal to 1 and less than N; When the second accumulated sum is greater than the current remaining memory space, the first N-1 applications are arranged in a priority order; Continue to prioritize the remaining applications in the ranked list at other priorities; The download is completed according to the priority of each application.
2. The method according to claim 1, characterized in that: The method further comprises: When the first accumulated sum is greater than the current memory space, uninstalling the existing application; After the installation of each application is completed, the uninstalled existing application is downloaded again.
3. The method according to any one of claims 1 to 2, characterized in that: The method further comprises: Determining, based on the second memory space of the application currently being downloaded, the remaining memory space after the application currently being downloaded is completed; Accumulating the first memory space of each application to be downloaded in the download list to obtain a third accumulated sum; When the remaining memory space is not less than the third accumulated sum, pausing downloading of the currently downloading application and downloading the application to be downloaded; When the download and installation of the application to be downloaded is complete, continue downloading the application currently being downloaded.
4. The method according to claim 3, characterized in that The method further comprises: When the remaining memory space is less than the third accumulated sum, the currently downloaded application is deleted, and the to-be-downloaded application is downloaded; after the to-be-downloaded application is downloaded and installed, the currently downloaded application is downloaded again; or, When the remaining memory space is less than the third cumulative sum, the currently downloaded application is deleted and the currently downloaded application is downloaded again; when the current memory space is equal to the third cumulative sum, the currently downloaded application is paused and the application to be downloaded is downloaded.
5. A device for downloading and installing an application, characterized in that: The device comprises: A first determining unit, configured to determine the download time of each application in the download list and the memory space required by the corresponding application when the current memory space is insufficient; A second determining unit is configured to determine the priority of each application according to the download time of each application in the download list and the memory space required by the corresponding application; A downloading unit, configured to complete the downloading according to the priority of each application program; The device is also configured to accumulate the first memory space corresponding to each application in the download list to obtain a first cumulative sum; when the first cumulative sum is not less than the current memory space, sort the second memory space of each application from large to small to obtain a sorted list; wherein, the first memory space is the memory space required for application installation, and the first memory space is not less than the second memory space required after the corresponding application is installed; when the Nth application in the sorted list is the same size as the second memory space of M applications in the first N-1, accumulate the first memory space of the Nth application and the first memory space of the M applications to obtain a second cumulative sum; wherein, N is a natural number greater than or equal to 2, and M is a natural number greater than or equal to 1 and less than N; when the second cumulative sum is greater than the current remaining memory space, rank the first N-1 applications in one priority; and continue to rank the remaining applications in the sorted list in other priorities.
6. A terminal for downloading and installing an application, characterized in that: The terminal includes: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the method for downloading and installing an application provided in any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are configured to execute the method for downloading and installing an application provided in any one of claims 1 to 4 above.
