A program management method, device, equipment, and storage medium

By detecting the amount of free space of the data partition in the electronic device and uninstalling unnecessary applications, the problem of file package download interruption caused by insufficient data partition space is solved, ensuring the smooth progress of system upgrades and the improvement of user experience.

CN114895934BActive Publication Date: 2024-12-31GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210350767.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-02
Publication Date
2024-12-31
Estimated Expiration
2042-04-02

AI Technical Summary

Technical Problem

During the system upgrade of electronic devices, when the remaining space of the data partition is insufficient, the download of the file package will be interrupted, affecting the installation of new applications or the upgrade of installed applications.

Method used

By detecting the amount of free space in the data partition, if it is less than the required amount of space, uninstall the application installed in the data partition to free up space, and delete the target file after the target program is installed to ensure the complete download and installation of the file package.

Benefits of technology

It avoids installation interruptions caused by insufficient space, improves user experience, and ensures smooth progress of system upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114895934B_ABST
    Figure CN114895934B_ABST
Patent Text Reader

Abstract

The present application discloses a program management method and apparatus, device, and storage medium, wherein the method comprises: when detecting that the amount of free space in a data partition is less than a first amount of space, uninstalling a first application installed in the data partition to release a first space occupied by the first application, wherein the first amount of space is the amount of space required to download a target file; downloading the target file based on the first space, and installing a target program based on the target file; and deleting the target file after the installation of the target program is completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to electronic equipment technology, and in particular to a program management method and apparatus, equipment, and storage medium. Background Art

[0002] When upgrading the system, electronic devices such as mobile phones and televisions need to download the system upgrade package to the user space, i.e., the data partition. Users can download file packages to the data partition through program management applications, browsers, etc., so as to install new applications or upgrade installed applications in electronic devices. When the remaining space in the data partition is insufficient to download the complete file package, the download of the file package will be interrupted, thereby affecting the download of the file package, and further affecting the installation of new applications or the upgrade of installed applications. Summary of the invention

[0003] The embodiments of the present application provide a program management method and apparatus, device, and storage medium, which can avoid the interruption of the installation of the target program caused by insufficient space.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a program management method, including:

[0006] When detecting that the free space amount of the data partition is less than a first space amount, uninstalling a first application installed in the data partition to release a first space occupied by the first application, where the first space amount is a space amount required to download a target file;

[0007] Downloading the target file based on the first space, and installing the target program based on the target file;

[0008] After the installation of the target program is completed, the target file is deleted.

[0009] In a second aspect, an embodiment of the present application provides a program management device, the device comprising:

[0010] an uninstallation module, configured to uninstall a first application installed in the data partition to release a first space occupied by the first application when detecting that the free space amount of the data partition is less than a first space amount, wherein the first space amount is the space amount required for downloading a target file;

[0011] An update module, configured to download the target file based on the first space, and install the target program based on the target file;

[0012] The release module is used to delete the target file after the installation of the target program is completed.

[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps in the above-mentioned program management method are implemented.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned program management method is implemented.

[0015] The program management method provided by the embodiment of the present application includes: when it is detected that the amount of free space in the data partition is less than the first amount of space, uninstall the first application installed in the data partition to release the first space occupied by the first application; the first amount of space is the amount of space required to download the target file; after the installation of the target program is completed, download the target file based on the first space, and install the target program based on the target file; delete the target file. In this way, when the remaining space in the data partition is insufficient to download the target file, the space of the data partition is released by uninstalling the first application to complete the download of the target file, and when the target program corresponding to the target file is installed and the target file is not needed, the target file is deleted, thereby restoring the space occupied by the target file, thereby avoiding the interruption of the installation of the target program caused by insufficient space, and the user is not aware of it during the period, thereby improving the user's experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is an optional architecture diagram of the program management system provided in the embodiment of the present application;

[0017] Figure 2 This is an optional flowchart of the program management method provided in the embodiment of the present application;

[0018] Figure 3 It is a schematic diagram of an optional partition architecture of a storage area provided in an embodiment of the present application;

[0019] Figure 4 It is an optional schematic diagram of a data partition provided in an embodiment of the present application;

[0020] Figure 5 It is an optional schematic diagram of a system partition and a data partition provided in an embodiment of the present application;

[0021] Figure 6 It is a schematic diagram of an optional partition architecture of a storage area provided in an embodiment of the present application;

[0022] Figure 7It is a schematic diagram of an optional partition architecture of a storage area provided in an embodiment of the present application;

[0023] Figure 8 This is an optional flowchart of the program management method provided in the embodiment of the present application;

[0024] Fig. 9 This is an optional flowchart of the program management method provided in the embodiment of the present application;

[0025] Fig.10 is an optional structural diagram of an electronic device provided in an embodiment of the present application;

[0026] Fig.11 is an optional structural diagram of an electronic device provided in an embodiment of the present application;

[0027] Fig.12 It is an optional schematic diagram of a system partition and a data partition provided in an embodiment of the present application;

[0028] Fig.13 It is an optional structural diagram of a program management device provided in an embodiment of the present application;

[0029] Fig.14 It is an optional structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0031] The embodiments of the present application may be provided as a program management method and apparatus, equipment and storage medium. In practical applications, the program management method may be implemented by a program management apparatus, and each functional entity in the program management apparatus may be collaboratively implemented by hardware resources of computer equipment (such as headphones, bracelets, tablets, mobile phones, televisions and other electronic devices), such as computing resources such as processors, and communication resources (such as for supporting various communication methods such as optical cables and cellular).

[0032] Of course, the embodiments of the present application are not limited to being provided as methods and hardware, and there may be multiple implementation methods, such as being provided as a storage medium (storing instructions for executing the program management method provided by the embodiments of the present application).

[0033] The program management method provided in the embodiment of the present application can be applied to Figure 1 The program management system shown, such as Figure 1As shown, the program management system 10 includes: a client 101 and a server 102, wherein the server 102 can provide a download link and an installation package of an application, and the client 101 can download the installation package from the server 102 based on the download link provided by the server 102, and install the application based on the downloaded installation package. Wherein, when the downloaded installation package is an installation package of an application that is not installed in the client 101, the client 101 installs a new application based on the downloaded installation package, and when the downloaded installation package is an installation package of an update program of an application that has been installed in the client 101, the downloaded installation package is an update package of the installed application, and the client 101 updates the installed application based on the downloaded update package. Here, the client 101 and the server 102 can communicate with each other through the network 103.

[0034] The program management method provided in the embodiment of the present application is applied to Figure 1 The client 101 in.

[0035] When the client 101 detects that the amount of free space in the data partition is less than a first amount of space, the client 101 uninstalls the first application installed in the data partition to release the first space occupied by the first application; the first amount of space is the amount of space required to download the target file; the client 101 downloads the target file based on the first space, and installs the target program based on the target file; after the installation of the target program is completed, the client 101 deletes the target file.

