Application program updating method and device, terminal and storage medium

By downloading the differential package and using the target operating system to update the installation directory of the Android application, the problems of low efficiency and resource waste in Android application version updates are solved, fast and economical version updates are achieved, and the user experience is improved.

CN114090055BActive Publication Date: 2025-10-10DOUYIN VISION CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111338026.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-10
Publication Date
2025-10-10
Estimated Expiration
2041-11-10

AI Technical Summary

Technical Problem

The update efficiency of existing Android application versions is low and easily leads to waste of resources.

Method used

By downloading the differential package from the server and using the target operating system (such as Linux system) to directly update the installation directory of the Android application in the Android system, the Android system's Package Management Service (PMS) is bypassed and only the changed parts are updated.

Benefits of technology

It improves the efficiency of version updates, saves download and installation resources, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090055B_ABST
    Figure CN114090055B_ABST
Patent Text Reader

Abstract

The application provides an application program updating method and device, a terminal and a storage medium, wherein the method comprises the following steps: downloading a differential package corresponding to a current installation version of an Android application program from a server, wherein the differential package comprises difference information between a new version of the Android application program and the current installation version; and performing an updating operation on an installation directory of the Android application program in an Android system by using the differential package through a target operating system, so that the current installation version is updated to the new version; wherein the target operating system is different from the Android system and has an operation permission for the installation directory of the Android application program. In this way, the version of the Android application program is quickly updated, resources are saved, and user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of application program update, and in particular to an application program update method, device, terminal, and storage medium. Background Art

[0002] The Android system is a free and open source operating system based on the Linux kernel. It can be used in terminals such as smartphones and tablets. It supports the running of Android applications to provide various service functions to meet people's life and work needs.

[0003] In the prior art, when an Android application needs to be updated, it is necessary to download the complete installation package and complete the update through the Android system's Package Manager Service (PMS). In this update method, even if the installation package has only minor changes, the complete installation package needs to be downloaded, which not only has low version update efficiency but also easily causes resource waste. Summary of the Invention

[0004] The present invention provides an application update method, device, terminal and storage medium, which are used to solve the defects of the existing technology that the Android application version update efficiency is low and easily causes resource waste, realize the rapid update of the Android application version and save resources, thereby improving the user experience.

[0005] In a first aspect, an embodiment of the present invention provides an application updating method, comprising:

[0006] Downloading a differential package corresponding to the currently installed version of the Android application from the server, the differential package including difference information between the new version of the Android application and the currently installed version;

[0007] Through the target operating system, the differential package is used to update the installation directory of the Android application in the Android system to update the current installed version to the new version; wherein, the target operating system is different from the Android system and has operation permissions on the installation directory of the Android application.

[0008] Optionally, after updating the installation directory of the Android application in the Android system by using the differential package through the target operating system, the method further includes:

[0009] The package management service of the Android system is notified to update the managed information of the currently installed version to the information of the new version.

[0010] Optionally, downloading the differential package corresponding to the currently installed version of the Android application from the server includes:

[0011] In response to a version update instruction from the Android application, downloading the differential package from the server; wherein the version update instruction is issued by the Android application after detecting a version update at startup;

[0012] Alternatively, the version number of the latest version of the Android application is obtained from the server, and the version number of the latest version is compared with the version number of the currently installed version to see whether they are the same. In response to the comparison result being different, the differential package is downloaded from the server.

[0013] Optionally, the updating operation on the installation directory of the Android application in the Android system by using the differential package through the target operating system includes:

[0014] In response to determining that the differential package is downloaded completely and / or passes the security check, the target operating system uses the differential package to update the installation directory of the Android application in the Android system.

[0015] Optionally, after downloading the differential package corresponding to the currently installed version of the Android application from the server, and before updating the installation directory of the Android application in the Android system using the differential package through the target operating system, the method further includes:

[0016] determining whether the size of the differential package is a preset size, and in response to the size of the differential package being the preset size, determining that the differential package is completely downloaded;

[0017] And / or, generating a check code based on the differential packet, determining whether the generated check code is a preset check code, and determining that the differential packet passes security verification in response to the generated check code being the preset check code.

[0018] Optionally, the updating operation on the installation directory of the Android application in the Android system by using the differential package includes:

[0019] Parsing the difference information from the difference packet;

[0020] In response to the difference information including the newly added file and the corresponding path information, adding the newly added file to the installation directory of the Android application according to the path information corresponding to the newly added file;

