Application program updating method, storage medium and terminal device

By saving offline resource package and version number in the local configuration file, determining whether it is the latest, and obtaining online resource packages when it is not the latest, the problem of low application update efficiency and success rate in the existing technology is solved, and the implementation of the Automatically repair the cause of failure, improving the user experience.

CN109358873BActive Publication Date: 2024-11-22SHENZHEN SANIDI TECHNOLOGY DEVELOPMENT CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN201811120137.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-09-25
Publication Date
2024-11-22
Estimated Expiration
2038-09-25

AI Technical Summary

Technical Problem

Existing applications have low update efficiency and update success rate, especially when the network is poor, and the reasons for failure cannot be fixed by themselves when the update fails.

Method used

By saving the offline resource package and version number in the local configuration file, determine whether it is the latest. If it is not the latest, obtain the latest online resource package. Clear the cache and re-acquire it when it fails, and fix the cause of failure by yourself.

Benefits of technology

It improves the update efficiency and success rate of the application, improves the update experience of users, and can automatically fix the cause of failure when the network conditions are poor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109358873B_ABST
    Figure CN109358873B_ABST
Patent Text Reader

Abstract

This invention discloses an application update method, storage medium, and terminal device. When a user needs to update an application, the method determines whether the offline resource package in the local configuration file is the latest resource package for the application based on the offline version number in the application's local configuration file. If the offline resource package is the latest, the application is updated offline directly based on the offline resource package without needing to download the resource package again, greatly improving the update efficiency and success rate. If the offline resource package is not the latest, the latest resource package is retrieved. If retrieving the latest resource package fails, the existing built-in cached resources in the local configuration file are automatically cleared, and then the latest resource package is automatically retrieved again to self-correct the cause of the failure, improving the success rate of retrieving the latest resource package. This solves the problem of low update efficiency and success rate in existing applications and improves the user's update experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to an application updating method, a storage medium and a terminal device. Background Art

[0002] With the rapid development of computer technology, there are more and more types of applications. In order to meet the needs of users and enhance their experience, it is necessary to continuously improve the functions of applications and / or fix vulnerabilities. At present, the improvement of application functions and / or fixes vulnerabilities mainly requires developers to publish the update resource package to the corresponding server after completing the update resource package of the application. When users update the application, they update the application by downloading the update resource package from the server. That is to say, during the process of updating the application, users need to manually download the update resource package from the server before they can update the application. This makes the update efficiency of existing applications low, and when the network is not good, it will greatly reduce the update success rate of the application. In addition, when the update fails, only the result of the update failure is returned to the user, and the cause of the failure cannot be repaired by itself, which further reduces the update efficiency and update success rate of the application.

[0003] In summary, how to improve the update efficiency and update success rate of application programs has become an urgent problem to be solved by those skilled in the art. Summary of the invention

[0004] The embodiments of the present invention provide an application update method, a storage medium and a terminal device, which can improve the update efficiency and update success rate of the application, so as to solve the problems of low update efficiency and update success rate of the existing application and enhance the user's update experience.

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

[0006] If an update request for an application is received, obtaining the latest online version number of the application and a local configuration file of the application, wherein the local configuration file stores an offline resource package of the application and an offline version number corresponding to the offline resource package;

[0007] Determine whether the offline version number is the same as the latest online version number of the application;

[0008] If the offline version number is the same as the online latest version number, updating the application according to the offline resource package;

[0009] If the offline version number is different from the online latest version number, obtaining the online latest resource package corresponding to the online latest version number;

[0010] Determine whether the latest online resource package is successfully obtained;

[0011] When the acquisition of the latest online resource package fails, clearing the existing built-in cache resources in the local configuration file, and reacquiring the latest online resource package;

[0012] After successfully acquiring the latest online resource package, the application and the local configuration file are updated according to the latest online resource package.

[0013] According to a second aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the application updating method described in the first aspect are implemented.

[0014] According to a third aspect of an embodiment of the present invention, a terminal device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer-readable instructions:

[0015] If an update request for an application is received, obtaining the latest online version number of the application and a local configuration file of the application, wherein the local configuration file stores an offline resource package of the application and an offline version number corresponding to the offline resource package;