[0036] Next, combine Figure 1 The schematic diagram of the program management system shown illustrates various embodiments of the program management method, apparatus, device and storage medium provided in the embodiments of the present application.

[0037] The embodiment of the present application provides a program management method, which is applicable to any electronic device with information processing capabilities. In one embodiment, the electronic device may be a mobile terminal with wireless communication capabilities, such as a notebook, a mobile phone, a smart watch, etc. In another embodiment, the electronic device may also be a terminal device with computing functions that is inconvenient to move, such as a desktop computer, a desktop computer, a television, a refrigerator, etc.

[0038] The present application embodiment provides a program management method.

[0039] Figure 2 A schematic diagram of the implementation flow of a program management method according to an embodiment of the present application is shown in FIG. Figure 2 As shown, the method may include the following steps:

[0040] S201. When the electronic device detects that the amount of free space in a data partition is less than a first amount of space, the electronic device uninstalls a first application installed in the data partition to release a first space occupied by the first application, where the first amount of space is the amount of space required to download a target file.

[0041] After receiving a download instruction for the target file of the target program, the electronic device downloads the target file from the server based on the download instruction. The target file is the installation package of the target program. It is understandable that the target program may be a system program or an application program carried on the system program. In the case where the target program is a system program, the target program may be an upgraded system program of the current system program of the electronic device. In the case where the target program is an application program, the electronic device may not have other versions of the program corresponding to the target program installed; or other versions of the program corresponding to the target program may have been installed. In this case, the target program is an update program for the application program installed on the electronic device, and the installed application program is the program to be updated.

[0042] In an embodiment of the present application, a download instruction may be generated based on an installation operation of an installation target program input by a user received by the electronic device, or may be generated based on a program management application. In one example, when a user clicks on an installation control indicating the installation of application A on a browser, the electronic device determines that the click operation at this time is an installation operation indicating the installation of application A, and then generates a download instruction indicating the download of an installation package of application A, so as to install application A on the electronic device based on the downloaded installation package. In one example, the program management application detects that the installed application A needs to be updated, and then generates a download instruction indicating the download of an installation package of a higher version of application A, so as to install the higher version of application A on the electronic device based on the downloaded installation package, thereby upgrading application A. In one example, the program management application detects that a system program needs to be upgraded, and then generates a download instruction for downloading a system installation package, so as to install a higher version of the current system program based on the downloaded system installation package, thereby upgrading the current system program of the electronic device.

[0043] In an embodiment of the present application, the electronic device downloads the target file to the data partition. Optionally, the electronic device divides the storage area into the following partitions: a data partition, a system partition, etc. Among them, the data partition is used to store user data, can perform data read and write operations, and is a partition that can be used by the user. The data in the data partition is deleted when the electronic device performs a factory reset; the system partition is used to store system files, and only allows data to be read, and does not allow data to be written or deleted. The data in the system partition is not affected by the factory reset of the electronic device. In actual applications, the areas included in the storage area of ​​the electronic device may also include: a cache partition, a recovery partition, etc., wherein the cache partition is used to store the system cache, and the recovery partition is responsible for system recovery. In an embodiment of the present application, there is no limitation on the number of partitions into which the storage area of ​​the electronic device is divided and the functions of each partition.

[0044] In one example, if Figure 3 As shown, the electronic device divides the storage area 300 into the following partitions: a data partition 301 , a system partition 302 , a cache partition 303 , and a recovery partition 304 .

[0045] Since the target file needs to be stored in the data partition, the electronic device can detect the size of the remaining space of the data partition before downloading the target file and / or during the process of downloading the target file, and compare the detected free space amount with the first space amount. Here, the first space amount represents the size of the portion of the target file to be downloaded. Based on different detection times, the size of the first space amount may be different. In the case where the free space amount is less than the first space amount, it represents that the remaining space in the current data partition is less than the space required to download the target file, and the electronic device cannot download the complete target file. In the case where the free space amount is greater than or equal to the first space amount, it represents that the remaining space in the current data partition is greater than the space required to download the target file, and the electronic device can download the complete target file. In one example, the electronic device detects the free space amount of the target data before downloading the target file, and compares the detected free space amount with the first space amount. At this time, the electronic device has not yet started downloading the target file, and the first space amount is the size of the entire target file. For example: the size of the target file is 200 megabytes (M). Before downloading the target file, the electronic device detects the amount of free space. At this time, the first amount of space is 200M. The electronic device compares the amount of free space in the data partition with 200M. When the amount of free space is greater than or equal to 200M, it indicates that the amount of free space in the data partition in the electronic device can be used by the electronic device to download the complete target file; when the amount of free space is 195M, the amount of free space is less than 200M, indicating that the amount of free space in the data partition in the electronic device cannot be used by the electronic device to download the complete target file; when the amount of free space is 30M, the amount of free space is less than 200M, indicating that the amount of free space in the data partition in the electronic device cannot be used by the electronic device to download the complete target file.

[0046] In one example, the electronic device detects the amount of free space of the target data before downloading the target file, and compares the detected amount of free space with the first amount of space. At this time, the electronic device has started to download part of the content of the target file, and the first amount of space is the size of the undownloaded part of the target file. For example: the size of the target file is 200M, and when the size of the target file that has been downloaded is 10M, the size of the part to be downloaded is 190M. The electronic device detects the amount of free space in the data partition. At this time, the first amount of space is 190M. The electronic device compares the amount of free space in the data partition with 190M. When the amount of free space is greater than or equal to 190M, it indicates that the amount of free space in the data partition in the electronic device can be used for the electronic device to download the complete target file. If the amount of free space is 195M, the amount of free space is greater than 190M, and the amount of free space in the data partition in the electronic device can be used for the electronic device to download the complete target file; and when the amount of free space is 30M, it indicates that the amount of free space in the data partition in the electronic device cannot be used for the electronic device to download the complete target file.

[0047] If the amount of free space in the data partition is insufficient to download the complete target file, the electronic device uninstalls the first application installed in the data partition to free up the space occupied by the first application in the data partition. Here, the electronic device may uninstall one or more first applications. It is understandable that the first application may be any application installed in the data partition, or may be an application selected by the electronic device from the applications installed in the data partition based on a selection strategy, wherein the selection strategy may be set based on the uninstallation priority, size, etc. of each application, and the embodiment of the present application does not impose any limitation on the specific content of the selection strategy.

[0048] In one example, the following applications are installed in the data partition: application A, application B, application C, and application D. When there is insufficient remaining space for downloading application E, the electronic device uninstalls application A and application B in the data partition.

[0049] In actual application, when the target program is an update program corresponding to the program to be updated of the electronic device, the first application does not include the program to be updated. For example, when the target program is version 2.0 of application A, the applications in the data partition include: version 1.0 of application A, version 2.0 of application B, version 1.0 of application C, and version 3.0 of application D, wherein version 2.0 of application A is an update program for version 1.0 of application A. When the electronic device downloads the installation package of version 2.0 of application A and there is insufficient remaining space, version 1.0 of application A is excluded from the range of uninstallable programs, and version 2.0 of application B and / or version 1.0 of application C in the data partition are selected for uninstallation.