[0021] In response to the difference information including the replacement file and the corresponding path information, searching for the original file in the installation directory of the Android application according to the path information corresponding to the replacement file, and replacing the original file with the replacement file;

[0022] In response to the difference information including the path information corresponding to the to-be-deleted file, the to-be-deleted file in the installation directory of the Android application is found and deleted according to the path information corresponding to the to-be-deleted file.

[0023] Optionally, the target operating system is a Linux system.

[0024] In a second aspect, an embodiment of the present invention provides an application updating device, comprising:

[0025] A differential package download module is used to download a differential package corresponding to the currently installed version of the Android application from the server, wherein the differential package includes difference information between the new version of the Android application and the currently installed version;

[0026] A version update module is used to update the installation directory of the Android application in the Android system using the differential package through a target operating system to update the currently installed version to the new version; wherein, the target operating system is different from the Android system and has operation permissions on the installation directory of the Android application.

[0027] In a third aspect, an embodiment of the present invention provides a terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the application updating method provided in the first aspect are implemented.

[0028] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the application updating method provided in the first aspect above.

[0029] An embodiment of the present invention provides an application update method. On the one hand, a differential package corresponding to the currently installed version of an Android application is downloaded from a server. Since the differential package includes the difference information between the new version of the Android application and the currently installed version, it is smaller in size compared to a complete installation package, which not only improves the download speed and thus improves the version update efficiency, but also saves download resources. On the other hand, by using a target operating system that is different from the Android system and has the operation authority over the installation directory of the Android application, a simple update operation is directly performed on the installation directory of the Android application in the Android system using a differential package, and the current installed version can be quickly updated to the new version, thereby achieving a rapid differential update, that is, only updating the changed part of the Android application, saving installation resources, being convenient and flexible, and thus improving the version update efficiency of the Android application. In this way, the version of the Android application is quickly updated, resources are saved, and the user experience is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0031] Figure 1 This is one of the flow charts of the application updating method provided by an embodiment of the present invention;

[0032] Figure 2 This is a second flow chart of the application updating method provided by an embodiment of the present invention;

[0033] Figure 3 is a structural diagram of an application updating device provided by an embodiment of the present invention;

[0034] Figure 4 It is a structural diagram of the terminal provided by the present invention. DETAILED DESCRIPTION

[0035] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0036] Figure 1 Schematic diagram of the process of the application updating method provided by the embodiment of the present invention. Figure 1 As shown, the method can be executed by a terminal such as a mobile phone or a combination of software and / or hardware therein, and the method includes:

[0037] Step 110: Download the differential package corresponding to the currently installed version of the Android application from the server. The differential package includes difference information between the new version of the Android application and the currently installed version.

[0038] In actual applications, if there are problems with the Android application after it is launched, or the original functions of the Android application need to be optimized, or new functions are added to the Android application, the version of the Android application can be updated. After the development of the new version of the Android application is completed, the differences between the new version and the old version of the Android application can be compared to obtain difference information. Then, the difference information is packaged to obtain a differential package, and the differential package is published to the server for the terminal to download when the Android application needs to be updated. Since the downloaded differential package does not include all the information of the new version of the Android application, but only includes the difference information, the size is greatly reduced, which is conducive to improving the download speed and saving download resources.

[0039] Step 120, through the target operating system, using the differential package, update the installation directory of the Android application in the Android system to update the current installed version to the new version; wherein, the target operating system is different from the Android system and has the operation authority for the installation directory of the Android application.

[0040] The Android system is installed on the terminal. Accordingly, the target operating system and the Android system are installed on the same terminal.

[0041] Currently, the Android system does not support manipulation of the installation directory of Android applications. Therefore, traditionally, Android application updates are completed through the Android system's Public Management System (PMS). During a PMS update, the complete installation package must be parsed and the parsed information used to complete the Android application installation. This parsed information can also be used by other services. In existing technologies, even if a differential package is downloaded, it must be merged with the installed version to obtain the complete installation package before the update is completed through the PMS.

[0042] In this step, by using a target operating system that is different from the Android system and has operation permissions on the installation directory of the Android application, a simple update operation is directly performed on the installation directory of the Android application in the Android system using a differential package, so that the current installed version can be quickly updated to the new version, thereby realizing a differential update, that is, only the changed part of the Android application is updated, saving installation resources, being convenient and flexible, and having a higher update efficiency.