[0016] Determine whether the offline version number is the same as the latest online version number of the application;

[0017] If the offline version number is the same as the online latest version number, updating the application according to the offline resource package;

[0018] If the offline version number is different from the online latest version number, obtaining the online latest resource package corresponding to the online latest version number;

[0019] Determine whether the latest online resource package is successfully obtained;

[0020] When the acquisition of the latest online resource package fails, clearing the existing built-in cache resources in the local configuration file, and reacquiring the latest online resource package;

[0021] After successfully acquiring the latest online resource package, the application and the local configuration file are updated according to the latest online resource package.

[0022] It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages:

[0023] In an embodiment of the present invention, when a user needs to update an application, the offline version number in the local configuration file of the application is used to determine whether the offline resource package in the local configuration file is the latest resource package of the application. When the offline resource package in the local configuration file is the latest resource package, the application is directly updated offline according to the offline resource package in the local configuration file without downloading the resource package, thereby greatly improving the update efficiency and update success rate of the application; and when the offline resource package in the local configuration file is not the latest resource package, the latest resource package is obtained, and when the latest resource package fails to be obtained, the existing built-in cache resources in the local configuration file are automatically cleared, and then automatically re-obtained to repair the failure cause by itself, thereby improving the success rate of obtaining the latest resource package, thereby solving the problems of low update efficiency and update success rate of existing applications, and improving the user's update experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0025] Figure 1 A flowchart of an embodiment of a method for updating an application program in an embodiment of the present invention;

[0026] Figure 2 A schematic diagram of a process of obtaining the latest online resource package in an application scenario in an application updating method according to an embodiment of the present invention;

[0027] Figure 3 A schematic diagram of a process of obtaining the latest online resource package in another application scenario of the application updating method in an embodiment of the present invention;

[0028] Figure 4 A structural diagram of an embodiment of an application updating device in an embodiment of the present invention;

[0029] Figure 5 A schematic diagram of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The embodiments of the present invention provide an application updating method, a storage medium and a terminal device for improving the updating efficiency and the updating success rate of the application, so as to solve the problems of low updating efficiency and the updating success rate of the existing application and improve the updating experience of the user.

[0031] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] See also Figure 1 The embodiment of the present invention provides an application updating method, the application updating method comprising:

[0033] Step S101: if an update request for an application is received, the latest online version number of the application and a local configuration file of the application are obtained, wherein the local configuration file stores an offline resource package of the application and an offline version number corresponding to the offline resource package.

[0034] Preferably, in an embodiment of the present invention, before receiving an update request for an application, the following may also be included: step a, detecting in real time whether an update resource package of the application exists in a server corresponding to the application; step b, if the update resource package of the application exists in the server, downloading the update resource package to a local configuration file of the application, so as to update the offline resource package and offline version number in the local configuration file.

[0035] It is understandable that when a user installs an application on an application terminal, the application terminal will create a local configuration file corresponding to the application locally, which is used to store the resource package currently being used by the application and the related cache resources. In addition, during the operation of the application, the application terminal can also detect in real time whether there is an updated resource package of the application in the server corresponding to the application. If there is an updated resource package of the application, the updated resource package will be automatically downloaded to the local configuration file as the offline resource package of the application. At the same time, a local configuration table is created in the local configuration file. The offline version number of the offline resource package and the current version number of the resource package currently being used by the application are stored in the local configuration table. For example, if the current version number of the resource package currently being used by the application is 1.0, and the offline version number of the offline resource package of the application obtained is 1.2, then the local configuration table of the local configuration file can store the information "Current version number: 1.0, offline version number: 1.2".

[0036] Here, when the application terminal finds that the offline version number stored in the local configuration table is higher than the current version number currently being used by the application, the application terminal can automatically output an update prompt message or output an update prompt message after a set preset time to remind the user to update the application. If the user chooses to update, the application will be updated, that is, the resource package currently being used by the application will be updated to the offline resource package, and the current version number in the local configuration table will be updated to the offline version number.