[0050] S202: The electronic device downloads the target file based on the first space, and installs a target program based on the target file.

[0051] It is understandable that the target program may be a system program. In one example, when the electronic device currently uses version 2.0 of the system program, and needs to upgrade the version 2.0 application to version 3.0 of the system program, then when the remaining space in the data partition is insufficient to download the installation package of version 3.0 of the system program, i.e., the target file, one or more first applications installed in the data partition are uninstalled to release the first space, and the electronic device downloads the installation package of version 3.0 of the system program based on the released first space, and upgrades the system program from version 2.0 to version 3.0 based on the downloaded installation package.

[0052] After uninstalling the first application in the data partition, the electronic device starts or continues downloading the target file, and downloads the to-be-downloaded portion of the target file to the released first space.

[0053] After completing the download of the target file, the electronic device installs the target program in the data partition. When the target program corresponding to the to-be-updated program does not exist in the electronic device, the electronic device directly installs the target program based on the target file; when the target program corresponding to the to-be-updated program exists in the electronic device, the electronic device updates the to-be-updated program based on the target file, thereby installing the target program. In one example, when the target program is application A 2.0; if the electronic device does not install other versions of application A 2.0, application A 2.0 is directly installed based on the downloaded installation package of application A 2.0; if the electronic device installs other versions of application A 2.0, application A 1.0 is updated based on the downloaded installation package of application A 2.0, thereby installing application A 2.0.

[0054] In the embodiment of the present application, the target program can be installed in the data partition or the system partition, and the embodiment of the present application does not impose any restrictions on the installation location of the target program. In one example, the target program is an upgrade system of the current system program, and the electronic device upgrades the current system program based on the target file.

[0055] S203: When the target program is installed, the electronic device deletes the target file.

[0056] After the electronic device completes the installation of the target program, it deletes the target file, and at this time, the space occupied by the target file in the data partition is released. It is understandable that the space occupied by the target file in the data partition is the second space, and the second space is greater than, equal to, or less than the first space. In one example, the size of the target file is 200M, and the size of the first application uninstalled is 230M, then the size of the first space is 230M, and the size of the second space released based on the deletion of the target file is 200M. In one example, the size of the target file is 200M, and the size of the first application uninstalled is 200M, then the size of the first space is 200M, and the space released based on the deletion of the target file is 200M. In one example, the size of the target file is 200M, and after downloading 100M of data of the target file, it is detected that there is insufficient remaining space, and the size of the first application uninstalled is 130M, then the size of the first space is 130M, and the space released based on the deletion of the target file is 200M.

[0057] The program management method provided by the embodiment of the present application includes: when it is detected that the amount of free space in the data partition is less than the first amount of space, uninstall the first application installed in the data partition to release the first space occupied by the first application; the first amount of space is the amount of space required to download the target file; download the target file based on the first space, and install the target program based on the target file; when the installation of the target program is completed, delete the target file. In this way, when the remaining space in the data partition is insufficient to download the target file, the space of the data partition is released by uninstalling the first application to complete the download of the target file, and when the target program corresponding to the target file is installed and the target file is not needed, delete the target file, thereby restoring the space occupied by the target file, thereby avoiding the interruption of the installation of the target program caused by insufficient space and improving the user experience.

[0058] In some embodiments, before uninstalling the first application installed in the data partition in S201, the electronic device further performs the following processing: determining at least one second application installed in the data partition; and determining the first application from the at least one second application.

[0059] When the electronic device determines that the amount of free space in the data partition is less than the first amount of space, it needs to determine the first application that needs to be uninstalled. At this time, the electronic device determines one or more second applications installed in the data partition, and determines the first application from the one or more second applications installed in the data partition. The electronic device may randomly select the first application from the one or more second applications installed in the data partition, or may randomly select the first application from the one or more second applications installed in the data partition based on the selection strategy. In one example, Figure 4 As shown, the following applications are installed in data partition 401: application A, application B, application C and application D. The electronic device randomly selects application A and application B as the first application from application A, application B, application C and application D, or selects application A and application B as the first application from application A, application B, application C and application D based on a selection strategy.

[0060] At this time, the range in which the electronic device selects the first application includes one of the following:

[0061] First scope: applications installed on the data partition.

[0062] Second range: obtained by filtering the first range.

[0063] The electronic device may screen the first range to obtain the second range based on at least one of the following criteria: whether there is a preset application, whether it is a set type of application, whether it is a secure application, etc.

[0064] In actual applications, the electronic device may record a configuration file, in which application information of each application is recorded, wherein the application information may include: application size, installation package name, storage path, installation location and other information. In actual applications, the application information may also include version information. The electronic device may obtain the application information of each second application based on the configuration file, and filter the first range based on the obtained application information to obtain the second range.

[0065] In the embodiment of the present application, the selected first application may or may not have a corresponding preset application. Optionally, the preset application is an application configured at the factory and installed in the system partition. For the preset application, when the electronic device has not installed an updater for the preset application in the data partition, the electronic device calls the preset application in the system partition to provide services to the user. When the electronic device installs an updater for the preset application in the data partition, the electronic device deactivates the preset application in the system partition and calls the updater for the pre-installed application installed in the data partition.

[0066] In actual applications, there is a second application corresponding to the preset application in the data partition, which is different from the version of the second application. In one example, application F is installed in the data partition, and application F1 corresponding to application F is installed in the system partition. Application F is version 2.0 of instant messaging program X, and application F1 is version 1.0 of instant messaging program X, and version 2.0 is an upgraded version of version 1.0. In one example, application G is installed in the data partition, and application G1 corresponding to application G is installed in the system partition. Application G is version 6.8.0 of video player X, and application 1 is version 2.0.0 of video player X, and version 6.8.0 is an upgraded version of version 2.0.0.

[0067] In some embodiments, before determining the first application from the at least one second application, the electronic device also implements the following processing: confirming whether each second application among the at least one second application has a corresponding preset application in the system partition, so as to determine the first application from the second applications among the at least one second application for which a corresponding preset application exists.

[0068] Optionally, a configuration file is recorded in the electronic device, and the installation location of each application program and the corresponding relationship between the preset application program and its corresponding application program are recorded in the configuration file.

[0069] It can be understood that after the electronic device determines the second application installed in the data partition, it further screens the at least one determined second application, filters out the second application corresponding to the preset application from the at least one second application installed in the data partition, and determines the first application from the filtered second applications, thereby limiting the selection range of the first application to the second application with the corresponding preset application, that is, the second range obtained by filtering the first range based on whether there is a preset application.