[0043] In this embodiment, on the one hand, the differential package corresponding to the currently installed version of the Android application is downloaded from the server. Since the differential package includes the difference information between the new version of the Android application and the currently installed version, it is smaller in size compared to the complete installation package, which not only improves the download speed and thus improves the version update efficiency, but also saves download resources. On the other hand, since a target operating system that is different from the Android system and has the operation authority to the installation directory of the Android application is used, a simple update operation is directly performed on the installation directory of the Android application in the Android system using the differential package, and the current installed version can be quickly updated to the new version, thereby achieving a fast differential update, that is, only updating the changed part of the Android application, saving installation resources, being convenient and flexible, and thus improving the version update efficiency of the Android application. In this way, the version of the Android application is quickly updated and resources are saved, thereby improving the user experience.

[0044] If an Android application encounters an online problem, it can be quickly resolved through a quick version update.

[0045] In actual applications, the logic code of the application updating method provided by the embodiment of the present invention can be encapsulated into an application updating service and set in a target operating system, and the target operating system executes the application updating service.

[0046] Since the Android system is an operating system based on the Linux kernel, the Android system can run on the Linux system. In this case, the Linux system has the operation permission to operate the installation directory of the Android application in the Android system. Therefore, the above target operating system can be the Linux system. By using the Linux system to update the installation directory of the Android application, the solution is more simple to implement.

[0047] Based on any of the above embodiments, after updating the installation directory of the Android application in the Android system through the target operating system using the differential package, the above application update method may also include: notifying the package management service of the Android system to update the information of the currently installed version managed to the information of the new version.

[0048] Since the target operating system is used to update the installation directory of the Android application in the Android system to achieve the version update of the Android application, it is equivalent to bypassing the PMS of the Android system. At this time, in order to ensure the accurate management of the Android application by the PMS, the package management service of the Android system can be notified through the target operating system to update the information of the currently installed version managed to the information of the new version, so as to synchronize the update result of the Android application to the Android system, for example, updating the version number of the currently installed version managed to the version number of the new version.

[0049] Based on any of the above embodiments, the differential package corresponding to the currently installed version of the Android application is downloaded from the server. The specific implementation method may include: downloading the differential package from the server in response to a version update instruction from the Android application; wherein the version update instruction is issued by the Android application after detecting a version update at startup.

[0050] In actual applications, when an Android application is started, it can detect whether there is a version update. After the Android application detects a version update at startup, it can issue a version update instruction. After the target operating system detects the version update instruction from the Android application, it can respond to the version update instruction from the Android application and download the differential package from the server. Subsequently, the differential package is used to update the installation directory of the Android application in the Android system to update the currently installed version to the new version. In this way, the update of the Android application is automatically triggered after the Android application detects a version update at startup, realizing silent update. The user is unaware of the update, thereby further improving the user experience.

[0051] Based on any of the above embodiments, the differential package corresponding to the currently installed version of the Android application is downloaded from the server. The specific implementation method may include: obtaining the version number of the latest version of the Android application from the server, comparing the version number of the latest version with the version number of the currently installed version to see whether they are the same, and in response to the comparison result being different, downloading the differential package from the server.

[0052] In actual applications, the version number of the latest version of the Android application can be obtained from the server. If the version number of the latest version is the same as the version number of the currently installed version, it is considered that the Android application has no version update. If the version number of the latest version is different from the version number of the currently installed version, it is considered that the Android application has a version update. At this time, the differential package can be downloaded from the server, and then the differential package can be used to update the installation directory of the Android application in the Android system to update the currently installed version to the new version.

[0053] During implementation, the terminal can obtain the version number of the latest version of the Android application from the server during a preset idle time, compare the version number of the latest version with the version number of the currently installed version to see if they are the same, and download the differential package from the server in response to the comparison result being different. Exemplarily, the preset idle time can be a preset time in the early morning, for example, a preset time between midnight and 5:00.

[0054] In this embodiment, by actively comparing the version number of the latest version of the server with the version number of the currently installed version, the update of the Android application is automatically triggered when the comparison result is different, realizing silent update, and the user is unaware of the update, thereby further improving the user experience.

[0055] Based on any of the above embodiments, the installation directory of the Android application in the Android system is updated by using the differential package through the target operating system. The specific implementation method may include: in response to determining that the differential package is downloaded completely and / or passes the security check, the installation directory of the Android application in the Android system is updated by using the differential package through the target operating system.