[0037] Furthermore, since the application updates quickly and there is a certain time delay in obtaining the offline resource package, the offline resource package in the local configuration file may not be the latest resource package of the application. Therefore, when the user chooses to update the application, the application terminal can also obtain the latest online version number of the application by accessing the server corresponding to the application, that is, obtaining the version number corresponding to the latest resource package of the application stored on the server.

[0038] Step S102: Determine whether the offline version number is the same as the latest online version number of the application.

[0039] It is understandable that when the application terminal obtains the latest online version number of the application, it can determine whether the offline version number stored in the local configuration file of the application is the same as the latest online version number, thereby determining whether the offline resource package stored in the local configuration file is the latest resource package of the application.

[0040] Step S103: If the offline version number is the same as the online latest version number, then update the application according to the offline resource package.

[0041] Here, when the offline version number of the offline resource package in the local configuration file is the same as the latest online version number, it indicates that before the user requests to update the application, the application terminal has successfully downloaded the latest version of the application from the server, that is, the offline resource package stored in the local configuration file corresponding to the application is the latest resource package of the application. At this time, the application terminal can update the application according to the offline resource package in the local configuration file, and update the local configuration file of the application, such as updating the local configuration table in the local configuration file to update the current version number stored in the local configuration table, such as 1.0, to the offline version number, such as 1.2, so as to directly update the application through the offline resource package, thereby greatly improving the update efficiency and update success rate of the application.

[0042] Furthermore, updating the application according to the offline resource package may include: step c, obtaining the current version number of the resource package currently being used by the application, and determining whether the current version number is the same as the offline version number; step d, if the current version number is not the same as the offline version number, updating the application according to the offline resource package.

[0043] It can be understood that after determining that the offline resource package stored in the local configuration file is the latest resource package of the application, it can be further determined whether the application terminal has updated the application according to the offline resource package before the user requests an update, that is, first obtain the current version number of the resource package currently being used by the application, and then determine whether the current version number is the same as the offline version number. If the current version number is the same as the offline version number, it indicates that the application has been updated according to the offline resource package, that is, the version currently being used by the application is the latest version of the application, and there is no need to update it again. At this time, the user's update request can be directly rejected, and a prompt message that the application is the latest version can be output to the user; if the current version number is different from the offline version number, it indicates that the resource package currently being used by the application is not the latest resource package of the application, and the application can be updated according to the offline resource package, that is, the resource package currently being used by the application is updated to the offline resource package, and the current version number of the resource package currently being used by the application is updated to the offline version number corresponding to the offline resource package.

[0044] Step S104: If the offline version number is different from the online latest version number, then obtain the online latest resource package corresponding to the online latest version number.

[0045] It can be understood that in an embodiment of the present invention, if the offline version number of the offline resource package in the local configuration file is different from the online latest version number, such as the offline version number of the offline resource package is 1.3, and the online latest version number of the application obtained from the server is 1.4, it means that before the user requests to update the application, the application terminal has not downloaded the online latest resource package of the application from the server to the local configuration file. Therefore, at this time, the application terminal can directly and automatically obtain the online latest resource package corresponding to the online latest version number of the application from the server, such as downloading the online latest resource package from the server to the local configuration file.

[0046] Step S105: Determine whether the latest online resource package is successfully acquired.

[0047] It can be understood that in an embodiment of the present invention, after completing the download operation of the online latest resource package of the application, the application terminal may also perform a local configuration file detection to determine whether the online latest resource package is successfully downloaded, such as whether the online latest resource package is obtained, whether the obtained online latest resource package is complete, whether it is damaged, etc.

[0048] Step S106: When the acquisition of the latest online resource package fails, clear the existing built-in cache resources in the local configuration file, and reacquire the latest online resource package.

[0049] Here, when the application terminal determines that the acquisition of the latest online resource package has failed, such as the latest online resource package has not been acquired, or the acquired latest online resource package is damaged or incomplete, the application terminal can automatically clear the existing built-in cache resources in the local configuration file, and automatically re-acquire the latest online resource package. Here, clearing the existing built-in cache resources in the local configuration file can be clearing all the existing cache resources in the local configuration file, or it can be clearing some of the existing cache resources in the local configuration file, such as clearing some data cache resources that have no effect on the use of the application, etc., and the existing cache resources in the local configuration file can include the cache resources generated during the failure to download the latest online resource package.