[0070] In one example, based on Figure 4 The data partition 401 in the embodiment has applications installed therein: application A, application B, application C and application D. Figure 5 As shown, the system partition 402 has pre-installed applications A1, C1 and D1 corresponding to applications A, C and D respectively installed. The electronic device selects a first application from applications A, C and D. Optionally, the electronic device determines that applications A and D are the first applications.

[0071] Optionally, the electronic device may determine the second application corresponding to the preset application through the configuration file, and add the application information of the second application corresponding to the preset application to a list, so that the first application may be selected from the second application included in the list.

[0072] In some embodiments, the electronic device determines the first application from the at least one second application, including the following steps: sorting the at least one second application according to the uninstallation priority of each second application among the at least one second application; determining the first application based on the second space amount and the sorting result of the at least one second application, the second space amount being the space amount difference between the first space amount and the free space amount.

[0073] When determining that the amount of free space of the data partition is less than the first amount of space, the electronic device determines the second amount of space based on the free space and the first amount of space, and selects the first application from at least one second application based on the second amount of free space. The second amount of space is the amount of space required to download the complete target file. In one example, the size of the target file is 200M, the first amount of space is 200M, and the amount of free space is 30M, then the second amount of space is 170M. In one example, the size of the target file is 200 megabytes (M), and when 10M of the target file has been downloaded, the first amount of space is 1900M, the amount of free space is 30M, then the second amount of space is 160M.

[0074] When selecting the first application, the electronic device obtains the uninstallation priority corresponding to each second application, and sorts the second applications based on the obtained uninstallation priority. Here, at least one second application selected from the first application may be a second application included in the data partition, or a second application for which a corresponding preset application exists among the second applications included in the data partition.

[0075] In the embodiment of the present application, the uninstallation priority may be based on information such as usage frequency, installation duration, etc. Understandably, the uninstallation priority of a second application with high usage frequency is higher than that of a second application with low usage frequency, and the uninstallation priority of a second application with long installation duration is higher than that of a second application with short installation duration.

[0076] After determining the ranking result, the electronic device selects the first application based on the second space amount and the ranking result, wherein the higher the second application is in the ranking result, the greater the probability of being selected as the first application.

[0077] In one example, the following applications are installed in the data partition: application A of 20M, application B of 50M, application C of 100M, and application D of 80M. The electronic device selects a first application from application A, application B, application C, and application D, sorts application A, application B, application C, and application D, and obtains the sorting results: application A, application C, application D, and application B. When the second space amount is 80M, application A of 20M and application C of 100M are selected as the first application.

[0078] In one example, the following applications are installed in the data partition: application A of 20M, application B of 50M, application C of 100M, and application D of 80M. The system partition 302 is installed with preset applications A1, C1, and D1 corresponding to application A, application C, and application D, respectively. Therefore, application B is excluded, and the electronic device selects the first application from application A, application C, and application D, and further sorts application A, application C, and application D to obtain the sorting result: application A, application C, and application D. When the second space amount is 80M, application A of 20M and application C of 100M are selected as the first application.

[0079] In an embodiment of the present application, a first application is selected from at least one second application included in the data partition based on a second amount of space representing the size of space required to download the complete target file. The first application can be selected based on the required space size, thereby minimizing the impact of uninstalling the first application on user usage.

[0080] In some embodiments, the electronic device determines the first application from the at least one second application comprises the following steps:

[0081] Detect whether there is a third application in the at least one second application, the third application being the running second application;

[0082] In a case where the third application exists in the at least one second application, the third application is deleted from the at least one second application.

[0083] Here, before determining the first application, the electronic device detects the running second application, namely the third application, and deletes the third application from at least one second application as a selection range.

[0084] In one example, at least one second application includes: application 1, application 2, application 3, application 4, and application 5. When the electronic device detects that application 2 is running, it filters out application 2 from at least one second application and only sorts application 1, application 3, application 4, and application 5 to determine the first application from application 1, application 3, application 4, and application 5.

[0085] The program management method provided in the embodiment of the present application excludes the second application currently running in the data partition from the selection range when determining the first application to be uninstalled, thereby preventing the second application currently running from being uninstalled as the first application, thereby affecting the user's use of the running application.

[0086] In some embodiments, the electronic device further implements the following steps: if there is a corresponding target preset application for the first application, loading the target preset application, the first application is an update program for the target preset application, and the target preset application is installed in the system partition.

[0087] Optionally, the target preset application is a preset application corresponding to the first application in at least one preset application installed in the system partition. When there is a corresponding target preset application for the uninstalled first application, the electronic device can load the target preset application in the system partition after uninstalling the first application, so that the disabled target preset application is loaded. When the user needs to run the first application, the electronic device can directly call the target preset application from the system partition to replace the first application.

[0088] In an embodiment of the present application, the first application and the corresponding target preset application are different versions of the same application, and the version of the target preset application is lower than the file version of the first application, that is, the first application is an update program of the target preset application. The application information of the target preset application can be preset in the electronic device when the electronic device leaves the factory, or it can be stored in the electronic device during the subsequent update process of the application. Since the functions of the first application and the target preset application are different, but the services provided are basically the same, when the user calls the first application, the electronic device provides services to the user through the target preset application, so that the user cannot perceive the uninstallation of the first application.

[0089] In the program management method provided in the embodiment of the present application, when the electronic device uninstalls the first application in the data partition in order to download a target file, and the uninstalled first application has a corresponding target preset application in the system partition, the electronic device uninstalls the first application and loads the disabled target preset application, so that the user is unaware of the uninstallation of the first application, avoiding the problem of a pop-up window reminding the user to uninstall the application when there is insufficient space to download the target file.

[0090] In some embodiments, after deleting the target file in S203, the electronic device further performs the following steps: installing the first application in the first space.

[0091] After deleting the target file and releasing the first space in the data partition, the electronic device re-downloads the installation file corresponding to the first application and installs the first application in the data partition based on the installation file to restore the first application in the data partition.

[0092] It is understandable that after the electronic device completes the deletion of the target file, the target file required for the installation of the first application can be downloaded to the data partition, or to other partitions outside the data partition. After the first application is completed, the downloaded target file can be deleted.

[0093] The method provided in the embodiment of the present application restores the uninstalled target application after completing the installation of the target application, thereby avoiding the interruption of the installation of the target program caused by insufficient space without affecting the applications installed on the electronic device, thereby improving the user experience.

[0094] In some embodiments, installing the first application in the first space includes at least one of the following methods 1 and 2:

[0095] Method 1: based on the application information corresponding to the first application, download the installation file corresponding to the first application; based on the installation file corresponding to the first application, install the first application in the first space.

[0096] When the electronic device uninstalls the first application, the application information of the first application may be retained, wherein the retained application information may include: installation package name, version information, etc. After deleting the target file, the electronic device may download the installation file corresponding to the first application based on the retained application information, and reinstall the first application in the data partition based on the downloaded installation file, thereby restoring the downloaded first application in the data partition. It is understandable that the first application may or may not have a corresponding target preset application.