[0056] In actual applications, if the differential package is not downloaded completely, the update cannot be completed. In this embodiment, subsequent update operations can be performed after confirming that the differential package has been downloaded completely, thereby improving processing efficiency. Subsequent update operations can also be performed after confirming that the differential package has passed security verification, thereby improving the security of the update.

[0057] In response to determining that the differential package download is incomplete and / or fails the security check, a prompt message indicating that the update failed can be issued. At this time, the differential package corresponding to the currently installed version of the Android application can be re-downloaded from the server to re-update the version.

[0058] Based on any of the above embodiments, before the updating operation is performed on the installation directory of the Android application in the Android system by using the differential package through the target operating system after the differential package corresponding to the current installation version of the Android application is downloaded from the server, the application updating method can further include: determining whether the size of the differential package is a preset size, and in response to the size of the differential package being the preset size, determining that the differential package is downloaded completely.

[0059] The preset size is the size of the complete differential package. In actual applications, the preset size of the differential package can be obtained from the server. If the size of the downloaded differential package is the preset size, it is considered that the differential package is downloaded completely. This way of determining that the differential package is downloaded completely is simple to implement.

[0060] Of course, other ways of determining that the download is complete can also be used, for example, a preset file list identifying all files in the differential package can be obtained from the server, and it is determined whether the differential package contains all the files identified in the preset file list. If yes, it is determined that the differential package is downloaded completely.

[0061] Based on any of the above embodiments, before the updating operation is performed on the installation directory of the Android application in the Android system by using the differential package through the target operating system after the differential package corresponding to the current installation version of the Android application is downloaded from the server, the application updating method can further include: generating a check code based on the differential package, determining whether the generated check code is a preset check code, and in response to the generated check code being the preset check code, determining that the differential package passes the security check.

[0062] The check code can be, but is not limited to, a Message-Digest Algorithm 5 (MD5) value.

[0063] In actual applications, the preset check code is a check code generated by the server based on the differential package. The terminal can obtain the preset check code of the differential package from the server. If the information of the downloaded differential package is not tampered with, the check code generated by the terminal and the preset check code are the same, and at this time, it is considered that the differential package is secure. In this way, the differential package is checked for security through the check code, which is not only secure but also simple to implement. Of course, other security check methods can also be used, which are not listed one by one here.

[0064] Based on any of the above embodiments, the above-mentioned difference information may include: newly added files and corresponding path information, and / or, replaced files and corresponding path information, and / or, path information corresponding to files to be deleted. In actual applications, if the new version of the Android application has newly added files compared to the currently installed version, the newly added files and corresponding path information can be added to the difference information. If the new version of the Android application has replaced files compared to the currently installed version, the replaced files and corresponding path information can be added to the difference information. If the new version of the Android application has files to be deleted compared to the currently installed version, the path information corresponding to the files to be deleted can be directly added to the difference information.

[0065] Correspondingly, the differential package is used to update the installation directory of the Android application in the Android system, such as Figure 2 As shown, its specific implementation may include:

[0066] Step 210: parse the difference packet to obtain difference information.

[0067] Step 220: In response to the difference information including the newly added file and the corresponding path information, the newly added file is added to the installation directory of the Android application according to the path information corresponding to the newly added file.

[0068] Step 230: In response to the difference information including the replacement file and the corresponding path information, the original file in the installation directory of the Android application is found according to the path information corresponding to the replacement file, and the original file is replaced with the replacement file.

[0069] Step 240: In response to the difference information including the path information corresponding to the file to be deleted, the file to be deleted in the installation directory of the Android application is found and deleted according to the path information corresponding to the file to be deleted.

[0070] In this embodiment, the difference information can be parsed from the differential package, and then the difference information can be used to perform simple operations such as adding, replacing, and deleting the installation directory of the Android application to achieve version updates, which is more efficient.

[0071] Based on any of the above embodiments, after using a differential package to update the installation directory of an Android application in an Android system, the above application update method may further include: detecting whether the updated installation directory of the Android application is complete. If the installation directory of the Android application is incomplete, a prompt message indicating that the update failed may be issued. In this case, the differential package corresponding to the currently installed version of the Android application may be re-downloaded from the server to re-update the version. In this way, the integrity of the installation directory of the updated Android application is ensured.