[0050] Step S107: after successfully acquiring the latest online resource package, updating the application and the local configuration file according to the latest online resource package.

[0051] It can be understood that when the application terminal determines that it has successfully obtained the latest online resource package of the application, it can automatically update the application according to the latest online resource package, and update the local configuration file of the application, such as updating the offline resource package in the local configuration file to the latest online resource package, and updating the offline version number of the offline resource package to the latest online version number corresponding to the latest online resource package. At the same time, the local configuration table in the local configuration file is also updated to update the current version number and offline version number stored in the local configuration table to the latest online version number, thereby self-repairing the cause of failure and improving the success rate of obtaining the latest resource package, so as to solve the problems of low update efficiency and update success rate of existing application programs and improve the user's update experience.

[0052] Furthermore, if Figure 2 As shown, step S106, when the acquisition of the online latest resource package fails, clearing the existing built-in cache resources in the local configuration file and reacquiring the online latest resource package may include:

[0053] Step S201: when the online latest resource package fails to be obtained, counting the number of failures in obtaining the online latest resource package;

[0054] Step S202: determine whether the number of failures reaches a preset number threshold;

[0055] Step S203: When the number of failures reaches a preset number threshold, the existing built-in cache resources in the local configuration file are cleared, and the online latest resource package is acquired again.

[0056] As for the above steps S201 to S203, it can be understood that, in the embodiment of the present invention, when the application terminal fails to obtain the latest online resource package once, the existing built-in cache resources in the local configuration file are not directly cleared, but the latest online resource package is automatically obtained again. When the latest online resource package fails to be obtained continuously, and the number of consecutive failures reaches the preset number threshold, the existing built-in cache resources in the local configuration file can be automatically cleared. Here, the application terminal is pre-set with the preset number threshold required to clear the existing built-in cache resources in the local configuration file. Therefore, in the process of the application terminal obtaining the latest online resource package, the application terminal records the number of failures of the online latest resource package in real time, that is, in the process of the application terminal obtaining the latest online resource package, the application terminal automatically increases the number of failures by a unit each time the acquisition fails. For example, when the number of consecutive failures reaches the preset number threshold, the existing built-in cache resources in the local configuration file can be automatically cleared, and the latest online resource package can be obtained again.

[0057] For example, in a specific application, assuming that the preset number threshold is 3 times, and the application terminal fails to obtain the latest online resource package for the first and second times, but succeeds for the third time, then the built-in cache resources in the local configuration file do not need to be cleared, thereby ensuring the integrity of the built-in cache resources in the application to avoid losing user information; and when the first, second and third times all fail to obtain, the built-in cache resources in the local configuration file can be automatically cleared, and the online latest resource package can be obtained again to ensure that the online latest resource package of the application can be obtained, thereby improving the success rate of obtaining the latest online resource package and ensuring the update success rate of the application.

[0058] Here, the preset number threshold can be obtained by performing big data analysis based on historical data, and of course can also be set by the user according to specific circumstances.

[0059] Preferably, when the acquisition of the latest online resource package fails, the existing built-in cache resources in the local configuration file are cleared, and the online latest resource package is re-acquired. It can also include: step e, when the acquisition of the latest online resource package fails, output a prompt message, and the prompt message is used to prompt whether to clear the cache and re-acquire the online latest resource package; step f, when a confirmation message in response to the prompt message is received, the existing built-in cache resources in the local configuration file are cleared, and the online latest resource package is re-acquired.

[0060] Regarding the above-mentioned steps e and f, it can be understood that, in an embodiment of the present invention, when the application terminal fails to obtain the latest online resource package, the application terminal may output a prompt message to prompt the user whether to clear the cache and re-acquire the latest online resource package. If the user is sure to clear the cache and re-acquire the latest online resource package, and has made a corresponding confirmation response, the application terminal may clear the existing built-in cache resources in the local configuration file, and re-acquire the latest online resource package, so that the user can clearly understand the reason for the failure to obtain the latest online resource package, and guide the user to obtain the latest online resource package, thereby enhancing the user's update experience.