[0097] Method 2: When a corresponding target preset application exists for the first application, an installation file corresponding to the first application is downloaded based on the target preset application, the first application is an update program for the target preset application, and the target preset application is installed in the system partition; and the first application is installed in the first space based on the installation file corresponding to the first application.

[0098] In the second method, for a first application program that has a corresponding target preset application program, when the electronic device uninstalls the first application program, the target preset application program is saved in the system partition. After deleting the target file, the electronic device can download the installation file corresponding to the first application program based on the target preset application program corresponding to the first application program saved in the system partition, and reinstall the first application program in the data partition based on the downloaded installation file, thereby restoring the downloaded first application program in the data partition.

[0099] In the embodiment of the present application, the first application is an update program of the target preset application, that is, the version of the target preset application is lower than the file version of the first application. Although there is a target preset application, so that the user can use the application normally according to the file of the target preset application when starting the application, because the version of the target preset application is lower, the user may have inconvenience in use, and the first application is optimized or improved on the basis of the functions provided by the target preset application relative to the target preset application. Therefore, relative to the services provided by the target preset application, the first application can provide services with better user experience. In the case of the existence of the target preset application, the electronic device can install the update program of the target preset application, that is, the first application, after the target program is installed, so as to provide users with a better user experience.

[0100] In the embodiment of the present application, in method one or method two, the installation file corresponding to the first application can be downloaded through a browser or a program management application, and the first application can be reinstalled in the data partition based on the downloaded installation file.

[0101] In the program management method provided in the embodiment of the present application, different recovery methods are used to restore the uninstalled first application based on whether the first application has a corresponding preset application. The user does not need to know the first application that was uninstalled during the target file download process, and the first application is directly restored, so that the electronic device can download the target file normally while ensuring that other applications in the electronic device are not affected by the download process.

[0102] In some embodiments, before installing the first application in the first space, the electronic device also performs the following steps: detecting an update flag, wherein the update flag is used to indicate whether the target program has been installed; wherein, if the update flag indicates that the target program has been installed, installing the first application in the first space.

[0103] In the embodiment of the present application, an update flag is set, and the update flag is used to indicate whether the target program is currently installed. When the target program is installed, the first application can be reinstalled in the data partition. It is understandable that different values ​​of the update flag indicate different installation conditions of the target program. When the value of the update flag is the first value, it indicates that the current target program is not installed. When the value of the update flag is the second value, it indicates that the installation of the current target program is complete. The first value and the second value are different values, and the size of the first value and the second value can be set according to actual needs.

[0104] In one example, when the target file is a system upgrade package, the update flag can be defined as system_is_updating. When the value of sy stem_is_updating is 1, it indicates that the system upgrade package is currently being downloaded, and the system is upgraded based on the downloaded system upgrade package; when the value of system_is_updating is 0, it indicates that the system upgrade package is not currently being downloaded.

[0105] It is understandable that when the update flag indicates that the target program has been installed, in addition to installing the first application, if it is detected that the second application in the data partition needs to be updated, such as the existence of an optimized version, the application that needs to be updated can also be updated. At this time, it can be understood that the update flag also indicates whether at least one second application in the data partition is updated, wherein, if the target program has not been installed, at least one second application in the data partition will not be updated, and if the target program has been installed, at least one second application in the data partition can be updated.

[0106] Before the electronic device installs the first application in the first space, it first detects the installation status of the target program represented by the update identification bit. When the update identification bit indicates that the target application has been installed, it downloads the installation package of the first application and installs the first application in the data partition based on the downloaded installation package, thereby avoiding the recovery of the first application during the process of uninstalling the first application or when the target program has not been installed completely, which may lead to the failure of the target program installation due to insufficient space.

[0107] In an embodiment of the present application, during the process of downloading the target file and installing the target program, the value of the update flag is maintained to indicate that the target program has not been installed completely. After the installation of the target program is completed, the value of the update flag is modified so that the value of the update flag indicates that the installation of the target program is complete. Then, the second application can be updated. At this time, the modification based on the value of the update flag enables the first application to be restored.

[0108] In some embodiments, the electronic device further implements the following steps:

[0109] When a download instruction is received, the update flag is set so that the update flag indicates that the target program has not been installed completely, and the download instruction is used to instruct the installation of the target program.

[0110] When the electronic device receives a download instruction indicating downloading a target file corresponding to a target program, it determines that the target file needs to be downloaded, and installs the target program based on the downloaded target file. At this time, the value of the update flag is first set so that the update flag indicates that the target program has not been installed completely, that is, it represents stopping the updating of the at least one second application. In this way, by controlling the update of the second application through the update flag, it is avoided that the first application is restored during the process of uninstalling the first application or when the target program is not installed completely, which again causes the failure of the target program installation due to insufficient space.

[0111] Below, taking the electronic device as a television and the target program as a system program as an example, the program management method provided in the embodiment of the present application is further explained.

[0112] At present, in order to save costs, the storage space of televisions is relatively small, which is 8G or 16G. When the television is performing a system upgrade, the system upgrade package needs to be downloaded to the user space, that is, the data partition. The television will pre-install applications in the system space, that is, the system partition. These applications are installed together with the system program, that is, the system, before the user purchases the television. These pre-installed applications can be called pre-installed applications, that is, pre-set applications. The pre-installed applications in the system partition can occupy more than 1G of space in the system partition. When the user purchases the television and turns on the television at home, the pre-installed applications in the system partition of the television will have corresponding high versions. The user can upgrade these pre-installed applications through the program management application. The upgraded high version of the application is installed in the data partition, and the low version of the pre-installed application installed in the system partition will be retained, thereby ensuring that when the television is used after performing a factory reset, the television is still installed with pre-installed applications, and the program management application can continue to manage these pre-installed applications. Among them, when the television performs a factory reset, the data in the data partition will be cleared, but the data in the system partition will be retained.

[0113] In the embodiment of the present application, in addition to upgrading the pre-installed applications, the television can also install applications other than the pre-installed applications during use.

[0114] In one example, Figure 6This is a diagram showing the effect of files installed in each space when the TV is turned on for the first time without upgrading the pre-installed applications. Figure 7 This is a diagram showing the effect of files installed in each space after the pre-installed applications are upgraded.

[0115] like Figure 6 As shown, the storage area 600 of the television includes the following partitions: system partition 601, recovery partition 602, data partition 603, cache partition 604. The system partition 601 has pre-installed applications installed: application A of version 1.0, application B of version 1.0, and application C of version 1.0.

[0116] In actual applications, the storage area 600 of the television may also include other partitions: for example, a partition responsible for startup, a partition responsible for driving, a partition for storing the system kernel, and the like.