[0072] Exemplarily, detecting whether the installation directory of an updated Android application is complete may include detecting whether the directory structure of the installation directory of the updated Android application is a directory structure specified by the Android system; if so, determining that the installation directory of the updated Android application is complete; otherwise, determining that the installation directory of the updated Android application is incomplete. In this embodiment, the integrity of the installation directory of the updated Android application can be accurately detected based on the directory structure.

[0073] The application updating device provided by the present invention is described below. The application updating device described below and the application updating method described above can be referenced to each other.

[0074] Based on any of the above embodiments, Figure 3 A schematic diagram of the structure of an application updating device provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the device includes a differential package download module 310 and a version update module 320;

[0075] The differential package downloading module 310 is used to download the differential package corresponding to the currently installed version of the Android application from the server, and the differential package includes the difference information between the new version of the Android application and the currently installed version;

[0076] The version update module 320 is used to update the installation directory of the Android application in the Android system using the differential package through the target operating system to update the current installed version to the new version; wherein the target operating system is different from the Android system and has the operation authority over the installation directory of the Android application.

[0077] Based on any of the above embodiments, the version update module is further configured to:

[0078] After updating the installation directory of the Android application in the Android system by using the differential package through the target operating system, the package management service of the Android system is notified to update the information of the currently installed version managed by it to the information of the new version.

[0079] Based on any of the above embodiments, the differential packet download module is specifically used to:

[0080] In response to a version update instruction from the Android application, download the differential package from the server; wherein the version update instruction is issued by the Android application after detecting a version update at startup;

[0081] Alternatively, the version number of the latest version of the Android application is obtained from the server, and the version number of the latest version is compared with the version number of the currently installed version to see if they are the same. In response to the comparison result being different, a differential package is downloaded from the server.

[0082] Based on any of the above embodiments, the version update module is specifically configured to:

[0083] In response to determining that the differential package is downloaded completely and / or passes the security check, the target operating system uses the differential package to update the installation directory of the Android application in the Android system.

[0084] Based on any of the above embodiments, the application update module may further include:

[0085] a completeness determination module for, after downloading a differential package corresponding to a currently installed version of an Android application from a server, and before updating an installation directory of the Android application in the Android system using the differential package through a target operating system, determining whether the size of the differential package is a preset size, and determining that the differential package is downloaded completely in response to the size of the differential package being the preset size;

[0086] And / or, a security verification module is used to generate a verification code based on the differential package after downloading the differential package corresponding to the currently installed version of the Android application from the server, and before updating the installation directory of the Android application in the Android system through the target operating system using the differential package, to determine whether the generated verification code is a preset verification code, and in response to the generated verification code being the preset verification code, determine that the differential package passes the security verification.

[0087] Based on any of the above embodiments, the version update module is specifically configured to:

[0088] Parse the difference information from the differential packet;

[0089] In response to the difference information including the newly added file and the corresponding path information, adding the newly added file to the installation directory of the Android application according to the path information corresponding to the newly added file;

[0090] In response to the difference information including the replacement file and the corresponding path information, searching for the original file in the installation directory of the Android application according to the path information corresponding to the replacement file, and replacing the original file with the replacement file;

[0091] In response to the difference information including the path information corresponding to the to-be-deleted file, the to-be-deleted file in the installation directory of the Android application is found and deleted according to the path information corresponding to the to-be-deleted file.

[0092] Based on any of the above embodiments, the target operating system is a Linux system.

[0093] Figure 4 The following is an example of a physical structure diagram of a terminal, such as Figure 4 As shown, the terminal may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the application update method, which includes: downloading a differential package corresponding to the currently installed version of the Android application from the server, the differential package including the difference information between the new version of the Android application and the currently installed version; using the differential package through the target operating system, updating the installation directory of the Android application in the Android system to update the currently installed version to the new version; wherein the target operating system is different from the Android system and has the operation authority over the installation directory of the Android application.

[0094] In addition, the logic instructions in the memory 430 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0095] The embodiment of the present application also provides a computer program product, which comprises a computer program stored on a non-transitory computer readable storage medium, and the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer can execute the application program updating method provided by the above method, and the method comprises the following steps: downloading a differential package corresponding to a current installation version of an Android application from a server, wherein the differential package comprises difference information between a new version and the current installation version of the Android application; and performing an updating operation on an installation directory of the Android application in an Android system by using the differential package through a target operating system, so that the current installation version is updated to the new version; wherein the target operating system is different from the Android system and has an operation permission for the installation directory of the Android application.