[0061] Alternatively, if Figure 3 As shown, step S104, if the offline version number is different from the online latest version number, obtaining the online latest resource package corresponding to the online latest version number may include:

[0062] Step S301: If the offline version number is different from the online latest version number, obtaining the remaining memory in the local configuration file and the occupied memory of the online latest resource package corresponding to the online latest version number;

[0063] Step S302, determining whether the remaining memory is greater than or equal to the occupied memory;

[0064] Step S303: when the remaining memory is greater than or equal to the occupied memory, obtaining the latest online resource package;

[0065] Step S304: When the remaining memory is less than the occupied memory, clear the existing built-in cache resources in the local configuration file, and reacquire the latest online resource package.

[0066] For the above steps S301 to S304, it can be understood that, in the embodiment of the present invention, when the application terminal determines that the offline version number of the application is different from the online latest version number held by the corresponding server, the application terminal can obtain the occupied memory of the online latest resource package corresponding to the online latest version number held by the server, and at the same time obtain the remaining memory in the local configuration file of the application, that is, the free memory in the local configuration file that can be used to receive new resources, and further determine the size relationship between the occupied memory of the online latest resource package and the remaining memory in the local configuration file. If the remaining memory in the local configuration file is greater than or equal to the occupied memory of the online latest resource package, it indicates that the local configuration file can still accommodate the occupied memory of the online latest resource package. The online latest resource package, therefore, can be directly acquired at this time; if the remaining memory in the local configuration file is less than the memory occupied by the online latest resource package, it indicates that the local configuration file can no longer accommodate the online latest resource package. At this time, if the online latest resource package is directly acquired, it will directly lead to the failure of acquiring the online latest resource package, thereby greatly reducing the success rate of acquiring the online latest resource package. Therefore, at this time, the application terminal can first automatically clear the existing built-in cache resources in the local configuration file to ensure that there are sufficient memory resources in the local configuration file, and then re-acquire the online latest resource package, thereby greatly improving the success rate of acquiring the online latest resource package, and then improving the update efficiency of the application update.

[0067] In an embodiment of the present invention, when a user needs to update an application, it is possible to determine whether an offline resource package in a local configuration file of the application is the latest resource package of the application based on the offline version number in the local configuration file of the application. When the offline resource package in the local configuration file is the latest resource package, the application can be directly updated offline based on the offline resource package in the local configuration file without downloading the resource package, thereby greatly improving the update efficiency and update success rate of the application; and when the offline resource package in the local configuration file is not the latest resource package, the latest resource package can be obtained, and when the latest resource package fails to be obtained, the existing memory cache resources in the local configuration file are automatically cleared, and then automatically re-acquired to repair the cause of the failure by itself, thereby improving the success rate of obtaining the latest resource package, thereby solving the problems of low update efficiency and update success rate of existing applications, and improving the user's update experience.

[0068] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0069] The above mainly describes an application updating method, and the following will describe an application updating device in detail.

[0070] like Figure 4 As shown, an embodiment of the present invention provides an application updating device, the application updating device comprising:

[0071] The update request receiving module 401 is used to obtain the latest online version number of the application and the local configuration file of the application when receiving an update request of the application, wherein the local configuration file stores the offline resource package of the application and the offline version number corresponding to the offline resource package;

[0072] A version number determination module 402 is used to determine whether the offline version number is the same as the online latest version number of the application;

[0073] A first offline update module 403, configured to update the application according to the offline resource package if the offline version number is the same as the online latest version number;

[0074] The resource package acquisition module 404 is used to acquire the online latest resource package corresponding to the online latest version number if the offline version number is different from the online latest version number;

[0075] The resource package determination module 405 is used to determine whether the latest online resource package is successfully obtained;

[0076] The cache clearing module 406 is used to clear the existing built-in cache resources in the local configuration file and re-acquire the online latest resource package when the acquisition of the online latest resource package fails;

[0077] The second offline updating module 407 is used to update the application and the local configuration file according to the online latest resource package after successfully acquiring the online latest resource package.

[0078] Furthermore, the cache clearing module 406 includes:

[0079] A failure count counting unit, used for counting the number of failures of obtaining the latest online resource package when the latest online resource package fails to be obtained;