[0117] After the applications on the TV are managed by the Program Manager application for a period of time, such as Figure 7 As shown, the data partition 602 has the following installed: application A of version 2.0, application B of version 2.0, and application C of version 2.0. The data partition 602 also has the following installed: application D of version 1.0 and application E of version 3.0. Figure 7 As shown, the data partition 602 also stores user data 6031 and a system upgrade package 6032. At this time, the following pre-installed applications are still retained in the system partition 601: 1.0 version application A, 1.0 version application B, and 1.0 version application C. Among them, 2.0 version application A, 2.0 version application B, and 2.0 version application C are upgraded versions of 1.0 version application A, 1.0 version application B, and 1.0 version application C, respectively.

[0118] like Figure 7 As shown, the program management application Figure 6 The pre-installed applications shown are upgraded, and the user installs applications other than the pre-installed applications through the program management application. If the remaining space in the data partition is sufficient, the downloaded system upgrade package can also be stored, and the system can be upgraded through the downloaded system upgrade package.

[0119] In the related art, when a higher version application corresponding to a preset application is installed in a data partition and other applications are installed, if the TV receives a new system upgrade push message from the program management application, but the remaining space in the data partition is insufficient to download the complete system upgrade package, the download of the system upgrade package will be interrupted, and a pop-up window will appear to remind the user that the current storage space is insufficient, and the user needs to uninstall some applications to free up space before continuing to download the system upgrade package.

[0120] The system upgrade process in the related technology is as follows: Figure 8 As shown, including:

[0121] S801. TV pushes system upgrade message.

[0122] When the program management application in the TV detects a new version of the system, it pushes a system upgrade message.

[0123] S802: The TV downloads a system upgrade package based on the system upgrade message.

[0124] When the TV receives the system upgrade message, it prompts the user whether to download the system upgrade package. When receiving the download instruction to download the system upgrade package, the TV downloads the system upgrade package.

[0125] Here, the TV stores the data of the downloaded system upgrade package in the data partition.

[0126] S803: The television determines whether there is any remaining space in the data partition.

[0127] If there is remaining space in the data partition, execute S804; otherwise, execute S805.

[0128] S804. The TV continues to download the system upgrade package.

[0129] Here, S803 may be continued to be executed while the system upgrade package is being downloaded.

[0130] S805. The TV stops downloading the system upgrade package.

[0131] S806. A reminder window pops up on the TV.

[0132] When the data partition is judged to have no remaining space, a reminder window pops up to inform the user that there is currently insufficient remaining space and the system upgrade package cannot be downloaded. The user is reminded that the application needs to be uninstalled to free up space before continuing to download the system upgrade package.

[0133] S807: The television determines whether an uninstall instruction for uninstalling the application program is received.

[0134] If no uninstall instruction is received, S808 is executed. If an uninstall instruction is received, S809 is executed.

[0135] S808. The TV terminates the system upgrade.

[0136] S809. The TV uninstalls the application and continues to download the system upgrade package.

[0137] Here, the application indicated by the uninstallation instruction is uninstalled from the data partition to release space for the system upgrade package, and the system upgrade package is continuously downloaded based on the released space.

[0138] S810, TV installs the downloaded system upgrade package.

[0139] Complete the system upgrade by installing the downloaded system upgrade package.

[0140] S811. The TV deletes the system upgrade package from the data partition.

[0141] In actual applications, there are the following problems in uninstalling applications, which make users unwilling to uninstall applications:

[0142] 1. The process of uninstalling applications is cumbersome, requiring users to find the application management option in the settings interface, and then select the application to be uninstalled in the application management interface;

[0143] 2. The uninstalled applications need to free up enough space to download the complete system upgrade package. Therefore, the user needs to calculate which applications need to be uninstalled based on the size of the system upgrade package;

[0144] 3. Uninstalled applications need to be reinstalled; if the system upgrade package is downloaded and the system upgrade is completed by uninstalling the application, the system upgrade package will be automatically deleted. At this time, the space occupied by the system upgrade package will be released. If the user needs to restore the uninstalled application, it can be automatically installed through the program management application or automatically installed through the program management application. Among them, if the uninstalled application is a higher version application corresponding to the pre-installed application in the data partition, it can be automatically upgraded through the program management application. If the uninstalled application does not have a corresponding pre-installed application, the user needs to manually download and install it through the program management application. It should be noted that most users do not understand the difference between these two types of applications.

[0145] Based on the above reasons, most users will choose not to upgrade the system when the system cannot be upgraded due to insufficient space in the data partition, resulting in a low system upgrade rate. If users are not aware of low-version systems with vulnerabilities (bugs), the existence of vulnerabilities in low-version systems affects the user experience.

[0146] The program management method provided in the embodiment of the present application is as follows: Fig. 9 As shown, including:

[0147] S901. The TV pushes system upgrade information.

[0148] When the program management application in the TV detects a new version of the system, it pushes a system upgrade message.

[0149] S902: Based on the system upgrade message, the television sets an upgrade flag to indicate an upgrade.

[0150] When the TV receives a system upgrade message, it prompts the user whether to download the system upgrade package. When receiving a download instruction to download the system upgrade package, the TV sets the upgrade flag, that is, updates the identification bit to indicate the upgrade, so as to indicate that the current system is being upgraded.

[0151] S903: The television stops upgrading the application based on the upgrade flag indicating the upgrade.

[0152] S904, TV download system upgrade package.

[0153] Here, the TV stores the data of the downloaded system upgrade package in the data partition.

[0154] S905: The television determines whether there is any remaining space in the data partition.

[0155] If there is remaining space in the data partition, the TV executes S906; otherwise, the TV executes S907.

[0156] S906. The TV continues to download the system upgrade package.

[0157] Here, the TV may continue to execute S905 while downloading the system upgrade package.

[0158] S907: The television pauses downloading the system upgrade package and calculates the space required to download the complete system upgrade package.

[0159] The space required to download the complete upgrade package here is the second space amount.

[0160] S908: The television determines a first application program to be uninstalled according to the space required for downloading the complete system upgrade package.

[0161] Here, the first application is an application for which a corresponding pre-installed application exists in the data partition, and one or more first applications may be determined according to the space required for downloading the complete system upgrade package.

[0162] S909: The television uninstalls the first application from the data partition to release space.

[0163] Here, the space for the system upgrade package is released by uninstalling one or more first applications in the data partition.

[0164] S910. The TV continues to download the system upgrade package based on the released space.

[0165] S911, TV installs the downloaded system upgrade package.

[0166] Complete the system upgrade by installing the downloaded system upgrade package.

[0167] S912. The TV deletes the system upgrade package from the data partition.

[0168] S813: The TV is set to an upgrade flag indicating that it has not been upgraded.

[0169] The television sets the upgrade flag indicating the upgrade to indicate not upgraded. When the upgrade flag indicates not upgraded, it indicates that the system is not currently upgraded. At this time, the program management application resumes the application upgrade function.

[0170] S914. The television installs the first application.

[0171] The program management application installs the first application in the data partition by upgrading the preset application, thereby completing the automatic recovery of the first application.

[0172] The program management method provided in the embodiment of the present application can be applied to Fig.10 In the electronic device shown, Fig.10 As shown, the electronic device 100 includes: a system upgrade module 1001, a system property module 1002, a program management module 1003 and an uninstall management module 1004.