[0096] The embodiment of the present application also provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the application program updating method provided by the above method, and the method comprises the following steps: downloading a differential package corresponding to a current installation version of an Android application from a server, wherein the differential package comprises difference information between a new version and the current installation version of the Android application; and performing an updating operation on an installation directory of the Android application in an Android system by using the differential package through a target operating system, so that the current installation version is updated to the new version; wherein the target operating system is different from the Android system and has an operation permission for the installation directory of the Android application.

[0097] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0098] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for updating an application, characterized in that: include: Downloading a differential package corresponding to a currently installed version of an Android application from a server, comprising: actively obtaining a version number of a latest version of the Android application from the server during a preset idle time of the terminal, and in response to determining that the version number of the latest version is different from the version number of the currently installed version, downloading the differential package from the server; the differential package including difference information between the new version of the Android application and the currently installed version; performing an update operation on the installation directory of the Android application in the Android system using the differential package, through a target operating system, so as to update the currently installed version to the new version; wherein the target operating system is different from the Android system and has operation authority over the installation directory of the Android application; and the target operating system and the Android system are installed on the same terminal; After the target operating system is used to update the installation directory of the Android application in the Android system using the differential package, the method further includes: The package management service of the Android system is notified to update the managed information of the currently installed version to the information of the new version.

2. The application updating method according to claim 1, wherein: The differential package corresponding to the currently installed version of the Android application downloaded from the server includes: In response to a version update instruction from the Android application, downloading the differential package from the server; wherein the version update instruction is issued by the Android application after detecting a version update at startup; Alternatively, the version number of the latest version of the Android application is obtained from the server, and the version number of the latest version is compared with the version number of the currently installed version to see whether they are the same. In response to the comparison result being different, the differential package is downloaded from the server.

3. The application updating method according to claim 1, wherein: The updating operation of updating the installation directory of the Android application in the Android system by using the differential package through the target operating system includes: In response to determining that the differential package is downloaded completely and / or passes the security check, the target operating system uses the differential package to update the installation directory of the Android application in the Android system.

4. The application updating method according to claim 3, characterized in that: After downloading the differential package corresponding to the currently installed version of the Android application from the server, and before updating the installation directory of the Android application in the Android system using the differential package through the target operating system, the method further includes: determining whether the size of the differential package is a preset size, and in response to the size of the differential package being the preset size, determining that the differential package is completely downloaded; And / or, generating a check code based on the differential packet, determining whether the generated check code is a preset check code, and determining that the differential packet passes security verification in response to the generated check code being the preset check code.

5. The application updating method according to claim 1, wherein: The updating operation on the installation directory of the Android application in the Android system by using the differential package includes: Parsing the difference information from the difference packet; In response to the difference information including the newly added file and the corresponding path information, adding the newly added file to the installation directory of the Android application according to the path information corresponding to the newly added file; In response to the difference information including the replacement file and the corresponding path information, searching for the original file in the installation directory of the Android application according to the path information corresponding to the replacement file, and replacing the original file with the replacement file; In response to the difference information including the path information corresponding to the to-be-deleted file, the to-be-deleted file in the installation directory of the Android application is found and deleted according to the path information corresponding to the to-be-deleted file.

6. The application updating method according to any one of claims 1 to 5, characterized in that: The target operating system is the Linux system.

7. An application updating device, characterized in that: include: A differential package download module, configured to download a differential package corresponding to a currently installed version of an Android application from a server, comprising: actively obtaining the version number of the latest version of the Android application from the server during a preset idle time of the terminal, and in response to determining that the version number of the latest version is different from the version number of the currently installed version, downloading the differential package from the server; the differential package including difference information between the new version of the Android application and the currently installed version; a version update module, configured to update the installation directory of the Android application in the Android system using the differential package through a target operating system, so as to update the currently installed version to the new version; wherein the target operating system is different from the Android system and has operation permissions on the installation directory of the Android application; and the target operating system and the Android system are installed on the same terminal; Wherein, the device further includes: The notification module is used to notify the package management service of the Android system to update the managed information of the currently installed version to the information of the new version.

8. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the application updating method according to any one of claims 1 to 6 are implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the application updating method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Application version updating method and device, equipment and medium

    CN113326058A