[0080] The first cache clearing unit is used to clear the existing built-in cache resources in the local configuration file and re-acquire the online latest resource package when the number of failures reaches a preset number threshold.

[0081] Preferably, the cache clearing module 406 further includes:

[0082] A prompt message output unit, used for outputting a prompt message when the acquisition of the online latest resource package fails, wherein the prompt message is used for prompting whether to clear the cache and re-acquire the online latest resource package;

[0083] The second cache clearing unit is used to clear the existing built-in cache resources in the local configuration file and re-acquire the online latest resource package when receiving a confirmation message in response to the prompt message.

[0084] Optionally, the resource package acquisition module 404 includes:

[0085] A memory acquisition unit, configured to acquire the remaining memory in the local configuration file and the occupied memory of the online latest resource package corresponding to the online latest version number if the offline version number is different from the online latest version number;

[0086] A first resource package acquisition unit, configured to acquire the latest online resource package when the remaining memory is greater than or equal to the occupied memory;

[0087] The second resource package acquisition unit is used to clear the existing built-in cache resources in the local configuration file and re-acquire the online latest resource package when the remaining memory is less than the occupied memory.

[0088] Furthermore, the first offline updating module 403 includes:

[0089] A current version number determination unit, used to obtain the current version number of the resource package currently being used by the application, and determine whether the current version number is the same as the offline version number;

[0090] The first offline updating unit is configured to update the application program according to the offline resource package if the current version number is different from the offline version number.

[0091] Preferably, the application updating device further comprises:

[0092] A resource package detection module, used for detecting in real time whether there is an updated resource package of the application in the server corresponding to the application;

[0093] The offline resource package update module is used to download the updated resource package of the application to the local configuration file of the application if the updated resource package of the application exists in the server, so as to update the offline resource package and offline version number in the local configuration file.

[0094] Figure 5 Schematic diagram of a terminal device provided by an embodiment of the present invention. Figure 5As shown, the terminal device 5 of this embodiment includes: a processor 50, a memory 51, and a computer-readable instruction 52 stored in the memory 51 and executable on the processor 50, such as an application program update program. When the processor 50 executes the computer-readable instruction 52, the steps in the above-mentioned various application program update method embodiments are implemented, such as Figure 1 Alternatively, when the processor 50 executes the computer-readable instructions 52, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 4 The functions of modules 401 to 407 are shown.

[0095] Exemplarily, the computer-readable instructions 52 may be divided into one or more modules / units, which are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer-readable instructions 52 in the terminal device 5.

[0096] The terminal device 5 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5 It is only an example of the terminal device 5 and does not constitute a limitation of the terminal device 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.

[0097] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0098] The memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 5. Further, the memory 51 may also include both an internal storage unit of the terminal device 5 and an external storage device. The memory 51 is used to store the computer-readable instructions and other programs and data required by the terminal device. The memory 51 may also be used to temporarily store data that has been output or is to be output.

[0099] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0100] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0101] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. 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 embodiments of the present invention.

Claims

1. A method for updating an application, characterized in that: include: If an update request for an application is received, the latest online version number of the application and a local configuration file of the application are obtained, wherein the local configuration file stores an offline resource package of the application and an offline version number corresponding to the offline resource package, wherein the update request is generated in response to a determination operation on update prompt information, wherein the update prompt information is automatically output when it is determined that the offline version number stored in the local configuration file is higher than the current version number currently being used by the application, and the offline resource package is an updated resource package of the application; Determine whether the offline version number is the same as the latest online version number of the application; If the offline version number is the same as the online latest version number, updating the application according to the offline resource package; If the offline version number is different from the online latest version number, obtaining the online latest resource package corresponding to the online latest version number; Determine whether the latest online resource package is successfully obtained; When the acquisition of the latest online resource package fails, clearing the existing built-in cache resources in the local configuration file, and reacquiring the latest online resource package; After successfully acquiring the latest online resource package, the application and the local configuration file are updated according to the latest online resource package.