[0173] based on Fig.10 The electronic equipment shown, such as Fig.11 As shown:

[0174] The system upgrade module 1001 can calculate the amount of space required to download the complete system upgrade package, and send the required amount of space, ie, the second amount of space, to the uninstall management module 1004 .

[0175] The uninstall management module 1004 determines the first application to be uninstalled from the data partition according to the required amount of space, and silently uninstalls the first application in the background to free up space for the system upgrade package to be uninstalled. Here, the uninstall management module may uninstall the first application in the background without notifying the user, so that the electronic device can perform the uninstallation without perception.

[0176] In one example, the uninstall management module 1004 silently uninstalls the 2.0 version of the pre-installed application installed in the data partition to release space for the system upgrade module 1001 to download the system upgrade package update.zip to the data partition.

[0177] The TV will maintain a configuration file, package.xml file, which records the application information of all applications. The application information here includes information such as application size, package name, storage path, etc., and also includes: version information of the application before the application is updated and version information of the application after the application is updated. The uninstall management module 1004 will load the application information in the package.xml file, filter out the application information of the application to be updated based on the pre-installed application, and put it into a list A, that is, put the application information of all 2.0 versions of the pre-installed application update program into list A, and then determine the application to be uninstalled according to the remaining space in the data partition. For example, the order of the applications in list A is: 200MB application A 2.0, 200MB application B 2.0, 200MB application C, 100MB application D2.0, then the applications will be uninstalled one by one in the order of the applications in list A until the space required to download the upgrade package is met. In the case where the system upgrade package update.zip is 300MB, only application A 2.0 and application B 2.0 are required. If the user is currently using application B, the uninstallation of application B 2.0 will be skipped, and the final result will be application A 2.0 and application C 2.0.

[0178] The system upgrade module 1001 writes an upgrade flag, i.e., an update flag, in the system attribute module 1002 to indicate that a system upgrade is in progress, and sets the upgrade flag to indicate that a system upgrade is in progress. For example, the system upgrade module 1001 writes system_is_updating=1 in the system attribute module 1002 to indicate that a system upgrade is currently in progress.

[0179] The program management module 1003 determines that system_is_updating=1, and then suspends the updating of the application.

[0180] After the system upgrade package is downloaded and installed successfully, the system upgrade module 1001 deletes the system upgrade package downloaded to the data partition and changes the system_is_updating in the system attribute module 1002 to 0, indicating that the system upgrade is complete and the application in the data partition can be updated.

[0181] The program management module 1003 determines the upgrade flag, and when system_is_updating=0, it is determined that the application in the data partition can be updated, and then the 2.0 version of the preset application is installed in the data partition based on the 1.0 version of the preset application in the system partition.

[0182] In the embodiment of the present application, the system partition is read-only, and data writing and deletion are not allowed. Once the data is changed, it will affect the system upgrade, and the system upgrade is mainly to upgrade this partition. The data partition is readable and writable, and data can be added or deleted. All application installations and data storage after the TV leaves the factory are in this partition, and the system upgrade will not change any content in the data partition. The TV can install a higher version of the application in the data partition based on the pre-installed application installed in the system partition.

[0183] In one example, if Fig.12 As shown, the system partition 1202 has the following applications installed: application A1.0, application B1.0 and application C1.0, and the data partition 1201 has the following applications installed: application A2.0, application B2.0, user-installed A1.0, user-installed B1.0. Among them, user-installed A1.0 and user-installed B1.0 are applications for which there are no pre-installed applications.

[0184] The program management module in the TV is responsible for installing and uninstalling applications. When a user installs a self-installed application for which there is no corresponding pre-installed application, the self-installed application will be installed in the data partition, such as Fig.12 "User-installed A1.0" in package.xml will record the user-installed A1.0 application information. If the pre-installed application is upgraded, package.xml will contain both the application information before and after the upgrade of the pre-installed application, such as Fig.12 The application information of application A1.0 and application A2.0 in package.xml. If the pre-installed application is not upgraded, there is only one application information in package.xml, such as Fig.12 When the user opens application A on the TV, the system will first search for the application information in package.xml and find that there are two versions of application A. Finally, it will open the higher version application A 2.0. When application A 2.0 is uninstalled, application A 2.0 in the data partition is deleted, and the application information of application A2.0 in package.xml will be deleted. Then the next time the user opens application A, only application A 1.0's application information can be found in package.xml, so the application A 1.0 in the system partition is opened at this time.

[0185] In practical applications, the program management method provided in the embodiments of the present application can also be applied to electronic devices other than televisions, such as mobile phones, computers, smart watches, etc.

[0186] The program management method provided in the embodiment of the present application has the following technical effects:

[0187] 1. When the remaining space in the data partition is insufficient, there is no need to remind the user to manually uninstall the application, which reduces the interference of pop-up boxes on users;

[0188] 2. Automatically and silently uninstall the first application in the background to free up space, allowing the system upgrade to proceed normally and avoiding the user's trouble of not knowing which applications need to be uninstalled;

[0189] 3. Improve user upgrade rate;

[0190] 4. The first application to be uninstalled is an update program of the preset application in the data partition. Therefore, after the first application is uninstalled, the system will load the preset application in the system partition, so that the uninstallation of the first application will not affect the user's use.

[0191] Fig.13 A schematic diagram of the implementation flow of a program management device according to an embodiment of the present application, which is applied to electronic devices, such as Fig.13 As shown, the apparatus 1300 includes:

[0192] The uninstallation module 1301 is configured to uninstall a first application installed in the data partition to release a first space occupied by the first application when detecting that the free space amount of the data partition is less than a first space amount, where the first space amount is the space amount required to download the target file;

[0193] An updating module 1302, configured to download the target file based on the first space, and install the target program based on the target file;

[0194] The release module 1303 is used to delete the target file after the installation of the target program is completed.

[0195] In some embodiments, the apparatus 1300 further includes a selection module, configured to:

[0196] determining at least one second application installed on the data partition;

[0197] A first application is determined from among the at least one second application.

[0198] In some embodiments, the selection module is further used to:

[0199] Confirm whether each of the at least one second application has a corresponding preset application in the system partition, so as to determine the first application from among the second applications for which the corresponding preset application exists in the at least one second application.

[0200] In some embodiments, the selection module is further used to:

[0201] sorting the at least one second application according to an uninstallation priority of each second application among the at least one second application;

[0202] The first application is determined according to a second space amount and a ranking result of the at least one second application, wherein the second space amount is a space amount difference between the first space amount and the free space amount.

[0203] In some embodiments, the selection module is further used to:

[0204] Detect whether there is a third application in the at least one second application, the third application being the running second application;

[0205] In a case where the third application exists in the at least one second application, the third application is deleted from the at least one second application.

[0206] In some embodiments, the apparatus 1300 further includes: a loading module, configured to:

[0207] In the case that the first application has a corresponding target preset application, the target preset application is loaded, the first application is an update program of the target preset application, and the target preset application is installed in a system partition.

[0208] In some embodiments, the apparatus 1300 further includes: a recovery module, configured to:

[0209] After deleting the target file, installing the first application in the first space.

[0210] In some embodiments, the recovery module is further configured to:

[0211] Downloading an installation file corresponding to the first application based on the application information corresponding to the first application;

[0212] The first application is installed in the first space based on the installation file corresponding to the first application.

[0213] In some embodiments, the recovery module is further configured to:

[0214] If the first application has a corresponding target pre-installed application, downloading an installation file corresponding to the first application based on the target pre-installed application, the first application is an updater of the target pre-installed application, and the target pre-installed application is installed in the system partition;

[0215] The first application is installed in the first space based on the installation file corresponding to the first application.

[0216] In some embodiments, the apparatus 1300 further includes: a detection module, configured to:

[0217] Detect an update flag, where the update flag is used to indicate whether the target program has been installed; wherein, if the update flag indicates that the target program has been installed, install the first application in the first space.

[0218] In some embodiments, the apparatus 1300 further includes: a setting module, configured to:

[0219] When a download instruction is received, the update flag is set so that the update flag indicates that the target program has not been installed completely, and the download instruction is used to instruct the installation of the target program.

[0220] The structure of the electronic device provided in the embodiment of the present application can be divided into: Fig.13 The structure shown can also be divided into Fig.10 The structure shown in the embodiment of the present application does not impose any limitation on the structural division of the electronic device.

[0221] It should be noted that the program management device provided in the embodiment of the present application includes the various modules included, which can be implemented by a processor in an electronic device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU, Central Processing Unit), a microprocessor (MPU, Micro Processor Unit), a digital signal processor (DSP, Digital Sign al Processor) or a field programmable gate array (FPGA, Field-Programmable Gate Array), etc.

[0222] 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 application, please refer to the description of the method embodiment of the present application for understanding.

[0223] It should be noted that in the embodiment of the present application, if the above-mentioned program management method 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 such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. 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 disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0224] Correspondingly, an embodiment of the present application provides an electronic device, including 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 program, the steps in the program management method provided in the above embodiment are implemented.

[0225] Correspondingly, an embodiment of the present application provides a storage medium, that is, a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the program management method provided in the above embodiment are implemented.

[0226] It should be noted here 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 this application, please refer to the description of the method embodiments of this application for understanding.

[0227] It should be noted that Fig.14 A hardware entity diagram of an electronic device according to an embodiment of the present application is shown in FIG. Fig.14 As shown, the electronic device 1400 includes: a processor 1401, at least one communication bus 1402, at least one external communication interface 1404 and a memory 1205. The communication bus 1402 is configured to achieve connection and communication between these components. In an example, the electronic device 1400 also includes: a user interface 1403, wherein the user interface 1403 may include a display screen, and the external communication interface 1404 may include a standard wired interface and a wireless interface.

[0228] The memory 1405 is configured to store instructions and applications executable by the processor 1401, and can also cache data to be processed or processed by the processor 1401 and various modules in the electronic device (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).

[0229] 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 application. Therefore, "in one embodiment" or "in some embodiments" appearing throughout the specification may 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 application, the size of the sequence 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 application. The above-mentioned sequence numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.

[0230] 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.

[0231] 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.

[0232] 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.

[0233] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate 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.

[0234] 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.

[0235] Alternatively, if the above-mentioned integrated unit of the present 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 application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0236] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A program management method, characterized in that: The method comprises: When detecting that the free space amount of the data partition is less than a first space amount, uninstalling a first application installed in the data partition to release a first space occupied by the first application, where the first space amount is a space amount required to download a target file; Downloading the target file based on the first space, and installing the target program based on the target file; After the installation of the target program is completed, deleting the target file; Before uninstalling the first application installed in the data partition, the method further includes: determining at least one second application installed on the data partition; determining the first application from the at least one second application; Before determining the first application from the at least one second application, the method further includes: Confirm whether each of the at least one second application has a corresponding preset application in the system partition, so as to determine the first application from among the second applications for which the corresponding preset application exists in the at least one second application.

2. The method according to claim 1, characterized in that The determining the first application from the at least one second application comprises: sorting the at least one second application according to an uninstallation priority of each second application among the at least one second application; The first application is determined according to a second space amount and a ranking result of the at least one second application, wherein the second space amount is a space amount difference between the first space amount and the free space amount.

3. The method according to claim 1, characterized in that The determining the first application from the at least one second application comprises: Detect whether there is a third application in the at least one second application, the third application being the running second application; In a case where the third application exists in the at least one second application, the third application is deleted from the at least one second application.

4. The method according to claim 1, characterized in that The method further comprises: In the case that the first application has a corresponding target preset application, the target preset application is loaded, the first application is an update program of the target preset application, and the target preset application is installed in a system partition.

5. The method according to claim 1, characterized in that After deleting the target file, the method further includes: The first application is installed in the first space.

6. The method according to claim 5, characterized in that The step of installing the first application in the first space includes: Downloading an installation file corresponding to the first application based on the application information corresponding to the first application; The first application is installed in the first space based on the installation file corresponding to the first application.

7. The method according to claim 5, characterized in that The step of installing the first application in the first space includes: If the first application has a corresponding target pre-installed application, downloading an installation file corresponding to the first application based on the target pre-installed application, the first application is an updater of the target pre-installed application, and the target pre-installed application is installed in the system partition; The first application is installed in the first space based on the installation file corresponding to the first application.

8. The method according to claim 5, characterized in that Before installing the first application in the first space, the method further includes: Detect an update flag, where the update flag is used to indicate whether the target program has been installed; wherein, if the update flag indicates that the target program has been installed, install the first application in the first space.

9. The method according to claim 8, characterized in that The method further comprises: When a download instruction is received, the update flag is set so that the update flag indicates that the target program has not been installed completely, and the download instruction is used to instruct the installation of the target program.

10. A program management device, characterized in that: The device comprises: an uninstallation module, configured to uninstall a first application installed in the data partition to release a first space occupied by the first application when detecting that the free space amount of the data partition is less than a first space amount; the first space amount is the space amount required to download the target file; An update module, configured to download the target file based on the first space, and install the target program based on the target file; A release module, used to delete the target file after the target program is installed; A selection module, configured to determine at least one second application installed in the data partition; and to determine a first application from the at least one second application; The selection module is also used to confirm whether each of the at least one second application has a corresponding preset application in the system partition before determining the first application from the at least one second application, so as to determine the first application from the second applications among the at least one second application for which the corresponding preset application exists.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the program management method according to any one of claims 1 to 9 are implemented.

12. A storage medium storing an executable program, characterized in that: When the executable program is executed by a processor, the program management method according to any one of claims 1 to 9 is implemented.