2. The application updating method according to claim 1, characterized in that: When the acquisition of the online latest resource package fails, clearing the existing built-in cache resources in the local configuration file and reacquiring the online latest resource package includes: When the online latest resource package fails to be obtained, counting the number of failures of obtaining the online latest resource package; When the number of failures reaches a preset number threshold, the existing built-in cache resources in the local configuration file are cleared, and the online latest resource package is re-acquired.

3. The application updating method according to claim 1, characterized in that: When the acquisition of the online latest resource package fails, clearing the existing built-in cache resources in the local configuration file and reacquiring the online latest resource package includes: When the acquisition of the latest online resource package fails, a prompt message is output, wherein the prompt message is used to prompt whether to clear the cache and re-acquire the latest online resource package; When a confirmation message in response to the prompt message is received, the existing built-in cache resources in the local configuration file are cleared, and the online latest resource package is re-acquired.

4. The application updating method according to claim 1, characterized in that: If the offline version number is different from the online latest version number, obtaining the online latest resource package corresponding to the online latest version number includes: If the offline version number is different from the online latest version number, obtaining the remaining memory in the local configuration file and the occupied memory of the online latest resource package corresponding to the online latest version number; When the remaining memory is greater than or equal to the occupied memory, acquiring the latest online resource package; When the remaining memory is less than the occupied memory, the existing built-in cache resources in the local configuration file are cleared, and the online latest resource package is re-acquired.

5. The application updating method according to claim 1, characterized in that: The updating of the application according to the offline resource package includes: Obtaining the current version number of the resource package currently being used by the application, and determining whether the current version number is the same as the offline version number; If the current version number is different from the offline version number, the application is updated according to the offline resource package.

6. The application updating method according to any one of claims 1 to 5, characterized in that: Before receiving an update request for an application, include: Real-time detection of whether there is an update resource package of the application in the server corresponding to the application; If the update resource package of the application exists in the server, the update resource package is downloaded to the local configuration file of the application to update the offline resource package and the offline version number in the local configuration file.

7. A computer-readable storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the steps of the application updating method according to any one of claims 1 to 6 are implemented.

8. A terminal device, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer-readable instructions, the following steps are implemented: If an update request for an application is received, the latest online version number of the application and a local configuration file of the application are obtained, wherein the local configuration file stores an offline resource package of the application and an offline version number corresponding to the offline resource package, wherein the update request is generated in response to a determination operation on update prompt information, wherein the update prompt information is automatically output when it is determined that the offline version number stored in the local configuration file is higher than the current version number currently being used by the application, and the offline resource package is an updated resource package of the application; Determine whether the offline version number is the same as the latest online version number of the application; If the offline version number is the same as the online latest version number, updating the application according to the offline resource package; If the offline version number is different from the online latest version number, obtaining the online latest resource package corresponding to the online latest version number; Determine whether the latest online resource package is successfully obtained; When the acquisition of the latest online resource package fails, clearing the existing built-in cache resources in the local configuration file, and reacquiring the latest online resource package; After successfully acquiring the latest online resource package, the application and the local configuration file are updated according to the latest online resource package.

9. The terminal device according to claim 8, characterized in that: When the acquisition of the online latest resource package fails, clearing the existing built-in cache resources in the local configuration file and reacquiring the online latest resource package includes: When the online latest resource package fails to be obtained, counting the number of failures of obtaining the online latest resource package; When the number of failures reaches a preset number threshold, the existing built-in cache resources in the local configuration file are cleared, and the online latest resource package is re-acquired.

10. The terminal device according to claim 8, characterized in that: When the acquisition of the online latest resource package fails, clearing the existing built-in cache resources in the local configuration file and reacquiring the online latest resource package includes: When the acquisition of the latest online resource package fails, a prompt message is output, wherein the prompt message is used to prompt whether to clear the cache and re-acquire the latest online resource package; When a confirmation message in response to the prompt message is received, the existing built-in cache resources in the local configuration file are cleared, and the online latest resource package is re-acquired.

Citation Information

Patent Citations

  • Immediate updating device and immediate updating method

    CN103092665A

  • File updating method and device, and equipment

    CN105589705A

  • Application program update method, storage medium and terminal

    CN107391173A

  • Method and device for updating client resource bundle

    CN107846465A

  • Resource updating method and system

    CN108228210A